Mercurial > pidgin
comparison src/protocols/msn/switchboard.c @ 6982:083d1e4a9c78
[gaim-migrate @ 7538]
This is Mr. Holland's Opus. And by Mr. Holland I mean Robot101. He
rewrote the coreish IM image support so that the binary data gets
ripped out in the prpl and put in an imgstore instead of just being
passed in the same huge as char string as the actual message. This
is good because it's prpl agnostic, or something. It also means
we don't have a silly length of "-1" with pretty much every send or
receive IM function.
It should be crash free, bug free, and memleak free, but additional
testing is always a good thing.
If you like good stuff then you'll love this patch. But don't take
my word for it--ba dun dunt!
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 27 Sep 2003 19:17:21 +0000 |
parents | 85e39ec7f4cd |
children | bf630f7dfdcd |
comparison
equal
deleted
inserted
replaced
6981:abd3c684da31 | 6982:083d1e4a9c78 |
---|---|
155 username); | 155 username); |
156 } | 156 } |
157 } | 157 } |
158 | 158 |
159 if (*buf != '\0' && (conv = gaim_find_conversation_with_account(user, account)) != NULL) { | 159 if (*buf != '\0' && (conv = gaim_find_conversation_with_account(user, account)) != NULL) { |
160 gaim_conversation_write(conv, NULL, buf, -1, GAIM_MESSAGE_SYSTEM, | 160 gaim_conversation_write(conv, NULL, buf, GAIM_MESSAGE_SYSTEM, |
161 time(NULL)); | 161 time(NULL)); |
162 } | 162 } |
163 | 163 |
164 msn_switchboard_destroy(swboard); | 164 msn_switchboard_destroy(swboard); |
165 | 165 |
350 | 350 |
351 if (swboard->chat != NULL) | 351 if (swboard->chat != NULL) |
352 serv_got_chat_in(gc, gaim_chat_get_id(GAIM_CHAT(swboard->chat)), | 352 serv_got_chat_in(gc, gaim_chat_get_id(GAIM_CHAT(swboard->chat)), |
353 servconn->msg_passport, 0, body, time(NULL)); | 353 servconn->msg_passport, 0, body, time(NULL)); |
354 else | 354 else |
355 serv_got_im(gc, servconn->msg_passport, body, 0, time(NULL), -1); | 355 serv_got_im(gc, servconn->msg_passport, body, 0, time(NULL)); |
356 | 356 |
357 g_free(body); | 357 g_free(body); |
358 | 358 |
359 return TRUE; | 359 return TRUE; |
360 } | 360 } |
631 msn_switchboard_send_msg(MsnSwitchBoard *swboard, MsnMessage *msg) | 631 msn_switchboard_send_msg(MsnSwitchBoard *swboard, MsnMessage *msg) |
632 { | 632 { |
633 char *buf; | 633 char *buf; |
634 size_t len; | 634 size_t len; |
635 int ret; | 635 int ret; |
636 #if 0 | |
636 FILE *fp; | 637 FILE *fp; |
638 #endif | |
637 | 639 |
638 g_return_val_if_fail(swboard != NULL, FALSE); | 640 g_return_val_if_fail(swboard != NULL, FALSE); |
639 g_return_val_if_fail(msg != NULL, FALSE); | 641 g_return_val_if_fail(msg != NULL, FALSE); |
640 | 642 |
641 msn_message_set_transaction_id(msg, ++swboard->trId); | 643 msn_message_set_transaction_id(msg, ++swboard->trId); |