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.
diff --git a/openbsc/include/openbsc/mgcp.h b/openbsc/include/openbsc/mgcp.h
index ed070cd..0a00322 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 @@
/* 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 @@
{
*multiplex = endpoint / 32;
*timeslot = endpoint % 32;
-
- if (*timeslot == 1)
- *timeslot = 0;
}