aboutsummaryrefslogtreecommitdiff
path: root/src/pq/pq_result_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pq/pq_result_helper.c')
-rw-r--r--src/pq/pq_result_helper.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c
index 546822e45..204ccee72 100644
--- a/src/pq/pq_result_helper.c
+++ b/src/pq/pq_result_helper.c
@@ -170,6 +170,9 @@ extract_fixed_blob (void *cls,
170 if (fnum < 0) 170 if (fnum < 0)
171 { 171 {
172 GNUNET_break (0); 172 GNUNET_break (0);
173 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
174 "Result does not have field %s\n",
175 fname);
173 return GNUNET_SYSERR; 176 return GNUNET_SYSERR;
174 } 177 }
175 if (PQgetisnull (result, 178 if (PQgetisnull (result,
@@ -187,6 +190,11 @@ extract_fixed_blob (void *cls,
187 fnum); 190 fnum);
188 if (*dst_size != len) 191 if (*dst_size != len)
189 { 192 {
193 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
194 "Expected %u bytes for field `%s', got %u\n",
195 (unsigned int) *dst_size,
196 fname,
197 (unsigned int) len);
190 GNUNET_break (0); 198 GNUNET_break (0);
191 return GNUNET_SYSERR; 199 return GNUNET_SYSERR;
192 } 200 }
@@ -861,6 +869,9 @@ extract_uint64 (void *cls,
861 fname); 869 fname);
862 if (fnum < 0) 870 if (fnum < 0)
863 { 871 {
872 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
873 "Field %s missing in result\n",
874 fname);
864 GNUNET_break (0); 875 GNUNET_break (0);
865 return GNUNET_SYSERR; 876 return GNUNET_SYSERR;
866 } 877 }