- Timestamp:
- 07/11/07 19:55:59 (17 months ago)
- Files:
-
- 1 modified
-
trunk/obexftp/client.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/obexftp/client.c
r160 r177 42 42 #include <winsock2.h> 43 43 #define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT 44 #define S_IRGRP 045 #define S_IROTH 044 #define O_BINARY (_O_BINARY) 45 #define CREATE_MODE_FILE (S_IRUSR|S_IWUSR) 46 46 #else 47 47 #include <sys/socket.h> 48 48 #include <arpa/inet.h> 49 49 #include <netinet/in.h> 50 #define O_BINARY (0) 51 #define CREATE_MODE_FILE (S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) 50 52 #endif /* _WIN32 */ 51 53 … … 362 364 int fd; 363 365 //fd = open_safe("", cli-> target_fn); 364 fd = creat(cli-> target_fn, 365 S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); 366 fd = creat(cli-> target_fn, CREATE_MODE_FILE); 366 367 if(fd > 0) { 367 368 (void) write(fd, body_data, body_len); … … 987 988 } 988 989 989 cli->fd = open(filename, O_RDONLY , 0);990 cli->fd = open(filename, O_RDONLY | O_BINARY, 0); 990 991 if(cli->fd < 0) 991 992 ret = -1;
