Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package re for openSUSE:Factory checked in 
at 2025-11-21 16:55:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/re (Old)
 and      /work/SRC/openSUSE:Factory/.re.new.2061 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "re"

Fri Nov 21 16:55:14 2025 rev:17 rq:1318796 version:4.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/re/re.changes    2025-11-09 21:09:17.042613767 
+0100
+++ /work/SRC/openSUSE:Factory/.re.new.2061/re.changes  2025-11-21 
16:56:08.497003238 +0100
@@ -1,0 +2,6 @@
+Wed Nov 19 10:12:32 UTC 2025 - Martin Hauke <[email protected]>
+
+- Update to version 4.3.0
+  * https://github.com/baresip/re/releases/tag/v4.3.0
+
+-------------------------------------------------------------------

Old:
----
  re-4.2.0.tar.gz

New:
----
  re-4.3.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ re.spec ++++++
--- /var/tmp/diff_new_pack.2aupxy/_old  2025-11-21 16:56:10.769098983 +0100
+++ /var/tmp/diff_new_pack.2aupxy/_new  2025-11-21 16:56:10.777099320 +0100
@@ -17,10 +17,10 @@
 #
 
 
-%global sover   38
+%global sover   39
 %global libname lib%{name}%{sover}
 Name:           re
-Version:        4.2.0
+Version:        4.3.0
 Release:        0
 Summary:        Library for real-time communications with async I/O support
 License:        BSD-3-Clause

++++++ re-4.2.0.tar.gz -> re-4.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/.github/workflows/build.yml 
new/re-4.3.0/.github/workflows/build.yml
--- old/re-4.2.0/.github/workflows/build.yml    2025-10-14 12:49:28.000000000 
+0200
+++ new/re-4.3.0/.github/workflows/build.yml    2025-11-19 10:04:45.000000000 
+0100
@@ -15,15 +15,19 @@
     strategy:
       matrix:
         build_type: [Release, Debug]
-        compiler: [gcc, clang, gcc-14]
+        compiler: [gcc, clang, gcc-14, clang-21]
         os: [ubuntu-22.04, ubuntu-24.04, macos-latest]
         exclude:
           - os: macos-latest
             compiler: gcc
           - os: macos-latest
             compiler: gcc-14
+          - os: macos-latest
+            compiler: clang-21
           - os: ubuntu-22.04
             compiler: gcc-14
+          - os: ubuntu-22.04
+            compiler: clang-21
     env:
       CC: ${{ matrix.compiler }}
       CMAKE_GENERATOR: Ninja
@@ -50,6 +54,13 @@
       run: |
         sudo apt-get update && sudo apt-get install -y ninja-build
 
+    - name: Install clang
+      if: ${{ matrix.compiler == 'clang-21' }}
+      run: |
+        wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key 
add -
+        sudo add-apt-repository "deb http://apt.llvm.org/noble/ 
llvm-toolchain-noble-21 main"
+        sudo apt-get update && sudo apt-get install -y clang-21
+
     - name: make info
       run: |
         echo "OS: ${{ matrix.os }}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/.github/workflows/clang-analyze.yml 
new/re-4.3.0/.github/workflows/clang-analyze.yml
--- old/re-4.2.0/.github/workflows/clang-analyze.yml    2025-10-14 
12:49:28.000000000 +0200
+++ new/re-4.3.0/.github/workflows/clang-analyze.yml    2025-11-19 
10:04:45.000000000 +0100
@@ -23,10 +23,10 @@
     - name: Install clang-tools
       run: |
         wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key 
add -
-        sudo add-apt-repository "deb http://apt.llvm.org/noble/ 
llvm-toolchain-noble-20 main"
-        sudo apt-get update && sudo apt-get install -y clang-tools-20
+        sudo add-apt-repository "deb http://apt.llvm.org/noble/ 
llvm-toolchain-noble-21 main"
+        sudo apt-get update && sudo apt-get install -y clang-tools-21
 
     - name: analyze
       run: | 
-        cmake -B build -DCMAKE_C_COMPILER=clang-20
-        analyze-build-18 --cdb build/compile_commands.json --status-bugs -v
+        cmake -B build -DCMAKE_C_COMPILER=clang-21
+        analyze-build-21 --cdb build/compile_commands.json --status-bugs -v
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/.github/workflows/cmake_win.yml 
new/re-4.3.0/.github/workflows/cmake_win.yml
--- old/re-4.2.0/.github/workflows/cmake_win.yml        2025-10-14 
12:49:28.000000000 +0200
+++ new/re-4.3.0/.github/workflows/cmake_win.yml        2025-11-19 
10:04:45.000000000 +0100
@@ -24,7 +24,8 @@
             build: "Debug",
             openssl: true,
             disable_openssl: "OFF",
-            testing: true
+            testing: true,
+            c11_threads: "ON"
           }
         - {
             name: "Windows Release",
@@ -34,7 +35,8 @@
             build: "Release",
             openssl: true,
             disable_openssl: "OFF",
-            testing: true
+            testing: true,
+            c11_threads: "ON"
           }
         - {
             name: "Windows Debug 32-bit",
@@ -45,7 +47,8 @@
             openssl: false,
             disable_openssl: "ON",
             choco: "--x86",
-            testing: true
+            testing: true,
+            c11_threads: "OFF" # missing vcruntime library
           }
         - {
             name: "Windows Debug ARM64",
@@ -55,7 +58,8 @@
             build: "Debug",
             openssl: false,
             disable_openssl: "ON",
-            testing: false
+            testing: false,
+            c11_threads: "ON"
           }
 
     steps:
@@ -72,7 +76,7 @@
           call "${{ matrix.config.environment_script }}"
           cmake --version
           ninja --version
-          cmake -S . -B build -G "${{ matrix.config.generators }}" 
-DCMAKE_C_FLAGS="/WX" -DCMAKE_BUILD_TYPE=${{ matrix.config.build }} 
-DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL=${{ matrix.config.disable_openssl }}
+          cmake -S . -B build -G "${{ matrix.config.generators }}" 
-DCMAKE_C_FLAGS="/WX" -DHAVE_THREADS="${{ matrix.c11_threads }}" 
-DCMAKE_BUILD_TYPE="${{ matrix.config.build }}" 
-DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL="${{ matrix.config.disable_openssl }}"
           cmake --build build --parallel -t retest
 
       - name: retest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/CHANGELOG.md new/re-4.3.0/CHANGELOG.md
--- old/re-4.2.0/CHANGELOG.md   2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/CHANGELOG.md   2025-11-19 10:04:45.000000000 +0100
@@ -5,9 +5,35 @@
 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).
 
+## v4.3.0 - 2025-11-19
+
+### What's Changed
+* cmake: remove macOS include path by @mohd-akram in 
https://github.com/baresip/re/pull/1449
+* test: sort testcases in alphabetical order by @alfredh in 
https://github.com/baresip/re/pull/1447
+* test: increase coverage of websock test with protocol on/off by @alfredh in 
https://github.com/baresip/re/pull/1446
+* sdp/media: fix sdp_media_align_formats pt handling by @sreimers in 
https://github.com/baresip/re/pull/1450
+* dns: fix AAAA address comparison in getaddr_dup() by @alfredh in 
https://github.com/baresip/re/pull/1452
+* test: add support for IPv6 DNS testing by @alfredh in 
https://github.com/baresip/re/pull/1454
+* ci: add clang-21 by @sreimers in https://github.com/baresip/re/pull/1453
+* sys/fs: improve fs_fread error handling by @sreimers in 
https://github.com/baresip/re/pull/1455
+* test: compare DNS RR records data in order to increase test-coverage by 
@alfredh in https://github.com/baresip/re/pull/1458
+* dns: correct comment in dnsc_query_srv() by @alfredh in 
https://github.com/baresip/re/pull/1457
+* h265: Fix NAL Decode nuh_layer_id by @xiaokuang95 in 
https://github.com/baresip/re/pull/1456
+* auframe: avoid auframe_bytes_to_ms division by zero by @sreimers in 
https://github.com/baresip/re/pull/1459
+* aumix: add aumix_latency and new defaults by @sreimers in 
https://github.com/baresip/re/pull/1461
+* dns: remove get_android_dns() by @alfredh in 
https://github.com/baresip/re/pull/1464
+* test: add testing of DNS nameservers by @alfredh in 
https://github.com/baresip/re/pull/1462
+* cmake/re-config: fix HAVE_THREADS discovery by @sreimers in 
https://github.com/baresip/re/pull/1466
+
+### New Contributors
+* @mohd-akram made their first contribution in 
https://github.com/baresip/re/pull/1449
+* @xiaokuang95 made their first contribution in 
https://github.com/baresip/re/pull/1456
+
+**Full Changelog**: https://github.com/baresip/re/compare/v4.2.0...v4.3.0
+
 ## v4.2.0 - 2025-10-15
 
-## What's Changed
+### What's Changed
 * test: add testcode for btrace module by @alfredh in 
https://github.com/baresip/re/pull/1414
 * types: add ETIME fallback by @sreimers in 
https://github.com/baresip/re/pull/1420
 * test: add testing of conf_get_bool() by @alfredh in 
https://github.com/baresip/re/pull/1419
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/CMakeLists.txt new/re-4.3.0/CMakeLists.txt
--- old/re-4.2.0/CMakeLists.txt 2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/CMakeLists.txt 2025-11-19 10:04:45.000000000 +0100
@@ -14,13 +14,13 @@
 cmake_minimum_required(VERSION 3.18...4.0)
 
 project(re
-  VERSION 4.2.0
+  VERSION 4.3.0
   LANGUAGES C
   HOMEPAGE_URL https://github.com/baresip/re
   DESCRIPTION "Generic library for real-time communications"
 )
 
-set(PROJECT_SOVERSION 38) # bump if ABI breaks
+set(PROJECT_SOVERSION 39) # bump if ABI breaks
 
 # Pre-release identifier, comment out on a release
 # Increment for breaking changes (dev2, dev3...)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/cmake/re-config.cmake 
new/re-4.3.0/cmake/re-config.cmake
--- old/re-4.2.0/cmake/re-config.cmake  2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/cmake/re-config.cmake  2025-11-19 10:04:45.000000000 +0100
@@ -80,7 +80,7 @@
 check_function_exists(thrd_create HAVE_THREADS_FUN)
 check_include_file(threads.h HAVE_THREADS_H)
 if(HAVE_THREADS_FUN AND HAVE_THREADS_H)
-  set(HAVE_THREADS CACHE BOOL true)
+  set(HAVE_THREADS ON CACHE BOOL "HAVE C11 Threads")
 endif()
 if(HAVE_THREADS)
   list(APPEND RE_DEFINITIONS HAVE_THREADS)
@@ -214,7 +214,6 @@
 
 if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
   list(APPEND RE_DEFINITIONS DARWIN)
-  include_directories(/opt/local/include)
 elseif(${CMAKE_SYSTEM_NAME} MATCHES "iOS")
   list(APPEND RE_DEFINITIONS DARWIN)
 elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/include/re_h265.h 
new/re-4.3.0/include/re_h265.h
--- old/re-4.2.0/include/re_h265.h      2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/include/re_h265.h      2025-11-19 10:04:45.000000000 +0100
@@ -53,6 +53,7 @@
 
 struct h265_nal {
        unsigned nal_unit_type:6;          /* NAL unit type (0-40)       */
+       unsigned nuh_layer_id:6;           /* layer identifier           */
        unsigned nuh_temporal_id_plus1:3;  /* temporal identifier plus 1 */
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/include/re_types.h 
new/re-4.3.0/include/re_types.h
--- old/re-4.2.0/include/re_types.h     2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/include/re_types.h     2025-11-19 10:04:45.000000000 +0100
@@ -248,6 +248,17 @@
 #define unlikely(x) x
 #endif
 
+/*
+ * https://clang.llvm.org/docs/AttributeReference.html#nonstring
+ */
+#define re_nonstring
+#ifdef __GNUC__
+#if __has_attribute(nonstring)
+#undef re_nonstring
+#define re_nonstring __attribute__((nonstring))
+#endif
+#endif
+
 #ifdef WIN32
 #define re_restrict __restrict
 #else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/include/rem_auframe.h 
new/re-4.3.0/include/rem_auframe.h
--- old/re-4.2.0/include/rem_auframe.h  2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/include/rem_auframe.h  2025-11-19 10:04:45.000000000 +0100
@@ -47,3 +47,4 @@
 double auframe_level(struct auframe *af);
 uint64_t auframe_bytes_to_timestamp(const struct auframe *af, size_t n);
 uint64_t auframe_bytes_to_ms(const struct auframe *af, size_t n);
+size_t auframe_ms_to_bytes(const struct auframe *af, uint16_t ms);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/include/rem_aumix.h 
new/re-4.3.0/include/rem_aumix.h
--- old/re-4.2.0/include/rem_aumix.h    2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/include/rem_aumix.h    2025-11-19 10:04:45.000000000 +0100
@@ -20,6 +20,7 @@
 
 int aumix_alloc(struct aumix **mixp, uint32_t srate,
                uint8_t ch, uint32_t ptime);
+void aumix_latency(struct aumix *mix, uint16_t min, uint16_t max);
 void aumix_recordh(struct aumix *mix, aumix_record_h *recordh);
 void aumix_record_sumh(struct aumix *mix, aumix_record_h *recordh);
 int aumix_playfile(struct aumix *mix, const char *filepath);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/mk/Doxyfile new/re-4.3.0/mk/Doxyfile
--- old/re-4.2.0/mk/Doxyfile    2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/mk/Doxyfile    2025-11-19 10:04:45.000000000 +0100
@@ -4,7 +4,7 @@
 # Project related configuration options
 #---------------------------------------------------------------------------
 PROJECT_NAME           = libre
-PROJECT_NUMBER         = 4.2.0
+PROJECT_NUMBER         = 4.3.0
 OUTPUT_DIRECTORY       = ../re-dox
 CREATE_SUBDIRS         = NO
 OUTPUT_LANGUAGE        = English
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/rem/auframe/auframe.c 
new/re-4.3.0/rem/auframe/auframe.c
--- old/re-4.2.0/rem/auframe/auframe.c  2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/rem/auframe/auframe.c  2025-11-19 10:04:45.000000000 +0100
@@ -120,5 +120,15 @@
 {
        size_t sample_size = aufmt_sample_size(af->fmt);
 
+       if (!af->srate || !af->ch || !sample_size)
+               return 0;
+
        return ((uint64_t)n * 1000) / (af->srate * af->ch * sample_size);
 }
+
+
+size_t auframe_ms_to_bytes(const struct auframe *af, uint16_t ms)
+{
+       return aufmt_sample_size(af->fmt) *
+              au_calc_nsamp(af->srate, af->ch, ms);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/rem/aumix/aumix.c 
new/re-4.3.0/rem/aumix/aumix.c
--- old/re-4.2.0/rem/aumix/aumix.c      2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/rem/aumix/aumix.c      2025-11-19 10:04:45.000000000 +0100
@@ -30,6 +30,10 @@
        uint32_t frame_size;
        uint32_t srate;
        uint8_t ch;
+       struct {
+               uint16_t min;
+               uint16_t max;
+       } latency;
        aumix_record_h *recordh;
        aumix_record_h *record_sumh;
        struct auframe rec_sum;
@@ -278,11 +282,13 @@
        if (!mix)
                return ENOMEM;
 
-       mix->ptime      = ptime;
-       mix->frame_size = srate * ch * ptime / 1000;
-       mix->srate      = srate;
-       mix->ch         = ch;
-       mix->recordh    = NULL;
+       mix->ptime       = ptime;
+       mix->frame_size  = srate * ch * ptime / 1000;
+       mix->srate       = srate;
+       mix->ch          = ch;
+       mix->recordh     = NULL;
+       mix->latency.min = 60;  /* ms */
+       mix->latency.max = 200; /* ms */
 
        mix->rec_sum.ch   = ch;
        mix->rec_sum.srate = srate;
@@ -318,6 +324,25 @@
 
 
 /**
+ * Set aumix aubuf default latency
+ *
+ * @param mix  Audio mixer
+ * @param min  Minimum value in [ms]
+ * @param max  Maximum value in [ms]
+ */
+void aumix_latency(struct aumix *mix, uint16_t min, uint16_t max)
+{
+       if (!mix)
+               return;
+
+       mtx_lock(mix->mutex);
+       mix->latency.min = min;
+       mix->latency.max = max;
+       mtx_unlock(mix->mutex);
+}
+
+
+/**
  * Add multitrack record handler (each source can be identified by auframe->id)
  *
  * @param mix      Audio mixer
@@ -447,7 +472,9 @@
        auframe_init(&src->af, AUFMT_S16LE, src->frame, mix->frame_size,
                     mix->srate, mix->ch);
 
-       err = aubuf_alloc(&src->aubuf, sz * 6, sz * 12);
+       err = aubuf_alloc(&src->aubuf,
+                         auframe_ms_to_bytes(&src->af, mix->latency.min),
+                         auframe_ms_to_bytes(&src->af, mix->latency.max));
        if (err)
                goto out;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/src/dns/client.c 
new/re-4.3.0/src/dns/client.c
--- old/re-4.2.0/src/dns/client.c       2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/src/dns/client.c       2025-11-19 10:04:45.000000000 +0100
@@ -788,7 +788,7 @@
        }
 
        if (r1->type == DNS_TYPE_AAAA && r2->type == DNS_TYPE_AAAA) {
-               if (r1->rdata.aaaa.addr == r2->rdata.aaaa.addr)
+               if (0 == memcmp(r1->rdata.aaaa.addr, r2->rdata.aaaa.addr, 16))
                        return true;
        }
 
@@ -1137,7 +1137,7 @@
 
 
 /**
- * Query a DNS name SRV record
+ * Query a DNS name using specific nameservers
  *
  * @param qp       Pointer to allocated DNS query
  * @param dnsc     DNS Client
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/src/dns/ns.c new/re-4.3.0/src/dns/ns.c
--- old/re-4.2.0/src/dns/ns.c   2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/src/dns/ns.c   2025-11-19 10:04:45.000000000 +0100
@@ -11,9 +11,6 @@
 #include <re_sa.h>
 #include <re_dns.h>
 #include "dns.h"
-#ifdef __ANDROID__
-#include <sys/system_properties.h>
-#endif
 
 
 #define DEBUG_MODULE "ns"
@@ -79,33 +76,6 @@
 }
 
 
-#ifdef __ANDROID__
-static int get_android_dns(struct sa *nsv, uint32_t *n)
-{
-       char prop[PROP_NAME_MAX] = {0}, value[PROP_VALUE_MAX] = {0};
-       uint32_t i, count = 0;
-       int err;
-
-       for (i=0; i<*n; i++) {
-               re_snprintf(prop, sizeof(prop), "net.dns%u", 1+i);
-
-               if (__system_property_get(prop, value)) {
-
-                       err = sa_set_str(&nsv[count], value, DNS_PORT);
-                       if (!err)
-                               ++count;
-               }
-       }
-       if (count == 0)
-               return ENOENT;
-
-       *n = count;
-
-       return 0;
-}
-#endif
-
-
 /**
  * Get the DNS domain and nameservers
  *
@@ -142,9 +112,5 @@
        err = get_windns(domain, dsize, srvv, n);
 #endif
 
-#ifdef __ANDROID__
-       err = get_android_dns(srvv, n);
-#endif
-
        return err;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/src/h265/nal.c new/re-4.3.0/src/h265/nal.c
--- old/re-4.2.0/src/h265/nal.c 2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/src/h265/nal.c 2025-11-19 10:04:45.000000000 +0100
@@ -34,24 +34,19 @@
 int h265_nal_decode(struct h265_nal *nal, const uint8_t *p)
 {
        bool forbidden_zero_bit;
-       unsigned nuh_layer_id;
 
        if (!nal || !p)
                return EINVAL;
 
        forbidden_zero_bit         = p[0] >> 7;
        nal->nal_unit_type         = (p[0] >> 1) & 0x3f;
-       nuh_layer_id               = (p[0]&1)<<5 | p[1] >> 3;
+       nal->nuh_layer_id          = (p[0]&1)<<5 | p[1] >> 3;
        nal->nuh_temporal_id_plus1 = p[1] & 0x07;
 
        if (forbidden_zero_bit) {
                re_fprintf(stderr, "h265: nal_decode: FORBIDDEN bit set\n");
                return EBADMSG;
        }
-       if (nuh_layer_id != 0) {
-               re_fprintf(stderr, "h265: nal_decode: LayerId MUST be zero\n");
-               return EBADMSG;
-       }
 
        return 0;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/src/sdp/media.c new/re-4.3.0/src/sdp/media.c
--- old/re-4.2.0/src/sdp/media.c        2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/src/sdp/media.c        2025-11-19 10:04:45.000000000 +0100
@@ -273,11 +273,11 @@
                lfmt->sup = false;
        }
 
-       rle = m->rfmtl.head;
+       rle = m->rfmtl.tail;
 
        while (rle) {
                rfmt = rle->data;
-               rle  = rle->next;
+               rle = rle->prev;
 
                for (lle=m->lfmtl.head; lle; lle=lle->next) {
 
@@ -317,7 +317,7 @@
                        lfmt->pt = atoi(lfmt->id ? lfmt->id : "");
 
                        list_unlink(&lfmt->le);
-                       list_append(&m->lfmtl, &lfmt->le, lfmt);
+                       list_prepend(&m->lfmtl, &lfmt->le, lfmt);
                        if (lfmt->pt > pt_offer)
                                pt_offer = lfmt->pt;
                }
@@ -325,7 +325,6 @@
 
        /* Recalculate pt and reorder unsupported codecs */
        if (offer) {
-
                for (lle = m->lfmtl.tail; lle;) {
 
                        lfmt = lle->data;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/src/sys/fs.c new/re-4.3.0/src/sys/fs.c
--- old/re-4.2.0/src/sys/fs.c   2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/src/sys/fs.c   2025-11-19 10:04:45.000000000 +0100
@@ -288,19 +288,25 @@
                        goto out;
 
                err = mbuf_write_mem(mb, buf, n);
-               if (err) {
-                       DEBUG_WARNING("Error reading file '%s' (%m)\n",
-                               path, err);
+               if (err)
+                       goto out;
+
+               /* EOF */
+               if (n < MINBUF_SIZE)
                        goto out;
-               }
        }
 
 out:
+       if (!err && ferror(f))
+               err = EIO;
+
        fclose(f);
 
        mem_deref(buf);
-       if (err)
+       if (err) {
+               DEBUG_WARNING("Error reading file '%s' (%m)\n", path, err);
                mem_deref(mb);
+       }
        else
                *mbp = mb;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/test/dns.c new/re-4.3.0/test/dns.c
--- old/re-4.2.0/test/dns.c     2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/test/dns.c     2025-11-19 10:04:45.000000000 +0100
@@ -222,7 +222,7 @@
                if (err)
                        break;
 
-               if (!dns_rr_cmp(rr, rr2, false)) {
+               if (!dns_rr_cmp(rr, rr2, true)) {
                        (void)re_fprintf(stderr,
                                         "dns_rr:\nrr:  %02w\n\nrr2: %02w\n",
                                         rr, sizeof(*rr), rr2, sizeof(*rr2));
@@ -367,7 +367,7 @@
 }
 
 
-int test_dns_integration(void)
+static int test_dns_integration_param(const char *laddr)
 {
        struct dns_server *srv = NULL;
        struct test_dns data = {0};
@@ -375,7 +375,7 @@
        int err;
 
        /* Setup Mocking DNS Server */
-       err = dns_server_alloc(&srv, false);
+       err = dns_server_alloc(&srv, laddr, false);
        TEST_ERR(err);
 
        err = dns_server_add_a(srv, "test1.example.net", IP_127_0_0_1, 1);
@@ -459,3 +459,39 @@
 
        return err;
 }
+
+
+int test_dns_integration(void)
+{
+       int err;
+
+       err = test_dns_integration_param("127.0.0.1");
+       TEST_ERR(err);
+
+       if (test_ipv6_supported()) {
+               err = test_dns_integration_param("::1");
+               TEST_ERR(err);
+       }
+
+ out:
+       return err;
+}
+
+
+int test_dns_nameservers(void)
+{
+       struct sa srvv[8];
+       uint32_t srvc = RE_ARRAY_SIZE(srvv);
+
+       int err = dns_srv_get(NULL, 0, srvv, &srvc);
+       TEST_ERR(err);
+
+       ASSERT_TRUE(srvc >= 1);
+
+       for (uint32_t i=0; i<srvc; i++) {
+               ASSERT_TRUE(sa_isset(&srvv[i], SA_ALL));
+       }
+
+ out:
+       return err;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/test/http.c new/re-4.3.0/test/http.c
--- old/re-4.2.0/test/http.c    2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/test/http.c    2025-11-19 10:04:45.000000000 +0100
@@ -463,7 +463,7 @@
 
        if (dns_srv_query) {
                /* Setup Mocking DNS Server */
-               err = dns_server_alloc(&dns_srv, false);
+               err = dns_server_alloc(&dns_srv, "127.0.0.1", false);
                TEST_ERR(err);
 
                err = dns_server_add_a(dns_srv, "test1.example.net",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/test/httpauth.c new/re-4.3.0/test/httpauth.c
--- old/re-4.2.0/test/httpauth.c        2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/test/httpauth.c        2025-11-19 10:04:45.000000000 +0100
@@ -153,7 +153,7 @@
                const char *hval;
                struct httpauth_digest_resp resp;
                struct pl method;
-               uint8_t ha1[MD5_SIZE];
+               re_nonstring uint8_t ha1[MD5_SIZE];
                int err;
        } testv[] = {
                {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/test/mock/dnssrv.c 
new/re-4.3.0/test/mock/dnssrv.c
--- old/re-4.2.0/test/mock/dnssrv.c     2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/test/mock/dnssrv.c     2025-11-19 10:04:45.000000000 +0100
@@ -143,7 +143,7 @@
 }
 
 
-int dns_server_alloc(struct dns_server **srvp, bool rotate)
+int dns_server_alloc(struct dns_server **srvp, const char *laddr, bool rotate)
 {
        struct dns_server *srv;
        int err;
@@ -155,7 +155,7 @@
        if (!srv)
                return ENOMEM;
 
-       err = sa_set_str(&srv->addr, "127.0.0.1", LOCAL_PORT);
+       err = sa_set_str(&srv->addr, laddr, LOCAL_PORT);
        if (err)
                goto out;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/test/sdp.c new/re-4.3.0/test/sdp.c
--- old/re-4.2.0/test/sdp.c     2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/test/sdp.c     2025-11-19 10:04:45.000000000 +0100
@@ -473,7 +473,7 @@
        if (!sdp_cmp(mba, answer)) {
                DEBUG_WARNING("answer failed:\n%b", mba->buf, mba->end);
                err = EBADMSG;
-               goto out;
+               TEST_ERR(err);
        }
 
        err = sdp_decode(oa->alice, mba, false);
@@ -985,6 +985,7 @@
 struct fixture {
        struct sdp_session *sess;
        struct sdp_media *audio;
+       struct sdp_media *video;
 };
 
 struct attr {
@@ -997,6 +998,7 @@
        const char *name;
        uint32_t srate;
        uint8_t ch;
+       bool audio;
 };
 
 struct args {
@@ -1045,12 +1047,31 @@
        for (size_t i=0; i<codecc; i++) {
                const struct codec *codec = &codecv[i];
 
+               if (!codec->audio)
+                       continue;
+
                err = sdp_format_add(NULL, fix->audio, false, codec->id,
                                     codec->name, codec->srate, codec->ch,
                                     NULL, NULL, NULL, false, NULL);
                TEST_ERR(err);
        }
 
+       err = sdp_media_add(&fix->video, fix->sess, "video",
+                           10, "RTP/AVP");
+       TEST_ERR(err);
+
+       for (size_t i=0; i<codecc; i++) {
+               const struct codec *codec = &codecv[i];
+
+               if (codec->audio)
+                       continue;
+
+               err = sdp_format_add(NULL, fix->video, false, codec->id,
+                                    codec->name, codec->srate, codec->ch,
+                                    NULL, NULL, NULL, false, NULL);
+               TEST_ERR(err);
+       }
+
  out:
        return err;
 }
@@ -1131,8 +1152,14 @@
 
        TEST_STRCMP_LEN("UDP/TLS/RTP/SAVPF", sdp_media_proto(fix.audio));
 
-       const struct sdp_format *format = sdp_media_rformat(fix.audio, NULL);
-       TEST_STRCMP_LEN("opus", format->name);
+       const struct sdp_format *audio_fmt =
+               sdp_media_rformat(fix.audio, NULL);
+       TEST_STRCMP_LEN("opus", audio_fmt->name);
+
+       const struct sdp_format *video_fmt =
+               sdp_media_lformat(fix.video, 102);
+       TEST_ASSERT(video_fmt);
+       TEST_STRCMP_LEN("H264", video_fmt->name);
 
  out:
        fixture_close(&fix);
@@ -1190,6 +1217,56 @@
        "a=ssrc:2161565476 cname:P6e47zI3iVPviKRL\r\n"
        "a=ssrc:2161565476 msid:2a30d377-cd13-4454-974c-0144db0118a6"
          " c061a2b9-95bc-45fb-9e5d-6df08d8e1d0f\r\n"
+       "m=video 29942 RTP/AVP 102 104 106 108 127 112 116\r\n"
+       "b=AS:3072\r\n"
+       "a=rtpmap:102 H264/90000\r\n"
+       "a=fmtp:102 level-asymmetry-allowed=1;"
+         "packetization-mode=1;profile-level-id=42001f\r\n"
+       "a=rtpmap:104 H264/90000\r\n"
+       "a=fmtp:104 level-asymmetry-allowed=1;"
+         "packetization-mode=0;profile-level-id=42001f\r\n"
+       "a=rtpmap:106 H264/90000\r\n"
+       "a=fmtp:106 level-asymmetry-allowed=1;"
+         "packetization-mode=1;profile-level-id=42e01f\r\n"
+       "a=rtpmap:108 H264/90000\r\n"
+       "a=fmtp:108 level-asymmetry-allowed=1;"
+         "packetization-mode=0;profile-level-id=42e01f\r\n"
+       "a=rtpmap:127 H264/90000\r\n"
+       "a=fmtp:127 level-asymmetry-allowed=1;"
+         "packetization-mode=1;profile-level-id=4d001f\r\n"
+       "a=rtpmap:112 H264/90000\r\n"
+       "a=fmtp:112 level-asymmetry-allowed=1;"
+         "packetization-mode=1;profile-level-id=64001f\r\n"
+       "a=rtpmap:116 H265/90000\r\n"
+       "a=fmtp:116 level-id=93;profile-id=1;tier-flag=0;tx-mode=SRST\r\n"
+       "a=rtcp-fb:102 ccm fir\r\n"
+       "a=rtcp-fb:102 ccm tmmbr\r\n"
+       "a=rtcp-fb:102 nack\r\n"
+       "a=rtcp-fb:102 nack pli\r\n"
+       "a=rtcp-fb:104 ccm fir\r\n"
+       "a=rtcp-fb:104 ccm tmmbr\r\n"
+       "a=rtcp-fb:104 nack\r\n"
+       "a=rtcp-fb:104 nack pli\r\n"
+       "a=rtcp-fb:106 ccm fir\r\n"
+       "a=rtcp-fb:106 ccm tmmbr\r\n"
+       "a=rtcp-fb:106 nack\r\n"
+       "a=rtcp-fb:106 nack pli\r\n"
+       "a=rtcp-fb:108 ccm fir\r\n"
+       "a=rtcp-fb:108 ccm tmmbr\r\n"
+       "a=rtcp-fb:108 nack\r\n"
+       "a=rtcp-fb:108 nack pli\r\n"
+       "a=rtcp-fb:127 ccm fir\r\n"
+       "a=rtcp-fb:127 ccm tmmbr\r\n"
+       "a=rtcp-fb:127 nack\r\n"
+       "a=rtcp-fb:127 nack pli\r\n"
+       "a=rtcp-fb:112 ccm fir\r\n"
+       "a=rtcp-fb:112 ccm tmmbr\r\n"
+       "a=rtcp-fb:112 nack\r\n"
+       "a=rtcp-fb:112 nack pli\r\n"
+       "a=rtcp-fb:116 ccm fir\r\n"
+       "a=rtcp-fb:116 ccm tmmbr\r\n"
+       "a=rtcp-fb:116 nack\r\n"
+       "a=rtcp-fb:116 nack pli\r\n"
        ;
 
        static const struct attr session_attrv[] = {
@@ -1227,14 +1304,15 @@
 
        static const struct codec codecv[] = {
 
-               {  NULL, "opus",            48000, 2},
-               {  "63", "red",             48000, 2},
-               {   "9", "G722",             8000, 1},
-               {   "0", "PCMU",             8000, 1},
-               {   "8", "PCMA",             8000, 1},
-               {  "13", "CN",               8000, 1},
-               { "110", "telephone-event", 48000, 1},
-               { "126", "telephone-event",  8000, 1},
+               {  NULL, "opus",            48000, 2, true},
+               {  "63", "red",             48000, 2, true},
+               {   "9", "G722",             8000, 1, true},
+               {   "0", "PCMU",             8000, 1, true},
+               {   "8", "PCMA",             8000, 1, true},
+               {  "13", "CN",               8000, 1, true},
+               { "110", "telephone-event", 48000, 1, true},
+               { "126", "telephone-event",  8000, 1, true},
+               { "150", "H264",            90000, 1, false},
        };
 
        int err;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/test/srtp.c new/re-4.3.0/test/srtp.c
--- old/re-4.2.0/test/srtp.c    2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/test/srtp.c    2025-11-19 10:04:45.000000000 +0100
@@ -525,12 +525,12 @@
 {
        uint8_t pkt[12+20+10];
        struct srtp *srtp_enc = NULL;
-       static const uint8_t mast_key[16+14] =
+       re_nonstring static const uint8_t mast_key[16+14] =
                "\x22\x22\x22\x22\x22\x22\x22\x22"
                "\x22\x22\x22\x22\x22\x22\x22\x22"
                "\x44\x44\x44\x44\x44\x44\x44"
                "\x44\x44\x44\x44\x44\x44\x44";
-       static const uint8_t rtp_payload[20] =
+       re_nonstring static const uint8_t rtp_payload[20] =
                "\xa5\xa5\xa5\xa5\xa5\xa5\xa5\xa5\xa5\xa5"
                "\xa5\xa5\xa5\xa5\xa5\xa5\xa5\xa5\xa5\xa5";
        struct mbuf *mb;
@@ -595,7 +595,7 @@
 {
        uint8_t pkt[12+4+4];
        struct srtp *srtp_enc = NULL;
-       static const uint8_t mast_key[16+14] =
+       re_nonstring static const uint8_t mast_key[16+14] =
                "\x22\x22\x22\x22\x22\x22\x22\x22"
                "\x22\x22\x22\x22\x22\x22\x22\x22"
                "\x44\x44\x44\x44\x44\x44\x44"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/test/test.c new/re-4.3.0/test/test.c
--- old/re-4.2.0/test/test.c    2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/test/test.c    2025-11-19 10:04:45.000000000 +0100
@@ -52,15 +52,14 @@
        TEST(test_aac),
        TEST(test_aes),
        TEST(test_aes_gcm),
+       TEST(test_async),
        TEST(test_au),
        TEST(test_aubuf),
        TEST(test_aulength),
        TEST(test_aulevel),
        TEST(test_auposition),
        TEST(test_auresamp),
-       TEST(test_async),
        TEST(test_av1),
-       TEST(test_dd),
        TEST(test_base64),
        TEST(test_bfcp),
        TEST(test_bfcp_bin),
@@ -69,9 +68,10 @@
        TEST(test_btrace),
        TEST(test_conf),
        TEST(test_crc32),
+       TEST(test_dd),
+       TEST(test_dns_dname),
        TEST(test_dns_hdr),
        TEST(test_dns_rr),
-       TEST(test_dns_dname),
        TEST(test_dsp),
 #ifdef USE_TLS
        TEST(test_dtls),
@@ -105,18 +105,18 @@
        TEST(test_g711_alaw),
        TEST(test_g711_ulaw),
        TEST(test_h264),
-       TEST(test_h264_sps),
        TEST(test_h264_packet),
+       TEST(test_h264_sps),
        TEST(test_h265),
        TEST(test_h265_packet),
        TEST(test_hash),
        TEST(test_hmac_sha1),
        TEST(test_hmac_sha256),
        TEST(test_http),
-       TEST(test_http_loop),
-       TEST(test_http_large_body),
        TEST(test_http_conn),
        TEST(test_http_conn_large_body),
+       TEST(test_http_large_body),
+       TEST(test_http_loop),
 #ifdef USE_TLS
        TEST(test_https_loop),
        TEST(test_http_client_set_tls),
@@ -196,37 +196,37 @@
 #ifdef USE_TLS
        TEST(test_sip_transp_add_client_cert),
 #endif
+       TEST(test_fmt_trim),
        TEST(test_sipevent),
        TEST(test_sipsess),
-       TEST(test_sipsess_reject),
-       TEST(test_sipsess_blind_transfer),
-       TEST(test_sipsess_100rel_caller_require),
-       TEST(test_sipsess_100rel_supported),
-       TEST(test_sipsess_100rel_answer_not_allowed),
        TEST(test_sipsess_100rel_420),
        TEST(test_sipsess_100rel_421),
+       TEST(test_sipsess_100rel_answer_not_allowed),
+       TEST(test_sipsess_100rel_caller_require),
+       TEST(test_sipsess_100rel_supported),
+       TEST(test_sipsess_blind_transfer),
+       TEST(test_sipsess_reject),
+       TEST(test_sipsess_update_no_sdp),
        TEST(test_sipsess_update_uac),
        TEST(test_sipsess_update_uas),
-       TEST(test_sipsess_update_no_sdp),
-       TEST(test_srtp),
        TEST(test_srtcp),
-       TEST(test_srtp_gcm),
        TEST(test_srtcp_gcm),
+       TEST(test_srtp),
+       TEST(test_srtp_gcm),
+       TEST(test_stun),
        TEST(test_stun_req),
-       TEST(test_stun_resp),
        TEST(test_stun_reqltc),
-       TEST(test_stun),
+       TEST(test_stun_resp),
        TEST(test_sys_endian),
-       TEST(test_sys_rand),
+       TEST(test_sys_fs_fopen),
        TEST(test_sys_fs_isdir),
        TEST(test_sys_fs_isfile),
-       TEST(test_sys_fs_fopen),
        TEST(test_sys_getenv),
+       TEST(test_sys_rand),
        TEST(test_tcp),
        TEST(test_tcp_tos),
        TEST(test_telev),
        TEST(test_text2pcap),
-       TEST(test_fmt_trim),
 #ifdef USE_TLS
        TEST(test_tls),
        TEST(test_tls_ec),
@@ -237,6 +237,9 @@
        TEST(test_tls_session_reuse_tls_v12),
        TEST(test_tls_sni),
 #endif
+       TEST(test_thread),
+       TEST(test_thread_tss),
+       TEST(test_trace),
        TEST(test_trice_cand),
        TEST(test_trice_candpair),
        TEST(test_trice_checklist),
@@ -249,18 +252,15 @@
        TEST(test_unixsock),
        TEST(test_uri),
        TEST(test_uri_encode),
+       TEST(test_uri_escape),
        TEST(test_uri_headers),
-       TEST(test_uri_user),
        TEST(test_uri_params_headers),
-       TEST(test_uri_escape),
+       TEST(test_uri_user),
        TEST(test_vid),
        TEST(test_vidconv),
-       TEST(test_vidconv_scaling),
        TEST(test_vidconv_pixel_formats),
+       TEST(test_vidconv_scaling),
        TEST(test_websock),
-       TEST(test_trace),
-       TEST(test_thread),
-       TEST(test_thread_tss),
 
 #ifdef USE_TLS
        /* combination tests: */
@@ -273,6 +273,7 @@
        TEST(test_dns_cache_http_integration),
        TEST(test_dns_http_integration),
        TEST(test_dns_integration),
+       TEST(test_dns_nameservers),
        TEST(test_net_dst_source_addr_get),
        TEST(test_rtp_listen),
        TEST(test_sip_drequestf_network),
@@ -316,8 +317,13 @@
 #endif
 
        int fd_out = open("stdout.out", O_WRONLY | O_CREAT, mode);
-       int fd_err = open("stderr.out", O_WRONLY | O_CREAT, mode);
+       if (fd_out < 0)
+               return;
        (void)dup2(fd_out, fileno(stdout));
+
+       int fd_err = open("stderr.out", O_WRONLY | O_CREAT, mode);
+       if (fd_err < 0)
+               return;
        (void)dup2(fd_err, fileno(stderr));
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/test/test.h new/re-4.3.0/test/test.h
--- old/re-4.2.0/test/test.h    2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/test/test.h    2025-11-19 10:04:45.000000000 +0100
@@ -178,6 +178,7 @@
 int test_dns_integration(void);
 int test_dns_rr(void);
 int test_dns_dname(void);
+int test_dns_nameservers(void);
 int test_dsp(void);
 int test_dtmf(void);
 int test_fir(void);
@@ -534,7 +535,7 @@
        bool rotate;
 };
 
-int dns_server_alloc(struct dns_server **srvp, bool rotate);
+int dns_server_alloc(struct dns_server **srvp, const char *laddr, bool rotate);
 int dns_server_add_a(struct dns_server *srv, const char *name, uint32_t addr,
                     int64_t ttl);
 int dns_server_add_aaaa(struct dns_server *srv, const char *name,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/test/tls.c new/re-4.3.0/test/tls.c
--- old/re-4.2.0/test/tls.c     2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/test/tls.c     2025-11-19 10:04:45.000000000 +0100
@@ -371,7 +371,7 @@
 int test_tls_certificate(void)
 {
        struct tls *tls = NULL;
-       static const uint8_t test_fingerprint[32] =
+       re_nonstring static const uint8_t test_fingerprint[32] =
                "\x50\x5d\x95\x2b\xef\x5b\x6f\x7f"
                "\x2b\x4a\xa8\x1b\xdd\xe1\x99\xfd"
                "\x4e\xb5\xc1\x04\xe7\x67\xa7\x48"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/re-4.2.0/test/websock.c new/re-4.3.0/test/websock.c
--- old/re-4.2.0/test/websock.c 2025-10-14 12:49:28.000000000 +0200
+++ new/re-4.3.0/test/websock.c 2025-11-19 10:04:45.000000000 +0100
@@ -18,6 +18,7 @@
        struct websock *ws;
        struct websock_conn *wc_cli;
        struct websock_conn *wc_srv;
+       const char *proto;
        uint32_t n_estab_cli;
        uint32_t n_recv_cli;
        uint32_t n_recv_srv;
@@ -34,7 +35,6 @@
        "0123456789abcdef"
        "0123456789abcdef";
 static const char custom_useragent[] = "Retest v0.1";
-static const char proto[] = "test";
 
 
 static void abort_test(struct test *t, int err)
@@ -92,13 +92,26 @@
        TEST_ASSERT(http_msg_hdr_has_value(msg, HTTP_HDR_USER_AGENT,
                                           custom_useragent));
 
-       TEST_ASSERT(http_msg_xhdr_has_value(msg, "Sec-WebSocket-Protocol",
-                                           proto));
+       if (test->proto) {
+               TEST_ASSERT(http_msg_xhdr_has_value(msg,
+                                                   "Sec-WebSocket-Protocol",
+                                                   test->proto));
+       }
 
        unsigned kaint = 1;
-       err = websock_accept_proto(&test->wc_srv, proto, test->ws, conn, msg,
-                            kaint, srv_websock_recv_handler,
-                            srv_websock_close_handler, test);
+
+       if (test->proto) {
+               err = websock_accept_proto(&test->wc_srv, test->proto,
+                                          test->ws, conn, msg, kaint,
+                                          srv_websock_recv_handler,
+                                          srv_websock_close_handler, test);
+       }
+       else {
+               err = websock_accept(&test->wc_srv, test->ws, conn, msg, kaint,
+                                    srv_websock_recv_handler,
+                                    srv_websock_close_handler, test);
+       }
+
  out:
        if (err)
                abort_test(test, err);
@@ -152,7 +165,7 @@
 }
 
 
-static int test_websock_loop(void)
+static int test_websock_loop(const char *proto)
 {
        struct http_sock *httpsock = NULL;
        struct http_cli *http_cli = NULL;
@@ -164,6 +177,8 @@
 
        memset(&test, 0, sizeof(test));
 
+       test.proto = proto;
+
        err |= sa_set_str(&srv, "127.0.0.1", 0);
        err |= sa_set_str(&dns, "127.0.0.1", 53);    /* note: unused */
        if (err)
@@ -192,12 +207,25 @@
        (void)re_snprintf(uri, sizeof(uri),
                          "http://127.0.0.1:%u/";, sa_port(&srv));
        unsigned kaint = 1;
-       err = websock_connect_proto(&test.wc_cli, proto, test.ws,
-                             http_cli, uri, kaint,
-                             cli_websock_estab_handler,
-                             cli_websock_recv_handler,
-                             cli_websock_close_handler, &test,
-                             "User-Agent: %s\r\n", custom_useragent);
+
+       if (proto) {
+               err = websock_connect_proto(&test.wc_cli, proto, test.ws,
+                                           http_cli, uri, kaint,
+                                           cli_websock_estab_handler,
+                                           cli_websock_recv_handler,
+                                           cli_websock_close_handler, &test,
+                                           "User-Agent: %s\r\n",
+                                           custom_useragent);
+       }
+       else {
+               err = websock_connect(&test.wc_cli, test.ws,
+                                     http_cli, uri, kaint,
+                                     cli_websock_estab_handler,
+                                     cli_websock_recv_handler,
+                                     cli_websock_close_handler, &test,
+                                     "User-Agent: %s\r\n", custom_useragent);
+       }
+
        if (err)
                goto out;
 
@@ -231,7 +259,12 @@
 {
        int err = 0;
 
-       err |= test_websock_loop();
+       err = test_websock_loop(NULL);
+       TEST_ERR(err);
+
+       err = test_websock_loop("test");
+       TEST_ERR(err);
 
+ out:
        return err;
 }

Reply via email to