🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Timothy G. Becker Fri, 10 Jan 1986 21:03
MH.6 bug
#491
Author: Timothy G. Becker
Date: Fri, 10 Jan 1986 21:03
39 lines
1876 bytes
I'm running MH.6 on a 4.2bsd system.

When are holes in the msg list (because rmm'd msgs), scan would
sometimes complain about not being able to open one of these nonexistant
msgs.  In one case, "folder -pack" complained and quit after trying to
compact the msg list.

Below is the fix to sbr/m_gmsg.c
=============================================================================

*** /tmp/,RCSt1004632	Fri Jan 10 15:44:19 1986 (old)
--- /tmp/,RCSt2004632	Fri Jan 10 15:44:22 1986 (new)
***************
*** 186,191
      if (mp -> msgstats < 0)
  	adios (NULLCP, "m_gmsg() botch -- you lose big");
  #endif	MTR
      for (tail = head; tail < rover; tail++)
  	mp -> msgstats[tail -> msgno] = tail -> stats;
      m_getatr (mp);

--- 186,198 -----
      if (mp -> msgstats < 0)
  	adios (NULLCP, "m_gmsg() botch -- you lose big");
  #endif	MTR
+ 
+     /* clear msgstats since realloc() doesn't clear the memory it
+        allocates.  without this, some nonexistant msgno's have valid
+        looking msgstats. */
+     for (i=0;i<mp->hghmsg;++i)
+         mp->msgstats[i] = 0;
+ 
      for (tail = head; tail < rover; tail++)
  	mp -> msgstats[tail -> msgno] = tail -> stats;
      m_getatr (mp);


Tim Becker.
..!{seismo,allegra,decvax}!rochester!ccice5!tim
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads