]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/modules/nntp/serv_nntp.c
Grammar change in the license declaration.
[citadel.git] / citadel / server / modules / nntp / serv_nntp.c
index 9ea78f11a1e417ccfc15392ecabdb13b546a6f21..4c581db632432c11313da844022969afb446807d 100644 (file)
@@ -3,7 +3,7 @@
 // Copyright (c) 2014-2023 by the citadel.org team
 //
 // This program is open source software.  Use, duplication, or disclosure
-// are subject to the terms of the GNU General Public License version 3.
+// is subject to the terms of the GNU General Public License version 3.
 
 #include "../../sysdep.h"
 #include <stdlib.h>
@@ -288,18 +288,7 @@ struct nntp_msglist nntp_fetch_msglist(struct ctdlroom *qrbuf) {
        struct nntp_msglist nm;
        struct cdbdata *cdbfr;
 
-       cdbfr = cdb_fetch(CDB_MSGLISTS, &qrbuf->QRnumber, sizeof(long));
-       if (cdbfr != NULL) {
-               nm.msgnums = (long*)cdbfr->ptr;
-               cdbfr->ptr = NULL;                      // (this needs attention if we move to LMDB)
-               nm.num_msgs = cdbfr->len / sizeof(long);
-               cdbfr->len = 0;
-               cdb_free(cdbfr);
-       }
-       else {
-               nm.num_msgs = 0;
-               nm.msgnums = NULL;
-       }
+       nm.num_msgs = CtdlFetchMsgList(qrbuf->QRnumber, &nm.msgnums);
        return(nm);
 }
 
@@ -392,9 +381,9 @@ void nntp_newgroups(const char *cmd) {
        if (!strcasecmp(stringy_gmt, "GMT")) {
                tzset();
 #ifdef __FreeBSD__
-               thetime += &tm.tm_gmtoff;
+               thetime += (time_t) &tm.tm_gmtoff;
 #else
-               thetime += timezone;
+               thetime += (time_t) timezone;
 #endif
        }