<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-e1d/+/26702">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Introduce a #define for the maximum HDLC buffer size (264)<br><br>The purpose of turning the magic number into a #define is to allow<br>clients to use it.<br><br>Change-Id: I9281a4cd85d79823d06860ffaaa09b6d67bc0de3<br>---<br>M include/osmocom/e1d/proto.h<br>M src/e1d.h<br>2 files changed, 5 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/02/26702/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/e1d/proto.h b/include/osmocom/e1d/proto.h</span><br><span>index 6457f14..3033f11 100644</span><br><span>--- a/include/osmocom/e1d/proto.h</span><br><span>+++ b/include/osmocom/e1d/proto.h</span><br><span>@@ -92,6 +92,7 @@</span><br><span> #define E1DP_INVALID 0xff</span><br><span> #define E1DP_DEFAULT_SOCKET "/tmp/osmo-e1d.ctl"</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#define E1DP_MAX_SIZE_HDLC       264</span><br><span> </span><br><span> struct osmo_e1dp_msg_hdr {</span><br><span>        uint16_t magic;</span><br><span>diff --git a/src/e1d.h b/src/e1d.h</span><br><span>index e824f8f..af6c09e 100644</span><br><span>--- a/src/e1d.h</span><br><span>+++ b/src/e1d.h</span><br><span>@@ -30,6 +30,8 @@</span><br><span> #include <osmocom/core/timer.h></span><br><span> #include <osmocom/vty/command.h></span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/e1d/proto.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> enum e1d_vty_node {</span><br><span>   E1D_NODE = _LAST_OSMOVTY_NODE + 1,</span><br><span>   LINE_NODE</span><br><span>@@ -66,8 +68,8 @@</span><br><span>                struct osmo_isdnhdlc_vars tx;</span><br><span>                struct osmo_isdnhdlc_vars rx;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-               uint8_t rx_buf[264];</span><br><span style="color: hsl(0, 100%, 40%);">-            uint8_t tx_buf[264];</span><br><span style="color: hsl(120, 100%, 40%);">+          uint8_t rx_buf[E1DP_MAX_SIZE_HDLC];</span><br><span style="color: hsl(120, 100%, 40%);">+           uint8_t tx_buf[E1DP_MAX_SIZE_HDLC];</span><br><span>          int tx_ofs;</span><br><span>          int tx_len;</span><br><span>  } hdlc;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-e1d/+/26702">change 26702</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-e1d/+/26702"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-e1d </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I9281a4cd85d79823d06860ffaaa09b6d67bc0de3 </div>
<div style="display:none"> Gerrit-Change-Number: 26702 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>