diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-02-28 04:07:26 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-02-28 04:07:26 +0100 |
commit | 67935d7aa1090eed2eb00212741dcc4d13c0bb40 (patch) | |
tree | 6f261b7cda16c8a04ccec9d8763a3c0dbfaf5a95 /src/pq | |
parent | 830137e312e8e565c9113a20411aa3073fbd1cbd (diff) | |
download | gnunet-67935d7aa1090eed2eb00212741dcc4d13c0bb40.tar.gz gnunet-67935d7aa1090eed2eb00212741dcc4d13c0bb40.zip |
completing sq_result_helper
Diffstat (limited to 'src/pq')
-rw-r--r-- | src/pq/pq_result_helper.c | 50 |
1 files changed, 12 insertions, 38 deletions
diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c index 180c5fc18..c5c8e56b9 100644 --- a/src/pq/pq_result_helper.c +++ b/src/pq/pq_result_helper.c | |||
@@ -77,9 +77,7 @@ extract_varsize_blob (void *cls, | |||
77 | fname); | 77 | fname); |
78 | if (fnum < 0) | 78 | if (fnum < 0) |
79 | { | 79 | { |
80 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 80 | GNUNET_break (0); |
81 | "Field `%s' does not exist in result\n", | ||
82 | fname); | ||
83 | return GNUNET_SYSERR; | 81 | return GNUNET_SYSERR; |
84 | } | 82 | } |
85 | if (PQgetisnull (result, | 83 | if (PQgetisnull (result, |
@@ -156,9 +154,7 @@ extract_fixed_blob (void *cls, | |||
156 | fname); | 154 | fname); |
157 | if (fnum < 0) | 155 | if (fnum < 0) |
158 | { | 156 | { |
159 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 157 | GNUNET_break (0); |
160 | "Field `%s' does not exist in result\n", | ||
161 | fname); | ||
162 | return GNUNET_SYSERR; | 158 | return GNUNET_SYSERR; |
163 | } | 159 | } |
164 | if (PQgetisnull (result, | 160 | if (PQgetisnull (result, |
@@ -173,11 +169,7 @@ extract_fixed_blob (void *cls, | |||
173 | fnum); | 169 | fnum); |
174 | if (*dst_size != len) | 170 | if (*dst_size != len) |
175 | { | 171 | { |
176 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 172 | GNUNET_break (0); |
177 | "Field `%s' has wrong size (got %u, expected %u)\n", | ||
178 | fname, | ||
179 | (unsigned int) len, | ||
180 | (unsigned int) *dst_size); | ||
181 | return GNUNET_SYSERR; | 173 | return GNUNET_SYSERR; |
182 | } | 174 | } |
183 | res = PQgetvalue (result, | 175 | res = PQgetvalue (result, |
@@ -243,9 +235,7 @@ extract_rsa_public_key (void *cls, | |||
243 | fname); | 235 | fname); |
244 | if (fnum < 0) | 236 | if (fnum < 0) |
245 | { | 237 | { |
246 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 238 | GNUNET_break (0); |
247 | "Field `%s' does not exist in result\n", | ||
248 | fname); | ||
249 | return GNUNET_SYSERR; | 239 | return GNUNET_SYSERR; |
250 | } | 240 | } |
251 | if (PQgetisnull (result, | 241 | if (PQgetisnull (result, |
@@ -265,9 +255,7 @@ extract_rsa_public_key (void *cls, | |||
265 | len); | 255 | len); |
266 | if (NULL == *pk) | 256 | if (NULL == *pk) |
267 | { | 257 | { |
268 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 258 | GNUNET_break (0); |
269 | "Field `%s' contains bogus value (fails to decode)\n", | ||
270 | fname); | ||
271 | return GNUNET_SYSERR; | 259 | return GNUNET_SYSERR; |
272 | } | 260 | } |
273 | return GNUNET_OK; | 261 | return GNUNET_OK; |
@@ -346,9 +334,7 @@ extract_rsa_signature (void *cls, | |||
346 | fname); | 334 | fname); |
347 | if (fnum < 0) | 335 | if (fnum < 0) |
348 | { | 336 | { |
349 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 337 | GNUNET_break (0); |
350 | "Field `%s' does not exist in result\n", | ||
351 | fname); | ||
352 | return GNUNET_SYSERR; | 338 | return GNUNET_SYSERR; |
353 | } | 339 | } |
354 | if (PQgetisnull (result, | 340 | if (PQgetisnull (result, |
@@ -368,9 +354,7 @@ extract_rsa_signature (void *cls, | |||
368 | len); | 354 | len); |
369 | if (NULL == *sig) | 355 | if (NULL == *sig) |
370 | { | 356 | { |
371 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 357 | GNUNET_break (0); |
372 | "Field `%s' contains bogus value (fails to decode)\n", | ||
373 | fname); | ||
374 | return GNUNET_SYSERR; | 358 | return GNUNET_SYSERR; |
375 | } | 359 | } |
376 | return GNUNET_OK; | 360 | return GNUNET_OK; |
@@ -449,9 +433,7 @@ extract_string (void *cls, | |||
449 | fname); | 433 | fname); |
450 | if (fnum < 0) | 434 | if (fnum < 0) |
451 | { | 435 | { |
452 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 436 | GNUNET_break (0); |
453 | "Field `%s' does not exist in result\n", | ||
454 | fname); | ||
455 | return GNUNET_SYSERR; | 437 | return GNUNET_SYSERR; |
456 | } | 438 | } |
457 | if (PQgetisnull (result, | 439 | if (PQgetisnull (result, |
@@ -471,9 +453,7 @@ extract_string (void *cls, | |||
471 | len); | 453 | len); |
472 | if (NULL == *str) | 454 | if (NULL == *str) |
473 | { | 455 | { |
474 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 456 | GNUNET_break (0); |
475 | "Field `%s' contains bogus value (fails to decode)\n", | ||
476 | fname); | ||
477 | return GNUNET_SYSERR; | 457 | return GNUNET_SYSERR; |
478 | } | 458 | } |
479 | return GNUNET_OK; | 459 | return GNUNET_OK; |
@@ -583,9 +563,7 @@ extract_uint16 (void *cls, | |||
583 | fname); | 563 | fname); |
584 | if (fnum < 0) | 564 | if (fnum < 0) |
585 | { | 565 | { |
586 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 566 | GNUNET_break (0); |
587 | "Field `%s' does not exist in result\n", | ||
588 | fname); | ||
589 | return GNUNET_SYSERR; | 567 | return GNUNET_SYSERR; |
590 | } | 568 | } |
591 | if (PQgetisnull (result, | 569 | if (PQgetisnull (result, |
@@ -655,9 +633,7 @@ extract_uint32 (void *cls, | |||
655 | fname); | 633 | fname); |
656 | if (fnum < 0) | 634 | if (fnum < 0) |
657 | { | 635 | { |
658 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 636 | GNUNET_break (0); |
659 | "Field `%s' does not exist in result\n", | ||
660 | fname); | ||
661 | return GNUNET_SYSERR; | 637 | return GNUNET_SYSERR; |
662 | } | 638 | } |
663 | if (PQgetisnull (result, | 639 | if (PQgetisnull (result, |
@@ -727,9 +703,7 @@ extract_uint64 (void *cls, | |||
727 | fname); | 703 | fname); |
728 | if (fnum < 0) | 704 | if (fnum < 0) |
729 | { | 705 | { |
730 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 706 | GNUNET_break (0); |
731 | "Field `%s' does not exist in result\n", | ||
732 | fname); | ||
733 | return GNUNET_SYSERR; | 707 | return GNUNET_SYSERR; |
734 | } | 708 | } |
735 | if (PQgetisnull (result, | 709 | if (PQgetisnull (result, |