diff options
Diffstat (limited to 'src/abd/gnunet-abd.c')
-rw-r--r-- | src/abd/gnunet-abd.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/src/abd/gnunet-abd.c b/src/abd/gnunet-abd.c index f7e03fb4a..ff7dd09c5 100644 --- a/src/abd/gnunet-abd.c +++ b/src/abd/gnunet-abd.c | |||
@@ -513,8 +513,8 @@ get_existing_record (void *cls, | |||
513 | const struct GNUNET_GNSRECORD_Data *rd) | 513 | const struct GNUNET_GNSRECORD_Data *rd) |
514 | { | 514 | { |
515 | struct GNUNET_GNSRECORD_Data *rde; | 515 | struct GNUNET_GNSRECORD_Data *rde; |
516 | struct GNUNET_GNSRECORD_Data* rdn = | 516 | struct GNUNET_GNSRECORD_Data*rdn = |
517 | GNUNET_malloc(sizeof(*rdn)*(rd_count + 1)); | 517 | GNUNET_malloc (sizeof(*rdn) * (rd_count + 1)); |
518 | 518 | ||
519 | memset (rdn, 0, sizeof (struct GNUNET_GNSRECORD_Data)); | 519 | memset (rdn, 0, sizeof (struct GNUNET_GNSRECORD_Data)); |
520 | GNUNET_memcpy (&rdn[1], rd, | 520 | GNUNET_memcpy (&rdn[1], rd, |
@@ -541,7 +541,7 @@ get_existing_record (void *cls, | |||
541 | rde, | 541 | rde, |
542 | &add_continuation, | 542 | &add_continuation, |
543 | &add_qe); | 543 | &add_qe); |
544 | GNUNET_free(rdn); | 544 | GNUNET_free (rdn); |
545 | return; | 545 | return; |
546 | } | 546 | } |
547 | 547 | ||
@@ -604,13 +604,18 @@ store_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | |||
604 | if (GNUNET_OK != | 604 | if (GNUNET_OK != |
605 | GNUNET_GNSRECORD_string_to_value (type, subject, &data, &data_size)) | 605 | GNUNET_GNSRECORD_string_to_value (type, subject, &data, &data_size)) |
606 | { | 606 | { |
607 | if(typestring == NULL) { | 607 | if (typestring == NULL) |
608 | fputs("No value for unknown record type\n", stderr); | 608 | { |
609 | } else if(subject == NULL) { | 609 | fputs ("No value for unknown record type\n", stderr); |
610 | fprintf(stderr, | 610 | } |
611 | "No value for record type`%s'\n", | 611 | else if (subject == NULL) |
612 | typestring); | 612 | { |
613 | } else { | 613 | fprintf (stderr, |
614 | "No value for record type`%s'\n", | ||
615 | typestring); | ||
616 | } | ||
617 | else | ||
618 | { | ||
614 | fprintf (stderr, | 619 | fprintf (stderr, |
615 | "Value `%s' invalid for record type `%s'\n", | 620 | "Value `%s' invalid for record type `%s'\n", |
616 | subject, | 621 | subject, |
@@ -723,7 +728,7 @@ sign_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | |||
723 | GNUNET_free (dele); | 728 | GNUNET_free (dele); |
724 | printf ("%s\n", res); | 729 | printf ("%s\n", res); |
725 | 730 | ||
726 | GNUNET_free_non_null (ego_name); | 731 | GNUNET_free (ego_name); |
727 | ego_name = NULL; | 732 | ego_name = NULL; |
728 | 733 | ||
729 | GNUNET_SCHEDULER_shutdown (); | 734 | GNUNET_SCHEDULER_shutdown (); |
@@ -927,8 +932,8 @@ run (void *cls, | |||
927 | int i; | 932 | int i; |
928 | while (NULL != (tok = strtok (NULL, ","))) | 933 | while (NULL != (tok = strtok (NULL, ","))) |
929 | count++; | 934 | count++; |
930 | struct GNUNET_ABD_Delegate* delegates = | 935 | struct GNUNET_ABD_Delegate*delegates = |
931 | GNUNET_malloc(sizeof(*delegates)*count); | 936 | GNUNET_malloc (sizeof(*delegates) * count); |
932 | struct GNUNET_ABD_Delegate *dele; | 937 | struct GNUNET_ABD_Delegate *dele; |
933 | GNUNET_free (tmp); | 938 | GNUNET_free (tmp); |
934 | tmp = GNUNET_strdup (subject_delegate); | 939 | tmp = GNUNET_strdup (subject_delegate); |
@@ -961,7 +966,7 @@ run (void *cls, | |||
961 | delegates[i].issuer_attribute = NULL; | 966 | delegates[i].issuer_attribute = NULL; |
962 | } | 967 | } |
963 | GNUNET_free (tmp); | 968 | GNUNET_free (tmp); |
964 | GNUNET_free(delegates); | 969 | GNUNET_free (delegates); |
965 | } | 970 | } |
966 | else | 971 | else |
967 | { | 972 | { |