You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2013/11/19 20:21:32 UTC

svn commit: r1543534 [2/8] - in /qpid/dispatch/trunk: ./ etc/ include/qpid/dispatch/ python/qpiddx/router/ router/ router/src/ src/ tests/ tools/src/py/

Modified: qpid/dispatch/trunk/include/qpid/dispatch/server.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/server.h?rev=1543534&r1=1543533&r2=1543534&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/server.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/server.h Tue Nov 19 19:21:30 2013
@@ -36,10 +36,10 @@
  * This handler can be used to set processor affinity or other thread-specific
  * tuning values.
  *
- * @param context The handler context supplied in dx_server_initialize.
+ * @param context The handler context supplied in qd_server_initialize.
  * @param thread_id The integer thread identifier that uniquely identifies this thread.
  */
-typedef void (*dx_thread_start_cb_t)(void* context, int thread_id);
+typedef void (*qd_thread_start_cb_t)(void* context, int thread_id);
 
 
 /**
@@ -49,11 +49,11 @@ typedef void (*dx_thread_start_cb_t)(voi
  * started.  This may be used to set tuning settings like processor affinity,
  * etc.
  *
- * @param dx The dispatch handle returned by dx_dispatch.
+ * @param qd The dispatch handle returned by qd_dispatch.
  * @param start_handler The thread-start handler invoked per thread on thread startup.
  * @param context Opaque context to be passed back in the callback function.
  */
-void dx_server_set_start_handler(dx_dispatch_t *dx, dx_thread_start_cb_t start_handler, void *context);
+void qd_server_set_start_handler(qd_dispatch_t *qd, qd_thread_start_cb_t start_handler, void *context);
 
 
 /**
@@ -61,12 +61,12 @@ void dx_server_set_start_handler(dx_disp
  *
  * Start the operation of the server, including launching all of the worker
  * threads.  This function does not return until after the server has been
- * stopped.  The thread that calls dx_server_run is used as one of the worker
+ * stopped.  The thread that calls qd_server_run is used as one of the worker
  * threads.
  *
- * @param dx The dispatch handle returned by dx_dispatch.
+ * @param qd The dispatch handle returned by qd_dispatch.
  */
-void dx_server_run(dx_dispatch_t *dx);
+void qd_server_run(qd_dispatch_t *qd);
 
 
 /**
@@ -75,9 +75,9 @@ void dx_server_run(dx_dispatch_t *dx);
  * Start the operation of the server, including launching all of the worker
  * threads.
  *
- * @param dx The dispatch handle returned by dx_dispatch.
+ * @param qd The dispatch handle returned by qd_dispatch.
  */
-void dx_server_start(dx_dispatch_t *dx);
+void qd_server_start(qd_dispatch_t *qd);
 
 
 /**
@@ -88,9 +88,9 @@ void dx_server_start(dx_dispatch_t *dx);
  * server threads have been closed and joined.  The calling thread will be the
  * only running thread in the process.
  *
- * @param dx The dispatch handle returned by dx_dispatch.
+ * @param qd The dispatch handle returned by qd_dispatch.
  */
-void dx_server_stop(dx_dispatch_t *dx);
+void qd_server_stop(qd_dispatch_t *qd);
 
 
 /**
@@ -103,9 +103,9 @@ void dx_server_stop(dx_dispatch_t *dx);
  * If the calling process is *not* one of the server's worker threads, then
  * this function will block all of the worker threads before returning.
  *
- * @param dx The dispatch handle returned by dx_dispatch.
+ * @param qd The dispatch handle returned by qd_dispatch.
  */
-void dx_server_pause(dx_dispatch_t *dx);
+void qd_server_pause(qd_dispatch_t *qd);
 
 
 /**
@@ -114,9 +114,9 @@ void dx_server_pause(dx_dispatch_t *dx);
  * This call unblocks all of the worker threads so they can resume normal
  * connection processing.
  *
- * @param dx The dispatch handle returned by dx_dispatch.
+ * @param qd The dispatch handle returned by qd_dispatch.
  */
-void dx_server_resume(dx_dispatch_t *dx);
+void qd_server_resume(qd_dispatch_t *qd);
 
 
 /**
@@ -131,24 +131,24 @@ void dx_server_resume(dx_dispatch_t *dx)
  *
  * Callback for signal handling.  This handler will be invoked on one of the
  * worker threads in an orderly fashion.  This callback is triggered by a call
- * to dx_server_signal.
+ * to qd_server_signal.
  *
- * @param context The handler context supplied in dx_server_initialize.
- * @param signum The signal number that was passed into dx_server_signal.
+ * @param context The handler context supplied in qd_server_initialize.
+ * @param signum The signal number that was passed into qd_server_signal.
  */
-typedef void (*dx_signal_handler_cb_t)(void* context, int signum);
+typedef void (*qd_signal_handler_cb_t)(void* context, int signum);
 
 
 /**
  * Set the signal handler for the server.  The signal handler is invoked
- * cleanly on a worker thread after a call is made to dx_server_signal.  The
+ * cleanly on a worker thread after a call is made to qd_server_signal.  The
  * signal handler is optional and need not be set.
  *
- * @param dx The dispatch handle returned by dx_dispatch.
+ * @param qd The dispatch handle returned by qd_dispatch.
  * @param signal_handler The signal handler called when a registered signal is caught.
  * @param context Opaque context to be passed back in the callback function.
  */
-void dx_server_set_signal_handler(dx_dispatch_t *dx, dx_signal_handler_cb_t signal_handler, void *context);
+void qd_server_set_signal_handler(qd_dispatch_t *qd, qd_signal_handler_cb_t signal_handler, void *context);
 
 
 /**
@@ -158,10 +158,10 @@ void dx_server_set_signal_handler(dx_dis
  * handler or an Interrupt Service Routine.  It schedules the orderly
  * invocation of the Server's signal handler on one of the worker threads.
  *
- * @param dx The dispatch handle returned by dx_dispatch.
+ * @param qd The dispatch handle returned by qd_dispatch.
  * @param signum The signal number... TODO
  */
-void dx_server_signal(dx_dispatch_t *dx, int signum);
+void qd_server_signal(qd_dispatch_t *qd, int signum);
 
 
 /**
@@ -173,40 +173,40 @@ void dx_server_signal(dx_dispatch_t *dx,
 /**
  * \brief Listener objects represent the desire to accept incoming transport connections.
  */
-typedef struct dx_listener_t dx_listener_t;
+typedef struct qd_listener_t qd_listener_t;
 
 /**
  * \brief Connector objects represent the desire to create and maintain an outgoing transport connection.
  */
-typedef struct dx_connector_t dx_connector_t;
+typedef struct qd_connector_t qd_connector_t;
 
 /**
  * \brief Connection objects wrap Proton connection objects.
  */
-typedef struct dx_connection_t dx_connection_t;
+typedef struct qd_connection_t qd_connection_t;
 
 /**
  * \brief Event type for the connection callback.
  */
 typedef enum {
     /// The connection just opened via a listener (inbound).
-    DX_CONN_EVENT_LISTENER_OPEN,
+    QD_CONN_EVENT_LISTENER_OPEN,
 
     /// The connection just opened via a connector (outbound).
-    DX_CONN_EVENT_CONNECTOR_OPEN,
+    QD_CONN_EVENT_CONNECTOR_OPEN,
 
     /// The connection was closed at the transport level (not cleanly).
-    DX_CONN_EVENT_CLOSE,
+    QD_CONN_EVENT_CLOSE,
 
     /// The connection requires processing.
-    DX_CONN_EVENT_PROCESS
-} dx_conn_event_t;
+    QD_CONN_EVENT_PROCESS
+} qd_conn_event_t;
 
 
 /**
  * \brief Configuration block for a connector or a listener.
  */
-typedef struct dx_server_config_t {
+typedef struct qd_server_config_t {
     /**
      * Host name or network address to bind to a listener or use in the connector.
      */
@@ -300,7 +300,7 @@ typedef struct dx_server_config_t {
      * capabilities of the connections.
      */
     const char *role;
-} dx_server_config_t;
+} qd_server_config_t;
 
 
 /**
@@ -313,62 +313,62 @@ typedef struct dx_server_config_t {
  * that it has exclusive access to the connection and its subservient
  * components (sessions, links, deliveries, etc.).
  *
- * @param handler_context The handler context supplied in dx_server_set_conn_handler.
- * @param conn_context The handler context supplied in dx_server_{connect,listen}.
+ * @param handler_context The handler context supplied in qd_server_set_conn_handler.
+ * @param conn_context The handler context supplied in qd_server_{connect,listen}.
  * @param event The event/reason for the invocation of the handler.
  * @param conn The connection that requires processing by the handler.
  * @return A value greater than zero if the handler did any proton processing for
  *         the connection.  If no work was done, zero is returned.
  */
-typedef int (*dx_conn_handler_cb_t)(void *handler_context, void* conn_context, dx_conn_event_t event, dx_connection_t *conn);
+typedef int (*qd_conn_handler_cb_t)(void *handler_context, void* conn_context, qd_conn_event_t event, qd_connection_t *conn);
 
 
 /**
  * \brief Set the connection event handler callback.
  *
  * Set the connection handler callback for the server.  This callback is
- * mandatory and must be set prior to the invocation of dx_server_run.
+ * mandatory and must be set prior to the invocation of qd_server_run.
  *
- * @param dx The dispatch handle returned by dx_dispatch.
+ * @param qd The dispatch handle returned by qd_dispatch.
  * @param conn_hander The handler for processing connection-related events.
  */
-void dx_server_set_conn_handler(dx_dispatch_t *dx, dx_conn_handler_cb_t conn_handler, void *handler_context);
+void qd_server_set_conn_handler(qd_dispatch_t *qd, qd_conn_handler_cb_t conn_handler, void *handler_context);
 
 
 /**
  * \brief Set the user context for a connection.
  *
- * @param conn Connection object supplied in DX_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
+ * @param conn Connection object supplied in QD_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
  * @param context User context to be stored with the connection.
  */
-void dx_connection_set_context(dx_connection_t *conn, void *context);
+void qd_connection_set_context(qd_connection_t *conn, void *context);
 
 
 /**
  * \brief Get the user context from a connection.
  *
- * @param conn Connection object supplied in DX_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
+ * @param conn Connection object supplied in QD_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
  * @return The user context stored with the connection.
  */
-void *dx_connection_get_context(dx_connection_t *conn);
+void *qd_connection_get_context(qd_connection_t *conn);
 
 
 /**
  * \brief Set the link context for a connection.
  *
- * @param conn Connection object supplied in DX_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
+ * @param conn Connection object supplied in QD_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
  * @param context Link context to be stored with the connection.
  */
-void dx_connection_set_link_context(dx_connection_t *conn, void *context);
+void qd_connection_set_link_context(qd_connection_t *conn, void *context);
 
 
 /**
  * \brief Get the link context from a connection.
  *
- * @param conn Connection object supplied in DX_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
+ * @param conn Connection object supplied in QD_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
  * @return The link context stored with the connection.
  */
-void *dx_connection_get_link_context(dx_connection_t *conn);
+void *qd_connection_get_link_context(qd_connection_t *conn);
 
 
 /**
@@ -382,75 +382,75 @@ void *dx_connection_get_link_context(dx_
  *
  * @param conn The connection over which the application wishes to send data
  */
-void dx_server_activate(dx_connection_t *conn);
+void qd_server_activate(qd_connection_t *conn);
 
 
 /**
  * \brief Get the wrapped proton-engine connection object.
  *
- * @param conn Connection object supplied in DX_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
+ * @param conn Connection object supplied in QD_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
  * @return The proton connection object.
  */
-pn_connection_t *dx_connection_pn(dx_connection_t *conn);
+pn_connection_t *qd_connection_pn(qd_connection_t *conn);
 
 
 /**
  * \brief Get the configuration that was used in the setup of this connection.
  *
- * @param conn Connection object supplied in DX_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
+ * @param conn Connection object supplied in QD_CONN_EVENT_{LISTENER,CONNETOR}_OPEN
  * @return A pointer to the server configuration used in the establishment of this connection.
  */
-const dx_server_config_t *dx_connection_config(const dx_connection_t *conn);
+const qd_server_config_t *qd_connection_config(const qd_connection_t *conn);
 
 
 /**
  * \brief Create a listener for incoming connections.
  *
- * @param dx The dispatch handle returned by dx_dispatch.
+ * @param qd The dispatch handle returned by qd_dispatch.
  * @param config Pointer to a configuration block for this listener.  This block will be
  *               referenced by the server, not copied.  The referenced record must remain
  *               in-scope for the life of the listener.
  * @param context User context passed back in the connection handler.
  * @return A pointer to the new listener, or NULL in case of failure.
  */
-dx_listener_t *dx_server_listen(dx_dispatch_t *dx, const dx_server_config_t *config, void *context);
+qd_listener_t *qd_server_listen(qd_dispatch_t *qd, const qd_server_config_t *config, void *context);
 
 
 /**
  * \brief Free the resources associated with a listener.
  *
- * @param li A listener pointer returned by dx_listen.
+ * @param li A listener pointer returned by qd_listen.
  */
-void dx_listener_free(dx_listener_t* li);
+void qd_listener_free(qd_listener_t* li);
 
 
 /**
  * \brief Close a listener so it will accept no more connections.
  *
- * @param li A listener pointer returned by dx_listen.
+ * @param li A listener pointer returned by qd_listen.
  */
-void dx_listener_close(dx_listener_t* li);
+void qd_listener_close(qd_listener_t* li);
 
 
 /**
  * \brief Create a connector for an outgoing connection.
  *
- * @param dx The dispatch handle returned by dx_dispatch.
+ * @param qd The dispatch handle returned by qd_dispatch.
  * @param config Pointer to a configuration block for this connector.  This block will be
  *               referenced by the server, not copied.  The referenced record must remain
  *               in-scope for the life of the connector..
  * @param context User context passed back in the connection handler.
  * @return A pointer to the new connector, or NULL in case of failure.
  */
-dx_connector_t *dx_server_connect(dx_dispatch_t *dx, const dx_server_config_t *config, void *context);
+qd_connector_t *qd_server_connect(qd_dispatch_t *qd, const qd_server_config_t *config, void *context);
 
 
 /**
  * \brief Free the resources associated with a connector.
  *
- * @param ct A connector pointer returned by dx_connect.
+ * @param ct A connector pointer returned by qd_connect.
  */
-void dx_connector_free(dx_connector_t* ct);
+void qd_connector_free(qd_connector_t* ct);
 
 /**
  * @}

Modified: qpid/dispatch/trunk/include/qpid/dispatch/timer.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/timer.h?rev=1543534&r1=1543533&r2=1543534&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/timer.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/timer.h Tue Nov 19 19:21:30 2013
@@ -27,16 +27,16 @@
  * @{
  */
 
-typedef struct dx_timer_t dx_timer_t;
+typedef struct qd_timer_t qd_timer_t;
 
 /**
  * Timer Callback
  *
  * Callback invoked after a timer's interval expires and the timer fires.
  *
- * @param context The context supplied in dx_timer
+ * @param context The context supplied in qd_timer
  */
-typedef void (*dx_timer_cb_t)(void* context);
+typedef void (*qd_timer_cb_t)(void* context);
 
 
 /**
@@ -46,7 +46,7 @@ typedef void (*dx_timer_cb_t)(void* cont
  * @param context An opaque, user-supplied context to be passed into the callback.
  * @return A pointer to the new timer object or NULL if memory is exhausted.
  */
-dx_timer_t *dx_timer(dx_dispatch_t *dx, dx_timer_cb_t cb, void* context);
+qd_timer_t *qd_timer(qd_dispatch_t *qd, qd_timer_cb_t cb, void* context);
 
 
 /**
@@ -54,23 +54,23 @@ dx_timer_t *dx_timer(dx_dispatch_t *dx, 
  * prior to freeing.  After this function returns, the callback will not be invoked for this
  * timer.
  *
- * @param timer Pointer to the timer object returned by dx_timer.
+ * @param timer Pointer to the timer object returned by qd_timer.
  */
-void dx_timer_free(dx_timer_t *timer);
+void qd_timer_free(qd_timer_t *timer);
 
 
 /**
  * Schedule a timer to fire in the future.
  *
  * Note that the timer callback will never be invoked synchronously during the execution
- * of dx_timer_schedule.  Even if the interval is immediate (0), the callback invocation will
+ * of qd_timer_schedule.  Even if the interval is immediate (0), the callback invocation will
  * be asynchronous and after the return of this function.
  *
- * @param timer Pointer to the timer object returned by dx_timer.
+ * @param timer Pointer to the timer object returned by qd_timer.
  * @param msec The minimum number of milliseconds of delay until the timer fires.
  *             If 0 is supplied, the timer will be scheduled to fire immediately.
  */
-void dx_timer_schedule(dx_timer_t *timer, long msec);
+void qd_timer_schedule(qd_timer_t *timer, long msec);
 
 
 /**
@@ -78,9 +78,9 @@ void dx_timer_schedule(dx_timer_t *timer
  * server thread, it is always possible that a last-second cancel attempt may arrive too late
  * to stop the timer from firing (i.e. the cancel is concurrent with the fire callback).
  *
- * @param timer Pointer to the timer object returned by dx_timer.
+ * @param timer Pointer to the timer object returned by qd_timer.
  */
-void dx_timer_cancel(dx_timer_t *timer);
+void qd_timer_cancel(qd_timer_t *timer);
 
 /**
  * @}

Modified: qpid/dispatch/trunk/include/qpid/dispatch/user_fd.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/include/qpid/dispatch/user_fd.h?rev=1543534&r1=1543533&r2=1543534&view=diff
==============================================================================
--- qpid/dispatch/trunk/include/qpid/dispatch/user_fd.h (original)
+++ qpid/dispatch/trunk/include/qpid/dispatch/user_fd.h Tue Nov 19 19:21:30 2013
@@ -27,7 +27,7 @@
  * @{
  */
 
-typedef struct dx_user_fd_t dx_user_fd_t;
+typedef struct qd_user_fd_t qd_user_fd_t;
 
 
 /**
@@ -36,17 +36,17 @@ typedef struct dx_user_fd_t dx_user_fd_t
  * Callback invoked when a user-managed file descriptor is available for reading or writing or there
  * was an error on the file descriptor.
  *
- * @param context The handler context supplied in the dx_user_fd call.
+ * @param context The handler context supplied in the qd_user_fd call.
  * @param ufd The user_fd handle for the processable fd.
  */
-typedef void (*dx_user_fd_handler_cb_t)(void* context, dx_user_fd_t *ufd);
+typedef void (*qd_user_fd_handler_cb_t)(void* context, qd_user_fd_t *ufd);
 
 
 /**
  * Set the user-fd handler callback for the server.  This handler is optional, but must be supplied
- * if the dx_server is used to manage the activation of user file descriptors.
+ * if the qd_server is used to manage the activation of user file descriptors.
  */
-void dx_server_set_user_fd_handler(dx_dispatch_t *dx, dx_user_fd_handler_cb_t ufd_handler);
+void qd_server_set_user_fd_handler(qd_dispatch_t *qd, qd_user_fd_handler_cb_t ufd_handler);
 
 
 /**
@@ -60,39 +60,39 @@ void dx_server_set_user_fd_handler(dx_di
  * @param context User context passed back in the connection handler.
  * @return A pointer to the new user_fd.
  */
-dx_user_fd_t *dx_user_fd(dx_dispatch_t *dx, int fd, void *context);
+qd_user_fd_t *qd_user_fd(qd_dispatch_t *qd, int fd, void *context);
 
 
 /**
  * Free the resources for a user-managed FD tracker.
  *
- * @param ufd Structure pointer returned by dx_user_fd.
+ * @param ufd Structure pointer returned by qd_user_fd.
  */
-void dx_user_fd_free(dx_user_fd_t *ufd);
+void qd_user_fd_free(qd_user_fd_t *ufd);
 
 
 /**
  * Activate a user-fd for read.
  *
  * Use this activation when the application has capacity to receive data from the user-fd.  This will
- * cause the callback set in dx_server_set_user_fd_handler to later be invoked when the
+ * cause the callback set in qd_server_set_user_fd_handler to later be invoked when the
  * file descriptor has data to read.
  *
- * @param ufd Structure pointer returned by dx_user_fd.
+ * @param ufd Structure pointer returned by qd_user_fd.
  */
-void dx_user_fd_activate_read(dx_user_fd_t *ufd);
+void qd_user_fd_activate_read(qd_user_fd_t *ufd);
 
 
 /**
  * Activate a user-fd for write.
  *
  * Use this activation when the application has data to write via the user-fd.  This will
- * cause the callback set in dx_server_set_user_fd_handler to later be invoked when the
+ * cause the callback set in qd_server_set_user_fd_handler to later be invoked when the
  * file descriptor is writable.
  *
- * @param ufd Structure pointer returned by dx_user_fd.
+ * @param ufd Structure pointer returned by qd_user_fd.
  */
-void dx_user_fd_activate_write(dx_user_fd_t *ufd);
+void qd_user_fd_activate_write(qd_user_fd_t *ufd);
 
 
 /**
@@ -102,19 +102,19 @@ void dx_user_fd_activate_write(dx_user_f
  *       but the file-descriptor is not readable and will block if not set to O_NONBLOCK).
  *       Code accordingly.
  *
- * @param ufd Structure pointer returned by dx_user_fd.
+ * @param ufd Structure pointer returned by qd_user_fd.
  * @return true iff the user file descriptor is readable.
  */
-bool dx_user_fd_is_readable(dx_user_fd_t *ufd);
+bool qd_user_fd_is_readable(qd_user_fd_t *ufd);
 
 
 /**
  * Check writable status of a user-fd
  *
- * @param ufd Structure pointer returned by dx_user_fd.
+ * @param ufd Structure pointer returned by qd_user_fd.
  * @return true iff the user file descriptor is writable.
  */
-bool dx_user_fd_is_writeable(dx_user_fd_t *ufd);
+bool qd_user_fd_is_writeable(qd_user_fd_t *ufd);
 
 /**
  * @}

Modified: qpid/dispatch/trunk/python/qpiddx/router/link.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpiddx/router/link.py?rev=1543534&r1=1543533&r2=1543534&view=diff
==============================================================================
--- qpid/dispatch/trunk/python/qpiddx/router/link.py (original)
+++ qpid/dispatch/trunk/python/qpiddx/router/link.py Tue Nov 19 19:21:30 2013
@@ -102,7 +102,7 @@ class LinkStateEngine(object):
         if self.id not in self.collection:
             return
         my_ls = self.collection[self.id]
-        self.container.send('amqp:/_topo/%s/%s/qdxrouter' % (msg.area, msg.id), MessageLSU(None, self.id, self.area, my_ls.ls_seq, my_ls))
+        self.container.send('amqp:/_topo/%s/%s/qdrouter' % (msg.area, msg.id), MessageLSU(None, self.id, self.area, my_ls.ls_seq, my_ls))
 
 
     def new_local_link_state(self, link_state):
@@ -133,7 +133,7 @@ class LinkStateEngine(object):
 
     def _send_lsrs(self):
         for (_area, _id) in self.needed_lsrs.keys():
-            self.container.send('amqp:/_topo/%s/%s/qdxrouter' % (_area, _id), MessageLSR(None, self.id, self.area))
+            self.container.send('amqp:/_topo/%s/%s/qdrouter' % (_area, _id), MessageLSR(None, self.id, self.area))
         self.needed_lsrs = {}
 
 
@@ -141,4 +141,4 @@ class LinkStateEngine(object):
         ls_seq = 0
         if self.id in self.collection:
             ls_seq = self.collection[self.id].ls_seq
-        self.container.send('amqp:/_topo/%s/all/qdxrouter' % self.area, MessageRA(None, self.id, self.area, ls_seq, self.mobile_seq))
+        self.container.send('amqp:/_topo/%s/all/qdrouter' % self.area, MessageRA(None, self.id, self.area, ls_seq, self.mobile_seq))

Modified: qpid/dispatch/trunk/python/qpiddx/router/mobile.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpiddx/router/mobile.py?rev=1543534&r1=1543533&r2=1543534&view=diff
==============================================================================
--- qpid/dispatch/trunk/python/qpiddx/router/mobile.py (original)
+++ qpid/dispatch/trunk/python/qpiddx/router/mobile.py Tue Nov 19 19:21:30 2013
@@ -56,7 +56,7 @@ class MobileAddressEngine(object):
         ##
         if len(self.added_addrs) > 0 or len(self.deleted_addrs) > 0:
             self.mobile_seq += 1
-            self.container.send('amqp:/_topo/%s/all/qdxrouter' % self.area,
+            self.container.send('amqp:/_topo/%s/all/qdrouter' % self.area,
                                 MessageMAU(None, self.id, self.area, self.mobile_seq, self.added_addrs, self.deleted_addrs))
             self.local_addrs.extend(self.added_addrs)
             for addr in self.deleted_addrs:
@@ -160,7 +160,7 @@ class MobileAddressEngine(object):
         if msg.id == self.id:
             return
         if msg.have_seq < self.mobile_seq:
-            self.container.send('amqp:/_topo/%s/%s/qdxrouter' % (msg.area, msg.id),
+            self.container.send('amqp:/_topo/%s/%s/qdrouter' % (msg.area, msg.id),
                                 MessageMAU(None, self.id, self.area, self.mobile_seq, None, None, self.local_addrs))
 
 
@@ -174,7 +174,7 @@ class MobileAddressEngine(object):
 
     def _send_mars(self):
         for _id, _area, _seq in self.needed_mars.keys():
-            self.container.send('amqp:/_topo/%s/%s/qdxrouter' % (_area, _id), MessageMAR(None, self.id, self.area, _seq))
+            self.container.send('amqp:/_topo/%s/%s/qdrouter' % (_area, _id), MessageMAR(None, self.id, self.area, _seq))
         self.needed_mars = {}
 
 

Modified: qpid/dispatch/trunk/python/qpiddx/router/neighbor.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpiddx/router/neighbor.py?rev=1543534&r1=1543533&r2=1543534&view=diff
==============================================================================
--- qpid/dispatch/trunk/python/qpiddx/router/neighbor.py (original)
+++ qpid/dispatch/trunk/python/qpiddx/router/neighbor.py Tue Nov 19 19:21:30 2013
@@ -49,7 +49,7 @@ class NeighborEngine(object):
 
         if now - self.last_hello_time >= self.hello_interval:
             self.last_hello_time = now
-            self.container.send('amqp:/_local/qdxhello', MessageHELLO(None, self.id, self.area, self.hellos.keys()))
+            self.container.send('amqp:/_local/qdhello', MessageHELLO(None, self.id, self.area, self.hellos.keys()))
 
         if self.link_state_changed:
             self.link_state_changed = False

Modified: qpid/dispatch/trunk/python/qpiddx/router/router_engine.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpiddx/router/router_engine.py?rev=1543534&r1=1543533&r2=1543534&view=diff
==============================================================================
--- qpid/dispatch/trunk/python/qpiddx/router/router_engine.py (original)
+++ qpid/dispatch/trunk/python/qpiddx/router/router_engine.py Tue Nov 19 19:21:30 2013
@@ -56,7 +56,7 @@ class RouterEngine:
         self.domain         = "domain"
         self.router_adapter = router_adapter
         self.log_adapter    = LogAdapter("dispatch.router")
-        self.io_adapter     = IoAdapter(self, ("qdxrouter", "qdxhello"))
+        self.io_adapter     = IoAdapter(self, ("qdrouter", "qdhello"))
         self.max_routers    = max_routers
         self.id             = router_id
         self.area           = area
@@ -228,7 +228,7 @@ class RouterEngine:
         """
         app_props = {'opcode' : msg.get_opcode() }
         self.io_adapter.send(dest, app_props, msg.to_dict())
-        if "qdxhello" in dest:
+        if "qdhello" in dest:
             self.log(LOG_TRACE, "SENT: %r dest=%s" % (msg, dest))
         else:
             self.log(LOG_DEBUG, "SENT: %r dest=%s" % (msg, dest))

Modified: qpid/dispatch/trunk/router/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/router/CMakeLists.txt?rev=1543534&r1=1543533&r2=1543534&view=diff
==============================================================================
--- qpid/dispatch/trunk/router/CMakeLists.txt (original)
+++ qpid/dispatch/trunk/router/CMakeLists.txt Tue Nov 19 19:21:30 2013
@@ -18,7 +18,7 @@
 ##
 
 
-set(DEFAULT_CONFIG_PATH "/etc/qpid/qpid-dxrouter.conf" CACHE string "Default Config File Path")
+set(DEFAULT_CONFIG_PATH "/etc/qpid-dispatch/qdrouterd.conf" CACHE string "Default config file path")
 
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
 
@@ -31,8 +31,7 @@ set(router_SOURCES
     src/main.c
     )
 
-add_executable(qpid-dxrouterd ${router_SOURCES})
-target_link_libraries(qpid-dxrouterd qpid-dispatch ${proton_lib})
-
-install(TARGETS qpid-dxrouterd RUNTIME DESTINATION sbin)
+add_executable(qdrouterd ${router_SOURCES})
+target_link_libraries(qdrouterd qpid-dispatch ${proton_lib})
 
+install(TARGETS qdrouterd RUNTIME DESTINATION sbin)

Modified: qpid/dispatch/trunk/router/src/main.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/router/src/main.c?rev=1543534&r1=1543533&r2=1543534&view=diff
==============================================================================
--- qpid/dispatch/trunk/router/src/main.c (original)
+++ qpid/dispatch/trunk/router/src/main.c Tue Nov 19 19:21:30 2013
@@ -26,7 +26,7 @@
 #include "config.h"
 
 static int            exit_with_sigint = 0;
-static dx_dispatch_t *dispatch;
+static qd_dispatch_t *dispatch;
 
 
 /**
@@ -44,17 +44,17 @@ static void thread_start_handler(void* c
  */
 static void signal_handler(int signum)
 {
-    dx_server_signal(dispatch, signum);
+    qd_server_signal(dispatch, signum);
 }
 
 
 /**
  * This signal handler is called cleanly by one of the server's worker threads in
- * response to an earlier call to dx_server_signal.
+ * response to an earlier call to qd_server_signal.
  */
 static void server_signal_handler(void* context, int signum)
 {
-    dx_server_pause(dispatch);
+    qd_server_pause(dispatch);
 
     switch (signum) {
     case SIGINT:
@@ -63,7 +63,7 @@ static void server_signal_handler(void* 
     case SIGQUIT:
     case SIGTERM:
         fflush(stdout);
-        dx_server_stop(dispatch);
+        qd_server_stop(dispatch);
         break;
 
     case SIGHUP:
@@ -73,15 +73,15 @@ static void server_signal_handler(void* 
         break;
     }
 
-    dx_server_resume(dispatch);
+    qd_server_resume(dispatch);
 }
 
 
 static void startup(void *context)
 {
-    dx_server_pause(dispatch);
-    dx_dispatch_configure(dispatch);
-    dx_server_resume(dispatch);
+    qd_server_pause(dispatch);
+    qd_dispatch_configure(dispatch);
+    qd_server_resume(dispatch);
 }
 
 
@@ -117,23 +117,23 @@ int main(int argc, char **argv)
         }
     }
 
-    dx_log_set_mask(0xFFFFFFFE);
+    qd_log_set_mask(0xFFFFFFFE);
 
-    dispatch = dx_dispatch(config_path);
+    dispatch = qd_dispatch(config_path);
 
-    dx_server_set_signal_handler(dispatch, server_signal_handler, 0);
-    dx_server_set_start_handler(dispatch, thread_start_handler, 0);
+    qd_server_set_signal_handler(dispatch, server_signal_handler, 0);
+    qd_server_set_start_handler(dispatch, thread_start_handler, 0);
 
-    dx_timer_t *startup_timer = dx_timer(dispatch, startup, 0);
-    dx_timer_schedule(startup_timer, 0);
+    qd_timer_t *startup_timer = qd_timer(dispatch, startup, 0);
+    qd_timer_schedule(startup_timer, 0);
 
     signal(SIGHUP,  signal_handler);
     signal(SIGQUIT, signal_handler);
     signal(SIGTERM, signal_handler);
     signal(SIGINT,  signal_handler);
 
-    dx_server_run(dispatch);
-    dx_dispatch_free(dispatch);
+    qd_server_run(dispatch);
+    qd_dispatch_free(dispatch);
 
     if (exit_with_sigint) {
 	signal(SIGINT, SIG_DFL);

Modified: qpid/dispatch/trunk/src/agent.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/agent.c?rev=1543534&r1=1543533&r2=1543534&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/agent.c (original)
+++ qpid/dispatch/trunk/src/agent.c Tue Nov 19 19:21:30 2013
@@ -35,115 +35,115 @@
 #include <string.h>
 #include <stdio.h>
 
-struct dx_agent_class_t {
-    DEQ_LINKS(dx_agent_class_t);
-    dx_hash_handle_t     *hash_handle;
+struct qd_agent_class_t {
+    DEQ_LINKS(qd_agent_class_t);
+    qd_hash_handle_t     *hash_handle;
     void                 *context;
-    dx_agent_schema_cb_t  schema_handler;
-    dx_agent_query_cb_t   query_handler;  // 0 iff class is an event.
+    qd_agent_schema_cb_t  schema_handler;
+    qd_agent_query_cb_t   query_handler;  // 0 iff class is an event.
 };
 
-DEQ_DECLARE(dx_agent_class_t, dx_agent_class_list_t);
+DEQ_DECLARE(qd_agent_class_t, qd_agent_class_list_t);
 
 
-struct dx_agent_t {
-    dx_dispatch_t         *dx;
-    dx_hash_t             *class_hash;
-    dx_agent_class_list_t  class_list;
-    dx_message_list_t      in_fifo;
-    dx_message_list_t      out_fifo;
+struct qd_agent_t {
+    qd_dispatch_t         *qd;
+    qd_hash_t             *class_hash;
+    qd_agent_class_list_t  class_list;
+    qd_message_list_t      in_fifo;
+    qd_message_list_t      out_fifo;
     sys_mutex_t           *lock;
-    dx_timer_t            *timer;
-    dx_address_t          *address;
-    dx_agent_class_t      *container_class;
+    qd_timer_t            *timer;
+    qd_address_t          *address;
+    qd_agent_class_t      *container_class;
 };
 
 
 typedef struct {
-    dx_agent_t          *agent;
-    dx_composed_field_t *response;
+    qd_agent_t          *agent;
+    qd_composed_field_t *response;
     int                  empty;
-} dx_agent_request_t;
+} qd_agent_request_t;
 
 
 static char *log_module = "AGENT";
 
 
-static void dx_agent_check_empty(dx_agent_request_t *request)
+static void qd_agent_check_empty(qd_agent_request_t *request)
 {
     if (request->empty) {
         request->empty = 0;
-        dx_compose_start_map(request->response);
+        qd_compose_start_map(request->response);
     }
 }
 
 
-static dx_composed_field_t *dx_agent_setup_response(dx_field_iterator_t *reply_to, dx_field_iterator_t *cid)
+static qd_composed_field_t *qd_agent_setup_response(qd_field_iterator_t *reply_to, qd_field_iterator_t *cid)
 {
-    dx_composed_field_t *field = 0;
+    qd_composed_field_t *field = 0;
 
     //
     // Compose the Properties
     //
-    field = dx_compose(DX_PERFORMATIVE_PROPERTIES, field);
-    dx_compose_start_list(field);
-    dx_compose_insert_null(field);                       // message-id
-    dx_compose_insert_null(field);                       // user-id
-    dx_compose_insert_string_iterator(field, reply_to);  // to
-    dx_compose_insert_null(field);                       // subject
-    dx_compose_insert_null(field);                       // reply-to
+    field = qd_compose(QD_PERFORMATIVE_PROPERTIES, field);
+    qd_compose_start_list(field);
+    qd_compose_insert_null(field);                       // message-id
+    qd_compose_insert_null(field);                       // user-id
+    qd_compose_insert_string_iterator(field, reply_to);  // to
+    qd_compose_insert_null(field);                       // subject
+    qd_compose_insert_null(field);                       // reply-to
     if (cid)
-        dx_compose_insert_typed_iterator(field, cid);    // correlation-id
+        qd_compose_insert_typed_iterator(field, cid);    // correlation-id
     //else
-    //    dx_compose_insert_null(field);
-    dx_compose_end_list(field);
+    //    qd_compose_insert_null(field);
+    qd_compose_end_list(field);
 
     //
     // Compose the Application Properties
     //
-    field = dx_compose(DX_PERFORMATIVE_APPLICATION_PROPERTIES, field);
-    dx_compose_start_map(field);
-    dx_compose_insert_string(field, "status-code");
-    dx_compose_insert_uint(field, 200);
-
-    dx_compose_insert_string(field, "status-descriptor");
-    dx_compose_insert_string(field, "OK");
-    dx_compose_end_map(field);
+    field = qd_compose(QD_PERFORMATIVE_APPLICATION_PROPERTIES, field);
+    qd_compose_start_map(field);
+    qd_compose_insert_string(field, "status-code");
+    qd_compose_insert_uint(field, 200);
+
+    qd_compose_insert_string(field, "status-descriptor");
+    qd_compose_insert_string(field, "OK");
+    qd_compose_end_map(field);
 
     return field;
 }
 
 
-static void dx_agent_process_get(dx_agent_t          *agent,
-                                 dx_parsed_field_t   *map,
-                                 dx_field_iterator_t *reply_to,
-                                 dx_field_iterator_t *cid)
+static void qd_agent_process_get(qd_agent_t          *agent,
+                                 qd_parsed_field_t   *map,
+                                 qd_field_iterator_t *reply_to,
+                                 qd_field_iterator_t *cid)
 {
-    dx_parsed_field_t *cls = dx_parse_value_by_key(map, "type");
+    qd_parsed_field_t *cls = qd_parse_value_by_key(map, "type");
     if (cls == 0)
         return;
 
-    dx_field_iterator_t    *cls_string = dx_parse_raw(cls);
-    const dx_agent_class_t *cls_record;
-    dx_hash_retrieve_const(agent->class_hash, cls_string, (const void**) &cls_record);
+    qd_field_iterator_t    *cls_string = qd_parse_raw(cls);
+    const qd_agent_class_t *cls_record;
+    qd_hash_retrieve_const(agent->class_hash, cls_string, (const void**) &cls_record);
     if (cls_record == 0)
         return;
 
-    dx_log(log_module, LOG_TRACE, "Received GET request for type: %s", dx_hash_key_by_handle(cls_record->hash_handle));
+    qd_log(log_module, LOG_TRACE, "Received GET request for type: %s", qd_hash_key_by_handle(cls_record->hash_handle));
 
-    dx_composed_field_t *field = dx_agent_setup_response(reply_to, cid);
+    qd_composed_field_t *field = qd_agent_setup_response(reply_to, cid);
 
     //
     // Open the Body (AMQP Value) to be filled in by the handler.
     //
-    field = dx_compose(DX_PERFORMATIVE_BODY_AMQP_VALUE, field);
-    dx_compose_start_list(field);
+    field = qd_compose(QD_PERFORMATIVE_BODY_AMQP_VALUE, field);
+    qd_compose_start_list(field);
 
     //
     // The request record is allocated locally because the entire processing of the request
     // will be done synchronously.
     //
-    dx_agent_request_t request;
+    qd_agent_request_t request;
     request.agent    = agent;
     request.response = field;
     request.empty    = 1;
@@ -153,230 +153,230 @@ static void dx_agent_process_get(dx_agen
     //
     // The response is complete, close the list.
     //
-    dx_compose_end_list(field);
+    qd_compose_end_list(field);
 
     //
     // Create a message and send it.
     //
-    dx_message_t *msg = dx_message();
-    dx_message_compose_2(msg, field);
-    dx_router_send(agent->dx, reply_to, msg);
+    qd_message_t *msg = qd_message();
+    qd_message_compose_2(msg, field);
+    qd_router_send(agent->qd, reply_to, msg);
 
-    dx_message_free(msg);
-    dx_compose_free(field);
+    qd_message_free(msg);
+    qd_compose_free(field);
 }
 
 
-static void dx_agent_process_discover_types(dx_agent_t          *agent,
-                                            dx_parsed_field_t   *map,
-                                            dx_field_iterator_t *reply_to,
-                                            dx_field_iterator_t *cid)
+static void qd_agent_process_discover_types(qd_agent_t          *agent,
+                                            qd_parsed_field_t   *map,
+                                            qd_field_iterator_t *reply_to,
+                                            qd_field_iterator_t *cid)
 {
-    dx_log(log_module, LOG_TRACE, "Received DISCOVER-TYPES request");
+    qd_log(log_module, LOG_TRACE, "Received DISCOVER-TYPES request");
 
-    dx_composed_field_t *field = dx_agent_setup_response(reply_to, cid);
+    qd_composed_field_t *field = qd_agent_setup_response(reply_to, cid);
 
     //
     // Open the Body (AMQP Value) to be filled in by the handler.
     //
-    field = dx_compose(DX_PERFORMATIVE_BODY_AMQP_VALUE, field);
-    dx_compose_start_map(field);
+    field = qd_compose(QD_PERFORMATIVE_BODY_AMQP_VALUE, field);
+    qd_compose_start_map(field);
 
     //
     // Put entries into the map for each known entity type
     //
     sys_mutex_lock(agent->lock);
-    dx_agent_class_t *cls = DEQ_HEAD(agent->class_list);
+    qd_agent_class_t *cls = DEQ_HEAD(agent->class_list);
     while (cls) {
-        dx_compose_insert_string(field, (const char*) dx_hash_key_by_handle(cls->hash_handle));
-        dx_compose_empty_list(field);
+        qd_compose_insert_string(field, (const char*) qd_hash_key_by_handle(cls->hash_handle));
+        qd_compose_empty_list(field);
         cls = DEQ_NEXT(cls);
     }
     sys_mutex_unlock(agent->lock);
-    dx_compose_end_map(field);
+    qd_compose_end_map(field);
 
     //
     // Create a message and send it.
     //
-    dx_message_t *msg = dx_message();
-    dx_message_compose_2(msg, field);
-    dx_router_send(agent->dx, reply_to, msg);
+    qd_message_t *msg = qd_message();
+    qd_message_compose_2(msg, field);
+    qd_router_send(agent->qd, reply_to, msg);
 
-    dx_message_free(msg);
-    dx_compose_free(field);
+    qd_message_free(msg);
+    qd_compose_free(field);
 }
 
 
-static void dx_agent_process_discover_operations(dx_agent_t          *agent,
-                                                 dx_parsed_field_t   *map,
-                                                 dx_field_iterator_t *reply_to,
-                                                 dx_field_iterator_t *cid)
+static void qd_agent_process_discover_operations(qd_agent_t          *agent,
+                                                 qd_parsed_field_t   *map,
+                                                 qd_field_iterator_t *reply_to,
+                                                 qd_field_iterator_t *cid)
 {
-    dx_log(log_module, LOG_TRACE, "Received DISCOVER-OPERATIONS request");
+    qd_log(log_module, LOG_TRACE, "Received DISCOVER-OPERATIONS request");
 
-    dx_composed_field_t *field = dx_agent_setup_response(reply_to, cid);
+    qd_composed_field_t *field = qd_agent_setup_response(reply_to, cid);
 
     //
     // Open the Body (AMQP Value) to be filled in by the handler.
     //
-    field = dx_compose(DX_PERFORMATIVE_BODY_AMQP_VALUE, field);
-    dx_compose_start_map(field);
+    field = qd_compose(QD_PERFORMATIVE_BODY_AMQP_VALUE, field);
+    qd_compose_start_map(field);
 
     //
     // Put entries into the map for each known entity type
     //
     sys_mutex_lock(agent->lock);
-    dx_agent_class_t *cls = DEQ_HEAD(agent->class_list);
+    qd_agent_class_t *cls = DEQ_HEAD(agent->class_list);
     while (cls) {
-        dx_compose_insert_string(field, (const char*) dx_hash_key_by_handle(cls->hash_handle));
-        dx_compose_start_list(field);
-        dx_compose_insert_string(field, "READ");
-        dx_compose_end_list(field);
+        qd_compose_insert_string(field, (const char*) qd_hash_key_by_handle(cls->hash_handle));
+        qd_compose_start_list(field);
+        qd_compose_insert_string(field, "READ");
+        qd_compose_end_list(field);
         cls = DEQ_NEXT(cls);
     }
     sys_mutex_unlock(agent->lock);
-    dx_compose_end_map(field);
+    qd_compose_end_map(field);
 
     //
     // Create a message and send it.
     //
-    dx_message_t *msg = dx_message();
-    dx_message_compose_2(msg, field);
-    dx_router_send(agent->dx, reply_to, msg);
+    qd_message_t *msg = qd_message();
+    qd_message_compose_2(msg, field);
+    qd_router_send(agent->qd, reply_to, msg);
 
-    dx_message_free(msg);
-    dx_compose_free(field);
+    qd_message_free(msg);
+    qd_compose_free(field);
 }
 
 
-static void dx_agent_process_discover_nodes(dx_agent_t          *agent,
-                                            dx_parsed_field_t   *map,
-                                            dx_field_iterator_t *reply_to,
-                                            dx_field_iterator_t *cid)
+static void qd_agent_process_discover_nodes(qd_agent_t          *agent,
+                                            qd_parsed_field_t   *map,
+                                            qd_field_iterator_t *reply_to,
+                                            qd_field_iterator_t *cid)
 {
-    dx_log(log_module, LOG_TRACE, "Received DISCOVER-MGMT-NODES request");
+    qd_log(log_module, LOG_TRACE, "Received DISCOVER-MGMT-NODES request");
 
-    dx_composed_field_t *field = dx_agent_setup_response(reply_to, cid);
+    qd_composed_field_t *field = qd_agent_setup_response(reply_to, cid);
 
     //
     // Open the Body (AMQP Value) to be filled in by the handler.
     //
-    field = dx_compose(DX_PERFORMATIVE_BODY_AMQP_VALUE, field);
+    field = qd_compose(QD_PERFORMATIVE_BODY_AMQP_VALUE, field);
 
     //
     // Put entries into the list for each known management node
     //
-    dx_compose_start_list(field);
-    dx_compose_insert_string(field, "amqp:/_local/$management");
-    dx_router_build_node_list(agent->dx, field);
-    dx_compose_end_list(field);
+    qd_compose_start_list(field);
+    qd_compose_insert_string(field, "amqp:/_local/$management");
+    qd_router_build_node_list(agent->qd, field);
+    qd_compose_end_list(field);
 
     //
     // Create a message and send it.
     //
-    dx_message_t *msg = dx_message();
-    dx_message_compose_2(msg, field);
-    dx_router_send(agent->dx, reply_to, msg);
+    qd_message_t *msg = qd_message();
+    qd_message_compose_2(msg, field);
+    qd_router_send(agent->qd, reply_to, msg);
 
-    dx_message_free(msg);
-    dx_compose_free(field);
+    qd_message_free(msg);
+    qd_compose_free(field);
 }
 
 
-static void dx_agent_process_request(dx_agent_t *agent, dx_message_t *msg)
+static void qd_agent_process_request(qd_agent_t *agent, qd_message_t *msg)
 {
     //
     // Parse the message through the body and exit if the message is not well formed.
     //
-    if (!dx_message_check(msg, DX_DEPTH_BODY))
+    if (!qd_message_check(msg, QD_DEPTH_BODY))
         return;
 
     //
     // Get an iterator for the application-properties.  Exit if the message has none.
     //
-    dx_field_iterator_t *ap = dx_message_field_iterator(msg, DX_FIELD_APPLICATION_PROPERTIES);
+    qd_field_iterator_t *ap = qd_message_field_iterator(msg, QD_FIELD_APPLICATION_PROPERTIES);
     if (ap == 0)
         return;
 
     //
     // Get an iterator for the reply-to.  Exit if not found.
     //
-    dx_field_iterator_t *reply_to = dx_message_field_iterator(msg, DX_FIELD_REPLY_TO);
+    qd_field_iterator_t *reply_to = qd_message_field_iterator(msg, QD_FIELD_REPLY_TO);
     if (reply_to == 0)
         return;
 
     //
     // Try to get a map-view of the application-properties.
     //
-    dx_parsed_field_t *map = dx_parse(ap);
+    qd_parsed_field_t *map = qd_parse(ap);
     if (map == 0) {
-        dx_field_iterator_free(ap);
-        dx_field_iterator_free(reply_to);
+        qd_field_iterator_free(ap);
+        qd_field_iterator_free(reply_to);
         return;
     }
 
     //
     // Exit if there was a parsing error.
     //
-    if (!dx_parse_ok(map)) {
-        dx_log(log_module, LOG_TRACE, "Received unparsable App Properties: %s", dx_parse_error(map));
-        dx_field_iterator_free(ap);
-        dx_field_iterator_free(reply_to);
-        dx_parse_free(map);
+    if (!qd_parse_ok(map)) {
+        qd_log(log_module, LOG_TRACE, "Received unparsable App Properties: %s", qd_parse_error(map));
+        qd_field_iterator_free(ap);
+        qd_field_iterator_free(reply_to);
+        qd_parse_free(map);
         return;
     }
 
     //
     // Exit if it is not a map.
     //
-    if (!dx_parse_is_map(map)) {
-        dx_field_iterator_free(ap);
-        dx_field_iterator_free(reply_to);
-        dx_parse_free(map);
+    if (!qd_parse_is_map(map)) {
+        qd_field_iterator_free(ap);
+        qd_field_iterator_free(reply_to);
+        qd_parse_free(map);
         return;
     }
 
     //
     // Get an iterator for the "operation" field in the map.  Exit if the key is not found.
     //
-    dx_parsed_field_t *operation = dx_parse_value_by_key(map, "operation");
+    qd_parsed_field_t *operation = qd_parse_value_by_key(map, "operation");
     if (operation == 0) {
-        dx_parse_free(map);
-        dx_field_iterator_free(ap);
-        dx_field_iterator_free(reply_to);
+        qd_parse_free(map);
+        qd_field_iterator_free(ap);
+        qd_field_iterator_free(reply_to);
         return;
     }
 
     //
     // Get an iterator for the correlation_id.
     //
-    dx_field_iterator_t *cid = dx_message_field_iterator_typed(msg, DX_FIELD_CORRELATION_ID);
+    qd_field_iterator_t *cid = qd_message_field_iterator_typed(msg, QD_FIELD_CORRELATION_ID);
 
     //
     // Dispatch the operation to the appropriate handler
     //
-    dx_field_iterator_t *operation_string = dx_parse_raw(operation);
-    if (dx_field_iterator_equal(operation_string, (unsigned char*) "GET"))
-        dx_agent_process_get(agent, map, reply_to, cid);
-    if (dx_field_iterator_equal(operation_string, (unsigned char*) "DISCOVER-TYPES"))
-        dx_agent_process_discover_types(agent, map, reply_to, cid);
-    if (dx_field_iterator_equal(operation_string, (unsigned char*) "DISCOVER-OPERATIONS"))
-        dx_agent_process_discover_operations(agent, map, reply_to, cid);
-    if (dx_field_iterator_equal(operation_string, (unsigned char*) "DISCOVER-MGMT-NODES"))
-        dx_agent_process_discover_nodes(agent, map, reply_to, cid);
-
-    dx_parse_free(map);
-    dx_field_iterator_free(ap);
-    dx_field_iterator_free(reply_to);
+    qd_field_iterator_t *operation_string = qd_parse_raw(operation);
+    if (qd_field_iterator_equal(operation_string, (unsigned char*) "GET"))
+        qd_agent_process_get(agent, map, reply_to, cid);
+    if (qd_field_iterator_equal(operation_string, (unsigned char*) "DISCOVER-TYPES"))
+        qd_agent_process_discover_types(agent, map, reply_to, cid);
+    if (qd_field_iterator_equal(operation_string, (unsigned char*) "DISCOVER-OPERATIONS"))
+        qd_agent_process_discover_operations(agent, map, reply_to, cid);
+    if (qd_field_iterator_equal(operation_string, (unsigned char*) "DISCOVER-MGMT-NODES"))
+        qd_agent_process_discover_nodes(agent, map, reply_to, cid);
+
+    qd_parse_free(map);
+    qd_field_iterator_free(ap);
+    qd_field_iterator_free(reply_to);
     if (cid)
-        dx_field_iterator_free(cid);
+        qd_field_iterator_free(cid);
 }
 
 
-static void dx_agent_deferred_handler(void *context)
+static void qd_agent_deferred_handler(void *context)
 {
-    dx_agent_t   *agent = (dx_agent_t*) context;
-    dx_message_t *msg;
+    qd_agent_t   *agent = (qd_agent_t*) context;
+    qd_message_t *msg;
 
     do {
         sys_mutex_lock(agent->lock);
@@ -386,182 +386,182 @@ static void dx_agent_deferred_handler(vo
         sys_mutex_unlock(agent->lock);
 
         if (msg) {
-            dx_agent_process_request(agent, msg);
-            dx_message_free(msg);
+            qd_agent_process_request(agent, msg);
+            qd_message_free(msg);
         }
     } while (msg);
 }
 
 
-static void dx_agent_rx_handler(void *context, dx_message_t *msg, int unused_link_id)
+static void qd_agent_rx_handler(void *context, qd_message_t *msg, int unused_link_id)
 {
-    dx_agent_t   *agent = (dx_agent_t*) context;
-    dx_message_t *copy  = dx_message_copy(msg);
+    qd_agent_t   *agent = (qd_agent_t*) context;
+    qd_message_t *copy  = qd_message_copy(msg);
 
     sys_mutex_lock(agent->lock);
     DEQ_INSERT_TAIL(agent->in_fifo, copy);
     sys_mutex_unlock(agent->lock);
 
-    dx_timer_schedule(agent->timer, 0);
+    qd_timer_schedule(agent->timer, 0);
 }
 
 
-static dx_agent_class_t *dx_agent_register_class_LH(dx_agent_t           *agent,
+static qd_agent_class_t *qd_agent_register_class_LH(qd_agent_t           *agent,
                                                     const char           *fqname,
                                                     void                 *context,
-                                                    dx_agent_schema_cb_t  schema_handler,
-                                                    dx_agent_query_cb_t   query_handler)
+                                                    qd_agent_schema_cb_t  schema_handler,
+                                                    qd_agent_query_cb_t   query_handler)
 {
-    dx_agent_class_t *cls = NEW(dx_agent_class_t);
+    qd_agent_class_t *cls = NEW(qd_agent_class_t);
     assert(cls);
     DEQ_ITEM_INIT(cls);
     cls->context        = context;
     cls->schema_handler = schema_handler;
     cls->query_handler  = query_handler;
 
-    dx_field_iterator_t *iter = dx_field_iterator_string(fqname, ITER_VIEW_ALL);
-    int result = dx_hash_insert_const(agent->class_hash, iter, cls, &cls->hash_handle);
-    dx_field_iterator_free(iter);
+    qd_field_iterator_t *iter = qd_field_iterator_string(fqname, ITER_VIEW_ALL);
+    int result = qd_hash_insert_const(agent->class_hash, iter, cls, &cls->hash_handle);
+    qd_field_iterator_free(iter);
     if (result < 0)
         assert(false);
 
     DEQ_INSERT_TAIL(agent->class_list, cls);
 
-    dx_log(log_module, LOG_INFO, "Manageable Entity Type (%s) %s", query_handler ? "object" : "event", fqname);
+    qd_log(log_module, LOG_INFO, "Manageable Entity Type (%s) %s", query_handler ? "object" : "event", fqname);
     return cls;
 }
 
 
-dx_agent_t *dx_agent(dx_dispatch_t *dx)
+qd_agent_t *qd_agent(qd_dispatch_t *qd)
 {
-    dx_agent_t *agent = NEW(dx_agent_t);
-    agent->dx         = dx;
-    agent->class_hash = dx_hash(6, 10, 1);
+    qd_agent_t *agent = NEW(qd_agent_t);
+    agent->qd         = qd;
+    agent->class_hash = qd_hash(6, 10, 1);
     DEQ_INIT(agent->class_list);
     DEQ_INIT(agent->in_fifo);
     DEQ_INIT(agent->out_fifo);
     agent->lock    = sys_mutex();
-    agent->timer   = dx_timer(dx, dx_agent_deferred_handler, agent);
-    agent->address = dx_router_register_address(dx, "$management", dx_agent_rx_handler, agent);
+    agent->timer   = qd_timer(qd, qd_agent_deferred_handler, agent);
+    agent->address = qd_router_register_address(qd, "$management", qd_agent_rx_handler, agent);
 
     return agent;
 }
 
 
-void dx_agent_free(dx_agent_t *agent)
+void qd_agent_free(qd_agent_t *agent)
 {
-    dx_router_unregister_address(agent->address);
+    qd_router_unregister_address(agent->address);
     sys_mutex_free(agent->lock);
-    dx_timer_free(agent->timer);
-    dx_hash_free(agent->class_hash);
+    qd_timer_free(agent->timer);
+    qd_hash_free(agent->class_hash);
     free(agent);
 }
 
 
-dx_agent_class_t *dx_agent_register_class(dx_dispatch_t        *dx,
+qd_agent_class_t *qd_agent_register_class(qd_dispatch_t        *qd,
                                           const char           *fqname,
                                           void                 *context,
-                                          dx_agent_schema_cb_t  schema_handler,
-                                          dx_agent_query_cb_t   query_handler)
+                                          qd_agent_schema_cb_t  schema_handler,
+                                          qd_agent_query_cb_t   query_handler)
 {
-    dx_agent_t       *agent = dx->agent;
-    dx_agent_class_t *cls;
+    qd_agent_t       *agent = qd->agent;
+    qd_agent_class_t *cls;
 
     sys_mutex_lock(agent->lock);
-    cls = dx_agent_register_class_LH(agent, fqname, context, schema_handler, query_handler);
+    cls = qd_agent_register_class_LH(agent, fqname, context, schema_handler, query_handler);
     sys_mutex_unlock(agent->lock);
     return cls;
 }
 
 
-dx_agent_class_t *dx_agent_register_event(dx_dispatch_t        *dx,
+qd_agent_class_t *qd_agent_register_event(qd_dispatch_t        *qd,
                                           const char           *fqname,
                                           void                 *context,
-                                          dx_agent_schema_cb_t  schema_handler)
+                                          qd_agent_schema_cb_t  schema_handler)
 {
-    return dx_agent_register_class(dx, fqname, context, schema_handler, 0);
+    return qd_agent_register_class(qd, fqname, context, schema_handler, 0);
 }
 
 
-void dx_agent_value_string(void *correlator, const char *key, const char *value)
+void qd_agent_value_string(void *correlator, const char *key, const char *value)
 {
-    dx_agent_request_t *request = (dx_agent_request_t*) correlator;
-    dx_agent_check_empty(request);
-    dx_compose_insert_string(request->response, key);
-    dx_compose_insert_string(request->response, value);
+    qd_agent_request_t *request = (qd_agent_request_t*) correlator;
+    qd_agent_check_empty(request);
+    qd_compose_insert_string(request->response, key);
+    qd_compose_insert_string(request->response, value);
 }
 
 
-void dx_agent_value_uint(void *correlator, const char *key, uint64_t value)
+void qd_agent_value_uint(void *correlator, const char *key, uint64_t value)
 {
-    dx_agent_request_t *request = (dx_agent_request_t*) correlator;
-    dx_agent_check_empty(request);
-    dx_compose_insert_string(request->response, key);
-    dx_compose_insert_uint(request->response, value);
+    qd_agent_request_t *request = (qd_agent_request_t*) correlator;
+    qd_agent_check_empty(request);
+    qd_compose_insert_string(request->response, key);
+    qd_compose_insert_uint(request->response, value);
 }
 
 
-void dx_agent_value_null(void *correlator, const char *key)
+void qd_agent_value_null(void *correlator, const char *key)
 {
-    dx_agent_request_t *request = (dx_agent_request_t*) correlator;
-    dx_agent_check_empty(request);
-    dx_compose_insert_string(request->response, key);
-    dx_compose_insert_null(request->response);
+    qd_agent_request_t *request = (qd_agent_request_t*) correlator;
+    qd_agent_check_empty(request);
+    qd_compose_insert_string(request->response, key);
+    qd_compose_insert_null(request->response);
 }
 
 
-void dx_agent_value_boolean(void *correlator, const char *key, bool value)
+void qd_agent_value_boolean(void *correlator, const char *key, bool value)
 {
-    dx_agent_request_t *request = (dx_agent_request_t*) correlator;
-    dx_agent_check_empty(request);
-    dx_compose_insert_string(request->response, key);
-    dx_compose_insert_bool(request->response, value);
+    qd_agent_request_t *request = (qd_agent_request_t*) correlator;
+    qd_agent_check_empty(request);
+    qd_compose_insert_string(request->response, key);
+    qd_compose_insert_bool(request->response, value);
 }
 
 
-void dx_agent_value_binary(void *correlator, const char *key, const uint8_t *value, size_t len)
+void qd_agent_value_binary(void *correlator, const char *key, const uint8_t *value, size_t len)
 {
-    dx_agent_request_t *request = (dx_agent_request_t*) correlator;
-    dx_agent_check_empty(request);
-    dx_compose_insert_string(request->response, key);
-    dx_compose_insert_binary(request->response, value, len);
+    qd_agent_request_t *request = (qd_agent_request_t*) correlator;
+    qd_agent_check_empty(request);
+    qd_compose_insert_string(request->response, key);
+    qd_compose_insert_binary(request->response, value, len);
 }
 
 
-void dx_agent_value_uuid(void *correlator, const char *key, const uint8_t *value)
+void qd_agent_value_uuid(void *correlator, const char *key, const uint8_t *value)
 {
-    dx_agent_request_t *request = (dx_agent_request_t*) correlator;
-    dx_agent_check_empty(request);
-    dx_compose_insert_string(request->response, key);
-    dx_compose_insert_uuid(request->response, value);
+    qd_agent_request_t *request = (qd_agent_request_t*) correlator;
+    qd_agent_check_empty(request);
+    qd_compose_insert_string(request->response, key);
+    qd_compose_insert_uuid(request->response, value);
 }
 
 
-void dx_agent_value_timestamp(void *correlator, const char *key, uint64_t value)
+void qd_agent_value_timestamp(void *correlator, const char *key, uint64_t value)
 {
-    dx_agent_request_t *request = (dx_agent_request_t*) correlator;
-    dx_agent_check_empty(request);
-    dx_compose_insert_string(request->response, key);
-    dx_compose_insert_timestamp(request->response, value);
+    qd_agent_request_t *request = (qd_agent_request_t*) correlator;
+    qd_agent_check_empty(request);
+    qd_compose_insert_string(request->response, key);
+    qd_compose_insert_timestamp(request->response, value);
 }
 
 
-void dx_agent_value_complete(void *correlator, bool more)
+void qd_agent_value_complete(void *correlator, bool more)
 {
-    dx_agent_request_t *request = (dx_agent_request_t*) correlator;
+    qd_agent_request_t *request = (qd_agent_request_t*) correlator;
 
     if (!more && request->empty)
         return;
 
     assert (!more || !request->empty);
 
-    dx_compose_end_map(request->response);
+    qd_compose_end_map(request->response);
     if (more)
-        dx_compose_start_map(request->response);
+        qd_compose_start_map(request->response);
 }
 
 
-void *dx_agent_raise_event(dx_dispatch_t *dx, dx_agent_class_t *event)
+void *qd_agent_raise_event(qd_dispatch_t *qd, qd_agent_class_t *event)
 {
     return 0;
 }

Modified: qpid/dispatch/trunk/src/alloc.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/alloc.c?rev=1543534&r1=1543533&r2=1543534&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/alloc.c (original)
+++ qpid/dispatch/trunk/src/alloc.c Tue Nov 19 19:21:30 2013
@@ -24,48 +24,48 @@
 #include <memory.h>
 #include <stdio.h>
 
-#define DX_MEMORY_DEBUG 1
+#define QD_MEMORY_DEBUG 1
 
-typedef struct dx_alloc_type_t dx_alloc_type_t;
-typedef struct dx_alloc_item_t dx_alloc_item_t;
+typedef struct qd_alloc_type_t qd_alloc_type_t;
+typedef struct qd_alloc_item_t qd_alloc_item_t;
 
-struct dx_alloc_type_t {
-    DEQ_LINKS(dx_alloc_type_t);
-    dx_alloc_type_desc_t *desc;
+struct qd_alloc_type_t {
+    DEQ_LINKS(qd_alloc_type_t);
+    qd_alloc_type_desc_t *desc;
 };
 
-DEQ_DECLARE(dx_alloc_type_t, dx_alloc_type_list_t);
+DEQ_DECLARE(qd_alloc_type_t, qd_alloc_type_list_t);
 
 #define PATTERN_FRONT 0xdeadbeef
 #define PATTERN_BACK  0xbabecafe
 
-struct dx_alloc_item_t {
-    DEQ_LINKS(dx_alloc_item_t);
-#ifdef DX_MEMORY_DEBUG
-    dx_alloc_type_desc_t *desc;
+struct qd_alloc_item_t {
+    DEQ_LINKS(qd_alloc_item_t);
+#ifdef QD_MEMORY_DEBUG
+    qd_alloc_type_desc_t *desc;
     uint32_t              header;
 #endif
 };
 
-DEQ_DECLARE(dx_alloc_item_t, dx_alloc_item_list_t);
+DEQ_DECLARE(qd_alloc_item_t, qd_alloc_item_list_t);
 
 
-struct dx_alloc_pool_t {
-    dx_alloc_item_list_t free_list;
+struct qd_alloc_pool_t {
+    qd_alloc_item_list_t free_list;
 };
 
-dx_alloc_config_t dx_alloc_default_config_big   = {16,  32, 0};
-dx_alloc_config_t dx_alloc_default_config_small = {64, 128, 0};
+qd_alloc_config_t qd_alloc_default_config_big   = {16,  32, 0};
+qd_alloc_config_t qd_alloc_default_config_small = {64, 128, 0};
 #define BIG_THRESHOLD 256
 
 static sys_mutex_t          *init_lock = 0;
-static dx_alloc_type_list_t  type_list;
+static qd_alloc_type_list_t  type_list;
 
-static void dx_alloc_init(dx_alloc_type_desc_t *desc)
+static void qd_alloc_init(qd_alloc_type_desc_t *desc)
 {
     sys_mutex_lock(init_lock);
 
-    //dx_log("ALLOC", LOG_TRACE, "Initialized Allocator - type=%s type-size=%d total-size=%d",
+    //qd_log("ALLOC", LOG_TRACE, "Initialized Allocator - type=%s type-size=%d total-size=%d",
     //       desc->type_name, desc->type_size, desc->total_size);
 
     if (!desc->global_pool) {
@@ -75,17 +75,17 @@ static void dx_alloc_init(dx_alloc_type_
 
         if (desc->config == 0)
             desc->config = desc->total_size > BIG_THRESHOLD ?
-                &dx_alloc_default_config_big : &dx_alloc_default_config_small;
+                &qd_alloc_default_config_big : &qd_alloc_default_config_small;
 
         assert (desc->config->local_free_list_max >= desc->config->transfer_batch_size);
 
-        desc->global_pool = NEW(dx_alloc_pool_t);
+        desc->global_pool = NEW(qd_alloc_pool_t);
         DEQ_INIT(desc->global_pool->free_list);
         desc->lock = sys_mutex();
-        desc->stats = NEW(dx_alloc_stats_t);
-        memset(desc->stats, 0, sizeof(dx_alloc_stats_t));
+        desc->stats = NEW(qd_alloc_stats_t);
+        memset(desc->stats, 0, sizeof(qd_alloc_stats_t));
 
-        dx_alloc_type_t *type_item = NEW(dx_alloc_type_t);
+        qd_alloc_type_t *type_item = NEW(qd_alloc_type_t);
         DEQ_ITEM_INIT(type_item);
         type_item->desc = desc;
         DEQ_INSERT_TAIL(type_list, type_item);
@@ -98,7 +98,7 @@ static void dx_alloc_init(dx_alloc_type_
 }
 
 
-void *dx_alloc(dx_alloc_type_desc_t *desc, dx_alloc_pool_t **tpool)
+void *qd_alloc(qd_alloc_type_desc_t *desc, qd_alloc_pool_t **tpool)
 {
     int idx;
 
@@ -106,28 +106,28 @@ void *dx_alloc(dx_alloc_type_desc_t *des
     // If the descriptor is not initialized, set it up now.
     //
     if (desc->trailer != PATTERN_BACK)
-        dx_alloc_init(desc);
+        qd_alloc_init(desc);
 
     //
     // If this is the thread's first pass through here, allocate the
     // thread-local pool for this type.
     //
     if (*tpool == 0) {
-        *tpool = NEW(dx_alloc_pool_t);
+        *tpool = NEW(qd_alloc_pool_t);
         DEQ_INIT((*tpool)->free_list);
     }
 
-    dx_alloc_pool_t *pool = *tpool;
+    qd_alloc_pool_t *pool = *tpool;
 
     //
     // Fast case: If there's an item on the local free list, take it off the
     // list and return it.  Since everything we've touched is thread-local,
     // there is no need to acquire a lock.
     //
-    dx_alloc_item_t *item = DEQ_HEAD(pool->free_list);
+    qd_alloc_item_t *item = DEQ_HEAD(pool->free_list);
     if (item) {
         DEQ_REMOVE_HEAD(pool->free_list);
-#ifdef DX_MEMORY_DEBUG
+#ifdef QD_MEMORY_DEBUG
         item->desc = desc;
         item->header = PATTERN_FRONT;
         *((uint32_t*) ((void*) &item[1] + desc->total_size))= PATTERN_BACK;
@@ -156,8 +156,8 @@ void *dx_alloc(dx_alloc_type_desc_t *des
         // Allocate a full batch from the heap and put it on the thread list.
         //
         for (idx = 0; idx < desc->config->transfer_batch_size; idx++) {
-            item = (dx_alloc_item_t*) malloc(sizeof(dx_alloc_item_t) + desc->total_size
-#ifdef DX_MEMORY_DEBUG
+            item = (qd_alloc_item_t*) malloc(sizeof(qd_alloc_item_t) + desc->total_size
+#ifdef QD_MEMORY_DEBUG
                                              + sizeof(uint32_t)
 #endif
                                              );
@@ -174,7 +174,7 @@ void *dx_alloc(dx_alloc_type_desc_t *des
     item = DEQ_HEAD(pool->free_list);
     if (item) {
         DEQ_REMOVE_HEAD(pool->free_list);
-#ifdef DX_MEMORY_DEBUG
+#ifdef QD_MEMORY_DEBUG
         item->desc = desc;
         item->header = PATTERN_FRONT;
         *((uint32_t*) ((void*) &item[1] + desc->total_size))= PATTERN_BACK;
@@ -186,12 +186,12 @@ void *dx_alloc(dx_alloc_type_desc_t *des
 }
 
 
-void dx_dealloc(dx_alloc_type_desc_t *desc, dx_alloc_pool_t **tpool, void *p)
+void qd_dealloc(qd_alloc_type_desc_t *desc, qd_alloc_pool_t **tpool, void *p)
 {
-    dx_alloc_item_t *item = ((dx_alloc_item_t*) p) - 1;
+    qd_alloc_item_t *item = ((qd_alloc_item_t*) p) - 1;
     int              idx;
 
-#ifdef DX_MEMORY_DEBUG
+#ifdef QD_MEMORY_DEBUG
     assert (desc->header  == PATTERN_FRONT);
     assert (desc->trailer == PATTERN_BACK);
     assert (item->header  == PATTERN_FRONT);
@@ -205,11 +205,11 @@ void dx_dealloc(dx_alloc_type_desc_t *de
     // thread-local pool for this type.
     //
     if (*tpool == 0) {
-        *tpool = NEW(dx_alloc_pool_t);
+        *tpool = NEW(qd_alloc_pool_t);
         DEQ_INIT((*tpool)->free_list);
     }
 
-    dx_alloc_pool_t *pool = *tpool;
+    qd_alloc_pool_t *pool = *tpool;
 
     DEQ_INSERT_TAIL(pool->free_list, item);
 
@@ -246,7 +246,7 @@ void dx_dealloc(dx_alloc_type_desc_t *de
 }
 
 
-void dx_alloc_initialize(void)
+void qd_alloc_initialize(void)
 {
     init_lock = sys_mutex();
     DEQ_INIT(type_list);
@@ -260,28 +260,28 @@ static void alloc_schema_handler(void *c
 
 static void alloc_query_handler(void* context, const char *id, void *cor)
 {
-    dx_alloc_type_t *item = DEQ_HEAD(type_list);
+    qd_alloc_type_t *item = DEQ_HEAD(type_list);
 
     while (item) {
-        dx_agent_value_string(cor, "name", item->desc->type_name);
-        dx_agent_value_uint(cor, "type_size", item->desc->total_size);
-        dx_agent_value_uint(cor, "transfer_batch_size", item->desc->config->transfer_batch_size);
-        dx_agent_value_uint(cor, "local_free_list_max", item->desc->config->local_free_list_max);
-        dx_agent_value_uint(cor, "global_free_list_max", item->desc->config->global_free_list_max);
-        dx_agent_value_uint(cor, "total_alloc_from_heap", item->desc->stats->total_alloc_from_heap);
-        dx_agent_value_uint(cor, "total_free_to_heap", item->desc->stats->total_free_to_heap);
-        dx_agent_value_uint(cor, "held_by_threads", item->desc->stats->held_by_threads);
-        dx_agent_value_uint(cor, "batches_rebalanced_to_threads", item->desc->stats->batches_rebalanced_to_threads);
-        dx_agent_value_uint(cor, "batches_rebalanced_to_global", item->desc->stats->batches_rebalanced_to_global);
+        qd_agent_value_string(cor, "name", item->desc->type_name);
+        qd_agent_value_uint(cor, "type_size", item->desc->total_size);
+        qd_agent_value_uint(cor, "transfer_batch_size", item->desc->config->transfer_batch_size);
+        qd_agent_value_uint(cor, "local_free_list_max", item->desc->config->local_free_list_max);
+        qd_agent_value_uint(cor, "global_free_list_max", item->desc->config->global_free_list_max);
+        qd_agent_value_uint(cor, "total_alloc_from_heap", item->desc->stats->total_alloc_from_heap);
+        qd_agent_value_uint(cor, "total_free_to_heap", item->desc->stats->total_free_to_heap);
+        qd_agent_value_uint(cor, "held_by_threads", item->desc->stats->held_by_threads);
+        qd_agent_value_uint(cor, "batches_rebalanced_to_threads", item->desc->stats->batches_rebalanced_to_threads);
+        qd_agent_value_uint(cor, "batches_rebalanced_to_global", item->desc->stats->batches_rebalanced_to_global);
 
         item = DEQ_NEXT(item);
-        dx_agent_value_complete(cor, item != 0);
+        qd_agent_value_complete(cor, item != 0);
     }
 }
 
 
-void dx_alloc_setup_agent(dx_dispatch_t *dx)
+void qd_alloc_setup_agent(qd_dispatch_t *qd)
 {
-    dx_agent_register_class(dx, "org.apache.qpid.dispatch.allocator", 0, alloc_schema_handler, alloc_query_handler);
+    qd_agent_register_class(qd, "org.apache.qpid.dispatch.allocator", 0, alloc_schema_handler, alloc_query_handler);
 }
 

Modified: qpid/dispatch/trunk/src/alloc_private.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/alloc_private.h?rev=1543534&r1=1543533&r2=1543534&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/alloc_private.h (original)
+++ qpid/dispatch/trunk/src/alloc_private.h Tue Nov 19 19:21:30 2013
@@ -22,7 +22,7 @@
 #include <qpid/dispatch/alloc.h>
 #include <qpid/dispatch/dispatch.h>
 
-void dx_alloc_initialize(void);
-void dx_alloc_setup_agent(dx_dispatch_t *dx);
+void qd_alloc_initialize(void);
+void qd_alloc_setup_agent(qd_dispatch_t *qd);
 
 #endif

Modified: qpid/dispatch/trunk/src/amqp.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/amqp.c?rev=1543534&r1=1543533&r2=1543534&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/amqp.c (original)
+++ qpid/dispatch/trunk/src/amqp.c Tue Nov 19 19:21:30 2013
@@ -19,12 +19,12 @@
 
 #include <qpid/dispatch/amqp.h>
 
-const char * const DX_DA_INGRESS = "qdx.ingress";
-const char * const DX_DA_TRACE   = "qdx.trace";
-const char * const DX_DA_TO      = "qdx.to";
+const char * const QD_DA_INGRESS = "qd.ingress";
+const char * const QD_DA_TRACE   = "qd.trace";
+const char * const QD_DA_TO      = "qd.to";
 
-const char * const DX_CAPABILITY_ROUTER = "qdx.router";
+const char * const QD_CAPABILITY_ROUTER = "qd.router";
 
-const char * const DX_INTERNODE_LINK_NAME_1 = "qdx.internode.1";
-const char * const DX_INTERNODE_LINK_NAME_2 = "qdx.internode.2";
+const char * const QD_INTERNODE_LINK_NAME_1 = "qd.internode.1";
+const char * const QD_INTERNODE_LINK_NAME_2 = "qd.internode.2";
 

Modified: qpid/dispatch/trunk/src/bitmask.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/bitmask.c?rev=1543534&r1=1543533&r2=1543534&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/bitmask.c (original)
+++ qpid/dispatch/trunk/src/bitmask.c Tue Nov 19 19:21:30 2013
@@ -21,16 +21,16 @@
 #include <qpid/dispatch/alloc.h>
 #include <assert.h>
 
-#define DX_BITMASK_LONGS 16
-#define DX_BITMASK_BITS  (DX_BITMASK_LONGS * 64)
+#define QD_BITMASK_LONGS 16
+#define QD_BITMASK_BITS  (QD_BITMASK_LONGS * 64)
 
-struct dx_bitmask_t {
-    uint64_t array[DX_BITMASK_LONGS];
+struct qd_bitmask_t {
+    uint64_t array[QD_BITMASK_LONGS];
     int      first_set;
 };
 
-ALLOC_DECLARE(dx_bitmask_t);
-ALLOC_DEFINE(dx_bitmask_t);
+ALLOC_DECLARE(qd_bitmask_t);
+ALLOC_DEFINE(qd_bitmask_t);
 
 #define MASK_INDEX(num)  (num / 64)
 #define MASK_ONEHOT(num) (((uint64_t) 1) << (num % 64))
@@ -38,74 +38,74 @@ ALLOC_DEFINE(dx_bitmask_t);
 #define FIRST_UNKNOWN -2
 
 
-int dx_bitmask_width()
+int qd_bitmask_width()
 {
-    return DX_BITMASK_BITS;
+    return QD_BITMASK_BITS;
 }
 
 
-dx_bitmask_t *dx_bitmask(int initial)
+qd_bitmask_t *qd_bitmask(int initial)
 {
-    dx_bitmask_t *b = new_dx_bitmask_t();
+    qd_bitmask_t *b = new_qd_bitmask_t();
     if (initial)
-        dx_bitmask_set_all(b);
+        qd_bitmask_set_all(b);
     else
-        dx_bitmask_clear_all(b);
+        qd_bitmask_clear_all(b);
     return b;
 }
 
 
-void dx_bitmask_free(dx_bitmask_t *b)
+void qd_bitmask_free(qd_bitmask_t *b)
 {
-    free_dx_bitmask_t(b);
+    free_qd_bitmask_t(b);
 }
 
 
-void dx_bitmask_set_all(dx_bitmask_t *b)
+void qd_bitmask_set_all(qd_bitmask_t *b)
 {
-    for (int i = 0; i < DX_BITMASK_LONGS; i++)
+    for (int i = 0; i < QD_BITMASK_LONGS; i++)
         b->array[i] = 0xFFFFFFFFFFFFFFFF;
     b->first_set = 0;
 }
 
 
-void dx_bitmask_clear_all(dx_bitmask_t *b)
+void qd_bitmask_clear_all(qd_bitmask_t *b)
 {
-    for (int i = 0; i < DX_BITMASK_LONGS; i++)
+    for (int i = 0; i < QD_BITMASK_LONGS; i++)
         b->array[i] = 0;
     b->first_set = FIRST_NONE;
 }
 
 
-void dx_bitmask_set_bit(dx_bitmask_t *b, int bitnum)
+void qd_bitmask_set_bit(qd_bitmask_t *b, int bitnum)
 {
-    assert(bitnum < DX_BITMASK_BITS);
+    assert(bitnum < QD_BITMASK_BITS);
     b->array[MASK_INDEX(bitnum)] |= MASK_ONEHOT(bitnum);
     if (b->first_set > bitnum || b->first_set < 0)
         b->first_set = bitnum;
 }
 
 
-void dx_bitmask_clear_bit(dx_bitmask_t *b, int bitnum)
+void qd_bitmask_clear_bit(qd_bitmask_t *b, int bitnum)
 {
-    assert(bitnum < DX_BITMASK_BITS);
+    assert(bitnum < QD_BITMASK_BITS);
     b->array[MASK_INDEX(bitnum)] &= ~(MASK_ONEHOT(bitnum));
     if (b->first_set == bitnum)
         b->first_set = FIRST_UNKNOWN;
 }
 
 
-int dx_bitmask_value(dx_bitmask_t *b, int bitnum)
+int qd_bitmask_value(qd_bitmask_t *b, int bitnum)
 {
     return (b->array[MASK_INDEX(bitnum)] & MASK_ONEHOT(bitnum)) ? 1 : 0;
 }
 
 
-int dx_bitmask_first_set(dx_bitmask_t *b, int *bitnum)
+int qd_bitmask_first_set(qd_bitmask_t *b, int *bitnum)
 {
     if (b->first_set == FIRST_UNKNOWN) {
         b->first_set = FIRST_NONE;
-        for (int i = 0; i < DX_BITMASK_LONGS; i++)
+        for (int i = 0; i < QD_BITMASK_LONGS; i++)
             if (b->array[i]) {
                 for (int j = 0; j < 64; j++)
                     if ((((uint64_t) 1) << j) & b->array[i]) {

Modified: qpid/dispatch/trunk/src/buffer.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/buffer.c?rev=1543534&r1=1543533&r2=1543534&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/buffer.c (original)
+++ qpid/dispatch/trunk/src/buffer.c Tue Nov 19 19:21:30 2013
@@ -23,21 +23,21 @@
 static size_t buffer_size = 512;
 static int    size_locked = 0;
 
-ALLOC_DECLARE(dx_buffer_t);
-ALLOC_DEFINE_CONFIG(dx_buffer_t, sizeof(dx_buffer_t), &buffer_size, 0);
+ALLOC_DECLARE(qd_buffer_t);
+ALLOC_DEFINE_CONFIG(qd_buffer_t, sizeof(qd_buffer_t), &buffer_size, 0);
 
 
-void dx_buffer_set_size(size_t size)
+void qd_buffer_set_size(size_t size)
 {
     assert(!size_locked);
     buffer_size = size;
 }
 
 
-dx_buffer_t *dx_buffer(void)
+qd_buffer_t *qd_buffer(void)
 {
     size_locked = 1;
-    dx_buffer_t *buf = new_dx_buffer_t();
+    qd_buffer_t *buf = new_qd_buffer_t();
 
     DEQ_ITEM_INIT(buf);
     buf->size = 0;
@@ -45,37 +45,37 @@ dx_buffer_t *dx_buffer(void)
 }
 
 
-void dx_buffer_free(dx_buffer_t *buf)
+void qd_buffer_free(qd_buffer_t *buf)
 {
-    free_dx_buffer_t(buf);
+    free_qd_buffer_t(buf);
 }
 
 
-unsigned char *dx_buffer_base(dx_buffer_t *buf)
+unsigned char *qd_buffer_base(qd_buffer_t *buf)
 {
     return (unsigned char*) &buf[1];
 }
 
 
-unsigned char *dx_buffer_cursor(dx_buffer_t *buf)
+unsigned char *qd_buffer_cursor(qd_buffer_t *buf)
 {
     return ((unsigned char*) &buf[1]) + buf->size;
 }
 
 
-size_t dx_buffer_capacity(dx_buffer_t *buf)
+size_t qd_buffer_capacity(qd_buffer_t *buf)
 {
     return buffer_size - buf->size;
 }
 
 
-size_t dx_buffer_size(dx_buffer_t *buf)
+size_t qd_buffer_size(qd_buffer_t *buf)
 {
     return buf->size;
 }
 
 
-void dx_buffer_insert(dx_buffer_t *buf, size_t len)
+void qd_buffer_insert(qd_buffer_t *buf, size_t len)
 {
     buf->size += len;
     assert(buf->size <= buffer_size);



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