netspool going beta

master
Sergey Dorofeev 13 years ago
parent b1adc98f2d
commit e258f5b794

@ -163,19 +163,24 @@ s_conf_entry bforce_config[BFORCE_NUMBER_OF_KEYWORDS+1] = {
CONF_KEY(zmodem_mincps_send, CT_CONNLIST),
CONF_KEY(zmodem_send_dummy_pkt, CT_BOOLEAN),
CONF_KEY(zmodem_skip_by_pos, CT_BOOLEAN),
CONF_KEY(zmodem_start_block_size, CT_NUMBER),
CONF_KEY(zmodem_tx_window, CT_NUMBER),
CONF_KEY(nomail_flag, CT_STRING),
CONF_KEY(bind_ip, CT_STRING),
CONF_KEY(recieved_to_lower, CT_BOOLEAN),
CONF_KEY(zmodem_start_block_size, CT_NUMBER),
CONF_KEY(zmodem_tx_window, CT_NUMBER),
CONF_KEY(nomail_flag, CT_STRING),
CONF_KEY(bind_ip, CT_STRING),
CONF_KEY(recieved_to_lower, CT_BOOLEAN),
#ifdef USE_SYSLOG
CONF_KEY(syslog_facility, CT_NUMBER),
CONF_KEY(syslog_facility, CT_NUMBER),
#endif
#ifdef DEBUG
CONF_KEY(debug_file, CT_STRING),
CONF_KEY(debug_level, CT_DEBLEVEL),
CONF_KEY(debug_file, CT_STRING),
CONF_KEY(debug_level, CT_DEBLEVEL),
#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()
};

@ -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;
}
log("netspool gives no more files");
if(state.netspool.state==NS_ERROR) {
log("netspool error %s", state.netspool.error);
} else {
log("netspool gives no more files");
}
#endif

Loading…
Cancel
Save