Mercurial > pidgin.yaz
comparison src/protocols/oscar/rxqueue.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 | af3d6c6aee6b |
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 * This file contains the management routines for the receive | 22 * This file contains the management routines for the receive |
3 * (incoming packet) queue. The actual packet handlers are in | 23 * (incoming packet) queue. The actual packet handlers are in |
4 * rxhandlers.c. | 24 * rxhandlers.c. |
5 */ | 25 */ |
6 | 26 |
7 #define FAIM_INTERNAL | 27 #include "oscar.h" |
8 #include <aim.h> | |
9 | 28 |
10 #ifndef _WIN32 | 29 #ifndef _WIN32 |
11 #include <sys/socket.h> | 30 #include <sys/socket.h> |
12 #endif | 31 #endif |
13 | 32 |
82 * | 101 * |
83 * @return -1 on error, otherwise return the length of the payload. | 102 * @return -1 on error, otherwise return the length of the payload. |
84 */ | 103 */ |
85 static int aim_get_command_flap(aim_session_t *sess, aim_conn_t *conn, aim_frame_t *fr) | 104 static int aim_get_command_flap(aim_session_t *sess, aim_conn_t *conn, aim_frame_t *fr) |
86 { | 105 { |
87 fu8_t hdr_raw[6]; | 106 guint8 hdr_raw[6]; |
88 aim_bstream_t hdr; | 107 aim_bstream_t hdr; |
89 | 108 |
90 fr->hdrtype = AIM_FRAMETYPE_FLAP; | 109 fr->hdrtype = AIM_FRAMETYPE_FLAP; |
91 | 110 |
92 /* | 111 /* |
130 * | 149 * |
131 * @return -1 on error, otherwise return the length of the payload. | 150 * @return -1 on error, otherwise return the length of the payload. |
132 */ | 151 */ |
133 static int aim_get_command_rendezvous(aim_session_t *sess, aim_conn_t *conn, aim_frame_t *fr) | 152 static int aim_get_command_rendezvous(aim_session_t *sess, aim_conn_t *conn, aim_frame_t *fr) |
134 { | 153 { |
135 fu8_t hdr_raw[8]; | 154 guint8 hdr_raw[8]; |
136 aim_bstream_t hdr; | 155 aim_bstream_t hdr; |
137 | 156 |
138 fr->hdrtype = AIM_FRAMETYPE_OFT; | 157 fr->hdrtype = AIM_FRAMETYPE_OFT; |
139 | 158 |
140 /* | 159 /* |
202 free(fr); | 221 free(fr); |
203 return -1; | 222 return -1; |
204 } | 223 } |
205 | 224 |
206 if (payloadlen > 0) { | 225 if (payloadlen > 0) { |
207 fu8_t *payload = NULL; | 226 guint8 *payload = NULL; |
208 | 227 |
209 if (!(payload = (fu8_t *) malloc(payloadlen))) { | 228 if (!(payload = (guint8 *) malloc(payloadlen))) { |
210 aim_frame_destroy(fr); | 229 aim_frame_destroy(fr); |
211 return -1; | 230 return -1; |
212 } | 231 } |
213 | 232 |
214 aim_bstream_init(&fr->data, payload, payloadlen); | 233 aim_bstream_init(&fr->data, payload, payloadlen); |