qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject qpid-dispatch git commit: DISPATCH-103: Fix compile errors in WebSocket Listeners
Date Fri, 02 Dec 2016 14:34:32 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 0e3d1431f -> b4886c4d7


DISPATCH-103: Fix compile errors in WebSocket Listeners

Original code used some C11 features, failed to compile on some C99 compilers.


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

Branch: refs/heads/master
Commit: b4886c4d705241789ce412dc3390b5a892db082e
Parents: 0e3d143
Author: Alan Conway <aconway@redhat.com>
Authored: Fri Dec 2 09:26:23 2016 -0500
Committer: Alan Conway <aconway@redhat.com>
Committed: Fri Dec 2 09:34:20 2016 -0500

----------------------------------------------------------------------
 include/qpid/dispatch/driver.h | 15 ++++++++-------
 src/http-libwebsockets.c       |  4 ++--
 src/http.h                     |  3 ++-
 src/log.c                      |  2 +-
 4 files changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/b4886c4d/include/qpid/dispatch/driver.h
----------------------------------------------------------------------
diff --git a/include/qpid/dispatch/driver.h b/include/qpid/dispatch/driver.h
index cf68776..f08d54a 100644
--- a/include/qpid/dispatch/driver.h
+++ b/include/qpid/dispatch/driver.h
@@ -22,6 +22,8 @@
  *
  */
 
+#include <qpid/dispatch/log.h>
+
 #include <proton/error.h>
 #include <proton/sasl.h>
 #include <proton/selectable.h>
@@ -29,9 +31,8 @@
 #include <proton/transport.h>
 #include <proton/types.h>
 
-typedef struct qd_log_source_t qd_log_source_t;
-typedef struct qd_http_t qd_http_t;
-typedef struct qd_http_connector_t qd_http_connector_t;
+struct qd_http_t;
+struct qd_http_connector_t;
 
 /** @file
  * API for the Driver Layer.
@@ -149,10 +150,10 @@ qdpn_listener_t *qdpn_listener(qdpn_driver_t *driver,
                                const char *host,
                                const char *port,
                                const char *protocol_family,
-                               qd_http_t  *http,
+                               struct qd_http_t  *http,
                                void* context);
 
-qd_http_t *qdpn_listener_http(qdpn_listener_t *l);
+struct qd_http_t *qdpn_listener_http(qdpn_listener_t *l);
 
 /** Access the head listener for a driver.
  *
@@ -407,7 +408,7 @@ bool qdpn_connector_activated(qdpn_connector_t *connector, qdpn_activate_criteri
  * @return a new listener on the given host:port, NULL if error
  */
 qdpn_listener_t *qdpn_listener_fd(qdpn_driver_t *driver, pn_socket_t fd,
-                                  qd_http_t *http, void *context);
+                                  struct qd_http_t *http, void *context);
 
 pn_socket_t qdpn_listener_get_fd(qdpn_listener_t *listener);
 
@@ -425,7 +426,7 @@ qdpn_connector_t *qdpn_connector_fd(qdpn_driver_t *driver, pn_socket_t
fd, void
 int qdpn_connector_get_fd(qdpn_connector_t *connector);
 
 /** Get the HTTP per-connector state for this connector, NULL if not enabled. */
-qd_http_connector_t *qdpn_connector_http(qdpn_connector_t* c);
+struct qd_http_connector_t *qdpn_connector_http(qdpn_connector_t* c);
 
 /** Set the wakeup time on the connector */
 void qdpn_connector_wakeup(qdpn_connector_t* c, pn_timestamp_t t);

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/b4886c4d/src/http-libwebsockets.c
----------------------------------------------------------------------
diff --git a/src/http-libwebsockets.c b/src/http-libwebsockets.c
index 9d2b3e5..b33a0d5 100644
--- a/src/http-libwebsockets.c
+++ b/src/http-libwebsockets.c
@@ -31,13 +31,13 @@
 
 #include "http.h"
 
-typedef struct qd_http_t {
+struct qd_http_t {
     sys_mutex_t *lock;
     qd_dispatch_t *dispatch;
     qd_log_source_t *log;
     struct lws_context *context;
     qd_timer_t *timer;
-} qd_http_t;
+};
 
 /* TODO aconway 2016-11-29: First cut serializes all access to libwebsockets.
  * LWS does have multi-thread facilities but it segregates file descriptors into

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/b4886c4d/src/http.h
----------------------------------------------------------------------
diff --git a/src/http.h b/src/http.h
index d2ef982..bbfdc80 100644
--- a/src/http.h
+++ b/src/http.h
@@ -20,8 +20,9 @@
  * under the License.
  */
 
+#include <qpid/dispatch/dispatch.h>
+
 typedef struct qd_http_t qd_http_t;
-typedef struct qd_dispatch_t qd_dispatch_t;
 typedef struct qd_http_connector_t qd_http_connector_t;
 
 qd_http_t *qd_http(qd_dispatch_t *d, qd_log_source_t *log);

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/b4886c4d/src/log.c
----------------------------------------------------------------------
diff --git a/src/log.c b/src/log.c
index 074735d..06689ef 100644
--- a/src/log.c
+++ b/src/log.c
@@ -388,7 +388,7 @@ void qd_vlog_impl(qd_log_source_t *source, qd_log_level_t level, const
char *fil
       We can always decide not to look at it later,
       based on its used/unused status.
     -----------------------------------------------*/
-    level_index_t level_index = level_index_for_bit(level);
+    int level_index = level_index_for_bit(level);
     if (level_index < 0)
         qd_error_clear();
     else


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


Mime
View raw message