| 408 |
goto cleanup; |
goto cleanup; |
| 409 |
} |
} |
| 410 |
|
|
| 411 |
BBS_last_access_tm = t_used = time(0); |
BBS_last_access_tm = t_used = time(NULL); |
| 412 |
loop = 1; |
loop = 1; |
| 413 |
|
|
| 414 |
while (loop && !SYS_server_exit) |
while (loop && !SYS_server_exit) |
| 433 |
} |
} |
| 434 |
else if (nfds == 0) // timeout |
else if (nfds == 0) // timeout |
| 435 |
{ |
{ |
| 436 |
if (time(0) - BBS_last_access_tm >= MAX_DELAY_TIME) |
if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME) |
| 437 |
{ |
{ |
| 438 |
break; |
break; |
| 439 |
} |
} |
| 500 |
else |
else |
| 501 |
{ |
{ |
| 502 |
input_buf_len += ret; |
input_buf_len += ret; |
| 503 |
BBS_last_access_tm = time(0); |
BBS_last_access_tm = time(NULL); |
| 504 |
continue; |
continue; |
| 505 |
} |
} |
| 506 |
} |
} |
| 668 |
log_error("Close socket failed\n"); |
log_error("Close socket failed\n"); |
| 669 |
} |
} |
| 670 |
|
|
| 671 |
t_used = time(0) - t_used; |
t_used = time(NULL) - t_used; |
| 672 |
tm_used = gmtime(&t_used); |
tm_used = gmtime(&t_used); |
| 673 |
|
|
| 674 |
log_common("BBSNET disconnect, %d days %d hours %d minutes %d seconds used\n", |
log_common("BBSNET disconnect, %d days %d hours %d minutes %d seconds used\n", |
| 734 |
|
|
| 735 |
load_bbsnet_conf(CONF_BBSNET); |
load_bbsnet_conf(CONF_BBSNET); |
| 736 |
|
|
| 737 |
BBS_last_access_tm = time(0); |
BBS_last_access_tm = time(NULL); |
| 738 |
|
|
| 739 |
clearscr(); |
clearscr(); |
| 740 |
bbsnet_refresh(); |
bbsnet_refresh(); |
| 751 |
case Ctrl('C'): // user cancel |
case Ctrl('C'): // user cancel |
| 752 |
goto cleanup; |
goto cleanup; |
| 753 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 754 |
if (time(0) - BBS_last_access_tm >= MAX_DELAY_TIME) |
if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME) |
| 755 |
{ |
{ |
| 756 |
goto cleanup; |
goto cleanup; |
| 757 |
} |
} |
| 800 |
bbsnet_selchange(); |
bbsnet_selchange(); |
| 801 |
break; |
break; |
| 802 |
} |
} |
| 803 |
BBS_last_access_tm = time(0); |
BBS_last_access_tm = time(NULL); |
| 804 |
} |
} |
| 805 |
|
|
| 806 |
cleanup: |
cleanup: |