| 488 |
ret = ERR_UNKNOWN_SECTION; |
ret = ERR_UNKNOWN_SECTION; |
| 489 |
break; |
break; |
| 490 |
} |
} |
| 491 |
|
// acquire lock of dest section |
| 492 |
|
if ((ret = section_list_rw_lock(p_section_dest)) < 0) |
| 493 |
|
{ |
| 494 |
|
log_error("section_list_rw_lock(sid = %d) error\n", p_section_dest); |
| 495 |
|
break; |
| 496 |
|
} |
| 497 |
// Move topic |
// Move topic |
| 498 |
if ((ret = section_list_move_topic(p_section, p_section_dest, p_article->aid)) < 0) |
if ((ret = section_list_move_topic(p_section, p_section_dest, p_article->aid)) < 0) |
| 499 |
{ |
{ |
| 500 |
break; |
log_error("section_list_move_topic(src_sid=%d, dest_sid=%d, aid=%d) error (%d), retry in the next loop\n", |
| 501 |
|
p_section->sid, p_section_dest->sid, p_article->aid, ret); |
| 502 |
|
} |
| 503 |
|
// release lock of dest section |
| 504 |
|
if (section_list_rw_unlock(p_section_dest) < 0) |
| 505 |
|
{ |
| 506 |
|
log_error("section_list_rw_unlock(sid = %d) error\n", p_section_dest); |
| 507 |
|
ret = -1; |
| 508 |
} |
} |
| 509 |
} |
} |
| 510 |
break; |
break; |