netspool going beta

master
Sergey Dorofeev 13 years ago
parent b1adc98f2d
commit e258f5b794

@ -176,6 +176,11 @@ s_conf_entry bforce_config[BFORCE_NUMBER_OF_KEYWORDS+1] = {
CONF_KEY(debug_level, CT_DEBLEVEL),
#endif
CONF_KEY(split_inbound, CT_BOOLEAN),
#ifdef NETSPOOL
CONF_KEY(netspool_host, CT_STRING),
CONF_KEY(netspool_port, CT_STRING),
#endif
CONF_END()
};

@ -110,6 +110,7 @@ static int prot_get_next_file(s_filelist **dest, s_protinfo *pi)
char *host = conf_string(cf_netspool_host);
char *port = conf_string(cf_netspool_port);
if(host==NULL) {
log("netspool is not configured");
state.netspool.state = NS_UNCONF;
} else {
snprintf(address, 299, state.node.addr.point? "%d:%d/%d.%d": "%d.%d.%d",
@ -120,6 +121,7 @@ static int prot_get_next_file(s_filelist **dest, s_protinfo *pi)
} else {
password[0] = 0;
}
log("netspool start %s %s %s %s", host, port, address, password);
netspool_start(&state.netspool, host, port, address, password);
}
}
@ -140,7 +142,11 @@ static int prot_get_next_file(s_filelist **dest, s_protinfo *pi)
return 0;
}
if(state.netspool.state==NS_ERROR) {
log("netspool error %s", state.netspool.error);
} else {
log("netspool gives no more files");
}
#endif

Loading…
Cancel
Save