diff options
Diffstat (limited to 'src/rest.c')
-rw-r--r-- | src/rest.c | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -2130,6 +2130,11 @@ static int og_cmd_post_client_add(json_t *element, sizeof(computer.serial_number)); } else if (!strcmp(key, "hardware_id")) { err = og_json_parse_uint(value, &computer.hardware_id); + } else if (!strcmp(key, "folder_id")) { + err = og_json_parse_uint(value, &computer.folder_id); + if (!err) + computer.folder_id = computer.folder_id & 0x0000ffff; + } else if (!strcmp(key, "netdriver")) { err = og_json_parse_string_copy(value, computer.netdriver, @@ -2221,16 +2226,16 @@ static int og_cmd_post_client_add(json_t *element, " oglivedir," " inremotepc," " maintenance" - ") VALUES ('%s', '%s', '%s', '%s', %u, 0, %u," + ") VALUES ('%s', '%s', '%s', '%s', %u, %u, %u," " %u, '%s', '%s', '%s', '%s'," " '%s', %u, %u)", computer.name, computer.serial_number, computer.ip, computer.mac, computer.room, - computer.hardware_id, computer.repo_id, - computer.netmask, computer.boot, - computer.netiface, computer.netdriver, - computer.livedir, computer.remote, - computer.maintenance); + computer.folder_id, computer.hardware_id, + computer.repo_id, computer.netmask, + computer.boot, computer.netiface, + computer.netdriver, computer.livedir, + computer.remote, computer.maintenance); if (!result) { dbi_conn_error(dbi->conn, &msglog); |