Mercurial > pidgin
comparison libfaim/aim_txqueue.c @ 1081:efcacae6acdb
[gaim-migrate @ 1091]
libfaim connects non-blocking
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Fri, 10 Nov 2000 22:49:02 +0000 |
| parents | fa681641643d |
| children | ed8855ae6632 |
comparison
equal
deleted
inserted
replaced
| 1080:e6637ff33957 | 1081:efcacae6acdb |
|---|---|
| 147 if (newpacket->data) | 147 if (newpacket->data) |
| 148 free(newpacket->data); | 148 free(newpacket->data); |
| 149 free(newpacket); | 149 free(newpacket); |
| 150 | 150 |
| 151 return 0; | 151 return 0; |
| 152 } | |
| 153 | |
| 154 faim_internal int aim_tx_enqueue(struct aim_session_t *sess, struct command_tx_struct *command) | |
| 155 { | |
| 156 /* | |
| 157 * If we want to send a connection thats inprogress, we have to force | |
| 158 * them to use the queue based version. Otherwise, use whatever they | |
| 159 * want. | |
| 160 */ | |
| 161 if (command && command->conn && (command->conn->status & AIM_CONN_STATUS_INPROGRESS)) { | |
| 162 return aim_tx_enqueue__queuebased(sess, command); | |
| 163 } | |
| 164 return (*sess->tx_enqueue)(sess, command); | |
| 152 } | 165 } |
| 153 | 166 |
| 154 /* | 167 /* |
| 155 * aim_get_next_txseqnum() | 168 * aim_get_next_txseqnum() |
| 156 * | 169 * |
| 345 faimdprintf(2, "beginning txflush...\n"); | 358 faimdprintf(2, "beginning txflush...\n"); |
| 346 for (cur = sess->queue_outgoing; cur; cur = cur->next) { | 359 for (cur = sess->queue_outgoing; cur; cur = cur->next) { |
| 347 /* only process if its unlocked and unsent */ | 360 /* only process if its unlocked and unsent */ |
| 348 if (!cur->lock && !cur->sent) { | 361 if (!cur->lock && !cur->sent) { |
| 349 | 362 |
| 363 if (cur->conn && (cur->conn->status & AIM_CONN_STATUS_INPROGRESS)) | |
| 364 continue; | |
| 365 | |
| 350 /* | 366 /* |
| 351 * And now for the meager attempt to force transmit | 367 * And now for the meager attempt to force transmit |
| 352 * latency and avoid missed messages. | 368 * latency and avoid missed messages. |
| 353 */ | 369 */ |
| 354 if ((cur->conn->lastactivity + cur->conn->forcedlatency) >= time(NULL)) { | 370 if ((cur->conn->lastactivity + cur->conn->forcedlatency) >= time(NULL)) { |
