optional parms to SockRecvFrom aren't optional 4.1.3 64-bit debian 7
And error reporting is horrible.
The issue occurs when calling SockRecvFrom with parms valid until 4.1.2.
According to the book, the flags parameter is optional. However, if it's omitted, all you get is rc=0 from the call.
I had to break out the debugger to see what was going on: the stem.resolveStem() at the beginning of the routine will always return false when the flags parameter is omitted.
Later testing shows an empty flags parameter and .nil address parameter fails with a segfault, a '' address parameter fails with rc=0.
If all parameters are specified (with empty flags parameter), it works as expected.
Reproduce with the attached exec. Run 'udptest4.rex listen' to set up listening UDP socket, then 'udptest4.rex send' to send it a message. This should work.
Run 'udptest4.rex listen fail' to set up listening UDP socket without optional flags parm, then 'udptest4.rex send' to send it a message. This should fail.
Examine the source of udptest4.rex for the other failure modes.
The scheme of returning rc=0 for bad parameters isn't very useful at all: this should raise an identifiable condition.
This seems to be down to changes at rev 9196, which are a little more than bug fixing imho, and could have done with a note in the readme.