Flags renamed to incnet_flag and incarc_flag, fixed typos, READMEs and CHANGES files

This commit is contained in:
zx
2024-05-12 18:47:07 +03:00
parent f80d94413f
commit 132a6641f4
13 changed files with 239 additions and 194 deletions
+2 -2
View File
@@ -96,8 +96,8 @@ s_conf_entry bforce_config[BFORCE_NUMBER_OF_KEYWORDS+1] = {
CONF_KEY(freq_limit_time, CT_NUMBER),
CONF_KEY(freq_min_speed, CT_NUMBER),
CONF_KEY(freq_srif_command, CT_STRING),
CONF_KEY(incpkt_flag, CT_STRING),
CONF_KEY(incbdl_flag, CT_STRING),
CONF_KEY(incnet_flag, CT_STRING),
CONF_KEY(incarc_flag, CT_STRING),
CONF_KEY(hide_our_aka, CT_ADDRESS),
CONF_KEY(history_file, CT_STRING),
CONF_KEY(hydra_options, CT_OPTIONS),
+33
View File
@@ -695,6 +695,7 @@ int session(void)
s_traffic traff_send;
s_traffic traff_recv;
char *p;
int fd = -1;
memset(&traff_send, '\0', sizeof(s_traffic));
memset(&traff_recv, '\0', sizeof(s_traffic));
@@ -890,6 +891,38 @@ int session(void)
*/
p_log_txrxstat(&pi);
/*
* Raise flags if session incoming traffic was not empty
*/
if ( (p = conf_string(cf_incnet_flag)) )
if (state.traff_recv.netmail_size > 0) {
DEB((D_EVENT, "Incoming netmail > 0, raising flag"));
log("Raising flag for netmail in %s", p);
fd = open(p, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP );
if (fd == -1) {
DEB((D_EVENT, "Error raising netmail flag"));
log("Error creating flag for netmail in %s", p);
} else {
/* all ok - closing file */
close(fd);
}
}
if ( (p = conf_string(cf_incarc_flag)) )
if (state.traff_recv.arcmail_size > 0) {
DEB((D_EVENT, "Incoming arcmail > 0, raising flag"));
log("Raising flag for arcmail in %s", p);
fd = open(p, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
if (fd == -1) {
DEB((D_EVENT, "Error raising arcmail flag"));
log("Error creating flag for arcmail in %s", p);
} else {
/* all ok - closing file */
close(fd);
}
}
/*
* Save session traffic before deiniting
*/