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), CONF_KEY(debug_level, CT_DEBLEVEL),
#endif #endif
CONF_KEY(split_inbound, CT_BOOLEAN), CONF_KEY(split_inbound, CT_BOOLEAN),
#ifdef NETSPOOL
CONF_KEY(netspool_host, CT_STRING),
CONF_KEY(netspool_port, CT_STRING),
#endif
CONF_END() 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 *host = conf_string(cf_netspool_host);
char *port = conf_string(cf_netspool_port); char *port = conf_string(cf_netspool_port);
if(host==NULL) { if(host==NULL) {
log("netspool is not configured");
state.netspool.state = NS_UNCONF; state.netspool.state = NS_UNCONF;
} else { } else {
snprintf(address, 299, state.node.addr.point? "%d:%d/%d.%d": "%d.%d.%d", 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 { } else {
password[0] = 0; password[0] = 0;
} }
log("netspool start %s %s %s %s", host, port, address, password);
netspool_start(&state.netspool, 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; return 0;
} }
if(state.netspool.state==NS_ERROR) {
log("netspool error %s", state.netspool.error);
} else {
log("netspool gives no more files"); log("netspool gives no more files");
}
#endif #endif

Loading…
Cancel
Save