[rygel] core: Return proper error for missing ConnectionId



commit 86661d1db6a2cc8516612d718e633f1ba147c84d
Author: Jens Georg <mail jensge org>
Date:   Mon May 30 18:48:07 2011 +0200

    core: Return proper error for missing ConnectionId
    
    This fixes AV-CM:1-5.1

 src/rygel/rygel-connection-manager.vala |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/rygel/rygel-connection-manager.vala b/src/rygel/rygel-connection-manager.vala
index 1a68c8f..68c74ac 100644
--- a/src/rygel/rygel-connection-manager.vala
+++ b/src/rygel/rygel-connection-manager.vala
@@ -100,10 +100,10 @@ internal class Rygel.ConnectionManager : Service {
 
     private void get_current_connection_info_cb (Service             cm,
                                                  owned ServiceAction action) {
-        int connection_id;
+        string connection_id;
 
-        action.get ("ConnectionID", typeof (int), out connection_id);
-        if (connection_id != 0) {
+        action.get ("ConnectionID", typeof (string), out connection_id);
+        if (connection_id == null || connection_id != "0") {
             action.return_error (706, _("Invalid connection reference"));
 
             return;



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