aboutsummaryrefslogtreecommitdiffstats
path: root/src/mgcp_hw.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-01-23 16:28:16 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-01-23 16:30:16 +0100
commite1ec4c7047e7c152f31a7ba13a3db5dd5c0df682 (patch)
treeee4ba7b44999c1b0caa5b8017ab89b8bff172820 /src/mgcp_hw.c
parentc96c57b8d587e466fe63026fc210bf7ca6a5e7cf (diff)
hw: The DSP resource was one based with the SNMP API, subtract it
* Change the assigning dsp_resource to start with one and increase after usage and not before usage (so it becomes the next free port). * Subtract one from dsp_port after we have selected the path. In the longer run I should make dsp_resources zero based all the way.
Diffstat (limited to 'src/mgcp_hw.c')
-rw-r--r--src/mgcp_hw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mgcp_hw.c b/src/mgcp_hw.c
index bcda02e..1fd4d92 100644
--- a/src/mgcp_hw.c
+++ b/src/mgcp_hw.c
@@ -75,11 +75,11 @@ int mgcp_hw_connect(int port, int trunk, int timeslot)
_tx_port = tx_port_get(port);
status = PTI_ConnectHSCM(PTI_HSCM_TRUNK + trunk, timeslot - 1,
- PTI_HSCM_PTMC, _rx_port, 1, 0);
+ PTI_HSCM_PTMC, _rx_port - 1, 1, 0);
if (status != 0)
return -1;
- status = PTI_ConnectHSCM(PTI_HSCM_PTMC, _tx_port,
+ status = PTI_ConnectHSCM(PTI_HSCM_PTMC, _tx_port - 1,
PTI_HSCM_TRUNK + trunk, timeslot - 1, 1, 0);
if (status != 0)
return -1;