From bf540cb7c3e8fbcb6bd978cc3876340812dbf142 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 6 May 2011 12:11:06 +0200 Subject: src: use namespace prefix osmo_timer* for timer functions Summary of changes: s/struct timer_list/struct osmo_timer_list/g s/bsc_add_timer/osmo_timer_add/g s/bsc_schedule_timer/osmo_timer_schedule/g s/bsc_del_timer/osmo_timer_del/g s/bsc_timer_pending/osmo_timer_pending/g s/bsc_nearest_timer/osmo_timers_nearest/g s/bsc_prepare_timers/osmo_timers_prepare/g s/bsc_update_timers/osmo_timers_update/g s/bsc_timer_check/osmo_timers_check/g --- openbsc/src/osmo-bsc_nat/bsc_nat.c | 22 +++++++++++----------- openbsc/src/osmo-bsc_nat/bsc_ussd.c | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'openbsc/src/osmo-bsc_nat') diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index 3112ff37e..ffcd3884c 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -66,7 +66,7 @@ static const char *config_file = "bsc-nat.cfg"; static struct in_addr local_addr; static struct bsc_fd bsc_listen; static const char *msc_ip = NULL; -static struct timer_list sccp_close; +static struct osmo_timer_list sccp_close; static int daemonize = 0; const char *openbsc_copyright = @@ -153,10 +153,10 @@ static void bsc_ping_timeout(void *_bsc) send_ping(bsc); /* send another ping in 20 seconds */ - bsc_schedule_timer(&bsc->ping_timeout, bsc->nat->ping_timeout, 0); + osmo_timer_schedule(&bsc->ping_timeout, bsc->nat->ping_timeout, 0); /* also start a pong timer */ - bsc_schedule_timer(&bsc->pong_timeout, bsc->nat->pong_timeout, 0); + osmo_timer_schedule(&bsc->pong_timeout, bsc->nat->pong_timeout, 0); } static void start_ping_pong(struct bsc_connection *bsc) @@ -848,9 +848,9 @@ void bsc_close_connection(struct bsc_connection *connection) struct rate_ctr *ctr = NULL; /* stop the timeout timer */ - bsc_del_timer(&connection->id_timeout); - bsc_del_timer(&connection->ping_timeout); - bsc_del_timer(&connection->pong_timeout); + osmo_timer_del(&connection->id_timeout); + osmo_timer_del(&connection->ping_timeout); + osmo_timer_del(&connection->pong_timeout); if (connection->cfg) ctr = &connection->cfg->stats.ctrg->ctr[BCFG_CTR_DROPPED_SCCP]; @@ -930,7 +930,7 @@ static void ipaccess_auth_bsc(struct tlv_parsed *tvp, struct bsc_connection *bsc rate_ctr_inc(&conf->stats.ctrg->ctr[BCFG_CTR_NET_RECONN]); bsc->authenticated = 1; bsc->cfg = conf; - bsc_del_timer(&bsc->id_timeout); + osmo_timer_del(&bsc->id_timeout); LOGP(DNAT, LOGL_NOTICE, "Authenticated bsc nr: %d on fd %d\n", conf->nr, bsc->write_queue.bfd.fd); start_ping_pong(bsc); @@ -1177,7 +1177,7 @@ static int ipaccess_bsc_read_cb(struct bsc_fd *bfd) /* stop the pong timeout */ if (hh->proto == IPAC_PROTO_IPACCESS) { if (msg->l2h[0] == IPAC_MSGT_PONG) { - bsc_del_timer(&bsc->pong_timeout); + osmo_timer_del(&bsc->pong_timeout); msgb_free(msg); return 0; } else if (msg->l2h[0] == IPAC_MSGT_PING) { @@ -1275,7 +1275,7 @@ static int ipaccess_listen_bsc_cb(struct bsc_fd *bfd, unsigned int what) */ bsc->id_timeout.data = bsc; bsc->id_timeout.cb = ipaccess_close_bsc; - bsc_schedule_timer(&bsc->id_timeout, nat->auth_timeout, 0); + osmo_timer_schedule(&bsc->id_timeout, nat->auth_timeout, 0); return 0; } @@ -1391,7 +1391,7 @@ static void sccp_close_unconfirmed(void *_data) bsc_maybe_close(bsc); out: - bsc_schedule_timer(&sccp_close, SCCP_CLOSE_TIME, 0); + osmo_timer_schedule(&sccp_close, SCCP_CLOSE_TIME, 0); } extern void *tall_msgb_ctx; @@ -1511,7 +1511,7 @@ int main(int argc, char **argv) sccp_set_log_area(DSCCP); sccp_close.cb = sccp_close_unconfirmed; sccp_close.data = NULL; - bsc_schedule_timer(&sccp_close, SCCP_CLOSE_TIME, 0); + osmo_timer_schedule(&sccp_close, SCCP_CLOSE_TIME, 0); while (1) { bsc_select_main(0); diff --git a/openbsc/src/osmo-bsc_nat/bsc_ussd.c b/openbsc/src/osmo-bsc_nat/bsc_ussd.c index 0392e9b10..5d599c734 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_ussd.c +++ b/openbsc/src/osmo-bsc_nat/bsc_ussd.c @@ -59,7 +59,7 @@ static void bsc_nat_ussd_destroy(struct bsc_nat_ussd_con *con) close(con->queue.bfd.fd); bsc_unregister_fd(&con->queue.bfd); - bsc_del_timer(&con->auth_timeout); + osmo_timer_del(&con->auth_timeout); write_queue_clear(&con->queue); talloc_free(con); } @@ -168,7 +168,7 @@ static void ussd_auth_con(struct tlv_parsed *tvp, struct bsc_nat_ussd_con *conn) bsc_nat_ussd_destroy(conn->nat->ussd_con); LOGP(DNAT, LOGL_ERROR, "USSD token specified. USSD provider is connected.\n"); - bsc_del_timer(&conn->auth_timeout); + osmo_timer_del(&conn->auth_timeout); conn->authorized = 1; conn->nat->ussd_con = conn; } @@ -179,7 +179,7 @@ static void ussd_start_auth(struct bsc_nat_ussd_con *conn) conn->auth_timeout.data = conn; conn->auth_timeout.cb = ussd_auth_cb; - bsc_schedule_timer(&conn->auth_timeout, conn->nat->auth_timeout, 0); + osmo_timer_schedule(&conn->auth_timeout, conn->nat->auth_timeout, 0); msg = msgb_alloc_headroom(4096, 128, "auth message"); if (!msg) { -- cgit v1.2.3