Mercurial > pidgin.yaz
comparison libfaim/aim_im.c @ 1248:920c86b753d7
[gaim-migrate @ 1258]
bah
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 13 Dec 2000 03:31:15 +0000 |
parents | fa681641643d |
children |
comparison
equal
deleted
inserted
replaced
1247:f50146ce818e | 1248:920c86b753d7 |
---|---|
116 newpacket->commandlen = curbyte; | 116 newpacket->commandlen = curbyte; |
117 newpacket->lock = 0; | 117 newpacket->lock = 0; |
118 | 118 |
119 aim_tx_enqueue(sess, newpacket); | 119 aim_tx_enqueue(sess, newpacket); |
120 | 120 |
121 #ifdef USE_SNAC_FOR_IMS | 121 aim_cachesnac(sess, 0x0004, 0x0006, 0x0000, destsn, strlen(destsn)+1); |
122 { | 122 aim_cleansnacs(sess, 60); /* clean out all SNACs over 60sec old */ |
123 struct aim_snac_t snac; | 123 |
124 | 124 return sess->snac_nextid; |
125 snac.id = sess->snac_nextid; | |
126 snac.family = 0x0004; | |
127 snac.type = 0x0006; | |
128 snac.flags = 0x0000; | |
129 | |
130 snac.data = malloc(strlen(destsn)+1); | |
131 memcpy(snac.data, destsn, strlen(destsn)+1); | |
132 | |
133 aim_newsnac(sess, &snac); | |
134 } | |
135 | |
136 aim_cleansnacs(sess, 60); /* clean out all SNACs over 60sec old */ | |
137 #endif | |
138 | |
139 return (sess->snac_nextid++); | |
140 } | 125 } |
141 | 126 |
142 faim_internal int aim_parse_outgoing_im_middle(struct aim_session_t *sess, | 127 faim_internal int aim_parse_outgoing_im_middle(struct aim_session_t *sess, |
143 struct command_rx_struct *command) | 128 struct command_rx_struct *command) |
144 { | 129 { |
465 | 450 |
466 if (cook->type == AIM_CAPS_SENDFILE) { | 451 if (cook->type == AIM_CAPS_SENDFILE) { |
467 struct aim_filetransfer_priv *ft; | 452 struct aim_filetransfer_priv *ft; |
468 | 453 |
469 if (cook->data) { | 454 if (cook->data) { |
470 struct aim_tlv_t *errortlv; | 455 int errorcode = -1; /* XXX shouldnt this be 0? */ |
471 int errorcode = -1; | |
472 | 456 |
473 ft = (struct aim_filetransfer_priv *)cook->data; | 457 ft = (struct aim_filetransfer_priv *)cook->data; |
474 | 458 |
475 if ((errortlv = aim_gettlv(list2, 0x000b, 1))) { | 459 if (aim_gettlv(list2, 0x000b, 1)) |
476 errorcode = aimutil_get16(errortlv->value); | 460 errorcode = aim_gettlv16(list2, 0x000b, 1); |
477 } | 461 |
478 if (errorcode) { | 462 if (errorcode) { |
479 printf("faim: transfer from %s (%s) for %s cancelled (error code %d)\n", ft->sn, ft->ip, ft->fh.name, errorcode); | 463 printf("faim: transfer from %s (%s) for %s cancelled (error code %d)\n", ft->sn, ft->ip, ft->fh.name, errorcode); |
480 } else if (status == 0x0002) { /* connection accepted */ | 464 } else if (status == 0x0002) { /* connection accepted */ |
481 printf("faim: transfer from %s (%s) for %s accepted\n", ft->sn, ft->ip, ft->fh.name); | 465 printf("faim: transfer from %s (%s) for %s accepted\n", ft->sn, ft->ip, ft->fh.name); |
482 } | 466 } |