[gupnp] context: Ensure msearch-port property exists before setting



commit 485d15def8ba22cc3d3a0f81d9570e08349245cf
Author: Jussi Kukkonen <jussi kukkonen intel com>
Date:   Fri Dec 13 12:13:12 2013 +0200

    context: Ensure msearch-port property exists before setting
    
    Fix a typo that crashes gupnp_context_constructor() if msearch-port
    property does not exist (it was added in gssdp 0.14.6).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720372

 libgupnp/gupnp-context.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libgupnp/gupnp-context.c b/libgupnp/gupnp-context.c
index a00a799..7949880 100644
--- a/libgupnp/gupnp-context.c
+++ b/libgupnp/gupnp-context.c
@@ -374,7 +374,7 @@ gupnp_context_constructor (GType                  type,
 
         /* Override msearch-port property if port is set, the property exists
          * and wasn't provided otherwise */
-        if (port != 0 && msearch_port != -1 && msearch_port == 0) {
+        if (port != 0 && msearch_idx != -1 && msearch_port == 0) {
                 g_value_set_uint (construct_params[msearch_idx].value, port);
         }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]