core: Return proper error for missing ConnectionId
authorJens Georg <mail@jensge.org>
Mon, 30 May 2011 16:48:07 +0000 (18:48 +0200)
committerJens Georg <mail@jensge.org>
Tue, 31 May 2011 06:24:59 +0000 (08:24 +0200)
This fixes AV-CM:1-5.1

src/rygel/rygel-connection-manager.vala

index 1a68c8f..68c74ac 100644 (file)
@@ -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;