Creates radios now if not exisits.

FossilOrigin-Name: adbb485a5063db45032e5b594d7991b75465cf642846ac0105858c2b8a78ad43
This commit is contained in:
7u83@mail.ru 2015-04-28 12:30:59 +00:00
parent 302a4b3247
commit c6024d6733

View File

@ -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);
}