Changeset 5657d53 for owl.c


Ignore:
Timestamp:
Mar 29, 2009, 1:49:55 PM (12 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
d9bfc82
Parents:
0741984
Message:
Process zephyr prior to owl_select(). [more]

Some libzephyr functions, such as ZLocateUser(), ZSetLocation() and
ZUnsetLocation() call Z_WaitForNotice(), which has an internal select
loop on the zephyr FD. It may leave pending zephyrs unprocessed, and
the FD won't have anything to be read. This can leave a zephyr in the
queue until the next zephyr comes in.

Before calling into owl_select() loop, call
owl_zephyr_process_events() and deal with any pending
zephyrs. ZPending is quick, and we usually shouldn't have anything to
process here anyhow.

reported by: kretch
File:
1 edited

Legend:

Unmodified
Added
Removed
  • owl.c

    r619d864 r5657d53  
    449449      owl_global_set_noneedrefresh(&g);
    450450    }
     451
     452    /* Some calls into libzephyr call Z_WaitForNotice(), which has its
     453     * own select loop and may leave zephyrs on the queue. Check for
     454     * them now, and process any we find. */
     455    owl_zephyr_process_events(NULL);
    451456
    452457    /* select on FDs we know about. */
Note: See TracChangeset for help on using the changeset viewer.