Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package bctoolbox for openSUSE:Factory checked in at 2022-03-24 22:58:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bctoolbox (Old) and /work/SRC/openSUSE:Factory/.bctoolbox.new.1900 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bctoolbox" Thu Mar 24 22:58:21 2022 rev:32 rq:964620 version:5.1.12 Changes: -------- --- /work/SRC/openSUSE:Factory/bctoolbox/bctoolbox.changes 2022-03-01 19:07:05.760174513 +0100 +++ /work/SRC/openSUSE:Factory/.bctoolbox.new.1900/bctoolbox.changes 2022-03-24 23:00:31.620396876 +0100 @@ -1,0 +2,6 @@ +Thu Mar 24 10:30:38 UTC 2022 - Paolo Stivanin <i...@paolostivanin.com> + +- Update to version 5.1.12: + * no changelog + +------------------------------------------------------------------- Old: ---- bctoolbox-5.1.0.tar.bz2 New: ---- bctoolbox-5.1.12.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bctoolbox.spec ++++++ --- /var/tmp/diff_new_pack.WKZWmA/_old 2022-03-24 23:00:32.096397336 +0100 +++ /var/tmp/diff_new_pack.WKZWmA/_new 2022-03-24 23:00:32.104397344 +0100 @@ -18,7 +18,7 @@ %define sover 1 Name: bctoolbox -Version: 5.1.0 +Version: 5.1.12 Release: 0 Summary: Utility library for software from Belledonne Communications License: GPL-3.0-only ++++++ bctoolbox-5.1.0.tar.bz2 -> bctoolbox-5.1.12.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.1.0/include/bctoolbox/regex.h new/bctoolbox-5.1.12/include/bctoolbox/regex.h --- old/bctoolbox-5.1.0/include/bctoolbox/regex.h 2022-02-03 15:07:48.000000000 +0100 +++ new/bctoolbox-5.1.12/include/bctoolbox/regex.h 2022-03-15 22:46:34.000000000 +0100 @@ -25,6 +25,7 @@ #endif BCTBX_PUBLIC bool_t bctbx_is_matching_regex(const char *entry, const char* regex); +BCTBX_PUBLIC bool_t bctbx_is_matching_regex_log(const char *entry, const char* regex, bool_t show_log); #ifdef __cplusplus } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.1.0/include/bctoolbox/utils.hh new/bctoolbox-5.1.12/include/bctoolbox/utils.hh --- old/bctoolbox-5.1.0/include/bctoolbox/utils.hh 2022-02-03 15:07:48.000000000 +0100 +++ new/bctoolbox-5.1.12/include/bctoolbox/utils.hh 2022-03-15 22:46:34.000000000 +0100 @@ -42,6 +42,10 @@ BCTBX_PUBLIC std::string fold (const std::string &str); BCTBX_PUBLIC std::string unfold (const std::string &str); + + // Replace all "from" by "to" in source. Use 'recursive' to avoid replacing what has been replaced. + BCTBX_PUBLIC void replace(std::string& source, const std::string& from, const std::string& to, const bool& recursive = true); + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.1.0/src/tester.c new/bctoolbox-5.1.12/src/tester.c --- old/bctoolbox-5.1.0/src/tester.c 2022-02-03 15:07:48.000000000 +0100 +++ new/bctoolbox-5.1.12/src/tester.c 2022-03-15 22:46:34.000000000 +0100 @@ -536,7 +536,6 @@ //Merge partial JUnit suites reports into the final XML file void merge_junit_xml_files(const char *dst_file_name) { char **suite_junit_xml_results; - ssize_t total_size = 0; char *file_name; bctbx_vfs_file_t* bctbx_file; ssize_t read_bytes = 0, file_size = 0, offset = 0; @@ -551,7 +550,6 @@ suite_junit_xml_results[i] = malloc(file_size + 1); read_bytes = bctbx_file_read(bctbx_file, (void *)suite_junit_xml_results[i], file_size, 0); if (read_bytes == file_size) { - total_size += file_size; suite_junit_xml_results[i][file_size] = '\0'; //Also remove the file bctbx_file_close(bctbx_file); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.1.0/src/utils/port.c new/bctoolbox-5.1.12/src/utils/port.c --- old/bctoolbox-5.1.0/src/utils/port.c 2022-02-03 15:07:48.000000000 +0100 +++ new/bctoolbox-5.1.12/src/utils/port.c 2022-03-15 22:46:34.000000000 +0100 @@ -1449,11 +1449,12 @@ in->sin_addr.s_addr = IN6_GET_ADDR_V4MAPPED(&in6->sin6_addr); in->sin_port = in6->sin6_port; *result_len = sizeof(struct sockaddr_in); + return; } - } else { - *result_len = sizeof(struct sockaddr_in); - if (v6 != result) memcpy(result, v6, sizeof(struct sockaddr_in)); } + /* it was not a NAT64 address: just copy the source address as is, whatever it is.*/ + *result_len = v6->sa_family == AF_INET6 ? sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in); + if (v6 != result) memcpy(result, v6, *result_len); } void bctbx_sockaddr_ipv6_to_ipv4(const struct sockaddr *v6, struct sockaddr *result, socklen_t *result_len) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.1.0/src/utils/regex.cc new/bctoolbox-5.1.12/src/utils/regex.cc --- old/bctoolbox-5.1.0/src/utils/regex.cc 2022-02-03 15:07:48.000000000 +0100 +++ new/bctoolbox-5.1.12/src/utils/regex.cc 2022-03-15 22:46:34.000000000 +0100 @@ -43,7 +43,7 @@ #include <regex.h> #endif -extern "C" bool_t bctbx_is_matching_regex(const char *entry, const char* regex) { +extern "C" bool_t bctbx_is_matching_regex_log(const char *entry, const char* regex, bool_t show_log){ #if HAVE_WORKING_REGEX try { std::regex entry_regex(regex, std::regex_constants::extended | std::regex_constants::nosubs); @@ -51,7 +51,8 @@ return std::regex_match(entry, m, entry_regex); } catch (const std::regex_error& e) { - bctbx_error("Could not compile regex '%s': %s", regex, e.what()); + if(show_log) + bctbx_error("Could not compile regex '%s': %s", regex, e.what()); return FALSE; } #else @@ -60,8 +61,10 @@ int res; res = regcomp(®ex_pattern, regex, REG_EXTENDED | REG_NOSUB); if(res != 0) { - regerror(res, ®ex_pattern, err_msg, sizeof(err_msg)); - bctbx_error("Could not compile regex '%s': %s", regex, err_msg); + if(show_log) { + regerror(res, ®ex_pattern, err_msg, sizeof(err_msg)); + bctbx_error("Could not compile regex '%s': %s", regex, err_msg); + } return FALSE; } res = regexec(®ex_pattern, entry, 0, NULL, 0); @@ -69,3 +72,7 @@ return (res != REG_NOMATCH); #endif } + +extern "C" bool_t bctbx_is_matching_regex(const char *entry, const char* regex) { + return bctbx_is_matching_regex_log(entry, regex, TRUE); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bctoolbox-5.1.0/src/utils/utils.cc new/bctoolbox-5.1.12/src/utils/utils.cc --- old/bctoolbox-5.1.0/src/utils/utils.cc 2022-02-03 15:07:48.000000000 +0100 +++ new/bctoolbox-5.1.12/src/utils/utils.cc 2022-03-15 22:46:34.000000000 +0100 @@ -75,3 +75,12 @@ return output; } + +void bctoolbox::Utils::replace(string& source, const string& from, const string& to, const bool& recursive){ + size_t start_pos = 0; + while((start_pos = source.find(from, start_pos)) != string::npos) { + source.replace(start_pos, from.length(), to); + if(recursive) + start_pos += to.length(); + } +}