gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r4801 - in GNUnet: . src/applications/fs/ecrs


From: gnunet
Subject: [GNUnet-SVN] r4801 - in GNUnet: . src/applications/fs/ecrs
Date: Sat, 26 May 2007 19:32:57 -0600 (MDT)

Author: grothoff
Date: 2007-05-26 19:32:57 -0600 (Sat, 26 May 2007)
New Revision: 4801

Modified:
   GNUnet/src/applications/fs/ecrs/download.c
   GNUnet/todo
Log:
more support for location URIs

Modified: GNUnet/src/applications/fs/ecrs/download.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/download.c  2007-05-27 01:26:16 UTC (rev 
4800)
+++ GNUnet/src/applications/fs/ecrs/download.c  2007-05-27 01:32:57 UTC (rev 
4801)
@@ -469,6 +469,8 @@
     = 0;
   rm->requestList
     = NULL;
+  rm->have_target
+    = NO;
   GROW(rm->requestList,
        rm->requestListSize,
        256);
@@ -1363,9 +1365,8 @@
   }
   fid = uri->data.fi;
   
-  /* FIXME: if location URI, set rm->target/have_target
-     and give HELLO to identity library! */
-  if (! ECRS_isFileUri(uri)) {
+  if ( (! ECRS_isFileUri(uri)) &&
+       (! ECRS_isLocationUri(uri))) {
     GE_BREAK(ectx, 0);
     FREE(realFN);
     return SYSERR;
@@ -1392,6 +1393,28 @@
     FREE(realFN);
     return SYSERR;
   }
+  if (ECRS_isLocationUri(uri)) {
+    const Location * loc = &uri->data.loc;
+    struct ClientServerConnection * sock;
+
+    sock = client_connection_create(rm->ectx,
+                                   rm->cfg);
+
+    gnunet_identity_peer_add(sock,
+                            &loc->peer,
+                            loc->expirationTime,
+                            loc->proto,
+                            loc->sas,
+                            loc->mtu,
+                            loc->address,
+                            &loc->helloSignature);
+    connection_destroy(sock);
+    hash(&loc->peer,
+        sizeof(PublicKey),
+        &rm->target.hashPubKey);
+    rm->have_target = YES;
+  }
+
   ctx.startTime = get_time();
   ctx.anonymityLevel = anonymityLevel;
   ctx.TTL_DECREMENT = 5 * cronSECONDS; /* HACK! */

Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2007-05-27 01:26:16 UTC (rev 4800)
+++ GNUnet/todo 2007-05-27 01:32:57 UTC (rev 4801)
@@ -14,9 +14,6 @@
 0.7.2 [5'07]:
 - new features:
   * XFS / support for location URIs [CG] 
-    + fsui/fs/location URI support (download routing) [RC]
-      - ECRS download file -- use new identity lib to give HELLO to gnunetd
-      - ECRS download file -- set RM target iff Location URI given
     + location URI generation (for search routing) [RC]
       => ECRS needs to generate location URIs for *indexed* non-anonymous 
content!
       - extend identity API to allow creation of (certain) signatures by 
clients!





reply via email to

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