qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject qpid-proton git commit: PROTON-793: Add windows version of commit 7359e3e improvements to selectables/selector for new C reactor
Date Fri, 09 Jan 2015 15:31:00 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master 8c35ce407 -> 93f296fce


PROTON-793: Add windows version of commit 7359e3e improvements to selectables/selector for
new C reactor


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

Branch: refs/heads/master
Commit: 93f296fce091d06f97c9f97f677967fb73eb186e
Parents: 8c35ce4
Author: Chuck Rolke <chug@redhat.com>
Authored: Fri Jan 9 10:29:06 2015 -0500
Committer: Chuck Rolke <chug@redhat.com>
Committed: Fri Jan 9 10:29:06 2015 -0500

----------------------------------------------------------------------
 proton-c/src/windows/selector.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/93f296fc/proton-c/src/windows/selector.c
----------------------------------------------------------------------
diff --git a/proton-c/src/windows/selector.c b/proton-c/src/windows/selector.c
index 5d80044..149eb58 100644
--- a/proton-c/src/windows/selector.c
+++ b/proton-c/src/windows/selector.c
@@ -195,7 +195,17 @@ void pn_selector_remove(pn_selector_t *selector, pn_selectable_t *selectable)
     pn_selectable_t *sel = (pn_selectable_t *) pn_list_get(selector->selectables, i);
     pni_selectable_set_index(sel, i);
   }
+
   pni_selectable_set_index(selectable, -1);
+
+  if (selector->current >= (size_t) idx) {
+    selector->current--;
+  }
+}
+
+size_t pn_selector_size(pn_selector_t *selector) {
+  assert(selector);
+  return pn_list_size(selector->selectables);
 }
 
 int pn_selector_select(pn_selector_t *selector, int timeout)


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


Mime
View raw message