| 67 |
|
|
| 68 |
if (p_user_info == NULL) |
if (p_user_info == NULL) |
| 69 |
{ |
{ |
| 70 |
log_error("NULL pointer error\n"); |
log_error("NULL pointer error"); |
| 71 |
return -1; |
return -1; |
| 72 |
} |
} |
| 73 |
|
|
| 111 |
ret = query_user_online_info_by_uid(p_user_info->uid, sessions, &session_cnt, 0); |
ret = query_user_online_info_by_uid(p_user_info->uid, sessions, &session_cnt, 0); |
| 112 |
if (ret < 0) |
if (ret < 0) |
| 113 |
{ |
{ |
| 114 |
log_error("query_user_online_info_by_uid(uid=%d, cnt=%d) error: %d\n", |
log_error("query_user_online_info_by_uid(uid=%d, cnt=%d) error: %d", |
| 115 |
p_user_info->uid, session_cnt, ret); |
p_user_info->uid, session_cnt, ret); |
| 116 |
session_cnt = 0; |
session_cnt = 0; |
| 117 |
} |
} |
| 125 |
|
|
| 126 |
if (p + strlen(p_action_title) + 4 >= action_str + sizeof(action_str)) // buffer overflow |
if (p + strlen(p_action_title) + 4 >= action_str + sizeof(action_str)) // buffer overflow |
| 127 |
{ |
{ |
| 128 |
log_error("action_str of user(uid=%d) truncated at i=%d\n", p_user_info->uid, i); |
log_error("action_str of user(uid=%d) truncated at i=%d", p_user_info->uid, i); |
| 129 |
break; |
break; |
| 130 |
} |
} |
| 131 |
*p++ = '['; |
*p++ = '['; |
| 179 |
(intro_len > 0 ? "\033[0;36m个人说明档如下: \033[m" : "\033[0;36m没有个人说明档\033[m"), |
(intro_len > 0 ? "\033[0;36m个人说明档如下: \033[m" : "\033[0;36m没有个人说明档\033[m"), |
| 180 |
intro_f); |
intro_f); |
| 181 |
|
|
| 182 |
lines = split_data_lines(user_info_f, SCREEN_COLS + 1, line_offsets, MIN(SCREEN_ROWS - 1, BBS_user_intro_max_line + 8), 1, NULL); |
lines = split_data_lines(user_info_f, SCREEN_COLS + 1, line_offsets, MIN(SCREEN_ROWS - 1, BBS_user_intro_max_line + 9), 1, NULL); |
| 183 |
|
|
| 184 |
clearscr(); |
clearscr(); |
| 185 |
display_data(user_info_f, lines, line_offsets, 1, display_user_info_key_handler, DATA_READ_HELP); |
display_data(user_info_f, lines, line_offsets, 1, display_user_info_key_handler, DATA_READ_HELP); |