Re: Duplicate Cancel-Lock: header

Robert Grimm <[email protected]>
Newsgroups gmane.network.slrn.user
Organization Disorganized
Message-ID <[email protected]>
Robert Grimm <[email protected]> wrote:
> I may have discovered a bug in cancellock handling in slrn. I use a cvs
> version from 2007-03-18.  I noticed, that the Header Cancel-Lock is
> inserted twice, once in line 1607, the second time in line 1645 of
> post.c.

s/1607/1590/

Patch:

--- post.c.orig 2007-07-06 16:25:38.000000000 +0200
+++ post.c      2007-07-06 16:27:33.000000000 +0200
@@ -1577,8 +1577,8 @@
                       char *canlock;
                       if (NULL != (canlock = gen_cancel_lock (msgid)))
                         {
+                           tmp=a->cline;
                            a->cline=a->cline->prev;
-                           tmp=a->cline->next;
                            a->cline->next=(Slrn_Article_Line_Type *) slrn_malloc(sizeof(Slrn_Article_Line_Type),1,1);
                            a->cline->next->prev=a->cline;
                            a->cline=a->cline->next;
@@ -1594,8 +1594,8 @@
 #endif /* SLRN_HAS_CANLOCK */
                       if (has_messageid == 0)
                         {
+                           tmp=a->cline;
                            a->cline=a->cline->prev;
-                           tmp=a->cline->next;
                            a->cline->next=(Slrn_Article_Line_Type *) slrn_malloc(sizeof(Slrn_Article_Line_Type),1,1);
                            a->cline->next->prev=a->cline;
                            a->cline=a->cline->next;


Rob
-- 
Hell is a place where bottles have two holes and women none.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.