checkret
authorChristian Grothoff <christian@grothoff.org>
Sat, 16 Jul 2011 20:36:50 +0000 (20:36 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 16 Jul 2011 20:36:50 +0000 (20:36 +0000)
contrib/timeout_watchdog.c
src/datacache/plugin_datacache_sqlite.c

index 5fbe7e339b2f4459a0c90e5ca71a853f237732a7..a33f67adc007b6eb84335988eaeeb8556865db2e 100644 (file)
@@ -94,7 +94,7 @@ main (int argc, char *argv[])
     {
       /*  int setpgrp(pid_t pid, pid_t pgid); is not working on this machine */
       //setpgrp (0, pid_t gpid);
-      if (-1 !- gpid)
+      if (-1 != gpid)
        setpgid (0, gpid);
       execvp (argv[2], &argv[2]);
       exit (1);
index 4c429c1b4576893e8b5a60f84386f49ef77a8447..eb24f54237c4e9369d2ece16a249fe66502c1c52 100644 (file)
@@ -203,8 +203,16 @@ sqlite_plugin_get (void *cls,
                  sqlite3_errmsg (plugin->dbh));
       return 0;
     }
-  sqlite3_bind_blob (stmt, 1, key, sizeof (GNUNET_HashCode),
-                     SQLITE_TRANSIENT);
+  if (GNUNET_OK != 
+      sqlite3_bind_blob (stmt, 1, key, sizeof (GNUNET_HashCode),
+                        SQLITE_TRANSIENT))
+    {
+      LOG_SQLITE (plugin->dbh,
+                  GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, 
+                 "sqlite3_bind_xxx");
+      sqlite3_finalize (stmt);
+      return 0;
+    }
   sqlite3_bind_int (stmt, 2, type);
   ntime = (int64_t) now.abs_value;
   GNUNET_assert (ntime >= 0);