Changeset 52a0f14 for owl.c


Ignore:
Timestamp:
Feb 16, 2009, 2:48:16 PM (16 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
330c55a
Parents:
5008e51
Message:
stat the zhm asynchronously at startup.

If Zephyr is not present, this means we can continue booting
immediately, rather than waiting a second for the zhm to not
respond. The downside is that you no longer get an error message if
Zephyr is unavailable, but that can be fixed by adding a timeout
timer.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • owl.c

    r23e1110 r52a0f14  
    4343  owl_editwin *tw;
    4444  owl_popwin *pw;
    45   int ret, initialsubs, debug, argcsave, followlast;
     45  int ret, debug, argcsave, followlast;
    4646  int newmsgs, nexttimediff;
    4747  struct sigaction sigact;
     
    6565  tty=NULL;
    6666  debug=0;
    67   initialsubs=1;
     67  g.load_initial_subs = 1;
    6868
    6969  setlocale(LC_ALL, "");
     
    7575  while (argc>0) {
    7676    if (!strcmp(argv[0], "-n")) {
    77       initialsubs=0;
     77      g.load_initial_subs = 0;
    7878      argv++;
    7979      argc--;
     
    191191    owl_select_add_dispatch(d);
    192192  }
    193  
    194 #ifdef HAVE_LIBZEPHYR
    195   /* zephyr init */
    196   ret=owl_zephyr_initialize();
    197   if (!ret) {
    198     owl_dispatch *d = owl_malloc(sizeof(owl_dispatch));
    199     d->fd = ZGetFD();
    200     d->cfunc = &owl_zephyr_process_events;
    201     d->destroy = NULL;
    202     owl_select_add_dispatch(d);
    203     owl_global_set_havezephyr(&g);
    204   }
    205 
    206 #endif
     193
     194  owl_zephyr_initialize();
    207195
    208196#if OWL_STDERR_REDIR
     
    339327
    340328  wrefresh(sepwin);
    341 
    342   /* load zephyr subs */
    343   if (initialsubs) {
    344     int ret2;
    345     owl_function_debugmsg("startup: loading initial zephyr subs");
    346 
    347     /* load default subscriptions */
    348     ret=owl_zephyr_loaddefaultsubs();
    349    
    350     /* load subscriptions from subs file */
    351     ret2=owl_zephyr_loadsubs(NULL, 0);
    352 
    353     if (ret || ret2) {
    354       owl_function_adminmsg("", "Error loading zephyr subscriptions");
    355     } else if (ret2!=-1) {
    356       owl_global_add_userclue(&g, OWL_USERCLUE_CLASSES);
    357     }
    358 
    359     /* load login subscriptions */
    360     if (owl_global_is_loginsubs(&g)) {
    361       owl_function_debugmsg("startup: loading login subs");
    362       owl_function_loadloginsubs(NULL);
    363     }
    364   }
    365329
    366330  /* First buddy check to sync the list without notifications */
Note: See TracChangeset for help on using the changeset viewer.