On 22.01.2012 02:51, Jérôme Duval wrote:
Hi Alexander, 2012/1/22 <kallisti5@xxxxxxxxxxx>:fSocket = socket(address.Family(), SOCK_STREAM, 0); - if (fSocket < 0) + if (fSocket < 0) {+ TRACE("%s: Socket Error: %s\n", __func__, strerror(status));return errno; + } int result = connect(fSocket, address, address.Length()); if (result < 0) {+ TRACE("%s: Connect Error: %s\n", __func__, strerror(result));close(fSocket); - return errno; + return result; }socket() and connect() put error codes in errno. strerror(status) and strerror(result) will for sure be wrong. Why returning result and not anymore errno? "correct error code" in your commit message would mean -1.
Baahh.. You're right.. I forgot all about that. Fixing now.