From c89de2763e2b538d73a5cc59907a8cbb09d0442c Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 11 Sep 2024 18:24:49 +0300 Subject: [PATCH] main/sipp: update to 3.7.3 --- main/sipp/32bit.patch | 95 +++++++++++++++++++++++++++++++++++++++++++ main/sipp/APKBUILD | 11 +++-- 2 files changed, 102 insertions(+), 4 deletions(-) create mode 100644 main/sipp/32bit.patch diff --git a/main/sipp/32bit.patch b/main/sipp/32bit.patch new file mode 100644 index 00000000000..f56e80dee56 --- /dev/null +++ b/main/sipp/32bit.patch @@ -0,0 +1,95 @@ +From fdc0c97e1d8acbe4de0d89cf26dfe74bf9b413ed Mon Sep 17 00:00:00 2001 +From: Orgad Shaneh +Date: Wed, 11 Sep 2024 20:55:06 +0300 +Subject: [PATCH] Fix 32-bit compilation + +--- + src/call.cpp | 8 ++++---- + src/rtpstream.cpp | 10 ++++++---- + src/sip_parser.cpp | 2 +- + 3 files changed, 11 insertions(+), 9 deletions(-) + +diff --git a/src/call.cpp b/src/call.cpp +index 319dacc..aa5c6fa 100644 +--- a/src/call.cpp ++++ b/src/call.cpp +@@ -1563,8 +1563,8 @@ char * call::get_last_header(const char * name) + if (name[len - 1] == ':') { + return get_header(last_recv_msg, name, false); + } else { +- char with_colon[MAX_HEADER_LEN]; +- sprintf(with_colon, "%s:", name); ++ char with_colon[MAX_HEADER_LEN+2]; ++ snprintf(with_colon, MAX_HEADER_LEN+2, "%s:", name); + return get_header(last_recv_msg, with_colon, false); + } + } +@@ -1604,8 +1604,8 @@ char * call::get_last_request_uri() + } + + last_request_uri[0] = '\0'; +- if (tmp && (tmp_len > 0)) { +- strncpy(last_request_uri, tmp, tmp_len); ++ if (tmp_len > 0) { ++ memcpy(last_request_uri, tmp, tmp_len); + } + last_request_uri[tmp_len] = '\0'; + +diff --git a/src/rtpstream.cpp b/src/rtpstream.cpp +index d767ce7..75a6dc9 100644 +--- a/src/rtpstream.cpp ++++ b/src/rtpstream.cpp +@@ -2702,7 +2702,7 @@ void rtpstream_audioecho_thread(void* param) + pthread_mutex_lock(&debugremutexaudio); + if (debugrefileaudio != nullptr) + { +- fprintf(debugrefileaudio, "DATA SUCCESSFULLY RECEIVED [AUDIO] nr = %ld...", nr); ++ fprintf(debugrefileaudio, "DATA SUCCESSFULLY RECEIVED [AUDIO] nr = %d...", int(nr)); + } + for (int i = 0; i < 12; i++) + { +@@ -2780,7 +2780,8 @@ void rtpstream_audioecho_thread(void* param) + pthread_mutex_lock(&debugremutexaudio); + if (debugrefileaudio != nullptr) + { +- fprintf(debugrefileaudio, "DATA SUCCESSFULLY SENT [AUDIO] seq_num = [%u] -- MISMATCHED RECV/SENT BYTE COUNT -- errno = %d nr = %ld ns = %ld\n", seq_num, errno, nr, ns); ++ fprintf(debugrefileaudio, "DATA SUCCESSFULLY SENT [AUDIO] seq_num = [%u] -- MISMATCHED RECV/SENT BYTE COUNT -- errno = %d nr = %d ns = %d\n", ++ seq_num, errno, int(nr), int(ns)); + } + pthread_mutex_unlock(&debugremutexaudio); + } else { +@@ -2961,7 +2962,7 @@ void rtpstream_videoecho_thread(void* param) + pthread_mutex_lock(&debugremutexvideo); + if (debugrefilevideo != nullptr) + { +- fprintf(debugrefilevideo, "DATA SUCCESSFULLY RECEIVED [VIDEO] nr = %ld...", nr); ++ fprintf(debugrefilevideo, "DATA SUCCESSFULLY RECEIVED [VIDEO] nr = %d...", int(nr)); + } + for (int i = 0; i < 12; i++) + { +@@ -3038,7 +3039,8 @@ void rtpstream_videoecho_thread(void* param) + pthread_mutex_lock(&debugremutexvideo); + if (debugrefilevideo != nullptr) + { +- fprintf(debugrefilevideo, "DATA SUCCESSFULLY SENT [VIDEO] seq_num = [%u] -- MISMATCHED RECV/SENT BYTE COUNT -- errno = %d nr = %ld ns = %ld\n", seq_num, errno, nr, ns); ++ fprintf(debugrefilevideo, "DATA SUCCESSFULLY SENT [VIDEO] seq_num = [%u] -- MISMATCHED RECV/SENT BYTE COUNT -- errno = %d nr = %d ns = %d\n", ++ seq_num, errno, int(nr), int(ns)); + } + pthread_mutex_unlock(&debugremutexvideo); + } else { +diff --git a/src/sip_parser.cpp b/src/sip_parser.cpp +index 0015be6..66a36be 100644 +--- a/src/sip_parser.cpp ++++ b/src/sip_parser.cpp +@@ -455,7 +455,7 @@ static const char* internal_find_header(const char* msg, const char* name, const + ptr = strchr(ptr, '\n'); + if (!ptr || ptr[-1] != '\r' || (ptr[1] == '\r' && ptr[2] == '\n')) { + if (ptr && ptr[-1] != '\r') { +- WARNING("Missing CR during header scan at pos %ld", ptr - msg); ++ WARNING("Missing CR during header scan at pos %d", int(ptr - msg)); + /* continue? */ + } + return nullptr; +-- +2.43.0 + diff --git a/main/sipp/APKBUILD b/main/sipp/APKBUILD index 5726f7a0b6a..c476581b032 100644 --- a/main/sipp/APKBUILD +++ b/main/sipp/APKBUILD @@ -2,8 +2,8 @@ # Contributor: Robert Boisvert # Maintainer: Fabian Affolter pkgname=sipp -pkgver=3.7.2 -pkgrel=1 +pkgver=3.7.3 +pkgrel=0 pkgdesc="Test tool / traffic generator for the SIP protocol" url="https://github.com/SIPp/sipp" arch="all" @@ -17,7 +17,9 @@ makedepends=" openssl-dev>3 samurai " -source="https://github.com/SIPp/sipp/releases/download/v$pkgver/sipp-$pkgver.tar.gz" +source="https://github.com/SIPp/sipp/releases/download/v$pkgver/sipp-$pkgver.tar.gz + 32bit.patch + " options="!check" # tests have no direct target build() { @@ -37,5 +39,6 @@ package() { } sha512sums=" -5ccd73efe0dd9b9e2788a61c0a423726e3bb7002d1266931838bc18307c975f7cd15b795c1aedb900a7f97a929df4b085b0875914db6e96984bc3bd3952d390b sipp-3.7.2.tar.gz +a04f8d02bd19068d5a6895e1c800f21ee7dc4355f9d7800579a7961c9388ad74144994a63a8fdfdc5b0fca09f7fd6ab004e14e5067e0ff9a79037194661abada sipp-3.7.3.tar.gz +6dce2a8385685bf9856cab664553f81d6dda78460645c950dce2817db5f545b9b2f0d878c1de219d34abf30a253b3b3fb36b66d4042bac5130d31b6840d7ddee 32bit.patch "