X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fcompat%2Fsocket.h;h=be63d31ebc3edeaa03af27229e8340e78e2c6d55;hp=b1fe15978a763a2bdbccca238cb19f971ed09c8f;hb=95c324a414e7d862985caaf49bdb58f0cdfa2647;hpb=0408934a2ff110ed1c5bf3719ae6b650b5834146 diff --git a/src/compat/socket.h b/src/compat/socket.h index b1fe1597..be63d31e 100644 --- a/src/compat/socket.h +++ b/src/compat/socket.h @@ -33,7 +33,7 @@ #define BT_SOCKET SOCKET static inline -int bt_socket_init(void) +int bt_socket_init(int log_level) { WORD verreq; WSADATA wsa; @@ -44,15 +44,17 @@ int bt_socket_init(void) ret = WSAStartup(verreq, &wsa); if (ret != 0) { -#ifdef BT_LOGE - BT_LOGE("Winsock init failed with error: %d", ret); +#ifdef BT_LOG_WRITE_CUR_LVL + BT_LOG_WRITE_CUR_LVL(BT_LOG_ERROR, log_level, BT_LOG_TAG, + "Winsock init failed with error: %d", ret); #endif goto end; } if (LOBYTE(wsa.wVersion) != 2 || HIBYTE(wsa.wVersion) != 2) { -#ifdef BT_LOGE_STR - BT_LOGE_STR("Could not init winsock 2.2 support"); +#ifdef BT_LOG_WRITE_CUR_LVL + BT_LOG_WRITE_CUR_LVL(BT_LOG_ERROR, log_level, BT_LOG_TAG, + "Could not init winsock 2.2 support"); #endif WSACleanup(); ret = -1; @@ -282,7 +284,7 @@ const char *bt_socket_errormsg(void) #define BT_SOCKET int static inline -int bt_socket_init(void) +int bt_socket_init(int log_level) { return 0; }