Module: kamailio
Branch: master
Commit: 732c21986c95668fec0c6e4cf8de4672a3ba8b71
URL: 
https://github.com/kamailio/kamailio/commit/732c21986c95668fec0c6e4cf8de4672a3ba8b71

Author: Henning Westerholt <h...@gilawa.com>
Committer: Henning Westerholt <h...@gilawa.com>
Date: 2025-08-04T19:39:26Z

file_out: fix error, for loop initial declarations are only allowed in C99 mode

---

Modified: src/modules/file_out/file_out.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/732c21986c95668fec0c6e4cf8de4672a3ba8b71.diff
Patch: 
https://github.com/kamailio/kamailio/commit/732c21986c95668fec0c6e4cf8de4672a3ba8b71.patch

---

diff --git a/src/modules/file_out/file_out.c b/src/modules/file_out/file_out.c
index 6ec2a950119..0303e1c956f 100644
--- a/src/modules/file_out/file_out.c
+++ b/src/modules/file_out/file_out.c
@@ -246,7 +246,8 @@ static int fo_rotate_file(int index)
 
 static void fo_timer_check_interval(unsigned int ticks, void *param)
 {
-       for(int index = 0; index < *fo_number_of_files; index++) {
+       int index = 0;
+       for(index = 0; index < *fo_number_of_files; index++) {
                if(fo_rotate_file(index) == 1) {
                        LM_DBG("Next write will rotate the file %d\n", index);
                }

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to