Mercurial > pidgin
comparison libgaim/protocols/msn/slp.c @ 20392:9ba7dee775e1
The first msn-p13-merge-head.diff.gz from SF Patch #1621854 from Ka-Hing Cheung.
"uploaded a diff, this diff is unchanged from the last tarball that I
previously uploaded, except that it's against HEAD. This should be a little
easier for most people."
(This was apparently msn-p13-merge-head.diff, which SourceForge didn't allow to
be uploaded.)
PLUS
"Updated the diff with basically no change, except with simom's icon fix.
The previous diff was broken because some of the files were not added"
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 15 Apr 2007 03:01:41 +0000 |
parents | d634f88e25d8 |
children |
comparison
equal
deleted
inserted
replaced
20391:0b0ecee55091 | 20392:9ba7dee775e1 |
---|---|
339 | 339 |
340 slpcall->pending = TRUE; | 340 slpcall->pending = TRUE; |
341 | 341 |
342 xfer = gaim_xfer_new(account, GAIM_XFER_RECEIVE, | 342 xfer = gaim_xfer_new(account, GAIM_XFER_RECEIVE, |
343 slpcall->slplink->remote_user); | 343 slpcall->slplink->remote_user); |
344 | 344 if (xfer) |
345 bin = (char *)gaim_base64_decode(context, &bin_len); | 345 { |
346 file_size = GUINT32_FROM_LE(*((gsize *)bin + 2)); | 346 bin = (char *)gaim_base64_decode(context, &bin_len); |
347 | 347 file_size = GUINT32_FROM_LE(*((gsize *)bin + 2)); |
348 uni_name = (gunichar2 *)(bin + 20); | 348 |
349 while(*uni_name != 0 && ((char *)uni_name - (bin + 20)) < MAX_FILE_NAME_LEN) { | 349 uni_name = (gunichar2 *)(bin + 20); |
350 *uni_name = GUINT16_FROM_LE(*uni_name); | 350 while(*uni_name != 0 && ((char *)uni_name - (bin + 20)) < MAX_FILE_NAME_LEN) { |
351 uni_name++; | 351 *uni_name = GUINT16_FROM_LE(*uni_name); |
352 } | 352 uni_name++; |
353 | 353 } |
354 file_name = g_utf16_to_utf8((const gunichar2 *)(bin + 20), -1, | 354 |
355 NULL, NULL, NULL); | 355 file_name = g_utf16_to_utf8((const gunichar2 *)(bin + 20), -1, |
356 | 356 NULL, NULL, NULL); |
357 g_free(bin); | 357 |
358 | 358 g_free(bin); |
359 gaim_xfer_set_filename(xfer, file_name); | 359 |
360 gaim_xfer_set_size(xfer, file_size); | 360 gaim_xfer_set_filename(xfer, file_name); |
361 gaim_xfer_set_init_fnc(xfer, msn_xfer_init); | 361 gaim_xfer_set_size(xfer, file_size); |
362 gaim_xfer_set_request_denied_fnc(xfer, msn_xfer_cancel); | 362 gaim_xfer_set_init_fnc(xfer, msn_xfer_init); |
363 gaim_xfer_set_cancel_recv_fnc(xfer, msn_xfer_cancel); | 363 gaim_xfer_set_request_denied_fnc(xfer, msn_xfer_cancel); |
364 | 364 gaim_xfer_set_cancel_recv_fnc(xfer, msn_xfer_cancel); |
365 slpcall->xfer = xfer; | 365 |
366 xfer->data = slpcall; | 366 slpcall->xfer = xfer; |
367 | 367 xfer->data = slpcall; |
368 gaim_xfer_request(xfer); | 368 |
369 gaim_xfer_request(xfer); | |
370 } | |
369 } | 371 } |
370 } | 372 } |
371 | 373 |
372 void | 374 void |
373 send_bye(MsnSlpCall *slpcall, const char *type) | 375 send_bye(MsnSlpCall *slpcall, const char *type) |