bsc: Point back from struct osmo_msc_data to struct gsm_network
diff --git a/openbsc/include/openbsc/osmo_msc_data.h b/openbsc/include/openbsc/osmo_msc_data.h
index 6f437b7..a35e6f2 100644
--- a/openbsc/include/openbsc/osmo_msc_data.h
+++ b/openbsc/include/openbsc/osmo_msc_data.h
@@ -36,6 +36,9 @@
};
struct osmo_msc_data {
+ /* Back pointer */
+ struct gsm_network *network;
+
/* Connection data */
char *bsc_token;
int msc_port;
diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c
index 081605f..fa75654 100644
--- a/openbsc/src/libcommon/gsm_data.c
+++ b/openbsc/src/libcommon/gsm_data.c
@@ -267,6 +267,9 @@
return NULL;
}
+ /* Init back pointer */
+ net->msc_data->network = net;
+
net->country_code = country_code;
net->network_code = network_code;
net->num_bts = 0;