Changeset 1765:6521fb56702e in roaraudio for libroar/file.c
- Timestamp:
- 05/19/09 12:21:44 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/file.c
r1660 r1765 217 217 return -1; 218 218 219 #ifdef ROAR_TARGET_WIN32 220 if ( (in = open(file, O_RDONLY|O_BINARY, 0644)) == -1 ) { 221 #else 219 222 if ( (in = open(file, O_RDONLY, 0644)) == -1 ) { 223 #endif 220 224 return -1; 221 225 } … … 283 287 284 288 if ( !seek ) 285 write(out, buf, len);289 ROAR_NETWORK_WRITE(out, buf, len); 286 290 287 291 if ( !passfh ) { 292 #ifndef ROAR_TARGET_WIN32 288 293 r = roar_file_send_raw(out, in); 289 294 290 295 close(out); 296 #else 297 while ((len = read(in, buf, BUFSIZE)) > 0) 298 if ( send(out, buf, len, 0) != len ) 299 break; 300 301 closesocket(out); 302 #endif 291 303 292 304 if ( exec ) {
Note: See TracChangeset
for help on using the changeset viewer.