+ if(event)
+ {
+ if (json_object_get_type(event) != json_type_array) // event is set before and check if it's an array
+ {
+ rc = one_subscribe_unsubscribe_events(request, subscribe, json_object_get_string(event), args);
+ }
+ else // event is set and it's not an array
+ {
+ for (int i = 0 ; i < json_object_array_length(event); i++)
+ {
+ x = json_object_array_get_idx(event, i);
+ rc2 = one_subscribe_unsubscribe_events(request, subscribe, json_object_get_string(x), args);
+ if (rc >= 0)
+ rc = rc2 >= 0 ? rc + rc2 : rc2;
+ }
+ }
+ }
+
+ if(id)