projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Resolve the circular dependency of libmh on libmts on libmh. The
[mmh]
/
zotnet
/
mts
/
client.c
diff --git
a/zotnet/mts/client.c
b/zotnet/mts/client.c
index
924684c
..
0095959
100644
(file)
--- 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;
#ifdef KPOP
int rem;
+ struct hostent *hp2;
#endif /* KPOP */
for (ap = nets; ap < n1; ap++)
#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 (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;
close (sd);
strncpy (response, "Out of memory.", len_response);
return OOPS2;