<p>Jaco Kroon has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13502">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">netsock2: backport ast_sockaddr_copy_sockaddr to asterisk 13.<br><br>This function is already present in 15, 16 and master.<br><br>Change-Id: I491ddecdccc87620c264567c549217e48f3d4ff1<br>Signed-off-by: Jaco Kroon <jaco@uls.co.za><br>---<br>M include/asterisk/netsock2.h<br>1 file changed, 16 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/02/13502/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/asterisk/netsock2.h b/include/asterisk/netsock2.h</span><br><span>index b6f2858..b62ca4c 100644</span><br><span>--- a/include/asterisk/netsock2.h</span><br><span>+++ b/include/asterisk/netsock2.h</span><br><span>@@ -141,6 +141,22 @@</span><br><span> }</span><br><span> </span><br><span> /*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copies the data from a sockaddr to an ast_sockaddr</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param dst The destination ast_sockaddr</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param src The source sockaddr</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param len Length of the value stored in sockaddr</span><br><span style="color: hsl(120, 100%, 40%);">+ * \retval void</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+static inline void ast_sockaddr_copy_sockaddr(struct ast_sockaddr *dst,</span><br><span style="color: hsl(120, 100%, 40%);">+ struct sockaddr *src, socklen_t len)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ memcpy(dst, src, len);</span><br><span style="color: hsl(120, 100%, 40%);">+ dst->len = len;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span> * \since 1.8</span><br><span> *</span><br><span> * \brief</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13502">change 13502</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.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.asterisk.org/c/asterisk/+/13502"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I491ddecdccc87620c264567c549217e48f3d4ff1 </div>
<div style="display:none"> Gerrit-Change-Number: 13502 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Jaco Kroon <jaco@uls.co.za> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>