- Timestamp:
- Mar 11, 2011, 8:30:55 PM (14 years ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_calls.c
r307 r315 52 52 #include "sh_calls.h" 53 53 #include "sh_ipvx.h" 54 #include "sh_sub.h" 55 #include "sh_utils.h" 54 56 55 57 #undef FIL__ … … 240 242 } 241 243 244 static int sh_use_sub = 0; 245 246 int sh_calls_set_sub (const char * str) 247 { 248 return sh_util_flagval(str, &sh_use_sub); 249 } 250 242 251 long int retry_lstat(const char * file, int line, 243 252 const char *file_name, struct stat *buf) … … 249 258 SL_ENTER(_("retry_lstat")); 250 259 251 do { 252 val_retry = /*@-unrecog@*/lstat (file_name, buf)/*@+unrecog@*/; 253 } while (val_retry < 0 && errno == EINTR); 260 if (sh_use_sub) 261 { 262 val_retry = sh_sub_lstat (file_name, buf); 263 } 264 else 265 { 266 do { 267 val_retry = /*@-unrecog@*/lstat (file_name, buf)/*@+unrecog@*/; 268 } while (val_retry < 0 && errno == EINTR); 269 } 270 254 271 error = errno; 255 272 if (val_retry < 0) { … … 260 277 } 261 278 errno = error; 279 262 280 SL_RETURN(val_retry, _("retry_lstat")); 263 281 } … … 272 290 SL_ENTER(_("retry_stat")); 273 291 274 do { 275 val_retry = stat (file_name, buf); 276 } while (val_retry < 0 && errno == EINTR); 292 if (sh_use_sub) 293 { 294 val_retry = sh_sub_stat (file_name, buf); 295 } 296 else 297 { 298 do { 299 val_retry = stat (file_name, buf); 300 } while (val_retry < 0 && errno == EINTR); 301 } 302 277 303 error = errno; 278 304 if (val_retry < 0) { … … 283 309 } 284 310 errno = error; 311 285 312 SL_RETURN(val_retry, _("retry_stat")); 286 313 } -
trunk/src/sh_forward.c
r307 r315 4862 4862 int flag = 1; /* non-zero to enable an option */ 4863 4863 4864 /* fprintf(stderr, "FIXME IPVX: bind addr %s (%d) :%d\n", 4865 sh_ipvx_print_sockaddr (sa, domain), salen, 4866 sh_ipvx_get_port(sa, domain)); */ 4867 4864 4868 /* create the socket, bind() it and listen() 4865 4869 */ … … 4940 4944 hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; 4941 4945 hints.ai_socktype = SOCK_STREAM; 4946 hints.ai_family = AF_UNSPEC; 4942 4947 sl_snprintf(port, sizeof(port), "%d", server_port); 4943 4948 -
trunk/src/sh_port2proc.c
r298 r315 422 422 423 423 sh_ipvx_ntoa(a, sizeof(a), &ss); 424 sh_ipvx_ntoa(b, sizeof(b), &ss);424 sh_ipvx_ntoa(b, sizeof(b), saddr); 425 425 426 426 fprintf(stderr, " -> inode %u, iface/port %s,%u, status %u, searching %s,%u, %u\n", -
trunk/src/sh_pthread.c
r259 r315 15 15 SH_MUTEX_INIT(mutex_readdir, PTHREAD_MUTEX_INITIALIZER); 16 16 SH_MUTEX_INIT(mutex_thread_nolog, PTHREAD_MUTEX_INITIALIZER); 17 18 int sh_pthread_setsigmask(int how, const void *set, void *oldset) 19 { 20 return pthread_sigmask(how, (const sigset_t *)set, (sigset_t *)oldset); 21 } 17 22 18 23 void sh_pthread_mutex_unlock (void *arg) … … 288 293 #endif 289 294 295 #else 296 297 #include <signal.h> 298 299 int sh_pthread_setsigmask(int how, const void *set, void *oldset) 300 { 301 return sigprocmask(how, (const sigset_t *)set, (sigset_t *)oldset); 302 } 303 290 304 291 305 #endif -
trunk/src/sh_readconf.c
r310 r315 1227 1227 sh_util_sigtype }, 1228 1228 1229 { N_("avoidblock"), SH_SECTION_MISC, SH_SECTION_NONE, 1230 sh_calls_set_sub }, 1231 1229 1232 { NULL, 0, 0, NULL} 1230 1233 }; -
trunk/src/sh_socket.c
r295 r315 683 683 { 684 684 ++retry; 685 retry_msleep(0, 1 );685 retry_msleep(0, 10); 686 686 } 687 687 } while ((nbytes < 0) && (retry < 3)); -
trunk/src/sh_unix.c
r310 r315 1529 1529 do { 1530 1530 errno = 0; 1531 test = sigprocmask(SIG_UNBLOCK, &set_proc, NULL);1531 test = SH_SETSIGMASK(SIG_UNBLOCK, &set_proc, NULL); 1532 1532 } while (test < 0 && errno == EINTR); 1533 1533
Note:
See TracChangeset
for help on using the changeset viewer.