[PATCH] osmo-bsc[master]: bsc_test.c: Use proper network/bts/lchan structures

2017-12-22 Thread Harald Welte
Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/5509

to look at the new patch set (#7).

bsc_test.c: Use proper network/bts/lchan structures

don't mock them, simply call the respective functions to get
a gsm_network and a gsm_bts with all its subordinate members.

Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce
---
M tests/bsc/bsc_test.c
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/09/5509/7

diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c
index 1d7baa1..1fb51aa 100644
--- a/tests/bsc/bsc_test.c
+++ b/tests/bsc/bsc_test.c
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -121,14 +122,12 @@
 {
int i;
 
-   struct gsm_network *net;
-   struct gsm_bts *bts;
+   struct gsm_network *net = bsc_network_init(NULL, 1, 1);
+   struct gsm_bts *bts = gsm_bts_alloc(net, 0);
struct osmo_bsc_sccp_con *sccp_con;
struct bsc_msc_data *msc;
struct gsm_subscriber_connection *conn;
 
-   net = talloc_zero(NULL, struct gsm_network);
-   bts = talloc_zero(net, struct gsm_bts);
sccp_con = talloc_zero(net, struct osmo_bsc_sccp_con);
msc = talloc_zero(net, struct bsc_msc_data);
conn = talloc_zero(net, struct gsm_subscriber_connection);
@@ -137,6 +136,7 @@
sccp_con->msc = msc;
conn->bts = bts;
conn->sccp_con = sccp_con;
+   conn->lchan = >c0->ts[1].lchan[0];
 
/* start testing with proper messages */
printf("Testing BTS<->MSC message scan.\n");

-- 
To view, visit https://gerrit.osmocom.org/5509
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce
Gerrit-PatchSet: 7
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-bsc[master]: bsc_test.c: Use proper network/bts/lchan structures

2017-12-19 Thread Harald Welte

bsc_test.c: Use proper network/bts/lchan structures

don't mock them, simply call the respective functions to get
a gsm_network and a gsm_bts with all its subordinate members.

Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce
---
M tests/bsc/bsc_test.c
1 file changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/09/5509/2

diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c
index 1d7baa1..420ef73 100644
--- a/tests/bsc/bsc_test.c
+++ b/tests/bsc/bsc_test.c
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -121,22 +122,20 @@
 {
int i;
 
-   struct gsm_network *net;
-   struct gsm_bts *bts;
+   struct gsm_network *net = bsc_network_init(NULL, 1, 1);
+   struct gsm_bts *bts = gsm_bts_alloc(net, 0);
struct osmo_bsc_sccp_con *sccp_con;
struct bsc_msc_data *msc;
struct gsm_subscriber_connection *conn;
 
-   net = talloc_zero(NULL, struct gsm_network);
-   bts = talloc_zero(net, struct gsm_bts);
sccp_con = talloc_zero(net, struct osmo_bsc_sccp_con);
msc = talloc_zero(net, struct bsc_msc_data);
conn = talloc_zero(net, struct gsm_subscriber_connection);
 
bts->network = net;
sccp_con->msc = msc;
-   conn->bts = bts;
conn->sccp_con = sccp_con;
+   conn->lchan = >c0->ts[1].lchan[0];
 
/* start testing with proper messages */
printf("Testing BTS<->MSC message scan.\n");

-- 
To view, visit https://gerrit.osmocom.org/5509
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-bsc[master]: bsc_test.c: Use proper network/bts/lchan structures

2017-12-19 Thread Harald Welte

Review at  https://gerrit.osmocom.org/5509

bsc_test.c: Use proper network/bts/lchan structures

don't mock them, simply call the respective functions to get
a gsm_network and a gsm_bts with all its subordinate members.

Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce
---
M tests/bsc/bsc_test.c
1 file changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/09/5509/1

diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c
index 1d7baa1..420ef73 100644
--- a/tests/bsc/bsc_test.c
+++ b/tests/bsc/bsc_test.c
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -121,22 +122,20 @@
 {
int i;
 
-   struct gsm_network *net;
-   struct gsm_bts *bts;
+   struct gsm_network *net = bsc_network_init(NULL, 1, 1);
+   struct gsm_bts *bts = gsm_bts_alloc(net, 0);
struct osmo_bsc_sccp_con *sccp_con;
struct bsc_msc_data *msc;
struct gsm_subscriber_connection *conn;
 
-   net = talloc_zero(NULL, struct gsm_network);
-   bts = talloc_zero(net, struct gsm_bts);
sccp_con = talloc_zero(net, struct osmo_bsc_sccp_con);
msc = talloc_zero(net, struct bsc_msc_data);
conn = talloc_zero(net, struct gsm_subscriber_connection);
 
bts->network = net;
sccp_con->msc = msc;
-   conn->bts = bts;
conn->sccp_con = sccp_con;
+   conn->lchan = >c0->ts[1].lchan[0];
 
/* start testing with proper messages */
printf("Testing BTS<->MSC message scan.\n");

-- 
To view, visit https://gerrit.osmocom.org/5509
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte