From 7157ca348cebb4534634459cd1e61e924eb4faf8 Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Mon, 2 Oct 2017 17:48:58 +0200 Subject: [PATCH] TT#22659 Print errno when json writing fails Change-Id: I5a96556153c0978d66838db2eddc32accbd4827b --- debian/patches/series | 1 + debian/patches/sipwise/cfgt_debug.patch | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 debian/patches/sipwise/cfgt_debug.patch diff --git a/debian/patches/series b/debian/patches/series index a8b781397..8ee7d8d7a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -52,3 +52,4 @@ sipwise/rtpengine-mos-stats.patch sipwise/openssl-pthreads-cleanup.patch sipwise/presence_dfks.patch sipwise/presence_dfks_add_crlf_xml.patch +sipwise/cfgt_debug.patch diff --git a/debian/patches/sipwise/cfgt_debug.patch b/debian/patches/sipwise/cfgt_debug.patch new file mode 100644 index 000000000..40a09f3d3 --- /dev/null +++ b/debian/patches/sipwise/cfgt_debug.patch @@ -0,0 +1,22 @@ +Index: kamailio/modules/cfgt/cfgt_int.c +=================================================================== +--- kamailio.orig/modules/cfgt/cfgt_int.c 2017-10-02 17:46:31.813613647 +0200 ++++ kamailio/modules/cfgt/cfgt_int.c 2017-10-02 17:48:15.141879863 +0200 +@@ -21,6 +21,8 @@ + */ + #include + #include ++#include ++#include + + #include "../../events.h" + #include "../../lib/kcore/cmpapi.h" +@@ -376,7 +378,7 @@ + return; + } + if(fputs(dest.s, fp)<0){ +- LM_ERR("failed writing to file\n"); ++ LM_ERR("failed writing to file: %s\n", strerror(errno)); + } + fclose(fp); + node->jdoc.free_fn(dest.s);