gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: relative time is in nanoseconds, kill re


From: gnunet
Subject: [gnunet] branch master updated: relative time is in nanoseconds, kill redundant _ms variant
Date: Fri, 08 Jul 2022 14:55:04 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 6a60c7d43 relative time is in nanoseconds, kill redundant _ms variant
6a60c7d43 is described below

commit 6a60c7d436f5c4c47752ee54a0980583f0c3fe37
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Fri Jul 8 14:55:01 2022 +0200

    relative time is in nanoseconds, kill redundant _ms variant
---
 src/json/json_generator.c | 19 -------------------
 src/json/json_helper.c    | 26 --------------------------
 2 files changed, 45 deletions(-)

diff --git a/src/json/json_generator.c b/src/json/json_generator.c
index acfbcfe63..eb275712c 100644
--- a/src/json/json_generator.c
+++ b/src/json/json_generator.c
@@ -122,15 +122,6 @@ GNUNET_JSON_from_time_rel (struct GNUNET_TIME_Relative 
stamp)
       json_decref (j);
       return NULL;
     }
-    if (0 !=
-        json_object_set_new (j,
-                             "d_ms",
-                             json_string ("forever")))
-    {
-      GNUNET_break (0);
-      json_decref (j);
-      return NULL;
-    }
     return j;
   }
   if (stamp.rel_value_us >= (1LLU << 53))
@@ -149,16 +140,6 @@ GNUNET_JSON_from_time_rel (struct GNUNET_TIME_Relative 
stamp)
     json_decref (j);
     return NULL;
   }
-  if (0 !=
-      json_object_set_new (
-        j,
-        "d_ms",
-        json_integer (((json_int_t) stamp.rel_value_us)/1000LL)))
-  {
-    GNUNET_break (0);
-    json_decref (j);
-    return NULL;
-  }
   return j;
 }
 
diff --git a/src/json/json_helper.c b/src/json/json_helper.c
index 27bb9f41c..a15dc74c0 100644
--- a/src/json/json_helper.c
+++ b/src/json/json_helper.c
@@ -715,7 +715,6 @@ parse_rel_time (void *cls,
 {
   struct GNUNET_TIME_Relative *rel = spec->ptr;
   json_t *json_d_us;
-  json_t *json_d_ms;
   unsigned long long int tval;
 
   if (! json_is_object (root))
@@ -751,31 +750,6 @@ parse_rel_time (void *cls,
     GNUNET_break_op (0);
     return GNUNET_SYSERR;
   }
-
-  json_d_ms = json_object_get (root,
-                               "d_ms");
-  if (json_is_integer (json_d_ms))
-  {
-    tval = json_integer_value (json_d_ms);
-    *rel = GNUNET_TIME_relative_multiply (
-      GNUNET_TIME_UNIT_MILLISECONDS,
-      tval);
-    return GNUNET_OK;
-  }
-  if (json_is_string (json_d_ms))
-  {
-    const char *val;
-
-    val = json_string_value (json_d_ms);
-    if ((0 == strcasecmp (val,
-                          "forever")))
-    {
-      *rel = GNUNET_TIME_UNIT_FOREVER_REL;
-      return GNUNET_OK;
-    }
-    GNUNET_break_op (0);
-    return GNUNET_SYSERR;
-  }
   GNUNET_break_op (0);
   return GNUNET_SYSERR;
 }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]