- we have to fiddle them through the SpoolControl structure into the ForeachMessage() loop.
char *misc;
FILE *digestfp;
int num_msgs_spooled;
char *misc;
FILE *digestfp;
int num_msgs_spooled;
+
+ char *working_ignetcfg;
+ NetMap *the_netmap;
-void network_spoolout_room(char *room_to_spool);
+void network_spoolout_room(char *room_to_spool,
+ char *working_ignetcfg,
+ NetMap *the_netmap);
void network_do_spoolin(char *working_ignetcfg, NetMap *the_netmap, int *netmap_changed);
void network_consolidate_spoolout(char *working_ignetcfg, NetMap *the_netmap);
void free_spoolcontrol_struct(SpoolControl **scc);
void network_do_spoolin(char *working_ignetcfg, NetMap *the_netmap, int *netmap_changed);
void network_consolidate_spoolout(char *working_ignetcfg, NetMap *the_netmap);
void free_spoolcontrol_struct(SpoolControl **scc);
#include "context.h"
#include "netconfig.h"
#include "netspool.h"
#include "context.h"
#include "netconfig.h"
#include "netspool.h"
* Spools out one message from the list.
*/
void network_spool_msg(long msgnum,
* Spools out one message from the list.
*/
void network_spool_msg(long msgnum,
- void *userdata,
- char *working_ignetcfg,
- NetMap *the_netmap)
{
SpoolControl *sc;
int i;
{
SpoolControl *sc;
int i;
if (is_valid_node(NULL,
NULL,
msg->cm_fields['N'],
if (is_valid_node(NULL,
NULL,
msg->cm_fields['N'],
- working_ignetcfg,
- the_netmap) == 0)
+ sc->working_ignetcfg,
+ sc->the_netmap) == 0)
{
ok_to_participate = 1;
}
{
ok_to_participate = 1;
}
if (is_valid_node(NULL,
NULL,
mptr->remote_nodename,
if (is_valid_node(NULL,
NULL,
mptr->remote_nodename,
- working_ignetcfg,
- the_netmap) != 0)
+ sc->working_ignetcfg,
+ sc->the_netmap) != 0)
{
syslog(LOG_ERR, "Invalid node <%s>\n", mptr->remote_nodename);
send = 0;
{
syslog(LOG_ERR, "Invalid node <%s>\n", mptr->remote_nodename);
send = 0;
/*
* Batch up and send all outbound traffic from the current room
*/
/*
* Batch up and send all outbound traffic from the current room
*/
-void network_spoolout_room(char *room_to_spool) {
+void network_spoolout_room(char *room_to_spool,
+ char *working_ignetcfg,
+ NetMap *the_netmap)
+{
char buf[SIZ];
char filename[PATH_MAX];
SpoolControl *sc;
char buf[SIZ];
char filename[PATH_MAX];
SpoolControl *sc;
}
syslog(LOG_INFO, "Networking started for <%s>\n", CC->room.QRname);
}
syslog(LOG_INFO, "Networking started for <%s>\n", CC->room.QRname);
+ sc->working_ignetcfg = working_ignetcfg;
+ sc->the_netmap = the_netmap;
+
/* If there are digest recipients, we have to build a digest */
if (sc->digestrecps != NULL) {
sc->digestfp = tmpfile();
/* If there are digest recipients, we have to build a digest */
if (sc->digestrecps != NULL) {
sc->digestfp = tmpfile();
end_critical_section(S_RPLIST);
if (spoolroomname[0] != 0) {
end_critical_section(S_RPLIST);
if (spoolroomname[0] != 0) {
- network_spoolout_room(spoolroomname);
+ network_spoolout_room(spoolroomname,
+ working_ignetcfg,
+ the_netmap);