Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package re for openSUSE:Factory checked in at 2024-11-27 22:11:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/re (Old) and /work/SRC/openSUSE:Factory/.re.new.28523 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "re" Wed Nov 27 22:11:43 2024 rev:13 rq:1226659 version:3.17.0 Changes: -------- --- /work/SRC/openSUSE:Factory/re/re.changes 2024-10-07 21:50:05.132893889 +0200 +++ /work/SRC/openSUSE:Factory/.re.new.28523/re.changes 2024-11-27 22:14:20.203990676 +0100 @@ -1,0 +2,12 @@ +Thu Nov 7 16:59:49 UTC 2024 - Martin Hauke <mar...@gmx.de> + +- Update to version 3.17.0 + * types: remove old BREAKPOINT macro. + * dnsc: Fallback to getaddrinfo without any DNS servers. + * dns/client: return ENOTSUP if no server or not getaddrinfo. + * conf: add conf_get_float. + * test: add pktsize to test_h264_packet_base(). + * tls: make tls_verify_handler() static. + * types: fix clang-tidy warning (gcc bit fields workaround). + +------------------------------------------------------------------- Old: ---- re-3.16.0.tar.gz New: ---- re-3.17.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ re.spec ++++++ --- /var/tmp/diff_new_pack.YDIp9z/_old 2024-11-27 22:14:20.668010095 +0100 +++ /var/tmp/diff_new_pack.YDIp9z/_new 2024-11-27 22:14:20.668010095 +0100 @@ -16,10 +16,10 @@ # -%global sover 27 +%global sover 28 %global libname lib%{name}%{sover} Name: re -Version: 3.16.0 +Version: 3.17.0 Release: 0 Summary: Library for real-time communications with async I/O support License: BSD-3-Clause ++++++ re-3.16.0.tar.gz -> re-3.17.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/.github/workflows/abi.yml new/re-3.17.0/.github/workflows/abi.yml --- old/re-3.16.0/.github/workflows/abi.yml 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/.github/workflows/abi.yml 2024-11-06 14:12:14.000000000 +0100 @@ -15,7 +15,7 @@ steps: - uses: actions/checkout@v4 with: - ref: 'v3.11.0' + ref: 'v3.16.0' path: old - uses: actions/checkout@v4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/.github/workflows/run-on-arch.yml new/re-3.17.0/.github/workflows/run-on-arch.yml --- old/re-3.16.0/.github/workflows/run-on-arch.yml 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/.github/workflows/run-on-arch.yml 2024-11-06 14:12:14.000000000 +0100 @@ -9,7 +9,7 @@ jobs: build_job: # The host should always be linux - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Build on ${{ matrix.distro }} ${{ matrix.arch }} strategy: @@ -29,6 +29,7 @@ with: arch: ${{ matrix.arch }} distro: ${{ matrix.distro }} + base_image: '--platform=linux/aarch64 ubuntu:20.04' # Not required, but speeds up builds githubToken: ${{ github.token }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/CHANGELOG.md new/re-3.17.0/CHANGELOG.md --- old/re-3.16.0/CHANGELOG.md 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/CHANGELOG.md 2024-11-06 14:12:14.000000000 +0100 @@ -5,9 +5,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [v3.16.0] - 2024-10-02 -## What's Changed +## v3.17.0 - 2024-11-06 + +### What's Changed +* types: remove old BREAKPOINT macro by @alfredh in https://github.com/baresip/re/pull/1194 +* dnsc: Fallback to getaddrinfo without any DNS servers by @weili-jiang in https://github.com/baresip/re/pull/1195 +* dns/client: return ENOTSUP if no server or not getaddrinfo by @sreimers in https://github.com/baresip/re/pull/1196 +* conf: add conf_get_float by @juha-h in https://github.com/baresip/re/pull/1198 +* ci/run-on-arch: use ubuntu 22.04 by @sreimers in https://github.com/baresip/re/pull/1204 +* thread: fix thrd_equal win32 handle by @sreimers in https://github.com/baresip/re/pull/1203 +* test: add pktsize to test_h264_packet_base() by @alfredh in https://github.com/baresip/re/pull/1205 +* tls: make tls_verify_handler() static by @alfredh in https://github.com/baresip/re/pull/1201 +* types: fix clang-tidy warning (gcc bit fields workaround) by @sreimers in https://github.com/baresip/re/pull/1206 + +### New Contributors +* @weili-jiang made their first contribution in https://github.com/baresip/re/pull/1195 + +**Full Changelog**: https://github.com/baresip/re/compare/v3.16.0...v3.17.0 + + +## v3.16.0 - 2024-10-02 + +### What's Changed * thread: fix pthread_setname_np NetBSD by @leleliu008 in https://github.com/baresip/re/pull/1182 * ice: AI_V4MAPPED macro is missing on some BSD systems by @leleliu008 in https://github.com/baresip/re/pull/1181 * rtp/rtcp: add RTCP Generic NACK packet send (RFC 4585 6.2.1) by @sreimers in https://github.com/baresip/re/pull/1186 @@ -17,15 +37,15 @@ * test: fix re_printf format string for multithread test by @alfredh in https://github.com/baresip/re/pull/1190 * ci: run retest on Fedora by @alfredh in https://github.com/baresip/re/pull/1191 -## New Contributors +### New Contributors * @leleliu008 made their first contribution in https://github.com/baresip/re/pull/1182 **Full Changelog**: https://github.com/baresip/re/compare/v3.15.0...v3.16.0 -## [v3.15.0] - 2024-08-28 +## v3.15.0 - 2024-08-28 -## What's Changed +### What's Changed * misc: remove HAVE_INET6 by @sreimers in https://github.com/baresip/re/pull/1159 * dns/rr: fix dns_rr_print underflow by @sreimers in https://github.com/baresip/re/pull/1162 * test/async: remove AI_ADDRCONFIG by @sreimers in https://github.com/baresip/re/pull/1165 @@ -41,7 +61,7 @@ * sipsess/reply: fix heap-use-after-free bug by @sreimers in https://github.com/baresip/re/pull/1179 * version 3.15.0 by @alfredh in https://github.com/baresip/re/pull/1180 -## New Contributors +### New Contributors * @cmfitch1 made their first contribution in https://github.com/baresip/re/pull/1168 **Full Changelog**: https://github.com/baresip/re/compare/v3.14.0...v3.15.0 @@ -49,7 +69,7 @@ ## [v3.14.0] - 2024-07-23 -## What's Changed +### What's Changed * aumix: use mutex_alloc() by @alfredh in https://github.com/baresip/re/pull/1142 * sipreg/reg.c: stop retrying registers early after 401/407 by @maximilianfridrich in https://github.com/baresip/re/pull/1143 * aumix: add locking in aumix_source_count() by @alfredh in https://github.com/baresip/re/pull/1145 @@ -73,7 +93,7 @@ ## [v3.13.0] - 2024-06-19 -## What's Changed +### What's Changed * http/client: use dynamically sized buffers for PEM setters by @maximilianfridrich in https://github.com/baresip/re/pull/1117 * tls: allow secure TLS renegotiation by @maximilianfridrich in https://github.com/baresip/re/pull/1121 * tls: always enable USE_OPENSSL_SRTP by @alfredh in https://github.com/baresip/re/pull/1122 @@ -100,7 +120,7 @@ ## [v3.12.0] - 2024-05-15 -## What's Changed +### What's Changed * cmake: fix static library build (vcpkg) by @alfredh in https://github.com/baresip/re/pull/1096 * h264: add STAP-A decode with long startcodes by @alfredh in https://github.com/baresip/re/pull/1101 * sess,request: deref request and ctrans immediately by @maximilianfridrich in https://github.com/baresip/re/pull/1099 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/CMakeLists.txt new/re-3.17.0/CMakeLists.txt --- old/re-3.16.0/CMakeLists.txt 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/CMakeLists.txt 2024-11-06 14:12:14.000000000 +0100 @@ -14,13 +14,13 @@ cmake_minimum_required(VERSION 3.14) project(re - VERSION 3.16.0 + VERSION 3.17.0 LANGUAGES C HOMEPAGE_URL https://github.com/baresip/re DESCRIPTION "Generic library for real-time communications" ) -set(PROJECT_SOVERSION 27) # bump if ABI breaks +set(PROJECT_SOVERSION 28) # bump if ABI breaks # Pre-release identifier, comment out on a release # Increment for breaking changes (dev2, dev3...) @@ -74,7 +74,7 @@ -Wnested-externs -Wno-strict-aliasing -Wold-style-definition - -Wshadow -Waggregate-return + -Wshadow -Wstrict-prototypes -Wuninitialized -Wvla @@ -85,6 +85,7 @@ add_compile_options( -Wshorten-64-to-32 -Wno-gnu-zero-variadic-macro-arguments + -Wno-c2x-extensions ) endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/debian/changelog new/re-3.17.0/debian/changelog --- old/re-3.16.0/debian/changelog 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/debian/changelog 2024-11-06 14:12:14.000000000 +0100 @@ -1,3 +1,9 @@ +libre (3.17.0) unstable; urgency=medium + + * version 3.17.0 + + -- Sebastian Reimers <sebastian.reim...@gmail.com> Tue, 6 Nov 2024 09:00:00 +0200 + libre (3.16.0) unstable; urgency=medium * version 3.16.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/include/re_conf.h new/re-3.17.0/include/re_conf.h --- old/re-3.16.0/include/re_conf.h 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/include/re_conf.h 2024-11-06 14:12:14.000000000 +0100 @@ -16,6 +16,7 @@ size_t size); int conf_get_u32(const struct conf *conf, const char *name, uint32_t *num); int conf_get_i32(const struct conf *conf, const char *name, int32_t *num); +int conf_get_float(const struct conf *conf, const char *name, double *num); int conf_get_bool(const struct conf *conf, const char *name, bool *val); int conf_apply(const struct conf *conf, const char *name, conf_h *ch, void *arg); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/include/re_dns.h new/re-3.17.0/include/re_dns.h --- old/re-3.16.0/include/re_dns.h 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/include/re_dns.h 2024-11-06 14:12:14.000000000 +0100 @@ -224,6 +224,7 @@ void dnsc_cache_max(struct dnsc *dnsc, uint32_t max); void dnsc_getaddrinfo(struct dnsc *dnsc, bool active); bool dnsc_getaddrinfo_enabled(struct dnsc *dnsc); +bool dnsc_getaddrinfo_only(const struct dnsc *dnsc); /* DNS System functions */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/include/re_thread.h new/re-3.17.0/include/re_thread.h --- old/re-3.16.0/include/re_thread.h 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/include/re_thread.h 2024-11-06 14:12:14.000000000 +0100 @@ -22,14 +22,18 @@ #else #if defined(WIN32) - #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #include <windows.h> + +struct thrd_win32 { + HANDLE hdl; + DWORD id; +}; #define ONCE_FLAG_INIT INIT_ONCE_STATIC_INIT typedef INIT_ONCE once_flag; -typedef HANDLE thrd_t; +typedef struct thrd_win32 thrd_t; typedef CONDITION_VARIABLE cnd_t; typedef CRITICAL_SECTION mtx_t; typedef DWORD tss_t; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/include/re_types.h new/re-3.17.0/include/re_types.h --- old/re-3.16.0/include/re_types.h 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/include/re_types.h 2024-11-06 14:12:14.000000000 +0100 @@ -87,9 +87,6 @@ #define RE_BREAKPOINT #endif -/* Backwards compat */ -#define BREAKPOINT RE_BREAKPOINT - /* Error return/goto debug helpers */ #ifdef TRACE_ERR @@ -302,6 +299,30 @@ #define HAVE_RE_ARG 1 +#if defined(__clang__) +#define RE_ARG_SIZE(type) \ + _Generic((type), \ + bool: sizeof(int), \ + char: sizeof(int), \ + unsigned char: sizeof(unsigned int), \ + short: sizeof(int), \ + unsigned short: sizeof(unsigned int), \ + int: sizeof(int), \ + unsigned int: sizeof(unsigned int), \ + long: sizeof(long), \ + unsigned long: sizeof(unsigned long), \ + long long: sizeof(long long), \ + unsigned long long: sizeof(unsigned long long), \ + float: sizeof(double), \ + double: sizeof(double), \ + char const*: sizeof(char const *), \ + char*: sizeof(char *), \ + void const*: sizeof(void const *), \ + void*: sizeof(void *), \ + struct pl: sizeof(struct pl), \ + default: sizeof(void*) \ +) +#else /* GCC bit fields workaround */ #define RE_ARG_SIZE(type) \ _Generic((0)?(type):(type), \ bool: sizeof(int), \ @@ -324,6 +345,7 @@ struct pl: sizeof(struct pl), \ default: sizeof(void*) \ ) +#endif #define RE_ARG_0() 0 #define RE_ARG_1(expr) RE_ARG_SIZE(expr), (expr), 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/mk/Doxyfile new/re-3.17.0/mk/Doxyfile --- old/re-3.16.0/mk/Doxyfile 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/mk/Doxyfile 2024-11-06 14:12:14.000000000 +0100 @@ -4,7 +4,7 @@ # Project related configuration options #--------------------------------------------------------------------------- PROJECT_NAME = libre -PROJECT_NUMBER = 3.16.0 +PROJECT_NUMBER = 3.17.0 OUTPUT_DIRECTORY = ../re-dox CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/src/conf/conf.c new/re-3.17.0/src/conf/conf.c --- old/re-3.16.0/src/conf/conf.c 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/src/conf/conf.c 2024-11-06 14:12:14.000000000 +0100 @@ -253,6 +253,33 @@ /** + * Get the numeric floating point value of a configuration item + * + * @param conf Configuration object + * @param name Name of config item key + * @param num Returned numeric value of config item, if present + * + * @return 0 if success, otherwise errorcode + */ +int conf_get_float(const struct conf *conf, const char *name, double *num) +{ + struct pl opt; + int err; + + if (!conf || !name || !num) + return EINVAL; + + err = conf_get(conf, name, &opt); + if (err) + return err; + + *num = pl_float(&opt); + + return 0; +} + + +/** * Get the boolean value of a configuration item * * @param conf Configuration object diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/src/dns/client.c new/re-3.17.0/src/dns/client.c --- old/re-3.16.0/src/dns/client.c 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/src/dns/client.c 2024-11-06 14:12:14.000000000 +0100 @@ -974,10 +974,18 @@ struct dns_query *q = NULL; struct dnshdr hdr; int err = 0; + bool use_getaddrinfo = false; + bool srv_available = srvv && srvc && *srvc != 0; - if (!dnsc || !name || !srvv || !srvc || !(*srvc)) + if (!dnsc || !name) return EINVAL; + use_getaddrinfo = dnsc->conf.getaddrinfo && + (type == DNS_TYPE_A || type == DNS_TYPE_AAAA); + + if (!srv_available && !use_getaddrinfo) + return ENOTSUP; + if (DNS_QTYPE_AXFR == type) proto = IPPROTO_TCP; @@ -1029,8 +1037,7 @@ list_init(q->rrlv[i]); } - if (dnsc->conf.getaddrinfo && - (q->type == DNS_TYPE_A || q->type == DNS_TYPE_AAAA)) { + if (use_getaddrinfo) { err = query_getaddrinfo(q); if (err) goto error; @@ -1401,3 +1408,20 @@ return dnsc->conf.getaddrinfo; } + + +/** + * Return if getaddrinfo usage is enabled and exclusive, + * i.e. there are no DNS servers known explicitly + * + * @param dnsc DNS Client + * + * @return true if DNS servers are available, false otherwise + */ +bool dnsc_getaddrinfo_only(const struct dnsc *dnsc) +{ + if (!dnsc) + return false; + + return dnsc->conf.getaddrinfo && dnsc->srvc == 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/src/sip/request.c new/re-3.17.0/src/sip/request.c --- old/re-3.16.0/src/sip/request.c 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/src/sip/request.c 2024-11-06 14:12:14.000000000 +0100 @@ -727,6 +727,8 @@ { struct sa dst; int err; + bool addr_only = req->tp_selected && + dnsc_getaddrinfo_only(req->sip->dnsc); if (!sa_set_str(&dst, req->host, sip_transp_port(req->tp, route->port))) { @@ -737,7 +739,7 @@ return err; } } - else if (route->port) { + else if (route->port || addr_only){ req->port = sip_transp_port(req->tp, route->port); err = addr_lookup(req, req->host); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/src/thread/win32.c new/re-3.17.0/src/thread/win32.c --- old/re-3.16.0/src/thread/win32.c 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/src/thread/win32.c 2024-11-06 14:12:14.000000000 +0100 @@ -30,6 +30,7 @@ void *arg; }; + static int dtor_register(tss_t key, tss_dtor_t dtor) { int i; @@ -107,7 +108,8 @@ goto out; } - *thr = (thrd_t)handle; + thr->hdl = (HANDLE)handle; + thr->id = GetThreadId((HANDLE)handle); out: if (err) mem_deref(th); @@ -118,19 +120,22 @@ int thrd_equal(thrd_t lhs, thrd_t rhs) { - return GetThreadId(lhs) == GetThreadId(rhs); + return lhs.id == rhs.id; } thrd_t thrd_current(void) { - return GetCurrentThread(); + /* GetCurrentThread() returns only a pseudo handle and can not used + * within other threads */ + thrd_t t = {.hdl = GetCurrentThread(), .id = GetCurrentThreadId()}; + return t; } int thrd_detach(thrd_t thr) { - CloseHandle(thr); + CloseHandle(thr.hdl); return thrd_success; } @@ -139,19 +144,19 @@ { DWORD w, code; - w = WaitForSingleObject(thr, INFINITE); + w = WaitForSingleObject(thr.hdl, INFINITE); if (w != WAIT_OBJECT_0) return thrd_error; if (res) { - if (!GetExitCodeThread(thr, &code)) { - CloseHandle(thr); + if (!GetExitCodeThread(thr.hdl, &code)) { + CloseHandle(thr.hdl); return thrd_error; } *res = (int)code; } - CloseHandle(thr); + CloseHandle(thr.hdl); return thrd_success; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/src/tls/openssl/tls.c new/re-3.17.0/src/tls/openssl/tls.c --- old/re-3.16.0/src/tls/openssl/tls.c 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/src/tls/openssl/tls.c 2024-11-06 14:12:14.000000000 +0100 @@ -171,7 +171,7 @@ * * @return passes parameter ok unchanged */ -int tls_verify_handler(int ok, X509_STORE_CTX *ctx) +static int tls_verify_handler(int ok, X509_STORE_CTX *ctx) { int err, depth; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/src/tls/openssl/tls.h new/re-3.17.0/src/tls/openssl/tls.h --- old/re-3.16.0/src/tls/openssl/tls.h 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/src/tls/openssl/tls.h 2024-11-06 14:12:14.000000000 +0100 @@ -33,5 +33,4 @@ const struct list *tls_certs(const struct tls *tls); struct tls_cert *tls_cert_for_sni(const struct tls *tls, const char *sni); -int tls_verify_handler(int ok, X509_STORE_CTX *ctx); void tls_enable_sni(struct tls *tls); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/test/CMakeLists.txt new/re-3.17.0/test/CMakeLists.txt --- old/re-3.16.0/test/CMakeLists.txt 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/test/CMakeLists.txt 2024-11-06 14:12:14.000000000 +0100 @@ -44,7 +44,7 @@ -Wnested-externs -Wno-strict-aliasing -Wold-style-definition - -Wshadow -Waggregate-return + -Wshadow -Wstrict-prototypes -Wuninitialized -Wvla diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/test/conf.c new/re-3.17.0/test/conf.c --- old/re-3.16.0/test/conf.c 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/test/conf.c 2024-11-06 14:12:14.000000000 +0100 @@ -17,12 +17,14 @@ static const char *cfg = "string_val\trattarei\n" "u32_val 42\n" - "i32_val -23\n"; + "i32_val -23\n" + "float_val 1.5\n"; char str[256]; struct conf *conf; struct pl pl; uint32_t u32; int32_t i32; + double fl; int err; err = conf_alloc_buf(&conf, (uint8_t *)cfg, strlen(cfg)); @@ -42,6 +44,10 @@ TEST_ERR(err); TEST_EQUALS(-23, i32); + err = conf_get_float(conf, "float_val", &fl); + TEST_ERR(err); + TEST_EQUALS(1.5, fl); + /* Non-existing parameters */ if (0 == conf_get(conf, "rattarei", &pl)) goto badmsg; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/test/h264.c new/re-3.17.0/test/h264.c --- old/re-3.16.0/test/h264.c 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/test/h264.c 2024-11-06 14:12:14.000000000 +0100 @@ -698,10 +698,10 @@ } -static int test_h264_packet_base(const char *bs, bool long_startcode) +static int test_h264_packet_base(const char *bs, bool long_startcode, + size_t max_pktsize) { struct state state; - const size_t MAX_PKTSIZE = 8; int err; memset(&state, 0, sizeof(state)); @@ -717,7 +717,7 @@ if (!state.mb) return ENOMEM; - err = h264_packetize(DUMMY_TS, state.buf, state.len, MAX_PKTSIZE, + err = h264_packetize(DUMMY_TS, state.buf, state.len, max_pktsize, packet_handler, &state); if (err) goto out; @@ -748,12 +748,13 @@ int test_h264_packet(void) { + const size_t MAX_PKTSIZE = 8; int err; - err = test_h264_packet_base(bitstream, false); + err = test_h264_packet_base(bitstream, false, MAX_PKTSIZE); TEST_ERR(err); - err = test_h264_packet_base(bitstream_long, true); + err = test_h264_packet_base(bitstream_long, true, MAX_PKTSIZE); TEST_ERR(err); out: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re-3.16.0/test/thread.c new/re-3.17.0/test/thread.c --- old/re-3.16.0/test/thread.c 2024-10-02 08:39:09.000000000 +0200 +++ new/re-3.17.0/test/thread.c 2024-11-06 14:12:14.000000000 +0100 @@ -13,6 +13,17 @@ #include <re_dbg.h> +static int thread_equal(void *thrd) +{ + thrd_t t = *(thrd_t *)thrd; + + if (thrd_equal(t, thrd_current())) + return 0; + + return EINVAL; +} + + static int thread(void *id) { int n = *(int *)id; @@ -27,24 +38,37 @@ int test_thread(void) { thrd_t thr; + thrd_t thr_main = thrd_current(); int err; int id; err = thread_create_name(&thr, "test1", NULL, NULL); TEST_EQUALS(EINVAL, err); - id = 23; + id = 23; err = thread_create_name(&thr, "test2", thread, (void *)&id); TEST_ERR(err); thrd_join(thr, &err); TEST_EQUALS(thrd_error, err); - id = 42; + id = 42; err = thread_create_name(&thr, "test3", thread, (void *)&id); TEST_ERR(err); thrd_join(thr, &err); TEST_EQUALS(EPROTO, err); + err = thread_create_name(&thr, "test_not_equal", thread_equal, + &thr_main); + TEST_ERR(err); + thrd_join(thr, &err); + TEST_EQUALS(EINVAL, err); + + err = thread_create_name(&thr, "test_equal", thread_equal, &thr); + TEST_ERR(err); + TEST_EQUALS(0, thrd_equal(thr, thrd_current())); + thrd_join(thr, &err); + TEST_EQUALS(0, err); + err = 0; out: