Fix the service class slot id reservation failed
authorNeutron Soutmun <neo.neutron@gmail.com>
Thu, 21 Jun 2012 15:37:13 +0000 (22:37 +0700)
committerNeutron Soutmun <neo.neutron@gmail.com>
Thu, 21 Jun 2012 15:37:13 +0000 (22:37 +0700)
* src/rh-task-serviceclass.c (_sc_get_slot_id):
  - The SQL for slot id selection is incorrect, it should not return any
    rows for none of slot reserved for specified id.

src/rh-task-serviceclass.c

index a6ae4fa..cc8c13a 100644 (file)
@@ -51,7 +51,7 @@ static uint32_t _sc_get_slot_id(struct rahunas_serviceclass_config *sc_config)
 
     if (slot_id != 0) {
       snprintf(select_cmd, sizeof (select_cmd) - 1,
-               "SELECT count(service_class_slot_id) FROM dbset WHERE "
+               "SELECT service_class_slot_id FROM dbset WHERE "
                "service_class = '%s' AND service_class_slot_id = %u",
                sc_config->serviceclass_name, slot_id);
       select_cmd[sizeof (select_cmd) - 1] = '\0';