Change in osmo-mgw[master]: sdp: remove unused alt_codec field from struct mgcp_rtp_end

2018-05-24 Thread dexter
dexter has posted comments on this change. ( https://gerrit.osmocom.org/9234 )

Change subject: sdp: remove unused alt_codec field from struct mgcp_rtp_end
..


Patch Set 1:

(1 comment)

> (1 comment)
 >
 > patch looks good, just not sure about the semantics. what was the
 > alt-codec intended for and why don't we use it after all?

I have no Idea what this alt_codec was about. When I get the things right then 
one could negotiate multiple codecs via SDP and then just use them. So 
basically we deal with multiple alternative codecs which we may switch 
afterwards and by the standard it may be definitely more than one alternative 
codec, thats why I do not get why there is only
a single alt codec and not multiple ones.

https://gerrit.osmocom.org/#/c/9234/1//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/9234/1//COMMIT_MSG@11
PS1, Line 11: - remove unused alt_codec field
> oh so there's a scheme behind repeating the same statements
Unfortunately yes. Every commit has a title, an explaination and a bullet point 
summary. I am not sure if this is right or so. We do not have official rules 
for this, right?



--
To view, visit https://gerrit.osmocom.org/9234
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5ff2899e3e61f33eb86f284b50ad8a94a949ed16
Gerrit-Change-Number: 9234
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: dexter 
Gerrit-Comment-Date: Thu, 24 May 2018 07:34:58 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-mgw[master]: vty: clean up rtp port-range command

2018-05-24 Thread dexter
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/9260

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

Change subject: vty: clean up rtp port-range command
..

vty: clean up rtp port-range command

The VTY command that sets the RTP port range does not check if the data
entered by the user actually makes sens. Also it allwos to configur a
range that starts at 0.

- Make sure 0 can not be used as start or end of the range
- make sure the end port number is always greater then the begin
  port number
- Autocorrect uneaven port range beginnings to one port number before to
  ensure the range starts at an even port number
- Autocorrect even port range ends to the next odd port number to
  ensure the range ends at an odd port number.

Change-Id: Ib1312acba4f03f378594dbbeb4f31afd891d68d7
Related: OS#2825
---
M src/libosmo-mgcp/mgcp_vty.c
1 file changed, 29 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/60/9260/2
--
To view, visit https://gerrit.osmocom.org/9260
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib1312acba4f03f378594dbbeb4f31afd891d68d7
Gerrit-Change-Number: 9260
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: Harald Welte 


Change in osmo-mgw[master]: vty: clean up rtp port-range command

2018-05-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9260 )

Change subject: vty: clean up rtp port-range command
..

vty: clean up rtp port-range command

The VTY command that sets the RTP port range does not check if the data
entered by the user actually makes sens. Also it allwos to configur a
range that starts at 0.

- Make sure 0 can not be used as start or end of the range
- make sure the end port number is always greater then the begin
  port number
- Autocorrect uneaven port range beginnings to one port number before to
  ensure the range starts at an even port number
- Autocorrect even port range ends to the next odd port number to
  ensure the range ends at an odd port number.

Change-Id: Ib1312acba4f03f378594dbbeb4f31afd891d68d7
Related: OS#2825
---
M src/libosmo-mgcp/mgcp_vty.c
1 file changed, 29 insertions(+), 9 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c
index 392a176..3c1b596 100644
--- a/src/libosmo-mgcp/mgcp_vty.c
+++ b/src/libosmo-mgcp/mgcp_vty.c
@@ -282,13 +282,6 @@
return CMD_WARNING;
 }

-static void parse_range(struct mgcp_port_range *range, const char **argv)
-{
-   range->range_start = atoi(argv[0]);
-   range->range_end = atoi(argv[1]);
-   range->last_port = g_cfg->net_ports.range_start;
-}
-
 #define RTP_STR "RTP configuration\n"
 #define UDP_PORT_STR "UDP Port number\n"
 #define NET_START_STR "First UDP port allocated\n"
@@ -297,11 +290,38 @@

 DEFUN(cfg_mgcp_rtp_port_range,
   cfg_mgcp_rtp_port_range_cmd,
-  "rtp port-range <0-65534> <0-65534>",
+  "rtp port-range <1024-65534> <1025-65535>",
   RTP_STR "Range of ports to use for the NET side\n"
   RANGE_START_STR RANGE_END_STR)
 {
-   parse_range(&g_cfg->net_ports, argv);
+   int start;
+   int end;
+
+   start = atoi(argv[0]);
+   end = atoi(argv[1]);
+
+   if (end < start) {
+   vty_out(vty, "range end port (%i) must be greater than the 
range start port (%i)!%s",
+   end, start, VTY_NEWLINE);
+   return CMD_WARNING;
+   }
+
+   if (start & 1) {
+   vty_out(vty, "range must begin at an even port number, 
autocorrecting port (%i) to: %i%s",
+   start, start & 0xFFFE, VTY_NEWLINE);
+   start &= 0xFFFE;
+   }
+
+   if ((end & 1) == 0) {
+   vty_out(vty, "range must end at an odd port number, 
autocorrecting port (%i) to: %i%s",
+   end, end | 1, VTY_NEWLINE);
+   end |= 1;
+   }
+
+   g_cfg->net_ports.range_start = start;
+   g_cfg->net_ports.range_end = end;
+   g_cfg->net_ports.last_port = g_cfg->net_ports.range_start;
+
return CMD_SUCCESS;
 }
 ALIAS_DEPRECATED(cfg_mgcp_rtp_port_range,

--
To view, visit https://gerrit.osmocom.org/9260
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1312acba4f03f378594dbbeb4f31afd891d68d7
Gerrit-Change-Number: 9260
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


Change in osmo-mgw[master]: vty: clean up rtp port-range command

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9260 )

Change subject: vty: clean up rtp port-range command
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9260
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib1312acba4f03f378594dbbeb4f31afd891d68d7
Gerrit-Change-Number: 9260
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Thu, 24 May 2018 08:30:47 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-sip-connector[master]: Logging: Add value_strings for mncc_names.

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9269 )

Change subject: Logging: Add value_strings for mncc_names.
..


Patch Set 1: Code-Review-1

We already have osmo_mncc_name() in libosmocore/src/gsm/mncc.c, please use the 
existing function. thanks!


--
To view, visit https://gerrit.osmocom.org/9269
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I161d1b841ac5fe1b7e092b329ae0674cb340f5ac
Gerrit-Change-Number: 9269
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Thu, 24 May 2018 08:32:09 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-sip-connector[master]: Add Cause to DISCONNECT and RELEASE Requests

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9270 )

Change subject: Add Cause to DISCONNECT and RELEASE Requests
..


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/9270/1/src/mncc.c
File src/mncc.c:

https://gerrit.osmocom.org/#/c/9270/1/src/mncc.c@113
PS1, Line 113:  mncc->cause.location = 2;
please use GSM48_CAUSE_LOC_PUN_S_LU instead of a magic number "2".  As for 
"coding", it appears we might not yet have a #define or enum for that.  Please 
add it to libosmocore, and use it from here. Thanks!



--
To view, visit https://gerrit.osmocom.org/9270
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5d3fe3f0c9e8de26dd0c73b10b7e4fc63dff3952
Gerrit-Change-Number: 9270
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Thu, 24 May 2018 08:35:06 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-sip-connector[master]: Implement MNCC Cause <-> SIP Call Error mapping

2018-05-24 Thread Keith Whyte
Keith Whyte has posted comments on this change. ( 
https://gerrit.osmocom.org/9271 )

Change subject: Implement MNCC Cause <-> SIP Call Error mapping
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/9271
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3f9796c8ecdfdd68274e9b32e748d32a4b8dc273
Gerrit-Change-Number: 9271
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Thu, 24 May 2018 09:37:33 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-sip-connector[master]: Implement MNCC Cause <-> SIP Call Error mapping

2018-05-24 Thread Keith Whyte
Keith Whyte has posted comments on this change. ( 
https://gerrit.osmocom.org/9271 )

Change subject: Implement MNCC Cause <-> SIP Call Error mapping
..


Patch Set 1: Code-Review-1


--
To view, visit https://gerrit.osmocom.org/9271
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3f9796c8ecdfdd68274e9b32e748d32a4b8dc273
Gerrit-Change-Number: 9271
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Comment-Date: Thu, 24 May 2018 09:39:28 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: mncc: properly export osmo_mncc_name()

2018-05-24 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/9272


Change subject: mncc: properly export osmo_mncc_name()
..

mncc: properly export osmo_mncc_name()

For some strange reason, the osmo_mncc_name() inline function
was not in the mncc.h header, but in the mncc.c file. Let's fix that.

Change-Id: I2c3666510c981dffa4ba25bed517fd7ebd1250f5
---
M include/osmocom/gsm/mncc.h
M src/gsm/libosmogsm.map
M src/gsm/mncc.c
3 files changed, 6 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/72/9272/1

diff --git a/include/osmocom/gsm/mncc.h b/include/osmocom/gsm/mncc.h
index 5ca2986..6b94d46 100644
--- a/include/osmocom/gsm/mncc.h
+++ b/include/osmocom/gsm/mncc.h
@@ -91,3 +91,8 @@

 #define osmo_mncc_log(ss, level, prefix, msg, len) \
_osmo_mncc_log(ss, level, __BASE_FILE__, __LINE__, prefix, msg, len);
+
+extern const struct value_string osmo_mncc_names[];
+static inline const char *osmo_mncc_name(uint32_t msg_type) {
+   return get_value_string(osmo_mncc_names, msg_type);
+}
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index 8c64020..c4b1b75 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -466,6 +466,7 @@
 osmo_msisdn_str_valid;

 osmo_mncc_stringify;
+osmo_mncc_names;
 _osmo_mncc_log;

 local: *;
diff --git a/src/gsm/mncc.c b/src/gsm/mncc.c
index fa4726c..938cf9a 100644
--- a/src/gsm/mncc.c
+++ b/src/gsm/mncc.c
@@ -244,10 +244,6 @@
{ 0, NULL },
 };

-static inline const char *osmo_mncc_name(uint32_t msg_type) {
-   return get_value_string(osmo_mncc_names, msg_type);
-}
-
 static void mncc_dump_rtp(struct msgb *str, const uint8_t *msg, unsigned int 
len)
 {
const struct gsm_mncc_rtp *rtp = (const struct gsm_mncc_rtp *) msg;

--
To view, visit https://gerrit.osmocom.org/9272
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c3666510c981dffa4ba25bed517fd7ebd1250f5
Gerrit-Change-Number: 9272
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 


Change in osmo-sip-connector[master]: Implement MNCC Cause <-> SIP Call Error mapping

2018-05-24 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/9271 )

Change subject: Implement MNCC Cause <-> SIP Call Error mapping
..


Patch Set 1: Code-Review-1

(7 comments)

https://gerrit.osmocom.org/#/c/9271/1/src/mncc.c
File src/mncc.c:

https://gerrit.osmocom.org/#/c/9271/1/src/mncc.c@122
PS1, Line 122:
ws, please fix.


https://gerrit.osmocom.org/#/c/9271/1/src/sip.c
File src/sip.c:

https://gerrit.osmocom.org/#/c/9271/1/src/sip.c@54
PS1, Line 54:   LOGP(DSIP, LOGL_NOTICE, "leg(%p) is now ringing.\n", leg);
Great, but unrelated to this change...
Please do it in a separate one.


https://gerrit.osmocom.org/#/c/9271/1/src/sip.c@182
PS1, Line 182: other->cause=1;
Do we have any enum or a group of defines for this?


https://gerrit.osmocom.org/#/c/9271/1/src/sip.c@235
PS1, Line 235: static void copy_cause_phrase(int *to_cause, char **to_phrase,
ws ws


https://gerrit.osmocom.org/#/c/9271/1/src/sip.c@240
PS1, Line 240: }
ws


https://gerrit.osmocom.org/#/c/9271/1/src/sip.c@248
PS1, Line 248:  int sip_cause;
ws


https://gerrit.osmocom.org/#/c/9271/1/src/sip.c@280
PS1, Line 280:
ws



--
To view, visit https://gerrit.osmocom.org/9271
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3f9796c8ecdfdd68274e9b32e748d32a4b8dc273
Gerrit-Change-Number: 9271
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Thu, 24 May 2018 10:39:24 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in libosmocore[master]: mncc: properly export osmo_mncc_name()

2018-05-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9272 )

Change subject: mncc: properly export osmo_mncc_name()
..

mncc: properly export osmo_mncc_name()

For some strange reason, the osmo_mncc_name() inline function
was not in the mncc.h header, but in the mncc.c file. Let's fix that.

Change-Id: I2c3666510c981dffa4ba25bed517fd7ebd1250f5
---
M include/osmocom/gsm/mncc.h
M src/gsm/libosmogsm.map
M src/gsm/mncc.c
3 files changed, 6 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/include/osmocom/gsm/mncc.h b/include/osmocom/gsm/mncc.h
index 5ca2986..6b94d46 100644
--- a/include/osmocom/gsm/mncc.h
+++ b/include/osmocom/gsm/mncc.h
@@ -91,3 +91,8 @@

 #define osmo_mncc_log(ss, level, prefix, msg, len) \
_osmo_mncc_log(ss, level, __BASE_FILE__, __LINE__, prefix, msg, len);
+
+extern const struct value_string osmo_mncc_names[];
+static inline const char *osmo_mncc_name(uint32_t msg_type) {
+   return get_value_string(osmo_mncc_names, msg_type);
+}
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index 8c64020..c4b1b75 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -466,6 +466,7 @@
 osmo_msisdn_str_valid;

 osmo_mncc_stringify;
+osmo_mncc_names;
 _osmo_mncc_log;

 local: *;
diff --git a/src/gsm/mncc.c b/src/gsm/mncc.c
index fa4726c..938cf9a 100644
--- a/src/gsm/mncc.c
+++ b/src/gsm/mncc.c
@@ -244,10 +244,6 @@
{ 0, NULL },
 };

-static inline const char *osmo_mncc_name(uint32_t msg_type) {
-   return get_value_string(osmo_mncc_names, msg_type);
-}
-
 static void mncc_dump_rtp(struct msgb *str, const uint8_t *msg, unsigned int 
len)
 {
const struct gsm_mncc_rtp *rtp = (const struct gsm_mncc_rtp *) msg;

--
To view, visit https://gerrit.osmocom.org/9272
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2c3666510c981dffa4ba25bed517fd7ebd1250f5
Gerrit-Change-Number: 9272
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


Change in libosmocore[master]: mncc: properly export osmo_mncc_name()

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9272 )

Change subject: mncc: properly export osmo_mncc_name()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9272
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2c3666510c981dffa4ba25bed517fd7ebd1250f5
Gerrit-Change-Number: 9272
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Thu, 24 May 2018 10:59:58 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: library: PCUIF_CodecPort: Log PCU socket connect error string

2018-05-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/9273


Change subject: library: PCUIF_CodecPort: Log PCU socket connect error string
..

library: PCUIF_CodecPort: Log PCU socket connect error string

Change-Id: I7045061770cda5b50d05dbf756656e380084a703
---
M library/PCUIF_CodecPort.ttcn
1 file changed, 5 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/73/9273/1

diff --git a/library/PCUIF_CodecPort.ttcn b/library/PCUIF_CodecPort.ttcn
index fe428af..c642202 100644
--- a/library/PCUIF_CodecPort.ttcn
+++ b/library/PCUIF_CodecPort.ttcn
@@ -65,7 +65,11 @@
[] pt.receive(UD_connect_result:?) -> value res {
if (ispresent(res.result) and ispresent(res.result.result_code) 
and
res.result.result_code == ERROR) {
-   setverdict(fail, "Error connecting to PCU socket");
+   if (ispresent(res.result.err)) {
+   setverdict(fail, "Error connecting to PCU 
socket: ", res.result.err);
+   } else {
+   setverdict(fail, "Error connecting to PCU 
socket");
+   }
self.stop;
} else {
return res.id;

--
To view, visit https://gerrit.osmocom.org/9273
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7045061770cda5b50d05dbf756656e380084a703
Gerrit-Change-Number: 9273
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 


Change in libosmo-abis[master]: fix double-free/use-after-free of pointers in struct e1inp_line

2018-05-24 Thread Stefan Sperling
Hello Pau Espin Pedrol, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/9252

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

Change subject: fix double-free/use-after-free of pointers in struct e1inp_line
..

fix double-free/use-after-free of pointers in struct e1inp_line

Ensure that pointers in cloned e1inp_lines point to valid memory.
Some members of struct e1inp_line can simply be deep-copied.
Use talloc reference counting for pointers to objects which may
be shared between clones (driver-private state and counters).
Prevents double-free bugs, e.g. when multiple links referring
to the same line are closed.

Also, do not forget to unlink struct e1inp_line's counter group from
the counter list. Fixes use-after-free in rate_ctr_timer_cb() during
osmo-bts shutdown.

Change-Id: I9f4724b4a5a064801591e9acf4f2fd1db006d082
Related: OS#3011
Related: OS#3137
---
M src/e1_input.c
1 file changed, 40 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/52/9252/3
--
To view, visit https://gerrit.osmocom.org/9252
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9f4724b4a5a064801591e9acf4f2fd1db006d082
Gerrit-Change-Number: 9252
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 


Change in libosmo-abis[master]: fix double-free/use-after-free of pointers in struct e1inp_line

2018-05-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/9252 )

Change subject: fix double-free/use-after-free of pointers in struct e1inp_line
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9252
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9f4724b4a5a064801591e9acf4f2fd1db006d082
Gerrit-Change-Number: 9252
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Thu, 24 May 2018 13:00:47 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmo-abis[master]: fix double-free/use-after-free of pointers in struct e1inp_line

2018-05-24 Thread Stefan Sperling
Stefan Sperling has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9252 )

Change subject: fix double-free/use-after-free of pointers in struct e1inp_line
..

fix double-free/use-after-free of pointers in struct e1inp_line

Ensure that pointers in cloned e1inp_lines point to valid memory.
Some members of struct e1inp_line can simply be deep-copied.
Use talloc reference counting for pointers to objects which may
be shared between clones (driver-private state and counters).
Prevents double-free bugs, e.g. when multiple links referring
to the same line are closed.

Also, do not forget to unlink struct e1inp_line's counter group from
the counter list. Fixes use-after-free in rate_ctr_timer_cb() during
osmo-bts shutdown.

Change-Id: I9f4724b4a5a064801591e9acf4f2fd1db006d082
Related: OS#3011
Related: OS#3137
---
M src/e1_input.c
1 file changed, 40 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, approved



diff --git a/src/e1_input.c b/src/e1_input.c
index 29ba440..11949a1 100644
--- a/src/e1_input.c
+++ b/src/e1_input.c
@@ -394,6 +394,25 @@
return NULL;

memcpy(clone, line, sizeof(struct e1inp_line));
+
+   if (line->name) {
+   clone->name = talloc_strdup(clone, line->name);
+   OSMO_ASSERT(clone->name);
+   }
+   if (line->sock_path) {
+   clone->sock_path = talloc_strdup(clone, line->sock_path);
+   OSMO_ASSERT(clone->sock_path);
+   }
+
+   /*
+* Rate counters and driver data are shared between clones. These are 
pointers
+* to dynamic memory so we use reference counting to avoid a 
double-free (see OS#3137).
+*/
+   OSMO_ASSERT(line->rate_ctr);
+   clone->rate_ctr = talloc_reference(clone, line->rate_ctr);
+   if (line->driver_data)
+   clone->driver_data = talloc_reference(clone, line->driver_data);
+
clone->refcnt = 1;
return clone;
 }
@@ -406,8 +425,28 @@
 void e1inp_line_put(struct e1inp_line *line)
 {
line->refcnt--;
-   if (line->refcnt == 0)
+   if (line->refcnt == 0) {
+   /* Remove our counter group from libosmocore's global counter
+* list if we are freeing the last remaining talloc context.
+* Otherwise we get a use-after-free when libosmocore's timer
+* ticks again and attempts to update these counters (OS#3011).
+*
+* Note that talloc internally counts "secondary" references
+* _in addition to_ the initial allocation context, so yes,
+* we must check for *zero* remaining secondary contexts here. 
*/
+   if (talloc_reference_count(line->rate_ctr) == 0) {
+   rate_ctr_group_free(line->rate_ctr);
+   } else {
+   /* We are not freeing the last talloc context.
+* Instead of calling talloc_free(), unlink this 'line' 
pointer
+* which serves as one of several talloc contexts for 
the rate
+* counters and driver private state. */
+   talloc_unlink(line, line->rate_ctr);
+   if (line->driver_data)
+   talloc_unlink(line, line->driver_data);
+   }
talloc_free(line);
+   }
 }

 void

--
To view, visit https://gerrit.osmocom.org/9252
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I9f4724b4a5a064801591e9acf4f2fd1db006d082
Gerrit-Change-Number: 9252
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Stefan Sperling 


Change in osmo-bsc[master]: fix misaligned memory write access in abis_nm_ipaccess_rsl_connect()

2018-05-24 Thread Stefan Sperling
Stefan Sperling has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9242 )

Change subject: fix misaligned memory write access in 
abis_nm_ipaccess_rsl_connect()
..

fix misaligned memory write access in abis_nm_ipaccess_rsl_connect()

Use memcpy() to avoid unaligned access, instead of writing through a
pointer cast to uint32_t. Problem spotted by address sanitizer:

abis_nm.c:2802:24: runtime error: store to misaligned address 0x7ffc95396706
for type 'uint32_t', which requires 4 byte alignment
0x7ffc95396706: note: pointer points here
 81 0b bb 80 00 00  00 00 ed 79 28 56 00 00  e0 9c 00 00 a0 61 00 00 ...
 ^
Related: OS#3196

Change-Id: I8e591a56ae522b371da01ea968151a7e6fa24bb9
---
M src/libbsc/abis_nm.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c
index b2cfa53..ea94d37 100644
--- a/src/libbsc/abis_nm.c
+++ b/src/libbsc/abis_nm.c
@@ -2799,7 +2799,7 @@
attr[1] = stream;
attr[3] = port >> 8;
attr[4] = port & 0xff;
-   *(uint32_t *)(attr+6) = ia.s_addr;
+   memcpy(attr + 6, &ia.s_addr, sizeof(uint32_t));

/* if ip == 0, we use the default IP */
if (ip == 0)

--
To view, visit https://gerrit.osmocom.org/9242
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8e591a56ae522b371da01ea968151a7e6fa24bb9
Gerrit-Change-Number: 9242
Gerrit-PatchSet: 3
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 


Change in osmo-bsc[master]: show all global counters of osmo-bsc in vty

2018-05-24 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/9217 )

Change subject: show all global counters of osmo-bsc in vty
..


Patch Set 2:

> (1 comment)

There is already a function for this purpose in in libosmocore: 
vty_out_rate_ctr_group()

But the output doesn't look as nice in this case:

OsmoBSC# show statistics
base station controller:
 Received handover attempts.:0 (0/s 0/m 0/h 0/d)
 Sent no channel available responses.:0 (0/s 0/m 0/h 0/d)
 Timeouts of timer T3103.:0 (0/s 0/m 0/h 0/d)
 Received handover completed.:0 (0/s 0/m 0/h 0/d)
 Received HO FAIL messages.:0 (0/s 0/m 0/h 0/d)
 Paging attempts for a subscriber.:0 (0/s 0/m 0/h 0/d)
 Paging request send failures because no responsible BTS was found.:0 
(0/s 0/m 0/h 0/d)
 Paging attempts with successful response.:0 (0/s 0/m 0/h 0/d)
 Connection attempts from unknown IPA CCM Unit ID.:0 (0/s 0/m 0/h 0/d)


--
To view, visit https://gerrit.osmocom.org/9217
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I58ae04e1960774d760e3ebb54a4f307c9f753655
Gerrit-Change-Number: 9217
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Thu, 24 May 2018 13:38:17 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-sip-connector[master]: Implement MNCC Cause <-> SIP Call Error mapping

2018-05-24 Thread Keith Whyte
Keith Whyte has posted comments on this change. ( 
https://gerrit.osmocom.org/9271 )

Change subject: Implement MNCC Cause <-> SIP Call Error mapping
..


Patch Set 1:

(2 comments)

https://gerrit.osmocom.org/#/c/9271/1/src/mncc.c
File src/mncc.c:

https://gerrit.osmocom.org/#/c/9271/1/src/mncc.c@122
PS1, Line 122:
> ws, please fix.
Yes.. It's a work in progess, not a final patch proposal.


https://gerrit.osmocom.org/#/c/9271/1/src/sip.c
File src/sip.c:

https://gerrit.osmocom.org/#/c/9271/1/src/sip.c@182
PS1, Line 182: other->cause=1;
> Do we have any enum or a group of defines for this?
Yes, on the way.



--
To view, visit https://gerrit.osmocom.org/9271
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3f9796c8ecdfdd68274e9b32e748d32a4b8dc273
Gerrit-Change-Number: 9271
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Thu, 24 May 2018 13:44:53 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-sip-connector[master]: Implement MNCC Cause <-> SIP Call Error mapping

2018-05-24 Thread Keith Whyte
Keith Whyte has posted comments on this change. ( 
https://gerrit.osmocom.org/9271 )

Change subject: Implement MNCC Cause <-> SIP Call Error mapping
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/9271/1/src/sip.c
File src/sip.c:

https://gerrit.osmocom.org/#/c/9271/1/src/sip.c@54
PS1, Line 54:   LOGP(DSIP, LOGL_NOTICE, "leg(%p) is now ringing.\n", leg);
> Great, but unrelated to this change... […]
It got it here... again..it's just a WIP..



--
To view, visit https://gerrit.osmocom.org/9271
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3f9796c8ecdfdd68274e9b32e748d32a4b8dc273
Gerrit-Change-Number: 9271
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Thu, 24 May 2018 13:46:17 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-sip-connector[master]: Logging: Log mncc_names in mncc_data()

2018-05-24 Thread Keith Whyte
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/9269

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

Change subject: Logging: Log mncc_names in mncc_data()
..

Logging: Log mncc_names in mncc_data()

Links libosmocore (libosmogsm) for access to osmo_mncc_name()

Uses osmo_mncc_name() to output to debug log
which MNCC_* message was received.

Change-Id: I161d1b841ac5fe1b7e092b329ae0674cb340f5ac
---
M configure.ac
M src/Makefile.am
M src/mncc.c
M src/mncc_protocol.h
4 files changed, 9 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector 
refs/changes/69/9269/2
--
To view, visit https://gerrit.osmocom.org/9269
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I161d1b841ac5fe1b7e092b329ae0674cb340f5ac
Gerrit-Change-Number: 9269
Gerrit-PatchSet: 2
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


Change in osmo-sip-connector[master]: Logging: Log mncc_names in mncc_data()

2018-05-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/9269 )

Change subject: Logging: Log mncc_names in mncc_data()
..


Patch Set 2: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/9269/2/src/mncc_protocol.h
File src/mncc_protocol.h:

https://gerrit.osmocom.org/#/c/9269/2/src/mncc_protocol.h@199
PS2, Line 199: const char *get_mncc_name(const uint32_t value);
This is not related to this patch?



--
To view, visit https://gerrit.osmocom.org/9269
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I161d1b841ac5fe1b7e092b329ae0674cb340f5ac
Gerrit-Change-Number: 9269
Gerrit-PatchSet: 2
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 24 May 2018 14:54:15 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: ansible/setup-gsm-tester: add docker

2018-05-24 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/9274


Change subject: ansible/setup-gsm-tester: add docker
..

ansible/setup-gsm-tester: add docker

Change-Id: Idfd96c4e3556b93ca85acb94a2176ec269a906d1
---
M ansible/setup-gsm-tester.yml
1 file changed, 5 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/74/9274/1

diff --git a/ansible/setup-gsm-tester.yml b/ansible/setup-gsm-tester.yml
index a1a0389..36c8287 100644
--- a/ansible/setup-gsm-tester.yml
+++ b/ansible/setup-gsm-tester.yml
@@ -38,6 +38,11 @@
   tags:
 - jenkins-slave

+- name: docker
+  jenkins_user: jenkins
+  tags:
+- docker
+
 - name: udhcpd
   udhcpd_router: 10.42.42.1
   udhcpd_range_start: 10.42.42.230

--
To view, visit https://gerrit.osmocom.org/9274
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfd96c4e3556b93ca85acb94a2176ec269a906d1
Gerrit-Change-Number: 9274
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-ci[master]: ansible: gsm-tester: add jenkins to the dialout group

2018-05-24 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/9275


Change subject: ansible: gsm-tester: add jenkins to the dialout group
..

ansible: gsm-tester: add jenkins to the dialout group

To access tty*

Change-Id: Icc7b3fa9ca7c14360d78069d8d42e6039afda32b
---
M ansible/roles/gsm-tester/tasks/main.yml
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/75/9275/1

diff --git a/ansible/roles/gsm-tester/tasks/main.yml 
b/ansible/roles/gsm-tester/tasks/main.yml
index f7eb1ee..2b00270 100644
--- a/ansible/roles/gsm-tester/tasks/main.yml
+++ b/ansible/roles/gsm-tester/tasks/main.yml
@@ -150,6 +150,7 @@
   with_items:
 - systemd-journal
 - osmo-gsm-tester
+- dialout

 - name: setup state directory
   file:

--
To view, visit https://gerrit.osmocom.org/9275
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc7b3fa9ca7c14360d78069d8d42e6039afda32b
Gerrit-Change-Number: 9275
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-sip-connector[master]: Logging: Log mncc_names in mncc_data()

2018-05-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/9269 )

Change subject: Logging: Log mncc_names in mncc_data()
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/9269/2/src/mncc_protocol.h
File src/mncc_protocol.h:

https://gerrit.osmocom.org/#/c/9269/2/src/mncc_protocol.h@199
PS2, Line 199: const char *get_mncc_name(const uint32_t value);
> This is not related to this patch?
Can this function actually be dropped in this patch? Is it still needed?.



--
To view, visit https://gerrit.osmocom.org/9269
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I161d1b841ac5fe1b7e092b329ae0674cb340f5ac
Gerrit-Change-Number: 9269
Gerrit-PatchSet: 2
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 24 May 2018 14:55:45 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-ci[master]: ansible: add a simple README.md

2018-05-24 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/9276


Change subject: ansible: add a simple README.md
..

ansible: add a simple README.md

Change-Id: I96057bb92faa8e3375c5bad20ef1536475807b67
---
A ansible/README.md
1 file changed, 20 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/76/9276/1

diff --git a/ansible/README.md b/ansible/README.md
new file mode 100644
index 000..21763f4
--- /dev/null
+++ b/ansible/README.md
@@ -0,0 +1,20 @@
+# ansible repository
+
+Ansible is an automisation, provisioning and configuration management utility.
+
+# How to use it?
+
+- you need ansible installed (version 2.4, other might work as well)
+
+# How to setup the gsm-tester?
+
+`ansible-playbook -i hosts setup-gsm-tester.yml`
+
+Your ssh key need to be deployed on the host.
+Further information on this job can be found in **setup-gsm-tester.md**.
+
+# How to setup a jenkin slave?
+
+`ansible-playbook -i hosts setup-jenkins-slave.yml`
+
+Further information on this job and around the setup can be found on the 
redmine wiki.

--
To view, visit https://gerrit.osmocom.org/9276
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I96057bb92faa8e3375c5bad20ef1536475807b67
Gerrit-Change-Number: 9276
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 


Change in osmo-sip-connector[master]: Logging: Log mncc_names in mncc_data()

2018-05-24 Thread Keith Whyte
Hello Pau Espin Pedrol, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/9269

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

Change subject: Logging: Log mncc_names in mncc_data()
..

Logging: Log mncc_names in mncc_data()

Links libosmocore (libosmogsm) for access to osmo_mncc_name()

Remove reference to get_mncc_name() in src/mncc_protocol.h
Uses osmo_mncc_name() to output to debug log
which MNCC_* message was received.

Change-Id: I161d1b841ac5fe1b7e092b329ae0674cb340f5ac
---
M configure.ac
M src/Makefile.am
M src/mncc.c
M src/mncc_protocol.h
4 files changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector 
refs/changes/69/9269/3
--
To view, visit https://gerrit.osmocom.org/9269
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I161d1b841ac5fe1b7e092b329ae0674cb340f5ac
Gerrit-Change-Number: 9269
Gerrit-PatchSet: 3
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-sip-connector[master]: Logging: Log mncc_names in mncc_data()

2018-05-24 Thread Keith Whyte
Keith Whyte has posted comments on this change. ( 
https://gerrit.osmocom.org/9269 )

Change subject: Logging: Log mncc_names in mncc_data()
..


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/9269/2/src/mncc_protocol.h
File src/mncc_protocol.h:

https://gerrit.osmocom.org/#/c/9269/2/src/mncc_protocol.h@199
PS2, Line 199: void mncc_set_cause(struct gsm_mncc *data, int loc, int val);
> This is not related to this patch?
Done



--
To view, visit https://gerrit.osmocom.org/9269
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I161d1b841ac5fe1b7e092b329ae0674cb340f5ac
Gerrit-Change-Number: 9269
Gerrit-PatchSet: 3
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 24 May 2018 14:58:03 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-sip-connector[master]: Logging: Log mncc_names in mncc_data()

2018-05-24 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/9269 )

Change subject: Logging: Log mncc_names in mncc_data()
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/9269
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I161d1b841ac5fe1b7e092b329ae0674cb340f5ac
Gerrit-Change-Number: 9269
Gerrit-PatchSet: 3
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 24 May 2018 15:00:50 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: introduce vty_out_rate_ctr_group_fmt() function

2018-05-24 Thread Stefan Sperling
Stefan Sperling has uploaded this change for review. ( 
https://gerrit.osmocom.org/9277


Change subject: introduce vty_out_rate_ctr_group_fmt() function
..

introduce vty_out_rate_ctr_group_fmt() function

This new function can be used to print a rate counter group according
to a format string. The intention is to generalize and replace manual
printing of counters as implemented for the 'show statistics' VTY
command of osmo-bsc.

Related: OS#3245
Related: osmo-bsc commit 71d524c059c5a5c90e7cb77d8a2134c1c68b9cde (g#9217)

Change-Id: Idb3ec12494ff6a3a05efcc8818e78d1baa6546bd
---
M include/osmocom/vty/misc.h
M src/vty/utils.c
2 files changed, 138 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/77/9277/1

diff --git a/include/osmocom/vty/misc.h b/include/osmocom/vty/misc.h
index 335558d..2ad9650 100644
--- a/include/osmocom/vty/misc.h
+++ b/include/osmocom/vty/misc.h
@@ -14,6 +14,8 @@

 void vty_out_rate_ctr_group(struct vty *vty, const char *prefix,
struct rate_ctr_group *ctrg);
+void vty_out_rate_ctr_group_fmt(struct vty *vty, const char *fmt,
+   struct rate_ctr_group *ctrg);

 void vty_out_stat_item_group(struct vty *vty, const char *prefix,
 struct osmo_stat_item_group *statg);
diff --git a/src/vty/utils.c b/src/vty/utils.c
index 8cd0b35..4d37093 100644
--- a/src/vty/utils.c
+++ b/src/vty/utils.c
@@ -84,6 +84,142 @@
rate_ctr_for_each_counter(ctrg, rate_ctr_handler, &vctx);
 }

+static char *
+pad_append_str(char *s, const char *a, int minwidth)
+{
+   s = talloc_asprintf_append(s, "%*s", minwidth, a);
+   OSMO_ASSERT(s);
+   return s;
+}
+
+static char *
+pad_append_ctr(char *s, uint64_t ctr, int minwidth, void *ctx)
+{
+   s = talloc_asprintf_append(s, "%*" PRIu64, minwidth, ctr);
+   OSMO_ASSERT(s);
+   return s;
+}
+
+static int rate_ctr_handler_fmt(
+   struct rate_ctr_group *ctrg, struct rate_ctr *ctr,
+   const struct rate_ctr_desc *desc, void *vctx_)
+{
+   struct vty_out_context *vctx = vctx_;
+   struct vty *vty = vctx->vty;
+   const char *fmt = vctx->prefix;
+   char *s = talloc_strdup(vty, "");
+   OSMO_ASSERT(s);
+
+   while (*fmt) {
+   int ch, minwidth = 0, sign = 1;
+   char *p = strchr(fmt, '%');
+
+   if (p == NULL) {
+   /* No further % directives in format string. Copy rest 
verbatim and exit. */
+   s = talloc_strdup_append_buffer(s, fmt);
+   OSMO_ASSERT(s);
+   break;
+   } else {
+   ptrdiff_t len;
+
+   OSMO_ASSERT(p >= fmt);
+   len = p - fmt;
+   if (len) {
+   /* Copy bytes verbatim until next '%' byte. */
+   s = talloc_strndup_append_buffer(s, fmt, len);
+   OSMO_ASSERT(s);
+   }
+   fmt = (const char *)(p + 1); /* skip past '%' */
+   if (*fmt == '\0')
+   break;
+   }
+
+   ch = *fmt++;
+   if (ch == '-' && isdigit(*fmt)) {
+   sign = -1;
+   ch = *fmt++;
+   }
+   while (isdigit(ch) && *fmt != '\0') {
+   minwidth *= 10;
+   minwidth += (ch - '0');
+   ch = *fmt++;
+   }
+   minwidth *= sign;
+
+   switch (ch) {
+   case '%':
+   s = talloc_asprintf_append(s, "%c", ch);
+   OSMO_ASSERT(s);
+   break;
+   case 'd':
+   s = pad_append_str(s, desc->description, minwidth);
+   break;
+   case 'n':
+   s = pad_append_str(s, desc->name, minwidth);
+   break;
+   case 'c':
+   s = pad_append_ctr(s, ctr->current, minwidth, vty);
+   break;
+   case 'p':
+   s = pad_append_ctr(s, ctr->previous, minwidth, vty);
+   break;
+   case 'S':
+   s = pad_append_ctr(s, 
ctr->intv[RATE_CTR_INTV_SEC].rate, minwidth, vty);
+   break;
+   case 'M':
+   s = pad_append_ctr(s, 
ctr->intv[RATE_CTR_INTV_MIN].rate, minwidth, vty);
+   break;
+   case 'H':
+   s = pad_append_ctr(s, 
ctr->intv[RATE_CTR_INTV_HOUR].rate, minwidth, vty);
+   break;
+   case 'D':
+   s = pad_append_ctr(s, 
ctr->intv[RATE_CTR_INTV_DAY].rate

Change in libosmocore[master]: Add a 'show rate-counters' VTY command.

2018-05-24 Thread Stefan Sperling
Stefan Sperling has uploaded this change for review. ( 
https://gerrit.osmocom.org/9278


Change subject: Add a 'show rate-counters' VTY command.
..

Add a 'show rate-counters' VTY command.

Add a new VTY command which shows all rate counters registered
with libosmocom.

Change-Id: Id60a5aa2d961ae99cddf1e776358a5517dbc573d
Depends: Idb3ec12494ff6a3a05efcc8818e78d1baa6546bd
Related: OS#3245
---
M src/vty/stats_vty.c
1 file changed, 17 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/78/9278/1

diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c
index faa136d..8d90945 100644
--- a/src/vty/stats_vty.c
+++ b/src/vty/stats_vty.c
@@ -527,6 +527,22 @@
return CMD_SUCCESS;
 }

+static int rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *sctx_)
+{
+   struct vty *vty = sctx_;
+   vty_out_rate_ctr_group_fmt(vty, "%25n: %10c (%S/s %M/m %H/h %D/d) %d", 
ctrg);
+   return 0;
+}
+
+DEFUN(show_rate_counters,
+  show_rate_counters_cmd,
+  "show rate-counters",
+  SHOW_STR "Show all rate counters\n")
+{
+   rate_ctr_for_each_group(rate_ctr_group_handler, vty);
+   return CMD_SUCCESS;
+}
+
 static int config_write_stats_reporter(struct vty *vty, struct 
osmo_stats_reporter *srep)
 {
if (srep == NULL)
@@ -620,4 +636,5 @@
install_element(CFG_STATS_NODE, &cfg_stats_reporter_disable_cmd);

install_element_ve(&show_stats_asciidoc_table_cmd);
+   install_element_ve(&show_rate_counters_cmd);
 }

--
To view, visit https://gerrit.osmocom.org/9278
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id60a5aa2d961ae99cddf1e776358a5517dbc573d
Gerrit-Change-Number: 9278
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling 


Change in libosmocore[master]: Add a 'show rate-counters' VTY command.

2018-05-24 Thread Stefan Sperling
Stefan Sperling has uploaded a new patch set (#2). ( 
https://gerrit.osmocom.org/9278 )

Change subject: Add a 'show rate-counters' VTY command.
..

Add a 'show rate-counters' VTY command.

Add a new VTY command which shows all rate counters registered
with libosmocore.

Change-Id: Id60a5aa2d961ae99cddf1e776358a5517dbc573d
Depends: Idb3ec12494ff6a3a05efcc8818e78d1baa6546bd
Related: OS#3245
---
M src/vty/stats_vty.c
1 file changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/78/9278/2
--
To view, visit https://gerrit.osmocom.org/9278
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id60a5aa2d961ae99cddf1e776358a5517dbc573d
Gerrit-Change-Number: 9278
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling 
Gerrit-CC: Jenkins Builder


Change in osmo-bsc[master]: cosmetic: gscon: undup code: add common assignment_failed()

2018-05-24 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/9280


Change subject: cosmetic: gscon: undup code: add common assignment_failed()
..

cosmetic: gscon: undup code: add common assignment_failed()

Call one common function to signal Assignment Failure and transition back to
ST_ACTIVE.

Change-Id: I1ce10a3ead286cdb6ad529fc293b6cecd151cc9a
---
M src/libbsc/bsc_subscr_conn_fsm.c
1 file changed, 33 insertions(+), 36 deletions(-)



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

diff --git a/src/libbsc/bsc_subscr_conn_fsm.c b/src/libbsc/bsc_subscr_conn_fsm.c
index 3e0ccc0..7617dba 100644
--- a/src/libbsc/bsc_subscr_conn_fsm.c
+++ b/src/libbsc/bsc_subscr_conn_fsm.c
@@ -386,6 +386,22 @@
}
 }

+#define assignment_failed(fi, cause) \
+   _assignment_failed(fi, cause, __FILE__, __LINE__)
+static void _assignment_failed(struct osmo_fsm_inst *fi, enum gsm0808_cause 
cause,
+  const char *file, int line)
+{
+   struct gsm_subscriber_connection *conn = fi->priv;
+   struct msgb *resp = NULL;
+
+   LOGPFSMLSRC(fi, LOGL_ERROR, file, line, "Assignment failed: %s\n", 
gsm0808_cause_name(cause));
+
+   resp = gsm0808_create_assignment_failure(cause, NULL);
+   sigtran_send(conn, resp, fi);
+   if (fi->state != ST_ACTIVE)
+   osmo_fsm_inst_state_chg(fi, ST_ACTIVE, 0, 0);
+}
+
 /* We're on an active subscriber connection, passing DTAP back and forth */
 static void gscon_fsm_active(struct osmo_fsm_inst *fi, uint32_t event, void 
*data)
 {
@@ -424,8 +440,7 @@
mgcp_conn_create(conn->network->mgw.client, fi, 
GSCON_EV_MGW_FAIL_BTS,
 GSCON_EV_MGW_CRCX_RESP_BTS, 
&conn_peer);
if (!conn->user_plane.fi_bts) {
-   resp = 
gsm0808_create_assignment_failure(GSM0808_CAUSE_EQUIPMENT_FAILURE, NULL);
-   sigtran_send(conn, resp, fi);
+   assignment_failed(fi, 
GSM0808_CAUSE_EQUIPMENT_FAILURE);
return;
}
break;
@@ -443,8 +458,7 @@
send_ass_compl(conn->lchan, fi, false);
return;
} else if (rc != 0) {
-   resp = 
gsm0808_create_assignment_failure(GSM0808_CAUSE_EQUIPMENT_FAILURE, NULL);
-   sigtran_send(conn, resp, fi);
+   assignment_failed(fi, 
GSM0808_CAUSE_EQUIPMENT_FAILURE);
return;
}

@@ -459,8 +473,7 @@
 conn->user_plane.full_rate);

/* The requested channel mode is not supported  */
-   resp = 
gsm0808_create_assignment_failure(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP,
 NULL);
-   sigtran_send(conn, resp, fi);
+   assignment_failed(fi, 
GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP);
break;
}
break;
@@ -504,7 +517,6 @@
 {
struct gsm_subscriber_connection *conn = fi->priv;
struct mgcp_conn_peer *conn_peer = NULL;
-   struct msgb *resp = NULL;
int rc;

switch (event) {
@@ -514,9 +526,7 @@
/* Check if the MGW has assigned an enpoint to us, otherwise we
 * can not proceed. */
if (strlen(conn_peer->endpoint) <= 0) {
-   resp = 
gsm0808_create_assignment_failure(GSM0808_CAUSE_EQUIPMENT_FAILURE, NULL);
-   sigtran_send(conn, resp, fi);
-   osmo_fsm_inst_state_chg(fi, ST_ACTIVE, 0, 0);
+   assignment_failed(fi, GSM0808_CAUSE_EQUIPMENT_FAILURE);
return;
}

@@ -535,9 +545,7 @@
conn->user_plane.rtp_ip = 
osmo_ntohl(inet_addr(conn_peer->addr));
rc = gsm0808_assign_req(conn, conn->user_plane.chan_mode, 
conn->user_plane.full_rate);
if (rc != 0) {
-   resp = 
gsm0808_create_assignment_failure(GSM0808_CAUSE_RQSTED_SPEECH_VERSION_UNAVAILABLE,
 NULL);
-   sigtran_send(conn, resp, fi);
-   osmo_fsm_inst_state_chg(fi, ST_ACTIVE, 0, 0);
+   assignment_failed(fi, 
GSM0808_CAUSE_RQSTED_SPEECH_VERSION_UNAVAILABLE);
return;
}

@@ -565,7 +573,6 @@
struct gsm_lchan *lchan = conn->lchan;
struct mgcp_conn_peer conn_peer;
struct in_addr addr;
-   struct msgb *resp = NULL;
int rc;

switch (event) {
@@ -590,9 +597,7 @@
osmo_fsm_inst_state_chg(fi, ST_WAIT_MDCX_BTS, 
MGCP_MGW_TIMEOU

Change in osmo-bsc[master]: log: fix logging in rsl_rx_chan_act_nack()

2018-05-24 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/9282


Change subject: log: fix logging in rsl_rx_chan_act_nack()
..

log: fix logging in rsl_rx_chan_act_nack()

In each code path within rsl_rx_chan_act_nack(), do separate logging of the
NACK to ensure proper termination of each log line.

When receiving a Chan Act NACK, we possibly mixed a LOGP() within an
unterminated other LOGP() that had not been ended with a LOGPC() yet.

Change-Id: Icd2772b21ef3a2ff5af11b7c92dff0ecb4d87ff0
---
M src/libbsc/abis_rsl.c
1 file changed, 9 insertions(+), 6 deletions(-)



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

diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c
index ffbf630..39de1b7 100644
--- a/src/libbsc/abis_rsl.c
+++ b/src/libbsc/abis_rsl.c
@@ -1328,18 +1328,21 @@
return -1;
}

-   LOGP(DRSL, LOGL_ERROR, "%s CHANNEL ACTIVATE NACK ",
-   gsm_lchan_name(msg->lchan));
-
/* BTS has rejected channel activation ?!? */
-   if (dh->ie_chan != RSL_IE_CHAN_NR)
+   if (dh->ie_chan != RSL_IE_CHAN_NR) {
+   LOGP(DRSL, LOGL_ERROR, "%s CHANNEL ACTIVATE NACK, and chan nr 
mismatches\n",
+gsm_lchan_name(msg->lchan));
return -EINVAL;
+   }

rsl_tlv_parse(&tp, dh->data, msgb_l2len(msg)-sizeof(*dh));
if (TLVP_PRESENT(&tp, RSL_IE_CAUSE)) {
const uint8_t *cause = TLVP_VAL(&tp, RSL_IE_CAUSE);
+   LOGP(DRSL, LOGL_ERROR, "%s CHANNEL ACTIVATE NACK: ",
+gsm_lchan_name(msg->lchan));
print_rsl_cause(LOGL_ERROR, cause,
TLVP_LEN(&tp, RSL_IE_CAUSE));
+   LOGPC(DRSL, LOGL_ERROR, "\n");
msg->lchan->error_cause = *cause;
if (*cause != RSL_ERR_RCH_ALR_ACTV_ALLOC) {
rsl_lchan_mark_broken(msg->lchan, "NACK on activation");
@@ -1347,11 +1350,11 @@
rsl_rf_chan_release(msg->lchan, 1, SACCH_DEACTIVATE);

} else {
+   LOGP(DRSL, LOGL_ERROR, "%s CHANNEL ACTIVATE NACK, no cause 
IE\n",
+gsm_lchan_name(msg->lchan));
rsl_lchan_mark_broken(msg->lchan, "NACK on activation no IE");
}

-   LOGPC(DRSL, LOGL_ERROR, "\n");
-
send_lchan_signal(S_LCHAN_ACTIVATE_NACK, msg->lchan, NULL);
return 0;
 }

--
To view, visit https://gerrit.osmocom.org/9282
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd2772b21ef3a2ff5af11b7c92dff0ecb4d87ff0
Gerrit-Change-Number: 9282
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-bsc[master]: store subscriber identity on paging

2018-05-24 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/9289


Change subject: store subscriber identity on paging
..

store subscriber identity on paging

Another small step towards being aware of the subscriber identity.

Any connection initiated by paging will subsequently log the subscriber's
identity -- of course not necessarily the IMSI, if paging was done by TMSI.

This is only for Paging, not the Paging Response; for that see, L3 Complete.

Related: OS#2969
Change-Id: I0ab7bedfe693bb4e42a04fb0585b94a730ff2d9b
---
M src/libbsc/paging.c
1 file changed, 1 insertion(+), 0 deletions(-)



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

diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c
index cdcae51..820921c 100644
--- a/src/libbsc/paging.c
+++ b/src/libbsc/paging.c
@@ -388,6 +388,7 @@
struct gsm_bts *bts;

log_set_context(LOG_CTX_BSC_SUBSCR, bsub);
+   conn->bsub = bsc_subscr_get(bsub);

/* Stop this first and dispatch the request */
if (_bts) {

--
To view, visit https://gerrit.osmocom.org/9289
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ab7bedfe693bb4e42a04fb0585b94a730ff2d9b
Gerrit-Change-Number: 9289
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-bsc[master]: assignment: signal assignment failure on chan act nack

2018-05-24 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/9281


Change subject: assignment: signal assignment failure on chan act nack
..

assignment: signal assignment failure on chan act nack

When the BTS responds with a Chan Act NACK, i.e. the lchan could not be
activated, immediately signal Assignment Failure to the MSC (in
handle_chan_nack()).

In handle_chan_nack(), adjust log: instead of waiting for timeout, we now
signal Assignment Failure.

Cosmetic: in this file, the struct bsc_api* is typically named 'bsc', not
'api', so rename the arg.

Drop misleading logging from bsc_assign_fail(): instead of transmitting the
Assignment Failure message, it actually signals an FSM event. Leave logging of
that to the FSM logging.

Change-Id: Ib204b4a5272f9b7b60ca5f932cd8a4c857316270
---
M src/libbsc/bsc_api.c
M src/osmo-bsc/osmo_bsc_api.c
2 files changed, 3 insertions(+), 3 deletions(-)



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

diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index 8ae781e..043a5a7 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -825,14 +825,15 @@
 }

 static void handle_chan_nack(struct gsm_subscriber_connection *conn,
-struct bsc_api *api, struct gsm_lchan *lchan)
+struct bsc_api *bsc, struct gsm_lchan *lchan)
 {
if (conn->secondary_lchan != lchan)
return;

-   LOGPLCHAN(lchan, DMSC, LOGL_ERROR, "Channel activation failed. Waiting 
for timeout now\n");
+   LOGPLCHAN(lchan, DMSC, LOGL_ERROR, "Channel activation failed.\n");
conn->secondary_lchan->conn = NULL;
conn->secondary_lchan = NULL;
+   bsc->assign_fail(conn, GSM0808_CAUSE_RADIO_INTERFACE_FAILURE, NULL);
 }

 static __attribute__((constructor)) void on_dso_load_bsc(void)
diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c
index 8c16bde..e026b69 100644
--- a/src/osmo-bsc/osmo_bsc_api.c
+++ b/src/osmo-bsc/osmo_bsc_api.c
@@ -426,7 +426,6 @@
 static void bsc_assign_fail(struct gsm_subscriber_connection *conn,
uint8_t cause, uint8_t *rr_cause)
 {
-   LOGP(DMSC, LOGL_INFO, "Tx MSC ASSIGN FAIL\n");
osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_RR_ASS_FAIL, NULL);
 }


--
To view, visit https://gerrit.osmocom.org/9281
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib204b4a5272f9b7b60ca5f932cd8a4c857316270
Gerrit-Change-Number: 9281
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-bsc[master]: log: assignment: add two logs on unexpected lchan release

2018-05-24 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/9283


Change subject: log: assignment: add two logs on unexpected lchan release
..

log: assignment: add two logs on unexpected lchan release

Change-Id: Ib61125ebc41e55dc4a6595db8c8559c62b3ed2c0
---
M src/libbsc/bsc_api.c
1 file changed, 3 insertions(+), 0 deletions(-)



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

diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index 043a5a7..0f2bd12 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -777,6 +777,7 @@
 
switch (signal) {
case S_LCHAN_UNEXPECTED_RELEASE:
+   LOGPLCHAN(lchan, DMSC, LOGL_NOTICE, 
"S_LCHAN_UNEXPECTED_RELEASE\n");
handle_release(lchan->conn, bsc, lchan);
break;
case S_LCHAN_ACTIVATE_ACK:
@@ -794,6 +795,8 @@
   struct bsc_api *bsc, struct gsm_lchan *lchan)
 {
if (conn->secondary_lchan == lchan) {
+   LOGPLCHAN(lchan, DMSC, LOGL_NOTICE,
+ "lchan release on new lchan, Assignment failed\n");
osmo_timer_del(&conn->T10);
conn->secondary_lchan = NULL;


--
To view, visit https://gerrit.osmocom.org/9283
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib61125ebc41e55dc4a6595db8c8559c62b3ed2c0
Gerrit-Change-Number: 9283
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-bsc[master]: add bsc_stubs.h to workaround linking hell for utils and tests

2018-05-24 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/9279


Change subject: add bsc_stubs.h to workaround linking hell for utils and tests
..

add bsc_stubs.h to workaround linking hell for utils and tests

libbsc currently depends on functions defined in osmo-bsc/. Until we clean that
up, unify the place to define stubs that allow linking. (Otherwise I would edit
all those separate scopes for each new BSSMAP function.)

For reasons I can't even begin to understand, simply including this header with
trivial stubs suddenly causes the linker to require libosmo-mgcp-client and
libosmo-sigtran in bsc_test and gsm0408_test. Whatever, go ahead then.

Change-Id: I000be689ed071aced1a085284f924a7e77e5656d
---
M include/osmocom/bsc/Makefile.am
A include/osmocom/bsc/bsc_stubs.h
M src/ipaccess/ipaccess-config.c
M src/utils/bs11_config.c
M tests/abis/abis_test.c
M tests/bsc-nat/bsc_nat_test.c
M tests/bsc/Makefile.am
M tests/bsc/bsc_test.c
M tests/channel/channel_test.c
M tests/gsm0408/Makefile.am
M tests/gsm0408/gsm0408_test.c
M tests/handover/handover_test.c
M tests/nanobts_omlattr/nanobts_omlattr_test.c
13 files changed, 48 insertions(+), 36 deletions(-)



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

diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am
index b25dfd8..5a1370c 100644
--- a/include/osmocom/bsc/Makefile.am
+++ b/include/osmocom/bsc/Makefile.am
@@ -52,4 +52,5 @@
vty.h \
bsc_api.h \
penalty_timers.h \
+   bsc_stubs.h \
$(NULL)
diff --git a/include/osmocom/bsc/bsc_stubs.h b/include/osmocom/bsc/bsc_stubs.h
new file mode 100644
index 000..7b3244e
--- /dev/null
+++ b/include/osmocom/bsc/bsc_stubs.h
@@ -0,0 +1,22 @@
+/* libbsc currently references some BSSMAP functions only implemented within 
osmo-bsc/. Until that gets
+ * cleaned up properly, various utils and C tests need these stubs to 
successfully link a complete
+ * binary. This nonsense should disappear as soon as we get time to fix it. */
+
+struct gsm_subscriber_connection;
+struct msgb;
+struct gsm_lchan;
+struct gsm0808_handover_required;
+struct handover;
+
+int osmo_bsc_sigtran_send(struct gsm_subscriber_connection *conn, struct msgb 
*msg)
+{ OSMO_ASSERT(false); }
+
+int osmo_bsc_sigtran_open_conn(struct gsm_subscriber_connection *conn, struct 
msgb *msg)
+{ return 0; }
+
+int bsc_send_handover_required(struct gsm_lchan *lchan,
+  const struct gsm0808_handover_required *params)
+{ OSMO_ASSERT(false); }
+
+int bsc_send_handover_request_ack(struct handover *ho, struct msgb 
*rr_ho_command)
+{ OSMO_ASSERT(false); }
diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c
index 2236063..f88ca6e 100644
--- a/src/ipaccess/ipaccess-config.c
+++ b/src/ipaccess/ipaccess-config.c
@@ -55,6 +55,8 @@
 #include 
 #include 

+#include 
+
 struct gsm_network *bsc_gsmnet;

 static int net_listen_testnr;
@@ -1072,15 +1074,3 @@

exit(0);
 }
-
-/* Stub */
-int osmo_bsc_sigtran_send(struct gsm_subscriber_connection *conn, struct msgb 
*msg)
-{
-   return 0;
-}
-
-/* Stub */
-int osmo_bsc_sigtran_open_conn(struct gsm_subscriber_connection *conn, struct 
msgb *msg)
-{
-   return 0;
-}
diff --git a/src/utils/bs11_config.c b/src/utils/bs11_config.c
index 8d4de01..831c198 100644
--- a/src/utils/bs11_config.c
+++ b/src/utils/bs11_config.c
@@ -45,6 +45,8 @@
 #include 
 #include 

+#include 
+
 static void *tall_bs11cfg_ctx;
 static struct e1inp_sign_link *oml_link;

@@ -969,15 +971,3 @@

exit(0);
 }
-
-/* Stub */
-int osmo_bsc_sigtran_send(struct gsm_subscriber_connection *conn, struct msgb 
*msg)
-{
-   return 0;
-}
-
-/* Stub */
-int osmo_bsc_sigtran_open_conn(struct gsm_subscriber_connection *conn, struct 
msgb *msg)
-{
-   return 0;
-}
diff --git a/tests/abis/abis_test.c b/tests/abis/abis_test.c
index faf9ea5..93f5924 100644
--- a/tests/abis/abis_test.c
+++ b/tests/abis/abis_test.c
@@ -29,6 +29,8 @@
 #include 
 #include 

+#include 
+
 static const uint8_t load_config[] = {
0x42, 0x12, 0x00, 0x08, 0x31, 0x36, 0x38, 0x64,
0x34, 0x37, 0x32, 0x00, 0x13, 0x00, 0x0b, 0x76,
diff --git a/tests/bsc-nat/bsc_nat_test.c b/tests/bsc-nat/bsc_nat_test.c
index 7aa39ec..fcc01f2 100644
--- a/tests/bsc-nat/bsc_nat_test.c
+++ b/tests/bsc-nat/bsc_nat_test.c
@@ -29,6 +29,8 @@
 #include 
 #include 

+#include 
+
 #include 
 #include 
 #include 
diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am
index a436c27..89e897c 100644
--- a/tests/bsc/Makefile.am
+++ b/tests/bsc/Makefile.am
@@ -9,7 +9,7 @@
$(LIBOSMOCORE_CFLAGS) \
$(LIBOSMOGSM_CFLAGS) \
$(LIBOSMOABIS_CFLAGS) \
-   $(LIBOSMOLEGACYMGCP_CFLAGS) \
+   $(LIBOSMOMGCPCLIENT_CFLAGS) \
$(LIBOSMOSIGTRAN_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(NULL)
@@ -37,7 +37,8 @@
$(LIBOSMOGSM_LIBS) \
$(LIB

Change in osmo-bsc[master]: use libosmocore's gsm0808_permitted_speech(), gsm0808_chosen_channel()

2018-05-24 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/9284


Change subject: use libosmocore's gsm0808_permitted_speech(), 
gsm0808_chosen_channel()
..

use libosmocore's gsm0808_permitted_speech(), gsm0808_chosen_channel()

The guts of bssap_speech_from_lchan() and lchan_to_chosen_channel() have been
moved to libosmocore; call that. The functions become mere wrappers to feed the
right lchan members.

Depends: I8a3cc5d4548e9a78d945d54c69ccced251edcec9 (libosmocore)
Change-Id: Ib5c940a9dae11c5e26d4b47fa9d95fef889ad2f6
---
M src/libbsc/bsc_subscr_conn_fsm.c
1 file changed, 5 insertions(+), 72 deletions(-)



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

diff --git a/src/libbsc/bsc_subscr_conn_fsm.c b/src/libbsc/bsc_subscr_conn_fsm.c
index 7617dba..e1706d2 100644
--- a/src/libbsc/bsc_subscr_conn_fsm.c
+++ b/src/libbsc/bsc_subscr_conn_fsm.c
@@ -147,82 +147,15 @@
 /* See TS 48.008 3.2.2.11 Channel Type Octet 5 */
 static int bssap_speech_from_lchan(const struct gsm_lchan *lchan)
 {
-   switch (lchan->type) {
-   case GSM_LCHAN_TCH_H:
-   switch (lchan->tch_mode) {
-   case GSM48_CMODE_SPEECH_V1:
-   return 0x05;
-   case GSM48_CMODE_SPEECH_AMR:
-   return 0x25;
-   default:
-   return -1;
-   }
-   break;
-   case GSM_LCHAN_TCH_F:
-   switch (lchan->tch_mode) {
-   case GSM48_CMODE_SPEECH_V1:
-   return 0x01;
-   case GSM48_CMODE_SPEECH_EFR:
-   return 0x11;
-   case GSM48_CMODE_SPEECH_AMR:
-   return 0x21;
-   default:
-   return -1;
-   }
-   break;
-   default:
-   return -1;
-   }
+   return gsm0808_permitted_speech(lchan->type, lchan->tch_mode);
 }

-/* GSM 08.08 3.2.2.33 */
 static uint8_t lchan_to_chosen_channel(struct gsm_lchan *lchan)
 {
-   uint8_t channel_mode = 0, channel = 0;
-
-   switch (lchan->tch_mode) {
-   case GSM48_CMODE_SPEECH_V1:
-   case GSM48_CMODE_SPEECH_EFR:
-   case GSM48_CMODE_SPEECH_AMR:
-   channel_mode = 0x9;
-   break;
-   case GSM48_CMODE_SIGN:
-   channel_mode = 0x8;
-   break;
-   case GSM48_CMODE_DATA_14k5:
-   channel_mode = 0xe;
-   break;
-   case GSM48_CMODE_DATA_12k0:
-   channel_mode = 0xb;
-   break;
-   case GSM48_CMODE_DATA_6k0:
-   channel_mode = 0xc;
-   break;
-   case GSM48_CMODE_DATA_3k6:
-   channel_mode = 0xd;
-   break;
-   }
-
-   switch (lchan->type) {
-   case GSM_LCHAN_NONE:
-   channel = 0x0;
-   break;
-   case GSM_LCHAN_SDCCH:
-   channel = 0x1;
-   break;
-   case GSM_LCHAN_TCH_F:
-   channel = 0x8;
-   break;
-   case GSM_LCHAN_TCH_H:
-   channel = 0x9;
-   break;
-   case GSM_LCHAN_UNKNOWN:
-   default:
-   LOGP(DMSC, LOGL_ERROR, "Unknown lchan type: %p\n", lchan);
-   break;
-   }
-
-   return channel_mode << 4 | channel;
+   uint8_t chosen_channel = gsm0808_chosen_channel(lchan->tch_mode, 
lchan->type);
+   if (!chosen_channel)
+   LOGP(DMSC, LOGL_ERROR, "Unknown lchan type or TCH mode: %s\n", 
gsm_lchan_name(lchan));
+   return chosen_channel;
 }

 /* Generate and send assignment complete message */

--
To view, visit https://gerrit.osmocom.org/9284
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5c940a9dae11c5e26d4b47fa9d95fef889ad2f6
Gerrit-Change-Number: 9284
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-bsc[master]: gscon: put subscriber a little later

2018-05-24 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/9287


Change subject: gscon: put subscriber a little later
..

gscon: put subscriber a little later

Keep the bsc_subscr associated with the conn as long as possible, to benefit
logging, which then contains the subscriber identity (if any).

Change-Id: Ifa528b58842a02509bfe0af6915c64bd67058bcd
---
M src/libbsc/bsc_subscr_conn_fsm.c
1 file changed, 6 insertions(+), 6 deletions(-)



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

diff --git a/src/libbsc/bsc_subscr_conn_fsm.c b/src/libbsc/bsc_subscr_conn_fsm.c
index e1706d2..9f44078 100644
--- a/src/libbsc/bsc_subscr_conn_fsm.c
+++ b/src/libbsc/bsc_subscr_conn_fsm.c
@@ -967,12 +967,6 @@
conn->lchan = NULL;
}

-   if (conn->bsub) {
-   LOGPFSML(fi, LOGL_DEBUG, "Putting bsc_subscr\n");
-   bsc_subscr_put(conn->bsub);
-   conn->bsub = NULL;
-   }
-
if (conn->sccp.state != SUBSCR_SCCP_ST_NONE) {
LOGPFSML(fi, LOGL_DEBUG, "Disconnecting SCCP\n");
struct bsc_msc_data *msc = conn->sccp.msc;
@@ -986,6 +980,12 @@

penalty_timers_free(&conn->hodec2.penalty_timers);

+   if (conn->bsub) {
+   LOGPFSML(fi, LOGL_DEBUG, "Putting bsc_subscr\n");
+   bsc_subscr_put(conn->bsub);
+   conn->bsub = NULL;
+   }
+
llist_del(&conn->entry);
talloc_free(conn);
fi->priv = NULL;

--
To view, visit https://gerrit.osmocom.org/9287
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa528b58842a02509bfe0af6915c64bd67058bcd
Gerrit-Change-Number: 9287
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-bsc[master]: cosmetic: bsc_subscr_alloc: log initial get

2018-05-24 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/9286


Change subject: cosmetic: bsc_subscr_alloc: log initial get
..

cosmetic: bsc_subscr_alloc: log initial get

Instead of silently setting the use count to 1, instead increment with an
explicit bsc_subsct_get(), which then logs the event along with the place that
created the subscriber.

Change-Id: Ia72f8010b7b2e1ca44e3b005c0f2c05f3eeae8d5
---
M src/libbsc/bsc_subscriber.c
M tests/subscr/bsc_subscr_test.err
2 files changed, 5 insertions(+), 3 deletions(-)



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

diff --git a/src/libbsc/bsc_subscriber.c b/src/libbsc/bsc_subscriber.c
index d9d90ba..65a660b 100644
--- a/src/libbsc/bsc_subscriber.c
+++ b/src/libbsc/bsc_subscriber.c
@@ -41,7 +41,6 @@
return NULL;

llist_add_tail(&bsub->entry, list);
-   bsub->use_count = 1;

return bsub;
 }
@@ -92,7 +91,7 @@
return bsub;
bsub = bsc_subscr_alloc(list);
bsc_subscr_set_imsi(bsub, imsi);
-   return bsub;
+   return bsc_subscr_get(bsub);
 }

 struct bsc_subscr *bsc_subscr_find_or_create_by_tmsi(struct llist_head *list,
@@ -104,7 +103,7 @@
return bsub;
bsub = bsc_subscr_alloc(list);
bsub->tmsi = tmsi;
-   return bsub;
+   return bsc_subscr_get(bsub);
 }

 const char *bsc_subscr_name(struct bsc_subscr *bsub)
diff --git a/tests/subscr/bsc_subscr_test.err b/tests/subscr/bsc_subscr_test.err
index a66317a..afc8bf7 100644
--- a/tests/subscr/bsc_subscr_test.err
+++ b/tests/subscr/bsc_subscr_test.err
@@ -1,5 +1,8 @@
+DREF BSC subscr IMSI:1234567890 usage increases to: 1
 DREF BSC subscr IMSI:1234567890 usage increases to: 2
 DREF BSC subscr IMSI:1234567890 usage decreases to: 1
+DREF BSC subscr IMSI:9876543210 usage increases to: 1
+DREF BSC subscr IMSI:5656565656 usage increases to: 1
 DREF BSC subscr IMSI:1234567890 usage increases to: 2
 DREF BSC subscr IMSI:1234567890 usage decreases to: 1
 DREF BSC subscr IMSI:9876543210 usage increases to: 2

--
To view, visit https://gerrit.osmocom.org/9286
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia72f8010b7b2e1ca44e3b005c0f2c05f3eeae8d5
Gerrit-Change-Number: 9286
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-bsc[master]: cosmetic: penalty timers: constify, tweak doc

2018-05-24 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/9285


Change subject: cosmetic: penalty timers: constify, tweak doc
..

cosmetic: penalty timers: constify, tweak doc

Change-Id: I28addc9a16a4c81978290303d368f630a8334228
---
M include/osmocom/bsc/penalty_timers.h
M src/libbsc/penalty_timers.c
2 files changed, 15 insertions(+), 10 deletions(-)



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

diff --git a/include/osmocom/bsc/penalty_timers.h 
b/include/osmocom/bsc/penalty_timers.h
index 4b1dcce..3aae8a0 100644
--- a/include/osmocom/bsc/penalty_timers.h
+++ b/include/osmocom/bsc/penalty_timers.h
@@ -10,24 +10,29 @@
  * returns an empty struct penalty_timers.  */
 struct penalty_timers *penalty_timers_init(void *ctx);

-/* Add a penalty timer for a BTS.
+/* Add a penalty timer for an arbitary object.
+ * Note: the ownership of for_object remains with the caller; it is handled as 
a mere void* value, so
+ * invalid pointers can be handled without problems, while common sense 
dictates that invalidated
+ * pointers (freed objects) should probably be removed from this list. More 
importantly, the pointer must
+ * match any pointers used to query penalty timers, so for_object should 
reference some global/singleton
+ * object that tends to stay around longer than the penalty timers.
  * param pt: penalty timers list as from penalty_timers_init().
  * param for_object: arbitrary pointer reference to store a penalty timer for 
(passing NULL is possible,
  * but note that penalty_timers_clear() will clear all timers if given 
for_object=NULL).
  * param timeout: penalty time in seconds. */
-void penalty_timers_add(struct penalty_timers *pt, void *for_object, int 
timeout);
+void penalty_timers_add(struct penalty_timers *pt, const void *for_object, int 
timeout);

-/* Return the amount of penalty time remaining for a BTS.
+/* Return the amount of penalty time remaining for an object.
  * param pt: penalty timers list as from penalty_timers_init().
  * param for_object: arbitrary pointer reference to query penalty timers for.
  * returns seconds remaining until all penalty time has expired. */
-unsigned int penalty_timers_remaining(struct penalty_timers *pt, void 
*for_object);
+unsigned int penalty_timers_remaining(struct penalty_timers *pt, const void 
*for_object);

-/* Clear penalty timers for one or all BTS.
+/* Clear penalty timers for one or all objects.
  * param pt: penalty timers list as from penalty_timers_init().
  * param for_object: arbitrary pointer reference to clear penalty time for,
  *   or NULL to clear all timers. */
-void penalty_timers_clear(struct penalty_timers *pt, void *for_object);
+void penalty_timers_clear(struct penalty_timers *pt, const void *for_object);

 /* Free a struct as returned from penalty_timers_init().
  * Clear all timers from the list, deallocate the list and set the pointer to 
NULL.
diff --git a/src/libbsc/penalty_timers.c b/src/libbsc/penalty_timers.c
index b80fec9..02cf246 100644
--- a/src/libbsc/penalty_timers.c
+++ b/src/libbsc/penalty_timers.c
@@ -34,7 +34,7 @@

 struct penalty_timer {
struct llist_head entry;
-   void *for_object;
+   const void *for_object;
unsigned int timeout;
 };

@@ -55,7 +55,7 @@
return pt;
 }

-void penalty_timers_add(struct penalty_timers *pt, void *for_object, int 
timeout)
+void penalty_timers_add(struct penalty_timers *pt, const void *for_object, int 
timeout)
 {
struct penalty_timer *timer;
unsigned int now;
@@ -89,7 +89,7 @@
llist_add_tail(&timer->entry, &pt->timers);
 }

-unsigned int penalty_timers_remaining(struct penalty_timers *pt, void 
*for_object)
+unsigned int penalty_timers_remaining(struct penalty_timers *pt, const void 
*for_object)
 {
struct penalty_timer *timer;
unsigned int now = time_now();
@@ -107,7 +107,7 @@
return max_remaining;
 }

-void penalty_timers_clear(struct penalty_timers *pt, void *for_object)
+void penalty_timers_clear(struct penalty_timers *pt, const void *for_object)
 {
struct penalty_timer *timer, *timer2;
llist_for_each_entry_safe(timer, timer2, &pt->timers, entry) {

--
To view, visit https://gerrit.osmocom.org/9285
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I28addc9a16a4c81978290303d368f630a8334228
Gerrit-Change-Number: 9285
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-bsc[master]: try to pick up subsrc IMSI on l3-compl

2018-05-24 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/9288


Change subject: try to pick up subsrc IMSI on l3-compl
..

try to pick up subsrc IMSI on l3-compl

This is a tiny step towards being aware of a connection's subscriber identity.
Iff the Layer 3 Complete message contains an IMSI, associate a bsc_subscr with
the conn, so that subsequent logging and possibly meas_feed contains the IMSI.

For any L3 Complete using TMSI, this has no effect whatsoever.

Related: OS#2969
Change-Id: I3b696a0c0932e3abcb682ba231db65755d8c27a6
---
M src/osmo-bsc/osmo_bsc_api.c
1 file changed, 17 insertions(+), 1 deletion(-)



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

diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c
index e026b69..4773488 100644
--- a/src/osmo-bsc/osmo_bsc_api.c
+++ b/src/osmo-bsc/osmo_bsc_api.c
@@ -20,10 +20,12 @@
 #include 
 #include 
 #include 
+#include 
 #include 

 #include 
 #include 
+#include 

 #include 
 #include 
@@ -261,8 +263,22 @@
return BSC_API_CONN_POL_REJECT;
}

-   if (imsi)
+   /* TODO: also extract TMSI. We get an IMSI only when an initial L3 
Complete comes in that
+* contains an IMSI. We filter by IMSI. A TMSI identity is never 
returned here, see e.g.
+* _cr_check_loc_upd() and other similar functions called from 
bsc_msg_filter_initial(). */
+   if (imsi) {
conn->filter_state.imsi = talloc_steal(conn, imsi);
+   if (conn->bsub) {
+   /* Already a subscriber on L3 Complete? Should never 
happen... */
+   if (conn->bsub->imsi[0]
+   && strcmp(conn->bsub->imsi, imsi))
+   LOGP(DMSC, LOGL_ERROR, "Subscriber's IMSI 
changes from %s to %s\n",
+conn->bsub->imsi, imsi);
+   bsc_subscr_set_imsi(conn->bsub, imsi);
+   } else
+   conn->bsub = 
bsc_subscr_find_or_create_by_imsi(msc->network->bsc_subscribers,
+  imsi);
+   }
conn->filter_state.con_type = con_type;

/* check return value, if failed check msg for and send USSD */

--
To view, visit https://gerrit.osmocom.org/9288
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b696a0c0932e3abcb682ba231db65755d8c27a6
Gerrit-Change-Number: 9288
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-bsc[master]: HO: introduce T7, T8, T101 timers

2018-05-24 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/9291


Change subject: HO: introduce T7, T8, T101 timers
..

HO: introduce T7, T8, T101 timers

Will be used in upcoming inter-BSC handover.

Change-Id: If9e793426d214019f299b19d6ffa5a186546
---
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_vty.c
M src/libbsc/net_init.c
3 files changed, 20 insertions(+), 1 deletion(-)



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

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 5ba4362..aee7c5e 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -1174,6 +1174,9 @@
 #define GSM_T3119_DEFAULT 10
 #define GSM_T3122_DEFAULT 10
 #define GSM_T3141_DEFAULT 10
+#define GSM_T7_DEFAULT 10  /* inter-BSC MO Handover first timeout, in 
seconds */
+#define GSM_T8_DEFAULT 10  /* inter-BSC MO Handover second timeout, in 
seconds */
+#define GSM_T101_DEFAULT 10/* inter-BSC MT Handover timeout, in seconds */

 struct gsm_tz {
int override; /* if 0, use system's time zone instead. */
@@ -1210,7 +1213,7 @@

/* timer values */
int T3101;
-   int T3103;
+   int T3103; /*< Handover timeout */
int T3105;
int T3107;
int T3109;
@@ -1221,6 +1224,9 @@
int T3119;
int T3122;
int T3141;
+   int T7; /*< inter-BSC handover MO timeout from Handover Required to 
Handover Command */
+   int T8; /*< inter-BSC handover MO timeout from Handover Command to 
final Clear*/
+   int T101; /*< inter-BSC handover MT timeout from Handover Request to 
Handover Accept */

enum gsm_chan_t ctype_by_chreq[_NUM_CHREQ_T];

diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index e53a14f..ee00d04 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -1001,6 +1001,10 @@
VTY_OUT_TIMER(3119);
VTY_OUT_TIMER(3122);
VTY_OUT_TIMER(3141);
+   VTY_OUT_TIMER(7);
+   VTY_OUT_TIMER(8);
+   VTY_OUT_TIMER(101);
+
if (!gsmnet->dyn_ts_allow_tch_f)
vty_out(vty, " dyn_ts_allow_tch_f 0%s", VTY_NEWLINE);
if (gsmnet->tz.override != 0) {
@@ -1898,6 +1902,9 @@
 DECLARE_TIMER(3119, "Currently not used")
 DECLARE_TIMER(3122, "Default waiting time (seconds) after IMM ASS REJECT")
 DECLARE_TIMER(3141, "Currently not used")
+DECLARE_TIMER(7, "Set the outgoing inter-BSC Handover timeout, from Handover 
Required to Handover Command")
+DECLARE_TIMER(8, "Set the outgoing inter-BSC Handover timeout, from Handover 
Command to final Clear")
+DECLARE_TIMER(101, "Set the incoming inter-BSC Handover timeout, from Handover 
Request to Accept")

 DEFUN_DEPRECATED(cfg_net_dtx,
 cfg_net_dtx_cmd,
@@ -4823,6 +4830,9 @@
install_element(GSMNET_NODE, &cfg_net_T3119_cmd);
install_element(GSMNET_NODE, &cfg_net_T3122_cmd);
install_element(GSMNET_NODE, &cfg_net_T3141_cmd);
+   install_element(GSMNET_NODE, &cfg_net_T7_cmd);
+   install_element(GSMNET_NODE, &cfg_net_T8_cmd);
+   install_element(GSMNET_NODE, &cfg_net_T101_cmd);
install_element(GSMNET_NODE, &cfg_net_dtx_cmd);
install_element(GSMNET_NODE, &cfg_net_pag_any_tch_cmd);
/* See also handover commands added on net level from handover_vty.c */
diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c
index f03a2e1..d8b2093 100644
--- a/src/libbsc/net_init.c
+++ b/src/libbsc/net_init.c
@@ -89,6 +89,9 @@
net->T3119 = GSM_T3119_DEFAULT;
net->T3122 = GSM_T3122_DEFAULT;
net->T3141 = GSM_T3141_DEFAULT;
+   net->T7 = GSM_T7_DEFAULT;
+   net->T8 = GSM_T8_DEFAULT;
+   net->T101 = GSM_T101_DEFAULT;

net->ho = ho_cfg_init(net, NULL);
net->hodec2.congestion_check_interval_s = 
HO_CFG_CONGESTION_CHECK_DEFAULT;

--
To view, visit https://gerrit.osmocom.org/9291
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If9e793426d214019f299b19d6ffa5a186546
Gerrit-Change-Number: 9291
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-bsc[master]: cosmetic: handover_test: add IMSI to subscr for logging

2018-05-24 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/9290


Change subject: cosmetic: handover_test: add IMSI to subscr for logging
..

cosmetic: handover_test: add IMSI to subscr for logging

Change-Id: I52fa8f3183c93ed362d8252d20daf00c60a117c8
---
M tests/handover/handover_test.c
1 file changed, 11 insertions(+), 1 deletion(-)



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

diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index caa57c1..926ecda 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -242,8 +242,12 @@

 void create_conn(struct gsm_lchan *lchan)
 {
+   static unsigned int next_imsi = 0;
+   char imsi[sizeof(lchan->conn->bsub->imsi)];
+   struct gsm_network *net = lchan->ts->trx->bts->network;
struct gsm_subscriber_connection *conn;
-   conn = bsc_subscr_con_allocate(lchan->ts->trx->bts->network);
+
+   conn = bsc_subscr_con_allocate(net);

/* CAUTION HACK: When __real_mgcp_conn_modify() is called by the GSCON
 * FSM, then we need to know the reference to caller FSM (GSCON FSM).
@@ -257,6 +261,12 @@

lchan->conn = conn;
conn->lchan = lchan;
+
+   /* Make up a new IMSI for this test, for logging the subscriber */
+   next_imsi ++;
+   snprintf(imsi, sizeof(imsi), "%06u", next_imsi);
+   lchan->conn->bsub = 
bsc_subscr_find_or_create_by_imsi(net->bsc_subscribers, imsi);
+
/* kick the FSM from INIT through to the ACTIVE state */
osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_A_CONN_REQ, NULL);
osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_A_CONN_CFM, NULL);

--
To view, visit https://gerrit.osmocom.org/9290
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I52fa8f3183c93ed362d8252d20daf00c60a117c8
Gerrit-Change-Number: 9290
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 


Change in osmo-bsc[master]: cosmetic: gscon: drop odd use of OSMO_STRINGIFY

2018-05-24 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/9292


Change subject: cosmetic: gscon: drop odd use of OSMO_STRINGIFY
..

cosmetic: gscon: drop odd use of OSMO_STRINGIFY

Do not invoke OSMO_STRINGIFY() with arbitrary names, just quote instead.

The idea was that OSMO_STRINGIFY() avoids typos by ensuring well-defined names
are stringified, but this highlights that OSMO_STRINGIFY() is in fact usable
with completely arbitrary arguments and actually lacks the validation part :/

Change-Id: I458cd2cd0d6ddb0e6db3bb8d546a20336ae8c5f1
---
M src/libbsc/bsc_subscr_conn_fsm.c
1 file changed, 15 insertions(+), 15 deletions(-)



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

diff --git a/src/libbsc/bsc_subscr_conn_fsm.c b/src/libbsc/bsc_subscr_conn_fsm.c
index 9f44078..84d4cc8 100644
--- a/src/libbsc/bsc_subscr_conn_fsm.c
+++ b/src/libbsc/bsc_subscr_conn_fsm.c
@@ -791,19 +791,19 @@

 static const struct osmo_fsm_state gscon_fsm_states[] = {
[ST_INIT] = {
-   .name = OSMO_STRINGIFY(INIT),
+   .name = "INIT",
.in_event_mask = S(GSCON_EV_A_CONN_REQ) | 
S(GSCON_EV_A_CONN_IND),
.out_state_mask = S(ST_WAIT_CC),
.action = gscon_fsm_init,
 },
[ST_WAIT_CC] = {
-   .name = OSMO_STRINGIFY(WAIT_CC),
+   .name = "WAIT_CC",
.in_event_mask = S(GSCON_EV_A_CONN_CFM),
.out_state_mask = S(ST_ACTIVE),
.action = gscon_fsm_wait_cc,
},
[ST_ACTIVE] = {
-   .name = OSMO_STRINGIFY(ACTIVE),
+   .name = "ACTIVE",
.in_event_mask = EV_TRANSPARENT_SCCP | 
S(GSCON_EV_A_ASSIGNMENT_CMD) |
 S(GSCON_EV_A_HO_REQ) | S(GSCON_EV_HO_START),
.out_state_mask = S(ST_CLEARING) | S(ST_WAIT_CRCX_BTS) | 
S(ST_WAIT_ASS_CMPL) |
@@ -811,37 +811,37 @@
.action = gscon_fsm_active,
},
[ST_WAIT_CRCX_BTS] = {
-   .name = OSMO_STRINGIFY(WAIT_CRCX_BTS),
+   .name = "WAIT_CRCX_BTS",
.in_event_mask = EV_TRANSPARENT_SCCP | 
S(GSCON_EV_MGW_CRCX_RESP_BTS),
.out_state_mask = S(ST_ACTIVE) | S(ST_WAIT_ASS_CMPL),
.action = gscon_fsm_wait_crcx_bts,
},
[ST_WAIT_ASS_CMPL] = {
-   .name = OSMO_STRINGIFY(WAIT_ASS_CMPL),
+   .name = "WAIT_ASS_CMPL",
.in_event_mask = EV_TRANSPARENT_SCCP | S(GSCON_EV_RR_ASS_COMPL) 
| S(GSCON_EV_RR_ASS_FAIL),
.out_state_mask = S(ST_ACTIVE) | S(ST_WAIT_MDCX_BTS),
.action = gscon_fsm_wait_ass_cmpl,
},
[ST_WAIT_MDCX_BTS] = {
-   .name = OSMO_STRINGIFY(WAIT_MDCX_BTS),
+   .name = "WAIT_MDCX_BTS",
.in_event_mask = EV_TRANSPARENT_SCCP | 
S(GSCON_EV_MGW_MDCX_RESP_BTS),
.out_state_mask = S(ST_ACTIVE) | S(ST_WAIT_CRCX_MSC),
.action = gscon_fsm_wait_mdcx_bts,
},
[ST_WAIT_CRCX_MSC] = {
-   .name = OSMO_STRINGIFY(WAIT_CRCX_MSC),
+   .name = "WAIT_CRCX_MSC",
.in_event_mask = EV_TRANSPARENT_SCCP | 
S(GSCON_EV_MGW_CRCX_RESP_MSC),
.out_state_mask = S(ST_ACTIVE),
.action = gscon_fsm_wait_crcx_msc,
},
[ST_WAIT_MODE_MODIFY_ACK] = {
-   .name = OSMO_STRINGIFY(WAIT_MODE_MODIFY_ACK),
+   .name = "WAIT_MODE_MODIFY_ACK",
.in_event_mask = EV_TRANSPARENT_SCCP | 
S(GSCON_EV_RR_MODE_MODIFY_ACK),
.out_state_mask = S(ST_ACTIVE) | S(ST_CLEARING),
.action = gscon_fsm_wait_mode_modify_ack,
},
[ST_CLEARING] = {
-   .name = OSMO_STRINGIFY(CLEARING),
+   .name = "CLEARING",
.in_event_mask = S(GSCON_EV_RSL_CLEAR_COMPL),
.action = gscon_fsm_clearing,
 },
@@ -850,27 +850,27 @@
 * program flow in handover_logic.c a bit and handle some of the logic
 * here? */
[ST_WAIT_MT_HO_ACC] = {
-   .name = OSMO_STRINGIFY(WAIT_MT_HO_ACC),
+   .name = "WAIT_MT_HO_ACC",
},
[ST_WAIT_MT_HO_COMPL] = {
-.name = OSMO_STRINGIFY(WAIT_MT_HO_COMPL),
+.name = "WAIT_MT_HO_COMPL",
},
[ST_WAIT_MO_HO_CMD] = {
-   .name = OSMO_STRINGIFY(WAIT_MO_HO_CMD),
+   .name = "WAIT_MO_HO_CMD",
},
[ST_MO_HO_PROCEEDING] = {
-.name = OSMO_STRINGIFY(MO_HO_PROCEEDING),
+.name = "MO_HO_PROCEEDING",
},

/* Internal handover */
[ST_WAIT_HO_COMPL] = {
-   .name = OSMO_STRINGIFY(WAIT_HO_COMPL),
+   .name = "WAIT_HO_COMPL",
.in_event_mask = S(GSCON_EV_HO_COMPL) | S(GSCON_EV_HO_FAIL) | 
S

Change in libosmocore[master]: Add a 'show rate-counters' VTY command.

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9278 )

Change subject: Add a 'show rate-counters' VTY command.
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9278
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id60a5aa2d961ae99cddf1e776358a5517dbc573d
Gerrit-Change-Number: 9278
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Thu, 24 May 2018 17:53:25 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: ansible: add a simple README.md

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9276 )

Change subject: ansible: add a simple README.md
..


Patch Set 1: Verified+1 Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9276
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I96057bb92faa8e3375c5bad20ef1536475807b67
Gerrit-Change-Number: 9276
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 24 May 2018 17:55:35 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: ansible: add a simple README.md

2018-05-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9276 )

Change subject: ansible: add a simple README.md
..

ansible: add a simple README.md

Change-Id: I96057bb92faa8e3375c5bad20ef1536475807b67
---
A ansible/README.md
1 file changed, 20 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/ansible/README.md b/ansible/README.md
new file mode 100644
index 000..21763f4
--- /dev/null
+++ b/ansible/README.md
@@ -0,0 +1,20 @@
+# ansible repository
+
+Ansible is an automisation, provisioning and configuration management utility.
+
+# How to use it?
+
+- you need ansible installed (version 2.4, other might work as well)
+
+# How to setup the gsm-tester?
+
+`ansible-playbook -i hosts setup-gsm-tester.yml`
+
+Your ssh key need to be deployed on the host.
+Further information on this job can be found in **setup-gsm-tester.md**.
+
+# How to setup a jenkin slave?
+
+`ansible-playbook -i hosts setup-jenkins-slave.yml`
+
+Further information on this job and around the setup can be found on the 
redmine wiki.

--
To view, visit https://gerrit.osmocom.org/9276
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I96057bb92faa8e3375c5bad20ef1536475807b67
Gerrit-Change-Number: 9276
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-ci[master]: ansible: gsm-tester: add jenkins to the dialout group

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9275 )

Change subject: ansible: gsm-tester: add jenkins to the dialout group
..


Patch Set 1: Verified+1 Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9275
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Icc7b3fa9ca7c14360d78069d8d42e6039afda32b
Gerrit-Change-Number: 9275
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 24 May 2018 17:55:57 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: ansible/setup-gsm-tester: add docker

2018-05-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9274 )

Change subject: ansible/setup-gsm-tester: add docker
..

ansible/setup-gsm-tester: add docker

Change-Id: Idfd96c4e3556b93ca85acb94a2176ec269a906d1
---
M ansible/setup-gsm-tester.yml
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/ansible/setup-gsm-tester.yml b/ansible/setup-gsm-tester.yml
index a1a0389..36c8287 100644
--- a/ansible/setup-gsm-tester.yml
+++ b/ansible/setup-gsm-tester.yml
@@ -38,6 +38,11 @@
   tags:
 - jenkins-slave

+- name: docker
+  jenkins_user: jenkins
+  tags:
+- docker
+
 - name: udhcpd
   udhcpd_router: 10.42.42.1
   udhcpd_range_start: 10.42.42.230

--
To view, visit https://gerrit.osmocom.org/9274
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idfd96c4e3556b93ca85acb94a2176ec269a906d1
Gerrit-Change-Number: 9274
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-ci[master]: ansible: gsm-tester: add jenkins to the dialout group

2018-05-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9275 )

Change subject: ansible: gsm-tester: add jenkins to the dialout group
..

ansible: gsm-tester: add jenkins to the dialout group

To access tty*

Change-Id: Icc7b3fa9ca7c14360d78069d8d42e6039afda32b
---
M ansible/roles/gsm-tester/tasks/main.yml
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/ansible/roles/gsm-tester/tasks/main.yml 
b/ansible/roles/gsm-tester/tasks/main.yml
index f7eb1ee..2b00270 100644
--- a/ansible/roles/gsm-tester/tasks/main.yml
+++ b/ansible/roles/gsm-tester/tasks/main.yml
@@ -150,6 +150,7 @@
   with_items:
 - systemd-journal
 - osmo-gsm-tester
+- dialout

 - name: setup state directory
   file:

--
To view, visit https://gerrit.osmocom.org/9275
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Icc7b3fa9ca7c14360d78069d8d42e6039afda32b
Gerrit-Change-Number: 9275
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-ci[master]: ansible/setup-gsm-tester: add docker

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9274 )

Change subject: ansible/setup-gsm-tester: add docker
..


Patch Set 1: Verified+1 Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9274
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idfd96c4e3556b93ca85acb94a2176ec269a906d1
Gerrit-Change-Number: 9274
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 24 May 2018 17:55:48 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-sip-connector[master]: Logging: Log mncc_names in mncc_data()

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9269 )

Change subject: Logging: Log mncc_names in mncc_data()
..


Patch Set 3: Code-Review+2

just a general comment: Have you seen udtrace which I created for better 
tracing on the MNCC socket?  See https://github.com/laf0rge/udtrace


--
To view, visit https://gerrit.osmocom.org/9269
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I161d1b841ac5fe1b7e092b329ae0674cb340f5ac
Gerrit-Change-Number: 9269
Gerrit-PatchSet: 3
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 24 May 2018 17:57:31 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: library: PCUIF_CodecPort: Log PCU socket connect error string

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9273 )

Change subject: library: PCUIF_CodecPort: Log PCU socket connect error string
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9273
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7045061770cda5b50d05dbf756656e380084a703
Gerrit-Change-Number: 9273
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Thu, 24 May 2018 17:58:22 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: library: PCUIF_CodecPort: Log PCU socket connect error string

2018-05-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9273 )

Change subject: library: PCUIF_CodecPort: Log PCU socket connect error string
..

library: PCUIF_CodecPort: Log PCU socket connect error string

Change-Id: I7045061770cda5b50d05dbf756656e380084a703
---
M library/PCUIF_CodecPort.ttcn
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/library/PCUIF_CodecPort.ttcn b/library/PCUIF_CodecPort.ttcn
index fe428af..c642202 100644
--- a/library/PCUIF_CodecPort.ttcn
+++ b/library/PCUIF_CodecPort.ttcn
@@ -65,7 +65,11 @@
[] pt.receive(UD_connect_result:?) -> value res {
if (ispresent(res.result) and ispresent(res.result.result_code) 
and
res.result.result_code == ERROR) {
-   setverdict(fail, "Error connecting to PCU socket");
+   if (ispresent(res.result.err)) {
+   setverdict(fail, "Error connecting to PCU 
socket: ", res.result.err);
+   } else {
+   setverdict(fail, "Error connecting to PCU 
socket");
+   }
self.stop;
} else {
return res.id;

--
To view, visit https://gerrit.osmocom.org/9273
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I7045061770cda5b50d05dbf756656e380084a703
Gerrit-Change-Number: 9273
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


Change in osmo-ttcn3-hacks[master]: BSSAP/IPA integration: Wait for SCCPLite to be established

2018-05-24 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/9293


Change subject: BSSAP/IPA integration: Wait for SCCPLite to be established
..

BSSAP/IPA integration: Wait for SCCPLite to be established

Before this patch, we had some problems related to synchronization
between the IPA transport, SCCP emulation and BSSAP layer in SCCPlite
configurations.

This code ensures that f_bssap_init() will block until the IPA
connection (client or server) is established, and then start the SCCP
and BSSAP emulation components in the right order.

This in turn ensures that the initial BSSMAP RESET that we're sending
from the TTCN-3 side is only sent once the IPA connection is fully
established, and the CCM Identity handshake has happened before.

Change-Id: I483ddd45c1cf631a5a9d8f862b6ca728b38bdc14
Related: OS#2544
---
M library/BSSAP_Adapter.ttcn
M library/IPA_Emulation.ttcnpp
2 files changed, 44 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/93/9293/1

diff --git a/library/BSSAP_Adapter.ttcn b/library/BSSAP_Adapter.ttcn
index 1a9fdb4..7404a6f 100644
--- a/library/BSSAP_Adapter.ttcn
+++ b/library/BSSAP_Adapter.ttcn
@@ -28,8 +28,9 @@

 type record BSSAP_Adapter {
/* component references */
-   M3UA_CT vc_M3UA, /* only in 3GPP AoIP */
-   IPA_Emulation_CT vc_IPA, /* only in SCCPliste */
+   M3UA_CT vc_M3UA,/* only in 3GPP AoIP */
+   IPA_Emulation_CT vc_IPA,/* only in SCCPlite */
+   IPA_EventWaiter_CT vc_WAIT, /* only in SCCPlite */
SCCP_CT vc_SCCP,

MSC_SCCP_MTP3_parameters sccp_pars,
@@ -114,18 +115,32 @@
map(ba.vc_IPA:IPA_PORT, system:IPA_CODEC_PT);
/* connect MTP3 service provider (IPA) to lower side of SCCP */
connect(ba.vc_IPA:MTP3_SP_PORT, ba.vc_SCCP:MTP3_SCCP_PORT);
+   /* connect waiter to general IPA port (for ASP_IPA_Event) */
+   ba.vc_WAIT := IPA_EventWaiter_CT.create(id & "-IPA-WAIT");
+   connect(ba.vc_IPA:IPA_SP_PORT, ba.vc_WAIT:IPA_SP_PORT);
+   ba.vc_WAIT.start(IPA_Emulation.waiter_main());

ba.vc_IPA.start(IPA_Emulation.main_server(cfg.sctp_addr.local_ip_addr,

cfg.sctp_addr.local_sctp_port));
+   /* wait until we received an IPA CCM ID_ACK */
+   ba.vc_WAIT.done;
+   disconnect(ba.vc_IPA:IPA_SP_PORT, ba.vc_WAIT:IPA_SP_PORT);
}
case (BSSAP_TRANSPORT_SCCPlite_CLIENT) {
ba.vc_IPA := IPA_Emulation_CT.create(id & "-IPA");
map(ba.vc_IPA:IPA_PORT, system:IPA_CODEC_PT);
/* connect MTP3 service provider (IPA) to lower side of SCCP */
connect(ba.vc_IPA:MTP3_SP_PORT, ba.vc_SCCP:MTP3_SCCP_PORT);
+   /* connect waiter to general IPA port (for ASP_IPA_Event) */
+   ba.vc_WAIT := IPA_EventWaiter_CT.create(id & "-IPA-WAIT");
+   connect(ba.vc_IPA:IPA_SP_PORT, ba.vc_WAIT:IPA_SP_PORT);
+   ba.vc_WAIT.start(IPA_Emulation.waiter_main());

ba.vc_IPA.start(IPA_Emulation.main_client(cfg.sctp_addr.remote_ip_addr,

cfg.sctp_addr.remote_sctp_port,

cfg.sctp_addr.local_ip_addr,

cfg.sctp_addr.local_sctp_port));
+   /* wait until we received an IPA CCM ID_ACK */
+   ba.vc_WAIT.done;
+   disconnect(ba.vc_IPA:IPA_SP_PORT, ba.vc_WAIT:IPA_SP_PORT);
}
case else {
setverdict(fail, "Unsuppored BSSAP_Transport");
@@ -133,8 +148,6 @@
}
}

-   ba.vc_SCCP.start(SCCPStart(ba.sccp_pars));
-
if (isvalue(ops)) {
timer T := 5.0;
T.start;
@@ -145,6 +158,9 @@
/* start the BSSMAP emulation */
ba.vc_BSSMAP.start(BSSMAP_Emulation.main(valueof(ops), ""));
}
+
+   ba.vc_SCCP.start(SCCPStart(ba.sccp_pars));
+
 }


diff --git a/library/IPA_Emulation.ttcnpp b/library/IPA_Emulation.ttcnpp
index 41a3968..df2b15e 100644
--- a/library/IPA_Emulation.ttcnpp
+++ b/library/IPA_Emulation.ttcnpp
@@ -243,6 +243,9 @@
 }

 private function f_send_IPA_EVT(template ASP_IPA_Event evt) runs on 
IPA_Emulation_CT {
+   if (IPA_SP_PORT.checkstate("Connected")) {
+   IPA_SP_PORT.send(evt);
+   }
 #ifdef IPA_EMULATION_RSL
if (IPA_RSL_PORT.checkstate("Connected")) {
IPA_RSL_PORT.send(evt);
@@ -368,6 +371,7 @@
 * the TCP connection is established.  Other 
implementations may differ.
 * We currently ignore it completely - but actually we 
should make sure that
 

Build failed in Jenkins: master-rtl-sdr » a1=default,a2=default,a3=default,osmocom-master-debian9 #45

2018-05-24 Thread jenkins
See 


Changes:

[steve] tuner_r82xx: turn off loop-through, remove dead code

--
[...truncated 93.31 KB...]
make[2]: Nothing to be done for 'dvi'.
make[2]: Leaving directory 
'
Making dvi in src
make[2]: Entering directory 
'
make[2]: Nothing to be done for 'dvi'.
make[2]: Leaving directory 
'
make[2]: Entering directory 
'
make[2]: Nothing to be done for 'dvi-am'.
make[2]: Leaving directory 
'
make[1]: Leaving directory 
'
make[1]: Entering directory 
'
make  check-recursive
make[2]: Entering directory 
'
Making check in include
make[3]: Entering directory 
'
make[3]: Nothing to be done for 'check'.
make[3]: Leaving directory 
'
Making check in src
make[3]: Entering directory 
'
make[3]: Nothing to be done for 'check'.
make[3]: Leaving directory 
'
make[3]: Entering directory 
'
make[3]: Leaving directory 
'
make[2]: Leaving directory 
'
make[1]: Leaving directory 
'
make[1]: Entering directory 
'
make  install-recursive
make[2]: Entering directory 
'
Making install in include
make[3]: Entering directory 
'
make[4]: Entering directory 
'
make[4]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p 
'
 /usr/bin/install -c -m 644 ../../../include/rtl-sdr.h 
../../../include/rtl-sdr_export.h 
'
make[4]: Leaving directory 
'

Build failed in Jenkins: master-rtl-sdr » a1=default,a2=default,a3=default,osmocom-master-debian9 #46

2018-05-24 Thread jenkins
See 


--
[...truncated 93.30 KB...]
make[2]: Nothing to be done for 'dvi'.
make[2]: Leaving directory 
'
Making dvi in src
make[2]: Entering directory 
'
make[2]: Nothing to be done for 'dvi'.
make[2]: Leaving directory 
'
make[2]: Entering directory 
'
make[2]: Nothing to be done for 'dvi-am'.
make[2]: Leaving directory 
'
make[1]: Leaving directory 
'
make[1]: Entering directory 
'
make  check-recursive
make[2]: Entering directory 
'
Making check in include
make[3]: Entering directory 
'
make[3]: Nothing to be done for 'check'.
make[3]: Leaving directory 
'
Making check in src
make[3]: Entering directory 
'
make[3]: Nothing to be done for 'check'.
make[3]: Leaving directory 
'
make[3]: Entering directory 
'
make[3]: Leaving directory 
'
make[2]: Leaving directory 
'
make[1]: Leaving directory 
'
make[1]: Entering directory 
'
make  install-recursive
make[2]: Entering directory 
'
Making install in include
make[3]: Entering directory 
'
make[4]: Entering directory 
'
make[4]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p 
'
 /usr/bin/install -c -m 644 ../../../include/rtl-sdr.h 
../../../include/rtl-sdr_export.h 
'
make[4]: Leaving directory 
'

Change in osmo-sip-connector[master]: Logging: Log mncc_names in mncc_data()

2018-05-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9269 )

Change subject: Logging: Log mncc_names in mncc_data()
..

Logging: Log mncc_names in mncc_data()

Links libosmocore (libosmogsm) for access to osmo_mncc_name()

Remove reference to get_mncc_name() in src/mncc_protocol.h
Uses osmo_mncc_name() to output to debug log
which MNCC_* message was received.

Change-Id: I161d1b841ac5fe1b7e092b329ae0674cb340f5ac
---
M configure.ac
M src/Makefile.am
M src/mncc.c
M src/mncc_protocol.h
4 files changed, 7 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved



diff --git a/configure.ac b/configure.ac
index 20b682e..e84cb83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,6 +23,7 @@
 AC_PROG_CC

 PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.11.0)
+PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.11.0)
 PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.11.0)
 PKG_CHECK_MODULES(SOFIASIP, sofia-sip-ua-glib >= 1.12.0)

diff --git a/src/Makefile.am b/src/Makefile.am
index b90e38c..7a955fa 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,6 @@
 bin_PROGRAMS = osmo-sip-connector

-AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(SOFIASIP_CFLAGS)
+AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) 
$(LIBOSMOGSM_CFLAGS) $(SOFIASIP_CFLAGS)

 noinst_HEADERS = \
evpoll.h vty.h mncc_protocol.h app.h mncc.h sip.h call.h sdp.h logging.h
@@ -17,4 +17,5 @@
 osmo_sip_connector_LDADD = \
$(SOFIASIP_LIBS) \
$(LIBOSMOCORE_LIBS) \
-   $(LIBOSMOVTY_LIBS)
+   $(LIBOSMOVTY_LIBS) \
+   $(LIBOSMOGSM_LIBS)
diff --git a/src/mncc.c b/src/mncc.c
index c0c082b..3b9f0f4 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -820,6 +820,9 @@
}

memcpy(&msg_type, buf, 4);
+
+   LOGP(DMNCC, LOGL_DEBUG, "MNCC rcvd message type: %s\n", 
osmo_mncc_name(msg_type));
+
switch (msg_type) {
case MNCC_SOCKET_HELLO:
check_hello(conn, buf, rc);
diff --git a/src/mncc_protocol.h b/src/mncc_protocol.h
index 49f0c8b..4950a77 100644
--- a/src/mncc_protocol.h
+++ b/src/mncc_protocol.h
@@ -196,7 +196,6 @@
uint32_tcallref[2];
 };

-const char *get_mncc_name(int value);
 void mncc_set_cause(struct gsm_mncc *data, int loc, int val);
 void cc_tx_to_mncc(struct gsm_network *net, struct msgb *msg);


--
To view, visit https://gerrit.osmocom.org/9269
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I161d1b841ac5fe1b7e092b329ae0674cb340f5ac
Gerrit-Change-Number: 9269
Gerrit-PatchSet: 3
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-bsc[master]: add bsc_stubs.h to workaround linking hell for utils and tests

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9279 )

Change subject: add bsc_stubs.h to workaround linking hell for utils and tests
..


Patch Set 1:

what's the plan to get rid of this? This can only be a temporary work-around, 
right?  What's the argument against simply moving libbsc/* to osmo-bsc/ ?   The 
original reason to have libbsc was that we can generate both the osmo-nitb and 
the osmo-bsc[-sccplite] binaries from it.


--
To view, visit https://gerrit.osmocom.org/9279
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I000be689ed071aced1a085284f924a7e77e5656d
Gerrit-Change-Number: 9279
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Fri, 25 May 2018 06:37:20 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-bsc[master]: cosmetic: gscon: undup code: add common assignment_failed()

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9280 )

Change subject: cosmetic: gscon: undup code: add common assignment_failed()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9280
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1ce10a3ead286cdb6ad529fc293b6cecd151cc9a
Gerrit-Change-Number: 9280
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 25 May 2018 06:38:11 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: assignment: signal assignment failure on chan act nack

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9281 )

Change subject: assignment: signal assignment failure on chan act nack
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/9281/1/src/osmo-bsc/osmo_bsc_api.c
File src/osmo-bsc/osmo_bsc_api.c:

https://gerrit.osmocom.org/#/c/9281/1/src/osmo-bsc/osmo_bsc_api.c@429
PS1, Line 429:  osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_RR_ASS_FAIL, NULL);
rather than having a function that consists of only one other function call 
(and discarding two thirds of the function arguments), I suggest to remove this 
entirely?



--
To view, visit https://gerrit.osmocom.org/9281
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib204b4a5272f9b7b60ca5f932cd8a4c857316270
Gerrit-Change-Number: 9281
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: Harald Welte 
Gerrit-Comment-Date: Fri, 25 May 2018 06:40:21 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-bsc[master]: log: fix logging in rsl_rx_chan_act_nack()

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9282 )

Change subject: log: fix logging in rsl_rx_chan_act_nack()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9282
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Icd2772b21ef3a2ff5af11b7c92dff0ecb4d87ff0
Gerrit-Change-Number: 9282
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 25 May 2018 06:41:08 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: log: assignment: add two logs on unexpected lchan release

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9283 )

Change subject: log: assignment: add two logs on unexpected lchan release
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9283
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib61125ebc41e55dc4a6595db8c8559c62b3ed2c0
Gerrit-Change-Number: 9283
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 25 May 2018 06:41:34 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: use libosmocore's gsm0808_permitted_speech(), gsm0808_chosen_channel()

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9284 )

Change subject: use libosmocore's gsm0808_permitted_speech(), 
gsm0808_chosen_channel()
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9284
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib5c940a9dae11c5e26d4b47fa9d95fef889ad2f6
Gerrit-Change-Number: 9284
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 25 May 2018 06:42:00 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: cosmetic: bsc_subscr_alloc: log initial get

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9286 )

Change subject: cosmetic: bsc_subscr_alloc: log initial get
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9286
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia72f8010b7b2e1ca44e3b005c0f2c05f3eeae8d5
Gerrit-Change-Number: 9286
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 25 May 2018 06:43:30 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: gscon: put subscriber a little later

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9287 )

Change subject: gscon: put subscriber a little later
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9287
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifa528b58842a02509bfe0af6915c64bd67058bcd
Gerrit-Change-Number: 9287
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 25 May 2018 06:43:50 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: cosmetic: penalty timers: constify, tweak doc

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9285 )

Change subject: cosmetic: penalty timers: constify, tweak doc
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9285
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I28addc9a16a4c81978290303d368f630a8334228
Gerrit-Change-Number: 9285
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 25 May 2018 06:43:07 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: try to pick up subsrc IMSI on l3-compl

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9288 )

Change subject: try to pick up subsrc IMSI on l3-compl
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9288
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3b696a0c0932e3abcb682ba231db65755d8c27a6
Gerrit-Change-Number: 9288
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 25 May 2018 06:46:34 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: store subscriber identity on paging

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9289 )

Change subject: store subscriber identity on paging
..


Patch Set 1: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/#/c/9289/1/src/libbsc/paging.c
File src/libbsc/paging.c:

https://gerrit.osmocom.org/#/c/9289/1/src/libbsc/paging.c@391
PS1, Line 391:  conn->bsub = bsc_subscr_get(bsub);
this looks a bit odd as we're only incrementing the bsup use count in this 
patch, but we don't add a corresponding put.  I presume the put has already 
existed before?



--
To view, visit https://gerrit.osmocom.org/9289
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0ab7bedfe693bb4e42a04fb0585b94a730ff2d9b
Gerrit-Change-Number: 9289
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 25 May 2018 06:48:18 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: cosmetic: handover_test: add IMSI to subscr for logging

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9290 )

Change subject: cosmetic: handover_test: add IMSI to subscr for logging
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9290
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I52fa8f3183c93ed362d8252d20daf00c60a117c8
Gerrit-Change-Number: 9290
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 25 May 2018 06:49:09 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: HO: introduce T7, T8, T101 timers

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9291 )

Change subject: HO: introduce T7, T8, T101 timers
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9291
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If9e793426d214019f299b19d6ffa5a186546
Gerrit-Change-Number: 9291
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 25 May 2018 06:50:04 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: cosmetic: gscon: drop odd use of OSMO_STRINGIFY

2018-05-24 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/9292 )

Change subject: cosmetic: gscon: drop odd use of OSMO_STRINGIFY
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/9292
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I458cd2cd0d6ddb0e6db3bb8d546a20336ae8c5f1
Gerrit-Change-Number: 9292
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 25 May 2018 06:50:26 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes