Changeset 2d88cac4
- Timestamp:
- 2015-05-14T14:59:39Z (9 years ago)
- Children:
- 4225bec
- Parents:
- 17aa9a2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/rpc/rpc.c
r17aa9a2 r2d88cac4 164 164 JSON_O_FOREACH(json_object(pd->settings), name, value) { 165 165 JSON_Object *o = json_object(value); 166 set_t *set = set_add(&acc->set, name, json_object_get_string(o, "default"), NULL, acc); 166 char *defs = NULL; 167 JSON_Value *defv = json_object_get_value(o, "default"); 168 if (json_type(defv) == JSONString) 169 defs = g_strdup(json_string(defv)); 170 else if(json_type(defv) == JSONInteger) 171 defs = g_strdup_printf("%lld", (long long) json_integer(defv)); 172 else if(json_type(defv) == JSONBoolean) 173 defs = g_strdup(json_boolean(defv) ? "true" : "false"); 174 set_t *set = set_add(&acc->set, name, defs, NULL, acc); 175 g_free(defs); 167 176 set->flags |= json_object_get_integer(o, "flags"); 168 177 set->eval = rpc_set_evaluator;
Note: See TracChangeset
for help on using the changeset viewer.