mgcp: Put local connection options into a struct
Currently the local connection options have been stored as a string.
This patch replaces this string by a struct (that still contains a
string) along with the parsed fields (only the packetization period
at the moment).
It also re-adds the calls to set_local_cx_options() to the
handle_create_con() and handle_modify_con() functions. Except for
the test program this has no side effects, since the LCO values
aren't used yet.
diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c
index bea9771..8b5e17d 100644
--- a/openbsc/tests/mgcp/mgcp_test.c
+++ b/openbsc/tests/mgcp/mgcp_test.c
@@ -319,7 +319,14 @@
endp->net_end.packet_duration_ms);
else
printf("Packet duration not set\n");
- printf("Requested packetization period not set\n");
+ if (endp->local_options.pkt_period_min ||
+ endp->local_options.pkt_period_max)
+ printf("Requested packetetization period: "
+ "%d-%d\n",
+ endp->local_options.pkt_period_min,
+ endp->local_options.pkt_period_max);
+ else
+ printf("Requested packetization period not set\n");
endp->net_end.packet_duration_ms = -1;
}