<p>Neels Hofmeyr has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/9586">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mgcp-client: add mgcp_conn_get_ci()<br><br>Return the CI string allocated by the MGW and sent back during CRCX ACK.<br><br>So far the CI that identifies one connection of an MGW endpoint is "hidden"<br>behind mgcp_conn_* API. This CI string is however very interesting, for<br>logging, to be able to correlate with MGCP messages in network traces.<br><br>For osmo-bsc, there is an upcoming mgw_endpoint_fsm that will log the CI string<br>using this function.<br><br>Change-Id: I0c802c0cc3fa0aae9558bd7f15aad1cb9a8b12b2<br>---<br>M include/osmocom/mgcp_client/mgcp_client_fsm.h<br>M src/libosmo-mgcp-client/mgcp_client_fsm.c<br>2 files changed, 10 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/86/9586/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/mgcp_client/mgcp_client_fsm.h b/include/osmocom/mgcp_client/mgcp_client_fsm.h</span><br><span>index 7d06178..93fe582 100644</span><br><span>--- a/include/osmocom/mgcp_client/mgcp_client_fsm.h</span><br><span>+++ b/include/osmocom/mgcp_client/mgcp_client_fsm.h</span><br><span>@@ -31,3 +31,5 @@</span><br><span>                                     uint32_t parent_evt, struct mgcp_conn_peer *conn_peer);</span><br><span> int mgcp_conn_modify(struct osmo_fsm_inst *fi, uint32_t parent_evt, struct mgcp_conn_peer *conn_peer);</span><br><span> void mgcp_conn_delete(struct osmo_fsm_inst *fi);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+const char *mgcp_conn_get_ci(struct osmo_fsm_inst *fi);</span><br><span>diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c</span><br><span>index 6f84ffa..10a5b6d 100644</span><br><span>--- a/src/libosmo-mgcp-client/mgcp_client_fsm.c</span><br><span>+++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c</span><br><span>@@ -215,6 +215,14 @@</span><br><span>      }</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* Return the CI that the MGW allocated during CRCX response. This is purely informational for logging</span><br><span style="color: hsl(120, 100%, 40%);">+ * and identity tracking; the mgcp_conn_*() functions take care of using the right CI internally. */</span><br><span style="color: hsl(120, 100%, 40%);">+const char *mgcp_conn_get_ci(struct osmo_fsm_inst *fi)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+   struct mgcp_ctx *mgcp_ctx = fi->priv;</span><br><span style="color: hsl(120, 100%, 40%);">+      return mgcp_ctx->conn_id;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> static void mgw_crcx_resp_cb(struct mgcp_response *r, void *priv)</span><br><span> {</span><br><span>  struct osmo_fsm_inst *fi = priv;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/9586">change 9586</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/9586"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-mgw </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I0c802c0cc3fa0aae9558bd7f15aad1cb9a8b12b2 </div>
<div style="display:none"> Gerrit-Change-Number: 9586 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>