Removing of static vars in the Networker
[citadel.git] / citadel / modules / network / serv_netmail.c
index 6b7494bb7ea991be1e8a94a8d3e3362ba56642b1..e46a1dfde1c061f70753489f9709574f1b690ed9 100644 (file)
@@ -88,6 +88,8 @@
 
 #include "context.h"
 #include "netconfig.h"
+#include "netspool.h"
+#include "netmail.h"
 #include "ctdl_module.h"
 
 
@@ -255,7 +257,9 @@ void network_deliver_list(struct CtdlMessage *msg, SpoolControl *sc) {
 /*
  * 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;
@@ -427,7 +431,12 @@ void network_spool_msg(long msgnum, void *userdata) {
                                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;
                                }
                        }
@@ -509,7 +518,12 @@ void network_spool_msg(long msgnum, void *userdata) {
                        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;
                        }