Compare commits
No commits in common. "bcf0d456eecc0e31f0dd576e24331e8e23e8ec16" and "30e860885f65a64ded3afce1e940efd863ef8508" have entirely different histories.
bcf0d456ee
...
30e860885f
23
README.md
23
README.md
@ -25,18 +25,13 @@ New Versions
|
||||
------------
|
||||
|
||||
https://prj.zxalexis.ru/gitea/zx/bforce
|
||||
|
||||
|
||||
Older Sources
|
||||
-------------
|
||||
https://github.com/zotrix/binkleyforce/
|
||||
https://sourceforge.net/projects/binkforce/
|
||||
|
||||
Copyright <br>
|
||||
> (c) 1998-2000 Alexander Belkin, Moscow, Russia.<br>
|
||||
> (c) 2004-2007 Evgeniy Kozhuhovskiy 2:450/256, 2:450/267<br>
|
||||
> (c) 2005 Andrey Slusar<br>
|
||||
> (c) 2006-2016 Max N. Boyarov<br>
|
||||
> (c) 2007-2008 Sergey Babitch<br>
|
||||
> (c) 2011-2014 Sergey Dorofeev<br>
|
||||
> (c) 2014 Alexander Skovpen<br>
|
||||
> (c) 2024 Alexey Khromov<br>
|
||||
Copyright (c) 1998-2000 Alexander Belkin, Moscow, Russia.
|
||||
(c) 2004-2007 Evgeniy Kozhuhovskiy 2:450/256, 2:450/267
|
||||
(c) 2005 Andrey Slusar
|
||||
(c) 2006-2016 Max N. Boyarov
|
||||
(c) 2007-2008 Sergey Babitch
|
||||
(c) 2011-2014 Sergey Dorofeev
|
||||
(c) 2014 Alexander Skovpen
|
||||
(c) 2024 Alexey Khromov
|
||||
|
@ -146,7 +146,6 @@ clean:
|
||||
rm -f ./bin/core
|
||||
clean-am:
|
||||
rm -f ./Makefile
|
||||
rm -f ../debian/Makefile
|
||||
rm -f ./include/config.h
|
||||
rm -f ./config.log
|
||||
rm -f ./config.status
|
||||
|
@ -453,7 +453,7 @@ int main(int argc, char *argv[], char *envp[])
|
||||
/* Reopen log file if it was defined in config */
|
||||
if( log_reopen(log_getfilename(LOG_FILE_SESSION), NULL, NULL) )
|
||||
{
|
||||
DEB((D_CONFIG, "can't continue without logging"));
|
||||
log("can't continue without logging");
|
||||
gotoexit(BFERR_FATALERROR);
|
||||
}
|
||||
|
||||
|
@ -755,7 +755,6 @@ int daemon_pidfile(int cmd)
|
||||
pid_t hispid, mypid = getpid();
|
||||
FILE *pf;
|
||||
struct stat sb;
|
||||
int res;
|
||||
|
||||
if( !pidfile )
|
||||
return 0;
|
||||
@ -769,12 +768,7 @@ int daemon_pidfile(int cmd)
|
||||
return -1;
|
||||
}
|
||||
|
||||
res = fscanf(pf, "%d", &hispid);
|
||||
if (res != 1) {
|
||||
log("daemon pidfile: not readable");
|
||||
return -1;
|
||||
}
|
||||
|
||||
fscanf(pf, "%d", &hispid);
|
||||
fclose(pf);
|
||||
|
||||
if( hispid ) {
|
||||
@ -813,12 +807,7 @@ int daemon_pidfile(int cmd)
|
||||
return -1;
|
||||
}
|
||||
|
||||
res = fscanf(pf, "%d", &hispid);
|
||||
if (res != 1) {
|
||||
log("daemon pidfile: not readable");
|
||||
return -1;
|
||||
}
|
||||
|
||||
fscanf(pf, "%d", &hispid);
|
||||
fclose(pf);
|
||||
|
||||
if( !hispid || (hispid == mypid) ) {
|
||||
@ -842,12 +831,7 @@ int daemon_pidfile(int cmd)
|
||||
return -1;
|
||||
}
|
||||
|
||||
res = fscanf(pf, "%d", &hispid);
|
||||
if (res != 1) {
|
||||
log("daemon pidfile: not readable");
|
||||
return -1;
|
||||
}
|
||||
|
||||
fscanf(pf, "%d", &hispid);
|
||||
fclose(pf);
|
||||
unlink(pidfile);
|
||||
|
||||
|
@ -311,7 +311,6 @@ int session_set_inbound(void)
|
||||
{
|
||||
struct stat st;
|
||||
char *p_inb;
|
||||
int res;
|
||||
|
||||
p_inb = conf_string(cf_inbound_directory);
|
||||
if( !p_inb ) {
|
||||
@ -343,11 +342,7 @@ int session_set_inbound(void)
|
||||
log("inbound: %s", buf);
|
||||
state.inbound = (char*)xstrcpy(buf);
|
||||
snprintf( buf, PATH_MAX+30, "/bin/mkdir -p -m 700 %s", state.inbound ); /* 30 additional chars allowed */
|
||||
res = system( buf );
|
||||
if (res != 0) {
|
||||
log("Inbound create error: %d", res);
|
||||
return -1;
|
||||
}
|
||||
system( buf );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -70,14 +70,12 @@ static char *session_stat_get_stsfile(s_faddr *addr, int linenum)
|
||||
|
||||
static int session_stat_read_stsfile(FILE *fp, s_sess_stat *stat)
|
||||
{
|
||||
int res;
|
||||
|
||||
if( fseek(fp, 0, SEEK_SET) == -1 )
|
||||
return -1;
|
||||
|
||||
memset(stat, '\0', sizeof(s_sess_stat));
|
||||
|
||||
res = fscanf(fp, "%u %u %u %u %u %u %lu %lu %lu %lu",
|
||||
fscanf(fp, "%u %u %u %u %u %u %lu %lu %lu %lu",
|
||||
(unsigned int *) &stat->tries,
|
||||
(unsigned int *) &stat->tries_noconn,
|
||||
(unsigned int *) &stat->tries_noansw,
|
||||
@ -88,10 +86,7 @@ static int session_stat_read_stsfile(FILE *fp, s_sess_stat *stat)
|
||||
(unsigned long *) &stat->hold_freqs,
|
||||
(unsigned long *) &stat->last_success_out,
|
||||
(unsigned long *) &stat->last_success_in);
|
||||
if (res == 0) {
|
||||
log("Read STS unsuccessfull...");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Set last successfull session time */
|
||||
stat->last_success = MAX(stat->last_success_out, stat->last_success_in);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user