mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
mqtt: handle NULL mqtt publish metadata
This commit is contained in:
parent
04761c4b7c
commit
c042ba8c65
1 changed files with 4 additions and 0 deletions
|
@ -488,6 +488,10 @@ secstream_connect_munge_mqtt(lws_ss_handle_t *h, char *buf, size_t len,
|
|||
for (n = 0; n < (int)LWS_ARRAY_SIZE(sources); n++) {
|
||||
lws_strexp_init(&exp, (void *)h, lws_ss_exp_cb_metadata,
|
||||
(char *)p, (size_t)-1);
|
||||
if (!sources[n]) {
|
||||
ps[n] = NULL;
|
||||
continue;
|
||||
}
|
||||
ps[n] = (char *)p;
|
||||
if (lws_strexp_expand(&exp, sources[n], strlen(sources[n]),
|
||||
&used_in, &olen[n]) != LSTRX_DONE)
|
||||
|
|
Loading…
Add table
Reference in a new issue