Mercurial > pidgin
comparison src/protocols/oscar/txqueue.c @ 13234:f2431a7e33aa
[gaim-migrate @ 15600]
Massive oscar shuffling. No change in functionality.
I renamed each of the files that contains stuff for a SNAC family.
I started splitting the file transfer/direct connect stuff into
peer.c and peer.h. I stopped using fu8_t, fu16_t and fu32_t and
switched to guint8, guint16 and guint32 instead. I changed the
SNAC family and subtype defines so they are more meaningful.
Added LGPL copyright header to each file. Added myself to the
AUTHORS file.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 11 Feb 2006 21:45:18 +0000 |
parents | 9a0a6e74aafd |
children | f260d319bbbc |
comparison
equal
deleted
inserted
replaced
13233:f09c6e8df82c | 13234:f2431a7e33aa |
---|---|
1 /* | |
2 * Gaim's oscar protocol plugin | |
3 * This file is the legal property of its developers. | |
4 * Please see the AUTHORS file distributed alongside this file. | |
5 * | |
6 * This library is free software; you can redistribute it and/or | |
7 * modify it under the terms of the GNU Lesser General Public | |
8 * License as published by the Free Software Foundation; either | |
9 * version 2 of the License, or (at your option) any later version. | |
10 * | |
11 * This library is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 * Lesser General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU Lesser General Public | |
17 * License along with this library; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 */ | |
20 | |
1 /* | 21 /* |
2 * txqueue.c | 22 * txqueue.c |
3 * | 23 * |
4 * Herein lies all the management routines for the transmit (Tx) queue. | 24 * Herein lies all the management routines for the transmit (Tx) queue. |
5 * | 25 * |
6 */ | 26 */ |
7 | 27 |
8 #define FAIM_INTERNAL | 28 #include "oscar.h" |
9 #include <aim.h> | 29 #include "peer.h" |
10 | 30 |
11 #ifndef _WIN32 | 31 #ifndef _WIN32 |
12 #include <sys/socket.h> | 32 #include <sys/socket.h> |
13 #else | 33 #else |
14 #include "win32dep.h" | 34 #include "win32dep.h" |
24 * | 44 * |
25 * framing = AIM_FRAMETYPE_OFT/FLAP | 45 * framing = AIM_FRAMETYPE_OFT/FLAP |
26 * chan = channel for FLAP, hdrtype for OFT | 46 * chan = channel for FLAP, hdrtype for OFT |
27 * | 47 * |
28 */ | 48 */ |
29 faim_internal aim_frame_t *aim_tx_new(aim_session_t *sess, aim_conn_t *conn, fu8_t framing, fu16_t chan, int datalen) | 49 faim_internal aim_frame_t *aim_tx_new(aim_session_t *sess, aim_conn_t *conn, guint8 framing, guint16 chan, int datalen) |
30 { | 50 { |
31 aim_frame_t *fr; | 51 aim_frame_t *fr; |
32 | 52 |
33 if (!sess || !conn) { | 53 if (!sess || !conn) { |
34 gaim_debug_misc("oscar", "aim_tx_new: No session or no connection specified!\n"); | 54 gaim_debug_misc("oscar", "aim_tx_new: No session or no connection specified!\n"); |
59 fr->hdr.rend.type = chan; | 79 fr->hdr.rend.type = chan; |
60 else | 80 else |
61 gaim_debug_misc("oscar", "tx_new: unknown framing\n"); | 81 gaim_debug_misc("oscar", "tx_new: unknown framing\n"); |
62 | 82 |
63 if (datalen > 0) { | 83 if (datalen > 0) { |
64 fu8_t *data; | 84 guint8 *data; |
65 | 85 |
66 if (!(data = (unsigned char *)malloc(datalen))) { | 86 if (!(data = (unsigned char *)malloc(datalen))) { |
67 aim_frame_destroy(fr); | 87 aim_frame_destroy(fr); |
68 return NULL; | 88 return NULL; |
69 } | 89 } |
260 } | 280 } |
261 | 281 |
262 static int sendframe_flap(aim_session_t *sess, aim_frame_t *fr) | 282 static int sendframe_flap(aim_session_t *sess, aim_frame_t *fr) |
263 { | 283 { |
264 aim_bstream_t bs; | 284 aim_bstream_t bs; |
265 fu8_t *bs_raw; | 285 guint8 *bs_raw; |
266 int payloadlen, err = 0, bslen; | 286 int payloadlen, err = 0, bslen; |
267 | 287 |
268 payloadlen = aim_bstream_curpos(&fr->data); | 288 payloadlen = aim_bstream_curpos(&fr->data); |
269 | 289 |
270 if (!(bs_raw = malloc(6 + payloadlen))) | 290 if (!(bs_raw = malloc(6 + payloadlen))) |
296 } | 316 } |
297 | 317 |
298 static int sendframe_rendezvous(aim_session_t *sess, aim_frame_t *fr) | 318 static int sendframe_rendezvous(aim_session_t *sess, aim_frame_t *fr) |
299 { | 319 { |
300 aim_bstream_t bs; | 320 aim_bstream_t bs; |
301 fu8_t *bs_raw; | 321 guint8 *bs_raw; |
302 int payloadlen, err = 0, bslen; | 322 int payloadlen, err = 0, bslen; |
303 | 323 |
304 payloadlen = aim_bstream_curpos(&fr->data); | 324 payloadlen = aim_bstream_curpos(&fr->data); |
305 | 325 |
306 if (!(bs_raw = malloc(8 + payloadlen))) | 326 if (!(bs_raw = malloc(8 + payloadlen))) |