tmp->cid.cid_pres = i->callingpres;
tmp->cid.cid_ton = i->cid_ton;
tmp->cid.cid_ani2 = i->cid_ani2;
-#if defined(HAVE_PRI) || defined(HAVE_SS7)
+/* TODO: enable this code for HAVE_SS7 when PRI_TRANS_CAP_DIGITAL gets renamed
+ and doesn't come from libpri.h any longer
+*/
+#if defined(HAVE_PRI)
tmp->transfercapability = transfercapability;
pbx_builtin_setvar_helper(tmp, "TRANSFERCAPABILITY", ast_transfercapability2str(transfercapability));
if (transfercapability & PRI_TRANS_CAP_DIGITAL)
return tmp;
}
+#if defined(HAVE_PRI) || defined(HAVE_SS7)
+static int zt_setlaw(int zfd, int law)
+{
+ return ioctl(zfd, ZT_SETLAW, &law);
+}
+#endif
+
#ifdef HAVE_SS7
-static int zt_setlaw(int zfd, int law);
static int ss7_find_cic(struct zt_ss7 *linkset, int cic)
{
}
}
-static int zt_setlaw(int zfd, int law)
-{
- int res;
- res = ioctl(zfd, ZT_SETLAW, &law);
- if (res)
- return res;
- return 0;
-}
static void *pri_dchannel(void *vpri)
{
{
int x;
struct zt_pvt *p, *pl;
-
-#ifdef HAVE_PRI
+#if defined(HAVE_PRI) || defined(HAVE_SS7)
int i;
+#endif
+
+#if defined(HAVE_PRI)
for (i = 0; i < NUM_SPANS; i++) {
if (pris[i].master != AST_PTHREADT_NULL)
pthread_cancel(pris[i].master);
ast_cli_unregister_multiple(zap_pri_cli, sizeof(zap_pri_cli) / sizeof(struct ast_cli_entry));
ast_unregister_application(zap_send_keypad_facility_app);
#endif
+
ast_cli_unregister_multiple(zap_cli, sizeof(zap_cli) / sizeof(struct ast_cli_entry));
ast_manager_unregister( "ZapDialOffhook" );
ast_manager_unregister( "ZapHangup" );
iflist = NULL;
ifcount = 0;
ast_mutex_unlock(&iflock);
-#ifdef HAVE_PRI
+
+#if defined(HAVE_PRI)
for (i = 0; i < NUM_SPANS; i++) {
if (pris[i].master && (pris[i].master != AST_PTHREADT_NULL))
pthread_join(pris[i].master, NULL);
zt_close(pris[i].fds[i]);
}
-#endif
-#ifdef HAVE_SS7
+#endif /* HAVE_PRI */
+
+#if defined(HAVE_SS7)
for (i = 0; i < NUM_SPANS; i++) {
if (linksets[i].master && (linksets[i].master != AST_PTHREADT_NULL))
pthread_join(linksets[i].master, NULL);
zt_close(linksets[i].fds[i]);
}
#endif /* HAVE_SS7 */
+
return 0;
}