projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add an evil cast, because POSIX/SUSv2 define connect(2) require
[oweals/openssl.git]
/
crypto
/
bio
/
bss_log.c
diff --git
a/crypto/bio/bss_log.c
b/crypto/bio/bss_log.c
index db82e757e7a5ef0e5fe4a872679eff34315e8a68..4308b196633630e72eb35188416770a295107ca2 100644
(file)
--- a/
crypto/bio/bss_log.c
+++ b/
crypto/bio/bss_log.c
@@
-72,6
+72,8
@@
#else
#include <syslog.h>
#endif
#else
#include <syslog.h>
#endif
+#else
+#include <process.h>
#endif
#include "cryptlib.h"
#endif
#include "cryptlib.h"
@@
-98,6
+100,7
@@
static BIO_METHOD methods_slg=
slg_ctrl,
slg_new,
slg_free,
slg_ctrl,
slg_new,
slg_free,
+ NULL,
};
BIO_METHOD *BIO_s_log(void)
};
BIO_METHOD *BIO_s_log(void)
@@
-131,8
+134,10
@@
static int MS_CALLBACK slg_write(BIO *b, char *in, int inl)
char* buf= in;
char* pp;
#if defined(WIN32)
char* buf= in;
char* pp;
#if defined(WIN32)
- LP
TSTR lpszStrings[1
];
+ LP
CSTR lpszStrings[2
];
WORD evtype= EVENTLOG_ERROR_TYPE;
WORD evtype= EVENTLOG_ERROR_TYPE;
+ int pid = _getpid();
+ char pidbuf[20];
#else
int priority;
#endif
#else
int priority;
#endif
@@
-156,10
+161,13
@@
static int MS_CALLBACK slg_write(BIO *b, char *in, int inl)
evtype= EVENTLOG_ERROR_TYPE;
pp= buf;
}
evtype= EVENTLOG_ERROR_TYPE;
pp= buf;
}
- lpszStrings[0]= pp;
+
+ sprintf(pidbuf, "[%d] ", pid);
+ lpszStrings[0] = pidbuf;
+ lpszStrings[1] = pp;
if(b->ptr)
if(b->ptr)
- ReportEvent(b->ptr, evtype, 0, 1024, NULL,
1
, 0,
+ ReportEvent(b->ptr, evtype, 0, 1024, NULL,
2
, 0,
lpszStrings, NULL);
#else
if(strncmp(buf, "ERR ", 4) == 0){
lpszStrings, NULL);
#else
if(strncmp(buf, "ERR ", 4) == 0){