X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=codemux.c;h=7d55e0d21698d07ab83e4eea6597daebcff1200c;hb=f096d803b71a9e2a6d0c46b5a7e94c64cebc75e7;hp=31a4dfc51d0d1d6433a13dc979633bc96a34b335;hpb=6bab2e9c4912fcad6c03b589128cd35157a87f18;p=codemux.git diff --git a/codemux.c b/codemux.c index 31a4dfc..7d55e0d 100644 --- a/codemux.c +++ b/codemux.c @@ -37,8 +37,8 @@ int defaultTraceSync; among them */ #define FAIRNESS_CUTOFF (MAX_CONNS * 0.85) -/* codemux version */ -#define CODEMUX_VERSION "0.4" +/* codemux version, from Makefile, or specfile */ +#define CODEMUX_VERSION RPM_VERSION typedef struct FlowBuf { int fb_refs; /* num refs */ @@ -1033,19 +1033,8 @@ static int OpenLogFile(void) { static const char* logfile = "/var/log/codemux.log"; - static const char* oldlogfile = "/var/log/codemux.log.old"; int logfd; - /* if the previous log file exists, - rename it to the oldlogfile */ - if (access(logfile, F_OK) == 0) { - if (rename(logfile, oldlogfile) < 0) { - fprintf(stderr, "cannot rotate the logfile err=%s\n", - strerror(errno)); - exit(-1); - } - } - logfd = open(logfile, O_WRONLY | O_APPEND | O_CREAT, 0600); if (logfd < 0) { fprintf(stderr, "cannot open the logfile err=%s\n",