Changeset 5052
- Timestamp:
- 12/02/07 20:51:09 (7 months ago)
- Files:
-
- wired/trunk/wired/server.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wired/trunk/wired/server.c
r4843 r5052 314 314 315 315 while(wd_running) { 316 wi_pool_drain(pool); 317 316 318 /* accept new user */ 317 319 socket = wi_socket_accept_multiple(wd_control_sockets, wd_control_socket_context, 30.0, &address); … … 320 322 wi_log_err(WI_STR("Could not accept a connection: %m")); 321 323 322 goto next;324 continue; 323 325 } 324 326 … … 328 330 wi_log_err(WI_STR("Could not accept a connection for %@: %m"), ip); 329 331 330 goto next;332 continue; 331 333 } 332 334 … … 340 342 if(!wi_thread_create_thread(wd_control_thread, user)) 341 343 wi_log_err(WI_STR("Could not create a thread for %@: %m"), ip); 342 343 next:344 if(++i % 10 == 0)345 wi_pool_drain(pool);346 344 } 347 345 … … 363 361 364 362 while(wd_running) { 363 wi_pool_drain(pool); 364 365 365 /* accept new connection */ 366 366 socket = wi_socket_accept_multiple(wd_transfer_sockets, wd_transfer_socket_context, 30.0, &address); … … 369 369 wi_log_err(WI_STR("Could not accept a connection: %m")); 370 370 371 goto next;371 continue; 372 372 } 373 373 … … 377 377 wi_log_err(WI_STR("Could not accept a connection for %@: %m"), ip); 378 378 379 goto next;379 continue; 380 380 } 381 381 … … 386 386 wi_log_warn(WI_STR("Could not read from %@: %m"), ip); 387 387 388 goto next;388 continue; 389 389 } 390 390 … … 397 397 398 398 if(!transfer) 399 goto next;399 continue; 400 400 401 401 if(!wi_is_equal(ip, wd_user_ip(transfer->user))) 402 goto next;402 continue; 403 403 404 404 transfer->socket = wi_retain(socket); … … 408 408 wi_log_err(WI_STR("Could not create a thread for %@: %m"), ip); 409 409 } 410 411 next:412 if(++i % 10 == 0)413 wi_pool_drain(pool);414 410 } 415 411
