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
This commit is contained in:
Oliver Smith 2023-02-22 16:30:02 +01:00 committed by osmith
parent 671c37b72b
commit 0dbaaadc06
2 changed files with 7 additions and 2 deletions

View File

@ -1392,8 +1392,10 @@ struct msgb *mgcp_msg_gen(struct mgcp_client *mgcp, struct mgcp_msg *mgcp_msg)
if (!use_sdp if (!use_sdp
&& (mgcp_msg->verb == MGCP_VERB_CRCX && (mgcp_msg->verb == MGCP_VERB_CRCX
|| mgcp_msg->verb == MGCP_VERB_MDCX)) { || 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; return NULL;
}
} }
/* Add mode */ /* Add mode */
@ -1428,8 +1430,10 @@ struct msgb *mgcp_msg_gen(struct mgcp_client *mgcp, struct mgcp_msg *mgcp_msg)
if (use_sdp if (use_sdp
&& (mgcp_msg->verb == MGCP_VERB_CRCX && (mgcp_msg->verb == MGCP_VERB_CRCX
|| mgcp_msg->verb == MGCP_VERB_MDCX)) { || 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; return NULL;
}
} }
if (rc != 0) { if (rc != 0) {

View File

@ -1,5 +1,6 @@
DLMGCP MGW(mgw) MGCP client: using endpoint domain '@mgw' DLMGCP MGW(mgw) MGCP client: using endpoint domain '@mgw'
DLMGCP MGW(mgw) Message buffer to small, can not generate MGCP message (SDP) DLMGCP MGW(mgw) Message buffer to small, can not generate MGCP message (SDP)
DLMGCP MGW(mgw) Failed to add SDP, can not generate MGCP message
test_mgcp_client_cancel(): test_mgcp_client_cancel():
DLMGCP MGW(mgw) MGCP client: using endpoint domain '@mgw' DLMGCP MGW(mgw) MGCP client: using endpoint domain '@mgw'