summaryrefslogtreecommitdiffstats
path: root/src/isdn/isdn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/isdn/isdn.c')
-rw-r--r--src/isdn/isdn.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/isdn/isdn.c b/src/isdn/isdn.c
index e583a0e..e52f31c 100644
--- a/src/isdn/isdn.c
+++ b/src/isdn/isdn.c
@@ -126,10 +126,10 @@ static int get_number(char *value)
/* remove element from buffer
* and return pointer to next element in buffer */
-static char *get_seperated(char *buffer)
+static char *get_separated(char *buffer)
{
while(*buffer) {
- if (*buffer==',' || *buffer<=32) { /* seperate */
+ if (*buffer==',' || *buffer<=32) { /* separate */
*buffer++ = '\0';
while((*buffer>'\0' && *buffer<=32) || *buffer==',')
buffer++;
@@ -153,7 +153,7 @@ static int parse_out_channel(isdn_t *isdn_ep, const char *_list)
p = list;
while(*p) {
el = p;
- p = get_seperated(p);
+ p = get_separated(p);
if (!strcasecmp(el, "force")) {
isdn_ep->out_channel_exclusive = 1;
if (isdn_ep->out_channel) {
@@ -175,7 +175,7 @@ static int parse_out_channel(isdn_t *isdn_ep, const char *_list)
} else {
val = get_number(el);
if (val == -1) {
- PDEBUG(DISDN, DEBUG_ERROR, "Error outgoing channel string: expecting a comma seperated list of 'force', 'any', 'free', 'no' and any channel number.\n");
+ PDEBUG(DISDN, DEBUG_ERROR, "Error outgoing channel string: expecting a comma separated list of 'force', 'any', 'free', 'no' and any channel number.\n");
return(-1);
}
@@ -208,7 +208,7 @@ static int parse_in_channel(isdn_t *isdn_ep, const char *_list)
p = list;
while(*p) {
el = p;
- p = get_seperated(p);
+ p = get_separated(p);
if (isdn_ep->in_channel) if (isdn_ep->in_channel->channel == CHANNEL_FREE) {
PDEBUG(DISDN, DEBUG_ERROR, "Error incoming channel list: values behind 'free' keyword have no effect.\n");
return(-1);
@@ -219,7 +219,7 @@ static int parse_in_channel(isdn_t *isdn_ep, const char *_list)
} else {
val = get_number(el);
if (val == -1) {
- PDEBUG(DISDN, DEBUG_ERROR, "Error incoming channel list: expectng a comma seperated list of channel numbers and 'free'.\n");
+ PDEBUG(DISDN, DEBUG_ERROR, "Error incoming channel list: expectng a comma separated list of channel numbers and 'free'.\n");
return(-1);
}
@@ -320,7 +320,7 @@ int hunt_bchannel_in(isdn_t *isdn_ep, int channel, int exclusive)
case CHANNEL_FREE: /* free channel */
PDEBUG(DISDN, DEBUG_DEBUG, " -> hunting free channel\n");
if (isdn_ep->b_reserved >= isdn_ep->b_num)
- break; /* all channel in use or reserverd */
+ break; /* all channel in use or reserved */
/* find channel */
i = 0;
while(i < isdn_ep->b_num) {
@@ -382,7 +382,7 @@ int hunt_bchannel_out(isdn_t *isdn_ep, int *channel, int *exclusive)
switch(selchannel->channel) {
case CHANNEL_FREE: /* free channel */
if (isdn_ep->b_reserved >= isdn_ep->b_num)
- break; /* all channel in use or reserverd */
+ break; /* all channel in use or reserved */
/* find channel */
i = 0;
while(i < isdn_ep->b_num) {
@@ -401,7 +401,7 @@ int hunt_bchannel_out(isdn_t *isdn_ep, int *channel, int *exclusive)
case CHANNEL_ANY: /* don't ask for channel */
if (isdn_ep->b_reserved >= isdn_ep->b_num) {
PDEBUG(DISDN, DEBUG_DEBUG, " -> cannot ask for any channel, because all channel are reserved\n");
- break; /* all channel in use or reserverd */
+ break; /* all channel in use or reserved */
}
PDEBUG(DISDN, DEBUG_DEBUG, " -> result = any channel\n");
*channel = CHANNEL_ANY;
@@ -873,7 +873,7 @@ static void ph_control(int sock, uint32_t c1, uint32_t c2)
}
}
-/* send control inforamtion, but with different length */
+/* send control information, but with different length */
static void ph_control_block(int sock, uint32_t c1, const void *c2, int c2_len)
{
uint8_t *buffer[MISDN_HEADER_LEN + 4 + c2_len];
@@ -1101,8 +1101,8 @@ static void bchannel_destroy(isdn_t *isdn_ep, int index)
* It MAY be linked to a call, but already unlinked due to call release.
*
* - B_STATE_ACTIVE
- * The bchannel is active and cofigured for the need of the call.
- * Also it is linked to a call, otherwhise it would be deactivated.
+ * The bchannel is active and configured for the need of the call.
+ * Also it is linked to a call, otherwise it would be deactivated.
*
* - B_STATE_DEACTIVATING
* The bchannel is in deactivating state, due to deactivation request.
@@ -1127,7 +1127,7 @@ static void bchannel_destroy(isdn_t *isdn_ep, int index)
* The bchannel becomes inactive.
*
* All actions taken on these events depend on the current bchannel's state and
- * wether it is linked to a call instance.
+ * whether it is linked to a call instance.
*
*/
@@ -1167,7 +1167,7 @@ void bchannel_event(isdn_t *isdn_ep, int index, int event)
break;
default:
- /* problems that might ocurr:
+ /* problems that might occur:
* B_EVENT_USE is received when channel already in use.
*/
PDEBUG(DISDN, DEBUG_ERROR, "Illegal event %d at state %d, please correct.\n", event, state);
@@ -1238,7 +1238,7 @@ void bchannel_event(isdn_t *isdn_ep, int index, int event)
bchannel_destroy(isdn_ep, index);
state = B_STATE_IDLE;
if (call) {
- /* bchannel is now deactivate, but is requied by call instance, so we reactivate */
+ /* bchannel is now deactivate, but is required by call instance, so we reactivate */
if (bchannel_create(isdn_ep, index) == 0) {
bchannel_activate(isdn_ep, index, 1, 0);
state = B_STATE_ACTIVATING;
@@ -1356,7 +1356,7 @@ static void b_timer_timeout(struct timer *timer)
/*
* check for available channel and reserve+set it.
* give channel number or SEL_CHANNEL_ANY or SEL_CHANNEL_NO
- * give exclusiv flag
+ * give exclusive flag
* returns -(cause value) or x = channel x or 0 = no channel
* NOTE: no activation is done here
*/
@@ -1796,7 +1796,7 @@ int isdn_open(isdn_t *isdn_ep)
nt = 0;
- /* check for continous channelmap with no bchannel on slot 16 */
+ /* check for continuous channelmap with no bchannel on slot 16 */
if (test_channelmap(0, devinfo.channelmap)) {
PDEBUG(DISDN, DEBUG_ERROR, "Port %d provides channel 0, but we cannot access it!\n", portnum);
goto error;
@@ -1805,7 +1805,7 @@ int isdn_open(isdn_t *isdn_ep)
while(i < (int)devinfo.nrbchan + 1) {
if (i == 16) {
if (test_channelmap(i, devinfo.channelmap)) {
- PDEBUG(DISDN, DEBUG_ERROR, "Port %d provides bchannel 16. Pleas upgrade mISDN, if this port is mISDN loopback interface.\n", portnum);
+ PDEBUG(DISDN, DEBUG_ERROR, "Port %d provides bchannel 16. Please upgrade mISDN, if this port is mISDN loopback interface.\n", portnum);
goto error;
}
} else {
@@ -1842,7 +1842,7 @@ int isdn_open(isdn_t *isdn_ep)
break;
}
- /* allocate ressources of port */
+ /* allocate resources of port */
protocol = (nt) ? L3_PROTOCOL_DSS1_NET : L3_PROTOCOL_DSS1_USER;
prop = (1 << MISDN_FLG_L2_CLEAN);
if (ptp) // ptp forced
@@ -1996,11 +1996,11 @@ int isdn_dchannel_work(isdn_t *isdn_ep)
break;
case L1_SIGNAL_SLIP_TX:
isdn_ep->slip_tx++;
- PDEBUG(DISDN, DEBUG_DEBUG, "recevied TX slip #%d\n", isdn_ep->slip_tx);
+ PDEBUG(DISDN, DEBUG_DEBUG, "received TX slip #%d\n", isdn_ep->slip_tx);
break;
case L1_SIGNAL_SLIP_RX:
isdn_ep->slip_rx++;
- PDEBUG(DISDN, DEBUG_DEBUG, "recevied RX slip #%d\n", isdn_ep->slip_rx);
+ PDEBUG(DISDN, DEBUG_DEBUG, "received RX slip #%d\n", isdn_ep->slip_rx);
break;
}
break;