comparison src/protocols/jabber/jabber.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 c54699c55286
children 67c4e9d39242
comparison
equal deleted inserted replaced
6981:abd3c684da31 6982:083d1e4a9c78
1479 jri->has_xhtml = has_xhtml; 1479 jri->has_xhtml = has_xhtml;
1480 } 1480 }
1481 jabber_track_convo_thread(gjc, from, thread_id); 1481 jabber_track_convo_thread(gjc, from, thread_id);
1482 if (gaim_find_conversation_with_account(from, GJ_GC(gjc)->account)) 1482 if (gaim_find_conversation_with_account(from, GJ_GC(gjc)->account))
1483 serv_got_im(GJ_GC(gjc), from, m, flags, 1483 serv_got_im(GJ_GC(gjc), from, m, flags,
1484 time_sent, -1); 1484 time_sent);
1485 else { 1485 else {
1486 if(p->from->user) { 1486 if(p->from->user) {
1487 from = g_strdup_printf("%s@%s", p->from->user, 1487 from = g_strdup_printf("%s@%s", p->from->user,
1488 p->from->server); 1488 p->from->server);
1489 } else { 1489 } else {
1490 /* server message? */ 1490 /* server message? */
1491 from = g_strdup(p->from->server); 1491 from = g_strdup(p->from->server);
1492 } 1492 }
1493 serv_got_im(GJ_GC(gjc), from, m, flags, time_sent, -1); 1493 serv_got_im(GJ_GC(gjc), from, m, flags, time_sent);
1494 g_free(from); 1494 g_free(from);
1495 } 1495 }
1496 } 1496 }
1497 } else { 1497 } else {
1498 /* a non-message message! */ 1498 /* a non-message message! */
2601 } 2601 }
2602 } 2602 }
2603 g_free(xhtml); 2603 g_free(xhtml);
2604 } 2604 }
2605 2605
2606 static int jabber_send_im(GaimConnection *gc, const char *who, const char *message, int len, GaimImFlags flags) 2606 static int jabber_send_im(GaimConnection *gc, const char *who, const char *message, GaimImFlags flags)
2607 { 2607 {
2608 xmlnode x, y; 2608 xmlnode x, y;
2609 char *thread_id = NULL; 2609 char *thread_id = NULL;
2610 gjconn gjc = ((struct jabber_data *)gc->proto_data)->gjc; 2610 gjconn gjc = ((struct jabber_data *)gc->proto_data)->gjc;
2611 jab_res_info jri = jabber_find_resource(gc, who); 2611 jab_res_info jri = jabber_find_resource(gc, who);