commit | 29b8e391e443493af6034acbe7106e7729785a6d | [log] [tgz] |
---|---|---|
author | soamin <soamin@wd222yx4.memphis.edu> | Tue Jan 22 17:12:07 2013 -0600 |
committer | soamin <soamin@wd222yx4.memphis.edu> | Tue Jan 22 17:12:07 2013 -0600 |
tree | b1ce4b039568a05cdd512ebb330029b79d315a8d | |
parent | e49af7a8f780737f4b8152c9fd620f0b839e4643 [diff] [blame] |
now checking the number of descriptors changed in select
diff --git a/nlsr-sync-0.0/nlsr.c b/nlsr-sync-0.0/nlsr.c index d25fb9d..4c4bc3b 100755 --- a/nlsr-sync-0.0/nlsr.c +++ b/nlsr-sync-0.0/nlsr.c
@@ -934,7 +934,7 @@ testfds=nlsr->readfds; result = select(FD_SETSIZE, &testfds, NULL,NULL, &timeout); - for(fd = 0; fd < FD_SETSIZE; fd++) + for(fd = 0; fd < FD_SETSIZE && result > 0; fd++) { if(FD_ISSET(fd,&testfds)) {