commit d70897c2409282fbe44b339ea401ed74c30cf7ed
parent b4d964e5cd1a9d28f575bc2bb723dca32bd9919f
Author: Anthony Martin <ality@pbrane.org>
Date: Fri, 31 Mar 2006 19:14:31 -0800
fixed a bug in connect_inet_sock(). now using wmiir over tcp works (i.e. wmiir -a 'tcp!204.178.31.8' read /)
Diffstat:
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/libixp/ixp.h b/libixp/ixp.h
@@ -20,6 +20,8 @@
#define IXP_MAX_WELEM 16 /*MAXWELEM */
#define IXP_MAX_TFUNCS 14
+#define IXP_PORT 564
+
/*
size[4] Tversion tag[2] msize[4] version[s]
diff --git a/libixp/socket.c b/libixp/socket.c
@@ -49,9 +49,14 @@ connect_inet_sock(char *host)
const char *errstr = nil;
unsigned int prt;
- *port = 0;
- port++;
- prt = cext_strtonum(port, 1024, 65535, &errstr);
+ if(!port)
+ prt = IXP_PORT;
+ else {
+ *port = 0;
+ port++;
+ prt = cext_strtonum(port, 0, 65535, &errstr);
+ }
+
if(errstr)
return -1;