Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
haipome committed Nov 23, 2017
1 parent 9d88249 commit 6f2e317
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions marketprice/mp_message.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,15 @@ static int init_market(void)
if (dict_market == NULL)
return -__LINE__;

json_t *r = send_market_list_req();
if (r == NULL)
return -__LINE__;
redisContext *context = redis_sentinel_connect_master(redis);
if (context == NULL)
return -__LINE__;
json_t *r = send_market_list_req();
if (r == NULL) {
log_error("get market list fail");
redisFree(context);
return -__LINE__;
}
for (size_t i = 0; i < json_array_size(r); ++i) {
json_t *item = json_array_get(r, i);
const char *name = json_string_value(json_object_get(item, "name"));
Expand Down

0 comments on commit 6f2e317

Please sign in to comment.