current article number variable is now in place
authorArt Cancro <ajc@uncensored.citadel.org>
Sat, 15 Feb 2014 22:56:17 +0000 (17:56 -0500)
committerArt Cancro <ajc@uncensored.citadel.org>
Sat, 15 Feb 2014 22:56:17 +0000 (17:56 -0500)
citadel/modules/nntp/serv_nntp.c
citadel/modules/nntp/serv_nntp.h

index 1978c269ad85146ec9289551ecfe7b6dde4fa51d..28edae8e642c9eb827c982e4866e364843c48c3a 100644 (file)
@@ -586,6 +586,7 @@ void nntp_group(const char *cmd) {
        //
        if (CtdlAccessCheck(ac_logged_in_or_guest)) return;
 
+       citnntp *nntpstate = (citnntp *) CC->session_specific_data;
        char verb[16];
        char requested_group[1024];
        char message_range[256];
@@ -653,8 +654,9 @@ void nntp_group(const char *cmd) {
        CtdlUserGoto(NULL, 0, 0, &msgs, &new, &oldest, &newest);
        cprintf("211 %d %ld %ld %s\r\n", msgs, oldest, newest, requested_group);
 
-       // If this is a GROUP command, we can stop here.
+       // If this is a GROUP command, set the "current article number" to zero, and then stop here.
        if (!strcasecmp(verb, "GROUP")) {
+               nntpstate->current_article_number = 0;
                return;
        }
 
index e7aed6e1d3ae430f44263f1f2f9c3a69d19c182f..686416b2015ae4db59eb587b53ab2e1bb06feba5 100644 (file)
@@ -38,7 +38,7 @@ struct listgroup_range {
 
 
 typedef struct _citnntp {              // Information about the current session
-       int foo;                        // dummy thingo
+       long current_article_number;
 } citnntp;
 
 int wildmat(const char *text, const char *p);