diff -ru olsrd-0.5.2~/lib/bmf/src/Bmf.c olsrd-0.5.2/lib/bmf/src/Bmf.c --- olsrd-0.5.2~/lib/bmf/src/Bmf.c 2007-07-29 13:41:15.000000000 +0200 +++ olsrd-0.5.2/lib/bmf/src/Bmf.c 2007-07-31 20:45:52.000000000 +0200 @@ -1451,19 +1451,22 @@ RestoreSpoofFilter(); } - /* Signal BmfThread to exit */ - /* Strangely enough, all running threads receive the SIGALRM signal. But only the - * BMF thread is affected by this signal, having specified a handler for this - * signal in its thread entry function BmfRun(...). */ - if (pthread_kill(BmfThread, SIGALRM) != 0) + if (BmfThreadRunning) { - BmfPError("pthread_kill() error"); - } - - /* Wait for BmfThread to acknowledge */ - if (pthread_join(BmfThread, NULL) != 0) - { - BmfPError("pthread_join() error"); + /* Signal BmfThread to exit */ + /* Strangely enough, all running threads receive the SIGALRM signal. But only the + * BMF thread is affected by this signal, having specified a handler for this + * signal in its thread entry function BmfRun(...). */ + if (pthread_kill(BmfThread, SIGALRM) != 0) + { + BmfPError("pthread_kill() error"); + } + + /* Wait for BmfThread to acknowledge */ + if (pthread_join(BmfThread, NULL) != 0) + { + BmfPError("pthread_join() error"); + } } /* Clean up after the BmfThread has been killed */ diff -ru olsrd-0.5.2~/Makefile.inc olsrd-0.5.2/Makefile.inc --- olsrd-0.5.2~/Makefile.inc 2007-07-29 13:41:15.000000000 +0200 +++ olsrd-0.5.2/Makefile.inc 2007-07-31 22:23:04.000000000 +0200 @@ -64,6 +64,9 @@ # options to save space on small systems DEFINES += -DSUPPORT_OLD_PLUGIN_VERSIONS=1 +# we have plugins with the old interface +CPPFLAGS += -DSUPPORT_OLD_PLUGIN_VERSIONS=1 + # search sources and headers in current dir and in src/ SRCS = $(wildcard src/*.c) SRCS += $(wildcard *.c)