nat: Keep the state (CRCX,MDCX,DLCX) of the operation..
This will allow to have additional debug information and to
use the state inside the forwarding code.
diff --git a/openbsc/src/nat/bsc_mgcp_utils.c b/openbsc/src/nat/bsc_mgcp_utils.c
index 17c4bbf..6644c5e 100644
--- a/openbsc/src/nat/bsc_mgcp_utils.c
+++ b/openbsc/src/nat/bsc_mgcp_utils.c
@@ -94,6 +94,7 @@
nat->bsc_endpoints[i].transaction_id = NULL;
}
+ nat->bsc_endpoints[i].transaction_state = 0;
nat->bsc_endpoints[i].bsc = NULL;
}
@@ -202,6 +203,7 @@
endpoint, bsc_endp->transaction_id);
talloc_free(bsc_endp->transaction_id);
bsc_endp->transaction_id = NULL;
+ bsc_endp->transaction_state = 0;
}
bsc_endp->bsc = NULL;
@@ -237,6 +239,7 @@
bsc_endp->transaction_id = talloc_strdup(nat, transaction_id);
+ bsc_endp->transaction_state = state;
bsc_endp->bsc = sccp->bsc;
/* we need to update some bits */
@@ -325,6 +328,7 @@
/* free some stuff */
talloc_free(bsc_endp->transaction_id);
bsc_endp->transaction_id = NULL;
+ bsc_endp->transaction_state = 0;
/*
* rewrite the information. In case the endpoint was deleted