mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 02:25:40 +08:00
Few bugfixes
This commit is contained in:
parent
062d60e9d6
commit
99a744abda
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user