[Asterisk-cvs] asterisk app.c,1.11,1.12
citats at lists.digium.com
citats at lists.digium.com
Mon May 3 00:29:13 CDT 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv19232
Modified Files:
app.c
Log Message:
Change strlen calls to ast_strlen_zero in voicemail checking stuff because it is called all the time
Index: app.c
===================================================================
RCS file: /usr/cvsroot/asterisk/app.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- app.c 6 Apr 2004 22:17:31 -0000 1.11
+++ app.c 3 May 2004 04:37:03 -0000 1.12
@@ -27,6 +27,7 @@
#include <asterisk/dsp.h>
#include <asterisk/logger.h>
#include <asterisk/options.h>
+#include <asterisk/utils.h>
#include "asterisk.h"
#include "astconf.h"
@@ -153,14 +154,14 @@
char *context;
int ret;
/* If no mailbox, return immediately */
- if (!strlen(mailbox))
+ if (ast_strlen_zero(mailbox))
return 0;
if (strchr(mailbox, ',')) {
strncpy(tmp, mailbox, sizeof(tmp));
mb = tmp;
ret = 0;
while((cur = strsep(&mb, ","))) {
- if (strlen(cur)) {
+ if (!ast_strlen_zero(cur)) {
if (ast_app_has_voicemail(cur))
return 1;
}
@@ -202,7 +203,7 @@
if (oldmsgs)
*oldmsgs = 0;
/* If no mailbox, return immediately */
- if (!strlen(mailbox))
+ if (ast_strlen_zero(mailbox))
return 0;
if (strchr(mailbox, ',')) {
int tmpnew, tmpold;
@@ -210,7 +211,7 @@
mb = tmp;
ret = 0;
while((cur = strsep(&mb, ", "))) {
- if (strlen(cur)) {
+ if (!ast_strlen_zero(cur)) {
if (ast_app_messagecount(cur, newmsgs ? &tmpnew : NULL, oldmsgs ? &tmpold : NULL))
return -1;
else {
More information about the svn-commits
mailing list