Browse code

nat_traversal: print keepalive file name in error messages

(cherry picked from commit 09bce3d97acf54c289f1a2c6905175038502e7a0)
(cherry picked from commit 9157c3038b6b70bd61d7e43d4b07eaf2575d65bc)

Daniel-Constantin Mierla authored on 01/06/2017 08:01:27
Showing 1 changed files
... ...
@@ -1632,7 +1632,8 @@ save_keepalive_state(void)
1632 1632
 
1633 1633
     f = fopen(keepalive_state_file, "w");
1634 1634
     if (!f) {
1635
-        LM_ERR("failed to open keepalive state file for writing: %s\n", strerror(errno));
1635
+        LM_ERR("failed to open keepalive state file (%s) for writing: %s\n",
1636
+				keepalive_state_file, strerror(errno));
1636 1637
         return;
1637 1638
     }
1638 1639
 
... ...
@@ -1651,7 +1652,8 @@ save_keepalive_state(void)
1651 1652
     }
1652 1653
 
1653 1654
     if (ferror(f))
1654
-        LM_ERR("couldn't write keepalive state file: %s\n", strerror(errno));
1655
+        LM_ERR("couldn't write keepalive state file (%s): %s\n",
1656
+				keepalive_state_file, strerror(errno));
1655 1657
 
1656 1658
     fclose(f);
1657 1659
 }