buglet in 2.3.3b2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




When you lose a connection to a server (broken connection, timeout, or the
mythical remoteIdleTimeout) "next" will have lost track of where you are 
after the re-connection.

(first looked at adding this to attachGroupTalk, but it wasn't as easy a 
hack as it initially appeared)


diff -c -r nntpcache-2.3.3b2/src/sockets.c nntpcache-2.3.3b2-local/src/sockets.c
***************
*** 214,219 ****
--- 231,245 ----
  		}
  		if (!attachGroupTalk (scfg->group, n, scfg, FALSE))
  			goto dropped;
+ 		/* set pointer back to article we were looking at   -an */
+ 	        if (strEq(scfg->group, CurrentGroup) && CurrentGroupArtNum != scfg->artno) {
+                     fprintf (scfg->fh, "stat %d\r\n", CurrentGroupArtNum);
+                     if (fflush(scfg->fh) || !Cfget(scfg, buf, sizeof buf))
+ 			goto dropped;
+                     if (strToi (buf) == NNTP_NOTHING_FOLLOWS_VAL) {
+                         scfg->artno = CurrentGroupArtNum;
+                     }
+                 }
  	}
  	server_up(scfg);
  	scfg->share->connect_good++;

-- 
Aaron Nabil


[Index of Archives]     [Yosemite]     [Yosemite Campsites]     [Bugtraq]     [Linux]     [Trn]

Powered by Linux