Use `inaddr2str'
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@655 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1545,6 +1545,7 @@ renamecmd(char *from, char *to)
|
|||||||
static void
|
static void
|
||||||
dolog(struct sockaddr_in *sin)
|
dolog(struct sockaddr_in *sin)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
struct hostent *hp = gethostbyaddr((char *)&sin->sin_addr,
|
struct hostent *hp = gethostbyaddr((char *)&sin->sin_addr,
|
||||||
sizeof(struct in_addr), AF_INET);
|
sizeof(struct in_addr), AF_INET);
|
||||||
|
|
||||||
@@ -1553,6 +1554,8 @@ dolog(struct sockaddr_in *sin)
|
|||||||
else
|
else
|
||||||
(void) strncpy(remotehost, inet_ntoa(sin->sin_addr),
|
(void) strncpy(remotehost, inet_ntoa(sin->sin_addr),
|
||||||
sizeof(remotehost));
|
sizeof(remotehost));
|
||||||
|
#endif
|
||||||
|
inaddr2str (sin->sin_addr, remotehost, sizeof(remotehost));
|
||||||
#ifdef HAVE_SETPROCTITLE
|
#ifdef HAVE_SETPROCTITLE
|
||||||
sprintf(proctitle, "%s: connected", remotehost);
|
sprintf(proctitle, "%s: connected", remotehost);
|
||||||
setproctitle(proctitle);
|
setproctitle(proctitle);
|
||||||
|
|||||||
Reference in New Issue
Block a user