Hello,
this is a very simple test program:
* build53.some.org resolves and exists
* build55.some.org does not resolve and does not exist
#!/usr/bin/rexx
If RxFuncQuery("SockDropFuncs") then
do
rc = RxFuncAdd("SockLoadFuncs","rxsock","SockLoadFuncs")
rc = SockLoadFuncs()
end
say SockGetHostByName( 'build53.some.org', 'a.!')
say symbol('h_errno') h_errno
say symbol('errno') errno
say symbol('a.!addr')
say a.!addr
say "--------------------------------------------------"
say SockGetHostByName( 'build55.some.org', 'b.!')
say symbol('h_errno') h_errno
say symbol('errno') errno
say symbol('b.!addr')
say b.!addr
say "--------------------------------------------------"
say SockGetHostByName( 'build55.some.org', 'a.!')
say symbol('h_errno') h_errno
say symbol('errno') errno
say symbol('a.!addr')
say a.!addr
/* output
1 <- OK no problem
VAR 1541
VAR 0
VAR
10.3.1.155
--------------------------------------------------
0 <- error (the FQDN does not resolve)
VAR 1541
VAR 0
LIT
B.!ADDR
--------------------------------------------------
0 <- error (the FQDN does not resolve) but a.!addr is still set
VAR 1541
VAR 0
VAR
10.3.1.155
*/
So if you do not check the rc and just rely on the returned value than
you are in bad luck.
Would it not be better to clear the var in case of an error ?? Just a
question...
Bye
Rainer
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel