[GitHub] qpid-dispatch pull request #279: Dispatch 952 1

2018-04-05 Thread ganeshmurthy
Github user ganeshmurthy closed the pull request at:

https://github.com/apache/qpid-dispatch/pull/279


---

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[GitHub] qpid-dispatch pull request #279: Dispatch 952 1

2018-04-05 Thread ganeshmurthy
Github user ganeshmurthy commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/279#discussion_r179512687
  
--- Diff: src/container.c ---
@@ -756,8 +756,16 @@ qd_link_t *qd_link(qd_node_t *node, qd_connection_t 
*conn, qd_direction_t dir, c
 sys_mutex_lock(node->container->lock);
 DEQ_INSERT_TAIL(node->container->links, link);
 sys_mutex_unlock(node->container->lock);
-link->pn_sess = pn_session(qd_connection_pn(conn));
-pn_session_set_incoming_capacity(link->pn_sess, cf->incoming_capacity);
+
+bool open_session = false;
+
+if (!conn->pn_sess) {
+open_session = true;
--- End diff --

Good point. I removed it. That flag is *gone*


---

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[GitHub] qpid-dispatch pull request #279: Dispatch 952 1

2018-04-05 Thread alanconway
Github user alanconway commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/279#discussion_r179510287
  
--- Diff: src/container.c ---
@@ -756,8 +756,16 @@ qd_link_t *qd_link(qd_node_t *node, qd_connection_t 
*conn, qd_direction_t dir, c
 sys_mutex_lock(node->container->lock);
 DEQ_INSERT_TAIL(node->container->links, link);
 sys_mutex_unlock(node->container->lock);
-link->pn_sess = pn_session(qd_connection_pn(conn));
-pn_session_set_incoming_capacity(link->pn_sess, cf->incoming_capacity);
+
+bool open_session = false;
+
+if (!conn->pn_sess) {
+open_session = true;
--- End diff --

Why not just do  pn_session_open() directly here? I don't see anything that 
requires it to be delayed till the end.


---

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[GitHub] qpid-dispatch pull request #279: Dispatch 952 1

2018-04-05 Thread alanconway
Github user alanconway commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/279#discussion_r179509985
  
--- Diff: src/container.c ---
@@ -769,11 +777,12 @@ qd_link_t *qd_link(qd_node_t *node, qd_connection_t 
*conn, qd_direction_t dir, c
 link->node   = node;
 link->drain_mode = pn_link_get_drain(link->pn_link);
 link->remote_snd_settle_mode = 
pn_link_remote_snd_settle_mode(link->pn_link);
-link->close_sess_with_link = true;
+link->close_sess_with_link = false;
--- End diff --

Could delete this field entirely, it is never true


---

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[GitHub] qpid-dispatch pull request #279: Dispatch 952 1

2018-04-04 Thread ganeshmurthy
GitHub user ganeshmurthy opened a pull request:

https://github.com/apache/qpid-dispatch/pull/279

Dispatch 952 1



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ganeshmurthy/qpid-dispatch DISPATCH-952-1

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/qpid-dispatch/pull/279.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #279


commit 0af196b921412e58a2d16af96b5ee98c4d49b8a9
Author: Ganesh Murthy 
Date:   2018-04-04T20:15:31Z

DISPATCH-952 - Outgoing links initiated by the router will share a single 
session

commit 0bd1673386bc3f7c8cdb81921635b325b0b82b2a
Author: Ganesh Murthy 
Date:   2018-04-04T20:19:56Z

DISPATCH-952 - Removed printf statements




---

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org