Fossil SCM
Use a signed type to avoid an infinite loop in socket_send(); socket_receive() is already fine.
Commit
d0fa9eee56daa1476e7ae8a977b3e9d1cdc666469ed2de88c30cd0b9ab17ecd5
Parent
724ccc46f2cba9a…
1 file changed
+1
-1
+1
-1
| --- src/http_socket.c | ||
| +++ src/http_socket.c | ||
| @@ -196,11 +196,11 @@ | ||
| 196 | 196 | |
| 197 | 197 | /* |
| 198 | 198 | ** Send content out over the open socket connection. |
| 199 | 199 | */ |
| 200 | 200 | size_t socket_send(void *NotUsed, const void *pContent, size_t N){ |
| 201 | - size_t sent; | |
| 201 | + ssize_t sent; | |
| 202 | 202 | size_t total = 0; |
| 203 | 203 | while( N>0 ){ |
| 204 | 204 | sent = send(iSocket, pContent, N, 0); |
| 205 | 205 | if( sent<=0 ) break; |
| 206 | 206 | total += sent; |
| 207 | 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 | 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 |