diff options
Diffstat (limited to 'src/backenddb')
-rw-r--r-- | src/backenddb/merchantdb_helper.c | 5 | ||||
-rw-r--r-- | src/backenddb/plugin_merchantdb_postgres.c | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/backenddb/merchantdb_helper.c b/src/backenddb/merchantdb_helper.c index 516a5788..5a121287 100644 --- a/src/backenddb/merchantdb_helper.c +++ b/src/backenddb/merchantdb_helper.c @@ -24,13 +24,14 @@ void -TALER_MERCHANTDB_product_details_free (struct TALER_MERCHANTDB_ProductDetails *pd) +TALER_MERCHANTDB_product_details_free ( + struct TALER_MERCHANTDB_ProductDetails *pd) { GNUNET_free (pd->description); json_decref (pd->description_i18n); GNUNET_free (pd->unit); json_decref (pd->taxes); - json_decref (pd->image); + GNUNET_free (pd->image); json_decref (pd->address); } diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c index e39d8498..0170767d 100644 --- a/src/backenddb/plugin_merchantdb_postgres.c +++ b/src/backenddb/plugin_merchantdb_postgres.c @@ -986,8 +986,8 @@ postgres_lookup_product (void *cls, &pd->total_sold), GNUNET_PQ_result_spec_uint64 ("total_lost", &pd->total_lost), - TALER_PQ_result_spec_json ("image", - &pd->image), + GNUNET_PQ_result_spec_string ("image", + &pd->image), TALER_PQ_result_spec_json ("address", &pd->address), GNUNET_PQ_result_spec_absolute_time ("next_restock", @@ -1059,7 +1059,7 @@ postgres_insert_product (void *cls, GNUNET_PQ_query_param_string (pd->description), TALER_PQ_query_param_json (pd->description_i18n), GNUNET_PQ_query_param_string (pd->unit), - TALER_PQ_query_param_json (pd->image), + GNUNET_PQ_query_param_string (pd->image), TALER_PQ_query_param_json (pd->taxes), TALER_PQ_query_param_amount (&pd->price), GNUNET_PQ_query_param_uint64 (&pd->total_stock), @@ -1107,7 +1107,7 @@ postgres_update_product (void *cls, GNUNET_PQ_query_param_string (pd->description), TALER_PQ_query_param_json (pd->description_i18n), GNUNET_PQ_query_param_string (pd->unit), - TALER_PQ_query_param_json (pd->image), /* $6 */ + GNUNET_PQ_query_param_string (pd->image), /* $6 */ TALER_PQ_query_param_json (pd->taxes), TALER_PQ_query_param_amount (&pd->price), GNUNET_PQ_query_param_uint64 (&pd->total_stock), |