mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
change a couple uses of !strlen() to ast_strlen_zero(). Oddly enough, one of
these used to be this way and got changed ... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -13514,7 +13514,7 @@ static int sip_sipredirect(struct sip_pvt *p, const char *dest)
|
|||||||
if (!host) {
|
if (!host) {
|
||||||
char *localtmp;
|
char *localtmp;
|
||||||
ast_copy_string(tmp, get_header(&p->initreq, "To"), sizeof(tmp));
|
ast_copy_string(tmp, get_header(&p->initreq, "To"), sizeof(tmp));
|
||||||
if (!strlen(tmp)) {
|
if (ast_strlen_zero(tmp)) {
|
||||||
ast_log(LOG_ERROR, "Cannot retrieve the 'To' header from the original SIP request!\n");
|
ast_log(LOG_ERROR, "Cannot retrieve the 'To' header from the original SIP request!\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -13525,7 +13525,7 @@ static int sip_sipredirect(struct sip_pvt *p, const char *dest)
|
|||||||
localtmp++;
|
localtmp++;
|
||||||
/* This is okey because lhost and lport are as big as tmp */
|
/* This is okey because lhost and lport are as big as tmp */
|
||||||
sscanf(localtmp, "%[^<>:; ]:%[^<>:; ]", lhost, lport);
|
sscanf(localtmp, "%[^<>:; ]:%[^<>:; ]", lhost, lport);
|
||||||
if (!strlen(lhost)) {
|
if (ast_strlen_zero(lhost)) {
|
||||||
ast_log(LOG_ERROR, "Can't find the host address\n");
|
ast_log(LOG_ERROR, "Can't find the host address\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user