[asterisk-commits] branch russell/menuselect_buildoptions r34157 - /team/russell/menuselect_buil...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jun 14 14:10:45 MST 2006


Author: kpfleming
Date: Wed Jun 14 16:10:44 2006
New Revision: 34157

URL: http://svn.digium.com/view/asterisk?rev=34157&view=rev
Log:
enable use of menuselect to turn on app_voicemail compile time options

Modified:
    team/russell/menuselect_buildoptions/apps/Makefile
    team/russell/menuselect_buildoptions/apps/app_voicemail.c

Modified: team/russell/menuselect_buildoptions/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/russell/menuselect_buildoptions/apps/Makefile?rev=34157&r1=34156&r2=34157&view=diff
==============================================================================
--- team/russell/menuselect_buildoptions/apps/Makefile (original)
+++ team/russell/menuselect_buildoptions/apps/Makefile Wed Jun 14 16:10:44 2006
@@ -15,16 +15,9 @@
 
 SELECTED_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.c,%,$(wildcard app_*.c)))
 
-# If you have UnixODBC you can use ODBC voicemail
-# storage
-#
-# Uncomment to use ODBC storage
-#CFLAGS+=-DUSE_ODBC_STORAGE
-# Uncomment for extended ODBC voicemail storage
-#CFLAGS+=-DEXTENDED_ODBC_STORAGE
-# See doc/README.odbcstorage for more information
+MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
 
-MODS:=$(patsubst %,%.so,$(SELECTED_MODS))
+app_voicemail.o: CFLAGS+=$(patsubst %,-D%,$(MENUSELECT_BUILDOPT_app_voicemail))
 
 all: $(MODS)
 

Modified: team/russell/menuselect_buildoptions/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/russell/menuselect_buildoptions/apps/app_voicemail.c?rev=34157&r1=34156&r2=34157&view=diff
==============================================================================
--- team/russell/menuselect_buildoptions/apps/app_voicemail.c (original)
+++ team/russell/menuselect_buildoptions/apps/app_voicemail.c Wed Jun 14 16:10:44 2006
@@ -83,7 +83,7 @@
 #include "asterisk/stringfields.h"
 #include "asterisk/smdi.h"
 #define SMDI_MWI_WAIT_TIMEOUT 1000 /* 1 second */
-#ifdef USE_ODBC_STORAGE
+#ifdef ODBC_STORAGE
 #include "asterisk/res_odbc.h"
 #endif
 
@@ -295,7 +295,7 @@
 
 static void apply_options(struct ast_vm_user *vmu, const char *options);
 
-#ifdef USE_ODBC_STORAGE
+#ifdef ODBC_STORAGE
 static char odbc_database[80];
 static char odbc_table[80];
 #define RETRIEVE(a,b) retrieve_file(a,b)
@@ -844,7 +844,7 @@
 }
 
 
-#ifdef USE_ODBC_STORAGE
+#ifdef ODBC_STORAGE
 static int retrieve_file(char *dir, int msgnum)
 {
 	int x = 0;
@@ -1296,7 +1296,7 @@
 		}
 		fdlen = lseek(fd, 0, SEEK_END);
 		lseek(fd, 0, SEEK_SET);
-		printf("Length is %d\n", fdlen);
+		printf("Length is %zd\n", fdlen);
 		fdm = mmap(NULL, fdlen, PROT_READ | PROT_WRITE, MAP_SHARED,fd, 0);
 		if (!fdm) {
 			ast_log(LOG_WARNING, "Memory map failed!\n");
@@ -2021,7 +2021,7 @@
 	return (id >= 0 && id < (sizeof(msgs)/sizeof(msgs[0]))) ? msgs[id] : "Unknown";
 }
 
-#ifdef USE_ODBC_STORAGE
+#ifdef ODBC_STORAGE
 static int inboxcount(const char *mailbox, int *newmsgs, int *oldmsgs)
 {
 	int x = -1;
@@ -6189,7 +6189,7 @@
 			astsearch = "no";
 		ast_set2_flag((&globalflags), ast_true(astsearch), VM_SEARCH);
 
-#ifdef USE_ODBC_STORAGE
+#ifdef ODBC_STORAGE
 		strcpy(odbc_database, "asterisk");
 		if ((thresholdstr = ast_variable_retrieve(cfg, "general", "odbcstorage"))) {
 			ast_copy_string(odbc_database, thresholdstr, sizeof(odbc_database));
@@ -6620,7 +6620,7 @@
 
 	ast_install_vm_functions(has_voicemail, inboxcount, messagecount);
 
-#if defined(USE_ODBC_STORAGE) && !defined(EXTENDED_ODBC_STORAGE)
+#if defined(ODBC_STORAGE) && !defined(EXTENDED_ODBC_STORAGE)
 	ast_log(LOG_WARNING, "The current ODBC storage table format will be changed soon."
 				"Please update your tables as per the README and edit the apps/Makefile "
 				"and uncomment the line containing EXTENDED_ODBC_STORAGE to enable the "



More information about the asterisk-commits mailing list