aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/datastore_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-12-19 13:54:35 +0000
committerChristian Grothoff <christian@grothoff.org>2011-12-19 13:54:35 +0000
commitbf2d1ccefd7b5bd13295733a36bf19afba46f4b2 (patch)
treec440a5bcf7e328d1dd05dd3b1a5def173adb49df /src/datastore/datastore_api.c
parent1997d2d086b237e2688d12567933a53b2229ea26 (diff)
downloadgnunet-bf2d1ccefd7b5bd13295733a36bf19afba46f4b2.tar.gz
gnunet-bf2d1ccefd7b5bd13295733a36bf19afba46f4b2.zip
adding min_expiration argument to GNUNET_DATASTORE_ContinuationWithStatus callback to communicate which content has a chance of being stored in the medium term
Diffstat (limited to 'src/datastore/datastore_api.c')
-rw-r--r--src/datastore/datastore_api.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c
index 46004c4f3..36d1d98b7 100644
--- a/src/datastore/datastore_api.c
+++ b/src/datastore/datastore_api.c
@@ -697,10 +697,13 @@ process_queue (struct GNUNET_DATASTORE_Handle *h)
697 * 697 *
698 * @param cls closure 698 * @param cls closure
699 * @param result result 699 * @param result result
700 * @param min_expiration expiration time
700 * @param emsg error message 701 * @param emsg error message
701 */ 702 */
702static void 703static void
703drop_status_cont (void *cls, int32_t result, const char *emsg) 704drop_status_cont (void *cls, int32_t result,
705 struct GNUNET_TIME_Absolute min_expiration,
706 const char *emsg)
704{ 707{
705 /* do nothing */ 708 /* do nothing */
706} 709}
@@ -765,6 +768,7 @@ process_status_message (void *cls, const struct GNUNET_MessageHeader *msg)
765 process_queue (h); 768 process_queue (h);
766 if (rc.cont != NULL) 769 if (rc.cont != NULL)
767 rc.cont (rc.cont_cls, GNUNET_SYSERR, 770 rc.cont (rc.cont_cls, GNUNET_SYSERR,
771 GNUNET_TIME_UNIT_ZERO_ABS,
768 _("Failed to receive status response from database.")); 772 _("Failed to receive status response from database."));
769 return; 773 return;
770 } 774 }
@@ -778,6 +782,7 @@ process_status_message (void *cls, const struct GNUNET_MessageHeader *msg)
778 do_disconnect (h); 782 do_disconnect (h);
779 if (rc.cont != NULL) 783 if (rc.cont != NULL)
780 rc.cont (rc.cont_cls, GNUNET_SYSERR, 784 rc.cont (rc.cont_cls, GNUNET_SYSERR,
785 GNUNET_TIME_UNIT_ZERO_ABS,
781 _("Error reading response from datastore service")); 786 _("Error reading response from datastore service"));
782 return; 787 return;
783 } 788 }
@@ -807,7 +812,9 @@ process_status_message (void *cls, const struct GNUNET_MessageHeader *msg)
807 h->retry_time.rel_value = 0; 812 h->retry_time.rel_value = 0;
808 process_queue (h); 813 process_queue (h);
809 if (rc.cont != NULL) 814 if (rc.cont != NULL)
810 rc.cont (rc.cont_cls, status, emsg); 815 rc.cont (rc.cont_cls, status,
816 GNUNET_TIME_absolute_ntoh (sm->min_expiration),
817 emsg);
811} 818}
812 819
813 820