gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r5586 - GNUnet/src/applications/dstore


From: gnunet
Subject: [GNUnet-SVN] r5586 - GNUnet/src/applications/dstore
Date: Sun, 2 Sep 2007 18:27:47 -0600 (MDT)

Author: grothoff
Date: 2007-09-02 18:27:47 -0600 (Sun, 02 Sep 2007)
New Revision: 5586

Modified:
   GNUnet/src/applications/dstore/dstore.c
Log:
fix

Modified: GNUnet/src/applications/dstore/dstore.c
===================================================================
--- GNUnet/src/applications/dstore/dstore.c     2007-09-03 00:21:41 UTC (rev 
5585)
+++ GNUnet/src/applications/dstore/dstore.c     2007-09-03 00:27:47 UTC (rev 
5586)
@@ -89,14 +89,14 @@
                           strlen (zSql), ppStmt, (const char **) &dummy);
 }
 
-#define SQLITE3_EXEC(db, cmd) do { if (SQLITE_OK != sqlite3_exec(db, cmd, 
NULL, NULL, &emsg)) { GE_LOG(coreAPI->ectx, GE_ERROR | GE_ADMIN | GE_BULK, 
_("`%s' failed at %s:%d with error: %s\n"), "sqlite3_exec", __FILE__, __LINE__, 
emsg); sqlite3_free(emsg); } } while(0);
+#define SQLITE3_EXEC(db, cmd) do { if (SQLITE_OK != sqlite3_exec(db, cmd, 
NULL, NULL, &emsg)) { GE_LOG(coreAPI->ectx, GE_ERROR | GE_ADMIN | GE_BULK, 
_("`%s' failed at %s:%d with error: %s\n"), "sqlite3_exec", __FILE__, __LINE__, 
emsg); sqlite3_free(emsg); } } while(0)
 
 /**
  * Log an error message at log-level 'level' that indicates
  * a failure of the command 'cmd' on file 'filename'
  * with the message given by strerror(errno).
  */
-#define LOG_SQLITE(db, level, cmd) do { GE_LOG(ectx, level, _("`%s' failed at 
%s:%d with error: %s\n"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); } 
while(0);
+#define LOG_SQLITE(db, level, cmd) do { GE_LOG(coreAPI->ectx, level, _("`%s' 
failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, 
sqlite3_errmsg(db)); } while(0)
 
 static void
 db_init (sqlite3 * dbh)
@@ -358,13 +358,13 @@
       && (SQLITE_OK ==
           sqlite3_bind_blob (stmt, 6, data, size, SQLITE_TRANSIENT)))
     {
-      if (SQLITE_DONE != sqlite3_step (stmt))
+      if (SQLITE_DONE != sqlite3_step (stmt)) 
         LOG_SQLITE (dbh,
                     GE_ERROR | GE_DEVELOPER | GE_ADMIN | GE_BULK,
                     "sqlite3_step");
-      else
+      else 
         payload += size + OVERHEAD;
-      if (SQLITE_OK != sqlite3_finalize (stmt))
+       if (SQLITE_OK != sqlite3_finalize (stmt))
         LOG_SQLITE (dbh,
                     GE_ERROR | GE_DEVELOPER | GE_ADMIN | GE_BULK,
                     "sqlite3_finalize");





reply via email to

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