#760 Sockets variables errno and h_errno not set

v4.0.1
closed
Mark Miesfeld
5
2012-08-14
2009-07-14
DougL
No

The documentation says "The variable h_errno is set after each RxSock call", and similarly for variable "errno", but that is not true of SockGetHostByName() as shown in the following program. I've also noticed it for SockSocket(), SockConnect(), SockSend(), SockRecv(), SockClose(), and even SockSock_ErrNo().

if 0 \== RxFuncQuery("SockLoadFuncs") then do -- Not already loaded
say 'Loading ...' -- Ok: Says "Loading ..."
_ = RxFuncAdd("SockLoadFuncs","rxSock","SockLoadFuncs")
_ = SockLoadFuncs()
end

say SockGetHostByName( 'www.abc.com', 'a_') -- Ok: Says "1"

say symbol('h_errno') -- Err: Says "LIT"
say symbol('errno') -- Err: Says "LIT"

say symbol('a_addr') -- Ok: Says "VAR" (ok)
say a_addr -- Ok: Says "199.181.132.250"

-- REXX-ooRexx_4.0.0(MT) 6.03 30 Jun 2009
-- Up to date Vista

Discussion

  • Mark Miesfeld
    Mark Miesfeld
    2010-08-14

    Hi Doug,

    Sorry it took so long for a response to this. We appreciate your opening bugs, we just don't have the resources to always respond promptly.

    This works fine for me on 4.0.1. I tested on Windows, Fedora Core 13, and Ubuntu. Some output:

    1
    Symbol h_errno: VAR
    h_errno: 1541
    Symbol errno: VAR
    errno: 0
    Symbol a_addr: VAR
    a_addr: 199.181.132.250

    Since you opened this for the 4.0.0 beta, I'm going to mark it as out of date.

    I only tested SockGetHostByName, using the program you included in-line, with some additional says. That program is attached.

    If you still think there are problems with the other functions, please open a new bug. Please attach working, example programs that demonstrate the bug to any bug report. It is better to attach a program rather than putting it in-line in the descriptive text. (Although in-line is far better than nothing.)

    Thanks again for th bug report.

     


Anonymous


Cancel   Add attachments