gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r8940 - gnunet/src/fs


From: gnunet
Subject: [GNUnet-SVN] r8940 - gnunet/src/fs
Date: Fri, 4 Sep 2009 06:23:57 -0600

Author: grothoff
Date: 2009-09-04 06:23:57 -0600 (Fri, 04 Sep 2009)
New Revision: 8940

Modified:
   gnunet/src/fs/fs_publish.c
   gnunet/src/fs/fs_tree.c
   gnunet/src/fs/fs_uri.c
Log:
fixes

Modified: gnunet/src/fs/fs_publish.c
===================================================================
--- gnunet/src/fs/fs_publish.c  2009-09-04 12:17:33 UTC (rev 8939)
+++ gnunet/src/fs/fs_publish.c  2009-09-04 12:23:57 UTC (rev 8940)
@@ -210,7 +210,8 @@
   struct GNUNET_FS_ProgressInfo pi;
   
   pi.status = GNUNET_FS_STATUS_PUBLISH_COMPLETED;
-  make_publish_status (&pi, sc, p, p->chk_uri->data.chk.file_length);
+  make_publish_status (&pi, sc, p,
+                      GNUNET_ntohll (p->chk_uri->data.chk.file_length));
   pi.value.publish.eta = GNUNET_TIME_UNIT_ZERO;
   pi.value.publish.specifics.completed.chk_uri = p->chk_uri;
   p->client_info

Modified: gnunet/src/fs/fs_tree.c
===================================================================
--- gnunet/src/fs/fs_tree.c     2009-09-04 12:17:33 UTC (rev 8939)
+++ gnunet/src/fs/fs_tree.c     2009-09-04 12:23:57 UTC (rev 8940)
@@ -347,7 +347,7 @@
       te->uri = GNUNET_malloc (sizeof(struct GNUNET_FS_Uri));
       te->uri->type = chk;
       te->uri->data.chk.chk = te->chk_tree[0];
-      te->uri->data.chk.file_length = te->size;
+      te->uri->data.chk.file_length = GNUNET_htonll (te->size);
       GNUNET_SCHEDULER_add_continuation (te->h->sched,
                                         GNUNET_NO,
                                         te->cont,

Modified: gnunet/src/fs/fs_uri.c
===================================================================
--- gnunet/src/fs/fs_uri.c      2009-09-04 12:17:33 UTC (rev 8939)
+++ gnunet/src/fs/fs_uri.c      2009-09-04 12:23:57 UTC (rev 8940)
@@ -396,6 +396,7 @@
   struct GNUNET_FS_Uri *ret;
   struct FileIdentifier fi;
   unsigned int pos;
+  unsigned long long flen;
   size_t slen;
   char h1[sizeof(struct GNUNET_CRYPTO_HashAsciiEncoded)];
   char h2[sizeof(struct GNUNET_CRYPTO_HashAsciiEncoded)];
@@ -429,12 +430,12 @@
                                               &fi.chk.query)) ||
       (1 != SSCANF (&s[pos + sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) * 
2],
                     "%llu", 
-                   &fi.file_length)))
+                   &flen)) )
     {
       *emsg = GNUNET_strdup (_("Malformed CHK URI"));
       return NULL;
     }
-  fi.file_length = GNUNET_htonll (fi.file_length);
+  fi.file_length = GNUNET_htonll (flen);
   ret = GNUNET_malloc (sizeof(struct GNUNET_FS_Uri));
   ret->type = chk;
   ret->data.chk = fi;
@@ -544,6 +545,7 @@
   unsigned int pos;
   unsigned int npos;
   unsigned long long exptime;
+  unsigned long long flen;
   struct GNUNET_TIME_Absolute et;
   struct GNUNET_CRYPTO_RsaSignature sig;
   struct LocUriAssembly ass;
@@ -578,12 +580,12 @@
                                                    &ass.fi.chk.query)) ||
       (1 != SSCANF (&s[pos + sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) * 
2],
                     "%llu", 
-                   &ass.fi.file_length)) )
+                   &flen)) )
     {
       *emsg = GNUNET_strdup (_("SKS URI malformed"));
       return NULL;
     }
-  ass.fi.file_length = GNUNET_htonll (ass.fi.file_length);
+  ass.fi.file_length = GNUNET_htonll (flen);
 
   npos = pos + sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) * 2;
   while ((s[npos] != '\0') && (s[npos] != '.'))





reply via email to

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