[Asterisk-cvs] asterisk/apps Makefile, 1.83, 1.84 app_voicemail.c, 1.175, 1.176

markster at lists.digium.com markster at lists.digium.com
Sun Nov 28 16:29:37 CST 2004


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv23034/apps

Modified Files:
	Makefile app_voicemail.c 
Log Message:
Add ability to store voicemail in ODBC database


Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/Makefile,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- Makefile	24 Nov 2004 05:01:49 -0000	1.83
+++ Makefile	28 Nov 2004 21:28:30 -0000	1.84
@@ -50,14 +50,11 @@
 APPS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "app_osplookup.so" ; fi)
 
 CFLAGS+=-fPIC
-
-ifeq ($(USE_POSTGRES_VM_INTERFACE),1)
-CFLAGS+=-DUSEPOSTGRESVM
-endif
-
-ifeq ($(USE_MYSQL_VM_INTERFACE),1)
-CFLAGS+=-DUSEMYSQLVM
-endif
+#
+# If you have MySQL 4.1 or later you can use ODBC
+# storage
+#
+#CFLAGS+=-DUSE_ODBC_STORAGE
 
 all: $(APPS)
 

Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -d -r1.175 -r1.176
--- app_voicemail.c	25 Nov 2004 06:48:26 -0000	1.175
+++ app_voicemail.c	28 Nov 2004 21:28:30 -0000	1.176
@@ -28,6 +28,9 @@
 #include <asterisk/localtime.h>
 #include <asterisk/cli.h>
 #include <asterisk/utils.h>
+#ifdef USE_ODBC_STORAGE
+#include <asterisk/res_odbc.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <unistd.h>
@@ -37,6 +40,7 @@
 #include <sys/time.h>
[...1125 lines suppressed...]
  
 
-static int vm_delete(char *file)
-{
-	char *txt;
-	int txtsize = 0;
-
-	txtsize = (strlen(file) + 5)*sizeof(char);
-	txt = (char *)alloca(txtsize);
-	/* Sprintf here would safe because we alloca'd exactly the right length,
-	 * but trying to eliminate all sprintf's anyhow
-	 */
-	snprintf(txt, txtsize, "%s.txt", file);
-	unlink(txt);
-	return ast_filedelete(file, NULL);
-}
-
 int usecount(void)
 {
 	int res;




More information about the svn-commits mailing list