[PATCH] libosmocore[master]: osmo_sock_get_name(): clearly indicate local and remote

2017-06-21 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/3000

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

osmo_sock_get_name(): clearly indicate local and remote

In a string like

  127.0.0.1:2905<->127.0.0.1:60661

it is hard to tell which is the local part. I'd have expected it on the left,
but it is actually on the right.

To avoid doubt and bypass bikesheds on which side should be what, clearly mark
the two sides as remote and local.

  (r=127.0.0.1:2905<->l=127.0.0.1:60661)

Change-Id: I43dcc6a1906429bd0955fd7fe2eb5b8495b592d8
---
M src/socket.c
M tests/socket/socket_test.c
2 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/00/3000/2

diff --git a/src/socket.c b/src/socket.c
index 6fa05a8..940fc6f 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -608,11 +608,11 @@
if (rc < 0)
goto local_only;
 
-   return talloc_asprintf(ctx, "(%s:%s<->%s:%s)", hostbuf_r, portbuf_r,
+   return talloc_asprintf(ctx, "(r=%s:%s<->l=%s:%s)", hostbuf_r, portbuf_r,
hostbuf_l, portbuf_l);
 
 local_only:
-   return talloc_asprintf(ctx, "(NULL<->%s:%s)", hostbuf_l, portbuf_l);
+   return talloc_asprintf(ctx, "(r=NULL<->l=%s:%s)", hostbuf_l, portbuf_l);
 }
 
 #endif /* HAVE_SYS_SOCKET_H */
diff --git a/tests/socket/socket_test.c b/tests/socket/socket_test.c
index b56d50c..11ef8da 100644
--- a/tests/socket/socket_test.c
+++ b/tests/socket/socket_test.c
@@ -49,7 +49,7 @@
 * as apparently that won't work on FreeBSD if there's only one
 * address (e.g. 127.0.0.1) assigned to the entire system, like
 * the Osmocom FreeBSD build slaves */
-   OSMO_ASSERT(!strncmp(name, "(NULL<->", 7));
+   OSMO_ASSERT(!strncmp(name, "(r=NULL<->", 9));
talloc_free(name);
/* expect it to be blocking */
rc = fcntl(fd, F_GETFL);
@@ -87,7 +87,7 @@
 * as apparently that won't work on FreeBSD if there's only one
 * address (e.g. 127.0.0.1) assigned to the entire system, like
 * the Osmocom FreeBSD build slaves */
-   OSMO_ASSERT(!strncmp(name, "(NULL<->", 7));
+   OSMO_ASSERT(!strncmp(name, "(r=NULL<->", 9));
talloc_free(name);
/* expect it to be blocking */
rc = fcntl(fd, F_GETFL);
@@ -116,7 +116,7 @@
/* For some reason, on the jenkins.osmocom.org build slave with
 * FreeBSD 10 inside a jail, it fails.  Works fine on laforge's
 * FreeBSD 10 or 11 VM at home */
-   OSMO_ASSERT(!strncmp(name, "(127.0.0.1:53<->127.0.0.1", 25));
+   OSMO_ASSERT(!strncmp(name, "(r=127.0.0.1:53<->l=127.0.0.1", 29));
 #endif
talloc_free(name);
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I43dcc6a1906429bd0955fd7fe2eb5b8495b592d8
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


libosmocore[master]: osmo_sock_get_name(): clearly indicate local and remote

2017-06-21 Thread Neels Hofmeyr

Patch Set 1: Code-Review+1

I prefer this one.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id3e32de19fe07ed5b19ee5e67494926a511266b5
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


libosmocore[master]: osmo_sock_get_name(): clearly indicate local and remote

2017-06-21 Thread Neels Hofmeyr

Patch Set 1:

Another contestant for this change is https://gerrit.osmocom.org/3001 -- let 
the votes decide which one wins.

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

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


libosmocore[master]: doxygen: various fixes in core/timer.h

2017-06-21 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


libosmocore[master]: doxygen: linuxlist.h: fix some API doc to use doxygen Qt style

2017-06-21 Thread Harald Welte

Patch Set 2:

the rationale of not changing this code is that it was inherited from the Linux 
kernel, and all related whitespace changes will make it more difficult to 
re-sync with a more recent kernel version of that file.  So I'm a bit undecided 
here...

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

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


libosmocore[master]: api doc typo fix in core/logging.h

2017-06-21 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


libosmocore[master]: doxygen: add missing gb API doc generation

2017-06-21 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


libosmocore[master]: doxygen: include all undocumented items in the API doc

2017-06-21 Thread Harald Welte

Patch Set 2: Code-Review+2

slightly unrelated: we should probably disable the EXTRACT_STATIC part to avoid 
documenting functions that users of the library cannot call anyway?

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

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


libosmocore[master]: doxygen: drop INPUT gsm/protocol, already part of gsm/

2017-06-21 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


libosmocore[master]: doxygen: enable AUTOBRIEF, drop \brief

2017-06-21 Thread Harald Welte

Patch Set 2:

we've had this discussion before, and I remember not being convinced about it.  
How does AUTOBRIEF decide which part is "brief" and which part is "verbose"?

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

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


osmo-bts[master]: Use generic L1 headers helper

2017-06-21 Thread Harald Welte

Patch Set 5: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2253df3509595d7393ec6631ef846dbebae73ca4
Gerrit-PatchSet: 5
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: André Boddenberg 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


osmo-bts[master]: Move common steps into common jenkins helper

2017-06-21 Thread Harald Welte

Patch Set 11: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic48b1f75179b9008d65219dd5a47c1ab3b886408
Gerrit-PatchSet: 11
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: André Boddenberg 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


osmo-bts[master]: lc15: add jenkins helper

2017-06-21 Thread Harald Welte

Patch Set 11: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib47f5a6cc88e784c5662b0dab4ddc03ce9a35132
Gerrit-PatchSet: 11
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: André Boddenberg 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


libosmocore[master]: gsm0808: add function gsm0808_extrapolate_speech_codec()

2017-06-21 Thread Harald Welte

Patch Set 8:

(1 comment)

https://gerrit.osmocom.org/#/c/2831/8/src/gsm/gsm0808_utils.c
File src/gsm/gsm0808_utils.c:

Line 691: int gsm0808_extrapolate_speech_codec(struct gsm0808_speech_codec *sc,
name: what about gsm0808_speech_codec_from_chan_type() ? I think current name 
leaves it unclear from where/what it is extrapolated?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I257c972e9fdf0dfe940a8d483447085bd62e50a2
Gerrit-PatchSet: 8
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


libosmocore[master]: gsm0808: add function to translate perm speech to speech cod...

2017-06-21 Thread Harald Welte

Patch Set 8:

(1 comment)

https://gerrit.osmocom.org/#/c/2830/8/src/gsm/gsm0808_utils.c
File src/gsm/gsm0808_utils.c:

Line 653: int gsm0808_convert_to_speech_codec_type(uint8_t perm_spch)
I would call it 'gsm0808_chan_type_to_speech_codec() to make it more clear. 
thanks.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib26a9c20864459b2baaa04f49b6e7902ba44b7cb
Gerrit-PatchSet: 8
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


libosmocore[master]: gsm0808: add default speech codec configuration

2017-06-21 Thread Harald Welte

Patch Set 7: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9dc0165d76a022b2c1b7418bc3133407e61b7261
Gerrit-PatchSet: 7
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[MERGED] libosmocore[master]: gsm0808: add speech codec type constants

2017-06-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: gsm0808: add speech codec type constants
..


gsm0808: add speech codec type constants

The codec type to be set in member type in struct gsm0808_speech_codec
has its own coding scheme to reference the used codec types. This patch
declares an enum with valid speech codec types.

Change-Id: Icaa768071d4364e671bc7e6d48b82d1f07f93f93
---
M include/osmocom/gsm/protocol/gsm_08_08.h
1 file changed, 18 insertions(+), 0 deletions(-)

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



diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h 
b/include/osmocom/gsm/protocol/gsm_08_08.h
index 5916823..7656c38 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -397,9 +397,27 @@
GSM0808_PERM_FR1= 0x01, /*!< GSM FR */
GSM0808_PERM_FR2= 0x11, /*!< GSM EFR */
GSM0808_PERM_FR3= 0x21, /*!< FR AMR */
+   GSM0808_PERM_FR4= 0x41, /*!< OFR AMR-WB */
+   GSM0808_PERM_FR5= 0x42, /*!< FR AMR-WB */
GSM0808_PERM_HR1= GSM0808_PERM_FR1 | 0x4, /*!< GSM HR */
GSM0808_PERM_HR2= GSM0808_PERM_FR2 | 0x4, /*!< (deprecated) */
GSM0808_PERM_HR3= GSM0808_PERM_FR3 | 0x4, /*!< HR AMR */
+   GSM0808_PERM_HR4= 0x46, /*!< OHR AMR-WB */
+   GSM0808_PERM_HR6= 0x45, /*!< OHR AMR */
+};
+
+/*! \brief 3GPP TS 48.008, 3.2.2.103 Speech Codec Type */
+enum gsm0808_speech_codec_type {
+   GSM0808_SCT_FR1 = 0x0, /*!< GSM FR */
+   GSM0808_SCT_FR2 = 0x2, /*!< GSM EFR */
+   GSM0808_SCT_FR3 = 0x3, /*!< FR AMR */
+   GSM0808_SCT_FR4 = 0xc, /*!< OFR AMR-WB */
+   GSM0808_SCT_FR5 = 0x9, /*!< FR AMR-WB */
+   GSM0808_SCT_HR1 = 0x1, /*!< GSM_HR */
+   GSM0808_SCT_HR3 = 0x4, /*!< HR_AMR */
+   GSM0808_SCT_HR4 = 0xd, /*!< OHR AMR-WB */
+   GSM0808_SCT_HR6 = 0xb, /*!< OHR AMR */
+   GSM0808_SCT_CSD = 0xfd, /*!< CSData (see also TS 26.103) */
 };
 
 /* GSM 08.08 3.2.2.44 Chosen Encryption Algorithm */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icaa768071d4364e671bc7e6d48b82d1f07f93f93
Gerrit-PatchSet: 9
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[MERGED] libosmocore[master]: cosmetic: Add info about coresponding codecs to permitted sp...

2017-06-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: Add info about coresponding codecs to permitted 
speech consts
..


cosmetic: Add info about coresponding codecs to permitted speech consts

The constants in enum gsm0808_permitted_speech are not very expressive.
Add comments indicating each constant's corresponding codec.

Change-Id: I9734f7c261becffe38ffd41c304d006d08530c1a
---
M include/osmocom/gsm/protocol/gsm_08_08.h
1 file changed, 8 insertions(+), 7 deletions(-)

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



diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h 
b/include/osmocom/gsm/protocol/gsm_08_08.h
index e5e7e1e..5916823 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -391,14 +391,15 @@
GSM0808_SPEECH_PERM_NO_CHANGE = 0x1f,
 };
 
-/* GSM 08.08 3.2.2.11 Channel Type */
+/*! \brief GSM 08.08 3.2.2.11 Channel Type
+ *  (see also 3GPP TS 48.008, section 3.2.2.11) */
 enum gsm0808_permitted_speech {
-   GSM0808_PERM_FR1= 0x01,
-   GSM0808_PERM_FR2= 0x11,
-   GSM0808_PERM_FR3= 0x21,
-   GSM0808_PERM_HR1= GSM0808_PERM_FR1 | 0x4,
-   GSM0808_PERM_HR2= GSM0808_PERM_FR2 | 0x4,
-   GSM0808_PERM_HR3= GSM0808_PERM_FR3 | 0x4,
+   GSM0808_PERM_FR1= 0x01, /*!< GSM FR */
+   GSM0808_PERM_FR2= 0x11, /*!< GSM EFR */
+   GSM0808_PERM_FR3= 0x21, /*!< FR AMR */
+   GSM0808_PERM_HR1= GSM0808_PERM_FR1 | 0x4, /*!< GSM HR */
+   GSM0808_PERM_HR2= GSM0808_PERM_FR2 | 0x4, /*!< (deprecated) */
+   GSM0808_PERM_HR3= GSM0808_PERM_FR3 | 0x4, /*!< HR AMR */
 };
 
 /* GSM 08.08 3.2.2.44 Chosen Encryption Algorithm */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9734f7c261becffe38ffd41c304d006d08530c1a
Gerrit-PatchSet: 7
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[MERGED] libosmocore[master]: gsm0408: update bearer capability speech version

2017-06-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: gsm0408: update bearer capability speech version
..


gsm0408: update bearer capability speech version

3GPP TS 24.008 specifies two new speech versions for half rate and
two new speech modes for full rate. This patch adds the relevant
constants to enum gsm48_bcap_speech_ver in gsm_04_08.h

Change-Id: Id2835384c855f924332d38f01c73bd1cfdb62549
---
M include/osmocom/gsm/protocol/gsm_04_08.h
1 file changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h 
b/include/osmocom/gsm/protocol/gsm_04_08.h
index fef23d8..604a5df 100644
--- a/include/osmocom/gsm/protocol/gsm_04_08.h
+++ b/include/osmocom/gsm/protocol/gsm_04_08.h
@@ -1620,13 +1620,18 @@
GSM48_BCAP_MT_AUTO_1= 8,
 };
 
-/*! \brief GSM 04.08 Bearer Capability: Speech Version Indication */
+/*! \brief GSM 04.08 Bearer Capability: Speech Version Indication
+ *  (See also 3GPP TS 24.008, Table 10.5.103) */
 enum gsm48_bcap_speech_ver {
GSM48_BCAP_SV_FR= 0,/*!< GSM FR V1 (GSM FR) */
GSM48_BCAP_SV_HR= 1,/*!< GSM HR V1 (GSM HR) */
GSM48_BCAP_SV_EFR   = 2,/*!< GSM FR V2 (GSM EFR) */
GSM48_BCAP_SV_AMR_F = 4,/*!< GSM FR V3 (FR AMR) */
GSM48_BCAP_SV_AMR_H = 5,/*!< GSM HR V3 (HR_AMR) */
+   GSM48_BCAP_SV_AMR_OFW   = 6,/*!< GSM FR V4 (OFR AMR-WB) */
+   GSM48_BCAP_SV_AMR_OHW   = 7,/*!< GSM HR V4 (OHR AMR-WB) */
+   GSM48_BCAP_SV_AMR_FW= 8,/*!< GSM FR V5 (FR AMR-WB) */
+   GSM48_BCAP_SV_AMR_OH= 11,   /*!< GSM HR V6 (OHR AMR) */
 };
 
 #define GSM48_TMSI_LEN 5

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id2835384c855f924332d38f01c73bd1cfdb62549
Gerrit-PatchSet: 9
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 


[MERGED] libosmocore[master]: cosmetic: Add codec references to Speech Version Indication

2017-06-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: Add codec references to Speech Version Indication
..


cosmetic: Add codec references to Speech Version Indication

Add the information which GSM Speech codec version coresponds to
which bearer capability speech version.

Change-Id: Ic9493fea139420a52c32b17d00ac7d0b2bf86967
---
M include/osmocom/gsm/protocol/gsm_04_08.h
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h 
b/include/osmocom/gsm/protocol/gsm_04_08.h
index 124f8b7..fef23d8 100644
--- a/include/osmocom/gsm/protocol/gsm_04_08.h
+++ b/include/osmocom/gsm/protocol/gsm_04_08.h
@@ -1620,13 +1620,13 @@
GSM48_BCAP_MT_AUTO_1= 8,
 };
 
-/* GSM 04.08 Bearer Capability: Speech Version Indication */
+/*! \brief GSM 04.08 Bearer Capability: Speech Version Indication */
 enum gsm48_bcap_speech_ver {
-   GSM48_BCAP_SV_FR= 0,
-   GSM48_BCAP_SV_HR= 1,
-   GSM48_BCAP_SV_EFR   = 2,
-   GSM48_BCAP_SV_AMR_F = 4,
-   GSM48_BCAP_SV_AMR_H = 5,
+   GSM48_BCAP_SV_FR= 0,/*!< GSM FR V1 (GSM FR) */
+   GSM48_BCAP_SV_HR= 1,/*!< GSM HR V1 (GSM HR) */
+   GSM48_BCAP_SV_EFR   = 2,/*!< GSM FR V2 (GSM EFR) */
+   GSM48_BCAP_SV_AMR_F = 4,/*!< GSM FR V3 (FR AMR) */
+   GSM48_BCAP_SV_AMR_H = 5,/*!< GSM HR V3 (HR_AMR) */
 };
 
 #define GSM48_TMSI_LEN 5

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9493fea139420a52c32b17d00ac7d0b2bf86967
Gerrit-PatchSet: 5
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


libosmo-sccp[master]: sccp: add addressbook functionality for sccp addresses

2017-06-21 Thread Harald Welte

Patch Set 9: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I068ed7f7d113dab88424a9d47bab7fc703bb7942
Gerrit-PatchSet: 9
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[MERGED] libosmo-sccp[master]: sccp: add addressbook functionality for sccp addresses

2017-06-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: sccp: add addressbook functionality for sccp addresses
..


sccp: add addressbook functionality for sccp addresses

SCCP addresses are defined through a number of compoinents, not
just an IP-Address, there is also point code, ssn and more. To
simplify and unify the handling of such objects, this patch
introduces an addressbook functionality. The user can set up
multiple addresses per ss7 instance and give them names. Later
that name can be used to reference the address at a later point
in the config. This means that the usage of sccp-addresses from
the programmers point of view boils down to a VTY function that
reads the string name of a previously defined address. The
programmer can then use the API to get a pointer to the SCCP
address struct and use it normally.

For this feature, two additional VTY nodes are necessary,
this commit depends libosmocore change:
Change-Id I42aa29c097f284b85801c5329b015b189640

Change-Id: I068ed7f7d113dab88424a9d47bab7fc703bb7942
---
M include/osmocom/sigtran/osmo_ss7.h
M include/osmocom/sigtran/sccp_sap.h
M src/osmo_ss7.c
M src/osmo_ss7_vty.c
4 files changed, 587 insertions(+), 0 deletions(-)

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



diff --git a/include/osmocom/sigtran/osmo_ss7.h 
b/include/osmocom/sigtran/osmo_ss7.h
index 7b0a607..741a7e3 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -89,6 +89,7 @@
uint8_t network_indicator;
struct osmo_ss7_pc_fmt pc_fmt;
bool permit_dyn_rkm_alloc;
+   struct llist_head sccp_address_book;
} cfg;
 };
 
diff --git a/include/osmocom/sigtran/sccp_sap.h 
b/include/osmocom/sigtran/sccp_sap.h
index f378e5c..2258b0d 100644
--- a/include/osmocom/sigtran/sccp_sap.h
+++ b/include/osmocom/sigtran/sccp_sap.h
@@ -247,3 +247,9 @@
osmo_prim_cb prim_cb, uint16_t ssn);
 
 int osmo_sccp_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr 
*oph);
+
+struct osmo_sccp_addr *
+osmo_sccp_addr_by_name(const char *name, const struct osmo_ss7_instance *ss7);
+
+char * osmo_sccp_name_by_addr(const struct osmo_sccp_addr *addr,
+ const struct osmo_ss7_instance *ss7);
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index d952ecd..78b22a7 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -352,6 +352,8 @@
 
llist_add(>list, _ss7_instances);
 
+   INIT_LLIST_HEAD(>cfg.sccp_address_book);
+
return inst;
 }
 
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 97b5cf0..8e40474 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -36,6 +36,7 @@
 #include 
 
 #include "xua_internal.h"
+#include 
 
 #define XUA_VAR_STR"(sua|m3ua|ipa)"
 
@@ -891,6 +892,537 @@
return CMD_SUCCESS;
 }
 
+/***
+ * SCCP addressbook handling
+ ***/
+
+/* SCCP addressbook */
+struct osmo_sccp_addr_entry {
+   struct llist_head list;
+   struct osmo_ss7_instance *inst;
+   char name[512];
+   struct osmo_sccp_addr addr;
+};
+
+static struct cmd_node sccpaddr_node = {
+   L_CS7_SCCPADDR_NODE,
+   "%s(config-cs7-sccpaddr)# ",
+   1,
+};
+
+static struct cmd_node sccpaddr_gt_node = {
+   L_CS7_SCCPADDR_GT_NODE,
+   "%s(config-cs7-sccpaddr-gt)# ",
+   1,
+};
+
+/* Pick an SCCP address entry from the addressbook by its name */
+struct osmo_sccp_addr_entry *addr_entry_by_name(const char *name,
+   const struct osmo_ss7_instance
+   *inst)
+{
+   struct osmo_sccp_addr_entry *entry;
+   llist_for_each_entry(entry, >cfg.sccp_address_book, list) {
+   if (strcmp(entry->name, name) == 0)
+   return entry;
+   }
+   return NULL;
+}
+
+/*! \brief Lookup an SCCP address from the addressbook by its name.
+ *  \param[in] lookup-name of the address to lookup
+ *  \param[in] ss7 instance
+ *  \returns SCCP address; NULL on error */
+struct osmo_sccp_addr *osmo_sccp_addr_by_name(const char *name,
+ const struct osmo_ss7_instance
+ *ss7)
+{
+   struct osmo_sccp_addr_entry *entry;
+
+   entry = addr_entry_by_name(name, ss7);
+   if (entry)
+   return >addr;
+
+   return NULL;
+}
+
+/*! \brief Reverse lookup the lookup-name of a specified SCCP address.
+ *  \param[in] name of the address to lookup
+ *  \param[in] ss7 instance
+ *  \returns char pointer to the lookup-name; NULL on error */
+char *osmo_sccp_name_by_addr(const struct osmo_sccp_addr *addr,
+const struct 

osmo-bts[master]: lc15: use directory instead of symlink

2017-06-21 Thread Harald Welte

Patch Set 2: Code-Review-1

I think we should drop this, avoiding any unneccessary incompatibility between 
lc15 and sbts2100

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6208a1f7d62cac7ef64459e62f8e6083b0025580
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Minh-Quang Nguyen 
Gerrit-HasComments: No


libosmocore[master]: abis_test.c: Fix warning appearing on some buggy gcc versions

2017-06-21 Thread Vadim Yanitskiy

Patch Set 1:

I can confirm that the same warning appears
when compiling with clang-4.0:

warning: suggest braces around initialization
of subobject [-Wmissing-braces]

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I31d5ffc0cf461d207d6c3d43aa0a25a5448d7000
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


[PATCH] libosmo-sccp[master]: sccp: add addressbook functionality for sccp addresses

2017-06-21 Thread dexter
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/2924

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

sccp: add addressbook functionality for sccp addresses

SCCP addresses are defined through a number of compoinents, not
just an IP-Address, there is also point code, ssn and more. To
simplify and unify the handling of such objects, this patch
introduces an addressbook functionality. The user can set up
multiple addresses per ss7 instance and give them names. Later
that name can be used to reference the address at a later point
in the config. This means that the usage of sccp-addresses from
the programmers point of view boils down to a VTY function that
reads the string name of a previously defined address. The
programmer can then use the API to get a pointer to the SCCP
address struct and use it normally.

For this feature, two additional VTY nodes are necessary,
this commit depends libosmocore change:
Change-Id I42aa29c097f284b85801c5329b015b189640

Change-Id: I068ed7f7d113dab88424a9d47bab7fc703bb7942
---
M include/osmocom/sigtran/osmo_ss7.h
M include/osmocom/sigtran/sccp_sap.h
M src/osmo_ss7.c
M src/osmo_ss7_vty.c
4 files changed, 587 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/24/2924/9

diff --git a/include/osmocom/sigtran/osmo_ss7.h 
b/include/osmocom/sigtran/osmo_ss7.h
index 7b0a607..741a7e3 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -89,6 +89,7 @@
uint8_t network_indicator;
struct osmo_ss7_pc_fmt pc_fmt;
bool permit_dyn_rkm_alloc;
+   struct llist_head sccp_address_book;
} cfg;
 };
 
diff --git a/include/osmocom/sigtran/sccp_sap.h 
b/include/osmocom/sigtran/sccp_sap.h
index f378e5c..2258b0d 100644
--- a/include/osmocom/sigtran/sccp_sap.h
+++ b/include/osmocom/sigtran/sccp_sap.h
@@ -247,3 +247,9 @@
osmo_prim_cb prim_cb, uint16_t ssn);
 
 int osmo_sccp_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr 
*oph);
+
+struct osmo_sccp_addr *
+osmo_sccp_addr_by_name(const char *name, const struct osmo_ss7_instance *ss7);
+
+char * osmo_sccp_name_by_addr(const struct osmo_sccp_addr *addr,
+ const struct osmo_ss7_instance *ss7);
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index d952ecd..78b22a7 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -352,6 +352,8 @@
 
llist_add(>list, _ss7_instances);
 
+   INIT_LLIST_HEAD(>cfg.sccp_address_book);
+
return inst;
 }
 
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 97b5cf0..8e40474 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -36,6 +36,7 @@
 #include 
 
 #include "xua_internal.h"
+#include 
 
 #define XUA_VAR_STR"(sua|m3ua|ipa)"
 
@@ -891,6 +892,537 @@
return CMD_SUCCESS;
 }
 
+/***
+ * SCCP addressbook handling
+ ***/
+
+/* SCCP addressbook */
+struct osmo_sccp_addr_entry {
+   struct llist_head list;
+   struct osmo_ss7_instance *inst;
+   char name[512];
+   struct osmo_sccp_addr addr;
+};
+
+static struct cmd_node sccpaddr_node = {
+   L_CS7_SCCPADDR_NODE,
+   "%s(config-cs7-sccpaddr)# ",
+   1,
+};
+
+static struct cmd_node sccpaddr_gt_node = {
+   L_CS7_SCCPADDR_GT_NODE,
+   "%s(config-cs7-sccpaddr-gt)# ",
+   1,
+};
+
+/* Pick an SCCP address entry from the addressbook by its name */
+struct osmo_sccp_addr_entry *addr_entry_by_name(const char *name,
+   const struct osmo_ss7_instance
+   *inst)
+{
+   struct osmo_sccp_addr_entry *entry;
+   llist_for_each_entry(entry, >cfg.sccp_address_book, list) {
+   if (strcmp(entry->name, name) == 0)
+   return entry;
+   }
+   return NULL;
+}
+
+/*! \brief Lookup an SCCP address from the addressbook by its name.
+ *  \param[in] lookup-name of the address to lookup
+ *  \param[in] ss7 instance
+ *  \returns SCCP address; NULL on error */
+struct osmo_sccp_addr *osmo_sccp_addr_by_name(const char *name,
+ const struct osmo_ss7_instance
+ *ss7)
+{
+   struct osmo_sccp_addr_entry *entry;
+
+   entry = addr_entry_by_name(name, ss7);
+   if (entry)
+   return >addr;
+
+   return NULL;
+}
+
+/*! \brief Reverse lookup the lookup-name of a specified SCCP address.
+ *  \param[in] name of the address to lookup
+ *  \param[in] ss7 instance
+ *  \returns char pointer to the lookup-name; NULL on error */
+char *osmo_sccp_name_by_addr(const struct osmo_sccp_addr *addr,
+const struct osmo_ss7_instance *ss7)
+{
+   struct 

[PATCH] libosmo-sccp[master]: sccp: add addressbook functionality for sccp addresses

2017-06-21 Thread dexter
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/2924

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

sccp: add addressbook functionality for sccp addresses

SCCP addresses are defined through a number of compoinents, not
just an IP-Address, there is also point code, ssn and more. To
simplify and unify the handling of such objects, this patch
introduces an addressbook functionality. The user can set up
multiple addresses per ss7 instance and give them names. Later
that name can be used to reference the address at a later point
in the config. This means that the usage of sccp-addresses from
the programmers point of view boils down to a VTY function that
reads the string name of a previously defined address. The
programmer can then use the API to get a pointer to the SCCP
address struct and use it normally.

For this feature, two additional VTY nodes are necessary,
this commit depends libosmocore change:
Change-Id I42aa29c097f284b85801c5329b015b189640

Change-Id: I068ed7f7d113dab88424a9d47bab7fc703bb7942
---
M include/osmocom/sigtran/osmo_ss7.h
M include/osmocom/sigtran/sccp_sap.h
M src/osmo_ss7.c
M src/osmo_ss7_vty.c
4 files changed, 584 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/24/2924/8

diff --git a/include/osmocom/sigtran/osmo_ss7.h 
b/include/osmocom/sigtran/osmo_ss7.h
index 7b0a607..741a7e3 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -89,6 +89,7 @@
uint8_t network_indicator;
struct osmo_ss7_pc_fmt pc_fmt;
bool permit_dyn_rkm_alloc;
+   struct llist_head sccp_address_book;
} cfg;
 };
 
diff --git a/include/osmocom/sigtran/sccp_sap.h 
b/include/osmocom/sigtran/sccp_sap.h
index f378e5c..2258b0d 100644
--- a/include/osmocom/sigtran/sccp_sap.h
+++ b/include/osmocom/sigtran/sccp_sap.h
@@ -247,3 +247,9 @@
osmo_prim_cb prim_cb, uint16_t ssn);
 
 int osmo_sccp_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr 
*oph);
+
+struct osmo_sccp_addr *
+osmo_sccp_addr_by_name(const char *name, const struct osmo_ss7_instance *ss7);
+
+char * osmo_sccp_name_by_addr(const struct osmo_sccp_addr *addr,
+ const struct osmo_ss7_instance *ss7);
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index d952ecd..78b22a7 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -352,6 +352,8 @@
 
llist_add(>list, _ss7_instances);
 
+   INIT_LLIST_HEAD(>cfg.sccp_address_book);
+
return inst;
 }
 
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 97b5cf0..75b2431 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -36,6 +36,7 @@
 #include 
 
 #include "xua_internal.h"
+#include 
 
 #define XUA_VAR_STR"(sua|m3ua|ipa)"
 
@@ -891,6 +892,534 @@
return CMD_SUCCESS;
 }
 
+/***
+ * SCCP addressbook handling
+ ***/
+
+/* SCCP addressbook */
+struct osmo_sccp_addr_entry {
+   struct llist_head list;
+   struct osmo_ss7_instance *inst;
+   char name[512];
+   struct osmo_sccp_addr addr;
+};
+
+static struct cmd_node sccpaddr_node = {
+   L_CS7_SCCPADDR_NODE,
+   "%s(config-cs7-sccpaddr)# ",
+   1,
+};
+
+static struct cmd_node sccpaddr_gt_node = {
+   L_CS7_SCCPADDR_GT_NODE,
+   "%s(config-cs7-sccpaddr-gt)# ",
+   1,
+};
+
+/* Pick an SCCP address entry from the addressbook by its name */
+struct osmo_sccp_addr_entry *
+addr_entry_by_name(const char *name, const struct osmo_ss7_instance *inst)
+{
+   struct osmo_sccp_addr_entry *entry;
+   llist_for_each_entry(entry, >cfg.sccp_address_book, list) {
+   if (strcmp(entry->name, name) == 0)
+   return entry;
+   }
+   return NULL;
+}
+
+/*! \brief Lookup an SCCP address from the addressbook by its name.
+ *  \param[in] lookup-name of the address to lookup
+ *  \param[in] ss7 instance
+ *  \returns SCCP address; NULL on error */
+struct osmo_sccp_addr *
+osmo_sccp_addr_by_name(const char *name, const struct osmo_ss7_instance *ss7)
+{
+   struct osmo_sccp_addr_entry *entry;
+
+   entry = addr_entry_by_name(name, ss7);
+   if(entry)
+   return >addr;
+
+   return NULL;
+}
+
+/*! \brief Reverse lookup the lookup-name of a specified SCCP address.
+ *  \param[in] name of the address to lookup
+ *  \param[in] ss7 instance
+ *  \returns char pointer to the lookup-name; NULL on error */
+char * osmo_sccp_name_by_addr(const struct osmo_sccp_addr *addr,
+ const struct osmo_ss7_instance *ss7)
+{
+   struct osmo_sccp_addr_entry *entry;
+   llist_for_each_entry(entry, >cfg.sccp_address_book, list) {
+   if (memcmp(>addr, addr, sizeof(*addr)) == 0)
+   return 

libosmo-sccp[master]: sccp: add addressbook functionality for sccp addresses

2017-06-21 Thread Harald Welte

Patch Set 7:

(1 comment)

https://gerrit.osmocom.org/#/c/2924/7/src/osmo_ss7_vty.c
File src/osmo_ss7_vty.c:

Line 1250:  memcpy(ip_addr_backup,>addr.ip,sizeof(entry->addr.ip));
space, space, space. Please consider instructing your editor to do this for 
you, if you don't do this automatically.  No need to spend time and attention 
on this, if it can be automatized.  I see it quite frequently in your patches, 
but don't want to keep making a fuzz about it. Thanks!


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I068ed7f7d113dab88424a9d47bab7fc703bb7942
Gerrit-PatchSet: 7
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


[PATCH] libosmo-sccp[master]: configure.ac: Use -Werror in C(PP)FLAGS

2017-06-21 Thread Pau Espin Pedrol

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

configure.ac: Use -Werror in C(PP)FLAGS

Change-Id: Ia753a3080ef54ac248dacce5cd692fdd38f7649a
---
M configure.ac
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/99/2999/1

diff --git a/configure.ac b/configure.ac
index 36cbb59..3c498c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,8 +53,8 @@
 CFLAGS="$saved_CFLAGS"
 AC_SUBST(SYMBOL_VISIBILITY)
 
-CFLAGS+=" -Wall"
-CPPFLAGS+=" -Wall"
+CFLAGS+=" -Wall -Werror"
+CPPFLAGS+=" -Wall -Werror"
 
 AC_OUTPUT(
 libosmo-sigtran.pc

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia753a3080ef54ac248dacce5cd692fdd38f7649a
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] libosmo-sccp[master]: configure.ac: Use -Wall in C(PP)FLAGS

2017-06-21 Thread Pau Espin Pedrol

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

configure.ac: Use -Wall in C(PP)FLAGS

Change-Id: I1e49427b8267bbdb05d0121971a56359dbecd690
---
M configure.ac
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/98/2998/1

diff --git a/configure.ac b/configure.ac
index 3a05d54..36cbb59 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,6 +53,9 @@
 CFLAGS="$saved_CFLAGS"
 AC_SUBST(SYMBOL_VISIBILITY)
 
+CFLAGS+=" -Wall"
+CPPFLAGS+=" -Wall"
+
 AC_OUTPUT(
 libosmo-sigtran.pc
 libosmo-sccp.pc
@@ -73,4 +76,3 @@
 examples/Makefile
 stp/Makefile
 Makefile)
-

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e49427b8267bbdb05d0121971a56359dbecd690
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] libosmo-sccp[master]: xua_test.c: remove useless keyword in struct declaration

2017-06-21 Thread Pau Espin Pedrol

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

xua_test.c: remove useless keyword in struct declaration

Fixes following warning:
warning: useless storage class specifier in empty declaratio

Change-Id: I5cea7b6ec2cc755ad8cec69b771f6e3b297e607d
---
M tests/xua/xua_test.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/97/2997/1

diff --git a/tests/xua/xua_test.c b/tests/xua/xua_test.c
index d1aa564..da3ee95 100644
--- a/tests/xua/xua_test.c
+++ b/tests/xua/xua_test.c
@@ -54,7 +54,7 @@
 
 /* SCCP Address Parsing */
 
-static struct sccp_addr_testcase {
+struct sccp_addr_testcase {
struct osmo_sccp_addr expected;
uint8_t *bin;
unsigned int bin_len;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5cea7b6ec2cc755ad8cec69b771f6e3b297e607d
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] libosmo-sccp[master]: stp_main.c: Add missing header

2017-06-21 Thread Pau Espin Pedrol

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

stp_main.c: Add missing header

stp_main uses osmo_fsm_vty_add_cmds which is defined in /osmocom/vty/misc.h

Fixes 'implicit declaration of function' compilation warning.

Change-Id: I3cc9543fcb908eeb172d36fa472a19b01bf52c46
---
M stp/stp_main.c
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/96/2996/1

diff --git a/stp/stp_main.c b/stp/stp_main.c
index 564ced5..074272b 100644
--- a/stp/stp_main.c
+++ b/stp/stp_main.c
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3cc9543fcb908eeb172d36fa472a19b01bf52c46
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] libosmo-sccp[master]: sccp_test_vty: Fix compilation warning: Unused variable

2017-06-21 Thread Pau Espin Pedrol

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

sccp_test_vty: Fix compilation warning: Unused variable

Instead of removing the variable, leave it there with unused attribute
set because it is an example and gives extra information to potential
readers of the function (it provides you with the actual type of void* _scu).

Change-Id: Id5fddf261a7a75ee1d6e9aff0734065ebf8551ab
---
M examples/sccp_test_vty.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/94/2994/1

diff --git a/examples/sccp_test_vty.c b/examples/sccp_test_vty.c
index ddfbb27..d809fbc 100644
--- a/examples/sccp_test_vty.c
+++ b/examples/sccp_test_vty.c
@@ -117,7 +117,7 @@
 
 static int testclnt_prim_cb(struct osmo_prim_hdr *oph, void *_scu)
 {
-   struct osmo_sccp_user *scu = _scu;
+   struct osmo_sccp_user *scu __attribute__((unused)) = _scu;
struct osmo_scu_prim *scu_prim = (struct osmo_scu_prim *) oph;
 
switch (OSMO_PRIM_HDR(_prim->oph)) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id5fddf261a7a75ee1d6e9aff0734065ebf8551ab
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] libosmo-sccp[master]: sccp_scrc: Fix warning: uneeded constant evaulation

2017-06-21 Thread Pau Espin Pedrol

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

sccp_scrc: Fix warning: uneeded constant evaulation

translate function is always present in the same file, thus we can
remove this check.

Fixes following warning:
warning: the address of ‘translate’ will always evaluate as ‘true’ [-Waddress]
if (translate &&

As requested by Harald, leave a comment there stating that there are some
checks missing and yet to be implemented. The translate function check
was used for this purpose.

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


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/93/2993/1

diff --git a/src/sccp_scrc.c b/src/sccp_scrc.c
index 9a6a865..a4ce34c 100644
--- a/src/sccp_scrc.c
+++ b/src/sccp_scrc.c
@@ -348,7 +348,7 @@
}
/* Called address includes SSN? */
if (called->presence & OSMO_SCCP_ADDR_T_SSN) {
-   if (translate &&
+   if (/* TODO: check if we are doing global translation 
&& */
(called->presence & OSMO_SCCP_ADDR_T_GT))
return scrc_translate_node_9(inst, xua, called);
else

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I48a711f3a43496e2c0c637f34f56784f765938c4
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] libosmo-abis[master]: configure.ac: Use -Werror in C(PP)FLAGS

2017-06-21 Thread Pau Espin Pedrol

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

configure.ac: Use -Werror in C(PP)FLAGS

Change-Id: Ic674bf28d781b9806dc023777e1fea4ee1a0257a
---
M configure.ac
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/92/2992/1

diff --git a/configure.ac b/configure.ac
index ec0bf1b..de77ed9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@
 
 AC_CONFIG_MACRO_DIR([m4])
 
-CFLAGS+=" -Wall"
-CPPFLAGS+=" -Wall"
+CFLAGS+=" -Wall -Werror"
+CPPFLAGS+=" -Wall -Werror"
 
 # The following test is taken from WebKit's webkit.m4
 saved_CFLAGS="$CFLAGS"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic674bf28d781b9806dc023777e1fea4ee1a0257a
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] libosmo-abis[master]: configure.ac: Use -Wall in C(PP)FLAGS

2017-06-21 Thread Pau Espin Pedrol

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

configure.ac: Use -Wall in C(PP)FLAGS

Change-Id: I5033387e4a4206f7d34d1db3c6ede9255d199941
---
M configure.ac
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/91/2991/1

diff --git a/configure.ac b/configure.ac
index 9b2f189..ec0bf1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,9 @@
 
 AC_CONFIG_MACRO_DIR([m4])
 
+CFLAGS+=" -Wall"
+CPPFLAGS+=" -Wall"
+
 # The following test is taken from WebKit's webkit.m4
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -fvisibility=hidden "

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5033387e4a4206f7d34d1db3c6ede9255d199941
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] libosmo-abis[master]: osmo_ortp.c: Fix warning: use updated ortp API

2017-06-21 Thread Pau Espin Pedrol

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

osmo_ortp.c: Fix warning: use updated ortp API

Since ortp commit 5ab29c50adc7948b11449e3aeee66010379ff7dc preceeding
ortp 0.22, the API is fixed and requests a pointer instead of an
unsigned long.

As we now require at least ortp 0.22 since libosmo-abis
15d9b7929d449e4138bcb003c614035bceadc3d1, we can safely assume the API
will request a pointer instead of an unsigned long.

Change-Id: I2dbd0498d75160358eca4336850e1a0ad2efdbeb
---
M src/trau/osmo_ortp.c
1 file changed, 4 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/90/2990/1

diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c
index c4e9d53..d31ce8e 100644
--- a/src/trau/osmo_ortp.c
+++ b/src/trau/osmo_ortp.c
@@ -349,17 +349,13 @@
rtp_session_set_jitter_compensation(rs->sess, 100);
 
rtp_session_signal_connect(rs->sess, "ssrc_changed",
-  (RtpCallback) ortp_sig_cb_ssrc,
-  (unsigned long) rs);
+  (RtpCallback) ortp_sig_cb_ssrc, rs);
rtp_session_signal_connect(rs->sess, "payload_type_changed",
-  (RtpCallback) ortp_sig_cb_pt,
-  (unsigned long) rs);
+  (RtpCallback) ortp_sig_cb_pt, rs);
rtp_session_signal_connect(rs->sess, "network_error",
-  (RtpCallback) ortp_sig_cb_net,
-  (unsigned long) rs);
+  (RtpCallback) ortp_sig_cb_net, rs);
rtp_session_signal_connect(rs->sess, "timestamp_jump",
-  (RtpCallback) ortp_sig_cb_ts,
-  (unsigned long) rs);
+  (RtpCallback) ortp_sig_cb_ts, rs);
 
/* initialize according to the RFC */
rtp_session_set_seq_number(rs->sess, random());

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2dbd0498d75160358eca4336850e1a0ad2efdbeb
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] libosmo-abis[master]: osmo_ortp.c: Fix warning: implicit use of function

2017-06-21 Thread Pau Espin Pedrol

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

osmo_ortp.c: Fix warning: implicit use of function

Explicitly state that we are using an internal API from ortp, and
define the function we are using to avoid printing a warning.

Change-Id: I9cadcb31ce7ade3632d83753be97fdc9ea518b5b
---
M src/trau/osmo_ortp.c
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/89/2989/1

diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c
index 4e9df56..c4e9d53 100644
--- a/src/trau/osmo_ortp.c
+++ b/src/trau/osmo_ortp.c
@@ -199,6 +199,10 @@
return 0;
 }
 
+/* Internal API coming from rtpsession_priv.h, used in osmo_rtcp_fd_cb */
+#pragma message ("Using internal ortp API: rtp_session_rtcp_rec")
+int rtp_session_rtcp_recv(RtpSession * session);
+
 static int osmo_rtcp_fd_cb(struct osmo_fd *fd, unsigned int what)
 {
struct osmo_rtp_socket *rs = fd->data;
@@ -360,7 +364,7 @@
/* initialize according to the RFC */
rtp_session_set_seq_number(rs->sess, random());
rs->tx_timestamp = random();
-   
+
 
return rs;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9cadcb31ce7ade3632d83753be97fdc9ea518b5b
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


osmo-gsm-tester[master]: ofono_client: Power off modem when resource is freed

2017-06-21 Thread Neels Hofmeyr

Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/2697/2/src/osmo_gsm_tester/resource.py
File src/osmo_gsm_tester/resource.py:

Line 122: 'origin' a log.Origin() instance which can be sued to log 
information.
To sue someone means to take them to court. Ah! It's a typo! "used" lol


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibde7573267f1c63d075cf0147ed614a4b1ff46c8
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-HasComments: Yes


libosmocore[master]: pseudotalloc: Add poor implementation of talloc_asprintf

2017-06-21 Thread Harald Welte

Patch Set 1:

I agree with Neels' comments

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I61cd83d4c8570af1e452c945ac6f194baf7e6ac4
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-HasComments: No


libosmocore[master]: configure.ac: Enable -Wall by default

2017-06-21 Thread Pau Espin Pedrol

Patch Set 4:

It's not th efirst because I was first fixing the ones I got without -Wall, 
then enabled -Wall and continued fixing. Should not be any issue, the important 
one is -Werror which needs to be the last one.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I70f917e05ad46049487710d1752aad2505c96696
Gerrit-PatchSet: 4
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


libosmocore[master]: pseudotalloc: Add poor implementation of talloc_asprintf

2017-06-21 Thread Neels Hofmeyr

Patch Set 1:

(1 comment)

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

Line 7: pseudotalloc: Add poor implementation of talloc_asprintf
better word would be "simplistic". "poor" always means bad, we don't want to 
merge poor code.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I61cd83d4c8570af1e452c945ac6f194baf7e6ac4
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


libosmocore[master]: sercomm_test.c: return correctly in main

2017-06-21 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

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


libosmocore[master]: osmo-sim-test.c: Remove unused functions

2017-06-21 Thread Neels Hofmeyr

Patch Set 3: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3060cfee8ece86c4c89a65f93c9f5424df0c410b
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


libosmocore[master]: Fix compilation warnings: use correct log type for uint32_t

2017-06-21 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

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


libosmocore[master]: fsm.c: Fix compilation warning: Use PRIu32 for uint32_t

2017-06-21 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

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


libosmocore[master]: lapd_test.c: Convert compilation warning to level message

2017-06-21 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

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


libosmocore[master]: Fix warnings: tolower() and similar require uchar

2017-06-21 Thread Neels Hofmeyr

Patch Set 1: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/#/c/2963/1/src/logging.c
File src/logging.c:

Line 850:   name[j] = tolower((unsigned char) 
info->cat[i].name[j]);
(usually no space in-between cast and casted value, in several places)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3fed2ab6a4efba9f8a21fcf84a5b3a91e8df084f
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


libosmocore[master]: timer_gettimeofday.c: Fix implicit use of timeradd

2017-06-21 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iced451be255cfde8a6cf38380bef71ef29673994
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


libosmocore[master]: gsm0411_utils.c: Fix compilation warnings

2017-06-21 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

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


osmo-hlr[master]: tests/auc: Don't require python3

2017-06-21 Thread Max

Patch Set 4:

I think we already have some tests disabled on FreeBSD in some project. If so, 
than we can do the same here (if the tests would actually fail of course).

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb59b79021b2c935b326496ed339f12e13c96b8e
Gerrit-PatchSet: 4
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


[PATCH] libosmocore[master]: cosmetic: Add info about coresponding codecs to permitted sp...

2017-06-21 Thread dexter
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/2938

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

cosmetic: Add info about coresponding codecs to permitted speech consts

The constants in enum gsm0808_permitted_speech are not very expressive.
Add comments indicating each constant's corresponding codec.

Change-Id: I9734f7c261becffe38ffd41c304d006d08530c1a
---
M include/osmocom/gsm/protocol/gsm_08_08.h
1 file changed, 8 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/38/2938/6

diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h 
b/include/osmocom/gsm/protocol/gsm_08_08.h
index e5e7e1e..5916823 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -391,14 +391,15 @@
GSM0808_SPEECH_PERM_NO_CHANGE = 0x1f,
 };
 
-/* GSM 08.08 3.2.2.11 Channel Type */
+/*! \brief GSM 08.08 3.2.2.11 Channel Type
+ *  (see also 3GPP TS 48.008, section 3.2.2.11) */
 enum gsm0808_permitted_speech {
-   GSM0808_PERM_FR1= 0x01,
-   GSM0808_PERM_FR2= 0x11,
-   GSM0808_PERM_FR3= 0x21,
-   GSM0808_PERM_HR1= GSM0808_PERM_FR1 | 0x4,
-   GSM0808_PERM_HR2= GSM0808_PERM_FR2 | 0x4,
-   GSM0808_PERM_HR3= GSM0808_PERM_FR3 | 0x4,
+   GSM0808_PERM_FR1= 0x01, /*!< GSM FR */
+   GSM0808_PERM_FR2= 0x11, /*!< GSM EFR */
+   GSM0808_PERM_FR3= 0x21, /*!< FR AMR */
+   GSM0808_PERM_HR1= GSM0808_PERM_FR1 | 0x4, /*!< GSM HR */
+   GSM0808_PERM_HR2= GSM0808_PERM_FR2 | 0x4, /*!< (deprecated) */
+   GSM0808_PERM_HR3= GSM0808_PERM_FR3 | 0x4, /*!< HR AMR */
 };
 
 /* GSM 08.08 3.2.2.44 Chosen Encryption Algorithm */

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9734f7c261becffe38ffd41c304d006d08530c1a
Gerrit-PatchSet: 6
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[PATCH] libosmocore[master]: gsm0808: add function gsm0808_extrapolate_speech_codec()

2017-06-21 Thread dexter
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/2831

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

gsm0808: add function gsm0808_extrapolate_speech_codec()

The contents of the speech codec element (struct gsm0808_speech_codec),
that is also used in the speech codec list element (struct
gsm0808_speech_codec_list) can be extrapolated directly from the
permitted speech parameter in the channel type field (struct
gsm0808_channel_type) when full AoIP with compressed speech via
RTP/UDP/IP is assumed and when the codec configuration on the air
interface exactly matches the codec configuration on the IP backhaul.

This patch adds a function that can be used as a helper to fill
out spech codec fields by only giving a permitted speech parameter
as input.

Change-Id: I257c972e9fdf0dfe940a8d483447085bd62e50a2
---
M include/osmocom/gsm/gsm0808_utils.h
M src/gsm/gsm0808_utils.c
M src/gsm/libosmogsm.map
3 files changed, 57 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/31/2831/8

diff --git a/include/osmocom/gsm/gsm0808_utils.h 
b/include/osmocom/gsm/gsm0808_utils.h
index 9057273..0c69e31 100644
--- a/include/osmocom/gsm/gsm0808_utils.h
+++ b/include/osmocom/gsm/gsm0808_utils.h
@@ -73,3 +73,5 @@
 const uint8_t *elem, uint8_t len);
 
 int gsm0808_convert_to_speech_codec_type(uint8_t perm_spch);
+int gsm0808_extrapolate_speech_codec(struct gsm0808_speech_codec *sc,
+uint8_t perm_spch);
diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c
index f7062a5..efa29a1 100644
--- a/src/gsm/gsm0808_utils.c
+++ b/src/gsm/gsm0808_utils.c
@@ -682,4 +682,58 @@
return -EINVAL;
 }
 
+/*! \brief Extrapolate a speech codec field from a given permitted speech
+ *  parameter (channel type).
+ *  \param[out] sc Caller provided memory to store the resulting speech codec
+ *  \param[in] perm_spch value that is used to derive the speech codec info
+ *  (see also: enum gsm0808_speech_codec_type in gsm0808_utils.h)
+ *  \returns zero when successful; negative on error */
+int gsm0808_extrapolate_speech_codec(struct gsm0808_speech_codec *sc,
+uint8_t perm_spch)
+{
+   int rc;
+
+   memset(sc, 0, sizeof(*sc));
+
+   /* Determine codec type */
+   rc = gsm0808_convert_to_speech_codec_type(perm_spch);
+   if (rc < 0)
+   return -EINVAL;
+   sc->type = (uint8_t) rc;
+
+   /* Depending on the speech codec type, pick a default codec
+* configuration that exactly matches the configuration on the
+* air interface. */
+   switch (sc->type) {
+   case GSM0808_SCT_FR3:
+   sc->cfg = GSM0808_SC_CFG_DEFAULT_FR_AMR;
+   break;
+   case GSM0808_SCT_FR4:
+   sc->cfg = GSM0808_SC_CFG_DEFAULT_OFR_AMR_WB;
+   break;
+   case GSM0808_SCT_FR5:
+   sc->cfg = GSM0808_SC_CFG_DEFAULT_FR_AMR_WB;
+   break;
+   case GSM0808_SCT_HR3:
+   sc->cfg = GSM0808_SC_CFG_DEFAULT_HR_AMR;
+   break;
+   case GSM0808_SCT_HR4:
+   sc->cfg = GSM0808_SC_CFG_DEFAULT_OHR_AMR_WB;
+   break;
+   case GSM0808_SCT_HR6:
+   sc->cfg = GSM0808_SC_CFG_DEFAULT_OHR_AMR;
+   break;
+   default:
+   /* Note: Not all codec types specify a default setting,
+* in this case, we just set the field to zero. */
+   sc->cfg = 0;
+   }
+
+   /* Tag all codecs as "Full IP"
+* (see als 3GPP TS 48.008 3.2.2.103) */
+   sc->fi = true;
+
+   return 0;
+}
+
 /*! @} */
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index ccc5b9a..36cba39 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -163,6 +163,7 @@
 gsm0808_enc_cell_id_list;
 gsm0808_dec_cell_id_list;
 gsm0808_convert_to_speech_codec_type;
+gsm0808_extrapolate_speech_codec;
 
 gsm0858_rsl_ul_meas_enc;
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I257c972e9fdf0dfe940a8d483447085bd62e50a2
Gerrit-PatchSet: 8
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[PATCH] libosmocore[master]: gsm0808: add default speech codec configuration

2017-06-21 Thread dexter
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/2829

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

gsm0808: add default speech codec configuration

In an AoIP scenario, the speech codec list field specifies the
codecs used in the RTP interface. This patch adds a table
with default codec configurations that match the codec
configurations that are also used on the air interface.

Change-Id: I9dc0165d76a022b2c1b7418bc3133407e61b7261
---
M include/osmocom/gsm/protocol/gsm_08_08.h
1 file changed, 21 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/29/2829/7

diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h 
b/include/osmocom/gsm/protocol/gsm_08_08.h
index 9e00d23..d165330 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -449,6 +449,27 @@
uint16_t cfg;
 };
 
+/*! \brief Default speech codec configurations: Some codecs specified with
+ *  struct gsm0808_speech_codec, require a configuration (cfg). The following
+ *  default configuration will configure the codec (RTP) to match the
+ *  configuration that is used on the air interface (Um).
+ *
+ *  Default values for FR_AMR, HR_AMR and OHR_AMR:
+ *  See also: 3GPP TS 28.062, Table 7.11.3.1.3-2: Preferred
+ *  Configurations for the Adaptive Multi-Rate Codec Types
+ *
+ *  Default values for FR_AMR_WB, OFR_AMR_WB and OHR_AMR_WB:
+ *  See also: 3GPP TS 26.103, Table 5.7-1: Allowed Configurations
+ *  for the Adaptive Multi-Rate - Wideband Codec Types */
+enum gsm0808_speech_codec_defaults {
+   GSM0808_SC_CFG_DEFAULT_FR_AMR   = 0x,
+   GSM0808_SC_CFG_DEFAULT_HR_AMR   = 0x073f,
+   GSM0808_SC_CFG_DEFAULT_OHR_AMR  = 0x,
+   GSM0808_SC_CFG_DEFAULT_FR_AMR_WB= 0x01,
+   GSM0808_SC_CFG_DEFAULT_OFR_AMR_WB   = 0x3f,
+   GSM0808_SC_CFG_DEFAULT_OHR_AMR_WB   = 0x01,
+};
+
 /* 3GPP TS 48.008 3.2.2.103 Speech Codec List */
 #define SPEECH_CODEC_MAXLEN 255
 struct gsm0808_speech_codec_list {

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9dc0165d76a022b2c1b7418bc3133407e61b7261
Gerrit-PatchSet: 7
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[PATCH] libosmocore[master]: gsm0808: add function to translate perm speech to speech cod...

2017-06-21 Thread dexter
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/2830

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

gsm0808: add function to translate perm speech to speech codec type

The permitted speech field used in channel type element (struct
gsm0808_channel_type) uses a different representation as
the type field in the speech codec element (struct
gsm0808_speech_codec)

This patch adds a function to convert from permitted speech to
speech codec type.

Change-Id: Ib26a9c20864459b2baaa04f49b6e7902ba44b7cb
---
M include/osmocom/gsm/gsm0808_utils.h
M src/gsm/gsm0808_utils.c
M src/gsm/libosmogsm.map
3 files changed, 40 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/30/2830/8

diff --git a/include/osmocom/gsm/gsm0808_utils.h 
b/include/osmocom/gsm/gsm0808_utils.h
index c11bf8d..9057273 100644
--- a/include/osmocom/gsm/gsm0808_utils.h
+++ b/include/osmocom/gsm/gsm0808_utils.h
@@ -71,3 +71,5 @@
 /* Decode Cell Identifier List element */
 int gsm0808_dec_cell_id_list(struct gsm0808_cell_id_list *cil,
 const uint8_t *elem, uint8_t len);
+
+int gsm0808_convert_to_speech_codec_type(uint8_t perm_spch);
diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c
index 60fb91c..f7062a5 100644
--- a/src/gsm/gsm0808_utils.c
+++ b/src/gsm/gsm0808_utils.c
@@ -645,4 +645,41 @@
return (int)(elem - old_elem);
 }
 
+/*! \brief Convert the representation of the permitted speech codec identifier
+ *  that is used in struct gsm0808_channel_type to the speech codec
+ *  representation we use in struct gsm0808_speech_codec.
+ *  \param[in] perm_spch to be converted (see also gsm0808_permitted_speech)
+ *  \returns GSM speech codec type; negative on error */
+int gsm0808_convert_to_speech_codec_type(uint8_t perm_spch)
+{
+   /*! The speech codec type, which is used in the channel type field to
+*  signal the permitted speech versions (codecs) has a different
+*  encoding than the type field in the speech codec type element
+*  (See also 3GPP TS 48.008, 3.2.2.11 and 3.2.2.103) */
+
+   switch (perm_spch) {
+   case GSM0808_PERM_FR1:
+   return GSM0808_SCT_FR1;
+   case GSM0808_PERM_FR2:
+   return GSM0808_SCT_FR2;
+   case GSM0808_PERM_FR3:
+   return GSM0808_SCT_FR3;
+   case GSM0808_PERM_FR4:
+   return GSM0808_SCT_FR4;
+   case GSM0808_PERM_FR5:
+   return GSM0808_SCT_FR5;
+   case GSM0808_PERM_HR1:
+   return GSM0808_SCT_HR1;
+   case GSM0808_PERM_HR3:
+   return GSM0808_SCT_HR3;
+   case GSM0808_PERM_HR4:
+   return GSM0808_SCT_HR4;
+   case GSM0808_PERM_HR6:
+   return GSM0808_SCT_HR6;
+   }
+
+   /* Invalid input */
+   return -EINVAL;
+}
+
 /*! @} */
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index 9613c4e..ccc5b9a 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -162,6 +162,7 @@
 gsm0808_dec_encrypt_info;
 gsm0808_enc_cell_id_list;
 gsm0808_dec_cell_id_list;
+gsm0808_convert_to_speech_codec_type;
 
 gsm0858_rsl_ul_meas_enc;
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib26a9c20864459b2baaa04f49b6e7902ba44b7cb
Gerrit-PatchSet: 8
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


osmo-hlr[master]: tests/auc: Don't require python3

2017-06-21 Thread Neels Hofmeyr

Patch Set 4:

(1 comment)

https://gerrit.osmocom.org/#/c/2825/4/tests/auc/gen_ts_55_205_test_sets/pdftxt_2_c.py
File tests/auc/gen_ts_55_205_test_sets/pdftxt_2_c.py:

Line 2
> since the code seems to work with python2 as well as python3, why not go fo
I remember that in an unrelated patch this caused problems in the FreeBSD build 
slave. The solution then was to explicitly pick python2. I dimly remember that 
I suggested to just provide a symlink from python to python2 on the build 
slave, but I think Holger had a reason to not do so.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb59b79021b2c935b326496ed339f12e13c96b8e
Gerrit-PatchSet: 4
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: neels 
Gerrit-HasComments: Yes


[PATCH] libosmocore[master]: doxygen: enable AUTOBRIEF, drop \brief

2017-06-21 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/2983

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

doxygen: enable AUTOBRIEF, drop \brief

Especially for short descriptions, it is annoying to have to type \brief for
every single API doc.

Drop all \brief and enable the AUTOBRIEF feature of doxygen, which always takes
the first sentence of an API doc as the brief description.

Change-Id: I11a8a821b065a128108641a2a63fb5a2b1916e87
---
M Doxyfile.codec.in
M Doxyfile.coding.in
M Doxyfile.core.in
M Doxyfile.gsm.in
M Doxyfile.vty.in
M include/osmocom/codec/codec.h
M include/osmocom/coding/gsm0503_coding.h
M include/osmocom/coding/gsm0503_interleaving.h
M include/osmocom/coding/gsm0503_mapping.h
M include/osmocom/coding/gsm0503_parity.h
M include/osmocom/coding/gsm0503_tables.h
M include/osmocom/core/application.h
M include/osmocom/core/bitcomp.h
M include/osmocom/core/bits.h
M include/osmocom/core/bitvec.h
M include/osmocom/core/byteswap.h
M include/osmocom/core/conv.h
M include/osmocom/core/defs.h
M include/osmocom/core/fsm.h
M include/osmocom/core/gsmtap.h
M include/osmocom/core/gsmtap_util.h
M include/osmocom/core/linuxlist.h
M include/osmocom/core/logging.h
M include/osmocom/core/msgb.h
M include/osmocom/core/panic.h
M include/osmocom/core/prim.h
M include/osmocom/core/rate_ctr.h
M include/osmocom/core/select.h
M include/osmocom/core/sercomm.h
M include/osmocom/core/signal.h
M include/osmocom/core/socket.h
M include/osmocom/core/stat_item.h
M include/osmocom/core/statistics.h
M include/osmocom/core/strrb.h
M include/osmocom/core/timer.h
M include/osmocom/core/timer_compat.h
M include/osmocom/core/utils.h
M include/osmocom/core/write_queue.h
M include/osmocom/crypt/auth.h
M include/osmocom/gprs/gprs_bssgp.h
M include/osmocom/gprs/gprs_ns.h
M include/osmocom/gprs/gprs_rlc.h
M include/osmocom/gprs/protocol/gsm_08_16.h
M include/osmocom/gprs/protocol/gsm_08_18.h
M include/osmocom/gsm/a5.h
M include/osmocom/gsm/abis_nm.h
M include/osmocom/gsm/gsm_utils.h
M include/osmocom/gsm/kasumi.h
M include/osmocom/gsm/l1sap.h
M include/osmocom/gsm/lapd_core.h
M include/osmocom/gsm/lapdm.h
M include/osmocom/gsm/oap.h
M include/osmocom/gsm/protocol/gsm_04_08.h
M include/osmocom/gsm/protocol/gsm_08_58.h
M include/osmocom/gsm/protocol/gsm_12_21.h
M include/osmocom/gsm/rsl.h
M include/osmocom/gsm/tlv.h
M include/osmocom/sim/sim.h
M include/osmocom/vty/command.h
M include/osmocom/vty/telnet_interface.h
M include/osmocom/vty/vty.h
M src/application.c
M src/backtrace.c
M src/bitcomp.c
M src/bits.c
M src/bitvec.c
M src/codec/gsm610.c
M src/codec/gsm620.c
M src/codec/gsm690.c
M src/coding/gsm0503_coding.c
M src/coding/gsm0503_interleaving.c
M src/coding/gsm0503_mapping.c
M src/coding/gsm0503_parity.c
M src/coding/gsm0503_tables.c
M src/conv.c
M src/crc16.c
M src/ctrl/control_if.c
M src/ctrl/fsm_ctrl_commands.c
M src/fsm.c
M src/gb/gprs_bssgp_bss.c
M src/gb/gprs_ns.c
M src/gsm/a5.c
M src/gsm/abis_nm.c
M src/gsm/auth_core.c
M src/gsm/comp128.c
M src/gsm/comp128v23.c
M src/gsm/gan.c
M src/gsm/gea.c
M src/gsm/gprs_cipher_core.c
M src/gsm/gprs_rlc.c
M src/gsm/gsm0341.c
M src/gsm/gsm0411_smc.c
M src/gsm/gsm0411_utils.c
M src/gsm/gsm0808.c
M src/gsm/gsm0808_utils.c
M src/gsm/gsm48.c
M src/gsm/gsm48_ie.c
M src/gsm/gsm_04_08_gprs.c
M src/gsm/gsm_utils.c
M src/gsm/gsup.c
M src/gsm/ipa.c
M src/gsm/lapd_core.c
M src/gsm/lapdm.c
M src/gsm/oap.c
M src/gsm/rsl.c
M src/gsm/sysinfo.c
M src/gsm/tlv_parser.c
M src/gsmtap_util.c
M src/logging.c
M src/logging_gsmtap.c
M src/logging_syslog.c
M src/loggingrb.c
M src/macaddr.c
M src/msgb.c
M src/panic.c
M src/plugin.c
M src/prim.c
M src/rate_ctr.c
M src/select.c
M src/sercomm.c
M src/serial.c
M src/signal.c
M src/sim/core.c
M src/socket.c
M src/stat_item.c
M src/strrb.c
M src/timer.c
M src/timer_gettimeofday.c
M src/utils.c
M src/vty/command.c
M src/vty/fsm_vty.c
M src/vty/logging_vty.c
M src/vty/stats_vty.c
M src/vty/telnet_interface.c
M src/vty/utils.c
M src/vty/vector.c
M src/vty/vty.c
M src/write_queue.c
138 files changed, 1,542 insertions(+), 1,542 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/83/2983/2


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I11a8a821b065a128108641a2a63fb5a2b1916e87
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder


[PATCH] libosmocore[master]: doxygen: add missing gb API doc generation

2017-06-21 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/2982

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

doxygen: add missing gb API doc generation

Files in include/osmocom/gprs/ and src/gb/ are not included in any doxygen
generated API docs. Add Doxyfile.gb.in and adjust configure.ac and Makefile.am.

Change-Id: Ieb64f497f55368e396872083237c9ff28da2dd93
---
M .gitignore
A Doxyfile.gb.in
M Makefile.am
M configure.ac
4 files changed, 1,730 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/2982/2

diff --git a/.gitignore b/.gitignore
index 89459f0..f26b699 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,6 +38,7 @@
 Doxyfile.vty
 Doxyfile.codec
 Doxyfile.coding
+Doxyfile.gb
 
 debian/autoreconf.after
 debian/autoreconf.before
@@ -115,6 +116,7 @@
 doc/vty/html
 doc/vty/doxygen_sqlite3.db
 doc/gsm
+doc/gb
 doc/html.tar
 doc/*.tag
 tags
diff --git a/Doxyfile.gb.in b/Doxyfile.gb.in
new file mode 100644
index 000..36b4f2b
--- /dev/null
+++ b/Doxyfile.gb.in
@@ -0,0 +1,1716 @@
+# Doxyfile 1.7.4
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a hash (#) is considered a comment and will be ignored.
+# The format is:
+#   TAG = value [value, ...]
+# For lists items can also be appended using:
+#   TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ").
+
+#---
+# Project related configuration options
+#---
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING  = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME   = libosmogb
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER = @VERSION@
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer
+# a quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF  = "Osmocom Gb library"
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is
+# included in the documentation. The maximum height of the logo should not
+# exceed 55 pixels and the maximum width should not exceed 200 pixels.
+# Doxygen will copy the logo to the output directory.
+
+PROJECT_LOGO   =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY   = doc/gb
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE= English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC  = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description 

[MERGED] libosmocore[master]: vty: additional nodes for sccp-address configuration

2017-06-21 Thread dexter
dexter has submitted this change and it was merged.

Change subject: vty: additional nodes for sccp-address configuration
..


vty: additional nodes for sccp-address configuration

The planned sccp-addressbook implementation in libosmo-sccp
requires two additional VTY nodes.

See also in libosmo-sccp.git:
Change-Id I068ed7f7d113dab88424a9d47bab7fc703bb7942

Change-Id: I42aa29c097f284b85801c5329b015b189640
---
M TODO-RELEASE
M include/osmocom/vty/command.h
2 files changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/TODO-RELEASE b/TODO-RELEASE
index a23fcea..1964cff 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -11,3 +11,4 @@
 libosmogsm/gsupABI change  fix AUTS length to 14, not 16 
(length is implicit)
 libosmogsm/oap ABI change  fix AUTS length to 14, not 16 (length 
is implicit)
 osmo-auc-gen   UI change   fix AUTS length to 14, not 16 (length 
is implicit)
+libosmovty ABI change  redefine _LAST_OSMOVTY_NODE as a high 
number to increase node space
diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h
index b39bbf7..62989c1 100644
--- a/include/osmocom/vty/command.h
+++ b/include/osmocom/vty/command.h
@@ -92,13 +92,13 @@
L_CS7_RTABLE_NODE,  /*!< \brief SS7 Routing Table */
L_CS7_LINK_NODE,/*!< \brief SS7 Link */
L_CS7_LINKSET_NODE, /*!< \brief SS7 Linkset */
+   L_CS7_SCCPADDR_NODE,/*!< \brief SS7 SCCP Address */
+   L_CS7_SCCPADDR_GT_NODE, /*!< \brief SS7 SCCP Global Title */
 
/*
 * When adding new nodes to the libosmocore project, these nodes can be
 * used to avoid ABI changes for unrelated projects.
 */
-   RESERVED1_NODE, /*!< \brief Reserved for later extensions */
-   RESERVED2_NODE, /*!< \brief Reserved for later extensions */
RESERVED3_NODE, /*!< \brief Reserved for later extensions */
 
_LAST_OSMOVTY_NODE

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I42aa29c097f284b85801c5329b015b189640
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: dexter 


[PATCH] osmo-bts[master]: Move common steps into common jenkins helper

2017-06-21 Thread Max
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/2894

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

Move common steps into common jenkins helper

Move value_string termination check and OpenBSC headers checkout into
shared jenkins helper from BTS' model-specific helpers to get rid of
copy-pasted code. While at it - also remove unnecessary bash
dependency.

Change-Id: Ic48b1f75179b9008d65219dd5a47c1ab3b886408
---
M contrib/jenkins_bts_trx.sh
A contrib/jenkins_common.sh
M contrib/jenkins_oct.sh
M contrib/jenkins_oct_and_bts_trx.sh
M contrib/jenkins_sysmobts.sh
5 files changed, 36 insertions(+), 69 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/94/2894/11

diff --git a/contrib/jenkins_bts_trx.sh b/contrib/jenkins_bts_trx.sh
index dbd41ca..076a4ff 100755
--- a/contrib/jenkins_bts_trx.sh
+++ b/contrib/jenkins_bts_trx.sh
@@ -1,21 +1,12 @@
-#!/usr/bin/env bash
+#!/bin/sh
 
-set -ex
-
-base="$PWD"
-deps="$base/deps"
-inst="$deps/install"
-export deps inst
-
-mkdir "$deps" || true
-rm -rf "$inst"
+# shellcheck source=contrib/jenkins_common.sh
+. $(dirname "$0")/jenkins_common.sh
 
 export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
 export LD_LIBRARY_PATH="$inst/lib"
 
 osmo-build-dep.sh libosmocore
-
-"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py 
$(find . -name "*.[hc]")
 
 osmo-build-dep.sh libosmo-abis
 
@@ -23,9 +14,6 @@
 
 # Get osmo-pcu for pcuif_proto.h
 osmo-deps.sh osmo-pcu
-
-# Get openbsc for gsm_data_shared.*
-osmo-deps.sh openbsc
 
 cd "$base"
 
diff --git a/contrib/jenkins_common.sh b/contrib/jenkins_common.sh
new file mode 100644
index 000..824dd43
--- /dev/null
+++ b/contrib/jenkins_common.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -ex
+
+base="$PWD"
+deps="$base/deps"
+inst="$deps/install"
+
+export deps inst
+
+mkdir -p "$deps"
+rm -rf "$inst"
+
+cd "$deps"
+
+# Get libosmocore for verify_value_string_arrays_are_terminated.py
+osmo-deps.sh libosmocore
+
+# Get OpenBSC for gsm_data_shared.*
+osmo-deps.sh openbsc
+
+cd "$base"
+
+"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py 
$(find . -name "*.[hc]")
diff --git a/contrib/jenkins_oct.sh b/contrib/jenkins_oct.sh
index 9f06888..0f926c9 100755
--- a/contrib/jenkins_oct.sh
+++ b/contrib/jenkins_oct.sh
@@ -1,25 +1,9 @@
-#!/usr/bin/env bash
+#!/bin/sh
 
-set -ex
-
-base="$PWD"
-deps="$base/deps"
-inst="$deps/install"
-export deps inst
-
-mkdir "$deps" || true
-rm -rf "$inst"
-
-# Get the headers..
-cd "$deps"
-git clone git://git.osmocom.org/openbsc || true
-cd openbsc
-git pull --rebase
-cd "$base"
+# shellcheck source=contrib/jenkins_common.sh
+. $(dirname "$0")/jenkins_common.sh
 
 osmo-build-dep.sh libosmocore
-
-"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py 
$(find . -name "*.[hc]")
 
 export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
 export LD_LIBRARY_PATH="$inst/lib"
diff --git a/contrib/jenkins_oct_and_bts_trx.sh 
b/contrib/jenkins_oct_and_bts_trx.sh
index 93aa47a..132c2e0 100755
--- a/contrib/jenkins_oct_and_bts_trx.sh
+++ b/contrib/jenkins_oct_and_bts_trx.sh
@@ -1,21 +1,12 @@
-#!/usr/bin/env bash
+#!/bin/sh
 
-set -ex
-
-base="$PWD"
-deps="$base/deps"
-inst="$deps/install"
-export deps inst
-
-mkdir "$deps" || true
-rm -rf "$inst"
+# shellcheck source=contrib/jenkins_common.sh
+. $(dirname "$0")/jenkins_common.sh
 
 export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
 export LD_LIBRARY_PATH="$inst/lib"
 
 osmo-build-dep.sh libosmocore
-
-"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py 
$(find . -name "*.[hc]")
 
 osmo-build-dep.sh libosmo-abis
 
@@ -24,10 +15,6 @@
 # Get osmo-pcu for pcuif_proto.h
 osmo-deps.sh osmo-pcu
 
-# Get openbsc for gsm_data_shared.*
-osmo-deps.sh openbsc
-
-cd "$deps"
 if ! test -d layer1-api;
 then
   git clone git://git.osmocom.org/octphy-2g-headers layer1-api
diff --git a/contrib/jenkins_sysmobts.sh b/contrib/jenkins_sysmobts.sh
index c6f109d..bce0690 100755
--- a/contrib/jenkins_sysmobts.sh
+++ b/contrib/jenkins_sysmobts.sh
@@ -1,25 +1,9 @@
-#!/usr/bin/env bash
+#!/bin/sh
 
-set -ex
-
-base="$PWD"
-deps="$base/deps"
-inst="$deps/install"
-export deps inst
-
-mkdir "$deps" || true
-rm -rf "$inst"
-
-# Get the headers..
-cd "$deps"
-git clone git://git.osmocom.org/openbsc || true
-cd openbsc
-git pull --rebase
-cd "$base"
+# shellcheck source=contrib/jenkins_common.sh
+. $(dirname "$0")/jenkins_common.sh
 
 osmo-build-dep.sh libosmocore
-
-"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py 
$(find . -name "*.[hc]")
 
 export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
 export LD_LIBRARY_PATH="$inst/lib"

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic48b1f75179b9008d65219dd5a47c1ab3b886408
Gerrit-PatchSet: 11
Gerrit-Project: osmo-bts

[PATCH] osmo-bts[master]: Use generic L1 headers helper

2017-06-21 Thread Max
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/2974

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

Use generic L1 headers helper

Change-Id: I2253df3509595d7393ec6631ef846dbebae73ca4
---
M contrib/jenkins_lc15.sh
M contrib/jenkins_oct.sh
M contrib/jenkins_oct_and_bts_trx.sh
M contrib/jenkins_sysmobts.sh
4 files changed, 10 insertions(+), 55 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/74/2974/5

diff --git a/contrib/jenkins_lc15.sh b/contrib/jenkins_lc15.sh
index a0eef43..c9173bf 100644
--- a/contrib/jenkins_lc15.sh
+++ b/contrib/jenkins_lc15.sh
@@ -11,15 +11,7 @@
 osmo-build-dep.sh libosmo-abis
 
 cd "$deps"
-if ! test -d litecell15-fw;
-then
-  git clone https://gitlab.com/nrw_litecell15/litecell15-fw.git
-fi
-
-cd litecell15-fw
-git fetch origin
-git reset --hard origin/$FIRMWARE_VERSION
-
+osmo-layer1-headers.sh lc15 "$FIRMWARE_VERSION"
 cd "$base"
 
 set +x
@@ -31,7 +23,7 @@
 set -x
 
 autoreconf --install --force
-./configure --with-openbsc="$deps/openbsc/openbsc/include" 
--with-litecell15="$deps/litecell15-fw/" --enable-litecell15
+./configure --with-openbsc="$deps/openbsc/openbsc/include" 
--with-litecell15="$deps/layer1-headers/" --enable-litecell15
 $MAKE "$PARALLEL_MAKE"
 $MAKE check || cat-testlogs.sh
-DISTCHECK_CONFIGURE_FLAGS="--with-litecell15=$deps/litecell15-fw/ 
--with-openbsc=$deps/openbsc/openbsc/include --enable-litecell15" $MAKE 
distcheck || cat-testlogs.sh
+DISTCHECK_CONFIGURE_FLAGS="--with-litecell15=$deps/layer1-headers/ 
--with-openbsc=$deps/openbsc/openbsc/include --enable-litecell15" $MAKE 
distcheck || cat-testlogs.sh
diff --git a/contrib/jenkins_oct.sh b/contrib/jenkins_oct.sh
index 0f926c9..6ad5358 100755
--- a/contrib/jenkins_oct.sh
+++ b/contrib/jenkins_oct.sh
@@ -11,20 +11,7 @@
 osmo-build-dep.sh libosmo-abis
 
 cd "$deps"
-if ! test -d layer1-api;
-then
-  git clone git://git.osmocom.org/octphy-2g-headers layer1-api
-fi
-
-cd layer1-api
-git fetch origin
-if [ $FIRMWARE_VERSION = "master" ];
-then
-git reset --hard origin/master
-else
-git reset --hard $FIRMWARE_VERSION
-fi
-
+osmo-layer1-headers.sh oct "$FIRMWARE_VERSION"
 cd "$base"
 
 set +x
@@ -36,10 +23,10 @@
 set -x
 
 autoreconf --install --force
-./configure --with-openbsc="$deps/openbsc/openbsc/include" 
--with-octsdr-2g="$deps/layer1-api/" --enable-octphy
+./configure --with-openbsc="$deps/openbsc/openbsc/include" 
--with-octsdr-2g="$deps/layer1-headers/" --enable-octphy
 $MAKE $PARALLEL_MAKE
 $MAKE check \
   || cat-testlogs.sh
-DISTCHECK_CONFIGURE_FLAGS="--with-octsdr-2g=$deps/layer1-api/ 
--with-openbsc=$deps/openbsc/openbsc/include --enable-octphy" \
+DISTCHECK_CONFIGURE_FLAGS="--with-octsdr-2g=$deps/layer1-headers/ 
--with-openbsc=$deps/openbsc/openbsc/include --enable-octphy" \
   $MAKE distcheck \
   || cat-testlogs.sh
diff --git a/contrib/jenkins_oct_and_bts_trx.sh 
b/contrib/jenkins_oct_and_bts_trx.sh
index 132c2e0..a8a8004 100755
--- a/contrib/jenkins_oct_and_bts_trx.sh
+++ b/contrib/jenkins_oct_and_bts_trx.sh
@@ -15,18 +15,7 @@
 # Get osmo-pcu for pcuif_proto.h
 osmo-deps.sh osmo-pcu
 
-if ! test -d layer1-api;
-then
-  git clone git://git.osmocom.org/octphy-2g-headers layer1-api
-fi
-cd layer1-api
-git fetch origin
-if [ $FIRMWARE_VERSION = "master" ];
-then
-git reset --hard origin/master
-else
-git reset --hard $FIRMWARE_VERSION
-fi
+osmo-layer1-headers.sh oct "$FIRMWARE_VERSION"
 
 cd "$base"
 
@@ -42,7 +31,7 @@
 configure_flags="\
   --with-openbsc=$deps/openbsc/openbsc/include \
   --with-osmo-pcu=$deps/osmo-pcu/include \
-  --with-octsdr-2g=$deps/layer1-api/ \
+  --with-octsdr-2g=$deps/layer1-headers/ \
   --enable-octphy \
   --enable-trx \
   "
diff --git a/contrib/jenkins_sysmobts.sh b/contrib/jenkins_sysmobts.sh
index bce0690..227f249 100755
--- a/contrib/jenkins_sysmobts.sh
+++ b/contrib/jenkins_sysmobts.sh
@@ -11,22 +11,9 @@
 osmo-build-dep.sh libosmo-abis
 
 cd "$deps"
-if ! test -d layer1-api;
-then
-  git clone git://git.sysmocom.de/sysmo-bts/layer1-api.git layer1-api
-fi
-
-cd layer1-api
-git fetch origin
-if [ $FIRMWARE_VERSION = "master" ];
-then
-git reset --hard origin/master
-else
-git reset --hard $FIRMWARE_VERSION
-fi
+osmo-layer1-headers.sh sysmo "$FIRMWARE_VERSION"
 mkdir -p "$inst/include/sysmocom/femtobts"
-cp include/*.h "$inst/include/sysmocom/femtobts/"
-
+ln -s $deps/layer1-headers/include/* "$inst/include/sysmocom/femtobts/"
 cd "$base"
 
 set +x

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2253df3509595d7393ec6631ef846dbebae73ca4
Gerrit-PatchSet: 5
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: André Boddenberg 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 


[PATCH] osmo-bts[master]: Move common steps into common jenkins helper

2017-06-21 Thread Max
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/2894

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

Move common steps into common jenkins helper

Move value_string termination check and OpenBSC headers checkout into
shared jenkins helper from BTS' model-specific helpers to get rid of
copy-pasted code. While at it - also remove unnecessary bash
dependency.

Change-Id: Ic48b1f75179b9008d65219dd5a47c1ab3b886408
---
M contrib/jenkins_bts_trx.sh
A contrib/jenkins_common.sh
M contrib/jenkins_oct.sh
M contrib/jenkins_oct_and_bts_trx.sh
M contrib/jenkins_sysmobts.sh
5 files changed, 36 insertions(+), 74 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/94/2894/10

diff --git a/contrib/jenkins_bts_trx.sh b/contrib/jenkins_bts_trx.sh
index dbd41ca..84c572c 100755
--- a/contrib/jenkins_bts_trx.sh
+++ b/contrib/jenkins_bts_trx.sh
@@ -1,33 +1,17 @@
-#!/usr/bin/env bash
+#!/bin/sh
 
-set -ex
-
-base="$PWD"
-deps="$base/deps"
-inst="$deps/install"
-export deps inst
-
-mkdir "$deps" || true
-rm -rf "$inst"
+# shellcheck source=contrib/jenkins_common.sh
+. $(dirname "$0")/jenkins_common.sh
 
 export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
 export LD_LIBRARY_PATH="$inst/lib"
 
 osmo-build-dep.sh libosmocore
 
-"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py 
$(find . -name "*.[hc]")
-
 osmo-build-dep.sh libosmo-abis
-
-cd "$deps"
 
 # Get osmo-pcu for pcuif_proto.h
 osmo-deps.sh osmo-pcu
-
-# Get openbsc for gsm_data_shared.*
-osmo-deps.sh openbsc
-
-cd "$base"
 
 set +x
 echo
diff --git a/contrib/jenkins_common.sh b/contrib/jenkins_common.sh
new file mode 100644
index 000..824dd43
--- /dev/null
+++ b/contrib/jenkins_common.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -ex
+
+base="$PWD"
+deps="$base/deps"
+inst="$deps/install"
+
+export deps inst
+
+mkdir -p "$deps"
+rm -rf "$inst"
+
+cd "$deps"
+
+# Get libosmocore for verify_value_string_arrays_are_terminated.py
+osmo-deps.sh libosmocore
+
+# Get OpenBSC for gsm_data_shared.*
+osmo-deps.sh openbsc
+
+cd "$base"
+
+"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py 
$(find . -name "*.[hc]")
diff --git a/contrib/jenkins_oct.sh b/contrib/jenkins_oct.sh
index 9f06888..0f926c9 100755
--- a/contrib/jenkins_oct.sh
+++ b/contrib/jenkins_oct.sh
@@ -1,25 +1,9 @@
-#!/usr/bin/env bash
+#!/bin/sh
 
-set -ex
-
-base="$PWD"
-deps="$base/deps"
-inst="$deps/install"
-export deps inst
-
-mkdir "$deps" || true
-rm -rf "$inst"
-
-# Get the headers..
-cd "$deps"
-git clone git://git.osmocom.org/openbsc || true
-cd openbsc
-git pull --rebase
-cd "$base"
+# shellcheck source=contrib/jenkins_common.sh
+. $(dirname "$0")/jenkins_common.sh
 
 osmo-build-dep.sh libosmocore
-
-"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py 
$(find . -name "*.[hc]")
 
 export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
 export LD_LIBRARY_PATH="$inst/lib"
diff --git a/contrib/jenkins_oct_and_bts_trx.sh 
b/contrib/jenkins_oct_and_bts_trx.sh
index 93aa47a..d57c9eb 100755
--- a/contrib/jenkins_oct_and_bts_trx.sh
+++ b/contrib/jenkins_oct_and_bts_trx.sh
@@ -1,31 +1,17 @@
-#!/usr/bin/env bash
+#!/bin/sh
 
-set -ex
-
-base="$PWD"
-deps="$base/deps"
-inst="$deps/install"
-export deps inst
-
-mkdir "$deps" || true
-rm -rf "$inst"
+# shellcheck source=contrib/jenkins_common.sh
+. $(dirname "$0")/jenkins_common.sh
 
 export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
 export LD_LIBRARY_PATH="$inst/lib"
 
 osmo-build-dep.sh libosmocore
 
-"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py 
$(find . -name "*.[hc]")
-
 osmo-build-dep.sh libosmo-abis
-
-cd "$deps"
 
 # Get osmo-pcu for pcuif_proto.h
 osmo-deps.sh osmo-pcu
-
-# Get openbsc for gsm_data_shared.*
-osmo-deps.sh openbsc
 
 cd "$deps"
 if ! test -d layer1-api;
diff --git a/contrib/jenkins_sysmobts.sh b/contrib/jenkins_sysmobts.sh
index c6f109d..bce0690 100755
--- a/contrib/jenkins_sysmobts.sh
+++ b/contrib/jenkins_sysmobts.sh
@@ -1,25 +1,9 @@
-#!/usr/bin/env bash
+#!/bin/sh
 
-set -ex
-
-base="$PWD"
-deps="$base/deps"
-inst="$deps/install"
-export deps inst
-
-mkdir "$deps" || true
-rm -rf "$inst"
-
-# Get the headers..
-cd "$deps"
-git clone git://git.osmocom.org/openbsc || true
-cd openbsc
-git pull --rebase
-cd "$base"
+# shellcheck source=contrib/jenkins_common.sh
+. $(dirname "$0")/jenkins_common.sh
 
 osmo-build-dep.sh libosmocore
-
-"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py 
$(find . -name "*.[hc]")
 
 export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
 export LD_LIBRARY_PATH="$inst/lib"

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic48b1f75179b9008d65219dd5a47c1ab3b886408
Gerrit-PatchSet: 10
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 

osmo-bts[master]: Move common steps into common jenkins helper

2017-06-21 Thread Max

Patch Set 9:

Hmm... you're right. It's weird that it doesn't cause build failure.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic48b1f75179b9008d65219dd5a47c1ab3b886408
Gerrit-PatchSet: 9
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: André Boddenberg 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


osmo-bts[master]: Move common steps into common jenkins helper

2017-06-21 Thread Neels Hofmeyr

Patch Set 9: Code-Review-1

(4 comments)

Again apologies, in my last comment I didn't notice that the patches are now 
independent. Still there is no way to commit the lc15 without the code undup, 
which I would have liked to do now. I would accept both at this point, but 
there's still a problem here, s.b...

https://gerrit.osmocom.org/#/c/2894/9/contrib/jenkins_bts_trx.sh
File contrib/jenkins_bts_trx.sh:

Line 25
osmo-pcu removed here


Line 24:   --with-osmo-pcu=$deps/osmo-pcu/include \
this needs osmo-pcu


https://gerrit.osmocom.org/#/c/2894/9/contrib/jenkins_oct_and_bts_trx.sh
File contrib/jenkins_oct_and_bts_trx.sh:

Line 25
pcu gone


Line 40:   --with-osmo-pcu=$deps/osmo-pcu/include \
pcu needed


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic48b1f75179b9008d65219dd5a47c1ab3b886408
Gerrit-PatchSet: 9
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: André Boddenberg 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: neels 
Gerrit-HasComments: Yes


osmo-bts[master]: Move common steps into common jenkins helper

2017-06-21 Thread Max

Patch Set 9:

The patch order is also visible in top right corner of web UI in "Related 
changes". I do agree though that it would be easier if gerrit would 
automatically mark patches submitted together explicitly like [1/3].

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic48b1f75179b9008d65219dd5a47c1ab3b886408
Gerrit-PatchSet: 9
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: André Boddenberg 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


osmo-hlr[master]: tests/auc: Don't require python3

2017-06-21 Thread Max

Patch Set 4:

FYI: I've created OS#2334 to track jenkins build slave package updates.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb59b79021b2c935b326496ed339f12e13c96b8e
Gerrit-PatchSet: 4
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: daniel 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No