vairous fixes
This commit is contained in:
parent
714abb5bec
commit
4b19ee0a54
2
www.c
2
www.c
@ -404,6 +404,8 @@ int www_handler(void * cls, struct MHD_Connection * connection, const char * url
|
||||
*ptr = con_inf;
|
||||
return MHD_YES;
|
||||
}
|
||||
} else {
|
||||
return MHD_NO;
|
||||
}
|
||||
|
||||
con_inf = *ptr;
|
||||
|
@ -46,7 +46,7 @@ static int new_messages(struct user_record *user, int conference, int area) {
|
||||
msghs = read_message_headers(conference, area, user);
|
||||
if (msghs != NULL) {
|
||||
if (msghs->msg_count > 0) {
|
||||
if (msghs->msgs[msghs->msg_count-1]->msg_no > jlr.HighReadMsg) {
|
||||
if (msghs->msgs[msghs->msg_count-1]->msg_h->MsgNum > jlr.HighReadMsg) {
|
||||
count = msghs->msgs[msghs->msg_count-1]->msg_h->MsgNum - jlr.HighReadMsg;
|
||||
}
|
||||
}
|
||||
@ -227,14 +227,13 @@ char *www_msgs_messagelist(struct user_record *user, int conference, int area, i
|
||||
|
||||
if (skip + 50 <= mhrs->msg_count) {
|
||||
sprintf(buffer, "<div class=\"msg-summary-next\"><a href=\"/msgs/%d/%d/?skip=%d\">Next</a></div>\n", conference, area, skip + 50);
|
||||
}
|
||||
|
||||
if (len + strlen(buffer) > max_len - 1) {
|
||||
max_len += 4096;
|
||||
page = (char *)realloc(page, max_len);
|
||||
}
|
||||
strcat(page, buffer);
|
||||
len += strlen(buffer);
|
||||
}
|
||||
free_message_headers(mhrs);
|
||||
return page;
|
||||
}
|
||||
|
Reference in New Issue
Block a user