aboutsummaryrefslogtreecommitdiffstats
path: root/src/hs-client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hs-client.cpp')
-rw-r--r--src/hs-client.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/hs-client.cpp b/src/hs-client.cpp
index b2f9215..c33144c 100644
--- a/src/hs-client.cpp
+++ b/src/hs-client.cpp
@@ -205,7 +205,9 @@ int HS_Client::allocateRestriction(struct afb_req request, const char* area)
struct json_object* push_obj = json_object_new_object();
hs_add_object_to_json_object_str( push_obj, 4, _application_name, "restriction",
_type, __FUNCTION__);
- json_object_object_add(push_obj, _args, json_tokener_parse(area));
+ struct json_object* area_obj;
+ json_object_object_get_ex(json_tokener_parse(area), _area, &area_obj);
+ json_object_object_add(push_obj, _area, area_obj);
afb_event_push(my_event, push_obj);
return 0;
}
@@ -229,7 +231,9 @@ int HS_Client::releaseRestriction(struct afb_req request, const char* area)
struct json_object* push_obj = json_object_new_object();
hs_add_object_to_json_object_str( push_obj, 4, _application_name, "restriction",
_type, __FUNCTION__);
- json_object_object_add(push_obj, _args, json_tokener_parse(area));
+ struct json_object* area_obj;
+ json_object_object_get_ex(json_tokener_parse(area), _area, &area_obj);
+ json_object_object_add(push_obj, _area, area_obj);
afb_event_push(my_event, push_obj);
return 0;
}