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

dexter gerrit-no-reply at lists.osmocom.org
Mon Sep 7 10:11:48 UTC 2020


dexter has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/12/20012/1

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-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200907/b443c9e1/attachment.htm>


More information about the gerrit-log mailing list