From 998b656799fd8f99a0d572c105fb1cf237127661 Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Fri, 31 Jan 2014 12:35:36 -0600 Subject: [PATCH 1/7] remove some _MSC_VER stuff --- libs/srtp/crypto/cipher/aes_icm.c | 3 --- libs/srtp/crypto/cipher/null_cipher.c | 3 --- libs/srtp/crypto/hash/null_auth.c | 3 --- libs/srtp/crypto/kernel/err.c | 3 --- libs/srtp/crypto/replay/ut_sim.c | 4 ---- libs/srtp/libsrtp.2010.vcxproj | 4 ++++ libs/srtp/libsrtp.2012.vcxproj | 8 ++++---- libs/srtp/srtp/ekt.c | 3 --- 8 files changed, 8 insertions(+), 23 deletions(-) diff --git a/libs/srtp/crypto/cipher/aes_icm.c b/libs/srtp/crypto/cipher/aes_icm.c index 3219a15778..e38038269e 100644 --- a/libs/srtp/crypto/cipher/aes_icm.c +++ b/libs/srtp/crypto/cipher/aes_icm.c @@ -49,9 +49,6 @@ #include "aes_icm.h" #include "alloc.h" -#ifdef _MSC_VER -#pragma warning(disable:4100) -#endif debug_module_t mod_aes_icm = { 0, /* debugging is off by default */ diff --git a/libs/srtp/crypto/cipher/null_cipher.c b/libs/srtp/crypto/cipher/null_cipher.c index d99a0e85af..ca38f72318 100644 --- a/libs/srtp/crypto/cipher/null_cipher.c +++ b/libs/srtp/crypto/cipher/null_cipher.c @@ -48,9 +48,6 @@ #include "null_cipher.h" #include "alloc.h" -#ifdef _MSC_VER -#pragma warning(disable:4100) -#endif /* the null_cipher uses the cipher debug module */ diff --git a/libs/srtp/crypto/hash/null_auth.c b/libs/srtp/crypto/hash/null_auth.c index 1fa2660840..5d810dd5b7 100644 --- a/libs/srtp/crypto/hash/null_auth.c +++ b/libs/srtp/crypto/hash/null_auth.c @@ -48,9 +48,6 @@ #include "null_auth.h" #include "alloc.h" -#ifdef _MSC_VER -#pragma warning(disable:4100) -#endif /* null_auth uses the auth debug module */ diff --git a/libs/srtp/crypto/kernel/err.c b/libs/srtp/crypto/kernel/err.c index 6b00e7b877..4a3a8589e9 100644 --- a/libs/srtp/crypto/kernel/err.c +++ b/libs/srtp/crypto/kernel/err.c @@ -50,9 +50,6 @@ # endif #endif -#ifdef _MSC_VER -#pragma warning(disable:4100) -#endif /* err_level reflects the level of errors that are reported */ diff --git a/libs/srtp/crypto/replay/ut_sim.c b/libs/srtp/crypto/replay/ut_sim.c index 465e8c85ca..837aad7a3c 100644 --- a/libs/srtp/crypto/replay/ut_sim.c +++ b/libs/srtp/crypto/replay/ut_sim.c @@ -47,10 +47,6 @@ #include "ut_sim.h" -#ifdef _MSC_VER -#pragma warning(disable:4100) -#endif - int ut_compar(const void *a, const void *b) { return rand() > (RAND_MAX/2) ? -1 : 1; diff --git a/libs/srtp/libsrtp.2010.vcxproj b/libs/srtp/libsrtp.2010.vcxproj index 554e943fe0..5d3109b5f0 100644 --- a/libs/srtp/libsrtp.2010.vcxproj +++ b/libs/srtp/libsrtp.2010.vcxproj @@ -136,6 +136,7 @@ false Level4 true + 4305;4100;%(DisableSpecificWarnings) @@ -156,6 +157,7 @@ Default Level4 false + 4305;4100;%(DisableSpecificWarnings) @@ -170,6 +172,7 @@ Default Level4 true + 4305;4100;%(DisableSpecificWarnings) @@ -187,6 +190,7 @@ Default Level4 false + 4305;4100;%(DisableSpecificWarnings) diff --git a/libs/srtp/libsrtp.2012.vcxproj b/libs/srtp/libsrtp.2012.vcxproj index 8a8eb41f27..42f7548784 100644 --- a/libs/srtp/libsrtp.2012.vcxproj +++ b/libs/srtp/libsrtp.2012.vcxproj @@ -144,7 +144,7 @@ false Level4 true - 4305;%(DisableSpecificWarnings) + 4305;4100;%(DisableSpecificWarnings) @@ -165,7 +165,7 @@ Default Level4 false - 4305;%(DisableSpecificWarnings) + 4305;4100;%(DisableSpecificWarnings) @@ -180,7 +180,7 @@ Default Level4 true - 4305;%(DisableSpecificWarnings) + 4305;4100;%(DisableSpecificWarnings) @@ -198,7 +198,7 @@ Default Level4 false - 4305;%(DisableSpecificWarnings) + 4305;4100;%(DisableSpecificWarnings) diff --git a/libs/srtp/srtp/ekt.c b/libs/srtp/srtp/ekt.c index 1cfd21f2cd..4b3d95b2f7 100644 --- a/libs/srtp/srtp/ekt.c +++ b/libs/srtp/srtp/ekt.c @@ -47,9 +47,6 @@ #include "srtp_priv.h" #include "ekt.h" -#ifdef _MSC_VER -#pragma warning(disable:4100) -#endif extern debug_module_t mod_srtp; From 72a80498352a4651a53f7d85192267c05e09fa59 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Fri, 10 Jan 2014 14:37:41 +0000 Subject: [PATCH 2/7] Fix --disable-core-odbc-support In commit ffc8e81b763c4e11e02309b99e2a4b4aa666e845, tc ensured that configure would abort if libodbc was not found. However this resulted in the library check being done twice, as well as rendering --disable-core-odbc-support ineffective. If libodbc was found, it would enable core ODBC support regardless. This fix ensures the check is only done once or not at all if core ODBC support is explicitly disabled. Signed-off-by: Travis Cross --- configure.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index a41fb924b9..c4323036fb 100644 --- a/configure.in +++ b/configure.in @@ -404,12 +404,13 @@ AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"]) AC_ARG_ENABLE(core-odbc-support, [AS_HELP_STRING([--enable-core-odbc-support], [Compile with ODBC Support])],,[enable_core_odbc_support="no"]) -AX_LIB_ODBC -if test "$ac_cv_found_odbc" = "yes" ; then - enable_core_odbc_support="yes" -fi if test "x$enable_core_odbc_support" != "xno"; then - AC_CHECK_LIB([odbc], [SQLDisconnect],, AC_MSG_ERROR([no usable libodbc; please install unixodbc devel package or equivalent])) + AX_LIB_ODBC + if test "x$ac_cv_found_odbc" = "xyes" ; then + enable_core_odbc_support="yes" + elif test "x$enable_core_odbc_support" = "xyes" ; then + AC_MSG_ERROR([no usable libodbc; please install unixodbc devel package or equivalent]) + fi fi CHECK_LIBUUID From cc3e15eb50c0f540981989a47af5f537085e40c3 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Fri, 31 Jan 2014 18:14:32 +0000 Subject: [PATCH 3/7] Ensure we don't set HAVE_ODBC unless we really do --- configure.in | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.in b/configure.in index c4323036fb..ac7e468af0 100644 --- a/configure.in +++ b/configure.in @@ -402,6 +402,7 @@ AM_CONDITIONAL([ENABLE_ZRTP],[test "x$enable_zrtp" != "xno"]) AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"]) +enable_core_odbc_support="no" AC_ARG_ENABLE(core-odbc-support, [AS_HELP_STRING([--enable-core-odbc-support], [Compile with ODBC Support])],,[enable_core_odbc_support="no"]) if test "x$enable_core_odbc_support" != "xno"; then From f5f4df348336298d19d1484040fa05700631fec1 Mon Sep 17 00:00:00 2001 From: Moises Silva Date: Tue, 28 Jan 2014 19:07:34 -0500 Subject: [PATCH 4/7] Fix ESL infinite loop on handle_recv() when errno is already set system calls do not clear errno, just set it in case of failure, so we gotta make sure the recv() syscall really failed by checking the return value --- libs/esl/src/esl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/esl/src/esl.c b/libs/esl/src/esl.c index e8ed39aa68..915d062f0a 100644 --- a/libs/esl/src/esl.c +++ b/libs/esl/src/esl.c @@ -1233,7 +1233,7 @@ static esl_ssize_t handle_recv(esl_handle_t *handle, void *data, esl_size_t data } else if ((activity & ESL_POLL_READ)) { if (!(activity = recv(handle->sock, data, datalen, 0))) { activity = -1; - } else if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) { + } else if (activity < 0 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)) { activity = 0; } } From ef35dc6343596641700705e44c63f90eac92bc8a Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Fri, 31 Jan 2014 22:05:43 +0000 Subject: [PATCH 5/7] Fix configure ODBC logic ...and rewrite entire block for better clarity of purpose. We might want to look more closely at the AX_LIB_ODBC macro as well. This amends commit dfd591e9f52cdc71f3837e123db5bace9c5474b8. --- configure.in | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index ac7e468af0..1c40b6c191 100644 --- a/configure.in +++ b/configure.in @@ -402,15 +402,17 @@ AM_CONDITIONAL([ENABLE_ZRTP],[test "x$enable_zrtp" != "xno"]) AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"]) -enable_core_odbc_support="no" AC_ARG_ENABLE(core-odbc-support, - [AS_HELP_STRING([--enable-core-odbc-support], [Compile with ODBC Support])],,[enable_core_odbc_support="no"]) + [AS_HELP_STRING([--enable-core-odbc-support], [Compile with ODBC Support])],[enable_core_odbc_support="yes"],[enable_core_odbc_support="no"]) if test "x$enable_core_odbc_support" != "xno"; then AX_LIB_ODBC - if test "x$ac_cv_found_odbc" = "xyes" ; then + if test "x$ac_cv_found_odbc" = "xyes"; then enable_core_odbc_support="yes" - elif test "x$enable_core_odbc_support" = "xyes" ; then - AC_MSG_ERROR([no usable libodbc; please install unixodbc devel package or equivalent]) + else + if test "x$enable_core_odbc_support" = "xyes"; then + AC_MSG_ERROR([no usable libodbc; please install unixodbc devel package or equivalent]) + else + enable_core_odbc_support="no" fi fi From 70af6013606120b68e86664889b8fdd282535edf Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Fri, 31 Jan 2014 22:34:25 +0000 Subject: [PATCH 6/7] Revert "Fix configure ODBC logic" This reverts commit ef35dc6343596641700705e44c63f90eac92bc8a. --- configure.in | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/configure.in b/configure.in index 1c40b6c191..ac7e468af0 100644 --- a/configure.in +++ b/configure.in @@ -402,17 +402,15 @@ AM_CONDITIONAL([ENABLE_ZRTP],[test "x$enable_zrtp" != "xno"]) AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"]) +enable_core_odbc_support="no" AC_ARG_ENABLE(core-odbc-support, - [AS_HELP_STRING([--enable-core-odbc-support], [Compile with ODBC Support])],[enable_core_odbc_support="yes"],[enable_core_odbc_support="no"]) + [AS_HELP_STRING([--enable-core-odbc-support], [Compile with ODBC Support])],,[enable_core_odbc_support="no"]) if test "x$enable_core_odbc_support" != "xno"; then AX_LIB_ODBC - if test "x$ac_cv_found_odbc" = "xyes"; then + if test "x$ac_cv_found_odbc" = "xyes" ; then enable_core_odbc_support="yes" - else - if test "x$enable_core_odbc_support" = "xyes"; then - AC_MSG_ERROR([no usable libodbc; please install unixodbc devel package or equivalent]) - else - enable_core_odbc_support="no" + elif test "x$enable_core_odbc_support" = "xyes" ; then + AC_MSG_ERROR([no usable libodbc; please install unixodbc devel package or equivalent]) fi fi From ec7012071845f75bd91e76226f7c6d53df277316 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Fri, 31 Jan 2014 22:35:03 +0000 Subject: [PATCH 7/7] Revert "Improve configure ODBC handling" This reverts commit dfd591e9f52cdc71f3837e123db5bace9c5474b8, reversing changes made to 998b656799fd8f99a0d572c105fb1cf237127661. --- configure.in | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/configure.in b/configure.in index ac7e468af0..a41fb924b9 100644 --- a/configure.in +++ b/configure.in @@ -402,16 +402,14 @@ AM_CONDITIONAL([ENABLE_ZRTP],[test "x$enable_zrtp" != "xno"]) AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"]) -enable_core_odbc_support="no" AC_ARG_ENABLE(core-odbc-support, [AS_HELP_STRING([--enable-core-odbc-support], [Compile with ODBC Support])],,[enable_core_odbc_support="no"]) +AX_LIB_ODBC +if test "$ac_cv_found_odbc" = "yes" ; then + enable_core_odbc_support="yes" +fi if test "x$enable_core_odbc_support" != "xno"; then - AX_LIB_ODBC - if test "x$ac_cv_found_odbc" = "xyes" ; then - enable_core_odbc_support="yes" - elif test "x$enable_core_odbc_support" = "xyes" ; then - AC_MSG_ERROR([no usable libodbc; please install unixodbc devel package or equivalent]) - fi + AC_CHECK_LIB([odbc], [SQLDisconnect],, AC_MSG_ERROR([no usable libodbc; please install unixodbc devel package or equivalent])) fi CHECK_LIBUUID