[Spice-commits] 3 commits - client/red_peer.cpp configure.ac server/red_worker.c

Alon Levy alon at kemper.freedesktop.org
Mon Feb 7 08:51:09 PST 2011


 client/red_peer.cpp |   10 +++++-----
 configure.ac        |    6 +++---
 server/red_worker.c |    2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit bf6f246b2e8a921e6a524d092dd6f2d8cc1ced68
Author: Alon Levy <alevy at redhat.com>
Date:   Mon Jan 17 16:02:39 2011 +0200

    client: log subject-host mismatch, and raise ssl warnings to errors

diff --git a/client/red_peer.cpp b/client/red_peer.cpp
index 6ff5844..86a9047 100644
--- a/client/red_peer.cpp
+++ b/client/red_peer.cpp
@@ -365,7 +365,7 @@ bool RedPeer::verify_subject(X509* cert, const HostAuthOptions::CertFieldValueLi
     }
 
     if ((size_t)X509_NAME_entry_count(cert_subject) != subject.size()) {
-        DBG(0, "subject mismatch: #entries cert=%d, input=%d",
+        LOG_ERROR("subject mismatch: #entries cert=%d, input=%d",
             X509_NAME_entry_count(cert_subject), subject.size());
         return false;
     }
@@ -396,7 +396,7 @@ bool RedPeer::verify_subject(X509* cert, const HostAuthOptions::CertFieldValueLi
          DBG(0, "subjects match");
          return true;
     } else {
-         DBG(0, "subjects mismatch");
+         LOG_ERROR("host-subject mismatch");
          return false;
     }
 }
@@ -505,7 +505,7 @@ void RedPeer::connect_secure(const ConnectionOptions& options, const char* host)
                     auth_data.info.type_flags = RedPeer::HostAuthOptions::HOST_AUTH_OP_PUBKEY;
                 }
                 else {
-                    LOG_WARN("SSL_CTX_load_verify_locations failed CA_file=%s", CA_file.c_str());
+                    LOG_ERROR("SSL_CTX_load_verify_locations failed CA_file=%s", CA_file.c_str());
                     ssl_error();
                 }
             }
@@ -517,7 +517,7 @@ void RedPeer::connect_secure(const ConnectionOptions& options, const char* host)
 
         return_code = SSL_CTX_set_cipher_list(_ctx, options.ciphers.c_str());
         if (return_code != 1) {
-            LOG_WARN("SSL_CTX_set_cipher_list failed, ciphers=%s", options.ciphers.c_str());
+            LOG_ERROR("SSL_CTX_set_cipher_list failed, ciphers=%s", options.ciphers.c_str());
             ssl_error();
         }
 
@@ -537,7 +537,7 @@ void RedPeer::connect_secure(const ConnectionOptions& options, const char* host)
         return_code = SSL_connect(_ssl);
         if (return_code <= 0) {
             int ssl_error_code = SSL_get_error(_ssl, return_code);
-            LOG_WARN("failed to connect w/SSL, ssl_error %s",
+            LOG_ERROR("failed to connect w/SSL, ssl_error %s",
                      ERR_error_string(ssl_error_code, NULL));
             ssl_error();
         }
commit e2d6e8ef4f190273b6fcc848575f37f2c37dc89d
Author: Alon Levy <alevy at redhat.com>
Date:   Mon Jan 17 01:26:39 2011 +0200

    configure.ac: use AC_LANG_SOURCE in AC_COMPILE_IFELSE, silence remaining warnings

diff --git a/configure.ac b/configure.ac
index 9b5385d..9159b4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -309,7 +309,7 @@ AC_DEFUN([SPICE_CC_TRY_FLAG], [
   spice_save_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS $1"
 
-  AC_COMPILE_IFELSE([ ], [spice_cc_flag=yes], [spice_cc_flag=no])
+  AC_COMPILE_IFELSE([AC_LANG_SOURCE([ ])], [spice_cc_flag=yes], [spice_cc_flag=no])
   CFLAGS="$spice_save_CFLAGS"
 
   if test "x$spice_cc_flag" = "xyes"; then
@@ -430,13 +430,13 @@ dnl -fvisibility stuff
 
 have_gcc4=no
 AC_MSG_CHECKING(for -fvisibility)
-AC_COMPILE_IFELSE([
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 #if defined(__GNUC__) && (__GNUC__ >= 4)
 #else
 error Need GCC 4.0 for visibility
 #endif
 int main () { return 0; }
-], have_gcc4=yes)
+])], have_gcc4=yes)
 
 if test "x$have_gcc4" = "xyes" -a ! "$os_win32" = "yes" ; then
    VISIBILITY_HIDDEN_CFLAGS="-fvisibility=hidden"
commit 31db6ef8c2162700605592e8dfece19033a4265c
Author: Alon Levy <alevy at redhat.com>
Date:   Mon Feb 7 15:10:36 2011 +0200

    server/red_worker: fix used but uninitialized warning (gcc 4.6.0)

diff --git a/server/red_worker.c b/server/red_worker.c
index f899ff2..f163a71 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -6219,7 +6219,7 @@ static inline int drawable_depends_on_areas(Drawable *drawable,
     int i;
     RedDrawable *red_drawable;
     int drawable_has_shadow;
-    SpiceRect shadow_rect;
+    SpiceRect shadow_rect = {0, 0, 0, 0};
 
     red_drawable = drawable->red_drawable;
     drawable_has_shadow = has_shadow(red_drawable);


More information about the Spice-commits mailing list