This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Max gerrit-no-reply at lists.osmocom.orgMax has uploaded this change for review. ( https://gerrit.osmocom.org/11817
Change subject: mobile: use proper type for boolean flags
......................................................................
mobile: use proper type for boolean flags
This makes reading code easier and simplifies further modifications.
Change-Id: I7eff2a61495ff167dc19fc9a41882a7a11fbf32d
---
M src/host/layer23/include/osmocom/bb/mobile/mncc.h
M src/host/layer23/src/mobile/mnccms.c
2 files changed, 11 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/17/11817/1
diff --git a/src/host/layer23/include/osmocom/bb/mobile/mncc.h b/src/host/layer23/include/osmocom/bb/mobile/mncc.h
index cad1883..8ec9358 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/mncc.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/mncc.h
@@ -36,9 +36,9 @@
uint32_t callref;
- uint8_t init; /* call initiated, no response yet */
- uint8_t hold; /* call on hold */
- uint8_t ring; /* call ringing/knocking */
+ bool init; /* call initiated, no response yet */
+ bool hold; /* call on hold */
+ bool ring; /* call ringing/knocking */
struct osmo_timer_list dtmf_timer;
uint8_t dtmf_state;
diff --git a/src/host/layer23/src/mobile/mnccms.c b/src/host/layer23/src/mobile/mnccms.c
index 9f58112..2243291 100644
--- a/src/host/layer23/src/mobile/mnccms.c
+++ b/src/host/layer23/src/mobile/mnccms.c
@@ -294,7 +294,7 @@
}
/* not in initiated state anymore */
- call->init = 0;
+ call->init = false;
switch (msg_type) {
case MNCC_DISC_IND:
@@ -478,9 +478,9 @@
LOGP(DMNCC, LOGL_INFO, "Ring!\n");
else {
LOGP(DMNCC, LOGL_INFO, "Knock!\n");
- call->hold = 1;
+ call->hold = true;
}
- call->ring = 1;
+ call->ring = true;
memset(&mncc, 0, sizeof(struct gsm_mncc));
mncc.callref = call->callref;
mncc_tx_to_cc(ms, MNCC_ALERT_REQ, &mncc);
@@ -498,7 +498,7 @@
vty_notify(ms, NULL);
vty_notify(ms, "Call is on hold\n");
LOGP(DMNCC, LOGL_INFO, "Call is on hold\n");
- call->hold = 1;
+ call->hold = true;
break;
case MNCC_HOLD_REJ:
vty_notify(ms, NULL);
@@ -509,7 +509,7 @@
vty_notify(ms, NULL);
vty_notify(ms, "Call is retrieved\n");
LOGP(DMNCC, LOGL_INFO, "Call is retrieved\n");
- call->hold = 0;
+ call->hold = false;
break;
case MNCC_RETRIEVE_REJ:
vty_notify(ms, NULL);
@@ -554,7 +554,7 @@
return -ENOMEM;
call->ms = ms;
call->callref = new_callref++;
- call->init = 1;
+ call->init = true;
llist_add_tail(&call->entry, &call_list);
memset(&setup, 0, sizeof(struct gsm_mncc));
@@ -646,8 +646,8 @@
vty_notify(ms, "Please put active call on hold first!\n");
return -EBUSY;
}
- alerting->ring = 0;
- alerting->hold = 0;
+ alerting->ring = false;
+ alerting->hold = false;
memset(&rsp, 0, sizeof(struct gsm_mncc));
rsp.callref = alerting->callref;
--
To view, visit https://gerrit.osmocom.org/11817
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7eff2a61495ff167dc19fc9a41882a7a11fbf32d
Gerrit-Change-Number: 11817
Gerrit-PatchSet: 1
Gerrit-Owner: Max <msuraev at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181116/1990fb80/attachment.htm>