summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso2011-07-05 15:29:23 +0200
committerPablo Neira Ayuso2011-07-05 15:29:23 +0200
commitdbd82fb5b1e0fc180a680094b80d6799bd28725a (patch)
tree8c0c3025f38ec51ed1096d33fc033afa3276600e
parente1_input: change prototype of close hook in e1inp_driver (diff)
downloadlibosmo-abis-dbd82fb5b1e0fc180a680094b80d6799bd28725a.tar.gz
libosmo-abis-dbd82fb5b1e0fc180a680094b80d6799bd28725a.tar.xz
libosmo-abis-dbd82fb5b1e0fc180a680094b80d6799bd28725a.zip
e1_input: change prototype of ->sign_link(...)
This patch removes the struct e1inp_sign_link parameter since this is already available in the msgb->dst field of the message.
-rw-r--r--include/osmocom/abis/e1_input.h2
-rw-r--r--src/e1_input.c3
-rw-r--r--src/input/hsl.c2
-rw-r--r--src/input/ipaccess.c4
-rw-r--r--tests/e1inp_ipa_bsc_test.c2
-rw-r--r--tests/e1inp_ipa_bts_test.c2
6 files changed, 8 insertions, 7 deletions
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h
index 312e781..4339e05 100644
--- a/include/osmocom/abis/e1_input.h
+++ b/include/osmocom/abis/e1_input.h
@@ -127,7 +127,7 @@ struct e1inp_line_ops {
struct e1inp_sign_link * (*sign_link_up)(void *unit_info, struct e1inp_line *line, enum e1inp_sign_type type);
void (*sign_link_down)(struct e1inp_line *line);
- int (*sign_link)(struct msgb *msg, struct e1inp_sign_link *link);
+ int (*sign_link)(struct msgb *msg);
};
struct e1inp_line {
diff --git a/src/e1_input.c b/src/e1_input.c
index 77a6b3c..c83dc04 100644
--- a/src/e1_input.c
+++ b/src/e1_input.c
@@ -457,7 +457,8 @@ int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg,
"no action set for signalling messages.\n");
return -ENOENT;
}
- ts->line->ops->sign_link(msg, link);
+ msg->dst = link;
+ ts->line->ops->sign_link(msg);
break;
case E1INP_TS_TYPE_TRAU:
ret = subch_demux_in(&ts->trau.demux, msg->l2h, msgb_l2len(msg));
diff --git a/src/input/hsl.c b/src/input/hsl.c
index aa79cdf..d8eb8db 100644
--- a/src/input/hsl.c
+++ b/src/input/hsl.c
@@ -186,7 +186,7 @@ static int handle_ts1_read(struct osmo_fd *bfd)
"no action set for signalling messages.\n");
return -ENOENT;
}
- e1i_ts->line->ops->sign_link(msg, link);
+ e1i_ts->line->ops->sign_link(msg);
return ret;
}
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 0192b2b..ec4b231 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -386,7 +386,7 @@ static int handle_ts1_read(struct osmo_fd *bfd)
"no action set for signalling messages.\n");
return -ENOENT;
}
- e1i_ts->line->ops->sign_link(msg, link);
+ e1i_ts->line->ops->sign_link(msg);
return ret;
}
@@ -782,7 +782,7 @@ static int ipaccess_bts_cb(struct ipa_client_link *link, struct msgb *msg)
"no action set for signalling messages.\n");
return -ENOENT;
}
- link->line->ops->sign_link(msg, sign_link);
+ link->line->ops->sign_link(msg);
return 0;
}
diff --git a/tests/e1inp_ipa_bsc_test.c b/tests/e1inp_ipa_bsc_test.c
index a65b375..0d04d59 100644
--- a/tests/e1inp_ipa_bsc_test.c
+++ b/tests/e1inp_ipa_bsc_test.c
@@ -55,7 +55,7 @@ static void sign_link_down(struct e1inp_line *line)
e1inp_sign_link_destroy(rsl_sign_link);
}
-static int sign_link(struct msgb *msg, struct e1inp_sign_link *link)
+static int sign_link(struct msgb *msg)
{
LOGP(DBSCTEST, LOGL_NOTICE, "OML/RSL message received.\n");
return 0;
diff --git a/tests/e1inp_ipa_bts_test.c b/tests/e1inp_ipa_bts_test.c
index 8ba49c5..bd67a83 100644
--- a/tests/e1inp_ipa_bts_test.c
+++ b/tests/e1inp_ipa_bts_test.c
@@ -77,7 +77,7 @@ static void sign_link_down(struct e1inp_line *line)
e1inp_sign_link_destroy(rsl_sign_link);
}
-static int sign_link(struct msgb *msg, struct e1inp_sign_link *link)
+static int sign_link(struct msgb *msg)
{
LOGP(DBTSTEST, LOGL_NOTICE, "OML/RSL message received.\n");
return 0;