|
3 | 3 | *
|
4 | 4 | * All rights reserved. This program and the accompanying materials
|
5 | 5 | * are made available under the terms of the Eclipse Public License v1.0
|
6 |
| - * and Eclipse Distribution License v1.0 which accompany this distribution. |
| 6 | + * and Eclipse Distribution License v1.0 which accompany this distribution. |
7 | 7 | *
|
8 |
| - * The Eclipse Public License is available at |
| 8 | + * The Eclipse Public License is available at |
9 | 9 | * http://www.eclipse.org/legal/epl-v10.html
|
10 |
| - * and the Eclipse Distribution License is available at |
| 10 | + * and the Eclipse Distribution License is available at |
11 | 11 | * http://www.eclipse.org/org/documents/edl-v10.php.
|
12 | 12 | *
|
13 | 13 | * Contributors:
|
14 | 14 | * Ian Craggs - initial API and implementation and/or initial documentation
|
15 | 15 | * Ian Craggs, Allan Stockdill-Mander - SSL updates
|
16 |
| - * Ian Craggs - fix for issue #244 |
| 16 | + * Ian Craggs - fix for issue #244, issue #20 |
17 | 17 | *******************************************************************************/
|
18 | 18 |
|
19 | 19 | /**
|
@@ -133,6 +133,7 @@ void SocketBuffer_terminate(void)
|
133 | 133 | void SocketBuffer_cleanup(int socket)
|
134 | 134 | {
|
135 | 135 | FUNC_ENTRY;
|
| 136 | + SocketBuffer_writeComplete(socket); /* clean up write buffers */ |
136 | 137 | if (ListFindItem(queues, &socket, socketcompare))
|
137 | 138 | {
|
138 | 139 | free(((socket_queue*)(queues->current->content))->buf);
|
@@ -239,9 +240,9 @@ void SocketBuffer_interrupted(int socket, size_t actual_len)
|
239 | 240 | queue = def_queue;
|
240 | 241 | /* if SocketBuffer_queueChar() has not yet been called, then the socket number
|
241 | 242 | in def_queue will not have been set. Issue #244.
|
242 |
| - If actual_len == 0 then we may not need to do anything - I'll leave that |
| 243 | + If actual_len == 0 then we may not need to do anything - I'll leave that |
243 | 244 | optimization for another time. */
|
244 |
| - queue->socket = socket; |
| 245 | + queue->socket = socket; |
245 | 246 | ListAppend(queues, def_queue, sizeof(socket_queue)+def_queue->buflen);
|
246 | 247 | SocketBuffer_newDefQ();
|
247 | 248 | }
|
|
0 commit comments