mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-03 11:58:36 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8417 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
1ea027f37f
commit
c599162209
@ -55,10 +55,17 @@ SWITCH_BEGIN_EXTERN_C
|
|||||||
#define switch_is_file_path(file) (file && ((*file == '/') || strstr(file, SWITCH_URL_SEPARATOR)))
|
#define switch_is_file_path(file) (file && ((*file == '/') || strstr(file, SWITCH_URL_SEPARATOR)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Test for NULL or zero length string
|
||||||
|
\param s the string to test
|
||||||
|
\return true value if the string is NULL or zero length
|
||||||
|
*/
|
||||||
|
#define switch_strlen_zero(s) (!s || *s == '\0')
|
||||||
|
|
||||||
|
|
||||||
static inline switch_bool_t switch_is_moh(const char *s)
|
static inline switch_bool_t switch_is_moh(const char *s)
|
||||||
{
|
{
|
||||||
if (!strcasecmp(s, "silence") || !strcasecmp(s, "indicate_hold")) {
|
if (switch_strlen_zero(s) || !strcasecmp(s, "silence") || !strcasecmp(s, "indicate_hold")) {
|
||||||
return SWITCH_FALSE;
|
return SWITCH_FALSE;
|
||||||
}
|
}
|
||||||
return SWITCH_TRUE;
|
return SWITCH_TRUE;
|
||||||
@ -277,13 +284,6 @@ static inline switch_bool_t switch_strstr(char *s, char *q)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief Test for NULL or zero length string
|
|
||||||
\param s the string to test
|
|
||||||
\return true value if the string is NULL or zero length
|
|
||||||
*/
|
|
||||||
#define switch_strlen_zero(s) (!s || *s == '\0')
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Make a null string a blank string instead
|
\brief Make a null string a blank string instead
|
||||||
\param s the string to test
|
\param s the string to test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user