From: <svn...@op...> - 2010-01-05 13:49:52
|
Author: dgollub Date: Tue Jan 5 14:31:28 2010 New Revision: 5972 URL: http://www.opensync.org/changeset/5972 Log: Export osync_queue_cross_link to make this available to osplugin process for external plugins. This fixes evo2-sync plugin and other OSYNC_START_TYPE_PROCESS plugins. fixes #1190 Modified: trunk/opensync.sym trunk/opensync/client/osplugin.c trunk/opensync/ipc/opensync_queue.h trunk/opensync/ipc/opensync_queue_internals.h Modified: trunk/opensync.sym ============================================================================== --- trunk/opensync.sym Tue Jan 5 14:29:49 2010 (r5971) +++ trunk/opensync.sym Tue Jan 5 14:31:28 2010 (r5972) @@ -655,6 +655,7 @@ osync_plugin_unref osync_queue_connect osync_queue_create +osync_queue_cross_link osync_queue_disconnect osync_queue_new osync_queue_new_from_fd Modified: trunk/opensync/client/osplugin.c ============================================================================== --- trunk/opensync/client/osplugin.c Tue Jan 5 14:29:49 2010 (r5971) +++ trunk/opensync/client/osplugin.c Tue Jan 5 14:31:28 2010 (r5972) @@ -22,7 +22,9 @@ #include "opensync_internals.h" #include "opensync-ipc.h" + #include "opensync-client.h" +#include "opensync_client_internals.h" static void usage (int ecode) { @@ -99,10 +101,12 @@ if (!osync_client_set_incoming_queue(client, incoming, &error)) goto error; - osync_queue_unref(incoming); if (!osync_client_set_outgoing_queue(client, outgoing, &error)) goto error; + osync_queue_cross_link(incoming, outgoing); + + osync_queue_unref(incoming); osync_queue_unref(outgoing); } else { /* Create connection pipes **/ Modified: trunk/opensync/ipc/opensync_queue.h ============================================================================== --- trunk/opensync/ipc/opensync_queue.h Tue Jan 5 14:29:49 2010 (r5971) +++ trunk/opensync/ipc/opensync_queue.h Tue Jan 5 14:31:28 2010 (r5972) @@ -120,6 +120,20 @@ */ OSYNC_EXPORT osync_bool osync_queue_disconnect(OSyncQueue *queue, OSyncError **error); +/** + * @brief Cross links command queue and reply queue + * + * Stores the queue used for replies in the command queue object so + * that timeout responses can be sent if necessary. + * And stores the command queue in the reply queue object so that + * replies can remove pending messages before they time out. + * + * @param cmd_queue The command queue used to receive incoming commands + * @param reply_queue The queue used to send replies + * + */ +OSYNC_EXPORT void osync_queue_cross_link(OSyncQueue *cmd_queue, OSyncQueue *reply_queue); + /*@}*/ #endif /* _OPENSYNC_QUEUE_H */ Modified: trunk/opensync/ipc/opensync_queue_internals.h ============================================================================== --- trunk/opensync/ipc/opensync_queue_internals.h Tue Jan 5 14:29:49 2010 (r5971) +++ trunk/opensync/ipc/opensync_queue_internals.h Tue Jan 5 14:31:28 2010 (r5972) @@ -90,20 +90,6 @@ OSYNC_TEST_EXPORT void osync_queue_set_message_handler(OSyncQueue *queue, OSyncMessageHandler handler, gpointer user_data); /** - * @brief Cross links command queue and reply queue - * - * Stores the queue used for replies in the command queue object so - * that timeout responses can be sent if necessary. - * And stores the command queue in the reply queue object so that - * replies can remove pending messages before they time out. - * - * @param cmd_queue The command queue used to receive incoming commands - * @param reply_queue The queue used to send replies - * - */ -OSYNC_TEST_EXPORT void osync_queue_cross_link(OSyncQueue *cmd_queue, OSyncQueue *reply_queue); - -/** * @brief Remove cross links between command queues and reply queues * * Removes the cross-links from this queue and all queues linked |