Fossil

Check-in [c12e5b10]
Login

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

Overview
Comment:On windows, a recv() call fails if the return value is less than or equal to zero. Ticket [66cbcd56a229f33af6b9a6329a7]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:c12e5b102ee6079715da0fa4eff7fb502b68b111
User & Date: drh 2008-11-27 13:50:41
References
2008-11-28
05:12 New ticket [f083ffff] Inconsistent display of closed tickets id's as striked out links in timeline. artifact: f164c95c user: anonymous
2008-11-27
13:51 Fixed ticket [66cbcd56]: win32 'fossil pull' or other client side commands hang up if peer unexpected shutdown. plus 2 other changes artifact: 4cbd3b67 user: drh
Context
2008-11-27
22:58
Fix the Setup->Shunned->Rebuild button so that it works when the "fossil ui" command is run from within a check-out and without specifying the repository filename. check-in: 80406199 user: drh tags: trunk
13:50
On windows, a recv() call fails if the return value is less than or equal to zero. Ticket [66cbcd56a229f33af6b9a6329a7] check-in: c12e5b10 user: drh tags: trunk
13:33
Change • into • per ticket [2ed0655983b51af6]. check-in: 72e9eb6a user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/http.c.

150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
/*
** Initialize a blob to the data on an input socket.  return
** the number of bytes read into the blob.  Any prior content
** of the blob is discarded, not freed.
**
** The function was placed here in http.c due to it's socket
** nature and we did not want to introduce socket headers into
** the socket netural blob.c file.
*/
int socket_read_blob(Blob *pBlob, int pSockId, int nToRead){
  int i=0,read=0;
  char rbuf[50];
  blob_zero(pBlob);
  while ( i<nToRead ){
    read = recv(pSockId, rbuf, 50, 0);
    i += read;
    if( read<0 ){
      return 0;
    }
    blob_append(pBlob, rbuf, read);
  }
  return blob_size(pBlob);
}
#endif







|








|







150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
/*
** Initialize a blob to the data on an input socket.  return
** the number of bytes read into the blob.  Any prior content
** of the blob is discarded, not freed.
**
** The function was placed here in http.c due to it's socket
** nature and we did not want to introduce socket headers into
** the socket neutral blob.c file.
*/
int socket_read_blob(Blob *pBlob, int pSockId, int nToRead){
  int i=0,read=0;
  char rbuf[50];
  blob_zero(pBlob);
  while ( i<nToRead ){
    read = recv(pSockId, rbuf, 50, 0);
    i += read;
    if( read<=0 ){
      return 0;
    }
    blob_append(pBlob, rbuf, read);
  }
  return blob_size(pBlob);
}
#endif