z3APA3A 11 лет назад
Родитель
Сommit
cb590049b3
1 измененных файлов с 0 добавлено и 32 удалено
  1. 0 32
      src/ftp.c

+ 0 - 32
src/ftp.c

@@ -33,11 +33,7 @@ int ftplogin(struct clientparam *param, char *nbuf, int *innbuf) {
 	if((int)socksend(param->remsock, (unsigned char *)buf, (int)strlen(buf), conf.timeouts[STRING_S]) != (int)strlen(buf)){
 		return 703;
 	}
-#ifndef NOPSTDIN
 	param->statscli64 += (int)strlen(buf);
-#else
-	param->statscli += (int)strlen(buf);
-#endif
 	param->nwrites++;
 	while((i = sockgetlinebuf(param, SERVER, (unsigned char *)buf, len - 1, '\n', conf.timeouts[STRING_L])) > 0 && (i < 3 || !isnumber(*buf) || buf[3] == '-')){
 	}
@@ -54,11 +50,7 @@ int ftplogin(struct clientparam *param, char *nbuf, int *innbuf) {
 		if((int)socksend(param->remsock, (unsigned char *)buf, res, conf.timeouts[STRING_S]) != (int)strlen(buf)){
 			return 705;
 		}
-#ifndef NOPSTDIN
 	param->statscli64 += res;
-#else
-	param->statscli += res;
-#endif
 		param->nwrites++;
 		while((i = sockgetlinebuf(param, SERVER, (unsigned char *)buf, len - 1, '\n', conf.timeouts[STRING_L])) > 0){
 			buf[i] = 0;
@@ -89,11 +81,7 @@ int ftpcd(struct clientparam *param, unsigned char* path, char *nbuf, int *innbu
 	if((int)socksend(param->remsock, (unsigned char *)buf, (int)strlen(buf), conf.timeouts[STRING_S]) != (int)strlen(buf)){
 		return 711;
 	}
-#ifndef NOPSTDIN
 	param->statscli64 += (int)strlen(buf);
-#else
-	param->statscli += (int)strlen(buf);
-#endif
 	param->nwrites++;
 	while((i = sockgetlinebuf(param, SERVER, (unsigned char *)buf, sizeof(buf) - 1, '\n', conf.timeouts[STRING_L])) > 0 && (i < 3 || !isnumber(*buf) || buf[3] == '-')){
 		if(nbuf && innbuf && inbuf + i < *innbuf && i > 6) {
@@ -126,11 +114,7 @@ int ftpsyst(struct clientparam *param, unsigned char *buf, unsigned len){
 	if(socksend(param->remsock, (unsigned char *)"SYST\r\n", 6, conf.timeouts[STRING_S]) != 6){
 		return 721;
 	}
-#ifndef NOPSTDIN
 	param->statscli64 += 6;
-#else
-	param->statscli += 6;
-#endif
 	param->nwrites++;
 	while((i = sockgetlinebuf(param, SERVER, buf, len - 1, '\n', conf.timeouts[STRING_L])) > 0 && (i < 3 || !isnumber(*buf) || buf[3] == '-')){
 	}
@@ -149,11 +133,7 @@ int ftppwd(struct clientparam *param, unsigned char *buf, unsigned len){
 	if(socksend(param->remsock, (unsigned char *)"PWD\r\n", 5, conf.timeouts[STRING_S]) != 5){
 		return 731;
 	}
-#ifndef NOPSTDIN
 	param->statscli64 += 5;
-#else
-	param->statscli += 5;
-#endif
 	param->nwrites++;
 	while((i = sockgetlinebuf(param, SERVER, buf, len - 1, '\n', conf.timeouts[STRING_L])) > 0 && (i < 3 || !isnumber(*buf) || buf[3] == '-')){
 	}
@@ -178,11 +158,7 @@ int ftptype(struct clientparam *param, unsigned char* f_type){
 	if((int)socksend(param->remsock, (unsigned char *)buf, (int)strlen(buf), conf.timeouts[STRING_S]) != (int)strlen(buf)){
 		return 741;
 	}
-#ifndef NOPSTDIN
 	param->statscli64 += (int)strlen(buf);
-#else
-	param->statscli += (int)strlen(buf);
-#endif
 	param->nwrites++;
 	while((i = sockgetlinebuf(param, SERVER, (unsigned char *)buf, sizeof(buf) - 1, '\n', conf.timeouts[STRING_L])) > 0 && (i < 3 || !isnumber(*buf) || buf[3] == '-')){
 	}
@@ -203,11 +179,7 @@ SOCKET ftpdata(struct clientparam *param){
 	if(socksend(param->remsock, (unsigned char *)"PASV\r\n", 6, conf.timeouts[STRING_S]) != 6){
 		return INVALID_SOCKET;
 	}
-#ifndef NOPSTDIN
 	param->statscli64 += 6;
-#else
-	param->statscli += 6;
-#endif
 	param->nwrites++;
 	while((i = sockgetlinebuf(param, SERVER, (unsigned char *)buf, sizeof(buf) - 1, '\n', conf.timeouts[STRING_L])) > 0 && (i < 3 || !isnumber(*buf) || buf[3] == '-')){
 	}
@@ -245,11 +217,7 @@ SOCKET ftpcommand(struct clientparam *param, unsigned char * command, unsigned c
 		so._closesocket(s);
 		return INVALID_SOCKET;
 	}
-#ifndef NOPSTDIN
 	param->statscli64 += (int)strlen(buf);
-#else
-	param->statscli += (int)strlen(buf);
-#endif
 	param->nwrites++;
 	while((i = sockgetlinebuf(param, SERVER, (unsigned char *)buf, sizeof(buf) - 1, '\n', conf.timeouts[STRING_L])) > 0 && (i < 3 || !isnumber(*buf) || buf[3] == '-')){
 	}