* src/send_message.c
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 30 Mar 2003 14:55:52 +0000 (14:55 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 30 Mar 2003 14:55:52 +0000 (14:55 +0000)
* src/commons/session.c
add more debug traces

ChangeLog.claws
configure.ac
src/common/session.c
src/send_message.c

index 8ecbe2c..3f16c61 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-30 [alfons]    0.8.11claws68
+
+       * src/send_message.c
+       * src/commons/session.c
+               add more debug traces
+
 2003-03-30 [christoph] 0.8.11claws67
 
        * src/folder.c
index 3b0e50b..00ea159 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws67
+EXTRA_VERSION=claws68
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index a15dadf..daf677d 100644 (file)
@@ -208,9 +208,13 @@ void session_destroy(Session *session)
 
        g_print("session_destroy()\n");
        session_close(session);
+       g_print("$$$ session_destroy() session->destroy called\n");
        session->destroy(session);
+       g_print("$$$ session_destroy() freeing session server\n");
        g_free(session->server);
+       g_print("$$$ session_destroy() freeing session\n");
        g_free(session);
+       g_print("$$$ session_destroy() done\n");
 }
 
 void session_set_recv_message_notify(Session *session,
@@ -269,18 +273,22 @@ static gint session_close(Session *session)
                g_source_remove(session->read_tag);
                session->read_tag = 0;
        }
-
+       
+       g_print("$$$ %s: closing read channel\n", session->child_pid == 0 ? "child" : "parent");
        if (session->read_ch) {
                g_io_channel_close(session->read_ch);
                g_io_channel_unref(session->read_ch);
                session->read_ch = NULL;
        }
+       
+       g_print("$$$ %s: closing write channel\n", session->child_pid == 0 ? "child" : "parent");
        if (session->write_ch) {
                g_io_channel_close(session->write_ch);
                g_io_channel_unref(session->write_ch);
                session->write_ch = NULL;
        }
 
+       g_print("$$$ %s: closing socket\n", session->child_pid == 0 ? "child" : "parent");
        if (session->sock) {
                sock_close(session->sock);
                session->sock = NULL;
@@ -288,11 +296,13 @@ static gint session_close(Session *session)
        }
 
        if (session->child_pid) {
+               g_print("$$$ %s: closing child\n", session->child_pid == 0 ? "child" : "parent");
                kill(session->child_pid, SIGTERM);
                waitpid(session->child_pid, NULL, 0);
                session->child_pid = 0;
        }
 
+       g_print("$$$ %s: exiting session_close\n", session->child_pid == 0 ? "child" : "parent");
        return 0;
 }
 
@@ -704,8 +714,12 @@ gboolean session_parent_input_cb(GIOChannel *source, GIOCondition condition,
        case SESSION_MSG_NORMAL:
                msg_data = msg + strlen("MESSAGE ");
                ret = session->recv_msg(session, msg_data);
+               g_print("$$$ > session_parent_input_cb(data: %lx)\n", 
+                       session->recv_msg_notify_data);
                session->recv_msg_notify(session, msg_data,
                                         session->recv_msg_notify_data);
+               g_print("$$$ < session_parent_input_cb(data: %lx)\n", 
+                       session->recv_msg_notify_data);
                if (ret > 0)
                        session_send_msg(session, SESSION_MSG_CONTROL,
                                         "CONTINUE");
index 7d83c1d..4365051 100644 (file)
@@ -426,10 +426,16 @@ gint send_message_smtp(PrefsAccount *ac_prefs, GSList *to_list, FILE *fp)
 
 static gint send_recv_message(Session *session, const gchar *msg, gpointer data)
 {
-       SMTPSession *smtp_session = SMTP_SESSION(session);
-       SendProgressDialog *dialog = (SendProgressDialog *)data;
+       SMTPSession *smtp_session;
+       SendProgressDialog *dialog
        gchar buf[BUFFSIZE];
-       gchar *state_str = NULL;
+       gchar *state_str;
+
+       g_print("$$$ > send_recv_message(data: %lx)\n", data);
+       dialog = (SendProgressDialog *) data;
+       state_str = NULL;
+       smtp_session = SMTP_SESSION(session);
+       g_print("$$$ > send_recv_message(dialog: %lx)\n", dialog);
 
        switch (smtp_session->state) {
        case SMTP_READY: