wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 4d689c0a0d37a60c77d780ded84903ec496990c9
parent 93b89970f8c9fa6b0f05486ee9a2285de2899bc8
Author: Kris Maglione <jg@suckless.org>
Date:   Tue, 27 Feb 2007 03:14:39 -0500

Fix an infinate loop with multiple reads on the same /event fid.

Diffstat:
fs.c | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/fs.c b/fs.c @@ -314,7 +314,7 @@ write_event(char *format, ...) { va_list ap; FidLink *f; FileId *fi; - P9Req *aux; + P9Req *aux, *req; va_start(ap, format); vsnprintf(buffer, BUFFER_SIZE, format, ap); @@ -328,8 +328,10 @@ write_event(char *format, ...) { (fi->content.buf)[slen] = '\0'; strcat(fi->content.buf, buffer); } - while((aux = pending_event_reads)) { - pending_event_reads = pending_event_reads->aux; + req = pending_event_reads; + pending_event_reads = nil; + while((aux = req)) { + req = req->aux; respond_event(aux); } }