Changeset 3830
- Timestamp:
- 02/28/06 22:22:00 (3 years ago)
- Files:
-
- wired/trunk/wired/main.c (modified) (1 diff)
- wired/trunk/wired/server.c (modified) (3 diffs)
- wired/trunk/wired/transfers.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wired/trunk/wired/main.c
r3764 r3830 254 254 wi_release(pool); 255 255 pool = wi_pool_init(wi_pool_alloc()); 256 256 257 257 /* enter the signal handling thread in the main thread */ 258 258 wd_signal_thread(NULL); wired/trunk/wired/server.c
r3809 r3830 318 318 319 319 next: 320 if(++i % 10 0== 0) {320 if(++i % 10 == 0) { 321 321 wi_release(pool); 322 322 pool = NULL; … … 352 352 /* accept new connection */ 353 353 socket = wi_socket_accept_multiple(wd_transfer_sockets, wd_transfer_socket_context, 30.0, &address); 354 354 355 355 if(!address) { 356 356 wi_log_err(WI_STR("Could not accept a connection: %m")); … … 397 397 398 398 next: 399 if(++i % 10 0== 0) {399 if(++i % 10 == 0) { 400 400 wi_release(pool); 401 401 pool = NULL; wired/trunk/wired/transfers.c
r3809 r3830 391 391 392 392 static wd_transfer_t * wd_transfer_init_with_client(wd_transfer_t *transfer, wd_client_t *client) { 393 wi_string_t *string;394 395 393 transfer->state = WD_TRANSFER_QUEUED; 396 394 transfer->client = wi_retain(client); 397 398 string = wi_string_init_random_string_with_length(wi_string_alloc(), 1024); 399 transfer->hash = wi_retain(wi_string_sha1(string)); 400 wi_release(string); 401 395 transfer->hash = wi_retain(wi_data_sha1(wi_data_with_random_bytes(1024))); 402 396 transfer->state_lock = wi_condition_lock_init_with_condition(wi_condition_lock_alloc(), transfer->state); 403 397 … … 692 686 693 687 end: 688 wi_socket_close(transfer->socket); 689 694 690 if(fd >= 0) 695 691 close(fd); … … 839 835 840 836 end: 837 wi_socket_close(transfer->socket); 838 841 839 if(fd >= 0) 842 840 close(fd);
