Hi Pan Devs.

I noticed that binary posting (add files to queue) wasn't working at
all for me in the latest GIT, so I thought I'd try and figure out why
and attempt to fix it.

There are 3 fixes in the patch. 1 is the actual fix and the other 2
are minor things I found when using valgrind, but all related to
uploading.

Fix 1 restores the wakeup bit in task-upload.h so that uploads are no
longer stuck in the queue,
Fix 2 gets the full path for stat in encode-cache.cc so that the
encode cache is calculated ok, and
Fix 3 is a very minor thing in uuencode.c where the numparts variable
is undefined from the second part on.

Binary posting now works for me, but I have only been able to test
this on myself in Windows.

Thanks for reading,

Andrew
diff -ru ../pan2-master/pan/data/encode-cache.cc .//pan/data/encode-cache.cc
--- ../pan2-master/pan/data/encode-cache.cc     2014-05-11 21:51:44 +0100
+++ .//pan/data/encode-cache.cc 2014-09-19 14:18:44 +0100
@@ -140,7 +140,10 @@
 void EncodeCache :: finalize (std::string message_id)
 {
   struct stat sb;
-  stat (message_id.c_str(), &sb);
+       char out_path[4096];
+       
+       get_filename(out_path, Quark(message_id));
+  stat (out_path, &sb);
   _mid_to_info[message_id]._size = sb.st_size;
   fire_added (message_id);
   _current_bytes += sb.st_size;
diff -ru ../pan2-master/pan/tasks/task-upload.h .//pan/tasks/task-upload.h
--- ../pan2-master/pan/tasks/task-upload.h      2014-05-11 21:51:44 +0100
+++ .//pan/tasks/task-upload.h  2014-09-19 14:18:42 +0100
@@ -164,7 +164,7 @@
       void set_encoder_done (bool setme) { _encoder_has_run = setme; }
       needed_t& needed() { return _needed; }
       void build_needed_tasks();
-
+      void wakeup() { _state.set_working(); update_work(); }
   };
 }
 
Only in ./: patch.diff
diff -ru ../pan2-master/uulib/uuencode.c .//uulib/uuencode.c
--- ../pan2-master/uulib/uuencode.c     2014-05-11 21:51:44 +0100
+++ .//uulib/uuencode.c 2014-09-19 14:18:40 +0100
@@ -1294,7 +1294,8 @@
 {
   mimemap *miter=mimetable;
   static FILE *theifile;
-  int themode, numparts;
+  static int numparts;
+  int themode;
   struct stat finfo;
   long thesize;
   char *ptr;
_______________________________________________
Pan-devel mailing list
Pan-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/pan-devel

Reply via email to