Merge remote-tracking branch 'origin/pr/200'
This commit is contained in:
commit
cbb57582f5
3 changed files with 6 additions and 14 deletions
|
@ -703,13 +703,4 @@ htsmsg_get_cdata(htsmsg_t *m, const char *field)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void
|
||||
htsmsg_dtor(htsmsg_t **mp)
|
||||
{
|
||||
if(*mp != NULL)
|
||||
htsmsg_destroy(*mp);
|
||||
}
|
||||
|
||||
|
|
|
@ -320,6 +320,3 @@ htsmsg_t *htsmsg_get_map_by_field_if_name(htsmsg_field_t *f, const char *name);
|
|||
|
||||
const char *htsmsg_get_cdata(htsmsg_t *m, const char *field);
|
||||
|
||||
extern void htsmsg_dtor(htsmsg_t **mp);
|
||||
|
||||
#define htsmsg_autodtor(n) htsmsg_t *n __attribute__((cleanup(htsmsg_dtor)))
|
||||
|
|
|
@ -470,10 +470,10 @@ extjs_channels(http_connection_t *hc, const char *remain, void *opaque)
|
|||
if(op == NULL)
|
||||
return 400;
|
||||
|
||||
htsmsg_autodtor(in) =
|
||||
htsmsg_t *in =
|
||||
entries != NULL ? htsmsg_json_deserialize(entries) : NULL;
|
||||
|
||||
htsmsg_autodtor(out) = htsmsg_create_map();
|
||||
htsmsg_t *out = htsmsg_create_map();
|
||||
|
||||
scopedgloballock();
|
||||
|
||||
|
@ -497,11 +497,15 @@ extjs_channels(http_connection_t *hc, const char *remain, void *opaque)
|
|||
extjs_channels_update(in);
|
||||
|
||||
} else {
|
||||
htsmsg_destroy(in);
|
||||
htsmsg_destroy(out);
|
||||
return 400;
|
||||
}
|
||||
|
||||
htsmsg_json_serialize(out, hq, 0);
|
||||
http_output_content(hc, "text/x-json; charset=UTF-8");
|
||||
htsmsg_destroy(in);
|
||||
htsmsg_destroy(out);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue