diff --git a/src/vortex.h b/src/vortex.h index 9d1d9aa2..9262098f 100644 --- a/src/vortex.h +++ b/src/vortex.h @@ -135,6 +135,7 @@ #define vortex_is_disconnected ((errno == WSAESHUTDOWN) || (errno == WSAECONNABORTED) || (errno == WSAECONNRESET)) #define VORTEX_FILE_SEPARATOR "\\" #define inet_ntop vortex_win32_inet_ntop +#define EADDRNOTAVAIL 125 /* no link support windows */ #define S_ISLNK(m) (0) diff --git a/src/vortex_connection.c b/src/vortex_connection.c index 6048801f..67246247 100644 --- a/src/vortex_connection.c +++ b/src/vortex_connection.c @@ -4630,14 +4630,17 @@ const char * vortex_connection_get_host_ip (VortexConnection * /* unix flavors */ socklen_t sin_size = sizeof (sin); #endif +#if defined(ENABLE_VORTEX_LOG) VortexCtx * ctx; + /* setup context */ + ctx = connection->ctx; +#endif + /* check input parameters */ if (connection == NULL) return NULL; - /* setup context */ - ctx = connection->ctx; - + /* acquire lock to check if host ip was defined previously */ vortex_mutex_lock (&connection->op_mutex); if (connection->host_ip) {