FPRINTF (stdout, "%u -> %u\n", A, B);
GNUNET_break (SQLITE_OK == sqlite3_reset (stmt_insert));
//GNUNET_break (SQLITE_OK == sqlite3_clear_bindings (stmt_insert));
+ if ( (SQLITE_OK != sqlite3_bind_int (stmt_insert, 1, B)) ||
+ (SQLITE_OK != sqlite3_bind_int (stmt_insert, 2, A)) )
+ {
+ LOG_SQLITE (db, NULL, GNUNET_ERROR_TYPE_ERROR, "sqlite3_bind_int");
+ return GNUNET_SYSERR;
+ }
+ if (SQLITE_DONE != sqlite3_step (stmt_insert))
+ {
+ LOG_SQLITE (db, NULL, GNUNET_ERROR_TYPE_ERROR, "sqlite3_step");
+ return GNUNET_SYSERR;
+ }
+ FPRINTF (stdout, "%u -> %u\n", B, A);
+ GNUNET_break (SQLITE_OK == sqlite3_reset (stmt_insert));
return GNUNET_OK;
}
if (0 != sqlite3_exec (db, query_create, NULL, NULL, NULL))
{
LOG_SQLITE (db, NULL, GNUNET_ERROR_TYPE_ERROR, "sqlite3_exec");
- FPRINTF (stderr, "Perhaps the database `%s' already exits.\n", dbfile);
+ FPRINTF (stderr, "Error: %d. Perhaps the database `%s' already exits.\n",
+ sqlite3_errcode (db),
+ dbfile);
goto err_ret;
}
GNUNET_break (0 == sqlite3_exec (db, "PRAGMA synchronous = 0;", NULL, NULL, NULL));
LOG_ERROR (_("Invalid topology: %s\n"), topology_string);
return;
}
+ arg_str1 = NULL;
/* parse for first TOPOOPT. This can either be arg_uint1 or arg_str1 */
switch (topology)
{
}
break;
default:
- GNUNET_assert (0);
+ break;
}
/* parse for second TOPOOPT. Only required for SCALE_FREE topology */
switch (topology)