aboutsummaryrefslogtreecommitdiff
path: root/src/pq
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-05-06 11:47:12 +0200
committerChristian Grothoff <christian@grothoff.org>2015-05-06 11:47:12 +0200
commit74a21a5259f9dbcb3a9df887cefe70de0567fd63 (patch)
treea9e8f86e25a361cbb7926b584df2d383948cc801 /src/pq
parentf8723b9b5d6a47c0d256ac6cf7fcd984a6e10484 (diff)
fixing #3768, using new pq API more
Diffstat (limited to 'src/pq')
-rw-r--r--src/pq/db_pq.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/pq/db_pq.c b/src/pq/db_pq.c
index ebb1f48bb..320cf9fdf 100644
--- a/src/pq/db_pq.c
+++ b/src/pq/db_pq.c
@@ -270,6 +270,41 @@ TALER_PQ_extract_result (PGresult *result,
had_null = GNUNET_YES;
break;
}
+ case TALER_PQ_RF_AMOUNT:
+ {
+ char *val_name;
+ char *frac_name;
+ char *curr_name;
+ const char *name = spec->fname;
+ int ret;
+
+ GNUNET_assert (NULL != spec->dst);
+ GNUNET_assert (sizeof (struct TALER_Amount) ==
+ spec->dst_size);
+ GNUNET_asprintf (&val_name,
+ "%s_val",
+ name);
+ GNUNET_asprintf (&frac_name,
+ "%s_frac",
+ name);
+ GNUNET_asprintf (&curr_name,
+ "%s_curr",
+ name);
+ ret = TALER_PQ_extract_amount (result,
+ row,
+ val_name,
+ frac_name,
+ curr_name,
+ spec->dst);
+ GNUNET_free (val_name);
+ GNUNET_free (frac_name);
+ GNUNET_free (curr_name);
+ if (GNUNET_SYSERR == ret)
+ return GNUNET_SYSERR;
+ if (GNUNET_OK != ret)
+ had_null = GNUNET_YES;
+ break;
+ }
default:
GNUNET_assert (0);
break;