#include "context.h"
#include "netconfig.h"
#include "netspool.h"
+#include "netmail.h"
#include "ctdl_module.h"
/*
* Spools out one message from the list.
*/
-void network_spool_msg(long msgnum, void *userdata) {
+void network_spool_msg(long msgnum,
+ void *userdata)
+{
SpoolControl *sc;
int i;
char *newpath = NULL;
char *pCh;
StrBuf *Subject, *FlatSubject;
+ if (msg->cm_fields['K'] != NULL)
+ free(msg->cm_fields['K']);
if (msg->cm_fields['V'] == NULL){
/* local message, no enVelope */
StrBuf *Buf;
if (!strcasecmp(msg->cm_fields['N'], config.c_nodename)) {
ok_to_participate = 1;
}
- if (is_valid_node(NULL, NULL, msg->cm_fields['N']) == 0) {
+ if (is_valid_node(NULL,
+ NULL,
+ msg->cm_fields['N'],
+ sc->working_ignetcfg,
+ sc->the_netmap) == 0)
+ {
ok_to_participate = 1;
}
}
*/
for (nptr = sc->participates; nptr != NULL; nptr = nptr->next) {
- if (msg->cm_fields['R'] == NULL) {
+ if (msg->cm_fields['R'] != NULL) {
free(msg->cm_fields['R']);
}
msg->cm_fields['R'] = strdup(nptr->name);
send = 1;
/* Check for valid node name */
- if (is_valid_node(NULL, NULL, mptr->remote_nodename) != 0) {
+ if (is_valid_node(NULL,
+ NULL,
+ mptr->remote_nodename,
+ sc->working_ignetcfg,
+ sc->the_netmap) != 0)
+ {
syslog(LOG_ERR, "Invalid node <%s>\n", mptr->remote_nodename);
send = 0;
}