struct interface *interface_newlist = NULL; /* first interface in new list */
+#ifdef WITH_MISDN
/* set default out_channel */
void default_out_channel(struct interface_port *ifport)
{
selchannel = (struct select_channel *)MALLOC(sizeof(struct select_channel));
memuse++;
-
+
if (ifport->mISDNport->ntmode)
selchannel->channel = CHANNEL_FREE;
else
ifport->in_channel = selchannel;
}
+#endif
/* parse string for a positive number */
}
static int inter_portnum(struct interface *interface, char *filename, int line, char *parameter, char *value)
{
+#ifndef WITH_MISDN
+ SPRINT(interface_error, "Error in %s (line %d): mISDN support is not compiled in.\n", filename, line);
+ return(-1);
+#else
struct interface_port *ifport, **ifportp;
struct interface *searchif;
int val;
ifportp = &((*ifportp)->next);
*ifportp = ifport;
return(0);
+#endif
}
static int inter_portname(struct interface *interface, char *filename, int line, char *parameter, char *value)
{
+#ifndef WITH_MISDN
+ SPRINT(interface_error, "Error in %s (line %d): mISDN support is not compiled in.\n", filename, line);
+ return(-1);
+#else
struct interface_port *ifport, **ifportp;
struct interface *searchif;
ifportp = &((*ifportp)->next);
*ifportp = ifport;
return(0);
+#endif
}
static int inter_l1hold(struct interface *interface, char *filename, int line, char *parameter, char *value)
{
}
}
+#ifdef WITH_MISDN
/*
* defaults of ports if not specified by config
*/
-static void set_defaults(struct interface_port *ifport)
+static void set_mISDN_defaults(struct interface_port *ifport)
{
/* default channel selection list */
if (!ifport->out_channel)
else
ifport->mISDNport->locally = 0;
}
+#endif
/*
*/
void relink_interfaces(void)
{
+#ifdef WITH_MISDN
struct mISDNport *mISDNport;
- struct interface *interface, *temp;
struct interface_port *ifport;
+#endif
+ struct interface *interface, *temp;
int found;
interface = interface_first;
interface = interface->next;
}
+#ifdef WITH_MISDN
/* unlink all mISDNports */
mISDNport = mISDNport_first;
while(mISDNport) {
PDEBUG(DEBUG_ISDN, "Port %d:%s relinking!\n", ifport->portnum, ifport->portname);
ifport->mISDNport = mISDNport;
mISDNport->ifport = ifport;
- set_defaults(ifport);
+ set_mISDN_defaults(ifport);
}
mISDNport = mISDNport->next;
}
while(ifport) {
if (!ifport->mISDNport) {
if (!interface->shutdown) {
- load_port(ifport);
+ load_mISDN_port(ifport);
} else {
ifport->block = 2;
}
}
interface = interface->next;
}
-
+#endif
}
+#ifdef WITH_MISDN
/*
* load port
*/
-void load_port(struct interface_port *ifport)
+void load_mISDN_port(struct interface_port *ifport)
{
struct mISDNport *mISDNport;
ifport->portnum = mISDNport->portnum;
SCPY(ifport->portname, mISDNport->name);
/* set defaults */
- set_defaults(ifport);
+ set_mISDN_defaults(ifport);
/* load static port instances */
mISDNport_static(mISDNport);
} else {
ifport->block = 2; /* not available */
}
}
+#endif
/*
* give summary of interface syntax