From 85cbd7f83c10c70da8fa44fe7673143703f9710d Mon Sep 17 00:00:00 2001
From: malosek <malosek@fastmq.com>
Date: Tue, 22 Sep 2009 15:12:51 +0200
Subject: added PGM bus functionality

---
 foreign/openpgm/lost_data_tsi.patch | 76 +++++++++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)
 create mode 100644 foreign/openpgm/lost_data_tsi.patch

(limited to 'foreign')

diff --git a/foreign/openpgm/lost_data_tsi.patch b/foreign/openpgm/lost_data_tsi.patch
new file mode 100644
index 0000000..bfd4425
--- /dev/null
+++ b/foreign/openpgm/lost_data_tsi.patch
@@ -0,0 +1,76 @@
+--- libpgm-1.2.14/openpgm/pgm/transport.c	2009-08-27 04:54:04.000000000 +0200
++++ foreign/openpgm/libpgm-1.2.14/openpgm/pgm/transport.c	2009-09-22 14:36:07.713124619 +0200
+@@ -2342,6 +2342,7 @@
+ 			if (waiting_rxw->ack_cumulative_losses != waiting_rxw->cumulative_losses)
+ 			{
+ 				transport->has_lost_data = TRUE;
++				memcpy (&(transport->lost_data_tsi), waiting_rxw->identifier, sizeof (pgm_tsi_t));
+ 				waiting_rxw->pgm_sock_err.lost_count = waiting_rxw->cumulative_losses - waiting_rxw->ack_cumulative_losses;
+ 				waiting_rxw->ack_cumulative_losses = waiting_rxw->cumulative_losses;
+ 			}
+@@ -2705,6 +2706,7 @@
+ 			if (waiting_rxw->ack_cumulative_losses != waiting_rxw->cumulative_losses)
+ 			{
+ 				transport->has_lost_data = TRUE;
++				memcpy (&(transport->lost_data_tsi), waiting_rxw->identifier, sizeof (pgm_tsi_t));
+ 				waiting_rxw->pgm_sock_err.lost_count = waiting_rxw->cumulative_losses - waiting_rxw->ack_cumulative_losses;
+ 				waiting_rxw->ack_cumulative_losses = waiting_rxw->cumulative_losses;
+ 			}
+@@ -3407,6 +3409,7 @@
+ 		    !sender_rxw->waiting_link.data)
+ 		{
+ 			transport->has_lost_data = TRUE;
++			memcpy (&(transport->lost_data_tsi), sender_rxw->identifier, sizeof (pgm_tsi_t));
+ 			sender_rxw->pgm_sock_err.lost_count = sender_rxw->cumulative_losses - sender_rxw->ack_cumulative_losses;
+ 			sender_rxw->ack_cumulative_losses = sender_rxw->cumulative_losses;
+ 
+@@ -3823,6 +3826,7 @@
+ 	    !peer_rxw->waiting_link.data)
+ 	{
+ 		transport->has_lost_data = TRUE;
++		memcpy (&(transport->lost_data_tsi), peer_rxw->identifier, sizeof (pgm_tsi_t));
+ 		peer_rxw->pgm_sock_err.lost_count = peer_rxw->cumulative_losses - peer_rxw->ack_cumulative_losses;
+ 		peer_rxw->ack_cumulative_losses = peer_rxw->cumulative_losses;
+ 
+@@ -3952,6 +3956,7 @@
+ 	    !peer_rxw->waiting_link.data)
+ 	{
+ 		transport->has_lost_data = TRUE;
++		memcpy (&(transport->lost_data_tsi), peer_rxw->identifier, sizeof (pgm_tsi_t));
+ 		peer_rxw->pgm_sock_err.lost_count = peer_rxw->cumulative_losses - peer_rxw->ack_cumulative_losses;
+ 		peer_rxw->ack_cumulative_losses = peer_rxw->cumulative_losses;
+ 
+@@ -4849,6 +4854,7 @@
+ 		    !rxw->waiting_link.data)
+ 		{
+ 			transport->has_lost_data = TRUE;
++			memcpy (&(transport->lost_data_tsi), rxw->identifier, sizeof (pgm_tsi_t));
+ 			rxw->pgm_sock_err.lost_count = rxw->cumulative_losses - rxw->ack_cumulative_losses;
+ 			rxw->ack_cumulative_losses = rxw->cumulative_losses;
+ 
+@@ -5166,6 +5172,7 @@
+ 	    !rxw->waiting_link.data)
+ 	{
+ 		transport->has_lost_data = TRUE;
++		memcpy (&(transport->lost_data_tsi), rxw->identifier, sizeof (pgm_tsi_t));
+ 		rxw->pgm_sock_err.lost_count = rxw->cumulative_losses - rxw->ack_cumulative_losses;
+ 		rxw->ack_cumulative_losses = rxw->cumulative_losses;
+ 
+@@ -5303,6 +5310,7 @@
+ 	    !rxw->waiting_link.data)
+ 	{
+ 		transport->has_lost_data = TRUE;
++		memcpy (&(transport->lost_data_tsi), rxw->identifier, sizeof (pgm_tsi_t));
+ 		rxw->pgm_sock_err.lost_count = rxw->cumulative_losses - rxw->ack_cumulative_losses;
+ 		rxw->ack_cumulative_losses = rxw->cumulative_losses;
+ 
+--- libpgm-1.2.14/openpgm/pgm/include/pgm/transport.h	2009-08-27 04:53:23.000000000 +0200
++++ foreign/openpgm/libpgm-1.2.14/openpgm/pgm/include/pgm/transport.h	2009-09-21 15:49:36.000000000 +0200
+@@ -205,6 +205,7 @@
+     gboolean		is_bound;
+     gboolean		is_open;
+     gboolean            has_lost_data;
++    pgm_tsi_t           lost_data_tsi;
+     gboolean		will_close_on_failure;
+ 
+     gboolean		can_send_data;			/* and SPMs */
-- 
cgit v1.2.3