aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2011-05-06 12:11:06 +0200
committerPablo Neira Ayuso <pablo@gnumonks.org>2011-05-06 12:11:06 +0200
commitbf540cb7c3e8fbcb6bd978cc3876340812dbf142 (patch)
tree97ef8c98516a99b217a9a64e16bbe5c295da0c7a /openbsc/src/osmo-bsc
parent286ba0e68f0317c7e1d3d905101a1bc68a59d15f (diff)
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
Diffstat (limited to 'openbsc/src/osmo-bsc')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_msc.c10
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_rf.c16
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_sccp.c12
3 files changed, 19 insertions, 19 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_msc.c b/openbsc/src/osmo-bsc/osmo_bsc_msc.c
index 66d18c8a9..e1a95a89a 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_msc.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_msc.c
@@ -239,7 +239,7 @@ static int ipaccess_a_fd_cb(struct bsc_fd *bfd)
else if (msg->l2h[0] == IPAC_MSGT_ID_GET) {
send_id_get_response(data, bfd->fd);
} else if (msg->l2h[0] == IPAC_MSGT_PONG) {
- bsc_del_timer(&data->pong_timer);
+ osmo_timer_del(&data->pong_timer);
}
} else if (hh->proto == IPAC_PROTO_SCCP) {
sccp_system_incoming(msg);
@@ -278,10 +278,10 @@ static void msc_ping_timeout_cb(void *_data)
send_ping(data);
/* send another ping in 20 seconds */
- bsc_schedule_timer(&data->ping_timer, data->ping_timeout, 0);
+ osmo_timer_schedule(&data->ping_timer, data->ping_timeout, 0);
/* also start a pong timer */
- bsc_schedule_timer(&data->pong_timer, data->pong_timeout, 0);
+ osmo_timer_schedule(&data->pong_timer, data->pong_timeout, 0);
}
static void msc_pong_timeout_cb(void *_data)
@@ -321,8 +321,8 @@ static void msc_connection_was_lost(struct bsc_msc_connection *msc)
LOGP(DMSC, LOGL_ERROR, "Lost MSC connection. Freing stuff.\n");
data = (struct osmo_msc_data *) msc->write_queue.bfd.data;
- bsc_del_timer(&data->ping_timer);
- bsc_del_timer(&data->pong_timer);
+ osmo_timer_del(&data->ping_timer);
+ osmo_timer_del(&data->pong_timer);
sig.data = data;
dispatch_signal(SS_MSC, S_MSC_LOST, &sig);
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_rf.c b/openbsc/src/osmo-bsc/osmo_bsc_rf.c
index 436474c0a..8df03069f 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_rf.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_rf.c
@@ -160,7 +160,7 @@ static int enter_grace(struct osmo_bsc_rf *rf)
{
rf->grace_timeout.cb = grace_timeout;
rf->grace_timeout.data = rf;
- bsc_schedule_timer(&rf->grace_timeout, rf->gsm_network->msc_data->mid_call_timeout, 0);
+ osmo_timer_schedule(&rf->grace_timeout, rf->gsm_network->msc_data->mid_call_timeout, 0);
LOGP(DINP, LOGL_NOTICE, "Going to switch RF off in %d seconds.\n",
rf->gsm_network->msc_data->mid_call_timeout);
@@ -175,20 +175,20 @@ static void rf_delay_cmd_cb(void *data)
switch (rf->last_request) {
case RF_CMD_D_OFF:
rf->last_state_command = "RF Direct Off";
- bsc_del_timer(&rf->rf_check);
- bsc_del_timer(&rf->grace_timeout);
+ osmo_timer_del(&rf->rf_check);
+ osmo_timer_del(&rf->grace_timeout);
switch_rf_off(rf);
break;
case RF_CMD_ON:
rf->last_state_command = "RF Direct On";
- bsc_del_timer(&rf->grace_timeout);
+ osmo_timer_del(&rf->grace_timeout);
lock_each_trx(rf->gsm_network, 0);
send_signal(rf, S_RF_ON);
- bsc_schedule_timer(&rf->rf_check, 3, 0);
+ osmo_timer_schedule(&rf->rf_check, 3, 0);
break;
case RF_CMD_OFF:
rf->last_state_command = "RF Scheduled Off";
- bsc_del_timer(&rf->rf_check);
+ osmo_timer_del(&rf->rf_check);
enter_grace(rf);
break;
}
@@ -218,8 +218,8 @@ static int rf_read_cmd(struct bsc_fd *fd)
case RF_CMD_ON:
case RF_CMD_OFF:
conn->rf->last_request = buf[0];
- if (!bsc_timer_pending(&conn->rf->delay_cmd))
- bsc_schedule_timer(&conn->rf->delay_cmd, 1, 0);
+ if (!osmo_timer_pending(&conn->rf->delay_cmd))
+ osmo_timer_schedule(&conn->rf->delay_cmd, 1, 0);
break;
default:
conn->rf->last_state_command = "Unknown command";
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
index 718f3054e..099552b6f 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
@@ -95,8 +95,8 @@ static void msc_outgoing_sccp_state(struct sccp_connection *conn, int old_state)
LOGP(DMSC, LOGL_DEBUG, "Connection established: %p\n", conn);
con_data = (struct osmo_bsc_sccp_con *) conn->data_ctx;
- bsc_del_timer(&con_data->sccp_cc_timeout);
- bsc_schedule_timer(&con_data->sccp_it_timeout, SCCP_IT_TIMER, 0);
+ osmo_timer_del(&con_data->sccp_cc_timeout);
+ osmo_timer_schedule(&con_data->sccp_it_timeout, SCCP_IT_TIMER, 0);
send_queued(con_data);
}
@@ -122,7 +122,7 @@ static void sccp_it_timeout(void *_data)
(struct osmo_bsc_sccp_con *) _data;
sccp_connection_send_it(data->sccp);
- bsc_schedule_timer(&data->sccp_it_timeout, SCCP_IT_TIMER, 0);
+ osmo_timer_schedule(&data->sccp_it_timeout, SCCP_IT_TIMER, 0);
}
static void sccp_cc_timeout(void *_data)
@@ -231,7 +231,7 @@ int bsc_create_new_connection(struct gsm_subscriber_connection *conn)
int bsc_open_connection(struct osmo_bsc_sccp_con *conn, struct msgb *msg)
{
- bsc_schedule_timer(&conn->sccp_cc_timeout, 10, 0);
+ osmo_timer_schedule(&conn->sccp_cc_timeout, 10, 0);
sccp_connection_connect(conn->sccp, &sccp_ssn_bssap, msg);
msgb_free(msg);
return 0;
@@ -246,8 +246,8 @@ int bsc_delete_connection(struct osmo_bsc_sccp_con *sccp)
LOGP(DMSC, LOGL_ERROR, "Should have been cleared.\n");
llist_del(&sccp->entry);
- bsc_del_timer(&sccp->sccp_it_timeout);
- bsc_del_timer(&sccp->sccp_cc_timeout);
+ osmo_timer_del(&sccp->sccp_it_timeout);
+ osmo_timer_del(&sccp->sccp_cc_timeout);
talloc_free(sccp);
return 0;
}