[mw-devel] [Git][arthur/mw][master] Fix an infinite loop in .replay since

Andrew Price welshbyte at sucs.org
Sun Sep 17 22:51:46 BST 2017


Andrew Price pushed to branch master at Justin Mitchell / mw


Commits:
16b2d01f by Andrew Price at 2017-09-17T22:49:26+01:00
Fix an infinite loop in .replay since

Loops work better when the loop variable changes.

- - - - -


1 changed file:

- src/server/replay.c


Changes:

=====================================
src/server/replay.c
=====================================
--- a/src/server/replay.c
+++ b/src/server/replay.c
@@ -144,8 +144,8 @@ void replay(ipc_connection_t *conn, ipc_message_t *msg)
 			if (store[oldest]!=NULL &&
 				store[oldest]->head.when >= want) break;
 			skip++;
+			oldest = store_wrap(oldest + 1);
 		}
-		oldest = store_wrap( oldest + skip );
 		len -= skip;
 		/* if it fails you get nothing as there is
 		 * nothing newer (larger) than the date you gave */



View it on GitLab: https://projects.sucs.org/arthur/mw/commit/16b2d01f8c99ced5085d6b95050c253ad7acef31

---
View it on GitLab: https://projects.sucs.org/arthur/mw/commit/16b2d01f8c99ced5085d6b95050c253ad7acef31
You're receiving this email because of your account on projects.sucs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20170917/c6aeeb84/attachment.html>


More information about the mw-devel mailing list