Fossil

Check-in [77371043]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Now that type has changed due to [d0fa9eee56], cast back to match total variable.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:77371043a47ed234f78802c8e0a156d24a0f92cf495116f63ede0e71f453e2e1
User & Date: andybradford 2018-10-19 22:37:13
Context
2018-10-20
15:00
Fixed an off-by-one error in the error log header printer, resulting in the day number being for the next day past the call time. Bug diagnosis and fix from https://fossil-scm.org/forum/forumpost/0d5933da4c check-in: cf9b44a9 user: wyoung tags: trunk
2018-10-19
22:37
Now that type has changed due to [d0fa9eee56], cast back to match total variable. check-in: 77371043 user: andybradford tags: trunk
22:12
Use a signed type to avoid an infinite loop in socket_send(); socket_receive() is already fine. check-in: d0fa9eee user: andybradford tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/http_socket.c.

199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
*/
size_t socket_send(void *NotUsed, const void *pContent, size_t N){
  ssize_t sent;
  size_t total = 0;
  while( N>0 ){
    sent = send(iSocket, pContent, N, 0);
    if( sent<=0 ) break;
    total += sent;
    N -= sent;
    pContent = (void*)&((char*)pContent)[sent];
  }
  return total;
}

/*
** Receive content back from the open socket connection.







|
|







199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
*/
size_t socket_send(void *NotUsed, const void *pContent, size_t N){
  ssize_t sent;
  size_t total = 0;
  while( N>0 ){
    sent = send(iSocket, pContent, N, 0);
    if( sent<=0 ) break;
    total += (size_t)sent;
    N -= (size_t)sent;
    pContent = (void*)&((char*)pContent)[sent];
  }
  return total;
}

/*
** Receive content back from the open socket connection.