From e3d12a2ab2e6f67da9e7abbbcacc5269627dbe84 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Thu, 8 Jul 2004 15:03:48 +0000 Subject: Re-fix bug #1977 (bug #1997) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3398 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_voicemail.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'apps') diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index f6938c23b..12363ac5d 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1665,12 +1665,11 @@ static void run_externnotify(char *context, char *extension) char arguments[255]; int newvoicemails = 0, oldvoicemails = 0; - if(externnotify[0]) { + if(!ast_strlen_zero(externnotify)) { if (ast_app_messagecount(extension, &newvoicemails, &oldvoicemails)) { ast_log(LOG_ERROR, "Problem in calculating number of voicemail messages available for extension %s\n", extension); } else { - strncpy(arguments, externnotify, sizeof(arguments)); - snprintf(arguments, sizeof(arguments)-1, "%s %s %s %d&", externnotify, context, extension, newvoicemails); + snprintf(arguments, sizeof(arguments), "%s %s %s %d&", externnotify, context, extension, newvoicemails); ast_log(LOG_DEBUG,"Executing %s\n", arguments); ast_safe_system(arguments); } -- cgit v1.2.3