You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/03/06 23:20:31 UTC

[2/4] qpid-proton git commit: PROTON-1403: minor example and documentation fixes

PROTON-1403: minor example and documentation fixes


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

Branch: refs/heads/master
Commit: c9ee24a42a842cb24a67c042cac28f73e72d4dba
Parents: 6932dae
Author: Alan Conway <ac...@redhat.com>
Authored: Mon Mar 6 17:55:38 2017 -0500
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Mar 6 17:55:38 2017 -0500

----------------------------------------------------------------------
 examples/c/proactor/README.dox     | 2 --
 examples/c/proactor/broker.c       | 3 ++-
 proton-c/include/proton/proactor.h | 5 ++++-
 3 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/c9ee24a4/examples/c/proactor/README.dox
----------------------------------------------------------------------
diff --git a/examples/c/proactor/README.dox b/examples/c/proactor/README.dox
index 19083e5..3950a9a 100644
--- a/examples/c/proactor/README.dox
+++ b/examples/c/proactor/README.dox
@@ -18,6 +18,4 @@
  * @example broker.c
  *
  * A simple multithreaded broker that works with the @ref send.c and @ref receive.c examples.
- *
- * __Requires C++11__
  */

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/c9ee24a4/examples/c/proactor/broker.c
----------------------------------------------------------------------
diff --git a/examples/c/proactor/broker.c b/examples/c/proactor/broker.c
index 302bdec..d322ad0 100644
--- a/examples/c/proactor/broker.c
+++ b/examples/c/proactor/broker.c
@@ -252,7 +252,8 @@ static void check_condition(pn_event_t *e, pn_condition_t *cond) {
   if (pn_condition_is_set(cond)) {
     fprintf(stderr, "%s: %s: %s\n", pn_event_type_name(pn_event_type(e)),
             pn_condition_get_name(cond), pn_condition_get_description(cond));
-    pn_connection_close(pn_event_connection(e));
+    pn_connection_t *c = pn_event_connection(e);
+    if (c) pn_connection_close(c); /* It might be a listener event */
     exit_code = 1;
   }
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/c9ee24a4/proton-c/include/proton/proactor.h
----------------------------------------------------------------------
diff --git a/proton-c/include/proton/proactor.h b/proton-c/include/proton/proactor.h
index 9a8a0ad..43b8ccb 100644
--- a/proton-c/include/proton/proactor.h
+++ b/proton-c/include/proton/proactor.h
@@ -153,11 +153,14 @@ PNP_EXTERN void pn_proactor_interrupt(pn_proactor_t *proactor);
  * Cause PN_PROACTOR_TIMEOUT to be returned to a thread calling wait()
  * after timeout milliseconds. Thread-safe.
  *
- * Note that calling pn_proactor_set_timeout() again before the
+ * Note: calling pn_proactor_set_timeout() again before the
  * PN_PROACTOR_TIMEOUT is delivered will cancel the previous timeout
  * and deliver an event only after the new
  * timeout. `pn_proactor_set_timeout(0)` will cancel the timeout
  * without setting a new one.
+ *
+ * Note: PN_PROACTOR_TIMEOUT events will be delivered in series, never
+ * concurrently.
  */
 PNP_EXTERN void pn_proactor_set_timeout(pn_proactor_t *proactor, pn_millis_t timeout);
 


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