aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_musiconhold.c
diff options
context:
space:
mode:
authorcitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-28 19:44:33 +0000
committercitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-28 19:44:33 +0000
commitf39e1afa62fcbf260396187dd24b6533b24ee37a (patch)
treee94c580ebf537fab93f9356b29da3a0b6e8c7436 /res/res_musiconhold.c
parent54709f46d94f01ee6863faefd6a8f48cbc7cc91d (diff)
Use ast_strlen_zero in res_musiconhold.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3106 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_musiconhold.c')
-rwxr-xr-xres/res_musiconhold.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 7a93521ea..06798c274 100755
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -23,6 +23,7 @@
#include <asterisk/channel_pvt.h>
#include <asterisk/musiconhold.h>
#include <asterisk/config.h>
+#include <asterisk/utils.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
@@ -138,7 +139,7 @@ static int spawn_mp3(struct mohclass *class)
/* Look for extra arguments and add them to the list */
strncpy(xargs, class->miscargs, sizeof(xargs) - 1);
argptr = xargs;
- while(argptr && strlen(argptr)) {
+ while(argptr && !ast_strlen_zero(argptr)) {
argv[argc++] = argptr;
argptr = strchr(argptr, ',');
if (argptr) {
@@ -333,7 +334,7 @@ static int moh1_exec(struct ast_channel *chan, void *data)
static int moh2_exec(struct ast_channel *chan, void *data)
{
- if (!data || !strlen(data)) {
+ if (!data || ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "SetMusicOnHold requires an argument (class)\n");
return -1;
}
@@ -544,9 +545,9 @@ static int moh_register(char *classname, char *mode, char *param, char *miscargs
int ast_moh_start(struct ast_channel *chan, char *class)
{
- if (!class || !strlen(class))
+ if (!class || ast_strlen_zero(class))
class = chan->musicclass;
- if (!class || !strlen(class))
+ if (!class || ast_strlen_zero(class))
class = "default";
return ast_activate_generator(chan, &mohgen, class);
}