Fossil

Check-in [74eec78b]
Login

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

Overview
Comment:Work around a networking problem on WinXP when transferring large files.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:74eec78b3b856a9cce58a112a917cb4f7788e716
User & Date: drh 2013-06-22 01:44:54
Context
2013-06-22
11:25
On the /urllist webpage, show entries most recent first instead of most recent last. check-in: f94f3e3a user: drh tags: trunk
01:44
Work around a networking problem on WinXP when transferring large files. check-in: 74eec78b user: drh tags: trunk
2013-06-21
15:19
Allow the "fossil commit" command to accept directories as command-line arguments and commit all files contained underneath those directories. check-in: c8253f40 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/http_socket.c.

198
199
200
201
202
203
204

205
206
207
208
209
210
211
212
/*
** Receive content back from the open socket connection.
*/
size_t socket_receive(void *NotUsed, void *pContent, size_t N){
  ssize_t got;
  size_t total = 0;
  while( N>0 ){

    got = recv(iSocket, pContent, N, 0);
    if( got<=0 ) break;
    total += (size_t)got;
    N -= (size_t)got;
    pContent = (void*)&((char*)pContent)[got];
  }
  return total;
}







>
|







198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
/*
** Receive content back from the open socket connection.
*/
size_t socket_receive(void *NotUsed, void *pContent, size_t N){
  ssize_t got;
  size_t total = 0;
  while( N>0 ){
    /* WinXP fails for large values of N.  So limit it to 64KiB. */
    got = recv(iSocket, pContent, N>65536 ? 65536 : N, 0);
    if( got<=0 ) break;
    total += (size_t)got;
    N -= (size_t)got;
    pContent = (void*)&((char*)pContent)[got];
  }
  return total;
}