src/server/safs/service.c

changeset 429
25c8e8021156
parent 428
ab58e46b50a5
child 490
d218607f5a7e
equal deleted inserted replaced
428:ab58e46b50a5 429:25c8e8021156
57 57
58 // open the file 58 // open the file
59 SYS_FILE fd = vfs_open(vfs, path, O_RDONLY); 59 SYS_FILE fd = vfs_open(vfs, path, O_RDONLY);
60 if(!fd) { 60 if(!fd) {
61 // vfs_open sets http status code 61 // vfs_open sets http status code
62 *ret = REQ_ABORTED;
62 return NULL; 63 return NULL;
63 } 64 }
64 65
65 // get stat 66 // get stat
66 if(vfs_fstat(vfs, fd, s) != 0) { 67 if(vfs_fstat(vfs, fd, s) != 0) {
67 //perror("prepare_service_file: stat"); 68 //perror("prepare_service_file: stat");
68 protocol_status(sn, rq, 500, NULL); 69 protocol_status(sn, rq, 500, NULL);
70 *ret = REQ_ABORTED;
69 return NULL; 71 return NULL;
70 } 72 }
71 73
72 // check if the file is a directory 74 // check if the file is a directory
73 if(S_ISDIR(s->st_mode)) { 75 if(S_ISDIR(s->st_mode)) {

mercurial