<p>keith has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/17648">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Meas Tools: Avoid messing up the terminal with error on osmo_sock_init<br><br>Let's try to bind the socket before we call initCDKScreen()<br>so we don't end up with a messed up terminal if the socket call<br>fails.<br><br>Change-Id: Ia5148d9ef386df314bc2837b3cb672150250bd2a<br>---<br>M src/utils/meas_vis.c<br>1 file changed, 4 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/48/17648/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/utils/meas_vis.c b/src/utils/meas_vis.c</span><br><span>index 686cfb9..1cbafcf 100644</span><br><span>--- a/src/utils/meas_vis.c</span><br><span>+++ b/src/utils/meas_vis.c</span><br><span>@@ -290,6 +290,10 @@</span><br><span> </span><br><span>        printf("sizeof(gsm_meas_rep)=%u\n", sizeof(struct gsm_meas_rep));</span><br><span>  printf("sizeof(meas_feed_meas)=%u\n", sizeof(struct meas_feed_meas));</span><br><span style="color: hsl(120, 100%, 40%);">+       g_st.udp_ofd.cb = udp_fd_cb;</span><br><span style="color: hsl(120, 100%, 40%);">+  rc =  osmo_sock_init_ofd(&g_st.udp_ofd, AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND);</span><br><span style="color: hsl(120, 100%, 40%);">+  if (rc < 0)</span><br><span style="color: hsl(120, 100%, 40%);">+                exit(1);</span><br><span> </span><br><span>         INIT_LLIST_HEAD(&g_st.ms_list);</span><br><span>  g_st.curses_win = initscr();</span><br><span>@@ -318,11 +322,6 @@</span><br><span>  exit(0);</span><br><span> #endif</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-  g_st.udp_ofd.cb = udp_fd_cb;</span><br><span style="color: hsl(0, 100%, 40%);">-    rc =  osmo_sock_init_ofd(&g_st.udp_ofd, AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 8888, OSMO_SOCK_F_BIND);</span><br><span style="color: hsl(0, 100%, 40%);">-    if (rc < 0)</span><br><span style="color: hsl(0, 100%, 40%);">-          exit(1);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>     while (1) {</span><br><span>          osmo_select_main(0);</span><br><span>                 update_sliders();</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/17648">change 17648</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/c/osmo-bsc/+/17648"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ia5148d9ef386df314bc2837b3cb672150250bd2a </div>
<div style="display:none"> Gerrit-Change-Number: 17648 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: keith <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>