ntoa changed to ntop

This commit is contained in:
Vladimir Dubrovin committed 2014-05-12 01:10:53 +04:00
1 parent 7897b009a1
commit ccf606fd9e
11 files changed
+36 -26

No files matched your search

+3 -2
View File
@@ -96,7 +96,7 @@ void * sockschild(struct clientparam* param) {
if(command==1 && !param->req.sin_addr.s_addr) {
RETURN(422);
}
myinet_ntoa(param->sins.sin_addr, (char *)buf);
myinet_ntop(*SAFAMILY(&param->sins), SAADDR(&param->sins), (char *)buf + strlen((char *)buf), 64);
break;
case 3:
if ((size = sockgetcharcli(param, conf.timeouts[SINGLEBYTE_S], 0)) == EOF) {RETURN(451);} /* nmethods */
@@ -400,7 +400,8 @@ fflush(stderr);
if(param->hostname){
sprintf((char *)buf + strlen((char *)buf), "%.265s", param->hostname);
}
else myinet_ntoa(param->req.sin_addr, (char *)buf+strlen((char *)buf));
else
myinet_ntop(*SAFAMILY(&param->req), SAADDR(&param->req), (char *)buf + strlen((char *)buf), 64);
sprintf((char *)buf+strlen((char *)buf), ":%hu", ntohs(param->req.sin_port));
(*param->srv->logfunc)(param, buf);
myfree(buf);