linux crl dir monitoring fixes

This commit is contained in:
toddouska
2012-05-23 16:55:26 -07:00
parent 0aea2607b5
commit db7773aa54
3 changed files with 7 additions and 4 deletions

View File

@ -500,7 +500,7 @@ AC_ARG_ENABLE(crl,
if test "$ENABLED_CRL" = "yes"
then
AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL"
AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL -DHAVE_CRL_MONITOR"
fi
AM_CONDITIONAL([BUILD_CRL], [test "x$ENABLED_CRL" = "xyes"])

View File

@ -393,7 +393,8 @@ static void* DoMonitor(void* arg)
#elif __linux__
#include <sys/types.h>
#include <linux/inotify.h>
#include <sys/inotify.h>
#include <unistd.h>
/* linux monitoring */
static void* DoMonitor(void* arg)
@ -411,7 +412,7 @@ static void* DoMonitor(void* arg)
}
if (crl->monitors[0].path) {
wd = inotify_add_watch(notifyFd, crl->monitors[0].path, IN_CREATE |
wd = inotify_add_watch(notifyFd, crl->monitors[0].path, IN_CLOSE_WRITE |
IN_DELETE);
if (wd < 0) {
CYASSL_MSG("PEM notify add watch failed");
@ -420,7 +421,7 @@ static void* DoMonitor(void* arg)
}
if (crl->monitors[1].path) {
wd = inotify_add_watch(notifyFd, crl->monitors[1].path, IN_CREATE |
wd = inotify_add_watch(notifyFd, crl->monitors[1].path, IN_CLOSE_WRITE |
IN_DELETE);
if (wd < 0) {
CYASSL_MSG("DER notify add watch failed");

View File

@ -72,5 +72,7 @@ endif
if BUILD_CRL
src_libcyassl_la_SOURCES += src/crl.c
src_libcyassl_la_CFLAGS += $(PTHREAD_CFLAGS)
src_libcyassl_la_LIBADD += $(PTHREAD_LIBS)
endif