strcpy(CC->cs_clientname, "NNTP session");
CC->cs_flags |= CS_STEALTH;
- /* CC->session_specific_data = malloc(sizeof(citnntp));
- memset(NNTP, 0, sizeof(citnntp));
- */
+ CC->session_specific_data = malloc(sizeof(citnntp));
+ citnntp *nntpstate = (citnntp *) CC->session_specific_data;
+ memset(nntpstate, 0, sizeof(citnntp));
if (CC->nologin==1) {
cprintf("451 Too many connections are already open; please try again later.\r\n");
if (CC->h_command_function != nntp_command_loop) return;
syslog(LOG_DEBUG, "Performing NNTP cleanup hook\n");
+ citnntp *nntpstate = (citnntp *) CC->session_specific_data;
+ if (nntpstate != NULL) {
+ free(nntpstate);
+ nntpstate = NULL;
+ }
}
const char *CitadelServiceNNTP="NNTP";
-/*
- * Header file for NNTP server module
- *
- * Copyright (c) 2014 by the citadel.org team
- *
- * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
+//
+// Header file for NNTP server module
+//
+// Copyright (c) 2014 by the citadel.org team
+//
+// This program is open source software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 3.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
// data returned by a message list fetch
};
-/*
- * data passed between nntp_listgroup() and nntp_listgroup_backend()
- */
+//
+// data passed between nntp_listgroup() and nntp_listgroup_backend()
+//
struct listgroup_range {
long lo;
long hi;
};
+
+typedef struct _citnntp { // Information about the current session
+ int foo; // dummy thingo
+} citnntp;
+
int wildmat(const char *text, const char *p);