Change in osmo-mgw[master]: mgcp_endp: use NUM_E1_TS from e1_input.h

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/.

laforge gerrit-no-reply at lists.osmocom.org
Mon Sep 7 12:49:52 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/20012 )

Change subject: mgcp_endp: use NUM_E1_TS from e1_input.h
......................................................................

mgcp_endp: use NUM_E1_TS from e1_input.h

do not introduce another define constant, use NUM_E1_TS as number of E1
timeslots.

Change-Id: I3bbfb6822d5595f9d243849141883490fa8037cb
---
M src/libosmo-mgcp/mgcp_endp.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  pespin: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libosmo-mgcp/mgcp_endp.c b/src/libosmo-mgcp/mgcp_endp.c
index 668d88b..c4f3653 100644
--- a/src/libosmo-mgcp/mgcp_endp.c
+++ b/src/libosmo-mgcp/mgcp_endp.c
@@ -27,9 +27,9 @@
 #include <osmocom/mgcp/mgcp_endp.h>
 #include <osmocom/mgcp/mgcp_trunk.h>
 
+#include <osmocom/abis/e1_input.h>
 #include <osmocom/mgcp/mgcp_e1.h>
 
-#define E1_TIMESLOTS 32
 #define E1_RATE_MAX 64
 #define E1_OFFS_MAX 8
 
@@ -375,7 +375,7 @@
 		if (strncmp(token, "s-", 2) == 0) {
 			errno = 0;
 			res = strtoul(token + 2, NULL, 10);
-			if (errno == ERANGE || res > E1_TIMESLOTS)
+			if (errno == ERANGE || res > NUM_E1_TS)
 				return 0xff;
 			return (uint8_t) res;
 		}

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/20012
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I3bbfb6822d5595f9d243849141883490fa8037cb
Gerrit-Change-Number: 20012
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200907/6d646e6d/attachment.htm>


More information about the gerrit-log mailing list