aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-09-20 01:07:23 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-09-20 02:47:34 +0800
commite3946f458a9c585c194a88f8260cb61ffd89b443 (patch)
treef9492e2b29a3080645b5f61e1967be205c7bb4e1
parentcd702379fe25cd09432bb1a7a06594c96465a69c (diff)
mgcp: Remove the hack to remap timeslot one...
The timeslot one is blocked and should not be used, replace the code with a warning and watch out for it. Tis is most likely due the uncovered in the previous commit due the wrong TLV definition.
-rw-r--r--openbsc/include/openbsc/mgcp.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/openbsc/include/openbsc/mgcp.h b/openbsc/include/openbsc/mgcp.h
index ed070cdbc..0a0032211 100644
--- a/openbsc/include/openbsc/mgcp.h
+++ b/openbsc/include/openbsc/mgcp.h
@@ -26,6 +26,8 @@
#include <osmocore/msgb.h>
+#include "debug.h"
+
#include <arpa/inet.h>
#define RTP_PORT_DEFAULT 4000
@@ -145,8 +147,11 @@ struct msgb *mgcp_create_response_with_data(int code, const char *msg, const cha
/* adc helper */
static inline int mgcp_timeslot_to_endpoint(int multiplex, int timeslot)
{
- if (timeslot == 0)
- timeslot = 1;
+ if (timeslot == 0) {
+ LOGP(DMGCP, LOGL_ERROR, "Timeslot should not be 0\n");
+ timeslot = 255;
+ }
+
return timeslot + (32 * multiplex);
}
@@ -154,9 +159,6 @@ static inline void mgcp_endpoint_to_timeslot(int endpoint, int *multiplex, int *
{
*multiplex = endpoint / 32;
*timeslot = endpoint % 32;
-
- if (*timeslot == 1)
- *timeslot = 0;
}