summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorepoch <epoch@hack.thebackupbox.net>2020-03-28 06:58:32 +0000
committerepoch <epoch@hack.thebackupbox.net>2020-03-28 06:58:32 +0000
commit794e511e8e3e1deb7121eac90e36247ebeed329a (patch)
tree1226fd9a96d824406ce29ac0e07730fe6bd467fa
parent2a49d562fec3bbe85bbea4cdf4a3afef50996535 (diff)
downloadlibidc-794e511e8e3e1deb7121eac90e36247ebeed329a.tar.gz
libidc-794e511e8e3e1deb7121eac90e36247ebeed329a.zip
check that a line handler hasn't changed whether we need to keep processing lines
-rw-r--r--libidc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libidc.c b/libidc.c
index 00cc7c2..01013a7 100644
--- a/libidc.c
+++ b/libidc.c
@@ -254,6 +254,10 @@ int select_on_everything() {
// if(hack == 2) {*t='\r'; t++;}
// *t='\n';
//}
+ if(idc.fds[i].read_lines_for_us == 0) { //this /could/ be changed by a line handler setting this flag
+ //we need to bail out of the loop that is getting lines from the buffer
+ break;
+ }
}
}//end of looping over each line in backlog
}//end of the loop over every select()d fd