aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/mgcp_internal.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-12-07 15:04:07 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-12-10 14:46:00 +0100
commitce55361e93529522790fa681ef5837237e9492b1 (patch)
treeb243e0468889c812413dfa5b5770950621a81c33 /openbsc/include/openbsc/mgcp_internal.h
parent29de346b329fc05750b52446f3516f897415b43b (diff)
mgcp: Test and implement re-transmission handling
MGCP is used over UDP and a response might be lost. The MGCP RFC asks for keeping a list of responses and then using the previous response to answer a duplicate request. I tried to conserve memory and just wanted to remember the last transaction identifier and result-code and re-generate the result from that. This made the code look bad and this is why the entire response will now be stored. It sadly increases the memory usage but can not be avoided at this time. Remove the msg->l3h pointer for the RQNT callback as strtok has modified the content of it.
Diffstat (limited to 'openbsc/include/openbsc/mgcp_internal.h')
-rw-r--r--openbsc/include/openbsc/mgcp_internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/mgcp_internal.h b/openbsc/include/openbsc/mgcp_internal.h
index 025b813a5..bcef8724e 100644
--- a/openbsc/include/openbsc/mgcp_internal.h
+++ b/openbsc/include/openbsc/mgcp_internal.h
@@ -126,6 +126,10 @@ struct mgcp_endpoint {
/* SSRC/seq/ts patching for loop */
int allow_patch;
+ /* fields for re-transmission */
+ char *last_trans;
+ char *last_response;
+
/* tap for the endpoint */
struct mgcp_rtp_tap taps[MGCP_TAP_COUNT];
};