Mainly put space after switch and while keywords.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2098 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
33
q921.c
33
q921.c
@@ -51,7 +51,7 @@
|
||||
(hf).h.ea1 = 0; \
|
||||
(hf).h.ea2 = 1; \
|
||||
(hf).h.tei = (link)->tei; \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
static void q921_dump_pri(struct q921_link *link, char direction_tag);
|
||||
static void q921_establish_data_link(struct q921_link *link);
|
||||
@@ -253,7 +253,7 @@ static void q921_send_dm(struct q921_link *link, int fbit)
|
||||
h.u.m2 = 3; /* M2 = 3 */
|
||||
h.u.p_f = fbit; /* Final set appropriately */
|
||||
h.u.ft = Q921_FRAMETYPE_U;
|
||||
switch(ctrl->localtype) {
|
||||
switch (ctrl->localtype) {
|
||||
case PRI_NETWORK:
|
||||
h.h.c_r = 0;
|
||||
break;
|
||||
@@ -282,7 +282,7 @@ static void q921_send_disc(struct q921_link *link, int pbit)
|
||||
h.u.m2 = 0; /* M2 = 0 */
|
||||
h.u.p_f = pbit; /* Poll set appropriately */
|
||||
h.u.ft = Q921_FRAMETYPE_U;
|
||||
switch(ctrl->localtype) {
|
||||
switch (ctrl->localtype) {
|
||||
case PRI_NETWORK:
|
||||
h.h.c_r = 0;
|
||||
break;
|
||||
@@ -311,7 +311,7 @@ static void q921_send_ua(struct q921_link *link, int fbit)
|
||||
h.u.m2 = 0; /* M2 = 0 */
|
||||
h.u.p_f = fbit; /* Final set appropriately */
|
||||
h.u.ft = Q921_FRAMETYPE_U;
|
||||
switch(ctrl->localtype) {
|
||||
switch (ctrl->localtype) {
|
||||
case PRI_NETWORK:
|
||||
h.h.c_r = 0;
|
||||
break;
|
||||
@@ -340,7 +340,7 @@ static void q921_send_sabme(struct q921_link *link)
|
||||
h.u.m2 = 3; /* M2 = 3 */
|
||||
h.u.p_f = 1; /* Poll bit set */
|
||||
h.u.ft = Q921_FRAMETYPE_U;
|
||||
switch(ctrl->localtype) {
|
||||
switch (ctrl->localtype) {
|
||||
case PRI_NETWORK:
|
||||
h.h.c_r = 1;
|
||||
break;
|
||||
@@ -430,7 +430,7 @@ static int q921_unacked_iframes(struct q921_link *link)
|
||||
struct q921_frame *f = link->tx_queue;
|
||||
int cnt = 0;
|
||||
|
||||
while(f) {
|
||||
while (f) {
|
||||
if (f->transmitted)
|
||||
cnt++;
|
||||
f = f->next;
|
||||
@@ -604,7 +604,7 @@ static void q921_reject(struct q921_link *link, int pf)
|
||||
h.s.ft = 1; /* Frametype (01) */
|
||||
h.s.n_r = link->v_r; /* Where to start retransmission N(R) */
|
||||
h.s.p_f = pf;
|
||||
switch(ctrl->localtype) {
|
||||
switch (ctrl->localtype) {
|
||||
case PRI_NETWORK:
|
||||
h.h.c_r = 0;
|
||||
break;
|
||||
@@ -634,7 +634,7 @@ static void q921_rr(struct q921_link *link, int pbit, int cmd)
|
||||
h.s.ft = 1; /* Frametype (01) */
|
||||
h.s.n_r = link->v_r; /* N(R) */
|
||||
h.s.p_f = pbit; /* Poll/Final set appropriately */
|
||||
switch(ctrl->localtype) {
|
||||
switch (ctrl->localtype) {
|
||||
case PRI_NETWORK:
|
||||
if (cmd)
|
||||
h.h.c_r = 1;
|
||||
@@ -768,7 +768,7 @@ int q921_transmit_uiframe(struct q921_link *link, void *buf, int len)
|
||||
h->u.p_f = 0; /* Poll bit set */
|
||||
h->u.ft = Q921_FRAMETYPE_U;
|
||||
|
||||
switch(ctrl->localtype) {
|
||||
switch (ctrl->localtype) {
|
||||
case PRI_NETWORK:
|
||||
h->h.c_r = 1;
|
||||
break;
|
||||
@@ -1092,7 +1092,7 @@ void q921_dump(struct pri *ctrl, q921_h *h, int len, int showraw, int txrx)
|
||||
direction_tag,
|
||||
len - 3);
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
if ((h->u.ft == 3) && (h->u.m3 == 0) && (h->u.m2 == 0) && (h->u.data[0] == 0x0f)) {
|
||||
int ri;
|
||||
@@ -1201,7 +1201,7 @@ static pri_event *q921_receive_MDL(struct pri *ctrl, q921_u *h, int len)
|
||||
ri = (h->data[1] << 8) | h->data[2];
|
||||
tei = (h->data[4] >> 1);
|
||||
|
||||
switch(h->data[3]) {
|
||||
switch (h->data[3]) {
|
||||
case Q921_TEI_IDENTITY_REQUEST:
|
||||
if (!BRI_NT_PTMP(ctrl)) {
|
||||
return NULL;
|
||||
@@ -1242,8 +1242,9 @@ static pri_event *q921_receive_MDL(struct pri *ctrl, q921_u *h, int len)
|
||||
q921_send_tei(ctrl, Q921_TEI_IDENTITY_ASSIGNED, ri, tei, 1);
|
||||
break;
|
||||
case Q921_TEI_IDENTITY_ASSIGNED:
|
||||
if (!BRI_TE_PTMP(ctrl))
|
||||
if (!BRI_TE_PTMP(ctrl)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Assuming we're operating on the specific TEI link here */
|
||||
link = ctrl->link.next;
|
||||
@@ -1290,8 +1291,9 @@ static pri_event *q921_receive_MDL(struct pri *ctrl, q921_u *h, int len)
|
||||
}
|
||||
break;
|
||||
case Q921_TEI_IDENTITY_CHECK_REQUEST:
|
||||
if (!BRI_TE_PTMP(ctrl))
|
||||
if (!BRI_TE_PTMP(ctrl)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Assuming we're operating on the specific TEI link here */
|
||||
link = ctrl->link.next;
|
||||
@@ -1307,8 +1309,9 @@ static pri_event *q921_receive_MDL(struct pri *ctrl, q921_u *h, int len)
|
||||
}
|
||||
break;
|
||||
case Q921_TEI_IDENTITY_REMOVE:
|
||||
if (!BRI_TE_PTMP(ctrl))
|
||||
if (!BRI_TE_PTMP(ctrl)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Assuming we're operating on the specific TEI link here */
|
||||
link = ctrl->link.next;
|
||||
@@ -2474,7 +2477,7 @@ static pri_event *__q921_receive_qualified(struct q921_link *link, q921_h *h, in
|
||||
|
||||
ctrl = link->ctrl;
|
||||
|
||||
switch(h->h.data[0] & Q921_FRAMETYPE_MASK) {
|
||||
switch (h->h.data[0] & Q921_FRAMETYPE_MASK) {
|
||||
case 0:
|
||||
case 2:
|
||||
ev = q921_iframe_rx(link, h, len);
|
||||
|
||||
Reference in New Issue
Block a user