silent_call: Use the gsm_subscriber_connection instead of lchan->conn
This commit is contained in:
parent
1afbd76155
commit
758f4dfa17
|
@ -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 */
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue