From c6024d673391d60c7c4dde3f7ebab616d6c23744 Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Tue, 28 Apr 2015 12:30:59 +0000 Subject: [PATCH] Creates radios now if not exisits. FossilOrigin-Name: adbb485a5063db45032e5b594d7991b75465cf642846ac0105858c2b8a78ad43 --- src/wtp/cfg.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/wtp/cfg.c b/src/wtp/cfg.c index e2db6ef9..8059ffa3 100644 --- a/src/wtp/cfg.c +++ b/src/wtp/cfg.c @@ -893,8 +893,8 @@ static int cfg_json_get_radios_cb(char *js, jsmntok_t * t, *(js + (t + 1)->end) = 0; const char *val = js + (t + 1)->start; -// printf("Key: %s\n",key); -// printf("Val: %s\n",val); + //printf("Radio Key: %s\n",key); + //printf("Radio Val: %s\n",val); @@ -903,8 +903,11 @@ static int cfg_json_get_radios_cb(char *js, jsmntok_t * t, mbag_t radio = mbag_get_mbag(conn->radios,atoi(key),NULL); if ( !radio ){ - printf("Radio %d not found\n",atoi(key)); - return skip(t+1); + radio=mbag_create(); + mbag_set_mbag(conn->radios,atoi(key),radio); + + //printf("Radio %d not found\n",atoi(key)); + //return skip(t+1); }