<p>tnt has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/18113">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">e1_input: Allow to unset the pcap fd<br><br>Note that this only affects lines that are create _after_ the call.<br>Existing ones will keep their current fd and that's also why we can't<br>just close it since it's still in use.<br><br>Signed-off-by: Sylvain Munaut <tnt@246tNt.com><br>Change-Id: I5c7dd740ba0a90b40c69a53b3dcc9d6d6a98f660<br>---<br>M src/e1_input.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/13/18113/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/e1_input.c b/src/e1_input.c</span><br><span>index ad4e25c..c6ca2a3 100644</span><br><span>--- a/src/e1_input.c</span><br><span>+++ b/src/e1_input.c</span><br><span>@@ -153,7 +153,7 @@</span><br><span>         };</span><br><span> </span><br><span>       pcap_fd = fd;</span><br><span style="color: hsl(0, 100%, 40%);">-   return write(pcap_fd, &header, sizeof(header));</span><br><span style="color: hsl(120, 100%, 40%);">+   return (pcap_fd < 0) ? 0 : write(pcap_fd, &header, sizeof(header));</span><br><span> }</span><br><span> </span><br><span> /* This currently only works for the D-Channel */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-abis/+/18113">change 18113</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/libosmo-abis/+/18113"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmo-abis </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I5c7dd740ba0a90b40c69a53b3dcc9d6d6a98f660 </div>
<div style="display:none"> Gerrit-Change-Number: 18113 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: tnt <tnt@246tNt.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>