Branch: Tag:

2007-06-26

2007-06-26 17:10:01 by Henrik Grubbström (Grubba) <grubba@grubba.org>

The global variable next_timeout is no more. It has been replaced by a backend-specific variable.
Added backend_lower_timeout() for accessing the new variable.
This fixes issues GTK, GTK2 and sendfile had with the new backend implementation.

NOTE!
NOTE! Changed the argument for backend callbacks!
NOTE!
NOTE! The argument is now a struct Backend_struct * when called at entry (was NULL).
NOTE! The argument is now NULL when called at exit (was 1).
NOTE!

Thanks to Artur Skawina <lis-t.200.7@src.neostrada.pl> for investigating the problem.

Rev: src/backend.cmod:1.203
Rev: src/backend.h:1.38
Rev: src/modules/files/sendfile.c:1.76
Rev: src/post_modules/GTK/source/global.pre:1.34
Rev: src/post_modules/GTK2/source/global.pre:1.15

51:      static void backend_callback(struct callback *_cb,    void *arg, -  void *post_select) +  void *backend)   { -  if( !post_select ) +  if(backend)    {    struct timeval timeout = current_time;    timeout.tv_usec += 20000;
62:    timeout.tv_usec-=1000000;    timeout.tv_sec+=1;    } -  if (my_timercmp (&timeout, <, &next_timeout)) -  next_timeout = timeout; +  backend_lower_timeout(backend, &timeout);    } else   #ifdef HAVE_GTK22    while(g_main_context_iteration(NULL,0));