osmith has uploaded this change for review.

View Change

mgcp_client: mgcp_msg_gen: add more error logs

While adding CSD, this failed for me in add_lco without a descriptive
log message, so add more error messages.

Related: OS#4393
Change-Id: I4873a2db95525aab3e13046b645dd8f90e951466
---
M src/libosmo-mgcp-client/mgcp_client.c
1 file changed, 19 insertions(+), 2 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/57/31457/1
diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c
index c3ecc9f..0434e70 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -1392,8 +1392,10 @@
if (!use_sdp
&& (mgcp_msg->verb == MGCP_VERB_CRCX
|| mgcp_msg->verb == MGCP_VERB_MDCX)) {
- if (add_lco(msg, mgcp_msg) < 0)
+ if (add_lco(msg, mgcp_msg) < 0) {
+ LOGPMGW(mgcp, LOGL_ERROR, "Failed to add LCO, can not generate MGCP message\n");
return NULL;
+ }
}

/* Add mode */
@@ -1428,8 +1430,10 @@
if (use_sdp
&& (mgcp_msg->verb == MGCP_VERB_CRCX
|| mgcp_msg->verb == MGCP_VERB_MDCX)) {
- if (add_sdp(msg, mgcp_msg, mgcp) < 0)
+ if (add_sdp(msg, mgcp_msg, mgcp) < 0) {
+ LOGPMGW(mgcp, LOGL_ERROR, "Failed to add SDP, can not generate MGCP message\n");
return NULL;
+ }
}

if (rc != 0) {

To view, visit change 31457. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I4873a2db95525aab3e13046b645dd8f90e951466
Gerrit-Change-Number: 31457
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-MessageType: newchange