diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-21 10:34:03 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-21 16:40:09 +0800 |
commit | 758f4dfa17f57ff4f1be98b47f5282471d83f592 (patch) | |
tree | 27f26c4308a91c96db1b689b36bb5ab514a18bf8 | |
parent | 1afbd76155ca72b215f41f4870e5cdf91afd8f3c (diff) |
silent_call: Use the gsm_subscriber_connection instead of lchan->conn
-rw-r--r-- | openbsc/include/openbsc/silent_call.h | 6 | ||||
-rw-r--r-- | openbsc/src/gsm_04_08.c | 4 | ||||
-rw-r--r-- | openbsc/src/silent_call.c | 6 |
3 files changed, 9 insertions, 7 deletions
diff --git a/openbsc/include/openbsc/silent_call.h b/openbsc/include/openbsc/silent_call.h index fefc5182d..2492903c2 100644 --- a/openbsc/include/openbsc/silent_call.h +++ b/openbsc/include/openbsc/silent_call.h @@ -1,10 +1,12 @@ #ifndef _SILENT_CALL_H #define _SILENT_CALL_H +struct gsm_subscriber_connection; + extern int gsm_silent_call_start(struct gsm_subscriber *subscr, void *data, int type); extern int gsm_silent_call_stop(struct gsm_subscriber *subscr); -extern int silent_call_rx(struct msgb *msg); -extern int silent_call_reroute(struct msgb *msg); +extern int silent_call_rx(struct gsm_subscriber_connection *conn, struct msgb *msg); +extern int silent_call_reroute(struct gsm_subscriber_connection *conn, struct msgb *msg); #endif /* _SILENT_CALL_H */ diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c index e76a63a5a..520eed0b5 100644 --- a/openbsc/src/gsm_04_08.c +++ b/openbsc/src/gsm_04_08.c @@ -3090,8 +3090,8 @@ int gsm0408_dispatch(struct gsm_subscriber_connection *conn, struct msgb *msg) u_int8_t pdisc = gh->proto_discr & 0x0f; int rc = 0; - if (silent_call_reroute(msg)) - return silent_call_rx(msg); + if (silent_call_reroute(conn, msg)) + return silent_call_rx(conn, msg); switch (pdisc) { case GSM48_PDISC_CC: diff --git a/openbsc/src/silent_call.c b/openbsc/src/silent_call.c index 0471bff3a..397a3e4b9 100644 --- a/openbsc/src/silent_call.c +++ b/openbsc/src/silent_call.c @@ -72,7 +72,7 @@ static int paging_cb_silent(unsigned int hooknum, unsigned int event, } /* receive a layer 3 message from a silent call */ -int silent_call_rx(struct msgb *msg) +int silent_call_rx(struct gsm_subscriber_connection *conn, struct msgb *msg) { /* FIXME: do something like sending it through a UDP port */ return 0; @@ -90,14 +90,14 @@ static const struct msg_match silent_call_accept[] = { }; /* decide if we need to reroute a message as part of a silent call */ -int silent_call_reroute(struct msgb *msg) +int silent_call_reroute(struct gsm_subscriber_connection *conn, struct msgb *msg) { struct gsm48_hdr *gh = msgb_l3(msg); u_int8_t pdisc = gh->proto_discr & 0x0f; int i; /* if we're not part of a silent call, never reroute */ - if (!msg->lchan->conn.silent_call) + if (!conn->silent_call) return 0; /* check if we are a special message that is handled in openbsc */ |