Problem: Timeout handling is not optimal.
Solution: Avoid setting timeout_flag twice. Adjust the pointer when
stopping the regexp timeout. Adjust variable name.
// This is really the caller's responsibility, but let's make sure the
// previous timer has been stopped.
stop_timeout();
- timeout_flag = FALSE;
if (!timer_created)
{
* timeouts.
*/
static int timeout_flags[2];
-static int flag_idx = 0;
+static int timeout_flag_idx = 0;
static int *timeout_flag = &timeout_flags[0];
{
BOOL ret;
- timeout_flag = &timeout_flags[flag_idx];
+ timeout_flag = &timeout_flags[timeout_flag_idx];
stop_timeout();
ret = CreateTimerQueueTimer(
}
else
{
- flag_idx = (flag_idx + 1) % 2;
+ timeout_flag_idx = (timeout_flag_idx + 1) % 2;
timer_active = TRUE;
*timeout_flag = FALSE;
}
disable_regexp_timeout(void)
{
stop_timeout();
+ timeout_flag = &dummy_timeout_flag;
}
#endif
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 5129,
/**/
5128,
/**/