* Prepare SQL statement.
*
* @param plugin global context
+ * @param name name for the prepared SQL statement
* @param sql SQL code to prepare
* @param nparams number of parameters in sql
* @param line code line for error reporting
*/
static int
pq_prepare (struct Plugin *plugin,
- const char *name, const char *sql, int nparms, int line)
+ const char *name, const char *sql, int nparams, int line)
{
PGresult *ret;
- ret = PQprepare (plugin->dbh, name, sql, nparms, NULL);
+ ret = PQprepare (plugin->dbh, name, sql, nparams, NULL);
if (GNUNET_OK !=
check_result (plugin,
ret, PGRES_COMMAND_OK, "PQprepare", sql, line))
uint32_t btype = htonl (type);
uint32_t bprio = htonl (priority);
uint32_t banon = htonl (anonymity);
- uint64_t bexpi = GNUNET_TIME_absolute_hton (expiration).value__;
+ uint64_t bexpi = GNUNET_TIME_absolute_hton (expiration).abs_value__;
const char *paramValues[] = {
(const char *) &btype,
(const char *) &bprio,
* asking the database plugin to call the iterator
* with the next item.
*
- * @param cls the 'struct NextRequestClosure'
+ * @param next_cls the 'struct NextRequestClosure'
* @param tc scheduler context
*/
static void
type = ntohl (*(uint32_t *) PQgetvalue (res, 0, 0));
priority = ntohl (*(uint32_t *) PQgetvalue (res, 0, 1));
anonymity = ntohl ( *(uint32_t *) PQgetvalue (res, 0, 2));
- expiration_time.value = GNUNET_ntohll (*(uint64_t *) PQgetvalue (res, 0, 3));
+ expiration_time.abs_value = GNUNET_ntohll (*(uint64_t *) PQgetvalue (res, 0, 3));
memcpy (&key, PQgetvalue (res, 0, 4), sizeof (GNUNET_HashCode));
size = PQgetlength (res, 0, 5);
nrc->blast_prio = htonl (priority);
- nrc->blast_expire = GNUNET_htonll (expiration_time.value);
+ nrc->blast_expire = GNUNET_htonll (expiration_time.abs_value);
nrc->blast_rowid = htonl (rowid);
nrc->count++;
PGresult *ret;
int32_t bdelta = (int32_t) htonl ((uint32_t) delta);
uint32_t boid = htonl ( (uint32_t) uid);
- uint64_t bexpire = GNUNET_TIME_absolute_hton (expire).value__;
+ uint64_t bexpire = GNUNET_TIME_absolute_hton (expire).abs_value__;
const char *paramValues[] = {
(const char *) &bdelta,
(const char *) &bexpire,
GNUNET_free (nrc);
return;
}
- nrc->bnow = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()).value__;
+ nrc->bnow = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()).abs_value__;
postgres_plugin_next_request (nrc,
GNUNET_NO);
}