gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r27340 - in gnunet/src: fs include


From: gnunet
Subject: [GNUnet-SVN] r27340 - in gnunet/src: fs include
Date: Thu, 30 May 2013 20:33:38 +0200

Author: grothoff
Date: 2013-05-30 20:33:38 +0200 (Thu, 30 May 2013)
New Revision: 27340

Modified:
   gnunet/src/fs/fs_download.c
   gnunet/src/fs/fs_publish.c
   gnunet/src/fs/fs_search.c
   gnunet/src/fs/fs_unindex.c
   gnunet/src/include/gnunet_fs_service.h
Log:
-export FS handle during events, as we might generate events duing FS_start and 
client then doesn't know the handle yet

Modified: gnunet/src/fs/fs_download.c
===================================================================
--- gnunet/src/fs/fs_download.c 2013-05-30 18:20:24 UTC (rev 27339)
+++ gnunet/src/fs/fs_download.c 2013-05-30 18:33:38 UTC (rev 27340)
@@ -122,6 +122,7 @@
   pi->value.download.eta =
       GNUNET_TIME_calculate_eta (dc->start_time, dc->completed, dc->length);
   pi->value.download.is_active = (NULL == dc->client) ? GNUNET_NO : GNUNET_YES;
+  pi->fsh = dc->h;
   if (0 == (dc->options & GNUNET_FS_DOWNLOAD_IS_PROBE))
     dc->client_info = dc->h->upcb (dc->h->upcb_cls, pi);
   else

Modified: gnunet/src/fs/fs_publish.c
===================================================================
--- gnunet/src/fs/fs_publish.c  2013-05-30 18:20:24 UTC (rev 27339)
+++ gnunet/src/fs/fs_publish.c  2013-05-30 18:33:38 UTC (rev 27340)
@@ -64,6 +64,7 @@
   pi->value.publish.duration =
       GNUNET_TIME_absolute_get_duration (p->start_time);
   pi->value.publish.anonymity = p->bo.anonymity_level;
+  pi->fsh = pc->h;
   return pc->h->upcb (pc->h->upcb_cls, pi);
 }
 

Modified: gnunet/src/fs/fs_search.c
===================================================================
--- gnunet/src/fs/fs_search.c   2013-05-30 18:20:24 UTC (rev 27339)
+++ gnunet/src/fs/fs_search.c   2013-05-30 18:33:38 UTC (rev 27340)
@@ -61,6 +61,7 @@
     ? GNUNET_TIME_absolute_get_duration (sc->start_time)
     : GNUNET_TIME_UNIT_ZERO;
   pi->value.search.anonymity = (NULL != sc) ? sc->anonymity : 0;
+  pi->fsh = h;
   ret = h->upcb (h->upcb_cls, pi);
   return ret;
 }
@@ -457,6 +458,7 @@
 {
   struct GNUNET_FS_SearchResult *sr;
 
+  GNUNET_assert (NULL != h);
   sr = GNUNET_new (struct GNUNET_FS_SearchResult);
   sr->h = h;
   sr->uri = GNUNET_FS_uri_dup (uri);

Modified: gnunet/src/fs/fs_unindex.c
===================================================================
--- gnunet/src/fs/fs_unindex.c  2013-05-30 18:20:24 UTC (rev 27339)
+++ gnunet/src/fs/fs_unindex.c  2013-05-30 18:33:38 UTC (rev 27340)
@@ -89,8 +89,8 @@
   pi->value.unindex.duration =
       GNUNET_TIME_absolute_get_duration (uc->start_time);
   pi->value.unindex.completed = offset;
+  pi->fsh = uc->h;
   uc->client_info = uc->h->upcb (uc->h->upcb_cls, pi);
-
 }
 
 

Modified: gnunet/src/include/gnunet_fs_service.h
===================================================================
--- gnunet/src/include/gnunet_fs_service.h      2013-05-30 18:20:24 UTC (rev 
27339)
+++ gnunet/src/include/gnunet_fs_service.h      2013-05-30 18:33:38 UTC (rev 
27340)
@@ -1912,6 +1912,10 @@
    */
   enum GNUNET_FS_Status status;
 
+  /**
+   * File-sharing handle that generated the event.
+   */
+  struct GNUNET_FS_Handle *fsh;
 };
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]