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/06/09 01:26:07 UTC

[44/50] [abbrv] qpid-proton git commit: NO-JIRA: Updated old FIXME comments, fixed racy test.

NO-JIRA: Updated old FIXME comments, fixed racy test.


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

Branch: refs/heads/go1
Commit: 11fa24dbfbd230c89efe05384aebbb086d645df8
Parents: 8c5a031
Author: Alan Conway <ac...@redhat.com>
Authored: Thu Jun 8 11:29:51 2017 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Thu Jun 8 12:47:10 2017 -0400

----------------------------------------------------------------------
 examples/cpp/mt/epoll_container.cpp          |  6 +++---
 proton-c/bindings/cpp/src/container_impl.cpp |  2 +-
 proton-c/src/proactor/epoll.c                | 16 ++++++++++++----
 proton-c/src/proactor/libuv.c                |  2 +-
 proton-c/src/tests/proactor.c                |  3 ---
 5 files changed, 17 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/11fa24db/examples/cpp/mt/epoll_container.cpp
----------------------------------------------------------------------
diff --git a/examples/cpp/mt/epoll_container.cpp b/examples/cpp/mt/epoll_container.cpp
index 7646673..5643fcc 100644
--- a/examples/cpp/mt/epoll_container.cpp
+++ b/examples/cpp/mt/epoll_container.cpp
@@ -140,9 +140,9 @@ class epoll_container : public proton::io::container_impl_base {
         std::atomic<int> count_;
     };
 
-     // FIXME aconway 2016-06-07: Unfinished
-    void schedule(proton::duration, std::function<void()>) OVERRIDE { throw std::logic_error("FIXME"); }
-    void schedule(proton::duration, proton::void_function0&) OVERRIDE { throw std::logic_error("FIXME"); }
+     // TODO aconway 2016-06-07: Unfinished
+    void schedule(proton::duration, std::function<void()>) OVERRIDE { throw std::logic_error("not implemented"); }
+    void schedule(proton::duration, proton::void_function0&) OVERRIDE { throw std::logic_error("not implemented"); }
     atomic_link_namer link_namer;
 
   private:

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/11fa24db/proton-c/bindings/cpp/src/container_impl.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/container_impl.cpp b/proton-c/bindings/cpp/src/container_impl.cpp
index d58fc09..e0851a9 100644
--- a/proton-c/bindings/cpp/src/container_impl.cpp
+++ b/proton-c/bindings/cpp/src/container_impl.cpp
@@ -161,7 +161,7 @@ container::impl::~impl() {
         close_acceptor(i->second);
 }
 
-// FIXME aconway 2016-06-07: this is not thread safe. It is sufficient for using
+// TODO aconway 2016-06-07: this is not thread safe. It is sufficient for using
 // default_container::schedule() inside a handler but not for inject() from
 // another thread.
 bool event_loop::impl::inject(void_function0& f) {

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/11fa24db/proton-c/src/proactor/epoll.c
----------------------------------------------------------------------
diff --git a/proton-c/src/proactor/epoll.c b/proton-c/src/proactor/epoll.c
index 69954d6..a0f6519 100644
--- a/proton-c/src/proactor/epoll.c
+++ b/proton-c/src/proactor/epoll.c
@@ -19,9 +19,9 @@
  *
  */
 
-/* Enable POSIX features for pthread.h */
-#ifndef _DEFAULT_SOURCE
-#define _DEFAULT_SOURCE
+/* Enable POSIX features beyond c99 for modern pthread and standard strerror_r() */
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809L
 #endif
 /* Avoid GNU extensions, in particular the incompatible alternative strerror_r() */
 #undef _GNU_SOURCE
@@ -1251,7 +1251,7 @@ void pn_proactor_listen(pn_proactor_t *p, pn_listener_t *l, const char *addr, in
     }
     assert(len > 0);            /* guaranteed by getaddrinfo */
     l->psockets = (psocket_t*)calloc(len, sizeof(psocket_t));
-    assert(l->psockets);      /* FIXME aconway 2017-05-05: memory safety */
+    assert(l->psockets);      /* TODO aconway 2017-05-05: memory safety */
     l->psockets_size = 0;
     /* Find working listen addresses */
     for (struct addrinfo *ai = addrinfo; ai; ai = ai->ai_next) {
@@ -1941,6 +1941,14 @@ const pn_netaddr_t *pn_netaddr_remote(pn_transport_t *t) {
   return pc ? &pc->remote : NULL;
 }
 
+#ifndef NI_MAXHOST
+# define NI_MAXHOST 1025
+#endif
+
+#ifndef NI_MAXSERV
+# define NI_MAXSERV 32
+#endif
+
 int pn_netaddr_str(const pn_netaddr_t* na, char *buf, size_t len) {
   char host[NI_MAXHOST];
   char port[NI_MAXSERV];

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/11fa24db/proton-c/src/proactor/libuv.c
----------------------------------------------------------------------
diff --git a/proton-c/src/proactor/libuv.c b/proton-c/src/proactor/libuv.c
index 146cd7a..7460194 100644
--- a/proton-c/src/proactor/libuv.c
+++ b/proton-c/src/proactor/libuv.c
@@ -1129,7 +1129,7 @@ void pn_proactor_cancel_timeout(pn_proactor_t *p) {
 
 void pn_proactor_connect(pn_proactor_t *p, pn_connection_t *c, const char *addr) {
   pconnection_t *pc = pconnection(p, c, false);
-  assert(pc);                                  /* FIXME aconway 2017-03-31: memory safety */
+  assert(pc);                                  /* TODO aconway 2017-03-31: memory safety */
   pn_connection_open(pc->driver.connection);   /* Auto-open */
   parse_addr(&pc->addr, addr);
   work_start(&pc->work);

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/11fa24db/proton-c/src/tests/proactor.c
----------------------------------------------------------------------
diff --git a/proton-c/src/tests/proactor.c b/proton-c/src/tests/proactor.c
index 2764f79..c41110b 100644
--- a/proton-c/src/tests/proactor.c
+++ b/proton-c/src/tests/proactor.c
@@ -691,9 +691,6 @@ static void test_ssl(test_t *t) {
   TEST_ETYPE_EQUAL(t, PN_CONNECTION_REMOTE_OPEN, PROACTOR_TEST_RUN(pts));
   TEST_COND_EMPTY(t, last_condition);
 
-  TEST_ETYPE_EQUAL(t, PN_TRANSPORT_CLOSED, PROACTOR_TEST_RUN(pts));
-  TEST_ETYPE_EQUAL(t, PN_TRANSPORT_CLOSED, PROACTOR_TEST_RUN(pts));
-
   PROACTOR_TEST_FREE(pts);
 }
 


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