aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interface.c4
-rw-r--r--src/myfprintf.c16
2 files changed, 12 insertions, 8 deletions
diff --git a/src/interface.c b/src/interface.c
index 29e372a5e..196ff7706 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -49,7 +49,7 @@
#define INTERFACE_LIST_MODE_END "command_list_end"
#define INTERFACE_DEFAULT_OUT_BUFFER_SIZE 4096
-int interface_max_connections;
+int interface_max_connections = 0;
int interface_timeout;
unsigned long long interface_max_command_list_size;
unsigned long long interface_max_output_buffer_size;
@@ -472,6 +472,8 @@ void freeAllInterfaces() {
closeAllInterfaces();
free(interfaces);
+
+ interface_max_connections = 0;
}
void closeOldInterfaces() {
diff --git a/src/myfprintf.c b/src/myfprintf.c
index e2c366a1d..e73f307f9 100644
--- a/src/myfprintf.c
+++ b/src/myfprintf.c
@@ -74,13 +74,15 @@ void myfprintf(FILE * fp, char * format, ... ) {
memset(buffer,0,BUFFER_LENGTH+1);
va_start(arglist,format);
- if(myfprintf_stdLogMode && (fd==1 || fd==2)) {
- time_t t = time(NULL);
- if(fd==1) fp = myfprintf_out;
- else fp = myfprintf_err;
- strftime(buffer,14,"%b %e %R",localtime(&t));
- blockingWrite(fd,buffer,strlen(buffer));
- blockingWrite(fd," : ",3);
+ if(fd==1 || fd==2) {
+ if(myfprintf_stdLogMode) {
+ time_t t = time(NULL);
+ if(fd==1) fp = myfprintf_out;
+ else fp = myfprintf_err;
+ strftime(buffer,14,"%b %e %R",localtime(&t));
+ blockingWrite(fd,buffer,strlen(buffer));
+ blockingWrite(fd," : ",3);
+ }
vsnprintf(buffer,BUFFER_LENGTH,format,arglist);
blockingWrite(fd,buffer,strlen(buffer));
}