<p>N A has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18885">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">general: Very minor formatting improvements.<br><br>Fixes some drastic formatting inconsistencies<br>of doxygen comments in an IAX2 header file.<br><br>Also fixes a few coding guideline violations:<br>* Use of C99 comments<br>* Opening brace on same line as function prototype<br><br>ASTERISK-30163 #close<br><br>Change-Id: I07771c4c89facd41ce8d323859f022ddbddf6ca7<br>---<br>M apps/app_mp3.c<br>M channels/iax2/include/iax2.h<br>M main/channel_internal_api.c<br>M main/strings.c<br>4 files changed, 39 insertions(+), 39 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/85/18885/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_mp3.c b/apps/app_mp3.c</span><br><span>index 9bc23c0..ef342b3 100644</span><br><span>--- a/apps/app_mp3.c</span><br><span>+++ b/apps/app_mp3.c</span><br><span>@@ -101,7 +101,7 @@</span><br><span> /* Execute mpg123, but buffer if it's a net connection */</span><br><span> if (!strncasecmp(filename, "http://", 7) && strstr(filename, ".m3u")) {</span><br><span> char buffer_size_str[8];</span><br><span style="color: hsl(0, 100%, 40%);">- snprintf(buffer_size_str, 8, "%u", (int) 0.5*2*sampling_rate/1000); // 0.5 seconds for a live stream</span><br><span style="color: hsl(120, 100%, 40%);">+ snprintf(buffer_size_str, 8, "%u", (int) 0.5*2*sampling_rate/1000); /* 0.5 seconds for a live stream */</span><br><span> /* Most commonly installed in /usr/local/bin */</span><br><span> execl(LOCAL_MPG_123, "mpg123", "-e", "s16", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, "-@", filename, (char *)NULL);</span><br><span> /* But many places has it in /usr/bin */</span><br><span>@@ -111,7 +111,7 @@</span><br><span> }</span><br><span> else if (!strncasecmp(filename, "http://", 7)) {</span><br><span> char buffer_size_str[8];</span><br><span style="color: hsl(0, 100%, 40%);">- snprintf(buffer_size_str, 8, "%u", 6*2*sampling_rate/1000); // 6 seconds for a remote MP3 file</span><br><span style="color: hsl(120, 100%, 40%);">+ snprintf(buffer_size_str, 8, "%u", 6*2*sampling_rate/1000); /* 6 seconds for a remote MP3 file */</span><br><span> /* Most commonly installed in /usr/local/bin */</span><br><span> execl(LOCAL_MPG_123, "mpg123", "-e", "s16", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, filename, (char *)NULL);</span><br><span> /* But many places has it in /usr/bin */</span><br><span>diff --git a/channels/iax2/include/iax2.h b/channels/iax2/include/iax2.h</span><br><span>index 0d92674..9c18543 100644</span><br><span>--- a/channels/iax2/include/iax2.h</span><br><span>+++ b/channels/iax2/include/iax2.h</span><br><span>@@ -128,11 +128,11 @@</span><br><span> #define IAX_DEFAULT_PORTNO 4569</span><br><span> </span><br><span> /*! IAX Information elements */</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_IE_CALLED_NUMBER 1 /*!< Number/extension being called - string */</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_IE_CALLING_NUMBER 2 /*!< Calling number - string */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_IE_CALLED_NUMBER 1 /*!< Number/extension being called - string */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_IE_CALLING_NUMBER 2 /*!< Calling number - string */</span><br><span> #define IAX_IE_CALLING_ANI 3 /*!< Calling number ANI for billing - string */</span><br><span> #define IAX_IE_CALLING_NAME 4 /*!< Name of caller - string */</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_IE_CALLED_CONTEXT 5 /*!< Context for number - string */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_IE_CALLED_CONTEXT 5 /*!< Context for number - string */</span><br><span> #define IAX_IE_USERNAME 6 /*!< Username (peer or user) for authentication - string */</span><br><span> #define IAX_IE_PASSWORD 7 /*!< Password for authentication - string */</span><br><span> #define IAX_IE_CAPABILITY 8 /*!< Actual codec capability - unsigned int */</span><br><span>@@ -140,12 +140,12 @@</span><br><span> #define IAX_IE_LANGUAGE 10 /*!< Desired language - string */</span><br><span> #define IAX_IE_VERSION 11 /*!< Protocol version - short */</span><br><span> #define IAX_IE_ADSICPE 12 /*!< CPE ADSI capability - short */</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_IE_DNID 13 /*!< Originally dialed DNID - string */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_IE_DNID 13 /*!< Originally dialed DNID - string */</span><br><span> #define IAX_IE_AUTHMETHODS 14 /*!< Authentication method(s) - short */</span><br><span> #define IAX_IE_CHALLENGE 15 /*!< Challenge data for MD5/RSA - string */</span><br><span> #define IAX_IE_MD5_RESULT 16 /*!< MD5 challenge result - string */</span><br><span> #define IAX_IE_RSA_RESULT 17 /*!< RSA challenge result - string */</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_IE_APPARENT_ADDR 18 /*!< Apparent address of peer - struct sockaddr_in */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_IE_APPARENT_ADDR 18 /*!< Apparent address of peer - struct sockaddr_in */</span><br><span> #define IAX_IE_REFRESH 19 /*!< When to refresh registration - short */</span><br><span> #define IAX_IE_DPSTATUS 20 /*!< Dialplan status - short */</span><br><span> #define IAX_IE_CALLNO 21 /*!< Call number of peer - short */</span><br><span>@@ -157,7 +157,7 @@</span><br><span> #define IAX_IE_TRANSFERID 27 /*!< Transfer Request Identifier -- int */</span><br><span> #define IAX_IE_RDNIS 28 /*!< Referring DNIS -- string */</span><br><span> #define IAX_IE_PROVISIONING 29 /*!< Provisioning info */</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_IE_AESPROVISIONING 30 /*!< AES Provisioning info */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_IE_AESPROVISIONING 30 /*!< AES Provisioning info */</span><br><span> #define IAX_IE_DATETIME 31 /*!< Date/Time */</span><br><span> #define IAX_IE_DEVICETYPE 32 /*!< Device Type -- string */</span><br><span> #define IAX_IE_SERVICEIDENT 33 /*!< Service Identifier -- string */</span><br><span>@@ -172,7 +172,7 @@</span><br><span> #define IAX_IE_CAUSECODE 42 /*!< Hangup cause (u8) */</span><br><span> #define IAX_IE_ENCRYPTION 43 /*!< Encryption format (u16) */</span><br><span> #define IAX_IE_ENCKEY 44 /*!< Encryption key (raw) */</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_IE_CODEC_PREFS 45 /*!< Codec Negotiation */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_IE_CODEC_PREFS 45 /*!< Codec Negotiation */</span><br><span> </span><br><span> #define IAX_IE_RR_JITTER 46 /*!< Received jitter (as in RFC1889) u32 */</span><br><span> #define IAX_IE_RR_LOSS 47 /*!< Received loss (high byte loss pct, low 24 bits loss count, as in rfc1889 */</span><br><span>@@ -184,15 +184,15 @@</span><br><span> #define IAX_IE_OSPTOKEN 53 /*!< OSP token */</span><br><span> #define IAX_IE_CALLTOKEN 54 /*!< Call number security token */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_IE_CAPABILITY2 55 /*!< Actual codec capability - u8 version + integer array */</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_IE_FORMAT2 56 /*!< Desired codec format - u8 version + integer array */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_IE_CAPABILITY2 55 /*!< Actual codec capability - u8 version + integer array */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_IE_FORMAT2 56 /*!< Desired codec format - u8 version + integer array */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_IE_CALLINGANI2 57 /*!< Calling Originating Line Information (ANI2) digits */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_IE_CALLINGANI2 57 /*!< Calling Originating Line Information (ANI2) digits */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_MAX_OSPBLOCK_SIZE 254 /*!< Max OSP token block size, 255 bytes - 1 byte OSP token block index */</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_MAX_OSPBLOCK_NUM 4</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_MAX_OSPTOKEN_SIZE (IAX_MAX_OSPBLOCK_SIZE * IAX_MAX_OSPBLOCK_NUM)</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_MAX_OSPBUFF_SIZE (IAX_MAX_OSPTOKEN_SIZE + 16)</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_MAX_OSPBLOCK_SIZE 254 /*!< Max OSP token block size, 255 bytes - 1 byte OSP token block index */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_MAX_OSPBLOCK_NUM 4</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_MAX_OSPTOKEN_SIZE (IAX_MAX_OSPBLOCK_SIZE * IAX_MAX_OSPBLOCK_NUM)</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_MAX_OSPBUFF_SIZE (IAX_MAX_OSPTOKEN_SIZE + 16)</span><br><span> </span><br><span> #define IAX_AUTH_PLAINTEXT (1 << 0)</span><br><span> #define IAX_AUTH_MD5 (1 << 1)</span><br><span>@@ -204,21 +204,21 @@</span><br><span> #define IAX_META_TRUNK 1 /*!< Trunk meta-message */</span><br><span> #define IAX_META_VIDEO 2 /*!< Video frame */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_META_TRUNK_SUPERMINI 0 /*!< This trunk frame contains classic supermini frames */</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_META_TRUNK_MINI 1 /*!< This trunk frame contains trunked mini frames */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_META_TRUNK_SUPERMINI 0 /*!< This trunk frame contains classic supermini frames */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_META_TRUNK_MINI 1 /*!< This trunk frame contains trunked mini frames */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_RATE_8KHZ (1 << 0) /*!< 8khz sampling (default if absent) */</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_RATE_11KHZ (1 << 1) /*!< 11.025khz sampling */</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_RATE_16KHZ (1 << 2) /*!< 16khz sampling */</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_RATE_22KHZ (1 << 3) /*!< 22.05khz sampling */</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_RATE_44KHZ (1 << 4) /*!< 44.1khz sampling */</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_RATE_48KHZ (1 << 5) /*!< 48khz sampling */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_RATE_8KHZ (1 << 0) /*!< 8khz sampling (default if absent) */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_RATE_11KHZ (1 << 1) /*!< 11.025khz sampling */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_RATE_16KHZ (1 << 2) /*!< 16khz sampling */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_RATE_22KHZ (1 << 3) /*!< 22.05khz sampling */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_RATE_44KHZ (1 << 4) /*!< 44.1khz sampling */</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_RATE_48KHZ (1 << 5) /*!< 48khz sampling */</span><br><span> </span><br><span> #define IAX_DPSTATUS_EXISTS (1 << 0)</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_DPSTATUS_CANEXIST (1 << 1)</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_DPSTATUS_NONEXISTENT (1 << 2)</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_DPSTATUS_IGNOREPAT (1 << 14)</span><br><span style="color: hsl(0, 100%, 40%);">-#define IAX_DPSTATUS_MATCHMORE (1 << 15)</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_DPSTATUS_CANEXIST (1 << 1)</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_DPSTATUS_NONEXISTENT (1 << 2)</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_DPSTATUS_IGNOREPAT (1 << 14)</span><br><span style="color: hsl(120, 100%, 40%);">+#define IAX_DPSTATUS_MATCHMORE (1 << 15)</span><br><span> </span><br><span> /*! iax2 format bit field for handling codecs the old way */</span><br><span> typedef int64_t iax2_format;</span><br><span>@@ -228,11 +228,11 @@</span><br><span> </span><br><span> /*! Full frames are always delivered reliably */</span><br><span> struct ast_iax2_full_hdr {</span><br><span style="color: hsl(0, 100%, 40%);">- unsigned short scallno; /*!< Source call number -- high bit must be 1 */</span><br><span style="color: hsl(0, 100%, 40%);">- unsigned short dcallno; /*!< Destination call number -- high bit is 1 if retransmission */</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned short scallno; /*!< Source call number -- high bit must be 1 */</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned short dcallno; /*!< Destination call number -- high bit is 1 if retransmission */</span><br><span> unsigned int ts; /*!< 32-bit timestamp in milliseconds (from 1st transmission) */</span><br><span style="color: hsl(0, 100%, 40%);">- unsigned char oseqno; /*!< Packet number (outgoing) */</span><br><span style="color: hsl(0, 100%, 40%);">- unsigned char iseqno; /*!< Packet number (next incoming expected) */</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned char oseqno; /*!< Packet number (outgoing) */</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned char iseqno; /*!< Packet number (next incoming expected) */</span><br><span> unsigned char type; /*!< Frame type */</span><br><span> unsigned char csub; /*!< Compressed subclass */</span><br><span> unsigned char iedata[0];</span><br><span>@@ -247,8 +247,8 @@</span><br><span> </span><br><span> /*! Mini header is used only for voice frames -- delivered unreliably */</span><br><span> struct ast_iax2_mini_hdr {</span><br><span style="color: hsl(0, 100%, 40%);">- unsigned short callno; /*!< Source call number -- high bit must be 0, rest must be non-zero */</span><br><span style="color: hsl(0, 100%, 40%);">- unsigned short ts; /*!< 16-bit Timestamp (high 16 bits from last ast_iax2_full_hdr) */</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned short callno; /*!< Source call number -- high bit must be 0, rest must be non-zero */</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned short ts; /*!< 16-bit Timestamp (high 16 bits from last ast_iax2_full_hdr) */</span><br><span> /* Frametype implicitly VOICE_FRAME */</span><br><span> /* subclass implicit from last ast_iax2_full_hdr */</span><br><span> unsigned char data[0];</span><br><span>@@ -270,18 +270,18 @@</span><br><span> struct ast_iax2_video_hdr {</span><br><span> unsigned short zeros; /*!< Zeros field -- must be zero */</span><br><span> unsigned short callno; /*!< Video call number */</span><br><span style="color: hsl(0, 100%, 40%);">- unsigned short ts; /*!< Timestamp and mark if present */</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned short ts; /*!< Timestamp and mark if present */</span><br><span> unsigned char data[0];</span><br><span> } __attribute__ ((__packed__));</span><br><span> </span><br><span> struct ast_iax2_meta_trunk_hdr {</span><br><span style="color: hsl(0, 100%, 40%);">- unsigned int ts; /*!< 32-bit timestamp for all messages */</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned int ts; /*!< 32-bit timestamp for all messages */</span><br><span> unsigned char data[0];</span><br><span> } __attribute__ ((__packed__));</span><br><span> </span><br><span> struct ast_iax2_meta_trunk_entry {</span><br><span> unsigned short callno; /*!< Call number */</span><br><span style="color: hsl(0, 100%, 40%);">- unsigned short len; /*!< Length of data for this callno */</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned short len; /*!< Length of data for this callno */</span><br><span> } __attribute__ ((__packed__));</span><br><span> </span><br><span> /*! When trunktimestamps are used, we use this format instead */</span><br><span>diff --git a/main/channel_internal_api.c b/main/channel_internal_api.c</span><br><span>index 123f61a..bc0fb4c 100644</span><br><span>--- a/main/channel_internal_api.c</span><br><span>+++ b/main/channel_internal_api.c</span><br><span>@@ -1283,7 +1283,8 @@</span><br><span> return &chan->flags;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-static int collect_names_cb(void *obj, void *arg, int flags) {</span><br><span style="color: hsl(120, 100%, 40%);">+static int collect_names_cb(void *obj, void *arg, int flags)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span> struct ast_control_pvt_cause_code *cause_code = obj;</span><br><span> struct ast_str **str = arg;</span><br><span> </span><br><span>diff --git a/main/strings.c b/main/strings.c</span><br><span>index 20769fa..d40eed6 100644</span><br><span>--- a/main/strings.c</span><br><span>+++ b/main/strings.c</span><br><span>@@ -197,7 +197,6 @@</span><br><span> return cmp ? 0 : CMP_MATCH;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-//struct ao2_container *ast_str_container_alloc_options(enum ao2_container_opts opts, int buckets)</span><br><span> struct ao2_container *ast_str_container_alloc_options(enum ao2_alloc_opts opts, int buckets)</span><br><span> {</span><br><span> return ao2_container_alloc_hash(opts, 0, buckets, str_hash, str_sort, str_cmp);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18885">change 18885</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/+/18885"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I07771c4c89facd41ce8d323859f022ddbddf6ca7 </div>
<div style="display:none"> Gerrit-Change-Number: 18885 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>