]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
counters: remove last and now unused tm_name reference
authorVictor Julien <victor@inliniac.net>
Tue, 26 May 2015 14:33:51 +0000 (16:33 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 27 May 2015 12:14:46 +0000 (14:14 +0200)
src/counters.c

index 539127b013ff2c8125b71a482e059cb2c0b5b8a7..cb50a33ebd5ac3963b3e21146a0a180372bab217 100644 (file)
@@ -61,9 +61,8 @@ enum {
  * \brief per thread store of counters
  */
 typedef struct StatsThreadStore_ {
-    char *name;
-
-    char *tm_name;
+    /** thread name used in output */
+    const char *name;
 
     StatsPublicThreadContext *ctx;
 
@@ -247,9 +246,6 @@ static void StatsReleaseCtx()
     sts = stats_ctx->sts;
 
     while (sts != NULL) {
-        if (sts->tm_name != NULL)
-            SCFree(sts->tm_name);
-
         if (sts->head != NULL)
             SCFree(sts->head);
 
@@ -559,24 +555,6 @@ static void StatsCopyCounterValue(StatsLocalCounter *pcae)
     return;
 }
 
-/**
- * \brief Calculates counter value that should be sent as output
- *
- *        If we aren't dealing with timebased counters, we just return the
- *        the counter value.  In case of Timebased counters, if we haven't
- *        crossed the interval, we display the current value without any
- *        modifications.  If we have crossed the limit, we calculate the counter
- *        value for the time period and also return 1, to indicate that the
- *        counter value can be reset after use
- *
- * \param pc Pointer to the PerfCounter for which the timebased counter has to
- *           be calculated
- */
-static uint64_t StatsOutputCalculateCounterValue(StatsCounter *pc)
-{
-    return pc->value;
-}
-
 /**
  * \brief The output interface for the Stats API
  */
@@ -631,8 +609,7 @@ static int StatsOutput(ThreadVars *tv)
     while (sts != NULL) {
         BUG_ON(thread < 0);
 
-        SCLogDebug("Thread %d %s (%s) ctx %p", thread, sts->name,
-                sts->tm_name ? sts->tm_name : "none", sts->ctx);
+        SCLogDebug("Thread %d %s ctx %p", thread, sts->name, sts->ctx);
 
         /* temporay table for quickly storing the counters for this
          * thread store, so that we can post process them outside