diff options
author | Pablo Neira Ayuso <pablo@gnumonks.org> | 2012-08-23 13:51:27 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-08-30 21:50:32 +0200 |
commit | 7723b4e9a3fd51cec28fb48423472479cd41d95e (patch) | |
tree | 1340c79a7801cdc47f15f97ae1ab52d71c154a4d /tests | |
parent | 953060001d2cb6ef86f432a79599da2951780ef7 (diff) |
tests: fix CPU suckup e1inp_ipa_bts_test after test finish
We have to read from the eventfd, otherwise select keeps returning
the file descriptor as ready to read.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/e1inp_ipa_bts_test.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/e1inp_ipa_bts_test.c b/tests/e1inp_ipa_bts_test.c index bf46e9e..1b9a2db 100644 --- a/tests/e1inp_ipa_bts_test.c +++ b/tests/e1inp_ipa_bts_test.c @@ -205,9 +205,14 @@ static int abis_nm_sw_act_req(struct e1inp_sign_link *sign_link, static int test_bts_gsm_12_21_cb(struct osmo_fd *ofd, unsigned int what) { - int ret; + int ret, event_type; struct ipaccess_unit *unit = ofd->data; + if (read(eventfds[0], &event_type, sizeof(unsigned int)) < 0) { + LOGP(DBTSTEST, LOGL_ERROR, "error receiving event\n"); + return 0; + } + switch(bts_state) { case BTS_TEST_OML_SIGN_LINK_DOWN: /* Do nothing until OML link becomes ready. */ |