- Timestamp:
- 2005-11-28T01:14:06Z (19 years ago)
- Branches:
- master
- Children:
- 65e2ce1, cfcc587
- Parents:
- 2cdd8ce (diff), dfde8e0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- protocols
- Files:
-
- 2 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber.c
r2cdd8ce rb20b32f 757 757 static void jabber_handlemessage(gjconn gjc, jpacket p) 758 758 { 759 xmlnode y, xmlns, subj,z;759 xmlnode y, xmlns, z; 760 760 time_t time_sent = time(NULL); 761 761 762 char *from = NULL, *msg = NULL, *type = NULL , *topic = NULL;762 char *from = NULL, *msg = NULL, *type = NULL; 763 763 char m[BUF_LONG * 2]; 764 764 … … 798 798 799 799 if (type && !g_strcasecmp(type, "jabber:x:conference")) { 800 char *room; 801 GList *m = NULL; 802 char **data; 803 804 room = xmlnode_get_attrib(xmlns, "jid"); 805 data = g_strsplit(room, "@", 2); 806 m = g_list_append(m, g_strdup(data[0])); 807 m = g_list_append(m, g_strdup(data[1])); 808 m = g_list_append(m, g_strdup(gjc->user->user)); 809 g_strfreev(data); 810 811 /* ** Bitlbee ** serv_got_chat_invite(GJ_GC(gjc), room, from, msg, m); */ 800 /* do nothing */ 812 801 } else if (msg) { /* whisper */ 813 802 struct jabber_chat *jc; … … 817 806 else { 818 807 int flags = 0; 819 /* ** Bitlbee ** 820 if (xmlnode_get_tag(p->x, "gaim")) 821 flags = IM_FLAG_GAIMUSER; 822 if (find_conversation(jid_full(p->from))) 823 serv_got_im(GJ_GC(gjc), jid_full(p->from), m, flags, time_sent, -1); 824 else { 825 ** End - Bitlbee ** */ 826 if(p->from->user) { 827 from = g_strdup_printf("%s@%s", p->from->user, p->from->server); 828 } else { 829 /* server message? */ 830 from = g_strdup(p->from->server); 831 } 832 serv_got_im(GJ_GC(gjc), from, m, flags, time_sent, -1); 833 g_free(from); 834 /* ** Bitlbee ** } ** End - Bitlbee ** */ 808 809 if(p->from->user) { 810 from = g_strdup_printf("%s@%s", p->from->user, p->from->server); 811 } else { 812 /* server message? */ 813 from = g_strdup(p->from->server); 814 } 815 serv_got_im(GJ_GC(gjc), from, m, flags, time_sent, -1); 816 g_free(from); 835 817 } 836 818 } … … 847 829 g_free(from); 848 830 } 849 } else if (!g_strcasecmp(type, "groupchat")) { 850 struct jabber_chat *jc; 851 static int i = 0; 852 853 /* 854 if ((y = xmlnode_get_tag(p->x, "html"))) { 855 msg = xmlnode_get_data(y); 856 } else 857 */ 858 if ((y = xmlnode_get_tag(p->x, "body"))) { 859 msg = xmlnode_get_data(y); 860 } 861 862 msg = utf8_to_str(msg); 831 } else if (!g_strcasecmp(type, "headline")) { 832 char *subject, *body, *url; 863 833 864 if ((subj = xmlnode_get_tag(p->x, "subject"))) { 865 topic = xmlnode_get_data(subj); 866 } 867 topic = utf8_to_str(topic); 868 869 jc = find_existing_chat(GJ_GC(gjc), p->from); 870 if (!jc) { 871 /* we're not in this chat. are we supposed to be? */ 872 if ((jc = find_pending_chat(GJ_GC(gjc), p->from)) != NULL) { 873 /* yes, we're supposed to be. so now we are. */ 874 jc->b = serv_got_joined_chat(GJ_GC(gjc), i++, p->from->user); 875 jc->id = jc->b->id; 876 jc->state = JCS_ACTIVE; 877 } else { 878 /* no, we're not supposed to be. */ 879 g_free(msg); 880 return; 881 } 882 } 883 if (p->from->resource) { 884 if (!y) { 885 if (!find_chat_buddy(jc->b, p->from->resource)) { 886 add_chat_buddy(jc->b, p->from->resource); 887 } else if ((y = xmlnode_get_tag(p->x, "status"))) { 888 char *buf; 889 890 buf = g_strdup_printf("%s@%s/%s", 891 p->from->user, p->from->server, p->from->resource); 892 jabber_track_away(gjc, p, buf, NULL); 893 g_free(buf); 894 895 } 896 } else if (jc->b && msg) { 897 char buf[8192]; 898 899 if (topic) { 900 char tbuf[8192]; 901 g_snprintf(tbuf, sizeof(tbuf), "%s", topic); 902 } 903 904 905 g_snprintf(buf, sizeof(buf), "%s", msg); 906 serv_got_chat_in(GJ_GC(gjc), jc->b->id, p->from->resource, 0, buf, time_sent); 907 } 908 } else { /* message from the server */ 909 if(jc->b && topic) { 910 char tbuf[8192]; 911 g_snprintf(tbuf, sizeof(tbuf), "%s", topic); 912 } 913 } 914 915 g_free(msg); 916 g_free(topic); 917 834 y = xmlnode_get_tag( p->x, "body" ); 835 body = y ? g_strdup( xmlnode_get_data( y ) ) : NULL; 836 837 y = xmlnode_get_tag( p->x, "subject" ); 838 subject = y ? g_strdup( xmlnode_get_data( y ) ) : NULL; 839 840 url = NULL; 841 z = xmlnode_get_firstchild(p->x); 842 while( z ) 843 { 844 char *xtype = xmlnode_get_attrib( z, "xmlns" ); 845 846 if( xtype && g_strcasecmp( xtype, "jabber:x:oob" ) == 0 && 847 ( y = xmlnode_get_tag( z, "url" ) ) ) 848 { 849 url = g_strdup( xmlnode_get_data( y ) ); 850 break; 851 } 852 853 z = xmlnode_get_nextsibling( z ); 854 } 855 856 g_snprintf( m, BUF_LONG, "Subject: %s\nURL: %s\nMessage:\n%s", subject ? subject : "(none)", 857 url ? url : "(none)", body ? body : "(none)" ); 858 859 if( p->from->user ) 860 from = g_strdup_printf( "%s@%s", p->from->user, p->from->server ); 861 else 862 from = g_strdup( p->from->server ); 863 864 serv_got_im( GJ_GC(gjc), from, m, 0, time_sent, -1 ); 865 866 g_free( from ); 867 g_free( subject ); 868 g_free( body ); 869 g_free( url ); 918 870 } 919 871 } -
protocols/nogaim.c
r2cdd8ce rb20b32f 295 295 { 296 296 va_list params; 297 char text[1024], buf[1024] ;297 char text[1024], buf[1024], acc_id[33]; 298 298 char *msg; 299 account_t *a; 299 300 300 301 va_start( params, format ); … … 312 313 strip_html( msg ); 313 314 314 irc_usermsg( gc->irc, "%s(%s) - %s", gc->prpl->name, gc->username, msg ); 315 /* Try to find a different connection on the same protocol. */ 316 for( a = gc->irc->accounts; a; a = a->next ) 317 if( a->prpl == gc->prpl && a->gc != gc ) 318 break; 319 320 /* If we found one, add the screenname to the acc_id. */ 321 if( a ) 322 g_snprintf( acc_id, 32, "%s(%s)", gc->prpl->name, gc->username ); 323 else 324 g_snprintf( acc_id, 32, "%s", gc->prpl->name ); 325 326 irc_usermsg( gc->irc, "%s - %s", acc_id, msg ); 315 327 } 316 328 … … 706 718 msg = buf; 707 719 708 while( strlen( msg ) > 4 50)720 while( strlen( msg ) > 425 ) 709 721 { 710 722 char tmp, *nl; 711 723 712 tmp = msg[450]; 713 msg[450] = 0; 714 715 /* If there's a newline in this string, split up there so we're not 716 going to split up lines. If there isn't a newline, well, too bad. */ 717 if( ( nl = strrchr( msg, '\n' ) ) ) 724 tmp = msg[425]; 725 msg[425] = 0; 726 727 /* If there's a newline/space in this string, split up there, 728 looks a bit prettier. */ 729 if( ( nl = strrchr( msg, '\n' ) ) || ( nl = strchr( msg, ' ' ) ) ) 730 { 731 msg[425] = tmp; 732 tmp = *nl; 718 733 *nl = 0; 734 } 719 735 720 736 irc_msgfrom( irc, u->nick, msg ); 721 722 msg[450] = tmp;723 737 724 738 /* Move on. */ 725 739 if( nl ) 726 740 { 727 *nl = '\n';741 *nl = tmp; 728 742 msg = nl + 1; 729 743 } 730 744 else 731 745 { 732 msg += 450; 746 msg[425] = tmp; 747 msg += 425; 733 748 } 734 749 } … … 744 759 745 760 if( ( u = user_findhandle( gc, handle ) ) ) 746 irc_ noticefrom( gc->irc, u->nick, "* Typing a message *" );761 irc_msgfrom( gc->irc, u->nick, "\1TYPING 1\1" ); 747 762 } 748 763 -
protocols/oscar/Makefile
r2cdd8ce rb20b32f 10 10 11 11 # [SH] Program variables 12 objects = admin.o auth.o bos.o buddylist.o chat.o chatnav.o conn.o ft.oicq.o im.o info.o misc.o msgcookie.o rxhandlers.o rxqueue.o search.o service.o snac.o ssi.o stats.o tlv.o txqueue.o oscar_util.o oscar.o12 objects = admin.o auth.o bos.o buddylist.o chat.o chatnav.o conn.o icq.o im.o info.o misc.o msgcookie.o rxhandlers.o rxqueue.o search.o service.o snac.o ssi.o stats.o tlv.o txqueue.o oscar_util.o oscar.o 13 13 14 14 CFLAGS += -Wall -
protocols/oscar/aim.h
r2cdd8ce rb20b32f 168 168 #define AIM_CONN_TYPE_CHATNAV 0x000d 169 169 170 /* they start getting arbitrary in rendezvous stuff =) */171 #define AIM_CONN_TYPE_RENDEZVOUS 0x0101 /* these do not speak FLAP! */172 #define AIM_CONN_TYPE_RENDEZVOUS_OUT 0x0102 /* socket waiting for accept() */173 174 /*175 * Subtypes, we need these for OFT stuff.176 */177 #define AIM_CONN_SUBTYPE_OFT_DIRECTIM 0x0001178 #define AIM_CONN_SUBTYPE_OFT_GETFILE 0x0002179 #define AIM_CONN_SUBTYPE_OFT_SENDFILE 0x0003180 #define AIM_CONN_SUBTYPE_OFT_BUDDYICON 0x0004181 #define AIM_CONN_SUBTYPE_OFT_VOICE 0x0005182 183 170 /* 184 171 * Status values returned from aim_conn_new(). ORed together. … … 191 178 192 179 #define AIM_FRAMETYPE_FLAP 0x0000 193 #define AIM_FRAMETYPE_OFT 0x0001194 180 195 181 /* … … 258 244 flap_seqnum_t seqnum; 259 245 } flap; 260 struct {261 guint16 type;262 guint8 magic[4]; /* ODC2 OFT2 */263 guint16 hdr2len;264 guint8 *hdr2; /* rest of bloated header */265 } oft;266 246 } hdr; 267 247 aim_bstream_t data; /* payload stream */ … … 670 650 #define AIM_COOKIETYPE_CHATNAV 0x06 671 651 #define AIM_COOKIETYPE_INVITE 0x07 672 /* we'll move OFT up a bit to give breathing room. not like it really673 * matters. */674 #define AIM_COOKIETYPE_OFTIM 0x10675 #define AIM_COOKIETYPE_OFTGET 0x11676 #define AIM_COOKIETYPE_OFTSEND 0x12677 #define AIM_COOKIETYPE_OFTVOICE 0x13678 #define AIM_COOKIETYPE_OFTIMAGE 0x14679 #define AIM_COOKIETYPE_OFTICON 0x15680 652 681 653 int aim_handlerendconnect(aim_session_t *sess, aim_conn_t *cur); -
protocols/oscar/aim_internal.h
r2cdd8ce rb20b32f 192 192 aim_msgcookie_t *aim_checkcookie(aim_session_t *sess, const unsigned char *, const int); 193 193 int aim_freecookie(aim_session_t *sess, aim_msgcookie_t *cookie); 194 int aim_msgcookie_gettype(int reqclass);195 194 int aim_cookie_free(aim_session_t *sess, aim_msgcookie_t *cookie); 196 195 -
protocols/oscar/conn.c
r2cdd8ce rb20b32f 164 164 * This will free ->internal if it necessary... 165 165 */ 166 if ((*deadconn)->type == AIM_CONN_TYPE_RENDEZVOUS) 167 aim_conn_kill_rend(sess, *deadconn); 168 else if ((*deadconn)->type == AIM_CONN_TYPE_CHAT) 166 if ((*deadconn)->type == AIM_CONN_TYPE_CHAT) 169 167 aim_conn_kill_chat(sess, *deadconn); 170 168 … … 314 312 if (deadconn->handlerlist) 315 313 aim_clearhandlers(deadconn); 316 if (deadconn->type == AIM_CONN_TYPE_RENDEZVOUS)317 aim_conn_close_rend((aim_session_t *)deadconn->sessv, deadconn);318 314 319 315 return; -
protocols/oscar/im.c
r2cdd8ce rb20b32f 2039 2039 */ 2040 2040 aimbs_put8(&fr->data, strlen(sn)); 2041 aimbs_putraw(&fr->data, sn, strlen(sn));2041 aimbs_putraw(&fr->data, (const guint8*)sn, strlen(sn)); 2042 2042 2043 2043 /* -
protocols/oscar/msgcookie.c
r2cdd8ce rb20b32f 178 178 return 0; 179 179 } 180 181 /* XXX I hate switch */182 int aim_msgcookie_gettype(int reqclass)183 {184 /* XXX: hokey-assed. needs fixed. */185 switch(reqclass) {186 case AIM_CAPS_BUDDYICON: return AIM_COOKIETYPE_OFTICON;187 case AIM_CAPS_VOICE: return AIM_COOKIETYPE_OFTVOICE;188 case AIM_CAPS_IMIMAGE: return AIM_COOKIETYPE_OFTIMAGE;189 case AIM_CAPS_CHAT: return AIM_COOKIETYPE_CHAT;190 case AIM_CAPS_GETFILE: return AIM_COOKIETYPE_OFTGET;191 case AIM_CAPS_SENDFILE: return AIM_COOKIETYPE_OFTSEND;192 default: return AIM_COOKIETYPE_UNKNOWN;193 }194 }195 196 -
protocols/oscar/oscar.c
r2cdd8ce rb20b32f 275 275 276 276 if (condition & GAIM_INPUT_READ) { 277 if (conn->type == AIM_CONN_TYPE_RENDEZVOUS_OUT) { 278 if (aim_handlerendconnect(odata->sess, conn) < 0) { 277 if (aim_get_command(odata->sess, conn) >= 0) { 278 aim_rxdispatch(odata->sess); 279 if (odata->killme) 280 signoff(gc); 281 } else { 282 if ((conn->type == AIM_CONN_TYPE_BOS) || 283 !(aim_getconn_type(odata->sess, AIM_CONN_TYPE_BOS))) { 284 hide_login_progress_error(gc, _("Disconnected.")); 285 signoff(gc); 286 } else if (conn->type == AIM_CONN_TYPE_CHAT) { 287 struct chat_connection *c = find_oscar_chat_by_conn(gc, conn); 288 char buf[BUF_LONG]; 289 c->conn = NULL; 290 if (c->inpa > 0) 291 gaim_input_remove(c->inpa); 292 c->inpa = 0; 293 c->fd = -1; 279 294 aim_conn_kill(odata->sess, &conn); 280 } 281 } else { 282 if (aim_get_command(odata->sess, conn) >= 0) { 283 aim_rxdispatch(odata->sess); 284 if (odata->killme) 285 signoff(gc); 295 sprintf(buf, _("You have been disconnected from chat room %s."), c->name); 296 do_error_dialog(sess->aux_data, buf, _("Chat Error!")); 297 } else if (conn->type == AIM_CONN_TYPE_CHATNAV) { 298 if (odata->cnpa > 0) 299 gaim_input_remove(odata->cnpa); 300 odata->cnpa = 0; 301 while (odata->create_rooms) { 302 struct create_room *cr = odata->create_rooms->data; 303 g_free(cr->name); 304 odata->create_rooms = 305 g_slist_remove(odata->create_rooms, cr); 306 g_free(cr); 307 do_error_dialog(sess->aux_data, _("Chat is currently unavailable"), 308 _("Gaim - Chat")); 309 } 310 aim_conn_kill(odata->sess, &conn); 311 } else if (conn->type == AIM_CONN_TYPE_AUTH) { 312 if (odata->paspa > 0) 313 gaim_input_remove(odata->paspa); 314 odata->paspa = 0; 315 aim_conn_kill(odata->sess, &conn); 286 316 } else { 287 if ((conn->type == AIM_CONN_TYPE_BOS) || 288 !(aim_getconn_type(odata->sess, AIM_CONN_TYPE_BOS))) { 289 hide_login_progress_error(gc, _("Disconnected.")); 290 signoff(gc); 291 } else if (conn->type == AIM_CONN_TYPE_CHAT) { 292 struct chat_connection *c = find_oscar_chat_by_conn(gc, conn); 293 char buf[BUF_LONG]; 294 c->conn = NULL; 295 if (c->inpa > 0) 296 gaim_input_remove(c->inpa); 297 c->inpa = 0; 298 c->fd = -1; 299 aim_conn_kill(odata->sess, &conn); 300 sprintf(buf, _("You have been disconnected from chat room %s."), c->name); 301 do_error_dialog(sess->aux_data, buf, _("Chat Error!")); 302 } else if (conn->type == AIM_CONN_TYPE_CHATNAV) { 303 if (odata->cnpa > 0) 304 gaim_input_remove(odata->cnpa); 305 odata->cnpa = 0; 306 while (odata->create_rooms) { 307 struct create_room *cr = odata->create_rooms->data; 308 g_free(cr->name); 309 odata->create_rooms = 310 g_slist_remove(odata->create_rooms, cr); 311 g_free(cr); 312 do_error_dialog(sess->aux_data, _("Chat is currently unavailable"), 313 _("Gaim - Chat")); 314 } 315 aim_conn_kill(odata->sess, &conn); 316 } else if (conn->type == AIM_CONN_TYPE_AUTH) { 317 if (odata->paspa > 0) 318 gaim_input_remove(odata->paspa); 319 odata->paspa = 0; 320 aim_conn_kill(odata->sess, &conn); 321 } else { 322 aim_conn_kill(odata->sess, &conn); 323 } 317 aim_conn_kill(odata->sess, &conn); 324 318 } 325 319 } -
protocols/oscar/rxhandlers.c
r2cdd8ce rb20b32f 341 341 continue; 342 342 343 /*344 * This is a debugging/sanity check only and probably345 * could/should be removed for stable code.346 */347 if (((cur->hdrtype == AIM_FRAMETYPE_OFT) &&348 (cur->conn->type != AIM_CONN_TYPE_RENDEZVOUS)) ||349 ((cur->hdrtype == AIM_FRAMETYPE_FLAP) &&350 (cur->conn->type == AIM_CONN_TYPE_RENDEZVOUS))) {351 do_error_dialog(sess->aux_data, "incompatible frame type/connection type combination", "Gaim");352 cur->handled = 1;353 continue;354 }355 356 if (cur->conn->type == AIM_CONN_TYPE_RENDEZVOUS) {357 if (cur->hdrtype != AIM_FRAMETYPE_OFT) {358 do_error_dialog(sess->aux_data, "non-OFT frames on OFT connection", "Gaim");359 cur->handled = 1; /* get rid of it */360 } else {361 /* FIXME: implement this (OFT frame) */362 cur->handled = 1; /* get rid of it */363 }364 continue;365 }366 367 if (cur->conn->type == AIM_CONN_TYPE_RENDEZVOUS_OUT) {368 /* not possible */369 do_error_dialog(sess->aux_data, "RENDEZVOUS packet in rxqueue", "Gaim");370 cur->handled = 1;371 continue;372 }373 374 343 if (cur->hdr.flap.type == 0x01) { 375 344 -
protocols/oscar/rxqueue.c
r2cdd8ce rb20b32f 332 332 g_free(frame->data.data); /* XXX aim_bstream_free */ 333 333 334 if (frame->hdrtype == AIM_FRAMETYPE_OFT)335 g_free(frame->hdr.oft.hdr2);336 334 g_free(frame); 337 338 return;339 335 } 340 336 … … 362 358 if (conn->status & AIM_CONN_STATUS_INPROGRESS) 363 359 return aim_conn_completeconnect(sess, conn); 364 365 /*366 * Rendezvous (client-client) connections do not speak367 * FLAP, so this function will break on them.368 */369 if (conn->type == AIM_CONN_TYPE_RENDEZVOUS)370 return aim_get_command_rendezvous(sess, conn);371 else if (conn->type == AIM_CONN_TYPE_RENDEZVOUS_OUT) {372 do_error_dialog(sess->aux_data,"AIM_CONN_TYPE_RENDEZVOUS_OUT shouldn't use FLAP", "Gaim");373 return 0;374 }375 360 376 361 aim_bstream_init(&flaphdr, flaphdr_raw, sizeof(flaphdr_raw)); -
protocols/oscar/txqueue.c
r2cdd8ce rb20b32f 34 34 } 35 35 36 /* For sanity... */37 if ((conn->type == AIM_CONN_TYPE_RENDEZVOUS) ||38 (conn->type == AIM_CONN_TYPE_RENDEZVOUS_OUT)) {39 if (framing != AIM_FRAMETYPE_OFT) {40 do_error_dialog(sess->aux_data, "attempted to allocate inappropriate frame type for rendezvous connection", "Gaim");41 return NULL;42 }43 } else {44 if (framing != AIM_FRAMETYPE_FLAP) {45 do_error_dialog(sess->aux_data, "attempted to allocate inappropriate frame type for FLAP connection", "Gaim");46 return NULL;47 }48 }49 50 36 if (!(fr = (aim_frame_t *)g_new0(aim_frame_t,1))) 51 37 return NULL; … … 58 44 59 45 fr->hdr.flap.type = chan; 60 61 } else if (fr->hdrtype == AIM_FRAMETYPE_OFT) {62 63 fr->hdr.oft.type = chan;64 fr->hdr.oft.hdr2len = 0; /* this will get setup by caller */65 46 66 47 } else … … 237 218 238 219 if (count) { 239 if ((conn->type == AIM_CONN_TYPE_RENDEZVOUS) &&240 (conn->subtype == AIM_CONN_SUBTYPE_OFT_DIRECTIM)) {241 /* I strongly suspect that this is a horrible thing to do242 * and I feel really guilty doing it. */243 const char *sn = aim_directim_getsn(conn);244 aim_rxcallback_t userfunc;245 while (count - wrote > 1024) {246 wrote = wrote + aim_send(conn->fd, bs->data + bs->offset + wrote, 1024);247 if ((userfunc=aim_callhandler(conn->sessv, conn,248 AIM_CB_FAM_SPECIAL,249 AIM_CB_SPECIAL_IMAGETRANSFER)))250 userfunc(conn->sessv, NULL, sn,251 count-wrote>1024 ? ((double)wrote / count) : 1);252 }253 }254 220 if (count - wrote) { 255 221 wrote = wrote + aim_send(conn->fd, bs->data + bs->offset + wrote, count - wrote); … … 299 265 } 300 266 301 static int sendframe_oft(aim_session_t *sess, aim_frame_t *fr)302 {303 aim_bstream_t hbs;304 guint8 *hbs_raw;305 int hbslen;306 int err = 0;307 308 hbslen = 8 + fr->hdr.oft.hdr2len;309 if (!(hbs_raw = g_malloc(hbslen)))310 return -1;311 312 aim_bstream_init(&hbs, hbs_raw, hbslen);313 314 aimbs_putraw(&hbs, fr->hdr.oft.magic, 4);315 aimbs_put16(&hbs, fr->hdr.oft.hdr2len + 8);316 aimbs_put16(&hbs, fr->hdr.oft.type);317 aimbs_putraw(&hbs, fr->hdr.oft.hdr2, fr->hdr.oft.hdr2len);318 319 aim_bstream_rewind(&hbs);320 321 322 if (aim_bstream_send(&hbs, fr->conn, hbslen) != hbslen) {323 324 err = -errno;325 326 } else if (aim_bstream_curpos(&fr->data)) {327 int len;328 329 len = aim_bstream_curpos(&fr->data);330 aim_bstream_rewind(&fr->data);331 332 if (aim_bstream_send(&fr->data, fr->conn, len) != len)333 err = -errno;334 }335 336 g_free(hbs_raw); /* XXX aim_bstream_free */337 338 fr->handled = 1;339 fr->conn->lastactivity = time(NULL);340 341 342 return err;343 344 345 }346 347 267 int aim_tx_sendframe(aim_session_t *sess, aim_frame_t *fr) 348 268 { 349 269 if (fr->hdrtype == AIM_FRAMETYPE_FLAP) 350 270 return sendframe_flap(sess, fr); 351 else if (fr->hdrtype == AIM_FRAMETYPE_OFT)352 return sendframe_oft(sess, fr);353 271 return -1; 354 272 }
Note: See TracChangeset
for help on using the changeset viewer.