-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: urcd
action: commit
revision:
path_from:
revision_from: 52e6de384edd9ea6e569b016545905a0d40e859c:
path_to:
revision_to:

git.thebackupbox.net

urcd

git://git.thebackupbox.net/urcd

commit 52e6de384edd9ea6e569b016545905a0d40e859c
Author: root <root@d3v11.ano>
Date:   Fri Apr 12 15:24:32 2013 +0000

    [urccache.c] taia fix

diff --git a/src/urccache.c b/src/urccache.c

index 9142a8d25ed74c35189209b3ac0e128954b7c0e6..

index ..95876c59146e763ab63037bc8bf95673b91010de 100644

--- a/src/urccache.c
+++ b/src/urccache.c
@@ -14,7 +14,7 @@ struct taia *t;
 {
   struct timeval now;
   gettimeofday(&now,(struct timezone *) 0);
-  t->sec.x = 4611686018427387786ULL + (uint64) now.tv_sec; /* -128ULL */
+  t->sec.x = 4611686018427387914ULL - 128ULL + (uint64) now.tv_sec;
   t->nano = 1000 * now.tv_usec + 500;
   t->atto = 0;
 }
@@ -44,7 +44,7 @@ main(int argc, char **argv)
   while (1)
   {

-    if (read(0,buffer,2)<2) exit(1);
+    readbuffer: if (read(0,buffer,2)<2) exit(1);

     n = 0;
     l = 16 + 8 + buffer[0] * 256 + buffer[1];
@@ -59,10 +59,14 @@ main(int argc, char **argv)
     taia_slow(taia);
     taia_pack(taia,taia);

-    if (taia_less(buffer,taia))
+    for (i=0;i<16;++i)
     {
-      if (write(1,"\2",1)<1) exit(3);
-      continue;
+      if (taia[i] < buffer[i]) break;
+      if (taia[i] > buffer[i])
+      {
+        if (write(1,"\2",1)<1) exit(3);
+        goto readbuffer;
+      }
     }

     memcpy(buffer+l,salt,32);

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 16:41:18 2024