<p>Friendly Automation <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/10828">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Corey Farrell: Looks good to me, but someone else must approve
  Joshua C. Colp: Looks good to me, approved
  Friendly Automation: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">stasic.c: Fix printf format type mismatches with arguments.<br><br>An int64_t is not likely the same size as a long.<br><br>* Changed the int64_t values in the statistics structs to longs so casting<br>is not necessary when generating the formatted CLI output.  The offending<br>members did not need to be int64_t anyway as they were only set by an int<br>type variable which was already truncating bits.<br><br>* Reordered the statistics structs to reduce potential padding bytes.<br><br>Change-Id: Ic090a070e9dc4ca650ebdb9c01ed50a581289962<br>---<br>M main/stasis.c<br>1 file changed, 16 insertions(+), 16 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/stasis.c b/main/stasis.c</span><br><span>index 3216e21..91813e8 100644</span><br><span>--- a/main/stasis.c</span><br><span>+++ b/main/stasis.c</span><br><span>@@ -339,14 +339,14 @@</span><br><span> </span><br><span> /*! \internal */</span><br><span> struct stasis_topic_statistics {</span><br><span style="color: hsl(120, 100%, 40%);">+        /*! \brief Highest time spent dispatching messages to subscribers */</span><br><span style="color: hsl(120, 100%, 40%);">+  long highest_time_dispatched;</span><br><span style="color: hsl(120, 100%, 40%);">+ /*! \brief Lowest time spent dispatching messages to subscribers */</span><br><span style="color: hsl(120, 100%, 40%);">+   long lowest_time_dispatched;</span><br><span>         /*! \brief The number of messages that were not dispatched to any subscriber */</span><br><span>      int messages_not_dispatched;</span><br><span>         /*! \brief The number of messages that were dispatched to at least 1 subscriber */</span><br><span>   int messages_dispatched;</span><br><span style="color: hsl(0, 100%, 40%);">-        /*! \brief Highest time spent dispatching messages to subscribers */</span><br><span style="color: hsl(0, 100%, 40%);">-    int64_t highest_time_dispatched;</span><br><span style="color: hsl(0, 100%, 40%);">-        /*! \brief Lowest time spent dispatching messages to subscribers */</span><br><span style="color: hsl(0, 100%, 40%);">-     int64_t lowest_time_dispatched;</span><br><span>      /*! \brief The number of subscribers to this topic */</span><br><span>        int subscriber_count;</span><br><span>        /*! \brief Name of the topic */</span><br><span>@@ -461,26 +461,26 @@</span><br><span> struct stasis_subscription_statistics {</span><br><span>   /*! \brief The filename where the subscription originates */</span><br><span>         const char *file;</span><br><span style="color: hsl(0, 100%, 40%);">-       /*! \brief The line number where the subscription originates */</span><br><span style="color: hsl(0, 100%, 40%);">- int lineno;</span><br><span>  /*! \brief The function where the subscription originates */</span><br><span>         const char *func;</span><br><span style="color: hsl(120, 100%, 40%);">+     /*! \brief Name of the topic we subscribed to */</span><br><span style="color: hsl(120, 100%, 40%);">+      char *topic;</span><br><span style="color: hsl(120, 100%, 40%);">+  /*! \brief The message type that currently took the longest to process */</span><br><span style="color: hsl(120, 100%, 40%);">+     struct stasis_message_type *highest_time_message_type;</span><br><span style="color: hsl(120, 100%, 40%);">+        /*! \brief Highest time spent invoking a message */</span><br><span style="color: hsl(120, 100%, 40%);">+   long highest_time_invoked;</span><br><span style="color: hsl(120, 100%, 40%);">+    /*! \brief Lowest time spent invoking a message */</span><br><span style="color: hsl(120, 100%, 40%);">+    long lowest_time_invoked;</span><br><span>    /*! \brief The number of messages that were filtered out */</span><br><span>  int messages_dropped;</span><br><span>        /*! \brief The number of messages that passed filtering */</span><br><span>   int messages_passed;</span><br><span style="color: hsl(0, 100%, 40%);">-    /*! \brief Highest time spent invoking a message */</span><br><span style="color: hsl(0, 100%, 40%);">-     int64_t highest_time_invoked;</span><br><span style="color: hsl(0, 100%, 40%);">-   /*! \brief The message type that currently took the longest to process */</span><br><span style="color: hsl(0, 100%, 40%);">-       struct stasis_message_type *highest_time_message_type;</span><br><span style="color: hsl(0, 100%, 40%);">-  /*! \brief Lowest time spent invoking a message */</span><br><span style="color: hsl(0, 100%, 40%);">-      int64_t lowest_time_invoked;</span><br><span>         /*! \brief Using a mailbox to queue messages */</span><br><span>      int uses_mailbox;</span><br><span>    /*! \brief Using stasis threadpool for handling messages */</span><br><span>  int uses_threadpool;</span><br><span style="color: hsl(0, 100%, 40%);">-    /*! \brief Name of the topic we subscribed to */</span><br><span style="color: hsl(0, 100%, 40%);">-        char *topic;</span><br><span style="color: hsl(120, 100%, 40%);">+  /*! \brief The line number where the subscription originates */</span><br><span style="color: hsl(120, 100%, 40%);">+       int lineno;</span><br><span>  /*! \brief Unique ID of the subscription */</span><br><span>  char uniqueid[0];</span><br><span> };</span><br><span>@@ -561,7 +561,7 @@</span><br><span>        int message_type_id = stasis_message_type_id(stasis_subscription_change_type());</span><br><span> #ifdef AST_DEVMODE</span><br><span>       struct timeval start;</span><br><span style="color: hsl(0, 100%, 40%);">-   int elapsed;</span><br><span style="color: hsl(120, 100%, 40%);">+  long elapsed;</span><br><span> </span><br><span>    start = ast_tvnow();</span><br><span> #endif</span><br><span>@@ -1243,7 +1243,7 @@</span><br><span>       int message_type_id = stasis_message_type_id(stasis_message_type(message));</span><br><span>  struct stasis_message_type_statistics *statistics;</span><br><span>   struct timeval start;</span><br><span style="color: hsl(0, 100%, 40%);">-   int elapsed;</span><br><span style="color: hsl(120, 100%, 40%);">+  long elapsed;</span><br><span> #endif</span><br><span> </span><br><span>  ast_assert(topic != NULL);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10828">change 10828</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/10828"/><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-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ic090a070e9dc4ca650ebdb9c01ed50a581289962 </div>
<div style="display:none"> Gerrit-Change-Number: 10828 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Joshua C. Colp <jcolp@digium.com> </div>