Changeset 513be3b
- Timestamp:
- 2015-05-15T10:17:12Z (9 years ago)
- Children:
- 63b017e
- Parents:
- 600e09c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/rpc/rpc.c
r600e09c r513be3b 789 789 ret->func = rpc_ ## func 790 790 #define RPC_ADD_OPT_FUNC(func) \ 791 if (g_hash_table_ contains(methods, #func)) \791 if (g_hash_table_lookup(methods, #func)) \ 792 792 RPC_ADD_FUNC(func) 793 793 … … 904 904 JSON_Array *methods_a = json_object_get_array(isup, "method_list"); 905 905 GHashTable *methods = g_hash_table_new(g_str_hash, g_str_equal); 906 for (i = 0; i < json_array_get_count(methods_a); i++) 907 g_hash_table_add(methods, (void*) json_array_get_string(methods_a, i)); 906 for (i = 0; i < json_array_get_count(methods_a); i++) { 907 gpointer func = (void*) json_array_get_string(methods_a, i); 908 g_hash_table_replace(methods, func, func); 909 } 908 910 909 911 ret->init = rpc_init;
Note: See TracChangeset
for help on using the changeset viewer.