[asterisk-commits] dhubbard: trunk r51275 - in /trunk: ./ channels/chan_zap.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Jan 18 17:28:25 MST 2007


Author: dhubbard
Date: Thu Jan 18 18:28:25 2007
New Revision: 51275

URL: http://svn.digium.com/view/asterisk?view=rev&rev=51275
Log:
Merged revisions 51274 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r51274 | dhubbard | 2007-01-18 18:17:32 -0600 (Thu, 18 Jan 2007) | 3 lines

chan_zap compiles without libpri after committing 7877 patch


........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_zap.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?view=diff&rev=51275&r1=51274&r2=51275
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Thu Jan 18 18:28:25 2007
@@ -642,7 +642,9 @@
  */
 struct zt_chan_conf {
 	struct zt_pvt chan;
+#ifdef HAVE_PRI
 	struct zt_pri pri;
+#endif
 	ZT_PARAMS timing;
 
 	char smdi_port[SMDI_MAX_FILENAME_LEN];
@@ -654,8 +656,8 @@
 	 * to 0 or equivalent
 	 */
 	struct zt_chan_conf conf = {
+#ifdef HAVE_PRI
 		.pri = {
-#ifdef HAVE_PRI
 			.nsf = PRI_NSF_NONE,
 			.switchtype = PRI_SWITCH_NI2,
 			.dialplan = PRI_NATIONAL_ISDN + 1,
@@ -672,8 +674,8 @@
 			.unknownprefix = "",
 
 			.resetinterval = 3600
-#endif
 		},
+#endif
 		.chan = {
 			.context = "default",
 			.cid_num = "",
@@ -12541,7 +12543,8 @@
 			if (!ast_strlen_zero(chans)) {
 				if (memcpy(&conf, &base_conf, sizeof(conf)) == NULL) {
 					ast_log(LOG_ERROR, "Not enough memory for conf copy\n");
-					exit -1;
+					ast_config_destroy(cfg);
+					return -1;
 				}
 				process_zap(&conf, ast_variable_browse(cfg, cat), reload, 0);
 			}



More information about the asterisk-commits mailing list