mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Fix deadcode / warnings / minor bugs
This commit is contained in:
1 parent
44c47ee7d9
commit
4877b39f2c
24 files changed
+49
-145
No files matched your search
-14
@@ -19,20 +19,6 @@ unsigned size16(unsigned char *buf){
|
||||
return res;
|
||||
}
|
||||
|
||||
int readtls(struct clientparam *param, int direction, unsigned char *buf, int bufsize){
|
||||
int res = 0;
|
||||
int len;
|
||||
|
||||
if(bufsize < 3) return -1;
|
||||
res = sockgetlinebuf(param, direction, buf, 3, EOF, conf.timeouts[STRING_S]);
|
||||
if(res !=3 || buf[0] != 22 || buf[1] != 3) return -2;
|
||||
len = size16(buf+3);
|
||||
if((len+3) > bufsize) return -3;
|
||||
res = sockgetlinebuf(param, direction, buf+3, len, EOF, conf.timeouts[STRING_S]);
|
||||
if(res != len) return -4;
|
||||
return len+3;
|
||||
}
|
||||
|
||||
#define BSIZE (4096)
|
||||
#define SNILEN (256)
|
||||
#define PROTOLEN (32)
|
||||
|
||||
Reference in new issue
Block a user