aboutsummaryrefslogtreecommitdiffstats
path: root/src/isup.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-03-19 08:02:25 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-03-19 08:04:28 +0100
commit2a2b2a5f6dfcfbc41e4e1ab24b7d5bd5901b4d02 (patch)
tree8ba7177363a784c57b36c7844d7b8c2ac715aa99 /src/isup.c
parent3c0d6b3f6253d57a5e3a7045b0ac6d49fbe3f9e9 (diff)
link_sets: Remove direct function calls for data/up/down from MTP3
We want to support different link_sets types. To do this we will need to reduce the coupling of mtp_link_set with the application. This is the first step to remove the notifications. This comes with a performance cost but it has not been measured. In the long run the conditions for if (set->on_bla) should be removed as this indicates a wrong configuration of the linkset.
Diffstat (limited to 'src/isup.c')
-rw-r--r--src/isup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/isup.c b/src/isup.c
index 2827f21..f9ea0ae 100644
--- a/src/isup.c
+++ b/src/isup.c
@@ -229,7 +229,8 @@ int mtp_link_set_isup(struct mtp_link_set *set, struct msgb *msg, int sls)
}
if (set->pass_all_isup) {
- mtp_link_set_forward_isup(set, msg, sls);
+ if (set->on_isup)
+ set->on_isup(set, msg, sls);
return 0;
}
@@ -256,7 +257,8 @@ int mtp_link_set_isup(struct mtp_link_set *set, struct msgb *msg, int sls)
rc = handle_simple_resp(set, sls, hdr->cic, ISUP_MSG_RLC);
break;
default:
- mtp_link_set_forward_isup(set, msg, sls);
+ if (set->on_isup)
+ set->on_isup(set, msg, sls);
rc = 0;
break;
}