fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/42584?usp=email )

Change subject: bssap: mark some pointers as const
......................................................................

bssap: mark some pointers as const

Change-Id: Iebb28d6ae0b468545994669248a442dd17f36d4c
---
M include/osmocom/bsc/vgcs_fsm.h
M src/osmo-bsc/osmo_bsc_bssap.c
2 files changed, 33 insertions(+), 18 deletions(-)

Approvals:
  jolly: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved
  laforge: Looks good to me, but someone else must approve
  Jenkins Builder: Verified




diff --git a/include/osmocom/bsc/vgcs_fsm.h b/include/osmocom/bsc/vgcs_fsm.h
index 80ea21f..57acae0 100644
--- a/include/osmocom/bsc/vgcs_fsm.h
+++ b/include/osmocom/bsc/vgcs_fsm.h
@@ -104,9 +104,12 @@
 int vgcs_vbs_chan_start(struct gsm_subscriber_connection *conn, struct msgb 
*msg);
 int vgcs_vbs_call_start(struct gsm_subscriber_connection *conn, struct msgb 
*msg);

-int bssmap_handle_ass_req_ct_speech(struct gsm_subscriber_connection *conn, 
struct gsm_bts *bts,
-                                   struct tlv_parsed *tp, struct 
gsm0808_channel_type *ct,
-                                   struct assignment_request *req, uint8_t 
*cause);
+int bssmap_handle_ass_req_ct_speech(struct gsm_subscriber_connection *conn,
+                                   struct gsm_bts *bts,
+                                   const struct tlv_parsed *tp,
+                                   const struct gsm0808_channel_type *ct,
+                                   struct assignment_request *req,
+                                   uint8_t *cause);
 void bsc_tx_setup_ack(struct gsm_subscriber_connection *conn, struct 
gsm0808_vgcs_feature_flags *ff);
 void bsc_tx_setup_refuse(struct gsm_subscriber_connection *conn, uint8_t 
cause);
 void bsc_tx_vgcs_vbs_assignment_result(struct gsm_subscriber_connection *conn, 
struct gsm0808_channel_type *ct,
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 395fa49..7a9688d 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -684,7 +684,8 @@
  * lchan is requested. The preferred lchan will be requested first. If we
  * find an alternate setting here, this one will be tried secondly if our
  * primary choice fails. */
-static int select_data_rates(struct assignment_request *req, struct 
gsm0808_channel_type *ct,
+static int select_data_rates(struct assignment_request *req,
+                            const struct gsm0808_channel_type *ct,
                             struct gsm_subscriber_connection *conn)
 {
        int rc, i, nc = 0;
@@ -815,7 +816,8 @@
        return 0;
 }

-static int select_sign_chan(struct assignment_request *req, struct 
gsm0808_channel_type *ct)
+static int select_sign_chan(struct assignment_request *req,
+                           const struct gsm0808_channel_type *ct)
 {
        int i, nc = 0;

@@ -864,7 +866,8 @@
        return nc > 0 ? 0 : -EINVAL;
 }

-static int bssmap_handle_ass_req_tp_cic(struct tlv_parsed *tp, bool aoip, 
uint16_t *cic, uint8_t *cause)
+static int bssmap_handle_ass_req_tp_cic(const struct tlv_parsed *tp,
+                                       bool aoip, uint16_t *cic, uint8_t 
*cause)
 {
        if (TLVP_PRESENT(tp, GSM0808_IE_CIRCUIT_IDENTITY_CODE)) {
                /* CIC is permitted in both AoIP and SCCPlite */
@@ -882,7 +885,7 @@
        return 0;
 }

-static int bssmap_handle_ass_req_tp_rtp_addr(struct tlv_parsed *tp, bool aoip, 
char *msc_rtp_addr,
+static int bssmap_handle_ass_req_tp_rtp_addr(const struct tlv_parsed *tp, bool 
aoip, char *msc_rtp_addr,
                                             size_t msc_rtp_addr_len, uint16_t 
*msc_rtp_port, uint8_t *cause)
 {
        struct sockaddr_storage rtp_addr;
@@ -927,7 +930,8 @@
        return 0;
 }

-static int bssmap_handle_ass_req_tp_osmux(struct gsm_subscriber_connection 
*conn, struct tlv_parsed *tp,
+static int bssmap_handle_ass_req_tp_osmux(struct gsm_subscriber_connection 
*conn,
+                                         const struct tlv_parsed *tp,
                                          bool *use_osmux, uint8_t *osmux_cid, 
uint8_t *cause)
 {
        int rc;
@@ -963,8 +967,9 @@
        return 0;
 }

-static int bssmap_handle_ass_req_tp_codec_list(struct 
gsm_subscriber_connection *conn, struct tlv_parsed *tp, bool aoip,
-                                              uint8_t *cause)
+static int bssmap_handle_ass_req_tp_codec_list(struct 
gsm_subscriber_connection *conn,
+                                              const struct tlv_parsed *tp,
+                                              bool aoip, uint8_t *cause)
 {
        int rc;

@@ -993,7 +998,7 @@
        return 0;
 }

-static int bssmap_handle_ass_req_tp_rtp_ext(struct tlv_parsed *tp,
+static int bssmap_handle_ass_req_tp_rtp_ext(const struct tlv_parsed *tp,
                                            struct assignment_request *req,
                                            uint8_t *cause)
 {
@@ -1013,8 +1018,10 @@
        return 0;
 }

-static int bssmap_handle_ass_req_ct_data(struct gsm_subscriber_connection 
*conn, struct tlv_parsed *tp,
-                                        struct gsm0808_channel_type *ct, 
struct assignment_request *req,
+static int bssmap_handle_ass_req_ct_data(struct gsm_subscriber_connection 
*conn,
+                                        const struct tlv_parsed *tp,
+                                        const struct gsm0808_channel_type *ct,
+                                        struct assignment_request *req,
                                         uint8_t *cause)
 {
        bool aoip = gscon_is_aoip(conn);
@@ -1045,9 +1052,12 @@
        return 0;
 }

-int bssmap_handle_ass_req_ct_speech(struct gsm_subscriber_connection *conn, 
struct gsm_bts *bts,
-                                   struct tlv_parsed *tp, struct 
gsm0808_channel_type *ct,
-                                   struct assignment_request *req, uint8_t 
*cause)
+int bssmap_handle_ass_req_ct_speech(struct gsm_subscriber_connection *conn,
+                                   struct gsm_bts *bts,
+                                   const struct tlv_parsed *tp,
+                                   const struct gsm0808_channel_type *ct,
+                                   struct assignment_request *req,
+                                   uint8_t *cause)
 {
        bool aoip = gscon_is_aoip(conn);
        int rc;
@@ -1084,8 +1094,10 @@
        return 0;
 }

-static int bssmap_handle_ass_req_ct_sign(struct gsm_subscriber_connection 
*conn, struct gsm0808_channel_type *ct,
-                                        struct assignment_request *req, 
uint8_t *cause)
+static int bssmap_handle_ass_req_ct_sign(struct gsm_subscriber_connection 
*conn,
+                                        const struct gsm0808_channel_type *ct,
+                                        struct assignment_request *req,
+                                        uint8_t *cause)
 {
        int rc;


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42584?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iebb28d6ae0b468545994669248a442dd17f36d4c
Gerrit-Change-Number: 42584
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: jolly <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>

Reply via email to