summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorDwayne M. Hubbard <dwayne.hubbard@gmail.com>2007-01-19 00:28:25 +0000
committerDwayne M. Hubbard <dwayne.hubbard@gmail.com>2007-01-19 00:28:25 +0000
commit18c23101a54cbcded5132473f8ffbf5a728ff63e (patch)
tree4622d272adfb4e3e9ee26972c4c78ed4b16fe592 /channels
parent33243c6624f3b9fb983fc35256082e3fe645580d (diff)
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 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_zap.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 0a270c5b0..0146224e2 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -642,7 +642,9 @@ static struct zt_pvt {
*/
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 @@ static struct zt_chan_conf zt_chan_conf_default(void) {
* to 0 or equivalent
*/
struct zt_chan_conf conf = {
- .pri = {
#ifdef HAVE_PRI
+ .pri = {
.nsf = PRI_NSF_NONE,
.switchtype = PRI_SWITCH_NI2,
.dialplan = PRI_NATIONAL_ISDN + 1,
@@ -672,8 +674,8 @@ static struct zt_chan_conf zt_chan_conf_default(void) {
.unknownprefix = "",
.resetinterval = 3600
-#endif
},
+#endif
.chan = {
.context = "default",
.cid_num = "",
@@ -12541,7 +12543,8 @@ static int setup_zap(int reload)
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);
}