diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2013-11-19 22:33:48 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2013-11-19 22:33:48 +0100 |
commit | 1ec522538fb81a56b068c087d0a842faf7aa7869 (patch) | |
tree | 84dc0555c224120da8772b1714e7e4f1dfa66aa5 /sysdep/unix | |
parent | 0e175f9f0fd872e95225355dbdeca49cd35ec0fd (diff) |
BFD protocol, ready for release.
Supports OSPF and BGP and also statically configured sessions.
Diffstat (limited to 'sysdep/unix')
-rw-r--r-- | sysdep/unix/io.c | 2 | ||||
-rw-r--r-- | sysdep/unix/log.c | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index f0ec6dae..da8343f9 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -538,6 +538,8 @@ sk_free(resource *r) if (s->fd >= 0) { close(s->fd); + + /* FIXME: we should call sk_stop() for SKF_THREAD sockets */ if (s->flags & SKF_THREAD) return; diff --git a/sysdep/unix/log.c b/sysdep/unix/log.c index 67b70773..9dd4d66f 100644 --- a/sysdep/unix/log.c +++ b/sysdep/unix/log.c @@ -36,13 +36,20 @@ static const bird_clock_t rate_limit_time = 5; static const int rate_limit_count = 5; -// XXX add ifdef for threads +#ifdef USE_PTHREADS #include <pthread.h> static pthread_mutex_t log_mutex; static inline void log_lock(void) { pthread_mutex_lock(&log_mutex); } static inline void log_unlock(void) { pthread_mutex_unlock(&log_mutex); } +#else + +static inline void log_lock(void) { } +static inline void log_unlock(void) { } + +#endif + #ifdef HAVE_SYSLOG #include <sys/syslog.h> |