Merge pull request #92 from adamsutton/master

Minor fixes to htsmsg handling
This commit is contained in:
Andreas Öman 2012-06-15 05:28:11 -07:00
commit dd1800c76c
2 changed files with 6 additions and 1 deletions

View file

@ -258,6 +258,7 @@ htsmsg_add_msg(htsmsg_t *msg, const char *name, htsmsg_t *sub)
assert(sub->hm_data == NULL);
TAILQ_MOVE(&f->hmf_msg.hm_fields, &sub->hm_fields, hmf_link);
f->hmf_msg.hm_islist = sub->hm_islist;
free(sub);
}
@ -275,6 +276,7 @@ htsmsg_add_msg_extname(htsmsg_t *msg, const char *name, htsmsg_t *sub)
assert(sub->hm_data == NULL);
TAILQ_MOVE(&f->hmf_msg.hm_fields, &sub->hm_fields, hmf_link);
f->hmf_msg.hm_islist = sub->hm_islist;
free(sub);
}

View file

@ -233,7 +233,10 @@ htsmsg_json_parse_object(const char *s, const char **endp)
r = htsmsg_create_map();
while(1) {
while(*s > 0 && *s < 33)
s++;
if(*s != '}') while(1) {
if((name = htsmsg_json_parse_string(s, &s2)) == NULL) {
htsmsg_destroy(r);