<p>Neels Hofmeyr has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/10675">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mgcp_test: fix get_conn_id_from_response() CI length<br><br>This function is set on conn ID length of 32 characters. Make it detect a<br>shorter length also when parsing 'o=-' headers. Before, this failed to<br>recognize a space as the end of the conn ID, now sees any non-hex char as end.<br><br>Related: OS#3507<br>Change-Id: I762c273bac172acb6d0aae6ea6267603ab654cbf<br>---<br>M tests/mgcp/mgcp_test.c<br>1 file changed, 4 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/75/10675/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c</span><br><span>index 228b2f9..2f3a8a7 100644</span><br><span>--- a/tests/mgcp/mgcp_test.c</span><br><span>+++ b/tests/mgcp/mgcp_test.c</span><br><span>@@ -37,6 +37,7 @@</span><br><span> #include <dlfcn.h></span><br><span> #include <time.h></span><br><span> #include <math.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <ctype.h></span><br><span> </span><br><span> char *strline_r(char *str, char **saveptr);</span><br><span> </span><br><span>@@ -626,8 +627,10 @@</span><br><span> </span><br><span>        if (got_conn_id) {</span><br><span>           for (i = 0; i < conn_id_len; i++) {</span><br><span style="color: hsl(0, 100%, 40%);">-                  if (conn_id[i] == '\n' || conn_id[i] == '\r')</span><br><span style="color: hsl(120, 100%, 40%);">+                 if (!isxdigit(conn_id[i])) {</span><br><span>                                 conn_id[i] = '\0';</span><br><span style="color: hsl(120, 100%, 40%);">+                            break;</span><br><span style="color: hsl(120, 100%, 40%);">+                        }</span><br><span>            }</span><br><span> </span><br><span>                /* A valid conn_id must at least contain one digit, and must</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10675">change 10675</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/10675"/><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: I762c273bac172acb6d0aae6ea6267603ab654cbf </div>
<div style="display:none"> Gerrit-Change-Number: 10675 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>