Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package sngrep for openSUSE:Factory checked 
in at 2021-12-01 20:47:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sngrep (Old)
 and      /work/SRC/openSUSE:Factory/.sngrep.new.31177 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sngrep"

Wed Dec  1 20:47:17 2021 rev:6 rq:934881 version:1.4.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/sngrep/sngrep.changes    2021-06-05 
23:32:07.472499777 +0200
+++ /work/SRC/openSUSE:Factory/.sngrep.new.31177/sngrep.changes 2021-12-02 
02:27:00.704242848 +0100
@@ -1,0 +2,12 @@
+Thu Nov 25 23:07:04 UTC 2021 - Martin Hauke <mar...@gmx.de>
+
+- Update to version 1.4.10
+  * fix compilation errors when using -Werror=format-security
+  * capture: properly set transport as TCP for assembled TCP
+    messages
+  * config: alias keyword now supports IP:PORT format.
+  * filter: increased size of src and dst fields for IPv6 addresses
+- Drop patch:
+  * fix-build-with-recent-ncurses-versions.patch
+
+-------------------------------------------------------------------

Old:
----
  fix-build-with-recent-ncurses-versions.patch
  sngrep-1.4.9.tar.gz

New:
----
  sngrep-1.4.10.tar.gz

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

Other differences:
------------------
++++++ sngrep.spec ++++++
--- /var/tmp/diff_new_pack.LPeUBV/_old  2021-12-02 02:27:01.112241440 +0100
+++ /var/tmp/diff_new_pack.LPeUBV/_new  2021-12-02 02:27:01.116241426 +0100
@@ -18,7 +18,7 @@
 
 
 Name:           sngrep
-Version:        1.4.9
+Version:        1.4.10
 Release:        0
 Summary:        Ncurses SIP Messages flow viewer
 License:        GPL-3.0-or-later
@@ -26,7 +26,6 @@
 URL:            https://github.com/irontec/sngrep
 #Git-Clone:     https://github.com/irontec/sngrep.git
 Source:         
https://github.com/irontec/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
-Patch0:         fix-build-with-recent-ncurses-versions.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  libpcap-devel
@@ -46,7 +45,6 @@
 
 %prep
 %setup -q
-%patch0 -p1
 
 %build
 autoreconf -fi

++++++ sngrep-1.4.9.tar.gz -> sngrep-1.4.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/ChangeLog new/sngrep-1.4.10/ChangeLog
--- old/sngrep-1.4.9/ChangeLog  2021-05-20 09:04:54.000000000 +0200
+++ new/sngrep-1.4.10/ChangeLog 2021-11-22 11:50:47.000000000 +0100
@@ -1,3 +1,12 @@
+2021-11-19 Ivan Alonso <ka...@irontec.com>
+       * sngrep 1.4.10 released
+
+       * build: fix compilation warnings on MacOS 10.15
+       * build: fix compilation errors when using -Werror=format-security
+       * capture: properly set transport as TCP for assembled TCP messages
+       * config: alias keyword now supports IP:PORT format
+       * filter: increased size of src and dst fields for IPv6 addresses
+
 2021-05-20 Ivan Alonso <ka...@irontec.com>
        * sngrep 1.4.9 released
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/README new/sngrep-1.4.10/README
--- old/sngrep-1.4.9/README     2021-05-20 09:04:54.000000000 +0200
+++ new/sngrep-1.4.10/README    2021-11-22 11:50:47.000000000 +0100
@@ -66,7 +66,7 @@
 You can configure some options using 
[sngreprc](https://github.com/irontec/sngrep/wiki/Configuration) file
 
 ## Frequent Asked Questions
-Any feedback, request or question are welcomed at 
[#sngrep](https://webchat.freenode.net/?channels=sngrep) channel at 
irc.freenode.net
+Any feedback, request or question are welcomed at 
[#sngrep](https://kiwiirc.com/nextclient/irc.libera.chat/#sngrep) channel at 
irc.libera.chat
 
 See FAQ on [Github 
Wiki](https://github.com/irontec/sngrep/wiki#frequent-asked-questions)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/configure.ac 
new/sngrep-1.4.10/configure.ac
--- old/sngrep-1.4.9/configure.ac       2021-05-20 09:04:54.000000000 +0200
+++ new/sngrep-1.4.10/configure.ac      2021-11-22 11:50:47.000000000 +0100
@@ -1,5 +1,5 @@
 AC_PREREQ([2.59])
-AC_INIT([sngrep], [1.4.9], [ka...@irontec.com], [sngrep], 
[http://www.irontec.com/])
+AC_INIT([sngrep], [1.4.10], [ka...@irontec.com], [sngrep], 
[http://www.irontec.com/])
 AM_INIT_AUTOMAKE([1.9])
 AC_CONFIG_HEADERS([src/config.h])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -55,10 +55,10 @@
        # Ncurses with wide-character support
        AC_DEFINE([WITH_UNICODE], [], [Compile With Unicode compatibility])
 
-   SNGREP_CHECK_SCRIPT([ncursesw6], [addnwstr], [WITH_UNICODE], 
"ncursesw6-config",
+   SNGREP_CHECK_SCRIPT([ncursesw], [addnwstr], [WITH_UNICODE], 
"ncursesw6-config",
     SNGREP_CHECK_SCRIPT([ncursesw], [addnwstr], [WITH_UNICODE], 
"ncursesw5-config",
      SNGREP_CHECK_SCRIPT([ncurses], [addnwstr], [WITH_UNICODE], 
"ncurses5-config",
-      SNGREP_CHECK_LIB([ncursesw6], [addnwstr], [WITH_UNICODE],
+      SNGREP_CHECK_LIB([ncursesw], [addnwstr], [WITH_UNICODE],
        SNGREP_CHECK_LIB([ncursesw], [addnwstr], [WITH_UNICODE],
         SNGREP_CHECK_LIB([ncurses], [addnwstr], [WITH_UNICODE],
        ))))))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/doc/sngrep.8 
new/sngrep-1.4.10/doc/sngrep.8
--- old/sngrep-1.4.9/doc/sngrep.8       2021-05-20 09:04:54.000000000 +0200
+++ new/sngrep-1.4.10/doc/sngrep.8      2021-11-22 11:50:47.000000000 +0100
@@ -3,7 +3,7 @@
 .\" Copyright (c) 2013-2021  Ivan Alonso <ka...@irontec.com>
 .\" Copyright (c) 2013-2021  Irontec S.L.
 
-.TH SNGREP 8 "May 2021" "sngrep 1.4.9"
+.TH SNGREP 8 "May 2021" "sngrep 1.4.10"
 
 .SH NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/m4/sngrep.m4 
new/sngrep-1.4.10/m4/sngrep.m4
--- old/sngrep-1.4.9/m4/sngrep.m4       2021-05-20 09:04:54.000000000 +0200
+++ new/sngrep-1.4.10/m4/sngrep.m4      2021-11-22 11:50:47.000000000 +0100
@@ -31,17 +31,20 @@
 [
    if test ! -z "m4_toupper($SNGREP_[$1]_CONFIG_SCRIPT)"; then
       # to be used to set the path to *-config when cross-compiling
-      sngrep_config_script=$(m4_toupper($SNGREP_[$1]_CONFIG_SCRIPT) --libs 2> 
/dev/null)
+      sngrep_config_script_libs=$(m4_toupper($SNGREP_[$1]_CONFIG_SCRIPT) 
--libs 2> /dev/null)
+      sngrep_config_script_cflags=$(m4_toupper($SNGREP_[$1]_CONFIG_SCRIPT) 
--cflags 2> /dev/null)
    else
-      sngrep_config_script=$([$4] --libs 2> /dev/null)
+      sngrep_config_script_libs=$([$4] --libs 2> /dev/null)
+      sngrep_config_script_cflags=$([$4] --cflags 2> /dev/null)
    fi
    sngrep_script_success=no
    sngrep_save_LDFLAGS="$LDFLAGS"
-   if test ! "x$sngrep_config_script" = x; then
-      LDFLAGS="$sngrep_config_script $LDFLAGS"
+   if test ! "x$sngrep_config_script_libs" = x; then
+      LDFLAGS="$sngrep_config_script_libs $LDFLAGS"
       AC_CHECK_LIB([$1], [$2], [
          AC_DEFINE([$3], 1, [The library is present.])
-         LIBS="$sngrep_config_script $LIBS "
+         LIBS="$sngrep_config_script_libs $LIBS "
+         CFLAGS="$sngrep_config_script_cflags $CFLAGS "
          sngrep_script_success=yes
       ], [])
       LDFLAGS="$sngrep_save_LDFLAGS"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/pkg/apk/APKBUILD 
new/sngrep-1.4.10/pkg/apk/APKBUILD
--- old/sngrep-1.4.9/pkg/apk/APKBUILD   1970-01-01 01:00:00.000000000 +0100
+++ new/sngrep-1.4.10/pkg/apk/APKBUILD  2021-11-22 11:50:47.000000000 +0100
@@ -0,0 +1,41 @@
+# Contributor: Francesco Colista <fcoli...@alpinelinux.org>
+# Maintainer: Francesco Colista <fcoli...@alpinelinux.org>
+pkgname=sngrep
+pkgver=1.4.9
+pkgrel=0
+pkgdesc="display SIP call message flows from a terminal"
+url="https://github.com/irontec/sngrep";
+arch="all !ppc64le"
+license="GPL-3.0-or-later"
+depends="sed"
+makedepends="autoconf automake ncurses-dev libpcap-dev
+       pcre-dev libgcrypt-dev openssl-dev"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/irontec/sngrep/releases/download/v$pkgver/sngrep-$pkgver.tar.gz";
+
+prepare() {
+       default_prepare
+       ./bootstrap.sh
+}
+
+build() {
+       ./configure \
+               --prefix=/usr \
+               --sysconfdir=/etc \
+               --with-openssl \
+               --with-pcre \
+               --disable-logo \
+               --enable-unicode \
+               --enable-ipv6
+       make
+}
+
+check() {
+       make check
+}
+
+package() {
+       make DESTDIR="$pkgdir/" install
+}
+
+sha512sums="f25e8c5b1a6feddc2210fc8295f6e2c7ce708ae4bc4903f33b334f210e67c5c58d636e0a3bcaecef6d0c2bdfb9cab7c9ee28a5605d4df5ab1251be0856674c42
 sngrep-1.4.9.tar.gz"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/pkg/debian/changelog 
new/sngrep-1.4.10/pkg/debian/changelog
--- old/sngrep-1.4.9/pkg/debian/changelog       2021-05-20 09:04:54.000000000 
+0200
+++ new/sngrep-1.4.10/pkg/debian/changelog      2021-11-22 11:50:47.000000000 
+0100
@@ -1,3 +1,9 @@
+sngrep (1.4.10) experimental; urgency=low
+
+   * sngrep 1.4.10 released
+
+ -- Ivan Alonso <ka...@irontec.com>  Fri, 19 Nov 2021 11:00:24 +0100
+
 sngrep (1.4.9) experimental; urgency=low
 
    * sngrep 1.4.9 released
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/pkg/rpm/SPECS/sngrep.spec 
new/sngrep-1.4.10/pkg/rpm/SPECS/sngrep.spec
--- old/sngrep-1.4.9/pkg/rpm/SPECS/sngrep.spec  2021-05-20 09:04:54.000000000 
+0200
+++ new/sngrep-1.4.10/pkg/rpm/SPECS/sngrep.spec 2021-11-22 11:50:47.000000000 
+0100
@@ -2,7 +2,7 @@
 
 Summary:            SIP Messages flow viewer
 Name:               sngrep
-Version:            1.4.9
+Version:            1.4.10
 Release:            0%{?dist}
 License:            GPLv3
 Group:              Applications/Engineering
@@ -59,8 +59,10 @@
 %{__rm} -rf %{buildroot}
 
 %changelog
+* Fri Nov 19 2021 Ivan Alonso <ka...@irontec.com> - 1.4.10
+ - Version 1.4.10
 * Thu May 20 2021 Ivan Alonso <ka...@irontec.com> - 1.4.9
-- Version 1.4.9
+ - Version 1.4.9
 * Tue Oct 10 2020 Ivan Alonso <ka...@irontec.com> - 1.4.8
  - Version 1.4.8
 * Thu May 21 2020 Ivan Alonso <ka...@irontec.com> - 1.4.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/src/curses/ui_call_flow.c 
new/sngrep-1.4.10/src/curses/ui_call_flow.c
--- old/sngrep-1.4.9/src/curses/ui_call_flow.c  2021-05-20 09:04:54.000000000 
+0200
+++ new/sngrep-1.4.10/src/curses/ui_call_flow.c 2021-11-22 11:50:47.000000000 
+0100
@@ -310,7 +310,7 @@
         } else if (setting_enabled(SETTING_DISPLAY_ALIAS)) {
             if (strlen(column->addr.ip) > 15) {
                 snprintf(coltext, MAX_SETTING_LEN, "..%.*s:%u",
-                         MAX_SETTING_LEN - 7, column->alias + 
strlen(column->alias) - 13, column->addr.port);
+                         MAX_SETTING_LEN - 9, column->alias + 
strlen(column->alias) - 13, column->addr.port);
             } else {
                 snprintf(coltext, MAX_SETTING_LEN, "%.*s:%u",
                          MAX_SETTING_LEN - 7, column->alias, 
column->addr.port);
@@ -318,7 +318,7 @@
         } else {
             if (strlen(column->addr.ip) > 15) {
                 snprintf(coltext, MAX_SETTING_LEN, "..%.*s:%u",
-                         MAX_SETTING_LEN - 7, column->addr.ip + 
strlen(column->addr.ip) - 13, column->addr.port);
+                         MAX_SETTING_LEN - 9, column->addr.ip + 
strlen(column->addr.ip) - 13, column->addr.port);
             } else {
                 snprintf(coltext, MAX_SETTING_LEN, "%.*s:%u",
                          MAX_SETTING_LEN - 7, column->addr.ip, 
column->addr.port);
@@ -465,12 +465,12 @@
     timeval_to_time(msg_get_time(msg), msg_time);
 
     // Get Message method (include extra info)
-    snprintf(method, METHOD_MAXLEN, "%s", msg_method);
+    snprintf(method, METHOD_MAXLEN, "%.*s", METHOD_MAXLEN-1, msg_method);
 
     // If message has sdp information
     if (msg_has_sdp(msg) && setting_has_value(SETTING_CF_SDP_INFO, "off")) {
         // Show sdp tag in title
-        snprintf(method, METHOD_MAXLEN, "%s (SDP)", msg_method );
+        snprintf(method, METHOD_MAXLEN, "%.*s (SDP)", METHOD_MAXLEN-7, 
msg_method );
     }
 
     // If message has sdp information
@@ -571,9 +571,9 @@
                     media->address.port,
                     media_get_prefered_format(media));
             if (arrow->dir == CF_ARROW_SPIRAL) {
-                mvwprintw(flow_win, cline + 1, startpos + 5, mediastr);
+                mvwprintw(flow_win, cline + 1, startpos + 5, "%s", mediastr);
             } else {
-                mvwprintw(flow_win, cline + 1, startpos + distance / 2 - 
strlen(mediastr) / 2 + 2, mediastr);
+                mvwprintw(flow_win, cline + 1, startpos + distance / 2 - 
strlen(mediastr) / 2 + 2, "%s", mediastr);
             }
             cline++;
             aline++;
@@ -1391,9 +1391,7 @@
     vector_append(column->callids, (void*)callid);
     column->addr = addr;
     if (setting_enabled(SETTING_ALIAS_PORT)) {
-        char addr_port[1024];
-        sprintf(addr_port, "%s:%d", addr.ip, addr.port);
-        strcpy(column->alias, get_alias_value(addr_port));
+        strcpy(column->alias, get_alias_value_vs_port(addr.ip, addr.port));
     } else {
         strcpy(column->alias, get_alias_value(addr.ip));
     }
@@ -1417,10 +1415,8 @@
     match_port = addr.port != 0;
 
     // Get alias value for given address
-    if (setting_enabled(SETTING_ALIAS_PORT)) {
-        char addr_port[1024];
-        sprintf(addr_port, "%s:%d", addr.ip, addr.port);
-        alias = get_alias_value(addr_port);
+    if (setting_enabled(SETTING_ALIAS_PORT) && match_port) {
+        alias = get_alias_value_vs_port(addr.ip, addr.port);
     } else {
         alias = get_alias_value(addr.ip);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/src/curses/ui_filter.c 
new/sngrep-1.4.10/src/curses/ui_filter.c
--- old/sngrep-1.4.9/src/curses/ui_filter.c     2021-05-20 09:04:54.000000000 
+0200
+++ new/sngrep-1.4.10/src/curses/ui_filter.c    2021-11-22 11:50:47.000000000 
+0100
@@ -86,8 +86,8 @@
     // Set fields options
     field_opts_off(info->fields[FLD_FILTER_SIPFROM], O_AUTOSKIP);
     field_opts_off(info->fields[FLD_FILTER_SIPTO], O_AUTOSKIP);
-    field_opts_off(info->fields[FLD_FILTER_SRC], O_AUTOSKIP);
-    field_opts_off(info->fields[FLD_FILTER_DST], O_AUTOSKIP);
+    field_opts_off(info->fields[FLD_FILTER_SRC], O_AUTOSKIP | O_STATIC);
+    field_opts_off(info->fields[FLD_FILTER_DST], O_AUTOSKIP | O_STATIC);
     field_opts_off(info->fields[FLD_FILTER_PAYLOAD], O_AUTOSKIP | O_STATIC);
     field_opts_off(info->fields[FLD_FILTER_REGISTER], O_AUTOSKIP);
     field_opts_off(info->fields[FLD_FILTER_INVITE], O_AUTOSKIP);
@@ -102,6 +102,10 @@
     field_opts_off(info->fields[FLD_FILTER_FILTER], O_EDIT);
     field_opts_off(info->fields[FLD_FILTER_CANCEL], O_EDIT);
 
+    // Set max field size
+    set_max_field(info->fields[FLD_FILTER_SRC], ADDRESSLEN);
+    set_max_field(info->fields[FLD_FILTER_DST], ADDRESSLEN);
+
     // Change background of input fields
     set_field_back(info->fields[FLD_FILTER_SIPFROM], A_UNDERLINE);
     set_field_back(info->fields[FLD_FILTER_SIPTO], A_UNDERLINE);
@@ -440,7 +444,7 @@
 void
 filter_method_from_setting(const char *value)
 {
-    char methods[256], method_expr[256];
+    char methods[250], method_expr[256];
     int methods_len = strlen(value);
     char *comma;
 
@@ -455,7 +459,7 @@
 
         // Create a regular expression
         memset(method_expr, 0, sizeof(method_expr));
-        sprintf(method_expr, "(%s)", methods);
+        snprintf(method_expr, sizeof(method_expr), "(%s)", methods);
         filter_set(FILTER_METHOD, method_expr);
     } else {
         filter_set(FILTER_METHOD, " ");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/src/curses/ui_manager.c 
new/sngrep-1.4.10/src/curses/ui_manager.c
--- old/sngrep-1.4.9/src/curses/ui_manager.c    2021-05-20 09:04:54.000000000 
+0200
+++ new/sngrep-1.4.10/src/curses/ui_manager.c   2021-11-22 11:50:47.000000000 
+0100
@@ -93,7 +93,7 @@
     // Hide the cursor
     curs_set(0);
     // Only delay ESC Sequences 25 ms (we dont want Escape sequences)
-    ESCDELAY = 25;
+    set_escdelay(25);
 
     // Redefine some keys
     term = getenv("TERM");
@@ -665,7 +665,7 @@
     curs = curs_set(0);
 
     // Set the window title
-    mvwprintw(dialog_win, 1, (width - strlen(title)) / 2, title);
+    mvwprintw(dialog_win, 1, (width - strlen(title)) / 2, "%s", title);
 
     // Write border and boxes around the window
     wattron(dialog_win, COLOR_PAIR(CP_BLUE_ON_DEF));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/src/curses/ui_msg_diff.c 
new/sngrep-1.4.10/src/curses/ui_msg_diff.c
--- old/sngrep-1.4.9/src/curses/ui_msg_diff.c   2021-05-20 09:04:54.000000000 
+0200
+++ new/sngrep-1.4.10/src/curses/ui_msg_diff.c  2021-11-22 11:50:47.000000000 
+0100
@@ -187,7 +187,7 @@
     getmaxyx(win, height, width);
 
     wattron(win, A_BOLD);
-    mvwprintw(win, 0, 0, sip_get_msg_header(msg, header));
+    mvwprintw(win, 0, 0, "%s", sip_get_msg_header(msg, header));
     wattroff(win, A_BOLD);
 
     // Print msg payload
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/src/curses/ui_panel.c 
new/sngrep-1.4.10/src/curses/ui_panel.c
--- old/sngrep-1.4.9/src/curses/ui_panel.c      2021-05-20 09:04:54.000000000 
+0200
+++ new/sngrep-1.4.10/src/curses/ui_panel.c     2021-11-22 11:50:47.000000000 
+0100
@@ -220,12 +220,12 @@
     for (key = 0; key < count; key += 2) {
         wattron(ui->win, A_BOLD | COLOR_PAIR(CP_WHITE_ON_CYAN));
         mvwprintw(ui->win, ui->height - 1, xpos, "%-*s",
-                  strlen(keybindings[key]) + 1, keybindings[key]);
+                  (int) strlen(keybindings[key]) + 1, keybindings[key]);
         xpos += strlen(keybindings[key]) + 1;
         wattroff(ui->win, A_BOLD | COLOR_PAIR(CP_WHITE_ON_CYAN));
         wattron(ui->win, COLOR_PAIR(CP_BLACK_ON_CYAN));
         mvwprintw(ui->win, ui->height - 1, xpos, "%-*s",
-                  strlen(keybindings[key + 1]) + 1, keybindings[key + 1]);
+                  (int) strlen(keybindings[key + 1]) + 1, keybindings[key + 
1]);
         wattroff(ui->win, COLOR_PAIR(CP_BLACK_ON_CYAN));
         xpos += strlen(keybindings[key + 1]) + 3;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/src/curses/ui_stats.c 
new/sngrep-1.4.10/src/curses/ui_stats.c
--- old/sngrep-1.4.9/src/curses/ui_stats.c      2021-05-20 09:04:54.000000000 
+0200
+++ new/sngrep-1.4.10/src/curses/ui_stats.c     2021-11-22 11:50:47.000000000 
+0100
@@ -164,37 +164,37 @@
 
     // Print parses data
     mvwprintw(ui->win, 3,  3,  "Dialogs: %d", stats.dtotal);
-    mvwprintw(ui->win, 4,  3,  "Calls: %d (%.1f\%)", stats.dcalls, (float) 
stats.dcalls * 100 / stats.dtotal);
+    mvwprintw(ui->win, 4,  3,  "Calls: %d (%.1f%%)", stats.dcalls, (float) 
stats.dcalls * 100 / stats.dtotal);
     mvwprintw(ui->win, 5,  3,  "Messages: %d", stats.mtotal);
     // Print status of calls if any
     if (stats.dcalls) {
-        mvwprintw(ui->win, 3,  33, "COMPLETED:  %d (%.1f\%)", stats.completed, 
(float) stats.completed * 100 / stats.dcalls);
-        mvwprintw(ui->win, 4,  33, "CANCELLED:  %d (%.1f\%)", stats.cancelled, 
(float) stats.cancelled * 100 / stats.dcalls);
-        mvwprintw(ui->win, 5,  33, "IN CALL:    %d (%.1f\%)", stats.incall,    
(float) stats.incall * 100 / stats.dcalls);
-        mvwprintw(ui->win, 6,  33, "REJECTED:   %d (%.1f\%)", stats.rejected,  
(float) stats.rejected * 100 / stats.dcalls);
-        mvwprintw(ui->win, 7,  33, "BUSY:       %d (%.1f\%)", stats.busy,      
(float) stats.busy * 100 / stats.dcalls);
-        mvwprintw(ui->win, 8,  33, "DIVERTED:   %d (%.1f\%)", stats.diverted,  
(float) stats.diverted * 100 / stats.dcalls);
-        mvwprintw(ui->win, 9,  33, "CALL SETUP: %d (%.1f\%)", stats.setup,     
(float) stats.setup * 100 / stats.dcalls);
+        mvwprintw(ui->win, 3,  33, "COMPLETED:  %d (%.1f%%)", stats.completed, 
(float) stats.completed * 100 / stats.dcalls);
+        mvwprintw(ui->win, 4,  33, "CANCELLED:  %d (%.1f%%)", stats.cancelled, 
(float) stats.cancelled * 100 / stats.dcalls);
+        mvwprintw(ui->win, 5,  33, "IN CALL:    %d (%.1f%%)", stats.incall,    
(float) stats.incall * 100 / stats.dcalls);
+        mvwprintw(ui->win, 6,  33, "REJECTED:   %d (%.1f%%)", stats.rejected,  
(float) stats.rejected * 100 / stats.dcalls);
+        mvwprintw(ui->win, 7,  33, "BUSY:       %d (%.1f%%)", stats.busy,      
(float) stats.busy * 100 / stats.dcalls);
+        mvwprintw(ui->win, 8,  33, "DIVERTED:   %d (%.1f%%)", stats.diverted,  
(float) stats.diverted * 100 / stats.dcalls);
+        mvwprintw(ui->win, 9,  33, "CALL SETUP: %d (%.1f%%)", stats.setup,     
(float) stats.setup * 100 / stats.dcalls);
     }
 
-    mvwprintw(ui->win, 11, 3, "INVITE:    %d (%.1f\%)", stats.invite,    
(float) stats.invite * 100 / stats.mtotal);
-    mvwprintw(ui->win, 12, 3, "REGISTER:  %d (%.1f\%)", stats.regist,    
(float) stats.regist * 100 / stats.mtotal);
-    mvwprintw(ui->win, 13, 3, "SUBSCRIBE: %d (%.1f\%)", stats.subscribe, 
(float) stats.subscribe * 100 / stats.mtotal);
-    mvwprintw(ui->win, 14, 3, "UPDATE:    %d (%.1f\%)", stats.update,    
(float) stats.update * 100 / stats.mtotal);
-    mvwprintw(ui->win, 15, 3, "NOTIFY:    %d (%.1f\%)", stats.notify,    
(float) stats.notify * 100 / stats.mtotal);
-    mvwprintw(ui->win, 16, 3, "OPTIONS:   %d (%.1f\%)", stats.options,   
(float) stats.options * 100 / stats.mtotal);
-    mvwprintw(ui->win, 17, 3, "PUBLISH:   %d (%.1f\%)", stats.publish,   
(float) stats.publish * 100 / stats.mtotal);
-    mvwprintw(ui->win, 18, 3, "MESSAGE:   %d (%.1f\%)", stats.message,   
(float) stats.message * 100 / stats.mtotal);
-    mvwprintw(ui->win, 19, 3, "INFO:      %d (%.1f\%)", stats.info,      
(float) stats.info * 100 / stats.mtotal);
-    mvwprintw(ui->win, 20, 3, "BYE:       %d (%.1f\%)", stats.bye,       
(float) stats.bye * 100 / stats.mtotal);
-    mvwprintw(ui->win, 21, 3, "CANCEL:    %d (%.1f\%)", stats.cancel,    
(float) stats.cancel * 100 / stats.mtotal);
+    mvwprintw(ui->win, 11, 3, "INVITE:    %d (%.1f%%)", stats.invite,    
(float) stats.invite * 100 / stats.mtotal);
+    mvwprintw(ui->win, 12, 3, "REGISTER:  %d (%.1f%%)", stats.regist,    
(float) stats.regist * 100 / stats.mtotal);
+    mvwprintw(ui->win, 13, 3, "SUBSCRIBE: %d (%.1f%%)", stats.subscribe, 
(float) stats.subscribe * 100 / stats.mtotal);
+    mvwprintw(ui->win, 14, 3, "UPDATE:    %d (%.1f%%)", stats.update,    
(float) stats.update * 100 / stats.mtotal);
+    mvwprintw(ui->win, 15, 3, "NOTIFY:    %d (%.1f%%)", stats.notify,    
(float) stats.notify * 100 / stats.mtotal);
+    mvwprintw(ui->win, 16, 3, "OPTIONS:   %d (%.1f%%)", stats.options,   
(float) stats.options * 100 / stats.mtotal);
+    mvwprintw(ui->win, 17, 3, "PUBLISH:   %d (%.1f%%)", stats.publish,   
(float) stats.publish * 100 / stats.mtotal);
+    mvwprintw(ui->win, 18, 3, "MESSAGE:   %d (%.1f%%)", stats.message,   
(float) stats.message * 100 / stats.mtotal);
+    mvwprintw(ui->win, 19, 3, "INFO:      %d (%.1f%%)", stats.info,      
(float) stats.info * 100 / stats.mtotal);
+    mvwprintw(ui->win, 20, 3, "BYE:       %d (%.1f%%)", stats.bye,       
(float) stats.bye * 100 / stats.mtotal);
+    mvwprintw(ui->win, 21, 3, "CANCEL:    %d (%.1f%%)", stats.cancel,    
(float) stats.cancel * 100 / stats.mtotal);
 
-    mvwprintw(ui->win, 11, 33, "1XX: %d (%.1f\%)", stats.r100, (float) 
stats.r100 * 100 / stats.mtotal);
-    mvwprintw(ui->win, 12, 33, "2XX: %d (%.1f\%)", stats.r200, (float) 
stats.r200 * 100 / stats.mtotal);
-    mvwprintw(ui->win, 13, 33, "3XX: %d (%.1f\%)", stats.r300, (float) 
stats.r300 * 100 / stats.mtotal);
-    mvwprintw(ui->win, 14, 33, "4XX: %d (%.1f\%)", stats.r400, (float) 
stats.r400 * 100 / stats.mtotal);
-    mvwprintw(ui->win, 15, 33, "5XX: %d (%.1f\%)", stats.r500, (float) 
stats.r500 * 100 / stats.mtotal);
-    mvwprintw(ui->win, 16, 33, "6XX: %d (%.1f\%)", stats.r600, (float) 
stats.r600 * 100 / stats.mtotal);
-    mvwprintw(ui->win, 17, 33, "7XX: %d (%.1f\%)", stats.r700, (float) 
stats.r700 * 100 / stats.mtotal);
-    mvwprintw(ui->win, 18, 33, "8XX: %d (%.1f\%)", stats.r800, (float) 
stats.r800 * 100 / stats.mtotal);
+    mvwprintw(ui->win, 11, 33, "1XX: %d (%.1f%%)", stats.r100, (float) 
stats.r100 * 100 / stats.mtotal);
+    mvwprintw(ui->win, 12, 33, "2XX: %d (%.1f%%)", stats.r200, (float) 
stats.r200 * 100 / stats.mtotal);
+    mvwprintw(ui->win, 13, 33, "3XX: %d (%.1f%%)", stats.r300, (float) 
stats.r300 * 100 / stats.mtotal);
+    mvwprintw(ui->win, 14, 33, "4XX: %d (%.1f%%)", stats.r400, (float) 
stats.r400 * 100 / stats.mtotal);
+    mvwprintw(ui->win, 15, 33, "5XX: %d (%.1f%%)", stats.r500, (float) 
stats.r500 * 100 / stats.mtotal);
+    mvwprintw(ui->win, 16, 33, "6XX: %d (%.1f%%)", stats.r600, (float) 
stats.r600 * 100 / stats.mtotal);
+    mvwprintw(ui->win, 17, 33, "7XX: %d (%.1f%%)", stats.r700, (float) 
stats.r700 * 100 / stats.mtotal);
+    mvwprintw(ui->win, 18, 33, "8XX: %d (%.1f%%)", stats.r800, (float) 
stats.r800 * 100 / stats.mtotal);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/src/option.c 
new/sngrep-1.4.10/src/option.c
--- old/sngrep-1.4.9/src/option.c       2021-05-20 09:04:54.000000000 +0200
+++ new/sngrep-1.4.10/src/option.c      2021-11-22 11:50:47.000000000 +0100
@@ -195,6 +195,28 @@
 }
 
 const char *
+get_alias_value_vs_port(const char *address, uint16_t port)
+{
+    if (!address)
+        return NULL;
+
+    int i;
+
+    char *addr_port = sng_malloc(ADDRESSLEN + 10);
+    sprintf(addr_port, "%s:%d", address, port);
+    for (i = 0; i < optscnt; i++) {
+        if (options[i].type != ALIAS)
+            continue;
+        if (!strcmp(options[i].opt, addr_port) || !strcmp(options[i].opt, 
address)) {
+            sng_free(addr_port);
+            return options[i].value;
+        }
+    }
+
+    return address;
+}
+
+const char *
 get_alias_value(const char *address)
 {
     int i;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/src/option.h 
new/sngrep-1.4.10/src/option.h
--- old/sngrep-1.4.9/src/option.h       2021-05-20 09:04:54.000000000 +0200
+++ new/sngrep-1.4.10/src/option.h      2021-11-22 11:50:47.000000000 +0100
@@ -43,6 +43,8 @@
 #ifndef __SNGREP_CONFIG_H
 #define __SNGREP_CONFIG_H
 
+#include <stdint.h>
+
 //! Shorter declaration of config_option struct
 typedef struct config_option option_opt_t;
 
@@ -157,5 +159,14 @@
 const char *
 get_alias_value(const char *address);
 
+/**
+ * @brief Get alias for a given address and port (string)
+ *
+ * @param address IP Address
+ * @param port port
+ * @return configured alias or address if alias not found
+ */
+const char *
+get_alias_value_vs_port(const char *address, uint16_t port);
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/src/packet.c 
new/sngrep-1.4.10/src/packet.c
--- old/sngrep-1.4.9/src/packet.c       2021-05-20 09:04:54.000000000 +0200
+++ new/sngrep-1.4.10/src/packet.c      2021-11-22 11:50:47.000000000 +0100
@@ -56,6 +56,7 @@
     // Create a new packet with the original information
     clone =    packet_create(packet->ip_version, packet->proto, packet->src, 
packet->dst, packet->ip_id);
     clone->tcp_seq = packet->tcp_seq;
+    clone->type = packet->type;
 
     // Append this frames to the original packet
     vector_iter_t frames = vector_iterator(packet->frames);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sngrep-1.4.9/src/sip.c new/sngrep-1.4.10/src/sip.c
--- old/sngrep-1.4.9/src/sip.c  2021-05-20 09:04:54.000000000 +0200
+++ new/sngrep-1.4.10/src/sip.c 2021-11-22 11:50:47.000000000 +0100
@@ -543,7 +543,7 @@
         // Method & CSeq
         if (regexec(&calls.reg_method, (const char *)payload, 2, pmatch, 0) == 
0) {
             if ((int)(pmatch[1].rm_eo - pmatch[1].rm_so) >= SIP_ATTR_MAXLEN) {
-                strncpy(reqresp, "<malformed>", 11);
+                strncpy(reqresp, "<malformed>", 12);
             } else {
                 sprintf(reqresp, "%.*s", (int) (pmatch[1].rm_eo - 
pmatch[1].rm_so), payload + pmatch[1].rm_so);
             }
@@ -559,12 +559,12 @@
         // Response code
         if (regexec(&calls.reg_response, (const char *)payload, 3, pmatch, 0) 
== 0) {
             if ((int)(pmatch[1].rm_eo - pmatch[1].rm_so) >= SIP_ATTR_MAXLEN) {
-                strncpy(resp_str, "<malformed>", 11);
+                strncpy(resp_str, "<malformed>", 12);
             } else {
                 sprintf(resp_str, "%.*s", (int) (pmatch[1].rm_eo - 
pmatch[1].rm_so), payload + pmatch[1].rm_so);
             }
             if ((int)(pmatch[2].rm_eo - pmatch[2].rm_so) >= SIP_ATTR_MAXLEN) {
-                strncpy(resp_str, "<malformed>", 11);
+                strncpy(resp_str, "<malformed>", 12);
             } else {
                 sprintf(reqresp, "%.*s", (int) (pmatch[2].rm_eo - 
pmatch[2].rm_so), payload + pmatch[2].rm_so);
             }
@@ -617,7 +617,7 @@
     } else {
         // Malformed From Header
         msg->sip_from = sng_malloc(12);
-        strncpy(msg->sip_from, "<malformed>", 11);
+        strncpy(msg->sip_from, "<malformed>", 12);
     }
 
     // To
@@ -627,7 +627,7 @@
     } else {
         // Malformed To Header
         msg->sip_to = sng_malloc(12);
-        strncpy(msg->sip_to, "<malformed>", 11);
+        strncpy(msg->sip_to, "<malformed>", 12);
     }
 
     return 0;

Reply via email to