Hi Petr,

I have a few tiny patches to suggest before the possible 0.140. I made
them many months ago but I have been using them with no issues.

A quick summary of the changes within:

- Remove erroneous tab characters from one of my last patches (sorry!)
- Prevent EOF character from stopping a binary upload in Windows
[joint credit with Steve Davies]
- "Rules Enabled" preference flag wasn't loaded before it was used the
first time
- Missing break after a successful upload causes a connection reset.

Thanks to all,

Andrew
diff --git a/pan/data/encode-cache.cc b/pan/data/encode-cache.cc
index 9d0c4c1..2d1de90 100644
--- a/pan/data/encode-cache.cc
+++ b/pan/data/encode-cache.cc
@@ -140,9 +140,9 @@ EncodeCache :: add (const Quark& message_id)
 void EncodeCache :: finalize (std::string message_id)
 {
   struct stat sb;
-       char out_path[4096];
-       
-       get_filename(out_path, Quark(message_id));
+  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);
@@ -190,7 +190,12 @@ EncodeCache :: get_data(std::string& data, const Quark& 
where)
 {
   char buf[4096];
   get_filename(buf, where);
+#ifdef G_OS_WIN32
+  // Prevent Windows EOF character from stopping the stream
+  std::ifstream in(buf, std::ios::binary);
+#else
   std::ifstream in(buf, std::ios::in);
+#endif
   std::stringstream out;
 
   while (in.getline(buf,sizeof(buf)))
diff --git a/pan/gui/header-pane.cc b/pan/gui/header-pane.cc
index dd1be23..81192fe 100644
--- a/pan/gui/header-pane.cc
+++ b/pan/gui/header-pane.cc
@@ -2042,6 +2042,7 @@ HeaderPane :: HeaderPane (ActionManager       & 
action_manager,
   _root = scroll;
 
   search_activate (this); // calls rebuild_filter
+  _prefs._rules_enabled = prefs.get_flag("enable-rules", true);
   rules(_prefs._rules_enabled);
 
   _data.add_listener (this);
diff --git a/pan/tasks/task-upload.cc b/pan/tasks/task-upload.cc
index 8487d7c..ff16de1 100644
--- a/pan/tasks/task-upload.cc
+++ b/pan/tasks/task-upload.cc
@@ -347,6 +347,7 @@ TaskUpload :: on_nntp_done (NNTP * nntp,
         Log::add_entry_list (tmp, _logfile);
         _logfile.clear();
       }
+      break;
     case TOO_MANY_CONNECTIONS:
       // lockout for 120 secs, but try
       it->second.reset();
_______________________________________________
Pan-users mailing list
Pan-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/pan-users

Reply via email to