aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-03-18 19:21:54 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-03-18 19:21:54 +0100
commit83227e4dde874d02601e129fdb4f5bc5a95c0e20 (patch)
treec18f2c69ba9c279d1eb9e85ee66200003260ae8c
parentd93c84f96e7b7e652ac5a937c1f27df0913fca18 (diff)
link_sets: Name functions working on linksets as such
This is in preparation of having different kind of linksets, with and without MTP and be able to bridge them. This will allow us to to implement SCCPlite and M3UA.
-rw-r--r--include/bsc_data.h10
-rw-r--r--src/bsc.c2
-rw-r--r--src/links.c8
-rw-r--r--src/main.c2
-rw-r--r--src/sccp_state.c4
5 files changed, 14 insertions, 12 deletions
diff --git a/include/bsc_data.h b/include/bsc_data.h
index b1e0fbe..803b7ad 100644
--- a/include/bsc_data.h
+++ b/include/bsc_data.h
@@ -114,10 +114,12 @@ struct mtp_link_set *link_set_create(struct bsc_data *bsc);
int link_global_init(struct mtp_udp_data *data);
int link_global_bind(struct mtp_udp_data *data, int src_port);
int link_udp_init(struct mtp_udp_link *data, char *dest_ip, int port);
-int link_init(struct bsc_data *bsc, struct mtp_link_set *set);
-int link_shutdown_all(struct mtp_link_set *);
-int link_reset_all(struct mtp_link_set *);
-int link_clear_all(struct mtp_link_set *);
+
+/* link handling */
+int link_set_init_links(struct bsc_data *bsc, struct mtp_link_set *set);
+int link_set_shutdown_links(struct mtp_link_set *);
+int link_set_reset_links(struct mtp_link_set *);
+int link_set_clear_links(struct mtp_link_set *);
/* pcap */
enum {
diff --git a/src/bsc.c b/src/bsc.c
index 33cadf6..3e308bc 100644
--- a/src/bsc.c
+++ b/src/bsc.c
@@ -98,7 +98,7 @@ static void sigint()
handled = 1;
if (bsc) {
llist_for_each_entry(set, &bsc->linksets, entry)
- link_shutdown_all(set);
+ link_set_shutdown_links(set);
}
exit(0);
diff --git a/src/links.c b/src/links.c
index 1b97e58..4d3cdf0 100644
--- a/src/links.c
+++ b/src/links.c
@@ -107,7 +107,7 @@ struct mtp_link_set *link_set_create(struct bsc_data *bsc)
return set;
}
-int link_init(struct bsc_data *bsc, struct mtp_link_set *set)
+int link_set_init_links(struct bsc_data *bsc, struct mtp_link_set *set)
{
int i;
struct mtp_udp_link *lnk;
@@ -144,7 +144,7 @@ int link_init(struct bsc_data *bsc, struct mtp_link_set *set)
return 0;
}
-int link_shutdown_all(struct mtp_link_set *set)
+int link_set_shutdown_links(struct mtp_link_set *set)
{
struct mtp_link *lnk;
@@ -153,7 +153,7 @@ int link_shutdown_all(struct mtp_link_set *set)
return 0;
}
-int link_reset_all(struct mtp_link_set *set)
+int link_set_reset_links(struct mtp_link_set *set)
{
struct mtp_link *lnk;
@@ -162,7 +162,7 @@ int link_reset_all(struct mtp_link_set *set)
return 0;
}
-int link_clear_all(struct mtp_link_set *set)
+int link_set_clear_links(struct mtp_link_set *set)
{
struct mtp_link *lnk;
diff --git a/src/main.c b/src/main.c
index 5f5611b..e465253 100644
--- a/src/main.c
+++ b/src/main.c
@@ -118,7 +118,7 @@ int main(int argc, char **argv)
return rc;
/* create the links and start */
- if (link_init(bsc, set) != 0)
+ if (link_set_init_links(bsc, set) != 0)
return -1;
ss7_application_setup(app, APP_CELLMGR,
diff --git a/src/sccp_state.c b/src/sccp_state.c
index c2b3834..616167f 100644
--- a/src/sccp_state.c
+++ b/src/sccp_state.c
@@ -186,7 +186,7 @@ void app_clear_connections(struct ss7_application *app)
free_con(con);
}
- link_clear_all(app->route_src.set);
+ link_set_clear_links(app->route_src.set);
}
void app_resources_released(struct ss7_application *app)
@@ -205,7 +205,7 @@ static void bsc_reset_timeout(void *_app)
LOGP(DINP, LOGL_ERROR, "The BSC did not answer the GSM08.08 reset. Restart MTP\n");
mtp_link_set_stop(app->route_src.set);
app_clear_connections(app);
- link_reset_all(app->route_src.set);
+ link_set_reset_links(app->route_src.set);
app_resources_released(app);
return;
}