msn cancel receiving file crash
pencil 磊
pencilren at hotmail.com
Wed Aug 29 08:43:41 EDT 2007
We are working on porting pidgin 2.0.0 to QTOPIA, and we implemented the
file transfer and receive by request UIOps (imitating pidgin
implementation). But it will crash when we reject receiving a file. I only
test two protocols. MSN always has the crash, but icq dose not. and I find
that The message of reject has been sent, and the slplink and switchboard
has been freed, but they were used by the later codes. I comment some codes
in msn_slplink_destroy() to fix this crash temporary. and the codes which
are commented is:
93 void
94 msn_slplink_destroy(MsnSlpLink *slplink)
95 {
96 MsnSession *session;
97
98 #ifdef MSN_DEBUG_SLPLINK
99 purple_debug_info("msn", "slplink_destroy: slplink(%p)\n",
slplink);
100 #endif
101
102 g_return_if_fail(slplink != NULL);
103
104 if (slplink->swboard != NULL)
105 slplink->swboard->slplinks =
g_list_remove(slplink->swboard->slplinks, slplink);
106
107 session = slplink->session;
108 slplink->swboard=NULL;
109
110 // if (slplink->local_user != NULL)
111 // g_free(slplink->local_user);
112
113 // if (slplink->remote_user != NULL)
114 // g_free(slplink->remote_user);
115
116 if (slplink->directconn != NULL)
117 msn_directconn_destroy(slplink->directconn);
118
119 while (slplink->slp_calls != NULL)
120 msn_slp_call_destroy(slplink->slp_calls->data);
121
122 session->slplinks =
123 g_list_remove(session->slplinks, slplink);
124
125 // g_free(slplink);
126
127 }
I trace the code by gdb, the following is stack backtrace:
#0 0xb763e8e2 in g_list_last () from /usr/lib/libglib-2.0.so.0
#1 0xb763e925 in g_list_append () from /usr/lib/libglib-2.0.so.0
#2 0xb6d26c63 in msn_slpmsg_new (slplink=0x8279d58) at slpmsg.c:45
#3 0xb6d261b1 in msn_slplink_send_ack (slplink=0x8279d58, msg=0x82791a0)
at slplink.c:468
#4 0xb6d266e9 in msn_slplink_process_msg (slplink=0x8279d58,
msg=0x82791a0) at slplink.c:642
#5 0xb6d246f4 in msn_p2p_msg (cmdproc=0x8117b78, msg=0x82791a0) at
slp.c:762
#6 0xb6d11f20 in msn_cmdproc_process_msg (cmdproc=0x8117b78,
msg=0x82791a0) at cmdproc.c:248
#7 0xb6d28aeb in msg_cmd_post (cmdproc=0x8117b78, cmd=0x81083c0,
payload=0x81414be "MIME-Version: 1.0\r\nContent-Type:
application/x-msnmsgrp2p\r\nP2P-Dest: dupengxiao at hotmail.com\r\n\r\n",
len=151) at switchboard.c:737
#8 0xb6d11e7a in msn_cmdproc_process_payload (cmdproc=0x8117b78,
payload=0x81414be "MIME-Version: 1.0\r\nContent-Type:
application/x-msnmsgrp2p\r\nP2P-Dest: dupengxiao at hotmail.com\r\n\r\n",
payload_len=151) at cmdproc.c:223
#9 0xb6d22920 in read_cb (data=0x81cadc8, source=20,
cond=PURPLE_INPUT_READ) at servconn.c:442
#10 0x0807ae94 in purple_gnt_io_invoke (source=0x81c93a0,
condition=G_IO_IN, data=0x8279e78)
at ALMPurple.cpp:150
#11 0xb766973f in g_vasprintf () from /usr/lib/libglib-2.0.so.0
#12 0xb7640f6c in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#13 0xb7642924 in g_main_context_acquire () from /usr/lib/libglib-2.0.so.0
#14 0xb7642da9 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
More information about the Devel
mailing list