mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
name resolution bugfixes
This commit is contained in:
1 parent
f70e4adf47
commit
7acf3cc4ed
4 files changed
+18
-18
No files matched your search
+3
-3
@@ -214,7 +214,7 @@ int ceparseargs(const char *str){
|
||||
#endif
|
||||
|
||||
int parsehostname(char *hostname, struct clientparam *param, unsigned short port){
|
||||
char *sp,*se;
|
||||
char *sp=NULL,*se=NULL;
|
||||
|
||||
if(!hostname || !*hostname)return 1;
|
||||
if(*hostname == '[') se=strchr(hostname, ']');
|
||||
@@ -228,10 +228,10 @@ int parsehostname(char *hostname, struct clientparam *param, unsigned short port
|
||||
}
|
||||
if(sp){
|
||||
port = atoi(sp+1);
|
||||
*sp = ':';
|
||||
}
|
||||
if(se) *se = ']';
|
||||
getip46(param->srv->family, param->hostname + (se!=0), (struct sockaddr *)¶m->req);
|
||||
if(se) *se = ']';
|
||||
if(sp) *sp = ':';
|
||||
*SAPORT(¶m->req) = htons(port);
|
||||
memset(¶m->sinsr, 0, sizeof(param->sinsr));
|
||||
return 0;
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
#define VERSION "3proxy-0.8b-devel"
|
||||
#define BUILDDATE "141103212413"
|
||||
#define BUILDDATE "141103221444"
|
||||
Reference in new issue
Block a user