The return code for this function should be the number of events received. This commit was SVN r22191.