Fossil SCM

Use a signed type to avoid an infinite loop in socket_send(); socket_receive() is already fine.

andybradford 2018-10-19 22:12 trunk
Commit d0fa9eee56daa1476e7ae8a977b3e9d1cdc666469ed2de88c30cd0b9ab17ecd5
1 file changed +1 -1
--- src/http_socket.c
+++ src/http_socket.c
@@ -196,11 +196,11 @@
196196
197197
/*
198198
** Send content out over the open socket connection.
199199
*/
200200
size_t socket_send(void *NotUsed, const void *pContent, size_t N){
201
- size_t sent;
201
+ ssize_t sent;
202202
size_t total = 0;
203203
while( N>0 ){
204204
sent = send(iSocket, pContent, N, 0);
205205
if( sent<=0 ) break;
206206
total += sent;
207207
--- src/http_socket.c
+++ src/http_socket.c
@@ -196,11 +196,11 @@
196
197 /*
198 ** Send content out over the open socket connection.
199 */
200 size_t socket_send(void *NotUsed, const void *pContent, size_t N){
201 size_t sent;
202 size_t total = 0;
203 while( N>0 ){
204 sent = send(iSocket, pContent, N, 0);
205 if( sent<=0 ) break;
206 total += sent;
207
--- src/http_socket.c
+++ src/http_socket.c
@@ -196,11 +196,11 @@
196
197 /*
198 ** Send content out over the open socket connection.
199 */
200 size_t socket_send(void *NotUsed, const void *pContent, size_t N){
201 ssize_t sent;
202 size_t total = 0;
203 while( N>0 ){
204 sent = send(iSocket, pContent, N, 0);
205 if( sent<=0 ) break;
206 total += sent;
207

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button