ganeshmurthy commented on a change in pull request #472: Dispatch 1288 1 - 
policy for outbound connectors
URL: https://github.com/apache/qpid-dispatch/pull/472#discussion_r267843710
 
 

 ##########
 File path: src/policy.c
 ##########
 @@ -1083,15 +1119,21 @@ void qd_policy_amqp_open(qd_connection_t *qd_conn) {
         }
 
         if (qd_policy_open_lookup_user(policy, qd_conn->user_id, hostip, 
vhost, conn_name,
-                                       settings_name, SETTINGS_NAME_SIZE, 
conn_id,
-                                       qd_conn->policy_settings) &&
+                                       settings_name, SETTINGS_NAME_SIZE, 
conn_id) &&
             settings_name[0]) {
             // This connection is allowed by policy.
             // Apply transport policy settings
-            if (qd_conn->policy_settings->maxFrameSize > 0)
-                pn_transport_set_max_frame(pn_trans, 
qd_conn->policy_settings->maxFrameSize);
-            if (qd_conn->policy_settings->maxSessions > 0)
-                pn_transport_set_channel_max(pn_trans, 
qd_conn->policy_settings->maxSessions - 1);
+            if (qd_policy_open_fetch_settings(policy, qd_conn->user_id, 
hostip, vhost, conn_name,
+                                        settings_name, conn_id,
+                                        qd_conn->policy_settings)) {
+                if (qd_conn->policy_settings->maxFrameSize > 0)
+                    pn_transport_set_max_frame(pn_trans, 
qd_conn->policy_settings->maxFrameSize);
+                if (qd_conn->policy_settings->maxSessions > 0)
+                    pn_transport_set_channel_max(pn_trans, 
qd_conn->policy_settings->maxSessions - 1);
+            } else {
+                // failed to fetch settings
+                connection_allowed = false;
 
 Review comment:
   so if there was some issue fetching the policy settings from the python 
side, the connection will be closed ? Is there a way we can try to pre load the 
policy settings and warn if that fails? Please ignore this comment if this is 
already happening.  

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to