[Asterisk-cvs] asterisk/pbx pbx_realtime.c,1.2,1.3

markster at lists.digium.com markster at lists.digium.com
Mon Nov 22 09:33:57 CST 2004


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

Modified Files:
	pbx_realtime.c 
Log Message:
Fix missing arguments


Index: pbx_realtime.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_realtime.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- pbx_realtime.c	22 Nov 2004 05:03:03 -0000	1.2
+++ pbx_realtime.c	22 Nov 2004 14:33:42 -0000	1.3
@@ -34,6 +34,10 @@
 #include <string.h>
 #include <errno.h>
 
+#define MODE_MATCH 0
+#define MODE_MATCHMORE 1
+#define MODE_CANMATCH 2
+
 static char *tdesc = "Realtime Switch";
 
 /* Realtime switch looks up extensions in the supplied realtime table.
@@ -79,7 +83,7 @@
 	} else \
 		res = -1; 
 
-static struct ast_variable *realtime_switch_common(const char *table, const char *context, const char *exten, int priority)
+static struct ast_variable *realtime_switch_common(const char *table, const char *context, const char *exten, int priority, int mode)
 {
 	struct ast_variable *var;
 	char pri[20];
@@ -91,7 +95,7 @@
 
 static int realtime_exists(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
 {
-	REALTIME_COMMON;
+	REALTIME_COMMON(MODE_MATCH);
 	if (var) ast_destroy_realtime(var);
 	if (var)
 		res = 1;
@@ -100,7 +104,7 @@
 
 static int realtime_canmatch(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
 {
-	REALTIME_COMMON;
+	REALTIME_COMMON(MODE_CANMATCH);
 	if (var) ast_destroy_realtime(var);
 	if (var)
 		res = 1;
@@ -113,7 +117,7 @@
 	char *appdata="";
 	struct ast_app *a;
 	struct ast_variable *v;
-	REALTIME_COMMON;
+	REALTIME_COMMON(MODE_MATCH);
 	if (var) {
 		v = var;
 		while(v) {
@@ -137,7 +141,7 @@
 
 static int realtime_matchmore(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
 {
-	REALTIME_COMMON;
+	REALTIME_COMMON(MODE_MATCHMORE);
 	if (var) ast_destroy_realtime(var);
 	return res > 0 ? res : 0;
 }




More information about the svn-commits mailing list