X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=zotnet%2Fmts%2Fclient.c;h=009595901fb9a5feaf0346381cd2b8fd78225deb;hp=924684c0719bcefcf4f732896b5557f487cd5728;hb=0d1c5f533f3a6cd1c7f038f59585378f53b666c2;hpb=c0a38419e027e400b370db10086bcb8a3c981ce7 diff --git a/zotnet/mts/client.c b/zotnet/mts/client.c index 924684c..0095959 100644 --- a/zotnet/mts/client.c +++ b/zotnet/mts/client.c @@ -208,6 +208,7 @@ rcaux (struct servent *sp, struct hostent *hp, int rproto, #ifdef KPOP int rem; + struct hostent *hp2; #endif /* KPOP */ for (ap = nets; ap < n1; ap++) @@ -256,7 +257,11 @@ rcaux (struct servent *sp, struct hostent *hp, int rproto, if (kservice) { /* "pop" */ char *instance; - if ((instance = strdup (hp->h_name)) == NULL) { + if (( hp2 = gethostbyaddr( hp->h_addr, hp->h_length, hp->h_addrtype )) + == NULL ) { + return NOTOK; + } + if ((instance = strdup (hp2->h_name)) == NULL) { close (sd); strncpy (response, "Out of memory.", len_response); return OOPS2;