diff options
Diffstat (limited to 'src/namestore/namestore_api.c')
-rw-r--r-- | src/namestore/namestore_api.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index 3447dda44..34c83f0b4 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c | |||
@@ -390,41 +390,31 @@ handle_record_remove_response (struct GNUNET_NAMESTORE_QueueEntry *qe, | |||
390 | const struct RecordRemoveResponseMessage* msg, | 390 | const struct RecordRemoveResponseMessage* msg, |
391 | size_t size) | 391 | size_t size) |
392 | { | 392 | { |
393 | int res; | ||
394 | int ret; | 393 | int ret; |
395 | const char *emsg; | 394 | const char *emsg; |
396 | 395 | ||
397 | /* Operation done, remove */ | 396 | /* Operation done, remove */ |
398 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Received `%s'\n", | 397 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Received `%s'\n", |
399 | "RECORD_REMOVE_RESPONSE"); | 398 | "RECORD_REMOVE_RESPONSE"); |
400 | /* | 399 | switch (ntohl (msg->op_result)) |
401 | * results: | ||
402 | * 0 : successful | ||
403 | * 1 : No records for entry | ||
404 | * 2 : Could not find record to remove | ||
405 | * 3 : Failed to create new signature | ||
406 | * 4 : Failed to put new set of records in database | ||
407 | */ | ||
408 | res = ntohl (msg->op_result); | ||
409 | switch (res) | ||
410 | { | 400 | { |
411 | case 0: | 401 | case RECORD_REMOVE_RESULT_SUCCESS: |
412 | ret = GNUNET_OK; | 402 | ret = GNUNET_OK; |
413 | emsg = NULL; | 403 | emsg = NULL; |
414 | break; | 404 | break; |
415 | case 1: | 405 | case RECORD_REMOVE_RESULT_NO_RECORDS: |
416 | ret = GNUNET_NO; | 406 | ret = GNUNET_NO; |
417 | emsg = NULL; | 407 | emsg = NULL; |
418 | break; | 408 | break; |
419 | case 2: | 409 | case RECORD_REMOVE_RESULT_RECORD_NOT_FOUND: |
420 | ret = GNUNET_NO; | 410 | ret = GNUNET_NO; |
421 | emsg = NULL; | 411 | emsg = NULL; |
422 | break; | 412 | break; |
423 | case 3: | 413 | case RECORD_REMOVE_RESULT_FAILED_TO_SIGN: |
424 | ret = GNUNET_SYSERR; | 414 | ret = GNUNET_SYSERR; |
425 | emsg = _("Failed to create new signature"); | 415 | emsg = _("Failed to create new signature"); |
426 | break; | 416 | break; |
427 | case 4: | 417 | case RECORD_REMOVE_RESULT_FAILED_TO_PUT_UPDATE: |
428 | ret = GNUNET_SYSERR; | 418 | ret = GNUNET_SYSERR; |
429 | emsg = _("Failed to put new set of records in database"); | 419 | emsg = _("Failed to put new set of records in database"); |
430 | break; | 420 | break; |