transaction logic is inside of DB function

This commit is contained in:
Christian Grothoff 2015-05-15 17:08:56 +02:00
parent 88ff3e8bb5
commit 33f5242ac4

View File

@ -153,14 +153,6 @@ main (int argc, char *const *argv)
"Failed to initialize DB session\n"); "Failed to initialize DB session\n");
goto cleanup; goto cleanup;
} }
if (GNUNET_OK !=
plugin->start (plugin->cls,
session))
{
fprintf (stderr,
"Failed to start transaction\n");
goto cleanup;
}
expiration = GNUNET_TIME_relative_to_absolute (RESERVE_EXPIRATION); expiration = GNUNET_TIME_relative_to_absolute (RESERVE_EXPIRATION);
if (GNUNET_OK != if (GNUNET_OK !=
plugin->reserves_in_insert (plugin->cls, plugin->reserves_in_insert (plugin->cls,
@ -174,14 +166,6 @@ main (int argc, char *const *argv)
"Failed to update reserve.\n"); "Failed to update reserve.\n");
goto cleanup; goto cleanup;
} }
if (GNUNET_OK !=
plugin->commit (plugin->cls,
session))
{
fprintf (stderr,
"Failed to commit transaction\n");
goto cleanup;
}
ret = 0; ret = 0;
cleanup: cleanup:
if (NULL != plugin) if (NULL != plugin)