You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2016/04/08 22:00:42 UTC

qpid-dispatch git commit: DISPATCH-266 - Additional fix. Missed out initializing free_user_id and user_id in qd_user_fd() function. Thanks crolke

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master b3d62eb90 -> 1dd0f4194


DISPATCH-266 - Additional fix. Missed out initializing free_user_id and user_id in qd_user_fd() function. Thanks crolke


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/1dd0f419
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/1dd0f419
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/1dd0f419

Branch: refs/heads/master
Commit: 1dd0f4194056b9ded78e8b273252309423fd90e9
Parents: b3d62eb
Author: Ganesh Murthy <gm...@redhat.com>
Authored: Fri Apr 8 16:00:12 2016 -0400
Committer: Ganesh Murthy <gm...@redhat.com>
Committed: Fri Apr 8 16:00:12 2016 -0400

----------------------------------------------------------------------
 src/server.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dd0f419/src/server.c
----------------------------------------------------------------------
diff --git a/src/server.c b/src/server.c
index 21a8865..16035d5 100644
--- a/src/server.c
+++ b/src/server.c
@@ -371,18 +371,23 @@ qd_error_t qd_entity_refresh_connection(qd_entity_t* entity, void *impl)
         qd_entity_set_bool(entity, "isAuthenticated", tport && pn_transport_is_authenticated(tport)) == 0 &&
         qd_entity_set_bool(entity, "isEncrypted", tport && pn_transport_is_encrypted(tport)) == 0 &&
         qd_entity_set_bool(entity, "ssl", ssl != 0) == 0) {
+
         if (ssl) {
-#define SSL_ATTR_SIZE 50
+            #define SSL_ATTR_SIZE 50
             char proto[SSL_ATTR_SIZE];
             char cipher[SSL_ATTR_SIZE];
             pn_ssl_get_protocol_name(ssl, proto, SSL_ATTR_SIZE);
             pn_ssl_get_cipher_name(ssl, cipher, SSL_ATTR_SIZE);
-            qd_entity_set_string(entity, "sslProto", proto);
-            qd_entity_set_string(entity, "sslCipher", cipher);
-            qd_entity_set_long(entity, "sslSsf", pn_ssl_get_ssf(ssl));
+            if (qd_entity_set_string(entity, "sslProto", proto)   == 0 &&
+                qd_entity_set_string(entity, "sslCipher", cipher) == 0 &&
+                qd_entity_set_long(entity, "sslSsf", pn_ssl_get_ssf(ssl)) == 0) {
+                    return QD_ERROR_NONE;
+            }
         }
-        return QD_ERROR_NONE;
+        else
+            return QD_ERROR_NONE;
     }
+
     return qd_error_code();
 }
 
@@ -1646,6 +1651,8 @@ qd_user_fd_t *qd_user_fd(qd_dispatch_t *qd, int fd, void *context)
     ctx->user_context = 0;
     ctx->link_context = 0;
     ctx->ufd          = ufd;
+    ctx->user_id       = 0;
+    ctx->free_user_id  = false;
     ctx->policy_settings = 0;
     ctx->n_senders       = 0;
     ctx->n_receivers     = 0;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org