Changeset b7bb454 for owl.c


Ignore:
Timestamp:
Dec 6, 2008, 5:39:49 PM (13 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
7ce4003
Parents:
3ea31b6
git-author:
Nelson Elhage <nelhage@mit.edu> (12/06/08 17:36:19)
git-committer:
Nelson Elhage <nelhage@mit.edu> (12/06/08 17:39:49)
Message:
Make owl_timer have a callback and integrate into the select() loop.

Soon we should add support for registering timers from perl, and then
we can eventually remove the perl mainloop hook.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • owl.c

    r6eaf35b rb7bb454  
    394394  nexttime=time(NULL);
    395395
     396
     397  owl_select_add_timer(180, 180, owl_zephyr_buddycheck_timer, NULL);
     398
     399  /* If we ever deprecate the mainloop hook, remove this. */
     400  owl_select_add_timer(0, 1, owl_perlconfig_mainloop, NULL);
     401
     402
    396403#ifdef HAVE_LIBZEPHYR
    397404  /* Check for any zephyrs that have come in while we've done init. */
     
    413420
    414421    followlast=owl_global_should_followlast(&g);
    415    
    416     owl_perlconfig_mainloop();
    417422
    418423    /* little hack */
     
    439444      if(owl_process_message(m))
    440445        newmsgs = 1;
    441     }
    442 
    443     /* is it time to check zbuddies? */
    444     if (owl_global_is_pseudologins(&g)) {
    445       if (owl_timer_is_expired(owl_global_get_zephyr_buddycheck_timer(&g))) {
    446         owl_function_debugmsg("Doing zephyr buddy check");
    447         owl_function_zephyr_buddy_check(1);
    448         owl_timer_reset(owl_global_get_zephyr_buddycheck_timer(&g));
    449       }
    450446    }
    451447
     
    780776
    781777#endif /* OWL_STDERR_REDIR */
     778
     779void owl_zephyr_buddycheck_timer(owl_timer *t, void *data)
     780{
     781    owl_function_debugmsg("Doing zephyr buddy check");
     782    owl_function_zephyr_buddy_check(1);
     783}
Note: See TracChangeset for help on using the changeset viewer.