diff options
Diffstat (limited to 'src/namestore/namestore_api.c')
-rw-r--r-- | src/namestore/namestore_api.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index df6ba1f33..2c5efb745 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c | |||
@@ -619,11 +619,17 @@ handle_record_result (void *cls, const struct RecordResultMessage *msg) | |||
619 | } | 619 | } |
620 | if (NULL != ze) | 620 | if (NULL != ze) |
621 | { | 621 | { |
622 | if (NULL != ze->proc) | 622 | // Store them here because a callback could free ze |
623 | ze->proc (ze->proc_cls, &private_key, name, rd_count, rd); | 623 | GNUNET_NAMESTORE_RecordMonitor proc; |
624 | if (NULL != ze->proc2) | 624 | GNUNET_NAMESTORE_RecordSetMonitor proc2; |
625 | ze->proc2 (ze->proc_cls, &private_key, name, | 625 | void *proc_cls = ze->proc_cls; |
626 | rd_count, rd, GNUNET_TIME_absolute_ntoh (msg->expire)); | 626 | proc = ze->proc; |
627 | proc2 = ze->proc2; | ||
628 | if (NULL != proc) | ||
629 | proc (proc_cls, &private_key, name, rd_count, rd); | ||
630 | if (NULL != proc2) | ||
631 | proc2 (proc_cls, &private_key, name, | ||
632 | rd_count, rd, GNUNET_TIME_absolute_ntoh (msg->expire)); | ||
627 | return; | 633 | return; |
628 | } | 634 | } |
629 | } | 635 | } |