aboutsummaryrefslogtreecommitdiff
path: root/jim-aio.c
diff options
context:
space:
mode:
authoroharboe <oharboe>2008-07-23 19:41:21 +0000
committeroharboe <oharboe>2008-07-23 19:41:21 +0000
commit973dc277759ebd559b704d39c2aa4ab710a78667 (patch)
tree519859d4228e54ec5d178a179c9378929e54e4c2 /jim-aio.c
parent269f158a92c13cad5720f9c75ed56bc0d673d181 (diff)
downloadjimtcl-973dc277759ebd559b704d39c2aa4ab710a78667.zip
jimtcl-973dc277759ebd559b704d39c2aa4ab710a78667.tar.gz
jimtcl-973dc277759ebd559b704d39c2aa4ab710a78667.tar.bz2
Uwe Klein:
* fix missing vararg.h in some files ( included in jim.h ) * in aio.socket return an error when hosti resolution fails instead of just carrying on.
Diffstat (limited to 'jim-aio.c')
-rw-r--r--jim-aio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/jim-aio.c b/jim-aio.c
index 9afb2f2..88ccda0 100644
--- a/jim-aio.c
+++ b/jim-aio.c
@@ -631,8 +631,12 @@ static int JimAioSockCommand(Jim_Interp *interp, int argc,
port = atol(stport);
he = gethostbyname(sthost);
/* FIX!!!! this still results in null pointer exception here.
- if (!he)
- herror("gethostbyname");
+ /* FIXED!!!! debug output but no JIM_ERR done UK.
+ if (!he) {
+ Jim_SetResultString(interp,hstrerror(h_errno),-1);
+ return JIM_ERR;
+ }
+
fprintf(stderr,"Official name is: %s\n", he->h_name);
fprintf(stderr,"IP address: %s\n", inet_ntoa(*(struct in_addr*)he->h_addr));
*/