added exec feature, see changelog for details
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
0.22.8.ugenk4
|
||||
0.22.8.ugenk5
|
||||
|
||||
@@ -149,6 +149,7 @@ s_conf_entry bforce_config[BFORCE_NUMBER_OF_KEYWORDS+1] = {
|
||||
CONF_KEY(rescan_delay, CT_NUMBER),
|
||||
CONF_KEY(run_after_handshake, CT_STRING),
|
||||
CONF_KEY(run_after_session, CT_STRING),
|
||||
CONF_KEY(run_before_session, CT_STRING),
|
||||
CONF_KEY(session_limit_in, CT_NUMBER),
|
||||
CONF_KEY(session_limit_out, CT_NUMBER),
|
||||
CONF_KEY(skip_files_recv, CT_STRING),
|
||||
|
||||
@@ -177,7 +177,7 @@ int tcpip_init(void)
|
||||
tty_abort = FALSE;
|
||||
tty_hangup = FALSE;
|
||||
tty_modem = FALSE;
|
||||
|
||||
|
||||
/*
|
||||
* Set sockets I/O to the non-blocking mode
|
||||
*/
|
||||
|
||||
@@ -196,6 +196,19 @@ int call_system_quiet(const char *connstr, bool inet)
|
||||
int rc = 0;
|
||||
char *p;
|
||||
|
||||
|
||||
char *exec_cmd;
|
||||
int exec_result;
|
||||
|
||||
if( (exec_cmd = conf_string(cf_run_before_session)) != NULL )
|
||||
{
|
||||
exec_result = system(exec_cmd);
|
||||
if( exec_result = 0 )
|
||||
log("external application %s executed with zero return code (%i)", exec_cmd, exec_result);
|
||||
else
|
||||
logerr("external application %s executed with non-zero return code %i", exec_cmd, exec_result);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set verbal line name
|
||||
*/
|
||||
|
||||
@@ -243,6 +243,7 @@ typedef enum {
|
||||
cf_rescan_delay,
|
||||
cf_run_after_handshake,
|
||||
cf_run_after_session,
|
||||
cf_run_before_session,
|
||||
cf_session_limit_in,
|
||||
cf_session_limit_out,
|
||||
cf_skip_files_recv,
|
||||
|
||||
Reference in New Issue
Block a user