{
struct edbus_method *methods;
struct pmqos_scenario scenarios = {0,};
- int i, ret;
+ int i, ret, count = 0;
/* get pmqos table from conf */
ret = pmqos_get_scenario(path, &scenarios);
/* set edbus_methods structure */
for (i = 0; i < scenarios.num; ++i) {
-
/* if this scenario does not support */
if (!scenarios.list[i].support)
continue;
- methods[i].member = scenarios.list[i].name;
- methods[i].signature = "i";
- methods[i].reply_signature = "i";
- methods[i].func = dbus_pmqos_handler;
+ methods[count].member = scenarios.list[i].name;
+ methods[count].signature = "i";
+ methods[count].reply_signature = "i";
+ methods[count].func = dbus_pmqos_handler;
+ count++;
+
_D("support [%s] scenario", scenarios.list[i].name);
}
*edbus_methods = methods;
- ret = scenarios.num;
+ ret = count;
pmqos_put_scenario(&scenarios);
return ret;