mgcp_client: detect SDP section-start parsing errors
After call to mgcp_find_section_end(), actually check the proper variable to
evaluate its return value.
Show in mgcp_client_test output that the parsing errors are fixed, and enable
the assertion that no tests should fail.
Change-Id: I62a2453cd9e2e7d5408423161fa65ec9c9989f98
diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c
index de940c0..e054593 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -262,7 +262,7 @@
/* Find beginning of the parameter (SDP) section */
data_ptr = mgcp_find_section_end(data);
- if (!data) {
+ if (!data_ptr) {
LOGP(DLMGCP, LOGL_ERROR,
"MGCP response: cannot find start of SDP parameters\n");
rc = -EINVAL;