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-414 - Additional fix. Missed out setting role in qd_user_fd() in server.c
Date Thu, 04 Aug 2016 19:50:39 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/master bff877e1a -> 24297270b


DISPATCH-414 - Additional fix. Missed out setting role in qd_user_fd() in server.c


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

Branch: refs/heads/master
Commit: 24297270b8750657520bf447796a2c6453c19b07
Parents: bff877e
Author: Ganesh Murthy <gmurthy@redhat.com>
Authored: Thu Aug 4 15:50:18 2016 -0400
Committer: Ganesh Murthy <gmurthy@redhat.com>
Committed: Thu Aug 4 15:50:18 2016 -0400

----------------------------------------------------------------------
 src/server.c | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/24297270/src/server.c
----------------------------------------------------------------------
diff --git a/src/server.c b/src/server.c
index ee6f8b6..41bfa3f 100644
--- a/src/server.c
+++ b/src/server.c
@@ -1771,6 +1771,14 @@ qd_user_fd_t *qd_user_fd(qd_dispatch_t *qd, int fd, void *context)
     ctx->deferred_call_lock = sys_mutex();
     ctx->event_stall  = false;
     ctx->policy_counted = false;
+    ctx->role           = 0;
+
+    // Copy the role from the connector config
+    if (ctx->connector && ctx->connector->config) {
+        int role_length    = strlen(ctx->connector->config->role) + 1;
+        ctx->role          = (char*) malloc(role_length);
+        strcpy(ctx->role, ctx->connector->config->role);
+    }
 
     ufd->context = context;
     ufd->server  = qd_server;


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


Mime
View raw message