| 536 |
} |
} |
| 537 |
else if (ret == 0) |
else if (ret == 0) |
| 538 |
{ |
{ |
| 539 |
|
// Send NO-OP to remote server |
| 540 |
|
input_buf[input_buf_len] = '\0'; |
| 541 |
|
input_buf_len++; |
| 542 |
|
|
| 543 |
stdin_read_wait = 0; |
stdin_read_wait = 0; |
| 544 |
break; // Check whether channel is still open |
break; // Check whether channel is still open |
| 545 |
} |
} |
| 595 |
{ |
{ |
| 596 |
if (input_buf_offset < input_buf_len) |
if (input_buf_offset < input_buf_len) |
| 597 |
{ |
{ |
| 598 |
|
// For debug |
| 599 |
|
#ifdef _DEBUG |
| 600 |
|
for (int j = input_buf_offset; j < input_buf_len; j++) |
| 601 |
|
{ |
| 602 |
|
log_error("Debug input: <--[%u]\n", (input_buf[j] + 256) % 256); |
| 603 |
|
} |
| 604 |
|
#endif |
| 605 |
|
|
| 606 |
ret = io_buf_conv(input_cd, input_buf, &input_buf_len, &input_buf_offset, input_conv, sizeof(input_conv), &input_conv_len); |
ret = io_buf_conv(input_cd, input_buf, &input_buf_len, &input_buf_offset, input_conv, sizeof(input_conv), &input_conv_len); |
| 607 |
if (ret < 0) |
if (ret < 0) |
| 608 |
{ |
{ |
| 609 |
log_error("io_buf_conv(input, %d, %d, %d) error\n", input_buf_len, input_buf_offset, input_conv_len); |
log_error("io_buf_conv(input, %d, %d, %d) error\n", input_buf_len, input_buf_offset, input_conv_len); |
| 610 |
input_buf_len = input_buf_offset; // Discard invalid sequence |
input_buf_len = input_buf_offset; // Discard invalid sequence |
| 611 |
} |
} |
| 612 |
|
|
| 613 |
|
// For debug |
| 614 |
|
#ifdef _DEBUG |
| 615 |
|
for (int j = input_conv_offset; j < input_conv_len; j++) |
| 616 |
|
{ |
| 617 |
|
log_error("Debug input_conv: <--[%u]\n", (input_conv[j] + 256) % 256); |
| 618 |
|
} |
| 619 |
|
#endif |
| 620 |
} |
} |
| 621 |
|
|
| 622 |
while (input_conv_offset < input_conv_len && !SYS_server_exit) |
while (input_conv_offset < input_conv_len && !SYS_server_exit) |
| 801 |
tm_used->tm_mday - 1, tm_used->tm_hour, tm_used->tm_min, |
tm_used->tm_mday - 1, tm_used->tm_hour, tm_used->tm_min, |
| 802 |
tm_used->tm_sec); |
tm_used->tm_sec); |
| 803 |
|
|
| 804 |
|
BBS_last_access_tm = time(NULL); |
| 805 |
|
|
| 806 |
return 0; |
return 0; |
| 807 |
} |
} |
| 808 |
|
|