Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 22256 | Differences between
and this patch

Collapse All | Expand All

(-)mod_gzip_debug.c (-2 / +10 lines)
Lines 94-99 Link Here
94
#include "httpd.h"
94
#include "httpd.h"
95
#include "http_config.h"
95
#include "http_config.h"
96
#include "http_log.h"
96
#include "http_log.h"
97
#include <stdlib.h>
97
98
98
#include "mod_gzip.h"
99
#include "mod_gzip.h"
99
#include "mod_gzip_debug.h"
100
#include "mod_gzip_debug.h"
Lines 125-131 void mod_gzip_printf( const char *fmt, . Link Here
125
126
126
 va_start( ap, fmt );
127
 va_start( ap, fmt );
127
128
128
 l = vsprintf( log_line, fmt, ap );
129
 l = vsnprintf( log_line, sizeof(log_line), "%s", fmt, ap );
129
130
130
 va_end(ap);
131
 va_end(ap);
131
132
Lines 138-143 void mod_gzip_printf( const char *fmt, . Link Here
138
139
139
void mod_gzip_printf( const char *fmt, ... )
140
void mod_gzip_printf( const char *fmt, ... )
140
{
141
{
142
 long rndNum;
143
 time_t seed = time(NULL);
141
 int   l;
144
 int   l;
142
 char *p1;
145
 char *p1;
143
 FILE *log;
146
 FILE *log;
Lines 153-158 void mod_gzip_printf( const char *fmt, . Link Here
153
 long pid = (long) getpid();
156
 long pid = (long) getpid();
154
 #endif
157
 #endif
155
158
159
 srand(seed);
160
161
 rndNum = 1+ (int)(1000.0*rand()/(RAND_MAX+1.0));
162
 rndNum *= pid; 
163
156
 #ifdef WIN32
164
 #ifdef WIN32
157
 sprintf( logname, "c:\\temp\\t%ld.log",(long)pid);
165
 sprintf( logname, "c:\\temp\\t%ld.log",(long)pid);
158
 #else
166
 #else
Lines 168-174 void mod_gzip_printf( const char *fmt, . Link Here
168
176
169
 va_start( ap, fmt );
177
 va_start( ap, fmt );
170
178
171
 l = vsprintf(log_line, fmt, ap);
179
 l = vsnprintf(log_line, sizeof(log_line), "%s",fmt, ap);
172
180
173
 p1=log_line;
181
 p1=log_line;
174
 while((*p1!=0)&&(*p1!=13)&&(*p1!=10)) p1++;
182
 while((*p1!=0)&&(*p1!=13)&&(*p1!=10)) p1++;

Return to bug 22256