X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Froom_ops.c;fp=citadel%2Froom_ops.c;h=729846d3eb0e12010935922a1cc2ad3e67a66e5b;hp=98c2acc20a936afdce6b1da6dc870bd08d50d289;hb=60f03c2407f834ba677dfac9fe545db255ac8263;hpb=fc6cb49257a19bff1336d735a075f78fae2f4728 diff --git a/citadel/room_ops.c b/citadel/room_ops.c index 98c2acc20..729846d3e 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -776,13 +776,15 @@ int CtdlIsNonEditable(struct ctdlroom *qrbuf) * specified room exists and is ok to access. */ void CtdlUserGoto(char *where, int display_result, int transiently, - int *retmsgs, int *retnew) + int *retmsgs, int *retnew, long *retoldest, long *retnewest) { struct CitContext *CCC = CC; int a; int new_messages = 0; int old_messages = 0; int total_messages = 0; + long oldest_message = 0; + long newest_message = 0; int info = 0; int rmailflag; int raideflag; @@ -850,6 +852,11 @@ void CtdlUserGoto(char *where, int display_result, int transiently, if (msglist[a] > 0L) ++total_messages; } + if (total_messages > 0) { + oldest_message = msglist[0]; + newest_message = msglist[num_msgs - 1]; + } + num_sets = num_tokens(vbuf.v_seen, ','); for (s=0; s %d new of %d total messages\n", - CCC->room.QRname, - new_messages, total_messages - ); + if (retoldest != NULL) *retoldest = oldest_message; + if (retnewest != NULL) *retnewest = newest_message; + MSG_syslog(LOG_INFO, "<%s> %d new of %d total messages, oldest=%ld, newest=%ld\n", + CCC->room.QRname, new_messages, total_messages, oldest_message, newest_message + ); CCC->curr_view = (int)vbuf.v_view;