use str_isset()

This commit is contained in:
Richard Aas 2012-04-10 09:32:34 +00:00
parent ff318620f5
commit 0f4e572462
4 changed files with 5 additions and 5 deletions

View file

@ -266,7 +266,7 @@ int icem_stund_recv(struct icem_comp *comp, const struct sa *src,
}
if (pl_strcmp(&lu, ice->lufrag))
goto unauth;
if (str_len(icem->rufrag) && pl_strcmp(&ru, icem->rufrag))
if (str_isset(icem->rufrag) && pl_strcmp(&ru, icem->rufrag))
goto unauth;
attr = stun_msg_attr(req, STUN_ATTR_CONTROLLED);

View file

@ -79,7 +79,7 @@ static bool if_getaddr_handler(const char *ifname,
struct ifentry *ife = arg;
/* Match name of interface? */
if (str_len(ife->ifname) && 0 != str_casecmp(ife->ifname, ifname))
if (str_isset(ife->ifname) && 0 != str_casecmp(ife->ifname, ifname))
return false;
if (!sa_isset(sa, SA_ADDR))

View file

@ -68,7 +68,7 @@ int sdp_attr_addv(struct list *lst, const char *name, const char *val,
err = str_dup(&attr->name, name);
if (str_len(val) > 0)
if (str_isset(val))
err |= re_vsdprintf(&attr->val, val, ap);
if (err)

View file

@ -393,7 +393,7 @@ static int media_encode(const struct sdp_media *m, struct mbuf *mb, bool offer)
const struct sdp_format *fmt = le->data;
if (!fmt->sup || !str_len(fmt->name))
if (!fmt->sup || !str_isset(fmt->name))
continue;
err |= mbuf_printf(mb, "a=rtpmap:%s %s/%u",
@ -404,7 +404,7 @@ static int media_encode(const struct sdp_media *m, struct mbuf *mb, bool offer)
err |= mbuf_printf(mb, "\r\n");
if (str_len(fmt->params))
if (str_isset(fmt->params))
err |= mbuf_printf(mb, "a=fmtp:%s %s\r\n",
fmt->id, fmt->params);
}