-fixing
[oweals/gnunet.git] / src / datacache / plugin_datacache_sqlite.c
index 26792e1fbef7b0d314823aa1a513205f82ce833e..62d5445b410b66d28216ae21ba3b2ce4034a68db 100644 (file)
@@ -107,10 +107,9 @@ sqlite_plugin_put (void *cls, const struct GNUNET_HashCode * key, size_t size,
   int64_t dval;
 
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Processing `%s' of %u bytes with key `%4s' and expiration %llums\n",
+       "Processing `%s' of %u bytes with key `%4s' and expiration %s\n",
        "PUT", (unsigned int) size, GNUNET_h2s (key),
-       (unsigned long long)
-       GNUNET_TIME_absolute_get_remaining (discard_time).rel_value);
+       GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_remaining (discard_time), GNUNET_YES));
   dval = (int64_t) discard_time.abs_value;
   if (dval < 0)
     dval = INT64_MAX;
@@ -371,12 +370,8 @@ libgnunet_plugin_datacache_sqlite_init (void *cls)
     GNUNET_break (0);
     return NULL;
   }
-#ifdef ENABLE_NLS
-  fn_utf8 = GNUNET_STRINGS_to_utf8 (fn, strlen (fn), nl_langinfo (CODESET));
-#else
-  /* good luck */
-  fn_utf8 = GNUNET_STRINGS_to_utf8 (fn, strlen (fn), "UTF-8");
-#endif
+  /* fn should be UTF-8-encoded. If it isn't, it's a bug. */
+  fn_utf8 = GNUNET_strdup (fn);
   if (SQLITE_OK != sqlite3_open (fn_utf8, &dbh))
   {
     GNUNET_free (fn);