patch for imap4 connection/reconnect error

View: New views
2 Messages — Rating Filter:   Alert me  

patch for imap4 connection/reconnect error

by Peter Brueckner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

sometimes ogo-webui hangs within imap-requests or imap-reconnects.
The problem is  reading a -1 (EOF) from buffer and put this value at
first at an unsigned int -> 4294967295 and after that to an unsigned
char ->255. Here is a patch for the repair but not at root of the evil

----------------------
*** sope/sope-mime/NGImap4/NGImap4ResponseParser.m      Mon Feb 23
16:16:12 2009
--- sope.patched//sope-mime/NGImap4/NGImap4ResponseParser.m     Mon
Jun 15 17:07:39 2009
***************
*** 299,305 ****
--- 299,308 ----
      else if (isdigit(l0)) {
        /* those starting with a number '24 ', eg '24 OK Completed' */
        endOfCommand = (_parseTaggedResponse(self, result) == _tag);
+     } else if(l0 == 255) { /* EOF was -1 sometimes */
+       endOfCommand = YES;
      }
+
    }
    return result;
  }
 
--
mit freundlichen Grüßen / Kind regards
Peter Brückner
FON +49=361-21240.12

Brückner & Jarosch Ingenieurgesellschaft mbH
Germany, 99084 Erfurt, Nonnengasse 5a
FON +49=361-21240.0 FAX +49=361-21240.19
WEB <http://www.bj-ig.de> MAIL <mailto:info@...>
Sitz Erfurt Register HRB 3134 Amtsgericht Erfurt
Steuer 151/106/02585 UID DE150092958
Geschäftsführer Dipl.-Ing. Wolfgang Jarosch, Dipl.-Ing. Peter Brückner

--
OpenGroupware.org Developer
developer@...
http://mail.opengroupware.org/mailman/listinfo/developer

Re: patch for imap4 connection/reconnect error

by Adam Tauno Williams :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 2009-06-15 at 17:29 +0200, Peter Brueckner wrote:

> Hi,
> sometimes ogo-webui hangs within imap-requests or imap-reconnects.
> The problem is  reading a -1 (EOF) from buffer and put this value at
> first at an unsigned int -> 4294967295 and after that to an unsigned
> char ->255. Here is a patch for the repair but not at root of the evil
>
> ----------------------
> *** sope/sope-mime/NGImap4/NGImap4ResponseParser.m      Mon Feb 23
> 16:16:12 2009
> --- sope.patched//sope-mime/NGImap4/NGImap4ResponseParser.m     Mon
> Jun 15 17:07:39 2009
> ***************
> *** 299,305 ****
> --- 299,308 ----
>       else if (isdigit(l0)) {
>         /* those starting with a number '24 ', eg '24 OK Completed' */
>         endOfCommand = (_parseTaggedResponse(self, result) == _tag);
> +     } else if(l0 == 255) { /* EOF was -1 sometimes */
> +       endOfCommand = YES;
>       }
> +
>     }
>     return result;
>   }

I'll try to test this patch this weekend; I can't patch SOPE, but if it
works I'll include it in the SOPE OBS packages.

Maybe this relates to
<http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1195>

--
OpenGroupware.org Developer
developer@...
http://mail.opengroupware.org/mailman/listinfo/developer