[Pkg-cli-libs-commits] [SCM] mono-upnp branch, master, updated. debian/0.1.1-1-6-g49df15b

Chow Loong Jin hyperair at debian.org
Tue Apr 17 07:46:09 UTC 2012


The following commit has been merged in the master branch:
commit 1548994a6dd4f16d5c37517761e3a11f56391901
Author: Chow Loong Jin <hyperair at debian.org>
Date:   Fri Apr 13 10:06:18 2012 +0800

    Cherry-pick patch which makes Mono.Upnp honour retryAttempts

diff --git a/debian/patches/0003-ServiceController-Retry-the-invocation-in-case-of-er.patch b/debian/patches/0003-ServiceController-Retry-the-invocation-in-case-of-er.patch
new file mode 100644
index 0000000..065d8de
--- /dev/null
+++ b/debian/patches/0003-ServiceController-Retry-the-invocation-in-case-of-er.patch
@@ -0,0 +1,52 @@
+From: Bertrand Lorentz <bertrand.lorentz at gmail.com>
+Date: Sat, 24 Mar 2012 13:08:32 +0100
+Subject: ServiceController: Retry the invocation in case of error
+
+The retryAttempts parameter was ignored until now. We now actually do
+what it says and retry the invocation as many times as indicated.
+
+This helps with some servers which do not like to be talked to right
+after they've been started. For example, see this bug reported against
+Banshee: https://bugzilla.gnome.org/show_bug.cgi?id=672744
+
+Origin: commit:0f7adcd10962d60cde5ad0ef6db112b277034692.
+---
+ .../Mono.Upnp.Control/ServiceController.cs         |   18 ++++++++++++++----
+ 1 file changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/src/Mono.Upnp/Mono.Upnp/Mono.Upnp.Control/ServiceController.cs b/src/Mono.Upnp/Mono.Upnp/Mono.Upnp.Control/ServiceController.cs
+index e7bd3da..1e62e81 100644
+--- a/src/Mono.Upnp/Mono.Upnp/Mono.Upnp.Control/ServiceController.cs
++++ b/src/Mono.Upnp/Mono.Upnp/Mono.Upnp.Control/ServiceController.cs
+@@ -148,16 +148,26 @@ namespace Mono.Upnp.Control
+                                                                 int retryAttempts)
+         {
+             // TODO try dispose on timeout
+-            // TODO retry attempts
+             if (control_client == null) {
+                 throw new InvalidOperationException (
+                     "The service controller was created to describe a local service and cannot be invoked " +
+                     "across the network. Use the constructor which takes a Deserializer.");
+             }
+-            
+-            return control_client.Invoke (action.Name, arguments);
++
++            while (true) {
++                try {
++                    return control_client.Invoke (action.Name, arguments);
++                } catch (UpnpControlException e) {
++                    if (retryAttempts > 0) {
++                        retryAttempts--;
++                        System.Threading.Thread.Sleep (5000);
++                    } else {
++                        throw;
++                    }
++                }
++            }
+         }
+-        
++
+         internal void RefEvents ()
+         {
+             event_client.Ref ();
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index eb582ad..dd70d5c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0001-Do-not-sign-assemblies.patch
 0002-Amend-InternalsVisibleTo-directives.patch
+0003-ServiceController-Retry-the-invocation-in-case-of-er.patch

-- 
mono-upnp



More information about the Pkg-cli-libs-commits mailing list