| 526 |
MYSQL *db = NULL; |
MYSQL *db = NULL; |
| 527 |
char sql[SQL_BUFFER_LEN]; |
char sql[SQL_BUFFER_LEN]; |
| 528 |
|
|
| 529 |
if (strcmp(BBS_current_action, action) == 0 && |
if ((action == NULL || strcmp(BBS_current_action, action) == 0) && |
| 530 |
time(NULL) - BBS_current_action_tm < BBS_current_action_refresh_interval) // No change |
time(NULL) - BBS_current_action_tm < BBS_current_action_refresh_interval) // No change |
| 531 |
{ |
{ |
| 532 |
return 0; |
return 0; |
| 533 |
} |
} |
| 534 |
|
|
| 535 |
strncpy(BBS_current_action, action, sizeof(BBS_current_action) - 1); |
if (action != NULL) |
| 536 |
BBS_current_action[sizeof(BBS_current_action) - 1] = '\0'; |
{ |
| 537 |
|
strncpy(BBS_current_action, action, sizeof(BBS_current_action) - 1); |
| 538 |
|
BBS_current_action[sizeof(BBS_current_action) - 1] = '\0'; |
| 539 |
|
} |
| 540 |
|
|
| 541 |
BBS_current_action_tm = time(NULL); |
BBS_current_action_tm = time(NULL); |
| 542 |
|
|
| 543 |
db = db_open(); |
db = db_open(); |