qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gmur...@apache.org
Subject qpid-dispatch git commit: DISPATCH-473 - Remove the ssl_profile reference from config_ssl_profiles before freeing it
Date Thu, 11 Aug 2016 20:38:27 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 1612a90c6 -> 5e040568d


DISPATCH-473 - Remove the ssl_profile reference from config_ssl_profiles before freeing it


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

Branch: refs/heads/master
Commit: 5e040568d134d17126515a85dde6075bfc2e7e7b
Parents: 1612a90
Author: Ganesh Murthy <gmurthy@redhat.com>
Authored: Thu Aug 11 16:37:38 2016 -0400
Committer: Ganesh Murthy <gmurthy@redhat.com>
Committed: Thu Aug 11 16:37:38 2016 -0400

----------------------------------------------------------------------
 src/connection_manager.c       | 5 +++--
 tests/system_tests_qdmanage.py | 2 --
 2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/5e040568/src/connection_manager.c
----------------------------------------------------------------------
diff --git a/src/connection_manager.c b/src/connection_manager.c
index 9a2b415..290398b 100644
--- a/src/connection_manager.c
+++ b/src/connection_manager.c
@@ -452,6 +452,8 @@ bool qd_config_ssl_profile_free(qd_connection_manager_t *cm, qd_config_ssl_profi
     }
     sys_mutex_unlock(cm->ssl_profile_lock);
 
+    DEQ_REMOVE(cm->config_ssl_profiles, ssl_profile);
+
     free(ssl_profile->name);
     free(ssl_profile->ssl_password);
     free(ssl_profile->ssl_trusted_certificate_db);
@@ -486,8 +488,7 @@ bool qd_connection_manager_delete_ssl_profile(qd_dispatch_t *qd, void
*impl)
     qd_config_ssl_profile_t *ssl_profile = (qd_config_ssl_profile_t*) impl;
     if(ssl_profile) {
         bool freed = qd_config_ssl_profile_free(qd->connection_manager, ssl_profile);
-        if (freed)
-            DEQ_REMOVE(qd->connection_manager->config_ssl_profiles, ssl_profile);
+
         return freed;
     }
     return false;

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/5e040568/tests/system_tests_qdmanage.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_qdmanage.py b/tests/system_tests_qdmanage.py
index e98e4eb..262e16a 100644
--- a/tests/system_tests_qdmanage.py
+++ b/tests/system_tests_qdmanage.py
@@ -375,7 +375,6 @@ class QdmanageTestSsl(QdmanageTest):
                 created = True
         self.assertTrue(created)
 
-    """
     def test_create_delete_ssl_profile(self):
         long_type = 'org.apache.qpid.dispatch.sslProfile'
         ssl_profile_name = 'ssl-profile-test'
@@ -430,7 +429,6 @@ class QdmanageTestSsl(QdmanageTest):
 
         delete_command = 'DELETE --type=sslProfile --name=' + ssl_profile_name
         self.run_qdmanage(delete_command)
-    """
 
 if __name__ == '__main__':
     unittest.main(main_module())


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


Mime
View raw message