summaryrefslogtreecommitdiff
path: root/src/mint/mint_common.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-01-28 14:57:55 +0100
committerChristian Grothoff <christian@grothoff.org>2015-01-28 14:57:55 +0100
commitb6154af448264daa814623bfb71edff642be1a14 (patch)
tree4f2c474be86556a44f1dea89ef26046c07b57fb3 /src/mint/mint_common.c
parent49d4f24f8d031a9301676196bd6a17ea3e54cb62 (diff)
downloadexchange-b6154af448264daa814623bfb71edff642be1a14.tar.gz
exchange-b6154af448264daa814623bfb71edff642be1a14.tar.bz2
exchange-b6154af448264daa814623bfb71edff642be1a14.zip
move DB functions to mint_db.c
Diffstat (limited to 'src/mint/mint_common.c')
-rw-r--r--src/mint/mint_common.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/mint/mint_common.c b/src/mint/mint_common.c
index f0ee09110..41b9d6ed5 100644
--- a/src/mint/mint_common.c
+++ b/src/mint/mint_common.c
@@ -231,42 +231,5 @@ TALER_MINT_denomkeys_iterate (const char *mint_base_dir,
}
-int
-TALER_TALER_DB_extract_amount_nbo (PGresult *result,
- unsigned int row,
- int indices[3],
- struct TALER_AmountNBO *denom_nbo)
-{
- if ((indices[0] < 0) || (indices[1] < 0) || (indices[2] < 0))
- return GNUNET_NO;
- if (sizeof (uint32_t) != PQgetlength (result, row, indices[0]))
- return GNUNET_SYSERR;
- if (sizeof (uint32_t) != PQgetlength (result, row, indices[1]))
- return GNUNET_SYSERR;
- if (PQgetlength (result, row, indices[2]) > TALER_CURRENCY_LEN)
- return GNUNET_SYSERR;
- denom_nbo->value = *(uint32_t *) PQgetvalue (result, row, indices[0]);
- denom_nbo->fraction = *(uint32_t *) PQgetvalue (result, row, indices[1]);
- memset (denom_nbo->currency, 0, TALER_CURRENCY_LEN);
- memcpy (denom_nbo->currency, PQgetvalue (result, row, indices[2]), PQgetlength (result, row, indices[2]));
- return GNUNET_OK;
-}
-
-
-int
-TALER_TALER_DB_extract_amount (PGresult *result,
- unsigned int row,
- int indices[3],
- struct TALER_Amount *denom)
-{
- struct TALER_AmountNBO denom_nbo;
- int res;
-
- res = TALER_TALER_DB_extract_amount_nbo (result, row, indices, &denom_nbo);
- if (GNUNET_OK != res)
- return res;
- *denom = TALER_amount_ntoh (denom_nbo);
- return GNUNET_OK;
-}
/* end of mint_common.c */