[Snort-devel] sp_session.c patch

Joe McAlerney joey at ...60...
Tue Aug 7 11:12:39 EDT 2001


This fixes filename problems with WIN32.

-Joe M.

-- 
|   Joe McAlerney     joey at ...63...   |
| Silicon Defense - Technical Support for Snort |
|       http://www.silicondefense.com/          |
+--                                           --+
-------------- next part --------------
--- ./snort/sp_session.c	Sat Apr  7 15:55:50 2001
+++ ./snort.new/sp_session.c	Tue Aug  7 08:03:57 2001
@@ -319,11 +319,19 @@
 
     if(p->sp >= p->dp)
     {
+#ifdef WIN32
+        sprintf(session_file, "%s/SESSION_%d-%d", log_path, p->sp, p->dp);
+#else
         sprintf(session_file, "%s/SESSION:%d-%d", log_path, p->sp, p->dp);
+#endif
     }
     else
     {
+#ifdef WIN32
+        sprintf(session_file, "%s/SESSION_%d-%d", log_path, p->dp, p->sp);
+#else
         sprintf(session_file, "%s/SESSION:%d-%d", log_path, p->dp, p->sp);
+#endif
     }
 
     filename = (char *) calloc(strlen(session_file)+1,sizeof(char));


More information about the Snort-devel mailing list