Minor fix to includes and error names.
This commit is contained in:
@@ -18,9 +18,10 @@
|
|||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
|
#include <errno.h>
|
||||||
#else
|
#else
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#define ETIMEOUT WSAETIMEDOUT
|
#define ETIMEDOUT WSAETIMEDOUT
|
||||||
#define ECONNRESET WSAECONNRESET
|
#define ECONNRESET WSAECONNRESET
|
||||||
#define ECONNABORTED WSAECONNABORTED
|
#define ECONNABORTED WSAECONNABORTED
|
||||||
#endif
|
#endif
|
||||||
@@ -129,7 +130,7 @@ void xmpp_run_once(xmpp_ctx_t *ctx, const unsigned long timeout)
|
|||||||
conn->connect_timeout)
|
conn->connect_timeout)
|
||||||
FD_SET(conn->sock, &wfds);
|
FD_SET(conn->sock, &wfds);
|
||||||
else {
|
else {
|
||||||
conn->error = ETIMEOUT;
|
conn->error = ETIMEDOUT;
|
||||||
xmpp_info(ctx, "xmpp", "Connection attempt timed out.");
|
xmpp_info(ctx, "xmpp", "Connection attempt timed out.");
|
||||||
conn_disconnect(conn);
|
conn_disconnect(conn);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user