gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r1134 - in GNUnet/src: applications/fs/lib util


From: grothoff
Subject: [GNUnet-SVN] r1134 - in GNUnet/src: applications/fs/lib util
Date: Wed, 29 Jun 2005 05:54:36 -0700 (PDT)

Author: grothoff
Date: 2005-06-29 05:54:31 -0700 (Wed, 29 Jun 2005)
New Revision: 1134

Modified:
   GNUnet/src/applications/fs/lib/fslib.c
   GNUnet/src/util/storage.c
Log:
increasing stack size

Modified: GNUnet/src/applications/fs/lib/fslib.c
===================================================================
--- GNUnet/src/applications/fs/lib/fslib.c      2005-06-29 12:42:30 UTC (rev 
1133)
+++ GNUnet/src/applications/fs/lib/fslib.c      2005-06-29 12:54:31 UTC (rev 
1134)
@@ -131,7 +131,7 @@
   if (0 != PTHREAD_CREATE(&ret->thread,
                          (PThreadMain) &processReplies,
                          ret,
-                         16 * 1024))
+                         64 * 1024))
     DIE_STRERROR("PTHREAD_CREATE");
   return ret;
 }

Modified: GNUnet/src/util/storage.c
===================================================================
--- GNUnet/src/util/storage.c   2005-06-29 12:42:30 UTC (rev 1133)
+++ GNUnet/src/util/storage.c   2005-06-29 12:54:31 UTC (rev 1134)
@@ -72,20 +72,21 @@
 
   if (filename == NULL)
     return SYSERR;
-  if (dirname != NULL) {
-    fn = MALLOC(strlen(filename) + strlen(dirname) + 2);
-    fn[0] = '\0';
+  if ( (dirname != NULL) &&
+       (strlen(dirname) > 0) ) {
+    fn = MALLOC(strlen(filename) + strlen(dirname) + 3);
     if (strlen(dirname) > 0) {
-      strcat(fn, dirname);
+      strcpy(fn, dirname);
       if (dirname[strlen(dirname)-1] != DIR_SEPARATOR)
-       strcat(fn, "/"); /* add tailing / if needed */
+       strcat(fn, DIR_SEPARATOR_STR); /* add tailing / if needed */
     }
     /* Windows paths don't start with / */
 #ifndef MINGW
     else
-      strcat(fn, "/");
+      strcpy(fn, DIR_SEPARATOR_STR);
 #endif
-    if (filename[0] == DIR_SEPARATOR) /* if filename starts with a "/", don't 
copy it */
+    if (filename[0] == DIR_SEPARATOR) 
+      /* if filename starts with a "/", don't copy it */
       strcat(fn, &filename[1]);
     else
       strcat(fn, filename);
@@ -93,7 +94,9 @@
     fn = STRDUP(filename);
 
   if (0 != STAT(fn, &buf)) {
-    LOG_FILE_STRERROR(LOG_EVERYTHING, "stat", fn);
+    LOG_FILE_STRERROR(LOG_EVERYTHING, 
+                     "stat",
+                     fn);
     FREE(fn);
     return SYSERR;
   }





reply via email to

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