Few bugfixes

This commit is contained in:
z3APA3A 2020-11-18 16:10:07 +03:00
parent 062d60e9d6
commit 99a744abda
4 changed files with 6 additions and 7 deletions

View File

@ -509,7 +509,7 @@ static void initbandlims (struct clientparam *param){
param->bandlimfunc = NULL;
param->bandlims[0] = NULL;
param->bandlimsout[0] = NULL;
if(!param->bandlimfunc || (!conf.bandlimiter && !conf.bandlimiterout)) return;
if(!conf.bandlimfunc || (!conf.bandlimiter && !conf.bandlimiterout)) return;
for(i=0, be = conf.bandlimiter; be && i<MAXBANDLIMS; be = be->next) {
if(ACLmatches(be->ace, param)){
if(be->ace->action == NOBANDLIM) {

View File

@ -1335,12 +1335,12 @@ static int h_radius(int argc, unsigned char **argv){
strcpy(radiussecret, argv[1]);
for( nradservers=0; nradservers < MAXRADIUS && nradservers < argc -2; nradservers++){
char *s = 0;
if(strchr(argv[nradservers + 2], '/')){
if((s=strchr(argv[nradservers + 2], '/'))){
*s = 0;
s++;
}
if( !getip46(46, argv[nradservers + 2], (struct sockaddr *)&radiuslist[nradservers].authaddr)) return 1;
if( s && !getip46(46, s, (struct sockaddr *)&radiuslist[nradservers].localaddr)) return 2;
if( s && !getip46(46, s+1, (struct sockaddr *)&radiuslist[nradservers].localaddr)) return 2;
if(!*SAPORT(&radiuslist[nradservers].authaddr))*SAPORT(&radiuslist[nradservers].authaddr) = htons(1812);
port = ntohs(*SAPORT(&radiuslist[nradservers].authaddr));
radiuslist[nradservers].logaddr = radiuslist[nradservers].authaddr;

View File

@ -577,7 +577,7 @@ static int WINAPI fp_sendto(SOCKET s, const void *msg, int len, int flags, const
case GOT_FTP_CLIDATA:
case GOT_FTP_SRVDATA:
case GOT_HTTP_CLIDATA:
if((!fps->what & FP_CLIDATA)) break;
if(!(fps->what & FP_CLIDATA)) break;
#ifdef _WIN32
if(SetFilePointer(fps->fpd.h_cli, fps->clientwritten + fps->clihdrwritten, 0, FILE_BEGIN) != (fps->clientwritten + fps->clihdrwritten)){
return -1;

View File

@ -351,7 +351,7 @@ static struct commands pcre_commandhandlers[] = {
static struct symbol regexp_symbols[] = {
{regexp_symbols+1, "pcre_compile", (void*) pcre_compile},
{regexp_symbols+2, "pcre_exec", (void*) pcre_exec},
{NULL, "pcre_free", NULL},
{NULL, "pcre_config", (void *)pcre_config},
};
#ifdef WATCOM
@ -371,8 +371,7 @@ PLUGINAPI int PLUGINCALL pcre_plugin (struct pluginlink * pluginlink,
pcre_free = pl->freefunc;
pcre_loaded = 1;
pthread_mutex_init(&pcre_mutex, NULL);
regexp_symbols[6].value = pl->freefunc;
regexp_symbols[6].next = pl->symbols.next;
regexp_symbols[2].next = pl->symbols.next;
pl->symbols.next = regexp_symbols;
pcre_commandhandlers[3].next = pl->commandhandlers->next;
pl->commandhandlers->next = pcre_commandhandlers;