[asterisk-commits] rmudgett: branch rmudgett/cid r274825 - /team/rmudgett/cid/main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 8 18:02:36 CDT 2010


Author: rmudgett
Date: Thu Jul  8 18:02:33 2010
New Revision: 274825

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=274825
Log:
Fix so can compile from AstData integration.

Will need to either update how caller id info is insterted for ast_channel
AstData or simply not insert it.

Modified:
    team/rmudgett/cid/main/channel.c

Modified: team/rmudgett/cid/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/cid/main/channel.c?view=diff&rev=274825&r1=274824&r2=274825
==============================================================================
--- team/rmudgett/cid/main/channel.c (original)
+++ team/rmudgett/cid/main/channel.c Thu Jul  8 18:02:33 2010
@@ -72,9 +72,11 @@
 #include <sys/epoll.h>
 #endif
 
+#if defined(KEEP_TILL_CHANNEL_PARTY_NUMBER_INFO_NEEDED)
 #if defined(HAVE_PRI)
 #include "libpri.h"
 #endif	/* defined(HAVE_PRI) */
+#endif	/* defined(KEEP_TILL_CHANNEL_PARTY_NUMBER_INFO_NEEDED) */
 
 struct ast_epoll_data {
 	struct ast_channel *chan;
@@ -139,6 +141,7 @@
 #define NUM_CHANNEL_BUCKETS 1567
 #endif
 
+#if 0	/* BUGBUG ast_callerid no longer exists */
 #define DATA_EXPORT_CALLERID(MEMBER)				\
 	MEMBER(ast_callerid, cid_dnid, AST_DATA_STRING)		\
 	MEMBER(ast_callerid, cid_num, AST_DATA_STRING)		\
@@ -149,6 +152,7 @@
 	MEMBER(ast_callerid, cid_tag, AST_DATA_STRING)
 
 AST_DATA_STRUCTURE(ast_callerid, DATA_EXPORT_CALLERID);
+#endif
 
 #define DATA_EXPORT_CHANNEL(MEMBER)						\
 	MEMBER(ast_channel, blockproc, AST_DATA_STRING)				\
@@ -283,6 +287,7 @@
 	ast_data_add_bool(tree, "DISABLE_WORKAROUNDS", ast_test_flag(chan, AST_FLAG_DISABLE_WORKAROUNDS));
 }
 
+#if defined(KEEP_TILL_CHANNEL_PARTY_NUMBER_INFO_NEEDED)
 static const char *party_number_ton2str(int ton)
 {
 #if defined(HAVE_PRI)
@@ -306,7 +311,9 @@
 #endif	/* defined(HAVE_PRI) */
 	return "Unknown";
 }
-
+#endif	/* defined(KEEP_TILL_CHANNEL_PARTY_NUMBER_INFO_NEEDED) */
+
+#if defined(KEEP_TILL_CHANNEL_PARTY_NUMBER_INFO_NEEDED)
 static const char *party_number_plan2str(int plan)
 {
 #if defined(HAVE_PRI)
@@ -330,14 +337,22 @@
 #endif	/* defined(HAVE_PRI) */
 	return "Unknown";
 }
+#endif	/* defined(KEEP_TILL_CHANNEL_PARTY_NUMBER_INFO_NEEDED) */
 
 int ast_channel_data_add_structure(struct ast_data *tree,
 	struct ast_channel *chan, int add_bridged)
 {
 	struct ast_channel *bc;
-	struct ast_data *data_bridged, *data_cdr, *data_flags, *data_zones;
-	struct ast_data *data_callerid, *enum_node, *data_softhangup;
+	struct ast_data *data_bridged;
+	struct ast_data *data_cdr;
+	struct ast_data *data_flags;
+	struct ast_data *data_zones;
+	struct ast_data *enum_node;
+	struct ast_data *data_softhangup;
+#if 0	/* BUGBUG ast_callerid no longer exists */
+	struct ast_data *data_callerid;
 	char value_str[100];
+#endif
 
 	if (!tree) {
 		return -1;
@@ -417,6 +432,7 @@
 
 	ast_data_add_uint(tree, "timetohangup", chan->whentohangup.tv_sec);
 
+#if 0	/* BUGBUG ast_callerid no longer exists */
 	/* callerid */
 	data_callerid = ast_data_add_node(tree, "callerid");
 	if (!data_callerid) {
@@ -433,6 +449,7 @@
 		party_number_ton2str(chan->cid.cid_ton),
 		party_number_plan2str(chan->cid.cid_ton));
 	ast_data_add_str(enum_node, "text", value_str);
+#endif
 
 	/* tone zone */
 	if (chan->zone) {




More information about the asterisk-commits mailing list