Mercurial > pidgin.yaz
comparison libgaim/protocols/msn/servconn.c @ 20390:d634f88e25d8
msn.tgz from SF Patch #1621854 from Ka-Hing Cheung
"This tarball brings soc-2006-msnp13 up to head. In addition to that it also
fixes a crash with sending offline messages.
I wasn't able to generate a diff against that branch, svn seems to insist
on diff'ing against HEAD after I run the merge command. After running `svn
merge -r 16309:HEAD https://gaim.svn.sourceforge.net/svnroot/gaim/trunk` on
the soc-2006-msnp13 you can replace the msn directory with the attached
tarball. The fix for offline messaging is on msn.c:901:
if (!session->oim)
session->oim = msn_oim_new(session)"
committer: Richard Laager <rlaager@wiktel.com>
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Sun, 15 Apr 2007 02:18:17 +0000 |
parents | 118fd0dc5b6e |
children | 0b0ecee55091 9755b2f7bb0f |
comparison
equal
deleted
inserted
replaced
20389:e354528c4163 | 20390:d634f88e25d8 |
---|---|
164 /************************************************************************** | 164 /************************************************************************** |
165 * Connect | 165 * Connect |
166 **************************************************************************/ | 166 **************************************************************************/ |
167 | 167 |
168 static void | 168 static void |
169 connect_cb(gpointer data, gint source, const gchar *error_message) | 169 connect_cb(gpointer data, gint source, GaimInputCondition cond) |
170 { | 170 { |
171 MsnServConn *servconn; | 171 MsnServConn *servconn = data; |
172 | 172 |
173 servconn = data; | 173 servconn = data; |
174 servconn->connect_data = NULL; | 174 servconn->connect_data = NULL; |
175 servconn->processing = FALSE; | 175 servconn->processing = FALSE; |
176 | 176 |
201 | 201 |
202 gboolean | 202 gboolean |
203 msn_servconn_connect(MsnServConn *servconn, const char *host, int port) | 203 msn_servconn_connect(MsnServConn *servconn, const char *host, int port) |
204 { | 204 { |
205 MsnSession *session; | 205 MsnSession *session; |
206 int r; | |
206 | 207 |
207 g_return_val_if_fail(servconn != NULL, FALSE); | 208 g_return_val_if_fail(servconn != NULL, FALSE); |
208 g_return_val_if_fail(host != NULL, FALSE); | 209 g_return_val_if_fail(host != NULL, FALSE); |
209 g_return_val_if_fail(port > 0, FALSE); | 210 g_return_val_if_fail(port > 0, FALSE); |
210 | 211 |
238 | 239 |
239 if (servconn->connect_data != NULL) | 240 if (servconn->connect_data != NULL) |
240 { | 241 { |
241 servconn->processing = TRUE; | 242 servconn->processing = TRUE; |
242 return TRUE; | 243 return TRUE; |
243 } | 244 }else{ |
244 else | |
245 return FALSE; | 245 return FALSE; |
246 } | |
246 } | 247 } |
247 | 248 |
248 void | 249 void |
249 msn_servconn_disconnect(MsnServConn *servconn) | 250 msn_servconn_disconnect(MsnServConn *servconn) |
250 { | 251 { |
433 cur_len = end - cur; | 434 cur_len = end - cur; |
434 } | 435 } |
435 | 436 |
436 servconn->rx_len -= cur_len; | 437 servconn->rx_len -= cur_len; |
437 | 438 |
438 if (servconn->payload_len) | 439 if (servconn->payload_len){ |
439 { | |
440 msn_cmdproc_process_payload(servconn->cmdproc, cur, cur_len); | 440 msn_cmdproc_process_payload(servconn->cmdproc, cur, cur_len); |
441 servconn->payload_len = 0; | 441 servconn->payload_len = 0; |
442 } | 442 }else{ |
443 else | |
444 { | |
445 msn_cmdproc_process_cmd_text(servconn->cmdproc, cur); | 443 msn_cmdproc_process_cmd_text(servconn->cmdproc, cur); |
444 servconn->payload_len = servconn->cmdproc->last_cmd->payload_len; | |
446 } | 445 } |
447 } while (servconn->connected && !servconn->wasted && servconn->rx_len > 0); | 446 } while (servconn->connected && !servconn->wasted && servconn->rx_len > 0); |
448 | 447 |
449 if (servconn->connected && !servconn->wasted) | 448 if (servconn->connected && !servconn->wasted) |
450 { | 449 { |