src/server/util/netbuf.c

branch
webdav
changeset 211
2160585200ac
parent 52
aced2245fb1c
child 330
71b652743871
equal deleted inserted replaced
210:21274e5950af 211:2160585200ac
141 141
142 buf->pos += bytes_in_buffer; 142 buf->pos += bytes_in_buffer;
143 return bytes_in_buffer; 143 return bytes_in_buffer;
144 } 144 }
145 } 145 }
146 146
147 if(!buf->sd) {
148 return NETBUF_EOF;
149 }
150
147 /* The netbuf is empty. Read data directly into the caller's buffer */ 151 /* The netbuf is empty. Read data directly into the caller's buffer */
148 bytes = net_read(buf->sd, buffer, size); 152 bytes = net_read(buf->sd, buffer, size);
149 if (bytes == 0) 153 if (bytes == 0)
150 return NETBUF_EOF; 154 return NETBUF_EOF;
151 if (bytes < 0) { 155 if (bytes < 0) {

mercurial