diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-17 17:35:57 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-17 17:35:57 +0800 |
commit | d42c3f25a683ab64b957b713ad930244a04b372c (patch) | |
tree | b31fdf358f55c1b18be24d40010460f69ed0df21 /openbsc/src/gsm_04_80.c | |
parent | 3f122bed1e3b4b8da367751468eed5e48126c8da (diff) |
bsc_api: Remove the lchan from the USSD code...
Diffstat (limited to 'openbsc/src/gsm_04_80.c')
-rw-r--r-- | openbsc/src/gsm_04_80.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/openbsc/src/gsm_04_80.c b/openbsc/src/gsm_04_80.c index 7d6679b75..e5f05f30c 100644 --- a/openbsc/src/gsm_04_80.c +++ b/openbsc/src/gsm_04_80.c @@ -246,8 +246,9 @@ static int parse_process_uss_req(u_int8_t *uss_req_data, u_int8_t length, } /* Send response to a mobile-originated ProcessUnstructuredSS-Request */ -int gsm0480_send_ussd_response(const struct msgb *in_msg, const char *response_text, - const struct ussd_request *req) +int gsm0480_send_ussd_response(struct gsm_subscriber_connection *conn, + const struct msgb *in_msg, const char *response_text, + const struct ussd_request *req) { struct msgb *msg = gsm48_msgb_alloc(); struct gsm48_hdr *gh; @@ -258,8 +259,6 @@ int gsm0480_send_ussd_response(const struct msgb *in_msg, const char *response_t if (((strlen(response_text) * 7) % 8) != 0) response_len += 1; - msg->lchan = in_msg->lchan; - /* First put the payload text into the message */ ptr8 = msgb_put(msg, response_len); gsm_7bit_encode(ptr8, response_text); @@ -295,17 +294,16 @@ int gsm0480_send_ussd_response(const struct msgb *in_msg, const char *response_t | (1<<7); /* TI direction = 1 */ gh->msg_type = GSM0480_MTYPE_RELEASE_COMPLETE; - return gsm0808_submit_dtap(&msg->lchan->conn, msg, 0); + return gsm0808_submit_dtap(conn, msg, 0); } -int gsm0480_send_ussd_reject(const struct msgb *in_msg, - const struct ussd_request *req) +int gsm0480_send_ussd_reject(struct gsm_subscriber_connection *conn, + const struct msgb *in_msg, + const struct ussd_request *req) { struct msgb *msg = gsm48_msgb_alloc(); struct gsm48_hdr *gh; - msg->lchan = in_msg->lchan; - /* First insert the problem code */ msgb_push_TLV1(msg, GSM_0480_PROBLEM_CODE_TAG_GENERAL, GSM_0480_GEN_PROB_CODE_UNRECOGNISED); @@ -325,5 +323,5 @@ int gsm0480_send_ussd_reject(const struct msgb *in_msg, gh->proto_discr |= req->transaction_id | (1<<7); /* TI direction = 1 */ gh->msg_type = GSM0480_MTYPE_RELEASE_COMPLETE; - return gsm0808_submit_dtap(&msg->lchan->conn, msg, 0); + return gsm0808_submit_dtap(conn, msg, 0); } |