Being late for the party.

It seems to me that the function is getting too long.  I think we
might want to move the core part of the patch into another function.

I think it might be better if intentionalSourceSwitch doesn't need
lastSourceFailed set. It would look like this:

>  if (lastSourceFailed || switchSource)
>  {
>     if (nonblocking && lastSourceFailed)
>        return XLREAD_WOULDBLOCK;


+                                       if (first_time)
+                                               last_switch_time = curr_time;
..
+                                       if (!first_time &&
+                                               
TimestampDifferenceExceeds(last_switch_time, curr_time,
..
+                                       /* We're not here for the first time 
any more */
+                                       if (first_time)
+                                               first_time = false;

I don't think the flag first_time is needed.


regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center


Reply via email to