| 55 |
int std_log_redir = 0; |
int std_log_redir = 0; |
| 56 |
int error_log_redir = 0; |
int error_log_redir = 0; |
| 57 |
FILE *fp; |
FILE *fp; |
| 58 |
|
int ret; |
| 59 |
|
int last_aid; |
| 60 |
|
|
| 61 |
// Parse args |
// Parse args |
| 62 |
for (int i = 1; i < argc; i++) |
for (int i = 1; i < argc; i++) |
| 225 |
} |
} |
| 226 |
|
|
| 227 |
set_last_article_op_log_from_db(); |
set_last_article_op_log_from_db(); |
| 228 |
|
last_aid = 0; |
| 229 |
|
|
| 230 |
// Load section articles |
// Load section articles |
| 231 |
if (append_articles_from_db(0, 1) < 0) |
do |
| 232 |
{ |
{ |
| 233 |
log_error("append_articles_from_db(0, 1) error\n"); |
if ((ret = append_articles_from_db(last_aid + 1, 1, LOAD_ARTICLE_COUNT_LIMIT)) < 0) |
| 234 |
goto cleanup; |
{ |
| 235 |
} |
log_error("append_articles_from_db(0, 1, %d) error\n", LOAD_ARTICLE_COUNT_LIMIT); |
| 236 |
|
goto cleanup; |
| 237 |
|
} |
| 238 |
|
|
| 239 |
|
last_aid = article_block_last_aid(); |
| 240 |
|
} while (ret == LOAD_ARTICLE_COUNT_LIMIT); |
| 241 |
|
|
| 242 |
log_std("Initially load %d articles, last_aid = %d\n", article_block_article_count(), article_block_last_aid()); |
log_std("Initially load %d articles, last_aid = %d\n", article_block_article_count(), article_block_last_aid()); |
| 243 |
|
|