> This is unnecessary, because the call to “socketErr()” in the original code > already calls “UsageEnvironment::setResultErrMsg()”, which in turn is > implemented by calling “strerror()” on the ‘errno’ code.
Except on Windows strerror() doesn't work with winsocket error codes (returned by WSAGetLastError()) instead FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, WSAGetLastError(), ...) should be used. I guess it would be better (than my solution) to change BasicUsageEnvironment0::setResultErrMsg() to account for that (would you be interested in a patch?) But I have 2 more minor points: 1. Right now messages for socket errors look like this: "writeSocket(42), sendTo() error: wrote -1 bytes instead of 4242:", this looks odd. 2. I my opinion error codes are far more useful than textual messages when grep'ing logs, so it would be nice to have error code as a number in the message. -- Stas Tsymbalov TrueConf LLC http://trueconf.com/ _______________________________________________ live-devel mailing list [email protected] http://lists.live555.com/mailman/listinfo/live-devel
