src/server/util/util.c

changeset 56
c6cf20b09043
parent 47
ce9790523346
child 58
66c22e54aa90
equal deleted inserted replaced
55:b7908bf38f9f 56:c6cf20b09043
47 #include "prthread.h" 47 #include "prthread.h"
48 #endif /* XP_UNIX */ 48 #endif /* XP_UNIX */
49 49
50 50
51 //include "nspr.h" 51 //include "nspr.h"
52 #include <errno.h>
53
52 #include "../daemon/netsite.h" 54 #include "../daemon/netsite.h"
53 #include "../public/nsapi.h" 55 #include "../public/nsapi.h"
54 56
55 #include "util.h" 57 #include "util.h"
56 58
170 #endif 172 #endif
171 173
172 return rv; 174 return rv;
173 } 175 }
174 #endif 176 #endif
177
178
179 NSAPI_PUBLIC int util_errno2status(int errno_value) {
180 switch(errno_value) {
181 case 0: {
182 return 200;
183 }
184 case EACCES: {
185 return 403;
186 }
187 case ENOENT: {
188 return 404;
189 break;
190 }
191 }
192 return 500;
193 }

mercurial