summaryrefslogtreecommitdiffstats
path: root/src/rest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rest.c')
-rw-r--r--src/rest.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/rest.c b/src/rest.c
index b48de4c..ed8c36d 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -2357,8 +2357,9 @@ static int add_room_folder(struct og_dbi *dbi, struct og_folder *folder)
const char *msglog;
result = dbi_conn_queryf(dbi->conn,
- "SELECT nombregrupo FROM grupos WHERE nombregrupo='%s'",
- folder->name);
+ "SELECT nombregrupo FROM grupos WHERE "
+ "nombregrupo='%s' AND idcentro=%u",
+ folder->name, folder->center);
if (!result) {
dbi_conn_error(dbi->conn, &msglog);
@@ -2400,9 +2401,9 @@ static int add_computer_folder(struct og_dbi *dbi, struct og_folder *folder)
const char *msglog;
result = dbi_conn_queryf(dbi->conn,
- "SELECT nombregrupoordenador FROM gruposordenadores WHERE nombregrupoordenador='%s'",
- folder->name);
-
+ "SELECT nombregrupoordenador FROM gruposordenadores WHERE "
+ "nombregrupoordenador='%s' AND idaula=%u",
+ folder->name, folder->room);
if (!result) {
dbi_conn_error(dbi->conn, &msglog);
syslog(LOG_ERR, "failed to query database (%s:%d) %s\n",
@@ -4664,7 +4665,7 @@ static int og_cmd_oglive_list(char *buffer_reply)
return -1;
}
- json_object_set_new(live_entry, "name", json_string(live_name));
+ json_object_set_new(live_entry, "directory", json_string(live_name));
json_object_set_new(live_entry, "date", json_string(live_datetime));
json_array_append_new(oglive_array, live_entry);