Skip to content
Snippets Groups Projects
Commit c9ad9526 authored by Yang Tse's avatar Yang Tse
Browse files

Replace inet_ntoa and inet_ntoa_r with Curl_inet_ntop

parent 2a09ffc6
No related branches found
No related tags found
No related merge requests found
......@@ -62,12 +62,9 @@
#include "ftp.h"
#include "sendf.h"
#include "krb4.h"
#include "inet_ntop.h"
#include "memory.h"
#if defined(HAVE_INET_NTOA_R) && !defined(HAVE_INET_NTOA_R_DECL)
#include "inet_ntoa_r.h"
#endif
/* The last #include file should be: */
#include "memdebug.h"
......@@ -242,13 +239,9 @@ krb4_auth(void *app_data, struct connectdata *conn)
krb_realmofhost(host));
else {
if(natAddr.s_addr != localaddr->sin_addr.s_addr) {
#ifdef HAVE_INET_NTOA_R
char ntoa_buf[64];
char *ip = (char *)inet_ntoa_r(natAddr, ntoa_buf, sizeof(ntoa_buf));
#else
char *ip = (char *)inet_ntoa(natAddr);
#endif
infof(data, "Using NAT IP address (%s) for kerberos 4\n", ip);
char addr_buf[128];
if(Curl_inet_ntop(AF_INET, natAddr, addr_buf, sizeof(addr_buf)))
infof(data, "Using NAT IP address (%s) for kerberos 4\n", addr_buf);
localaddr->sin_addr = natAddr;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment