Commit Graph

84 Commits

Author SHA1 Message Date
Vadim Yanitskiy 4b6d3f084f build: include git-version-gen into the release tarball
Change-Id: I3d1c8c905f1acca6256eba51f6ee78214419e97a
2024-01-26 23:29:36 +07:00
Vadim Yanitskiy e9ffa494f0 fix warnings about implicit declaration of strtol()
This commit fixes several warnings like this one:

In file included from ../../../src/libsmpp34/test_apps/smpp.c:40:
test_apps/smpp.c: In function ‘do_smpp_send_message2’:
test_apps/esme.h:32:16: warning: implicit declaration of function ‘strtol’;
                                 did you mean ‘strtok’? [-Wimplicit-function-declaration]
   32 |          dst = strtol((char*)clave, NULL, 10);\
      |                ^~~~~~
test_apps/smpp.c:223:5: note: in expansion of macro ‘GET_PROP_INT’
  223 |     GET_PROP_INT( req.source_addr_ton, p, "source_addr_ton" );
      |     ^~~~~~~~~~~~

Change-Id: I16d9e0171d4c26f721c300e22c78b77f6db4895c
2024-01-08 20:46:47 +07:00
Pau Espin 5bf55100c6 Bump version: 1.14.2.2-86ff → 1.14.3
Change-Id: I2b029ca9d00a7c576312e6287f12a66d0d7e8ca1
2023-09-12 12:40:44 +02:00
Oliver Smith 86ff275bb1 debian: set compat level to 10
Related: OS#5958
Change-Id: I6ee4aace6bf7c246338408c41f790189d75d5488
2023-04-25 16:48:19 +02:00
Vadim Yanitskiy 1abf0b43fc binaries/Makefile.am: libraries shall not be in AM_LDFLAGS
Change-Id: I7258743969f5d3ac85dfb887ee1729cff8a910b6
2023-03-09 16:35:15 +07:00
Pau Espin 357d5af97a Bump version: 1.14.1.8-c3e7 → 1.14.2
Change-Id: Iaec5a62d172d37d16a09843c4beb2e3dc9f73412
2023-02-07 14:28:28 +01:00
Harald Welte c3e797b87c Add -Werror=implicit-int -Werror=int-conversion -Werror=old-style-definition
... if --enable-werror is used

Change-Id: I42f0ef1c9eea62a2512a15543ff45d776155fdc5
2022-11-03 12:24:15 +01:00
Harald Welte a53391d885 test_apps: Fix compilation of example smsc code
Change-Id: I12f4daefaa07a1c1b42dc295724e3ec0bdcddfd7
2022-10-27 13:44:38 +02:00
Max 6613063fba Add #define for default SMPP port 2775
Change-Id: I2fcc15ac60b7b6501c9cb1afd0fe6d66d4b76f5f
2022-10-17 14:07:17 +03:00
Max 90acf4bd77 cosmetic: make linter happy
* drop trailing space
* remove FSF postal address from license header

Change-Id: I772e6d7db38d830dfbee651bcd6e8ed24f07ca0b
2022-10-17 14:07:17 +03:00
Vadim Yanitskiy d08cc74519 contrib/jenkins.sh: actually build with $PARALLEL_MAKE
Parallel build has been fixed [1] and re-enabled [2] back in 2018.

Executing $MAKE without $PARALLEL_MAKE builds the project with -j1.
Executing $MAKE with $PARALLEL_MAKE after that makes no sense,
because everything is already compiled and there is nothing to do.

Change-Id: Iff7e7acfac0b827ce3b1086cea376a438b5af334
Related: [1] I5a9d7dbd7b992d322ed0d852ebf8ca2252b51a12
Related: [2] Id41fbcb5a96093eb6c3dc00bcacbd379111ada70
2022-08-29 22:36:12 +07:00
Vadim Yanitskiy 70aa4abefb Makefile.am, configure.ac: fix autoreconf related warnings
* aclocal: warning: couldn't open directory 'm4': No such file or directory
* libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac
* libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am
* configure.ac:9: warning: 'AM_CONFIG_HEADER': this macro is obsolete
  configure.ac:9: You should use the 'AC_CONFIG_HEADERS' macro instead
* configure.ac:22: warning: The macro `AC_PROG_LIBTOOL' is obsolete
* configure.ac:86: warning: AC_OUTPUT should be used without arguments

Change-Id: I3199e7de0a04b4df89d01277cdb305d33902fcc2
2022-08-14 13:06:52 +07:00
Vadim Yanitskiy 2fb61d0f2a update git URLs (git -> https; gitea)
Change-Id: Ic7adcdb289dff952f9897813ea1243cd1945c1ca
2022-08-14 12:34:35 +07:00
Vadim Yanitskiy c59bdf71d9 README.md: fix copy-paste: s/libosmocore/libsmpp34/
Change-Id: Ic0b804f5b3e4ddfc7b6e71195f3acf4dae2c4297
2022-08-14 12:31:50 +07:00
Pau Espin 09726c1cb1 Bump version: 1.14.0.6-1e60 → 1.14.1
Change-Id: Ifdb8f2b5a528f4c70a51322fc2ee66c99d0a68d2
2021-02-23 18:00:48 +01:00
Pau Espin 1e608c02e0 .gitignore: Ignore new autofoo tmp files
Change-Id: Ibdc5bd9ec0e4d95aa9e358502035806ade5a9521
2021-02-04 12:45:57 +01:00
Vadim Yanitskiy bb625e7d19 debian/control: change maintainer to the Osmocom team / mailing list
Change-Id: I382b5cc2becb38948dfdb783a8859157f622872b
2020-08-13 16:09:02 +07:00
Oliver Smith cecae664ff Makefile.am: EXTRA_DIST: debian, contrib/*.spec.in
Change-Id: Ic57665f98ba65e9876157c2238077fcb54256f16
2020-05-22 13:32:04 +02:00
Oliver Smith 4da2ed46b1 contrib: integrate RPM spec
Remove OpenSUSE bug report link, set version to @VERSION@, make it build with
CentOS 8 etc.

Related: OS#4550
Change-Id: If771c1298c84868a9ab0b0aba8d26325c3d810e8
2020-05-19 15:20:26 +02:00
Oliver Smith 552ea2a31e contrib: import RPM spec
Copy the RPM spec file from:
https://build.opensuse.org/project/show/home:mnhauke:osmocom:nightly

Related: OS#4550
Change-Id: Iacfa1f9a445abf7d6dc867c14c6237d9fc8750f7
2020-05-14 11:35:37 +02:00
Eric Wild 7dbf4bbe05 configure.ac: fix libtool issue with clang and sanitizer
As pointed out at https://github.com/libexpat/libexpat/issues/312
libtool does not play nice with clang sanitizer builds at all.
For those builds LD shoud be set to clang too (and LDFLAGS needs the
sanitizer flags as well), because the clang compiler driver knows how
linking to the sanitizer libs works, but then at a later stage libtool
fails to actually produce the shared libraries and the build fails. This
is fixed by this patch.

Addtionally LD_LIBRARY_PATH has no effect on conftest runs during
configure time, so the rpath needs to be set to the asan library path to
ensure the configure run does not fail due to a missing asan library,
i.e.:

SANS='-fsanitize=memory -fsanitize-recover=all -shared-libsan'
export CC=clang-10
ASANPATH=$(dirname `$CC -print-file-name=libclang_rt.asan-x86_64.so`)
export LDFLAGS="-Wl,-rpath,$ASANPATH $SANS $LDFLAGS"

Change-Id: Iae420759fbf3846221f94af4403f6273536ea00b
2020-04-11 01:17:00 +02:00
Pau Espin d2704da4cb Bump version: 1.13.0.7-ffff → 1.14.0
Change-Id: Id7ef68f50fb951dfb0687977924115204f8482a6
2019-08-07 14:48:07 +02:00
Harald Welte ffff2f6572 bind_receiver_test: Fix "unused value" of writing addr_ton twice
The constant 0x34 clearly hints that this should be written to
interface_version...

Closes: CID#135235
Change-Id: I89e16746da5c9f77b721294149a1bce5be5a1eae
2019-07-21 11:33:24 +02:00
Oliver Smith 1a6bf442ea contrib/jenkins.sh: run "make maintainer-clean"
Related: OS#3047
Change-Id: I78fc465169b9ed95a2f9aaef93f28e1ce47b551a
2019-07-10 12:09:11 +02:00
Harald Welte 6b369a4cfd Allow application to override default heap allocator
Let's introduce a mechanism by which libsmpp34-using applications can
override the memory allocator functions.  This allows us e.g. in the
Osmocom context to use talloc which aids us in debugging memory leaks.

Closes: OS#3913
Change-Id: I3656117115e89638c093bfbcbc4369ce302f7a94
2019-04-11 06:12:40 +00:00
Vadim Yanitskiy a0e85ce237 configure.ac: enable kernel style compile messages
Change-Id: I96a5d808e2a199c33a1c9eef77da3a040e305689
2019-04-10 17:50:02 +07:00
Stefan Sperling 3cf5229fa0 fix use of partly initialized struct in tcp test
Properly initialize sockaddr 'name' used by tcp test, and remove
a redundant re-declaration of this variable in a nested scope.

Change-Id: Id6e488308a72be96cca6aa661f088d2c3c67a6a3
Related: CID#188848
2018-11-21 13:23:35 +01:00
Neels Hofmeyr cf9e5f8c33 esme.c: mark switch statement fall-thru for coverity
Change-Id: I2d8f16242b8ddca855fa387ad93f52adf8bcdeec
2018-10-29 18:33:24 +01:00
Pau Espin 16ea74c638 debian/rules: Don't overwrite .tarball-version
The .tarball-version file should contain the *source version* uniquely
identifying the git commit, and not the Debian package name.

With https://gerrit.osmocom.org/#/c/osmo-ci/+/10343/ there is a correct
.tarball-version file in the .tar.xz of the nightly source packages.

Related: OS#3449
Change-Id: I30714578bc7fb3cfe333eebec89dc06eb1bbc9fe
2018-09-17 10:29:14 +02:00
Pau Espin 6996e5dba9 Bump version: 1.12.0.20-a637-dirty → 1.13.0
Change-Id: If8b3a91714b4738ace025fc7ccbcf6a8e1190c4b
2018-05-03 18:04:11 +02:00
Pau Espin a637c3c9fe src/Makefile.am: Use LIBVERSION variable to set version-info
Same as we do in all other osmocom projects, and osmo-release.mk
expects that variable name.

Change-Id: I9c6ebb9656d6756e8344fd57a246be58b105c419
2018-05-03 17:56:05 +02:00
Neels Hofmeyr 0cad3b4538 jenkins.sh: use --enable-werror configure flag, not CFLAGS
Change-Id: Ib09a4aa3167e5dc24d02e3e59307baa6f7ee3f2c
2018-03-05 20:52:50 +01:00
Neels Hofmeyr 7fb2a408d7 configure: add --enable-werror
Provide a sane means of adding the -Werror compiler flag.

Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"',
but that actually *overwrites* all the other CFLAGS we might want to have set.

Maintain these exceptions from -Werror:
a) deprecation (allow upstream to mark deprecation without breaking builds);
b) "#warning" pragmas (allow to remind ourselves of errors without breaking
   builds)

As a last configure step before generating the output files, print the complete
CFLAGS and CPPFLAGS by means of AC_MSG_RESULT.

Change-Id: I5280a692eaf8f626523e0fd929d1febaa2859104
2018-03-05 20:41:40 +01:00
Martin Hauke 8f7946f30a jenkins.sh: output all test logs when 'make check' failed
Assume that cat-testlogs.sh from osmo-ci is installed in
$HOME/osmo-ci/scripts, and call from jenkins.sh upon
'make check' failure.

Change-Id: I73527117283a3a251591af48e2841c9f452f461d
2018-02-11 15:47:03 +01:00
Martin Hauke 882a759818 jenkins: Enable parallel build and distcheck
Change-Id: Id41fbcb5a96093eb6c3dc00bcacbd379111ada70
2018-02-11 10:27:13 +01:00
Martin Hauke f824d86718 binaries/Makefile.am: Fix parallel build issue
This change fixes a parallel building problem, when
submit_multi_resp_test
was being compiled before its libsmpp34 dependency:

make[2]: *** No rule to make target '../binaries/libsmpp34.la',
             needed by 'submit_multi_resp_test'.  Stop.
make[2]: *** Waiting for unfinished jobs....

For some reason, automake ignores a dependency if the full
path is provided:

$(top_builddir)/binaries/libsmpp34.la

while the relative path solves the problem:

libsmpp34.la

Change-Id: I5a9d7dbd7b992d322ed0d852ebf8ca2252b51a12
2018-02-11 10:25:56 +01:00
Harald Welte 4db6fabf66 debian/control: Fix Vcs-{Browser,Git} URLs
they so far were a copy+paste mistake from libosmocore.

Change-Id: I3da2239d0f093ba1b6706f044c97a307a8dc41bb
2018-02-09 12:02:46 +01:00
Max 4f3ee2add5 Enable sanitize for CI tests
Change-Id: Ibf070228e439ddb3be9c6570f963ac0db05d1c9c
2017-12-21 17:07:20 +01:00
Neels Hofmeyr 7c2232e0ff add --enable-sanitize config option
Change-Id: I83c7b16baeffd3b7ae86edf87a9bb4cbb7346609
2017-11-17 02:05:24 +01:00
Neels Hofmeyr 0f760a6476 jenkins: use osmo-clean-workspace.sh before and after build
See osmo-ci change I2409b2928b4d7ebbd6c005097d4ad7337307dd93 for rationale.

Depends: I2409b2928b4d7ebbd6c005097d4ad7337307dd93
Change-Id: I0030c8662fa87fb589582a3f6bde6ed53e8e3ef9
2017-10-27 22:54:05 +02:00
Alexander Couzens 05bce4cb9e debian/rules: show testsuite.log when tests are failing
Change-Id: If2d8576c5b15fe86419d1c21741f82d4d705bd60
2017-10-11 07:09:43 +02:00
Harald Welte 4a82bb9969 Fix 'make distcheck' by adding .version to EXTRA_DISTI
Commit 1648066f16 introduced
osmocom-style git-version-gen, .version, etc. - but failed
to include .version in the EXTRA_DIST list of files.

Change-Id: If191e82677d851ca486ec78da6643958d05eb5f6
2017-10-04 08:07:42 +08:00
Pau Espin 6619771750 contrib: Enable -Werror by default
Change-Id: I2a88cdcbf76ea28a30e82836030f894c2152d5ed
2017-09-17 17:05:54 +02:00
Pau Espin c63971fab0 Fix Out of bounds compilation warning in OCTET8
The code in OCTET8 implementation assumes the len is placed inside the
byte preceding the memory buffer, which is true for the defined cases.
However, it creates a compilation warning. Better pass the value
directly from the struct field rather than playing addr games. this way
we also assert we require to explicitly pass the len.

Fixes lots of warning like the one below:
/home/pespin/dev/sysmocom/bin/../git/libsmpp34/src/smpp34_unpack.c: In function ‘smpp34_u
npack’:
/home/pespin/dev/sysmocom/bin/../git/libsmpp34/src/smpp34_unpack.c:147:14: warning: array
 subscript is above array bounds [-Warray-bounds]
     lenval = *((inst par) - 1);\
              ^~~~~~~~~~~~~~~~~
/home/pespin/dev/sysmocom/bin/../git/libsmpp34/def_frame/submit_sm.frame:18:2: note: in e
xpansion of macro ‘OCTET8’
  OCTET8( instancia, short_message, 254 );
  ^~~~~~

Change-Id: Id110f4e977c3becdb44cf5492c372e530ea51551
2017-09-15 20:24:25 +02:00
Pau Espin cbdde82aca bind_receiver_resp_test.c: Fix compilation warning
/home/pespin/dev/sysmocom/bin/../git/libsmpp34/test_pdu/bind_receiver_resp_test.c: In function ‘main’:
/home/pespin/dev/sysmocom/bin/../git/libsmpp34/test_pdu/bind_receiver_resp_test.c:55:58: warning: ‘snprintf’ output
 truncated before the last format character [-Wformat-truncation=]
     snprintf((char*)b.system_id, sizeof(b.system_id), "%s", "1234567890123456");
                                                          ^
/home/pespin/dev/sysmocom/bin/../git/libsmpp34/test_pdu/bind_receiver_resp_test.c:55:5: note: ‘snprintf’ output 17
bytes into a destination of size 16
     snprintf((char*)b.system_id, sizeof(b.system_id), "%s", "1234567890123456");

Change-Id: I4ec682a5e2ee4d02008a9c86a0a5507792667d0e
2017-09-15 20:24:24 +02:00
Pau Espin 43dc9992bc smpp34_unpack.c: remove unused variable
Fixes compilation warning below:
/home/pespin/dev/sysmocom/bin/../git/libsmpp34/src/smpp34_unpack.c: In function ‘smpp34_unpack’:
/home/pespin/dev/sysmocom/bin/../git/libsmpp34/src/smpp34_unpack.c:232:18: warning: variable ‘l’ set but not used [
-Wunused-but-set-variable]
         uint32_t l;

Change-Id: I75baa65b575deec1cc040490f2e76ebb54e46ca7
2017-09-15 20:24:22 +02:00
Pau Espin cad0cc552f smpp34_structs.h: Fix truncated output in str_tlv_id
Fixes compilation warning below:

%s’ directive output may be truncated writing between 8 and 33 bytes into a regio
n of size 30 [-Wformat-truncation=]
     snprintf(buff, SMALL_BUFF, "%s",
                                 ^~
/home/pespin/dev/sysmocom/bin/../git/libsmpp34/src/smpp34_params.c:136:5: note: ‘
snprintf’ output between 9 and 34 bytes into a destination of size 30
     snprintf(buff, SMALL_BUFF, "%s",
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 #define OPERACION( p_tlv_id ) (tlv_id == p_tlv_id)?#p_tlv_id:
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 #include "def_list/tlv_id.list"
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             "Reserved"
             ~~~~~~~~~~
 #undef OPERACION
 ~~~~~~~~~~~~~~~~
           );

Change-Id: Ie2ba6182eb0cdd98cadb8317aef49141244aa92d
2017-09-15 20:24:20 +02:00
Pau Espin fe9f88add0 smpp34_structs.h: Fix trailing whitespace
Change-Id: I5838e216fe16b4789bb1a0ce40ce496f46a3c328
2017-09-15 20:24:19 +02:00
Pau Espin a11a464552 smpp34_dumpBuf.c: remove unused variable
Fixes compilation warning below:
smpp34_dumpBuf.c:52:9: warning: variable ‘lefterror’ set but not used [-Wunused-but-set-variable]
     int lefterror = 0;

Change-Id: Iea8ff80d3e4d16aaca6e37d64593b50fa27c8cfb
2017-09-15 20:24:16 +02:00
Max 823e711018 Use release helper from libosmocore
See
https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_release
for details.

Change-Id: Ief2b4d0400b142e84e7ce005a6da5c880c78a8f5
Related: OS#1861
2017-08-28 12:20:06 +02:00