Mercurial > pidgin
annotate src/protocols/oscar/rxqueue.c @ 8144:0163686079d5
[gaim-migrate @ 8852]
Me gusta
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 19 Jan 2004 23:35:29 +0000 |
parents | c86f075b269a |
children | 92cbf9713795 |
rev | line source |
---|---|
2086 | 1 /* |
3952 | 2 * rxqueue.c |
2086 | 3 * |
4 * This file contains the management routines for the receive | |
5 * (incoming packet) queue. The actual packet handlers are in | |
6 * aim_rxhandlers.c. | |
7 */ | |
8 | |
9 #define FAIM_INTERNAL | |
10 #include <aim.h> | |
11 | |
12 #ifndef _WIN32 | |
13 #include <sys/socket.h> | |
14 #endif | |
15 | |
16 /* | |
17 * | |
18 */ | |
19 faim_internal int aim_recv(int fd, void *buf, size_t count) | |
20 { | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
21 int left, cur; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
22 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
23 for (cur = 0, left = count; left; ) { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
24 int ret; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
25 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
26 ret = recv(fd, ((unsigned char *)buf)+cur, left, 0); |
2808
e79f30457998
[gaim-migrate @ 2821]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2706
diff
changeset
|
27 |
e79f30457998
[gaim-migrate @ 2821]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2706
diff
changeset
|
28 /* Of course EOF is an error, only morons disagree with that. */ |
e79f30457998
[gaim-migrate @ 2821]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2706
diff
changeset
|
29 if (ret <= 0) |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
30 return -1; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
31 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
32 cur += ret; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
33 left -= ret; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
34 } |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
35 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
36 return cur; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
37 } |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
38 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
39 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
40 * Read into a byte stream. Will not read more than count, but may read |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
41 * less if there is not enough room in the stream buffer. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
42 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
43 faim_internal int aim_bstream_recv(aim_bstream_t *bs, int fd, size_t count) |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
44 { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
45 int red = 0; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
46 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
47 if (!bs || (fd < 0) || (count < 0)) |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
48 return -1; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
49 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
50 if (count > (bs->len - bs->offset)) |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
51 count = bs->len - bs->offset; /* truncate to remaining space */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
52 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
53 if (count) { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
54 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
55 red = aim_recv(fd, bs->data + bs->offset, count); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
56 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
57 if (red <= 0) |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
58 return -1; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
59 } |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
60 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
61 bs->offset += red; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
62 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
63 return red; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
64 } |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
65 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
66 /** |
7806 | 67 * Free an aim_frame_t |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
68 * |
7806 | 69 * @param frame The frame to free. |
70 * @return -1 on error; 0 on success. | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
71 */ |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
72 faim_internal void aim_frame_destroy(aim_frame_t *frame) |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
73 { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
74 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
75 free(frame->data.data); /* XXX aim_bstream_free */ |
3952 | 76 free(frame); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
77 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
78 return; |
3952 | 79 } |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
80 |
2086 | 81 /* |
7806 | 82 * Read a FLAP header from conn into fr, and return the number of |
83 * bytes in the payload. | |
84 * | |
85 * @return -1 on error, otherwise return the length of the payload. | |
2086 | 86 */ |
5414 | 87 static int aim_get_command_flap(aim_session_t *sess, aim_conn_t *conn, aim_frame_t *fr) |
2086 | 88 { |
7806 | 89 fu8_t hdr_raw[6]; |
90 aim_bstream_t hdr; | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
91 |
7806 | 92 fr->hdrtype = AIM_FRAMETYPE_FLAP; |
2086 | 93 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
94 /* |
7806 | 95 * Read FLAP header. Six bytes total. |
96 * | |
97 * Byte # | Description | |
98 * -------|------------- | |
99 * 0x00 | Always 0x2a | |
100 * 0x01 | Channel number, usually "2." "1" is used during login, | |
101 * | 4 is used during logoff. | |
102 * 0x02 | Sequence number, 2 bytes. | |
103 * 0x04 | Number of data bytes that follow, 2 bytes. | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
104 */ |
7806 | 105 aim_bstream_init(&hdr, hdr_raw, sizeof(hdr_raw)); |
106 if (aim_bstream_recv(&hdr, conn->fd, 6) < 6) { | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
107 aim_conn_close(conn); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
108 return -1; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
109 } |
2086 | 110 |
7806 | 111 aim_bstream_rewind(&hdr); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
112 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
113 /* |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
114 * This shouldn't happen unless the socket breaks, the server breaks, |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
115 * or we break. We must handle it just in case. |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
116 */ |
7806 | 117 if (aimbs_get8(&hdr) != 0x2a) { |
118 faimdprintf(sess, 0, "Invalid FLAP frame received on FLAP connection!"); | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
119 aim_conn_close(conn); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
120 return -1; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
121 } |
2086 | 122 |
7806 | 123 fr->hdr.flap.channel = aimbs_get8(&hdr); |
124 fr->hdr.flap.seqnum = aimbs_get16(&hdr); | |
3952 | 125 |
7806 | 126 return aimbs_get16(&hdr); |
3952 | 127 } |
128 | |
129 /* | |
7806 | 130 * Read a rendezvous header from conn into fr, and return the number of |
131 * bytes in the payload. | |
132 * | |
133 * @return -1 on error, otherwise return the length of the payload. | |
3952 | 134 */ |
135 static int aim_get_command_rendezvous(aim_session_t *sess, aim_conn_t *conn, aim_frame_t *fr) | |
136 { | |
7806 | 137 fu8_t hdr_raw[8]; |
138 aim_bstream_t hdr; | |
139 | |
140 fr->hdrtype = AIM_FRAMETYPE_OFT; | |
3952 | 141 |
7806 | 142 /* |
143 * Read rendezvous header | |
144 */ | |
145 aim_bstream_init(&hdr, hdr_raw, sizeof(hdr_raw)); | |
146 if (aim_bstream_recv(&hdr, conn->fd, 8) < 8) { | |
3952 | 147 aim_conn_close(conn); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
148 return -1; |
3952 | 149 } |
150 | |
7806 | 151 aim_bstream_rewind(&hdr); |
3952 | 152 |
7806 | 153 aimbs_getrawbuf(&hdr, fr->hdr.rend.magic, 4); |
154 fr->hdr.rend.hdrlen = aimbs_get16(&hdr); | |
155 fr->hdr.rend.type = aimbs_get16(&hdr); | |
3952 | 156 |
7806 | 157 return fr->hdr.rend.hdrlen - 8; |
3952 | 158 } |
2086 | 159 |
3952 | 160 /* |
161 * Grab a single command sequence off the socket, and enqueue it in the incoming event queue | |
162 * in a separate struct. | |
7806 | 163 * |
164 * @return 0 on success, otherwise return the error number. | |
3952 | 165 */ |
166 faim_export int aim_get_command(aim_session_t *sess, aim_conn_t *conn) | |
167 { | |
7806 | 168 aim_frame_t *fr; |
169 int payloadlen; | |
3952 | 170 |
171 if (!sess || !conn) | |
4617 | 172 return -EINVAL; |
3952 | 173 |
174 if (conn->fd == -1) | |
175 return -1; /* it's an aim_conn_close()'d connection */ | |
176 | |
177 if (conn->fd < 3) /* can happen when people abuse the interface */ | |
178 return -1; | |
179 | |
180 if (conn->status & AIM_CONN_STATUS_INPROGRESS) | |
181 return aim_conn_completeconnect(sess, conn); | |
182 | |
7806 | 183 if (!(fr = (aim_frame_t *)calloc(sizeof(aim_frame_t), 1))) |
4617 | 184 return -ENOMEM; |
3952 | 185 |
186 /* | |
187 * Rendezvous (client to client) connections do not speak FLAP, so this | |
188 * function will break on them. | |
189 */ | |
7806 | 190 if (conn->type == AIM_CONN_TYPE_RENDEZVOUS) |
191 payloadlen = aim_get_command_rendezvous(sess, conn, fr); | |
192 else if (conn->type == AIM_CONN_TYPE_LISTENER) { | |
193 faimdprintf(sess, 0, "AIM_CONN_TYPE_LISTENER on fd %d\n", conn->fd); | |
194 free(fr); | |
195 return -1; | |
196 } else | |
197 payloadlen = aim_get_command_flap(sess, conn, fr); | |
5927 | 198 |
7806 | 199 if (payloadlen < 0) { |
200 free(fr); | |
201 return -1; | |
202 } | |
203 | |
204 if (payloadlen > 0) { | |
205 fu8_t *payload = NULL; | |
206 | |
207 if (!(payload = (fu8_t *) malloc(payloadlen))) { | |
208 aim_frame_destroy(fr); | |
5927 | 209 return -1; |
210 } | |
211 | |
7806 | 212 aim_bstream_init(&fr->data, payload, payloadlen); |
2086 | 213 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
214 /* read the payload */ |
7806 | 215 if (aim_bstream_recv(&fr->data, conn->fd, payloadlen) < payloadlen) { |
216 aim_frame_destroy(fr); /* free's payload */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
217 aim_conn_close(conn); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
218 return -1; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
219 } |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
220 } else |
7806 | 221 aim_bstream_init(&fr->data, NULL, 0); |
2086 | 222 |
7806 | 223 aim_bstream_rewind(&fr->data); |
2086 | 224 |
7806 | 225 fr->conn = conn; |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
226 |
7806 | 227 /* Enqueue this puppy */ |
228 fr->next = NULL; /* this will always be at the bottom */ | |
229 if (sess->queue_incoming == NULL) | |
230 sess->queue_incoming = fr; | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
231 else { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
232 aim_frame_t *cur; |
7806 | 233 for (cur = sess->queue_incoming; cur->next; cur = cur->next); |
234 cur->next = fr; | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
235 } |
2086 | 236 |
7806 | 237 fr->conn->lastactivity = time(NULL); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
238 |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
239 return 0; |
2086 | 240 } |
241 | |
242 /* | |
7806 | 243 * Purge recieve queue of all handled commands (->handled==1). |
2086 | 244 * |
245 */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
246 faim_export void aim_purge_rxqueue(aim_session_t *sess) |
2086 | 247 { |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
248 aim_frame_t *cur, **prev; |
2086 | 249 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
250 for (prev = &sess->queue_incoming; (cur = *prev); ) { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
251 if (cur->handled) { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
252 *prev = cur->next; |
7806 | 253 aim_frame_destroy(cur); |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
254 } else |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
255 prev = &cur->next; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
256 } |
2086 | 257 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
258 return; |
2086 | 259 } |
260 | |
261 /* | |
262 * Since aim_get_command will aim_conn_kill dead connections, we need | |
263 * to clean up the rxqueue of unprocessed connections on that socket. | |
264 * | |
265 * XXX: this is something that was handled better in the old connection | |
266 * handling method, but eh. | |
267 */ | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
268 faim_internal void aim_rxqueue_cleanbyconn(aim_session_t *sess, aim_conn_t *conn) |
2086 | 269 { |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
270 aim_frame_t *currx; |
2086 | 271 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
272 for (currx = sess->queue_incoming; currx; currx = currx->next) { |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
273 if ((!currx->handled) && (currx->conn == conn)) |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
274 currx->handled = 1; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
275 } |
7806 | 276 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
277 return; |
2086 | 278 } |