bsc_api: Use gsm_subscriber_connection in rrlp.c
diff --git a/openbsc/include/openbsc/gsm_04_08.h b/openbsc/include/openbsc/gsm_04_08.h
index 9671555..11bca54 100644
--- a/openbsc/include/openbsc/gsm_04_08.h
+++ b/openbsc/include/openbsc/gsm_04_08.h
@@ -35,7 +35,7 @@
 int gsm48_tx_mm_auth_rej(struct gsm_subscriber_connection *conn);
 int gsm48_send_rr_release(struct gsm_lchan *lchan);
 int gsm48_send_rr_ciph_mode(struct gsm_lchan *lchan, int want_imeisv);
-int gsm48_send_rr_app_info(struct gsm_lchan *lchan, u_int8_t apdu_id,
+int gsm48_send_rr_app_info(struct gsm_subscriber_connection *conn, u_int8_t apdu_id,
 			   u_int8_t apdu_len, const u_int8_t *apdu);
 int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, u_int8_t power_class);
 int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan,
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index 0de10cc..f6a44e0 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -1213,13 +1213,13 @@
 	return rc;
 }
 
-int gsm48_send_rr_app_info(struct gsm_lchan *lchan, u_int8_t apdu_id,
+int gsm48_send_rr_app_info(struct gsm_subscriber_connection *conn, u_int8_t apdu_id,
 			   u_int8_t apdu_len, const u_int8_t *apdu)
 {
 	struct msgb *msg = gsm48_msgb_alloc();
 	struct gsm48_hdr *gh;
 
-	msg->lchan = lchan;
+	msg->lchan = conn->lchan;
 	
 	DEBUGP(DRR, "TX APPLICATION INFO id=0x%02x, len=%u\n",
 		apdu_id, apdu_len);
@@ -1231,7 +1231,7 @@
 	gh->data[1] = apdu_len;
 	memcpy(gh->data+2, apdu, apdu_len);
 
-	return gsm48_conn_sendmsg(msg, &lchan->conn, NULL);
+	return gsm48_conn_sendmsg(msg, conn, NULL);
 }
 
 /* Call Control */
diff --git a/openbsc/src/rrlp.c b/openbsc/src/rrlp.c
index c3b1dbc..b5c7daf 100644
--- a/openbsc/src/rrlp.c
+++ b/openbsc/src/rrlp.c
@@ -40,9 +40,9 @@
 	Accuracy=60, Method=gpsOrEOTD, ResponseTime=5, multipleSets */
 static const u_int8_t ass_pref_pos_req[] = { 0x40, 0x03, 0x79, 0x50 };
 
-static int send_rrlp_req(struct gsm_lchan *lchan)
+static int send_rrlp_req(struct gsm_subscriber_connection *conn)
 {
-	struct gsm_network *net = lchan->ts->trx->bts->network;
+	struct gsm_network *net = conn->bts->network;
 	const u_int8_t *req;
 
 	switch (net->rrlp.mode) {
@@ -60,7 +60,7 @@
 		return 0;
 	}
 
-	return gsm48_send_rr_app_info(lchan, 0x00,
+	return gsm48_send_rr_app_info(conn, 0x00,
 				      sizeof(ms_based_pos_req), req);
 }
 
@@ -77,7 +77,7 @@
 		conn = connection_for_subscr(subscr);
 		if (!conn)
 			break;
-		send_rrlp_req(&conn->lchan);
+		send_rrlp_req(conn);
 		break;
 	}
 	return 0;
@@ -91,7 +91,7 @@
 	switch (signal) {
 	case S_PAGING_SUCCEEDED:
 		/* A subscriber has attached. */
-		send_rrlp_req(psig_data->lchan);
+		send_rrlp_req(&psig_data->lchan->conn);
 		break;
 	case S_PAGING_EXPIRED:
 		break;