Index: svn/libopensync/opensync/ipc/opensync_queue_internals.h
===================================================================
--- svn/libopensync/opensync/ipc/opensync_queue_internals.h	(révision 5960)
+++ svn/libopensync/opensync/ipc/opensync_queue_internals.h	(copie de travail)
@@ -101,7 +101,7 @@
  * @param reply_queue The queue used to send replies 
  * 
  */
-OSYNC_TEST_EXPORT void osync_queue_cross_link(OSyncQueue *cmd_queue, OSyncQueue *reply_queue);
+//OSYNC_TEST_EXPORT void osync_queue_cross_link(OSyncQueue *cmd_queue, OSyncQueue *reply_queue);
 
 /**
  * @brief Remove cross links between command queues and reply queues
@@ -112,7 +112,7 @@
  * @param queue The queue to unlink
  * 
  */
-OSYNC_TEST_EXPORT void osync_queue_remove_cross_link(OSyncQueue *queue);
+//OSYNC_TEST_EXPORT void osync_queue_remove_cross_link(OSyncQueue *queue);
 
 /**
  * @brief Set pending limit on queue
Index: svn/libopensync/opensync/ipc/opensync_queue.h
===================================================================
--- svn/libopensync/opensync/ipc/opensync_queue.h	(révision 5960)
+++ svn/libopensync/opensync/ipc/opensync_queue.h	(copie de travail)
@@ -120,6 +120,31 @@
  */
 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);
+
+/**
+ * @brief Remove cross links between command queues and reply queues
+ * 
+ * Removes the cross-links from this queue and all queues linked
+ * from it, recursively
+ * 
+ * @param queue The queue to unlink
+ * 
+ */
+OSYNC_EXPORT void osync_queue_remove_cross_link(OSyncQueue *queue);
+
 /*@}*/
 #endif /* _OPENSYNC_QUEUE_H */
 
Index: svn/libopensync/opensync/client/osplugin.c
===================================================================
--- svn/libopensync/opensync/client/osplugin.c	(révision 5960)
+++ svn/libopensync/opensync/client/osplugin.c	(copie de travail)
@@ -22,7 +22,10 @@
 #include "opensync_internals.h"
 
 #include "opensync-ipc.h"
+
 #include "opensync-client.h"
+#include "opensync_client_internals.h"
+#include "opensync_client_private.h"
 
 static void usage (int ecode)
 {
@@ -103,6 +106,7 @@
 		if (!osync_client_set_outgoing_queue(client, outgoing, &error))
 			goto error;
 
+		osync_queue_cross_link(client->incoming, client->outgoing);
 		osync_queue_unref(outgoing);
 	} else {
 		/* Create connection pipes **/
@@ -120,6 +124,7 @@
 		if (!osync_client_set_incoming_queue(client, incoming, &error))
 			goto error;
 
+		osync_queue_cross_link(client->incoming, client->outgoing);
 		osync_queue_unref(incoming);
 	}
 


