osmo-mgw[master]: cosmetic: remove prefix "net" from rtp related vty commands

2017-11-10 Thread Harald Welte

Patch Set 3:

The software was released/tagged, and binary pacakges have been released. The 
assumption that within those (two?) weeks nobody will have used it is a 
hypothesis that nobody can guarantee.  We have to start caring about our users 
and finally maintain compatiiblity of library APIs as well as the VTY and any 
other interfaces.  I believe this is absolutely important.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id627e2ef6f725979ed52a585ca09686e1a049adf
Gerrit-PatchSet: 3
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: dexter 
Gerrit-HasComments: No


meta-telephony[laforge/nightly]: osmo-mgw: Split packages and install osmo-mgw systemd service

2017-11-10 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1b902842cf8766af1e58de76e46786213d222389
Gerrit-PatchSet: 1
Gerrit-Project: meta-telephony
Gerrit-Branch: laforge/nightly
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-hlr[master]: cosmetic: add comment on ignored return value

2017-11-10 Thread Harald Welte

Patch Set 2: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I64ac8c148f48be60f9c0d346df0c5152bb527494
Gerrit-PatchSet: 2
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-msc[master]: vlr: auth_fsm_start: check return value of fsm alloc

2017-11-10 Thread Harald Welte

Patch Set 1: Code-Review+2

(1 comment)

https://gerrit.osmocom.org/#/c/4714/1/src/libvlr/vlr_auth_fsm.c
File src/libvlr/vlr_auth_fsm.c:

Line 592:   if (!afp) {
> Oh wait, fi is a child FSM, isn't it going to be cleaned up from the parent
iyes, you are right. migt still be good to do it explicit or to have a comment 
here about it, but it's not all that important.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7d1c15b546377b1afa38f7f40c5421b743e21605
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


[MERGED] osmo-bsc[master]: use osmo_sccp_inst_addr_name() instead of looking up ss7

2017-11-10 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: use osmo_sccp_inst_addr_name() instead of looking up ss7
..


use osmo_sccp_inst_addr_name() instead of looking up ss7

Depends: libosmo-sccp I70ec5c8b42682a23f11a5820431c7e34e225709b
Change-Id: Idb451597c724ac87a391121cebd0b0a927dd49d1
---
M src/osmo-bsc/osmo_bsc_sigtran.c
1 file changed, 4 insertions(+), 8 deletions(-)

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



diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c
index 253f1e8..a18d4f3 100644
--- a/src/osmo-bsc/osmo_bsc_sigtran.c
+++ b/src/osmo-bsc/osmo_bsc_sigtran.c
@@ -516,8 +516,7 @@
if (!osmo_sccp_check_addr(&msc->a.bsc_addr, 
OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) {
LOGP(DMSC, LOGL_ERROR,
 "(%s) A-interface: invalid local (BSC) SCCP 
address: %s\n",
-msc_name,
-
osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), 
&msc->a.bsc_addr));
+msc_name, osmo_sccp_inst_addr_name(msc->a.sccp, 
&msc->a.bsc_addr));
return -EINVAL;
}
 
@@ -530,17 +529,14 @@
if (!osmo_sccp_check_addr(&msc->a.msc_addr, 
OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) {
LOGP(DMSC, LOGL_ERROR,
 "(%s) A-interface: invalid remote (MSC) SCCP 
address: %s\n",
-msc_name,
-
osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), 
&msc->a.msc_addr));
+msc_name, osmo_sccp_inst_addr_name(msc->a.sccp, 
&msc->a.msc_addr));
return -EINVAL;
}
 
LOGP(DMSC, LOGL_NOTICE, "(%s) A-interface: local (BSC) SCCP 
address: %s\n",
-msc_name,
-
osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), 
&msc->a.bsc_addr));
+msc_name, osmo_sccp_inst_addr_name(msc->a.sccp, 
&msc->a.bsc_addr));
LOGP(DMSC, LOGL_NOTICE, "(%s) A-interface: remote (MSC) SCCP 
address: %s\n",
-msc_name,
-
osmo_sccp_addr_name(osmo_ss7_instance_find(msc->a.cs7_instance), 
&msc->a.msc_addr));
+msc_name, osmo_sccp_inst_addr_name(msc->a.sccp, 
&msc->a.msc_addr));
 
/* Bind SCCP user */
msc->a.sccp_user = osmo_sccp_user_bind(msc->a.sccp, msc_name, 
sccp_sap_up, msc->a.bsc_addr.ssn);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb451597c724ac87a391121cebd0b0a927dd49d1
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-mgw[master]: vty: assign new VTY port numbr

2017-11-10 Thread Harald Welte

Patch Set 2: Code-Review-1

As indicated in the respective redmine isuse, I am not convinced that this is a 
good idea.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2ca66897a39c7f20c58a3ebae0c70af0a3b6899f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


Build failure of network:osmocom:latest/libosmocore in xUbuntu_16.10/x86_64

2017-11-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:latest/libosmocore/xUbuntu_16.10/x86_64

Package network:osmocom:latest/libosmocore failed to build in 
xUbuntu_16.10/x86_64

Check out the package for editing:
  osc checkout network:osmocom:latest libosmocore

Last lines of build log:
[  246s] | 
[  246s] | This file was extended by libosmocore config.status 0.10.2, which was
[  246s] | generated by GNU Autoconf 2.69.  Invocation command line was
[  246s] | 
[  246s] |   CONFIG_FILES= 
[  246s] |   CONFIG_HEADERS  = 
[  246s] |   CONFIG_LINKS= 
[  246s] |   CONFIG_COMMANDS = 
[  246s] |   $ ./config.status Doxyfile.core
[  246s] | 
[  246s] | on build32
[  246s] | 
[  246s] | config.status:1174: creating Doxyfile.core
[  246s] 
[  246s] debian/rules:26: recipe for target 'override_dh_auto_test' failed
[  246s] make[1]: *** [override_dh_auto_test] Error 1
[  246s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  246s] debian/rules:15: recipe for target 'build' failed
[  246s] make: *** [build] Error 2
[  246s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  246s] 
[  246s] build32 failed "build libosmocore_0.10.2.dsc" at Sat Nov 11 01:00:42 
UTC 2017.
[  246s] 
[  246s] ### VM INTERACTION START ###
[  249s] [  237.540370] reboot: Power down
[  251s] ### VM INTERACTION END ###
[  251s] 
[  251s] build32 failed "build libosmocore_0.10.2.dsc" at Sat Nov 11 01:00:47 
UTC 2017.
[  251s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


[PATCH] osmo-mgw[master]: MGCP endpoints: parse as decimal, not hex

2017-11-10 Thread Neels Hofmeyr

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

MGCP endpoints: parse as decimal, not hex

Parse the endpoint index from the MGCP messages as base-10, not 16.

If osmo-mgw parses the endpoint IDs as base-16 numbers while OsmoMSC and
OsmoBSC pass in decimal endpoint numbers, the consequence is, for example:

- I configure 32 endpoints in osmo-mgw,
- I tell OsmoBSC to use endpoint range 1-32,
- At some point OsmoBSC may pass in, say, "30@mgw",
- "30" is parsed base-16 and ends up being endpoint index 48, instead of 32,
- OsmoMGW sees that 48 > number_endpoints and barfs.

Related: OS#2633
Change-Id: Ic18608ff23303c1564548a86d5f6bfa539fe555e
---
M src/libosmo-mgcp/mgcp_msg.c
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c
index d686bca..763a5a1 100644
--- a/src/libosmo-mgcp/mgcp_msg.c
+++ b/src/libosmo-mgcp/mgcp_msg.c
@@ -192,7 +192,7 @@
if (strncmp(mgcp, "ds/e1", 5) == 0)
return find_e1_endpoint(cfg, mgcp);
 
-   gw = strtoul(mgcp, &endptr, 16);
+   gw = strtoul(mgcp, &endptr, 10);
if (gw > 0 && gw < cfg->trunk.number_endpoints && endptr[0] == '@')
return &cfg->trunk.endpoints[gw];
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic18608ff23303c1564548a86d5f6bfa539fe555e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


osmo-gsm-tester[master]: Rename test module to testenv and update references

2017-11-10 Thread Neels Hofmeyr

Patch Set 1:

and I also want to see an osmo-gsm-manuals patch to adjust to 'testenv' ... all 
in all I doubt that this is worth the effort

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I520bd046cb09042b5567d967f951f050e4e02e85
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-gsm-tester[master]: Rename test module to testenv and update references

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review+1

first resolve the G#4764 comments to get my +2 here

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I520bd046cb09042b5567d967f951f050e4e02e85
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-gsm-tester[master]: Move Test class to its own test.py module

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review-1

can you avoid circular imports so that we don't require a newer python version?

Otherwise this and the previous patch are one large chunk of cosmetics, I mean 
each of us is permitted one of these every now and then, but there is no real 
use in this, is there, besides knowing where to find the Test class?

I would +2 when this doesn't add requirement for python upgrades besides being 
huge and cosmetic, but for now...

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9c8d67f598466ba52a4827ff77027b9eae85929a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-gsm-tester[master]: Rename test module to testenv and update references

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I520bd046cb09042b5567d967f951f050e4e02e85
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-mgw[master]: cosmetic: remove prefix "net" from rtp related vty commands

2017-11-10 Thread Neels Hofmeyr

Patch Set 3: Code-Review-1

@Harald, adding legacy aliases on a brand new program (osmo-mgw) that is not in 
use anywhere really or has just started to be used seems a bit overboard to me. 
dexter spent time on those and we'll have to drag them along forever now... 
This is not about osmo-bsc_mgcp or anything that's already widely rolled out 
beyond osmo-gsm-tester. In my view, the alpha stage on osmo-mgw hasn't fallen 
yet and we should be allowed to make breaking changes before we commit to a 
long term API. What do you think?

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id627e2ef6f725979ed52a585ca09686e1a049adf
Gerrit-PatchSet: 3
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: dexter 
Gerrit-HasComments: No


osmo-bsc[master]: doc: add example configuration for osmo-mgw

2017-11-10 Thread Neels Hofmeyr

Patch Set 4: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4d4ed401bee6c3dfdec2b584bf7248ffb02bddbf
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-bsc[master]: bsc filter: don't ignore imsi-allow on "global" filter level

2017-11-10 Thread Neels Hofmeyr

Patch Set 1:

> looks fine to me, but Holger is the person to ask.  Also, might
 > make sense to confirm with on-waves, as they probably are the only
 > known user of all of this?

Unless they have dead "allow" rules on the "global" level lying around, they 
should not be bothered by this patch. The worst case is that they need to 
remove those allow rules from 'nat' in osmo-bsc_nat and from 'bsc' in osmo-bsc, 
which before now have had no effect. I can mail them anyway...

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idb6c8dd62aa90666ba6fcd213f59d79f5498da3f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-bsc[master]: bsc filter: don't ignore imsi-allow on "global" filter level

2017-11-10 Thread Neels Hofmeyr

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/4750/1/src/libfilter/bsc_msg_filter.c
File src/libfilter/bsc_msg_filter.c:

Line 208:   return 1;
> But that was "the global allow". So It might make sense to have an access-l
The above "allow" check does change the semantics significantly: In order to be 
able to deny anything, we need *some* deny rule. Without a deny rule, we always 
end up accepting everything; either we allow before, or we hit this 'return 1'. 
Now, *with* a deny rule in place, say a "deny .*", which acts as the default 
you propose, we would deny all IMSIs and never reach this 'return 1', unless we 
allow some IMSIs before that and exit early. So before this patch, you can 
either compose a deny regex that matches all IMSIs except the ones you want to 
allow (usually rather cumbersome), or you're stuck on allowing all or nothing. 
After this patch you can conveniently pick IMSI prefixes to allow, rather than 
having to negate a deny regex.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idb6c8dd62aa90666ba6fcd213f59d79f5498da3f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


[MERGED] osmo-bsc[master]: osmo-bsc vty: be fatal for addressbook entry errors

2017-11-10 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: osmo-bsc vty: be fatal for addressbook entry errors
..


osmo-bsc vty: be fatal for addressbook entry errors

So far, the config would log an error upon config parsing, and then continue to
use defaults, which is super easy to miss. On errors, return CMD_ERR_INCOMPLETE
to abort the program in a config parsing error.

Be fatal for non-existing addressbook entries and for using address book
entries from mismatching cs7 instances.

Though it is mixing in cosmetic changes, add "Error:" to the output and arrange
the erratic name to the end of the message, as is customary for error messages.

Related: libosmo-sccp I2f71b9c4dd30f919d2054da81283dd7035f44f60
Change-Id: Ia4e58902a2d3757b266cf35ac89f256cfb8f0eec
---
M src/osmo-bsc/osmo_bsc_vty.c
1 file changed, 8 insertions(+), 10 deletions(-)

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



diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c
index ca47097..0003cfa 100644
--- a/src/osmo-bsc/osmo_bsc_vty.c
+++ b/src/osmo-bsc/osmo_bsc_vty.c
@@ -724,18 +724,17 @@
 
ss7 = osmo_sccp_addr_by_name(&msc->a.bsc_addr, bsc_addr_name);
if (!ss7) {
-   vty_out(vty, "No sccp address %s found%s", bsc_addr_name,
-   VTY_NEWLINE);
-   return CMD_WARNING;
+   vty_out(vty, "Error: No such SCCP addressbook entry: '%s'%s", 
bsc_addr_name, VTY_NEWLINE);
+   return CMD_ERR_INCOMPLETE;
}
 
/* Prevent mixing addresses from different CS7/SS7 instances */
if (msc->a.cs7_instance_valid) {
if (msc->a.cs7_instance != ss7->cfg.id) {
vty_out(vty,
-   "SCCP address %s from different CS7 instance%s",
+   "Error: SCCP addressbook entry from mismatching 
CS7 instance: '%s'%s",
bsc_addr_name, VTY_NEWLINE);
-   return CMD_WARNING;
+   return CMD_ERR_INCOMPLETE;
}
}
 
@@ -757,18 +756,17 @@
 
ss7 = osmo_sccp_addr_by_name(&msc->a.msc_addr, msc_addr_name);
if (!ss7) {
-   vty_out(vty, "No sccp address %s found%s", msc_addr_name,
-   VTY_NEWLINE);
-   return CMD_WARNING;
+   vty_out(vty, "Error: No such SCCP addressbook entry: '%s'%s", 
msc_addr_name, VTY_NEWLINE);
+   return CMD_ERR_INCOMPLETE;
}
 
/* Prevent mixing addresses from different CS7/SS7 instances */
if (msc->a.cs7_instance_valid) {
if (msc->a.cs7_instance != ss7->cfg.id) {
vty_out(vty,
-   "SCCP address %s from different CS7 instance%s",
+   "Error: SCCP addressbook entry from mismatching 
CS7 instance: '%s'%s",
msc_addr_name, VTY_NEWLINE);
-   return CMD_WARNING;
+   return CMD_ERR_INCOMPLETE;
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4e58902a2d3757b266cf35ac89f256cfb8f0eec
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section

2017-11-10 Thread Neels Hofmeyr
Hello Pau Espin Pedrol, Jenkins Builder,

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

https://gerrit.osmocom.org/4667

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

OsmoGSMTester: Add scenarios_dir section

It explains how scenario combination works

Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f
---
M OsmoGSMTester/chapters/config.adoc
1 file changed, 55 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/67/4667/3

diff --git a/OsmoGSMTester/chapters/config.adoc 
b/OsmoGSMTester/chapters/config.adoc
index 3f8cb44..a56c4ad 100644
--- a/OsmoGSMTester/chapters/config.adoc
+++ b/OsmoGSMTester/chapters/config.adoc
@@ -58,6 +58,61 @@
 that the 'state_dir' is used to reserve resources, which only works when all
 configurations that share resources also use the same 'state_dir'.
 
+[[scenarios_dir]]
+ 'scenarios_dir'
+
+This dir contains scenario configuration files.
+
+Scenarios define constraints to serve the resource requests of a 'suite.conf',
+to select specific resources from the general resource pool specified in 
'resources.conf'.
+
+All 'times' attributes are expanded before matching. For example, if a 
'suite.conf'
+requests two BTS, we may enforce that both BTS should be of type 
'osmo-bts-sysmo' in
+these ways:
+
+
+resources:
+  bts:
+  - type: osmo-bts-sysmo
+  - type: osmo-bts-sysmo
+
+
+or alternatively,
+
+
+resources:
+  bts:
+  - times: 2
+type: osmo-bts-sysmo
+
+
+If only one resource is specified in the scenario, then the resource allocator
+assumes the restriction is to be applied to the first resource and that 
remaining
+resources have no restrictions to be taken into consideration.
+
+To apply restrictions only on the second resource, the first element can be 
left
+emtpy, like:
+
+
+resources:
+  bts:
+  - {}
+  - type: osmo-bts-sysmo
+
+
+On the 'osmo_gsm_tester.py' command line and the 'default_suites.conf', any 
number of
+such scenario configurations can be combined in the form:
+
+
+:[+[+...]]
+
+
+e.g.
+
+
+my_suite:sysmo+tch_f+amr
+
+
 [[resources_conf]]
 === 'resources.conf'
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f
Gerrit-PatchSet: 3
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section

2017-11-10 Thread Neels Hofmeyr

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

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f
Gerrit-PatchSet: 3
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-gsm-manuals[master]: OsmoGSMTester: Improve Trial section content

2017-11-10 Thread Neels Hofmeyr

Patch Set 2: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8d74b02166ea33ad9ab7f987894f4f02064fbebc
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-mgw[master]: cosmetic: guard dead osmux vty code with ifdef

2017-11-10 Thread Neels Hofmeyr

Patch Set 4: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2ad9579453f52fe129cf120801a2efa19a26304e
Gerrit-PatchSet: 4
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[MERGED] osmo-mgw[master]: cosmetic: guard dead osmux vty code with ifdef

2017-11-10 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: cosmetic: guard dead osmux vty code with ifdef
..


cosmetic: guard dead osmux vty code with ifdef

Since currently osmux is not available we decided to lock down the
respective VTY command with an early return CMD_WARNING, making
the code after this line unreachable.

Guard the dead code with an ifdef

Fixes: Coverity CID#178648
Change-Id: I2ad9579453f52fe129cf120801a2efa19a26304e
---
M src/libosmo-mgcp/mgcp_vty.c
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c
index 7ff1fdd..a7d9e4a 100644
--- a/src/libosmo-mgcp/mgcp_vty.c
+++ b/src/libosmo-mgcp/mgcp_vty.c
@@ -1102,7 +1102,7 @@
 * allow to turn it on yet. */
vty_out(vty, "OSMUX currently unavailable in this software version.%s", 
VTY_NEWLINE);
return CMD_WARNING;
-
+#if 0
if (strcmp(argv[0], "on") == 0)
g_cfg->osmux = OSMUX_USAGE_ON;
else if (strcmp(argv[0], "only") == 0)
@@ -1114,6 +1114,7 @@
}
 
return CMD_SUCCESS;
+#endif
 }
 
 DEFUN(cfg_mgcp_osmux_ip,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ad9579453f52fe129cf120801a2efa19a26304e
Gerrit-PatchSet: 4
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[MERGED] osmo-mgw[master]: osmux: fix nullpointer dereference

2017-11-10 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: osmux: fix nullpointer dereference
..


osmux: fix nullpointer dereference

in point_lookup() the connection pointer is determined using
mgcp_conn_get_rtp() this function may return 0. At the moment
there are no nullpointer checks implemented

Add checks to test for nullpointer.

Fixes: Coverity CID#178662
Change-Id: If9a3c1ac002bc8adc90ca1c1c3dd1db4feea07ac
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 10 insertions(+), 3 deletions(-)

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



diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 60ffe06..09b2636 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -207,12 +207,18 @@
case MGCP_DEST_NET:
/* FIXME: Get rid of CONN_ID_XXX! */
conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET);
-   this = &conn_net->end.addr;
+   if (conn_net)
+   this = &conn_net->end.addr;
+   else
+   this = NULL;
break;
case MGCP_DEST_BTS:
/* FIXME: Get rid of CONN_ID_XXX! */
conn_bts = mgcp_conn_get_rtp(endp, CONN_ID_BTS);
-   this = &conn_bts->end.addr;
+   if (conn_bts)
+   this = &conn_bts->end.addr;
+   else
+   this = NULL;
break;
default:
/* Should not ever happen */
@@ -222,7 +228,8 @@
 
/* FIXME: Get rid of CONN_ID_XXX! */
conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET);
-   if (conn_net->osmux.cid == cid && this->s_addr == 
from_addr->s_addr)
+   if (conn_net && this && conn_net->osmux.cid == cid
+   && this->s_addr == from_addr->s_addr)
return endp;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If9a3c1ac002bc8adc90ca1c1c3dd1db4feea07ac
Gerrit-PatchSet: 4
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[PATCH] osmo-mgw[master]: cosmetic: guard dead osmux vty code with ifdef

2017-11-10 Thread Neels Hofmeyr
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/4712

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

cosmetic: guard dead osmux vty code with ifdef

Since currently osmux is not available we decided to lock down the
respective VTY command with an early return CMD_WARNING, making
the code after this line unreachable.

Guard the dead code with an ifdef

Fixes: Coverity CID#178648
Change-Id: I2ad9579453f52fe129cf120801a2efa19a26304e
---
M src/libosmo-mgcp/mgcp_vty.c
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/12/4712/3

diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c
index 7ff1fdd..a7d9e4a 100644
--- a/src/libosmo-mgcp/mgcp_vty.c
+++ b/src/libosmo-mgcp/mgcp_vty.c
@@ -1102,7 +1102,7 @@
 * allow to turn it on yet. */
vty_out(vty, "OSMUX currently unavailable in this software version.%s", 
VTY_NEWLINE);
return CMD_WARNING;
-
+#if 0
if (strcmp(argv[0], "on") == 0)
g_cfg->osmux = OSMUX_USAGE_ON;
else if (strcmp(argv[0], "only") == 0)
@@ -1114,6 +1114,7 @@
}
 
return CMD_SUCCESS;
+#endif
 }
 
 DEFUN(cfg_mgcp_osmux_ip,

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2ad9579453f52fe129cf120801a2efa19a26304e
Gerrit-PatchSet: 3
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-mgw[master]: osmux: fix nullpointer dereference

2017-11-10 Thread Neels Hofmeyr

Patch Set 3: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If9a3c1ac002bc8adc90ca1c1c3dd1db4feea07ac
Gerrit-PatchSet: 3
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[PATCH] osmo-mgw[master]: osmux: fix nullpointer dereference

2017-11-10 Thread Neels Hofmeyr
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/4711

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

osmux: fix nullpointer dereference

in point_lookup() the connection pointer is determined using
mgcp_conn_get_rtp() this function may return 0. At the moment
there are no nullpointer checks implemented

Add checks to test for nullpointer.

Fixes: Coverity CID#178662
Change-Id: If9a3c1ac002bc8adc90ca1c1c3dd1db4feea07ac
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 10 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/11/4711/3

diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 60ffe06..09b2636 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -207,12 +207,18 @@
case MGCP_DEST_NET:
/* FIXME: Get rid of CONN_ID_XXX! */
conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET);
-   this = &conn_net->end.addr;
+   if (conn_net)
+   this = &conn_net->end.addr;
+   else
+   this = NULL;
break;
case MGCP_DEST_BTS:
/* FIXME: Get rid of CONN_ID_XXX! */
conn_bts = mgcp_conn_get_rtp(endp, CONN_ID_BTS);
-   this = &conn_bts->end.addr;
+   if (conn_bts)
+   this = &conn_bts->end.addr;
+   else
+   this = NULL;
break;
default:
/* Should not ever happen */
@@ -222,7 +228,8 @@
 
/* FIXME: Get rid of CONN_ID_XXX! */
conn_net = mgcp_conn_get_rtp(endp, CONN_ID_NET);
-   if (conn_net->osmux.cid == cid && this->s_addr == 
from_addr->s_addr)
+   if (conn_net && this && conn_net->osmux.cid == cid
+   && this->s_addr == from_addr->s_addr)
return endp;
}
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If9a3c1ac002bc8adc90ca1c1c3dd1db4feea07ac
Gerrit-PatchSet: 3
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-gsm-tester[master]: Remove unused file bts_model.py

2017-11-10 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: Remove unused file bts_model.py
..


Remove unused file bts_model.py

Change-Id: If24b7dafb659d45bc13f4d624212d6c266c1b522
---
D src/osmo_gsm_tester/bts_model.py
1 file changed, 0 insertions(+), 29 deletions(-)

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



diff --git a/src/osmo_gsm_tester/bts_model.py b/src/osmo_gsm_tester/bts_model.py
deleted file mode 100644
index 41e8491..000
--- a/src/osmo_gsm_tester/bts_model.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# osmo_gsm_tester: bts model specifics
-#
-# Copyright (C) 2016-2017 by sysmocom - s.f.m.c. GmbH
-#
-# Author: Neels Hofmeyr 
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see .
-
-from . import log, schema, util
-
-class TestContext(log.Origin):
-'''
-API to allow testing various BTS models.
-'''
-
-def __init__(self, 
-
-# vim: expandtab tabstop=4 shiftwidth=4

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If24b7dafb659d45bc13f4d624212d6c266c1b522
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[MERGED] osmo-hlr[master]: hlr.c: Avoid overflow of lu_operation.subscr.imsi

2017-11-10 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: hlr.c: Avoid overflow of lu_operation.subscr.imsi
..


hlr.c: Avoid overflow of lu_operation.subscr.imsi

It appears that hlr_subscriber.imsi is 16 buffers in size:
15 chars for IMSI + 1 byte NUL.  However,  osmo_gsup_message.imsi
is 17 bytes (for whatever reason), so we cannot simply do a strpy()
as this might overflow the hlr_subscriber.imsi field!

TODO: check if weactually ever receive a too-long IMSI in GSUP and
reject that at an earlier time in the code flow.

Fixes: Coverity CID#164746

Change-Id: I9ff94e6bb0ad2ad2a7c010d3ea7dad9af0f3c048
---
M src/hlr.c
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/hlr.c b/src/hlr.c
index 6310526..78a7055 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -164,7 +164,7 @@
/* check if subscriber is known at all */
if (!lu_op_fill_subscr(luop, g_hlr->dbc, gsup->imsi)) {
/* Send Error back: Subscriber Unknown in HLR */
-   strcpy(luop->subscr.imsi, gsup->imsi);
+   osmo_strlcpy(luop->subscr.imsi, gsup->imsi, 
sizeof(luop->subscr.imsi));
lu_op_tx_error(luop, GMM_CAUSE_IMSI_UNKNOWN);
return 0;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ff94e6bb0ad2ad2a7c010d3ea7dad9af0f3c048
Gerrit-PatchSet: 2
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


osmo-hlr[master]: hlr.c: Avoid overflow of lu_operation.subscr.imsi

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

regardless of buffer sizes, we should always use osmo_strlcpy, at least for 
buggy cases of missing nul.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9ff94e6bb0ad2ad2a7c010d3ea7dad9af0f3c048
Gerrit-PatchSet: 1
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-gsm-tester[master]: Enable 2nd TRX

2017-11-10 Thread Neels Hofmeyr

Patch Set 2: -Code-Review

(1 comment)

https://gerrit.osmocom.org/#/c/4674/2/example/defaults.conf
File example/defaults.conf:

Line 52:- nominal_power: 23
> It indeed means all octphy BTS will have two TRX configured always.
Another idea is to keep an entirely separate defaults set for two trx: 
bsc_bts_2trx ... but that would probably imply duplicating lots of things. So I 
guess best is to have some special magic specifically for the number of trx, 
like the num_trx attribute you mention. Another spin: have a single trx in the 
defaults (bsc_bts above) and if num_trx is 2, duplicate the first TRX's 
defaults. Anyway, it would be nice to not need separate defaults for 
osmo_bts_octphy just because it may use two TRX.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7e988cb0d891c3a8da1b29a3889b5bc8edbbe1ee
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


Build failure of network:osmocom:nightly/libosmocore in xUbuntu_17.10/x86_64

2017-11-10 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/xUbuntu_17.10/x86_64

Package network:osmocom:nightly/libosmocore failed to build in 
xUbuntu_17.10/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly libosmocore

Last lines of build log:
[  252s] | 
[  252s] | This file was extended by libosmocore config.status 0.10.2.20171110, 
which was
[  252s] | generated by GNU Autoconf 2.69.  Invocation command line was
[  252s] | 
[  252s] |   CONFIG_FILES= 
[  252s] |   CONFIG_HEADERS  = 
[  252s] |   CONFIG_LINKS= 
[  252s] |   CONFIG_COMMANDS = 
[  252s] |   $ ./config.status Doxyfile.core
[  252s] | 
[  252s] | on build31
[  252s] | 
[  252s] | config.status:1180: creating Doxyfile.core
[  252s] 
[  252s] debian/rules:26: recipe for target 'override_dh_auto_test' failed
[  252s] make[1]: *** [override_dh_auto_test] Error 1
[  252s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  252s] debian/rules:15: recipe for target 'build' failed
[  252s] make: *** [build] Error 2
[  252s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  252s] 
[  252s] build31 failed "build libosmocore_0.10.2.20171110.dsc" at Fri Nov 10 
19:57:04 UTC 2017.
[  252s] 
[  252s] ### VM INTERACTION START ###
[  255s] [  246.651640] reboot: Power down
[  255s] ### VM INTERACTION END ###
[  255s] 
[  255s] build31 failed "build libosmocore_0.10.2.20171110.dsc" at Fri Nov 10 
19:57:08 UTC 2017.
[  255s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


osmo-gsm-manuals[master]: OsmoGSMTester: Improve Trial section content

2017-11-10 Thread Pau Espin Pedrol

Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8d74b02166ea33ad9ab7f987894f4f02064fbebc
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section

2017-11-10 Thread Pau Espin Pedrol

Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-msc[master]: vlr: auth_fsm_start: check return value of fsm alloc

2017-11-10 Thread Neels Hofmeyr

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/4714/1/src/libvlr/vlr_auth_fsm.c
File src/libvlr/vlr_auth_fsm.c:

Line 592:   if (!afp) {
> how did I miss that.
Oh wait, fi is a child FSM, isn't it going to be cleaned up from the parent 
cleanup?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7d1c15b546377b1afa38f7f40c5421b743e21605
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


[PATCH] osmo-hlr[master]: cosmetic: add comment on ignored return value

2017-11-10 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/4715

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

cosmetic: add comment on ignored return value

Coverity wants us to evaluate sqlite3_reset, but it is of no use to do so.

Related: coverity CID#178653
Change-Id: I64ac8c148f48be60f9c0d346df0c5152bb527494
---
M src/db.c
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/15/4715/2

diff --git a/src/db.c b/src/db.c
index 8733cf5..d16f8ec 100644
--- a/src/db.c
+++ b/src/db.c
@@ -99,6 +99,8 @@
 void db_remove_reset(sqlite3_stmt *stmt)
 {
sqlite3_clear_bindings(stmt);
+   /* sqlite3_reset() just repeats an error code already evaluated during 
sqlite3_step(). */
+   /* coverity[CHECKED_RETURN] */
sqlite3_reset(stmt);
 }
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I64ac8c148f48be60f9c0d346df0c5152bb527494
Gerrit-PatchSet: 2
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-msc[master]: vlr: auth_fsm_start: check return value of fsm alloc

2017-11-10 Thread Neels Hofmeyr

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/4714/1/src/libvlr/vlr_auth_fsm.c
File src/libvlr/vlr_auth_fsm.c:

Line 592:   if (!afp) {
> don't we leak 'fi' here if 'afp' allocation fails above?
how did I miss that.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7d1c15b546377b1afa38f7f40c5421b743e21605
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


osmo-bsc[master]: configure.ac/debian: Require libosmo-mgcp-client-dev >= 1.2.0

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5d3add1c69181aabbdb684a01a6ba7bcea1fe2c
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[MERGED] osmo-mgw[master]: fix segfault: DLCX for unknown endpoint: dont try to log NUL...

2017-11-10 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: fix segfault: DLCX for unknown endpoint: dont try to log NULL 
endpoint
..


fix segfault: DLCX for unknown endpoint: dont try to log NULL endpoint

Change-Id: Ib127fd81a2d68f51c470ff77ef0822bdb4829de4
---
M src/libosmo-mgcp/mgcp_protocol.c
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index 8c6bd6e..9e04e50 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -853,12 +853,12 @@
struct mgcp_conn_rtp *conn = NULL;
uint32_t conn_id;
 
+   if (p->found != 0)
+   return create_err_response(NULL, error_code, "DLCX", p->trans);
+
LOGP(DLMGCP, LOGL_NOTICE,
 "DLCX: endpoint:%x deleting connection ...\n",
 ENDPOINT_NUMBER(endp));
-
-   if (p->found != 0)
-   return create_err_response(NULL, error_code, "DLCX", p->trans);
 
if (llist_count(&endp->conns) <= 0) {
LOGP(DLMGCP, LOGL_ERROR,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib127fd81a2d68f51c470ff77ef0822bdb4829de4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


osmo-mgw[master]: fix segfault: DLCX for unknown endpoint: dont try to log NUL...

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

severity + triviality = fast track

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib127fd81a2d68f51c470ff77ef0822bdb4829de4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-mgw[master]: vty: simplify endpoint allocation

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/#/c/4775/1/src/libosmo-mgcp/mgcp_vty.c
File src/libosmo-mgcp/mgcp_vty.c:

Line 1286:   "Failed to initialize E1 trunk %d.\n",
is this log message actually accurate? I liked the one above better, "failed to 
allocate N endpoints on trunk M"


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iefdc5b905d76d2cd97f26584261fe5cbefb699cf
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


osmo-gsm-manuals[master]: OsmoGSMTester: Improve Trial section content

2017-11-10 Thread Neels Hofmeyr

Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8d74b02166ea33ad9ab7f987894f4f02064fbebc
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-mgw[master]: vty: do not change number_endpoints at runtime

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review-1

(1 comment)

add 'Related: OS#1234' to commit log

https://gerrit.osmocom.org/#/c/4779/1/src/libosmo-mgcp/mgcp_vty.c
File src/libosmo-mgcp/mgcp_vty.c:

Line 511: {
hmm, these are fairly complex semantics now.

Is it guaranteed that allocation has already happened after the first VTY 
command was issued? What if the user by accident has two number endpoints 
commands in the config? The later one will not be applied at runtime, yet be 
written out during 'write config'.

What if there is no 'number endpoints' VTY command in the config at all? Will 
new_number_endpoints still be -1?

It would be far clearer and less error prone to separately remember how much 
was actually allocated. So instead of adding new_number_endpoints, I'd add a 
vty_number_endpoints, let the vty always and only write to that, and precisely 
upon allocating the struct, copy that value over to number_endpoints, to be 
used by the for() loops.

Telling the user that the command does not take immediate effect is nice, maybe 
you can still do that by checking whether number_endpoints > 0 (i.e. whether 
something was allocated yet). (We do have numerous such cases where we don't 
warn the user, so it's no requirement)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3994af016fb96427263edbba05f560743f85fdd4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


osmo-ci[master]: Use stow for dependency management

2017-11-10 Thread Neels Hofmeyr

Patch Set 3:

stow is now installed on all build slaves, wiki also lists stow now.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8f5012419495a656912b7b71e4f76ce102c6b63a
Gerrit-PatchSet: 3
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: Alexander Huemer 
Gerrit-Reviewer: Alexander Huemer 
Gerrit-Reviewer: André Boddenberg 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: blobb 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


osmo-ci[master]: Use stow for dependency management

2017-11-10 Thread Neels Hofmeyr

Patch Set 3: Code-Review+2

We need someone to add a +V vote, I'd be fine with doing the installation of 
stow and editing the osmocom servers wiki

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8f5012419495a656912b7b71e4f76ce102c6b63a
Gerrit-PatchSet: 3
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: Alexander Huemer 
Gerrit-Reviewer: Alexander Huemer 
Gerrit-Reviewer: André Boddenberg 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: blobb 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


[MERGED] libosmocore[master]: vty: Fix bad use of vector_slot()

2017-11-10 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: vty: Fix bad use of vector_slot()
..


vty: Fix bad use of vector_slot()

Commit in e9e9e427b78271941a25a63567fc2ec2bb9e4433 attempted to fix a
compilation warning but introduced a regression documented in OS#2613.

The commit was reverted in 4aa0258269296f078e685e21fb08b115567e814.

After closer lookup and testing, it seems vector_slot(vline, index) is
expected to be NULL in this case as set by vty_complete_command:
/* In case of 'help \t'. */
if (isspace((int)vty->buf[vty->length - 1]))
vector_set(vline, NULL);

As a result, the correct fix for the compilation warning is to test
against NULL instead of testing for empty string.

Change-Id: Id9e02bbf89e0a94e1766b1efd236538712415c8a
---
M src/vty/command.c
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/vty/command.c b/src/vty/command.c
index 21b26b4..98d86d2 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -1950,7 +1950,7 @@
 
/* In case of 'command \t' pattern.  Do you need '?' command at
   the end of the line. */
-   if (vector_slot(vline, index) == '\0')
+   if (vector_slot(vline, index) == NULL)
*status = CMD_ERR_NOTHING_TODO;
else
*status = CMD_ERR_NO_MATCH;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id9e02bbf89e0a94e1766b1efd236538712415c8a
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


libosmocore[master]: vty: Fix bad use of vector_slot()

2017-11-10 Thread Neels Hofmeyr

Patch Set 1:

This should be fine to submit .. I am tempted to do so now

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id9e02bbf89e0a94e1766b1efd236538712415c8a
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[MERGED] osmo-ci[master]: jenkins: Follow the convention and create a jenkins.sh as well

2017-11-10 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: jenkins: Follow the convention and create a jenkins.sh as well
..


jenkins: Follow the convention and create a jenkins.sh as well

Instead of modifying the job on Jenkins, let's do it like in our
other projects. Create the diretcory if it doesn't exist and use
git pull origin for the Debian9 system.

Change-Id: I0ecdc02e3271fe09980f370167277370c599fcfa
---
A contrib/jenkins.sh
1 file changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
new file mode 100755
index 000..eb079a2
--- /dev/null
+++ b/contrib/jenkins.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+cd ~/osmo-ci || (cd ~/ && git clone git://git.osmocom.org/osmo-ci && cd 
osmo-ci)
+git rev-parse HEAD
+git status
+
+git fetch && git checkout -f -B master origin/master
+
+git rev-parse HEAD
+git status

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ecdc02e3271fe09980f370167277370c599fcfa
Gerrit-PatchSet: 4
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Neels Hofmeyr 


osmo-ci[master]: jenkins: Follow the convention and create a jenkins.sh as well

2017-11-10 Thread Neels Hofmeyr

Patch Set 3: Verified+1

Code-Review+3

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0ecdc02e3271fe09980f370167277370c599fcfa
Gerrit-PatchSet: 3
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section

2017-11-10 Thread Neels Hofmeyr

Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section

2017-11-10 Thread Neels Hofmeyr

Patch Set 2: Code-Review-1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-gsm-manuals[master]: OsmoGSMTester: Installation: change some confusing terminology

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5c882e77b469629028b8d773053783e18f3d1737
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-gsm-manuals[master]: OsmoGSMTester: Move TODO comment to a redmine task

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I79837e49f3e6af4254e9f0c7f53037eae66cda6d
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-gsm-manuals[master]: OsmoGSMTester: Document how to setup main unit to set CAP_NE...

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I011beaa929efcabe9a9dc4f9c7222ba36fa2aae4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[PATCH] osmo-mgw[master]: vty: do not change number_endpoints at runtime

2017-11-10 Thread dexter

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

vty: do not change number_endpoints at runtime

The variable number_endpoints is used as a length indicator
for the array that contains the trunk endpoints at all times.
When osmo-mgw is startet up, the variable is set and osmo-mgw
will allocate the memory for the endpoints. However, it is
still possible to manipulate the variable via the telnet
interface. When the value is increased osmo-mgw might start
using unallocated memory at some point.

Store subsequent changes of number_enspoints in a separate
variable in order to write them to the config file. The
changes will then take effect after a restart.

Change-Id: I3994af016fb96427263edbba05f560743f85fdd4
---
M include/osmocom/mgcp/mgcp.h
M src/libosmo-mgcp/mgcp_vty.c
2 files changed, 17 insertions(+), 3 deletions(-)


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

diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h
index 42a91d8..1d46b8e 100644
--- a/include/osmocom/mgcp/mgcp.h
+++ b/include/osmocom/mgcp/mgcp.h
@@ -151,6 +151,7 @@
int rtp_accept_all;
 
unsigned int number_endpoints;
+   int new_number_endpoints;
struct mgcp_endpoint *endpoints;
 };
 
diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c
index fcf756b..ac4e82b 100644
--- a/src/libosmo-mgcp/mgcp_vty.c
+++ b/src/libosmo-mgcp/mgcp_vty.c
@@ -115,7 +115,7 @@
g_cfg->trunk.audio_send_name ? "" : "no ", VTY_NEWLINE);
vty_out(vty, "  loop %u%s", ! !g_cfg->trunk.audio_loop, VTY_NEWLINE);
vty_out(vty, "  number endpoints %u%s",
-   g_cfg->trunk.number_endpoints - 1, VTY_NEWLINE);
+   g_cfg->trunk.new_number_endpoints - 1, VTY_NEWLINE);
vty_out(vty, "  %sallow-transcoding%s",
g_cfg->trunk.no_audio_transcoding ? "no " : "", VTY_NEWLINE);
if (g_cfg->call_agent_addr)
@@ -509,8 +509,19 @@
   "number endpoints <0-65534>",
   "Number options\n" "Endpoints available\n" "Number endpoints\n")
 {
-   /* + 1 as we start counting at one */
-   g_cfg->trunk.number_endpoints = atoi(argv[0]) + 1;
+   if (g_cfg->trunk.new_number_endpoints < 0) {
+   /* + 1 as we start counting at one */
+   g_cfg->trunk.number_endpoints = atoi(argv[0]) + 1;
+   g_cfg->trunk.new_number_endpoints =
+   g_cfg->trunk.number_endpoints;
+   } else {
+   g_cfg->trunk.new_number_endpoints = atoi(argv[0]) + 1;
+   vty_out(vty, "%%endpoint number changed, write config file 
and%s",
+   VTY_NEWLINE);
+   vty_out(vty, "%%restart osmo-mgw for the changes take effect%s",
+   VTY_NEWLINE);
+   }
+
return CMD_SUCCESS;
 }
 
@@ -1262,6 +1273,8 @@
cfg->osmux_batch_size = OSMUX_BATCH_DEFAULT_MAX;
 
g_cfg = cfg;
+   g_cfg->trunk.new_number_endpoints = -1;
+
rc = vty_read_config_file(config_file, NULL);
if (rc < 0) {
fprintf(stderr, "Failed to parse the config file: '%s'\n",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3994af016fb96427263edbba05f560743f85fdd4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 


osmo-gsm-manuals[master]: OsmoGSMTester: Update resources cfg documentation

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6ec9fc5468ce6ead52d9c8b35d8991cac4bfa97e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-gsm-manuals[master]: OsmoGSMTester: Update defaults.conf example

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If12df88b4088ecec6d6cb20c83a693c019b8af4a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-gsm-manuals[master]: OsmoGSMTester: Remove resolved TODO

2017-11-10 Thread Neels Hofmeyr

Patch Set 1:

yay :)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie0f18293e566a690d2434d08cbaaf2fdf71d88e4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-gsm-manuals[master]: OsmoGSMTester: Remove resolved TODO

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie0f18293e566a690d2434d08cbaaf2fdf71d88e4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Improve Trial section content

2017-11-10 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/4666

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

OsmoGSMTester: Improve Trial section content

Change-Id: I8d74b02166ea33ad9ab7f987894f4f02064fbebc
---
M OsmoGSMTester/chapters/trial.adoc
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/66/4666/2

diff --git a/OsmoGSMTester/chapters/trial.adoc 
b/OsmoGSMTester/chapters/trial.adoc
index 86bf12b..bc9fe05 100644
--- a/OsmoGSMTester/chapters/trial.adoc
+++ b/OsmoGSMTester/chapters/trial.adoc
@@ -18,5 +18,14 @@
 
 * the rendered configuration files used to run the binaries
 * stdout and stderr outputs of the binaries
+* pcap files for processes doing relevant network communication
 * a test log
-* *TODO*: jenkins parsable XML reports
+* jenkins parsable XML (Junit) reports
+
+The script in 'contrib/jenkins-run.sh' takes care of related tasks such as
+
+* creating the dir structure,
+* generating md5 sums for the various tar.gz containing software builds to be 
tested,
+* cleaning up after the build,
+* saving extra logs such as journalctl output from ofonod,
+* generating a final .tar.gz file with all the logs and reports.

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8d74b02166ea33ad9ab7f987894f4f02064fbebc
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder


osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section

2017-11-10 Thread Neels Hofmeyr

Patch Set 2:

Pau, could you verify that my edits are correct?

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[PATCH] osmo-gsm-manuals[master]: OsmoGSMTester: Add scenarios_dir section

2017-11-10 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/4667

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

OsmoGSMTester: Add scenarios_dir section

It explains how scenario combination works

Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f
---
M OsmoGSMTester/chapters/config.adoc
1 file changed, 55 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/67/4667/2

diff --git a/OsmoGSMTester/chapters/config.adoc 
b/OsmoGSMTester/chapters/config.adoc
index 3f8cb44..bf5f04f 100644
--- a/OsmoGSMTester/chapters/config.adoc
+++ b/OsmoGSMTester/chapters/config.adoc
@@ -58,6 +58,61 @@
 that the 'state_dir' is used to reserve resources, which only works when all
 configurations that share resources also use the same 'state_dir'.
 
+[[scenarios_dir]]
+ 'scenarios_dir'
+
+This dir contains scenario configuration files.
+
+Scenarios define contraints to serve the resource requests of a 'suite.conf',
+to select specific resources from the general resource pool specified in 
'resources.conf'.
+
+All 'times' attributes are expanded before matching. For example, if a 
'suite.conf'
+requests two BTS, we may enforce that both BTS should be of type 
'osmo-bts-sysmo' in
+these ways:
+
+
+resources:
+  bts:
+  - type: osmo-bts-sysmo
+  - type: osmo-bts-sysmo
+
+
+or alternatively,
+
+
+resources:
+  bts:
+  - times: 2
+type: osmo-bts-sysmo
+
+
+If only one resource is specified in the scenario, then the resource allocator
+assumes the restriction is to be applied to the first resource and that 
remaining
+resources have no restrictions to be taken into consideration.
+
+To apply restrictions only on the second resource, the first element can be 
left
+emtpy, like:
+
+
+resources:
+  bts:
+  - {}
+  - type: osmo-bts-sysmo
+
+
+On the 'osmo_gsm_tester.py' command line and the 'default_suites.conf', any 
number of
+such scenario configurations can be combined in the form:
+
+
+:[+[+...]]
+
+
+e.g.
+
+
+my_suite:sysmo+tch_f+amr
+
+
 [[resources_conf]]
 === 'resources.conf'
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3f89bd3d71400da14cda7ea8bb9c190fe80a539f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder


osmo-gsm-manuals[master]: OsmoGSMTester: Add suites_dir section

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie25fd742f484981f5e5b25397c2637eda38f0424
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[PATCH] osmo-hlr[master]: db-tool: cosmetic: tweak printf output

2017-11-10 Thread Neels Hofmeyr

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

db-tool: cosmetic: tweak printf output

Say  to indicate a filename.
No need to print the cmd and arg count, really.

Change-Id: I3be31754db5297b3f6028877068f97ce1be4d74b
---
M src/hlr_db_tool.c
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/77/4777/1

diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c
index 13281f2..fb10f3e 100644
--- a/src/hlr_db_tool.c
+++ b/src/hlr_db_tool.c
@@ -66,7 +66,7 @@
printf("  create Create an empty OsmoHLR 
database.\n");
printf(" (All commands imply this if none 
exists yet.)\n");
printf("\n");
-   printf("  import-nitb-db db  Add OsmoNITB db's subscribers to 
OsmoHLR db.\n");
+   printf("  import-nitb-dbAdd OsmoNITB db's subscribers to 
OsmoHLR db.\n");
printf(" Be aware that the import is lossy, 
only the\n");
printf(" IMSI, MSISDN, nam_cs/ps and 2G 
auth data are set.\n");
 }
@@ -143,7 +143,6 @@
}
 
cmd = argv[optind++];
-   printf("command '%s', %d extra arguments\n", cmd, argc - optind);
 
if (!strcmp(cmd, "create")) {
/* Nothing to do, just run the main program to open the 
database without running any

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3be31754db5297b3f6028877068f97ce1be4d74b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[PATCH] osmo-hlr[master]: db-tool: add command 'create'

2017-11-10 Thread Neels Hofmeyr

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

db-tool: add command 'create'

Change-Id: Ic4997d17763e50fb63c36fc0001570230bf64a12
---
M src/hlr_db_tool.c
1 file changed, 12 insertions(+), 4 deletions(-)


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

diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c
index eb82c92..13281f2 100644
--- a/src/hlr_db_tool.c
+++ b/src/hlr_db_tool.c
@@ -51,8 +51,7 @@
 static void print_help()
 {
printf("\n");
-   printf("Usage: osmo-hlr-db-tool [-l ] import-nitb-db 
]\n");
-   printf("Call without arguments to create a new empty ./hlr.db.\n");
+   printf("Usage: osmo-hlr-db-tool [-l ] [create|import-nitb-db 
]\n");
printf("  -l --database db-name  The OsmoHLR database to use, 
default '%s'.\n",
   cmdline_opts.db_file);
printf("  -h --help  This text.\n");
@@ -61,6 +60,11 @@
printf("  -T --timestamp Prefix every log line with a 
timestamp.\n");
printf("  -e --log-level number  Set a global loglevel.\n");
printf("  -V --version   Print the version of 
OsmoHLR-db-tool.\n");
+   printf("\n");
+   printf("Commands:\n");
+   printf("\n");
+   printf("  create Create an empty OsmoHLR 
database.\n");
+   printf(" (All commands imply this if none 
exists yet.)\n");
printf("\n");
printf("  import-nitb-db db  Add OsmoNITB db's subscribers to 
OsmoHLR db.\n");
printf(" Be aware that the import is lossy, 
only the\n");
@@ -141,7 +145,10 @@
cmd = argv[optind++];
printf("command '%s', %d extra arguments\n", cmd, argc - optind);
 
-   if (!strcmp(cmd, "import-nitb-db")) {
+   if (!strcmp(cmd, "create")) {
+   /* Nothing to do, just run the main program to open the 
database without running any
+* action, which will bootstrap all tables. */
+   } else if (!strcmp(cmd, "import-nitb-db")) {
if (argc - optind < 1) {
fprintf(stderr, "You must specify an input db file\n");
print_help();
@@ -387,7 +394,8 @@
goto too_many_actions;
main_action = import_nitb_db;
}
-   /* Future: add more main_actions, besides --import-nitb-db, here. */
+   /* Future: add more main_actions, besides import-nitb-db, here.
+* For command 'create', no action is required. */
 
/* Just in case any db actions need randomness */
rc = rand_init();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4997d17763e50fb63c36fc0001570230bf64a12
Gerrit-PatchSet: 1
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[PATCH] osmo-hlr[master]: db-tool: error-exit on too many arguments

2017-11-10 Thread Neels Hofmeyr

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

db-tool: error-exit on too many arguments

Each arg parsing should increment optind, so if there are any surplus args in
the end, that's an error.

Change-Id: I9fc0a87d11db8c35061568e3f8b5a5547931a961
---
M src/hlr_db_tool.c
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/78/4778/1

diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c
index fb10f3e..d8a3584 100644
--- a/src/hlr_db_tool.c
+++ b/src/hlr_db_tool.c
@@ -159,6 +159,12 @@
print_help();
exit(EXIT_FAILURE);
}
+
+   if (argc - optind > 0) {
+   fprintf(stderr, "Too many arguments: '%s'\n", argv[optind]);
+   print_help();
+   exit(EXIT_FAILURE);
+   }
 }
 
 static void signal_hdlr(int signal)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9fc0a87d11db8c35061568e3f8b5a5547931a961
Gerrit-PatchSet: 1
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[PATCH] osmo-mgw[master]: vty: simplify endpoint allocation

2017-11-10 Thread dexter

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

vty: simplify endpoint allocation

mgcp_parse_config() uses a helper function allocate_trunk() to
perform the trunk allocation. This helper function only calls
mgcp_endpoints_allocate() and checks the return code.

Call mgcp_endpoints_allocate() directly from mgcp_parse_config()

Change-Id: Iefdc5b905d76d2cd97f26584261fe5cbefb699cf
---
M src/libosmo-mgcp/mgcp_vty.c
1 file changed, 2 insertions(+), 14 deletions(-)


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

diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c
index 7ff1fdd..fcf756b 100644
--- a/src/libosmo-mgcp/mgcp_vty.c
+++ b/src/libosmo-mgcp/mgcp_vty.c
@@ -1251,18 +1251,6 @@
return 0;
 }
 
-static int allocate_trunk(struct mgcp_trunk_config *trunk)
-{
-   if (mgcp_endpoints_allocate(trunk) != 0) {
-   LOGP(DLMGCP, LOGL_ERROR,
-"Failed to allocate %d endpoints on trunk %d.\n",
-trunk->number_endpoints, trunk->trunk_nr);
-   return -1;
-   }
-
-   return 0;
-}
-
 int mgcp_parse_config(const char *config_file, struct mgcp_config *cfg,
  enum mgcp_role role)
 {
@@ -1286,14 +1274,14 @@
return -1;
}
 
-   if (allocate_trunk(&g_cfg->trunk) != 0) {
+   if (mgcp_endpoints_allocate(&g_cfg->trunk) != 0) {
LOGP(DLMGCP, LOGL_ERROR,
 "Failed to initialize the virtual trunk.\n");
return -1;
}
 
llist_for_each_entry(trunk, &g_cfg->trunks, entry) {
-   if (allocate_trunk(trunk) != 0) {
+   if (mgcp_endpoints_allocate(trunk) != 0) {
LOGP(DLMGCP, LOGL_ERROR,
 "Failed to initialize E1 trunk %d.\n",
 trunk->trunk_nr);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefdc5b905d76d2cd97f26584261fe5cbefb699cf
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] osmo-mgw[master]: fix segfault: DLCX for unknown endpoint: dont try to log NUL...

2017-11-10 Thread Neels Hofmeyr

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

fix segfault: DLCX for unknown endpoint: dont try to log NULL endpoint

Change-Id: Ib127fd81a2d68f51c470ff77ef0822bdb4829de4
---
M src/libosmo-mgcp/mgcp_protocol.c
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index 8c6bd6e..9e04e50 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -853,12 +853,12 @@
struct mgcp_conn_rtp *conn = NULL;
uint32_t conn_id;
 
+   if (p->found != 0)
+   return create_err_response(NULL, error_code, "DLCX", p->trans);
+
LOGP(DLMGCP, LOGL_NOTICE,
 "DLCX: endpoint:%x deleting connection ...\n",
 ENDPOINT_NUMBER(endp));
-
-   if (p->found != 0)
-   return create_err_response(NULL, error_code, "DLCX", p->trans);
 
if (llist_count(&endp->conns) <= 0) {
LOGP(DLMGCP, LOGL_ERROR,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib127fd81a2d68f51c470ff77ef0822bdb4829de4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


meta-telephony[laforge/nightly]: osmo-mgw: Split packages and install osmo-mgw systemd service

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1b902842cf8766af1e58de76e46786213d222389
Gerrit-PatchSet: 1
Gerrit-Project: meta-telephony
Gerrit-Branch: laforge/nightly
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-mgw[master]: vty: assign new VTY port numbr

2017-11-10 Thread Neels Hofmeyr

Patch Set 2: Code-Review-1

you also need to adjust the osmo-appdesc.py or whatever it is called so the VTY 
tests are using the new port number

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2ca66897a39c7f20c58a3ebae0c70af0a3b6899f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[MERGED] osmo-gsm-manuals[master]: common: add VTY port number for osmo-mgw

2017-11-10 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: common: add VTY port number for osmo-mgw
..


common: add VTY port number for osmo-mgw

Change-Id: Ifa7eec30ccc5a0beb26c9ec50492d4637cd1d0a5
---
M common/chapters/port_numbers.adoc
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/common/chapters/port_numbers.adoc 
b/common/chapters/port_numbers.adoc
index 08d9b3c..32baad5 100644
--- a/common/chapters/port_numbers.adoc
+++ b/common/chapters/port_numbers.adoc
@@ -35,6 +35,7 @@
 |TCP|4258|telnet (VTY)|osmo-hlr
 |TCP|4259|Control Interface|osmo-hlr
 |TCP|4260|telnet (VTY)|ggsn (OpenGGSN)
+|TCP|4261|telnet (VTY)|osmo-mgw
 |UDP|4729|GSMTAP|Almost every osmocom project
 |TCP|5000|A/IP|osmo-bsc, osmo-bsc_nat
 |UDP|2427|GSMTAP|osmo-pcu, osmo-bts

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa7eec30ccc5a0beb26c9ec50492d4637cd1d0a5
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[MERGED] libosmocore[master]: vty: add port number for osmo-mgw

2017-11-10 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: vty: add port number for osmo-mgw
..


vty: add port number for osmo-mgw

Change-Id: Ied224fe94b5152fd19e259396fbc0eaf69be4b96
---
M include/osmocom/vty/ports.h
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h
index ab3e1d5..ab43f05 100644
--- a/include/osmocom/vty/ports.h
+++ b/include/osmocom/vty/ports.h
@@ -28,4 +28,5 @@
 #define OSMO_VTY_PORT_HLR  4258
 /* 4259 used by control interface */
 #define OSMO_VTY_PORT_GGSN 4260
+#define OSMO_VTY_PORT_MGW  4261
 /* When adding/changing port numbers, keep docs and wiki in sync. See above. */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ied224fe94b5152fd19e259396fbc0eaf69be4b96
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


libosmocore[master]: vty: add port number for osmo-mgw

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ied224fe94b5152fd19e259396fbc0eaf69be4b96
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-gsm-manuals[master]: common: add VTY port number for osmo-mgw

2017-11-10 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifa7eec30ccc5a0beb26c9ec50492d4637cd1d0a5
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[PATCH] meta-telephony[laforge/nightly]: osmo-mgw: Split packages and install osmo-mgw systemd service

2017-11-10 Thread Pau Espin Pedrol

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

osmo-mgw: Split packages and install osmo-mgw systemd service

Change-Id: I1b902842cf8766af1e58de76e46786213d222389
---
M recipes-osmocom/osmo-mgw/osmo-mgw.inc
1 file changed, 34 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/73/4773/1

diff --git a/recipes-osmocom/osmo-mgw/osmo-mgw.inc 
b/recipes-osmocom/osmo-mgw/osmo-mgw.inc
index 45ee338..2d6db64 100644
--- a/recipes-osmocom/osmo-mgw/osmo-mgw.inc
+++ b/recipes-osmocom/osmo-mgw/osmo-mgw.inc
@@ -5,7 +5,7 @@
 
 DEPENDS = "libosmocore libosmo-netif bcg729 libgsm"
 
-INC_PR="r0.${META_TELEPHONY_OSMO_INC}"
+INC_PR="r1.${META_TELEPHONY_OSMO_INC}"
 
 inherit autotools pkgconfig systemd
 
@@ -17,6 +17,38 @@
 
install -m 0644 ${S}/doc/examples/osmo-bsc_mgcp/mgcp.cfg 
${D}${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg
install -m 0644 ${S}/contrib/systemd/osmo-bsc-mgcp.service 
${D}${systemd_system_unitdir}/
+
+   install -m 0644 ${S}/doc/examples/osmo-mgw/osmo-mgw.cfg 
${D}${sysconfdir}/osmocom/osmo-mgw.cfg
+   install -m 0644 ${S}/contrib/systemd/osmo-mgw.service 
${D}${systemd_system_unitdir}/
 }
 
-SYSTEMD_SERVICE_osmo-mgw = "osmo-bsc-mgcp.service"
+PACKAGES =+ " libosmo-legacy-mgcp libosmo-legacy-mgcp-dev libosmo-mgcp 
libosmo-mgcp-dev libosmo-mgcp-client libosmo-mgcp-client-dev osmo-bsc-mgcp"
+SYSTEMD_SERVICE_osmo-mgw = "osmo-mgw.service"
+SYSTEMD_SERVICE_osmo-bsc-mgcp = "osmo-bsc-mgcp.service"
+
+FILES_libosmo-legacy-mgcp = "${libdir}/libosmo-legacy-mgcp${SOLIBS}"
+FILES_libosmo-legacy-mgcp-dev = " \
+   ${includedir}/osmocom/legacy_mgcp \
+   ${libdir}/pkgconfig/libosmo-legacy-mgcp.pc \
+   ${libdir}/libosmo-legacy-mgcp${SOLIBSDEV} \
+   "
+
+FILES_libosmo-mgcp = "${libdir}/libosmo-mgcp${SOLIBS}"
+FILES_libosmo-mgcp-dev = " \
+${includedir}/osmocom/mgcp \
+${libdir}/pkgconfig/libosmo-mgcp.pc \
+${libdir}/libosmo-mgcp${SOLIBSDEV} \
+"
+
+FILES_libosmo-mgcp-client = "${libdir}/libosmo-mgcp-client${SOLIBS}"
+FILES_libosmo-mgcp-client-dev = " \
+   ${includedir}/osmocom/mgcp_client \
+   ${libdir}/pkgconfig/libosmo-mgcp-client.pc \
+   ${libdir}/libosmo-mgcp-client${SOLIBSDEV} \
+   "
+
+FILES_osmo-bsc-mgcp = " \
+   ${bindir}/osmo-bsc_mgcp \
+   ${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg \
+   ${systemd_unitdir}/system/osmo-bsc-mgcp.service \
+   "

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b902842cf8766af1e58de76e46786213d222389
Gerrit-PatchSet: 1
Gerrit-Project: meta-telephony
Gerrit-Branch: laforge/nightly
Gerrit-Owner: Pau Espin Pedrol 


osmocom-bb[master]: WIP: First invocation of a primitive and callback into lua..

2017-11-10 Thread Holger Freyther

Patch Set 1:

(5 comments)

https://gerrit.osmocom.org/#/c/4772/1/src/host/layer23/src/mobile/script_lua.c
File src/host/layer23/src/mobile/script_lua.c:

Line 99:struct timer_userdata *timer = (void *)(intptr_t) 
prim->timer_id;
Don't we have a macro for ptr/int conversion?


Line 114:   lua_error(L);
I think this is using a "longjmp" same for luaL_argcheck...


Line 127:   lua_setmetatable(L, -2);
In LUA one manipulates the stack and 1 <= abs(index) <= top-of-stack is a valid 
range. One can use negative or positive numbers.

stack pos #1.. the first push to the stack (e.g. bottom)
stack pos #-1 the top of stack (last push)


Line 143:   printf("GC...\n");
Need to cancel the timer here. There is no PRIM_OP_CANCEL. Should there be? 
Otherwise I do PRIM_MOB_TIMER_CANCEL primitive and no indication..


Line 147: static const struct luaL_Reg timer_funcs[] = {
these are the instance methods of the timer object. SO far only GC.. but we can 
add cancel later..


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I55603f71a1d2426622e3b601d2686903cb74a8e1
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


osmocom-bb[master]: WIP: First invocation of a primitive and callback into lua..

2017-11-10 Thread Holger Freyther

Patch Set 1:

And here is the just completed callback code..

* Call from Lua->C and issue a primtivie..
* On primitive indication callback into LUA

So I want a callback style of work for the scripts. Instead of plain 
imperative. But actually we could also have a style of...

  osmo.timeout(5)
  print("Continue stuff")

and yield execution inbetween. The big issue with this.. is one needs to invent 
kind of a selective receive to wait for SMS or network selection...

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I55603f71a1d2426622e3b601d2686903cb74a8e1
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmocom-bb[master]: mobile: Begin with a primitive interface on top of the code

2017-11-10 Thread Holger Freyther

Patch Set 1:

So the question if this is the intended use of the primitive interface. One 
todo is which SAP client code should use?

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


[PATCH] osmocom-bb[master]: mobile: Begin with a primitive interface on top of the code

2017-11-10 Thread Holger Freyther

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

mobile: Begin with a primitive interface on top of the code

We want the script interface to interface through a primitive
interface. This will allow to move it to a different thread or
a process in the future. The script interface will just use the
primitives.

It is not clear how "sap" will be used here. I am keeping it
at 0 right now. The first primitive is starting a timer with a
request and then getting an indication as a response.

Change-Id: Id2456b7fae35546553c4805f12a40c0812d9255c
---
M src/host/layer23/include/osmocom/bb/common/logging.h
M src/host/layer23/include/osmocom/bb/mobile/Makefile.am
A src/host/layer23/include/osmocom/bb/mobile/primitives.h
M src/host/layer23/src/common/logging.c
M src/host/layer23/src/mobile/Makefile.am
M src/host/layer23/src/mobile/main.c
A src/host/layer23/src/mobile/primitives.c
7 files changed, 126 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/71/4771/1

diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h 
b/src/host/layer23/include/osmocom/bb/common/logging.h
index e96bdc0..bb26acd 100644
--- a/src/host/layer23/include/osmocom/bb/common/logging.h
+++ b/src/host/layer23/include/osmocom/bb/common/logging.h
@@ -23,6 +23,7 @@
DSIM,
DGPS,
DLUA,
+   DPRIM,
 };
 
 extern const struct log_info log_info;
diff --git a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am 
b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am
index b58b952..12cf24b 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am
+++ b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am
@@ -1,3 +1,3 @@
 noinst_HEADERS = gsm322.h gsm480_ss.h gsm411_sms.h gsm48_cc.h gsm48_mm.h \
 gsm48_rr.h mncc.h settings.h subscriber.h support.h \
-transaction.h vty.h mncc_sock.h
+transaction.h vty.h mncc_sock.h primitives.h
diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h 
b/src/host/layer23/include/osmocom/bb/mobile/primitives.h
new file mode 100644
index 000..0ba0cac
--- /dev/null
+++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h
@@ -0,0 +1,33 @@
+#pragma once
+
+#include 
+
+/**
+ * Mobile Script<->App primitives. Application script will receive
+ * indications and will send primitives to the lower layers. Here
+ * we will convert from internal state/events to the primitives. In
+ * the future the indications might be generated at lower levels
+ * directly.
+ */
+enum mobile_prim {
+   PRIM_MOB_TIMER,
+};
+
+struct mobile_prim_intf {
+   struct osmocom_ms *ms;
+   void (*indication)(struct mobile_prim_intf *, struct osmo_prim_hdr 
*hdr);
+};
+
+/**
+ * Primitive to create timers and get indication once they have
+ * expired. Currently there is no way to cancel timers.
+ */
+struct mobile_timer_prim {
+   struct osmo_prim_hdr hdr;   /*!< Primitive base class */
+   uint64_t timer_id;  /*!< Unique Id identifying the timer */
+   int seconds;/*!< Seconds the timer should fire in */
+};
+
+
+struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms);
+int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct osmo_prim_hdr 
*hdr);
diff --git a/src/host/layer23/src/common/logging.c 
b/src/host/layer23/src/common/logging.c
index ce3af2c..1cbb1c3 100644
--- a/src/host/layer23/src/common/logging.c
+++ b/src/host/layer23/src/common/logging.c
@@ -133,6 +133,12 @@
.color = "\033[1;32m",
.enabled = 1, .loglevel = LOGL_DEBUG,
},
+   [DPRIM] = {
+   .name = "DPRIM",
+   .description = "PRIM",
+   .color = "\033[1;32m",
+   .enabled = 1, .loglevel = LOGL_DEBUG,
+   },
 };
 
 const struct log_info log_info = {
diff --git a/src/host/layer23/src/mobile/Makefile.am 
b/src/host/layer23/src/mobile/Makefile.am
index 50ced6c..4e80e4e 100644
--- a/src/host/layer23/src/mobile/Makefile.am
+++ b/src/host/layer23/src/mobile/Makefile.am
@@ -5,7 +5,7 @@
 noinst_LIBRARIES = libmobile.a
 libmobile_a_SOURCES = gsm322.c gsm480_ss.c gsm411_sms.c gsm48_cc.c gsm48_mm.c \
gsm48_rr.c mnccms.c settings.c subscriber.c support.c \
-   transaction.c vty_interface.c voice.c mncc_sock.c
+   transaction.c vty_interface.c voice.c mncc_sock.c primitives.c
 
 bin_PROGRAMS = mobile
 
diff --git a/src/host/layer23/src/mobile/main.c 
b/src/host/layer23/src/mobile/main.c
index 848be6e..500270d 100644
--- a/src/host/layer23/src/mobile/main.c
+++ b/src/host/layer23/src/mobile/main.c
@@ -70,7 +70,7 @@
 
 
 const char *debug_default =
-   
"DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DLUA";
+   
"DCS:DNB:DPLMN:DRR:DMM:DSIM:DCC:DMNCC:DSS:DLSMS:DPAG:DSUM:DSAP:DGPS:DLUA:DPRIM";
 
 const char *openbsc_copyright =
"Copyright (C) 2010-2015 Andreas Eversberg, Sylvain Munaut, Holger 
Freyther, Harald Welte\n"
diff --g

[PATCH] osmocom-bb[master]: WIP: First invocation of a primitive and callback into lua..

2017-11-10 Thread Holger Freyther

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

WIP: First invocation of a primitive and callback into lua..

local timer = osmo.timeout(5, function()
print("After timeout!!!")
end)
print("Timer", timer, type(timer))

<0011> @foo.lua:18 Timer<0011> @foo.lua:18  userdata
Connection to layer 1 failed!
Using configuration from ../../../doc/examples/mobile/default.cfg
VTY available on 127.0.0.1 4247
<0011> @foo.lua:16 After timeout!!!

Change-Id: I55603f71a1d2426622e3b601d2686903cb74a8e1
---
M src/host/layer23/include/osmocom/bb/mobile/primitives.h
M src/host/layer23/src/mobile/primitives.c
M src/host/layer23/src/mobile/script_lua.c
3 files changed, 138 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/72/4772/1

diff --git a/src/host/layer23/include/osmocom/bb/mobile/primitives.h 
b/src/host/layer23/include/osmocom/bb/mobile/primitives.h
index 0ba0cac..c5bceb5 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/primitives.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/primitives.h
@@ -16,6 +16,9 @@
 struct mobile_prim_intf {
struct osmocom_ms *ms;
void (*indication)(struct mobile_prim_intf *, struct osmo_prim_hdr 
*hdr);
+
+   /* Internal state */
+   struct llist_head timers;
 };
 
 /**
@@ -31,3 +34,4 @@
 
 struct mobile_prim_intf *mobile_prim_intf_alloc(struct osmocom_ms *ms);
 int mobile_prim_intf_req(struct mobile_prim_intf *intf, struct osmo_prim_hdr 
*hdr);
+void mobile_prim_intf_free(struct mobile_prim_intf *intf);
diff --git a/src/host/layer23/src/mobile/primitives.c 
b/src/host/layer23/src/mobile/primitives.c
index bdfbabb..71e4b63 100644
--- a/src/host/layer23/src/mobile/primitives.c
+++ b/src/host/layer23/src/mobile/primitives.c
@@ -25,6 +25,7 @@
 #include 
 
 struct timer_closure {
+   struct llist_head entry;
struct mobile_prim_intf *intf;
struct osmo_timer_list timer;
uint64_t id;
@@ -36,7 +37,21 @@
 
intf = talloc_zero(ms, struct mobile_prim_intf);
intf->ms = ms;
+
+   INIT_LLIST_HEAD(&intf->timers);
return intf;
+}
+
+void mobile_prim_intf_free(struct mobile_prim_intf *intf)
+{
+   struct timer_closure *timer, *tmp;
+
+   llist_for_each_entry_safe(timer, tmp, &intf->timers, entry) {
+   osmo_timer_del(&timer->timer);
+   llist_del(&timer->entry);
+   talloc_free(timer);
+   }
+   talloc_free(intf);
 }
 
 static void timer_expired_cb(void *_closure)
@@ -47,6 +62,7 @@
 
intf = closure->intf;
prim.timer_id = closure->id;
+   llist_del(&closure->entry);
talloc_free(closure);
 
osmo_prim_init(&prim.hdr, 0, PRIM_MOB_TIMER, PRIM_OP_INDICATION, NULL);
@@ -64,6 +80,7 @@
closure->id = prim->timer_id;
closure->timer.cb = timer_expired_cb;
closure->timer.data = closure;
+   llist_add_tail(&closure->entry, &intf->timers);
osmo_timer_schedule(&closure->timer, prim->seconds, 0);
return 0;
 }
diff --git a/src/host/layer23/src/mobile/script_lua.c 
b/src/host/layer23/src/mobile/script_lua.c
index 1cf9050..5e9859e 100644
--- a/src/host/layer23/src/mobile/script_lua.c
+++ b/src/host/layer23/src/mobile/script_lua.c
@@ -25,7 +25,26 @@
 #include 
 #include 
 
+#include 
+
 #include 
+
+struct timer_userdata {
+   int cb_ref;
+};
+
+static char lua_prim_key[] = "osmocom.org-mobile-prim";
+
+static struct mobile_prim_intf *get_primitive(lua_State *L)
+{
+   struct mobile_prim_intf *intf;
+
+   lua_pushlightuserdata(L, lua_prim_key);
+   lua_gettable(L, LUA_REGISTRYINDEX);
+   intf = (void *) lua_topointer(L, -1);
+   lua_pop(L, 1);
+   return intf;
+}
 
 static int lua_osmo_do_log(lua_State *L, int loglevel)
 {
@@ -75,6 +94,77 @@
{ NULL, NULL },
 };
 
+static void handle_timeout(struct mobile_prim_intf *intf, struct 
mobile_timer_prim *prim)
+{
+   struct timer_userdata *timer = (void *)(intptr_t) prim->timer_id;
+   lua_State *L = intf->ms->lua_state;
+
+   lua_rawgeti(L, LUA_REGISTRYINDEX, timer->cb_ref);
+   luaL_unref(L, LUA_REGISTRYINDEX, timer->cb_ref);
+   lua_pcall(L, 0, 0, 0);
+}
+
+static int lua_osmo_timeout(lua_State *L)
+{
+   struct mobile_timer_prim prim = { 0, };
+   struct timer_userdata *timer;
+
+   if(lua_gettop(L) != 2) {
+   lua_pushliteral(L, "Need two arguments");
+   lua_error(L);
+   return 0;
+   }
+
+   luaL_argcheck(L, lua_isnumber(L, -2), 1, "Timeout needs to be a 
number");
+   luaL_argcheck(L, lua_isfunction(L, -1), 2, "Callback needs to be a 
function");
+
+   /*
+* Create a handle to prevent the function to be GCed while we run the
+* timer. Add a metatable to the object so itself will be GCed properly.
+*/
+   timer = lua_newuserdata(L, sizeof(*timer));
+   luaL_getmetatable(L, "Timer");
+   lua_setmetatable(L, -2);
+
+   lua_pushvalue(L, -2);
+   tim

[MERGED] osmo-mgw[master]: contrib: Add osmo-mgw systemd service

2017-11-10 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged.

Change subject: contrib: Add osmo-mgw systemd service
..


contrib: Add osmo-mgw systemd service

Change-Id: Ic89815dc4ef8dff8a9d8541b61212ab8d4837712
---
A contrib/systemd/osmo-mgw.service
1 file changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/contrib/systemd/osmo-mgw.service b/contrib/systemd/osmo-mgw.service
new file mode 100644
index 000..f75277e
--- /dev/null
+++ b/contrib/systemd/osmo-mgw.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Osmocom Media Gateway (MGW)
+
+[Service]
+Type=simple
+Restart=always
+ExecStart=/usr/bin/osmo-mgw -s -c /etc/osmocom/osmo-mgw.cfg
+RestartSec=2
+
+[Install]
+WantedBy=multi-user.target

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic89815dc4ef8dff8a9d8541b61212ab8d4837712
Gerrit-PatchSet: 2
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 


[PATCH] osmo-mgw[master]: vty: assign new VTY port numbr

2017-11-10 Thread dexter

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

vty: assign new VTY port numbr

Osmo-mgw currently uses VTY port number of osmo-bsc_mgwp, which
may lead to colisions when operating osmo-bsc_mgcp and osmo-mgw
at the same time on the same machine.

Assign osmo-mgw a new port number

Change-Id: I2ca66897a39c7f20c58a3ebae0c70af0a3b6899f
Depends: libosmocore Ied224fe94b5152fd19e259396fbc0eaf69be4b96
---
M src/osmo-mgw/mgw_main.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/70/4770/1

diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c
index ab54e62..6932468 100644
--- a/src/osmo-mgw/mgw_main.c
+++ b/src/osmo-mgw/mgw_main.c
@@ -279,7 +279,7 @@
 
/* start telnet after reading config for vty_get_bind_addr() */
rc = telnet_init_dynif(tall_bsc_ctx, NULL,
-  vty_get_bind_addr(), OSMO_VTY_PORT_BSC_MGCP);
+  vty_get_bind_addr(), OSMO_VTY_PORT_MGW);
if (rc < 0)
return rc;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ca66897a39c7f20c58a3ebae0c70af0a3b6899f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] libosmocore[master]: vty: add port number for osmo-mgw

2017-11-10 Thread dexter

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

vty: add port number for osmo-mgw

Change-Id: Ied224fe94b5152fd19e259396fbc0eaf69be4b96
---
M include/osmocom/vty/ports.h
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/69/4769/1

diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h
index ab3e1d5..ab43f05 100644
--- a/include/osmocom/vty/ports.h
+++ b/include/osmocom/vty/ports.h
@@ -28,4 +28,5 @@
 #define OSMO_VTY_PORT_HLR  4258
 /* 4259 used by control interface */
 #define OSMO_VTY_PORT_GGSN 4260
+#define OSMO_VTY_PORT_MGW  4261
 /* When adding/changing port numbers, keep docs and wiki in sync. See above. */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied224fe94b5152fd19e259396fbc0eaf69be4b96
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] osmo-gsm-manuals[master]: common: add VTY port number for osmo-mgw

2017-11-10 Thread dexter

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

common: add VTY port number for osmo-mgw

Change-Id: Ifa7eec30ccc5a0beb26c9ec50492d4637cd1d0a5
---
M common/chapters/port_numbers.adoc
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/68/4768/1

diff --git a/common/chapters/port_numbers.adoc 
b/common/chapters/port_numbers.adoc
index 08d9b3c..32baad5 100644
--- a/common/chapters/port_numbers.adoc
+++ b/common/chapters/port_numbers.adoc
@@ -35,6 +35,7 @@
 |TCP|4258|telnet (VTY)|osmo-hlr
 |TCP|4259|Control Interface|osmo-hlr
 |TCP|4260|telnet (VTY)|ggsn (OpenGGSN)
+|TCP|4261|telnet (VTY)|osmo-mgw
 |UDP|4729|GSMTAP|Almost every osmocom project
 |TCP|5000|A/IP|osmo-bsc, osmo-bsc_nat
 |UDP|2427|GSMTAP|osmo-pcu, osmo-bts

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa7eec30ccc5a0beb26c9ec50492d4637cd1d0a5
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: dexter