瀏覽代碼

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

- tm_mon is from 0-11
Daniel-Constantin Mierla 5 年之前
父節點
當前提交
97593d2087
共有 1 個文件被更改,包括 1 次插入1 次删除
  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" );