We access SERVICE_TXT so we should check for this entry. Checking
SERVICE_SERVICE doesn't make sense anyway as it's verified few lines
above (in the same funcion).
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: John Crispin <john@phrozen.org>
if (!_tb[SERVICE_PORT] || !_tb[SERVICE_SERVICE])
return;
- if (_tb[SERVICE_SERVICE])
+ if (_tb[SERVICE_TXT])
blobmsg_for_each_attr(txt, _tb[SERVICE_TXT], rem2)
txt_len += 1 + strlen(blobmsg_get_string(txt));
s->txt_len = txt_len;
s->txt = d_txt;
- if (_tb[SERVICE_SERVICE])
+ if (_tb[SERVICE_TXT])
blobmsg_for_each_attr(txt, _tb[SERVICE_TXT], rem2) {
int len = strlen(blobmsg_get_string(txt));
if (!len)