aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-04 22:44:01 +0000
committermattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-04 22:44:01 +0000
commitd2783f534ef29f5d5c83c8aaaab98258277c020f (patch)
tree8c0f42028acd2f9559e5c505a724e6ed99212380
parentea5152f7ccec3f0552847e802bee8819bc6416e5 (diff)
Don't error when we don't have libpri installed with libss7 support. Also, print the debug message anyway if we can't find the right PRI
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91012 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_zap.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 731eae4ff..91183c298 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -5861,7 +5861,7 @@ static struct ast_channel *zt_new(struct zt_pvt *i, int state, int startpbx, int
#if defined(HAVE_PRI)
tmp->transfercapability = transfercapability;
pbx_builtin_setvar_helper(tmp, "TRANSFERCAPABILITY", ast_transfercapability2str(transfercapability));
- if (transfercapability & PRI_TRANS_CAP_DIGITAL)
+ if (transfercapability & AST_TRANS_CAP_DIGITAL)
i->digital = 1;
/* Assume calls are not idle calls unless we're told differently */
i->isidlecall = 0;
@@ -9538,13 +9538,10 @@ static void zt_pri_message(struct pri *pri, char *s)
}
dchancount = 0;
}
- if ((dchan >= 0) && (span >= 0)) {
- if (dchancount > 1)
- ast_verbose("[Span %d D-Channel %d]%s", span, dchan, s);
- else
- ast_verbose("%s", s);
- } else
- ast_log(LOG_ERROR, "PRI debug error: could not find pri associated it with debug message output\n");
+ if (dchancount > 1 && (span > -1))
+ ast_verbose("[Span %d D-Channel %d]%s", span, dchan, s);
+ else
+ ast_verbose("%s", s);
} else
ast_verbose("%s", s);
@@ -9577,13 +9574,10 @@ static void zt_pri_error(struct pri *pri, char *s)
}
dchancount = 0;
}
- if ((dchan >= 0) && (span >= 0)) {
- if (dchancount > 1)
- ast_log(LOG_ERROR, "[Span %d D-Channel %d] PRI: %s", span, dchan, s);
- else
- ast_log(LOG_ERROR, "%s", s);
- } else
- ast_log(LOG_ERROR, "PRI debug error: could not find pri associated it with debug message output\n");
+ if ((dchancount > 1) && (span > -1))
+ ast_log(LOG_ERROR, "[Span %d D-Channel %d] PRI: %s", span, dchan, s);
+ else
+ ast_log(LOG_ERROR, "%s", s);
} else
ast_log(LOG_ERROR, "%s", s);