Просмотр исходного кода

Changed -a / -s options handling for 'anonymous' after last commit

z3apa3a 9 лет назад
Родитель
Сommit
1ab549036c
5 измененных файлов с 10 добавлено и 6 удалено
  1. 2 1
      src/common.c
  2. 0 1
      src/conf.c
  3. 1 1
      src/proxy.c
  4. 3 1
      src/proxymain.c
  5. 4 2
      src/structures.h

+ 2 - 1
src/common.c

@@ -73,7 +73,8 @@ struct extparam conf = {
 #else
 	0,
 #endif
-	0, -1, 0, 0, 0, 0, 0, 500, 0, 0, 0, 0, 0,
+	0, -1, 0, 0, 0, 0, 
+	0, 500, 0, 0, 0, 0,
 	6, 600,
 	1048576,
 	NULL, NULL,

+ 0 - 1
src/conf.c

@@ -1642,7 +1642,6 @@ void freeconf(struct extparam *confp){
 #endif
  *SAFAMILY(&confp->intsa) = AF_INET;
  *SAFAMILY(&confp->extsa) = AF_INET;
- confp->singlepacket = 0;
  confp->maxchild = 100;
  resolvfunc = NULL;
  numservers = 0;

+ 1 - 1
src/proxy.c

@@ -240,7 +240,7 @@ void * proxychild(struct clientparam* param) {
  
  if(!(buf = myalloc(BUFSIZE))) {RETURN(21);}
  bufsize = BUFSIZE;
- anonymous = param->srv->singlepacket;
+ anonymous = param->srv->anonymous;
 for(;;){
  memset(buf, 0, bufsize);
  inbuf = 0;

+ 3 - 1
src/proxymain.c

@@ -304,8 +304,10 @@ int MODULEMAINFUNC (int argc, char** argv){
 		 case 'S':
 			srv.stacksize = atoi(argv[i]+2);
 			break;
-		case 's':
 		case 'a':
+			srv.anonymous = 1 + atoi(argv[i]+2);
+			break;
+		case 's':
 			if(isudp)
 				srv.singlepacket = 1 + atoi(argv[i]+2);
 			else

+ 4 - 2
src/structures.h

@@ -388,6 +388,7 @@ struct srvparam {
 	int family;
 	int stacksize;
 	int noforce;
+	int anonymous;
 #ifdef WITHSPLICE
 	int usesplice;
 #endif
@@ -513,8 +514,9 @@ struct extparam {
 	struct bandlim * bandlimiter,  *bandlimiterout;
 	struct trafcount * trafcounter;
 	struct srvparam *services;
-	int stacksize, threadinit, counterd, haveerror, rotate, paused, archiverc,
-		demon, maxchild, singlepacket, needreload, timetoexit, version, noforce;
+	int stacksize,
+		threadinit, counterd, haveerror, rotate, paused, archiverc,
+		demon, maxchild, needreload, timetoexit, version, noforce;
 	int authcachetype, authcachetime;
 	int filtermaxsize;
 	unsigned char *logname, **archiver;