Explorar o código

sipdump: make month in the file name from 1 to 12

- tm_mon is from 0-11
Daniel-Constantin Mierla %!s(int64=5) %!d(string=hai) anos
pai
achega
97593d2087
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/modules/sipdump/sipdump_write.c

+ 1 - 1
src/modules/sipdump/sipdump_write.c

@@ -202,7 +202,7 @@ static int sipdump_rotate_file(void)
 	n = snprintf(_sipdump_fpath+_sipdump_fpath_prefix.len,
 			SIPDUMP_FPATH_SIZE-_sipdump_fpath_prefix.len,
 			"%d-%02d-%02d--%02d-%02d-%02d.data",
-			1900+ti.tm_year, ti.tm_mon, ti.tm_mday,
+			1900+ti.tm_year, ti.tm_mon+1, ti.tm_mday,
 			ti.tm_hour, ti.tm_min, ti.tm_sec);
 	LM_DBG("writing to file: %s (%d)\n", _sipdump_fpath, n);
 	_sipdump_file = fopen( _sipdump_fpath, "w" );