summaryrefslogtreecommitdiff
path: root/src/libcharon/plugins/ha/ha_socket.c
diff options
context:
space:
mode:
authorRené Mayrhofer <rene@mayrhofer.eu.org>2011-03-05 09:20:09 +0100
committerRené Mayrhofer <rene@mayrhofer.eu.org>2011-03-05 09:20:09 +0100
commit568905f488e63e28778f87ac0e38d845f45bae79 (patch)
treed9969a147e36413583ff4bc75542d34c955f8823 /src/libcharon/plugins/ha/ha_socket.c
parentf73fba54dc8b30c6482e1e8abf15bbf455592fcd (diff)
downloadvyos-strongswan-568905f488e63e28778f87ac0e38d845f45bae79.tar.gz
vyos-strongswan-568905f488e63e28778f87ac0e38d845f45bae79.zip
Imported Upstream version 4.5.1
Diffstat (limited to 'src/libcharon/plugins/ha/ha_socket.c')
-rw-r--r--src/libcharon/plugins/ha/ha_socket.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcharon/plugins/ha/ha_socket.c b/src/libcharon/plugins/ha/ha_socket.c
index 614c70ed3..086178442 100644
--- a/src/libcharon/plugins/ha/ha_socket.c
+++ b/src/libcharon/plugins/ha/ha_socket.c
@@ -20,10 +20,10 @@
#include <sys/socket.h>
#include <errno.h>
#include <unistd.h>
-#include <pthread.h>
#include <daemon.h>
#include <utils/host.h>
+#include <threading/thread.h>
#include <processing/jobs/callback_job.h>
typedef struct private_ha_socket_t private_ha_socket_t;
@@ -121,12 +121,12 @@ METHOD(ha_socket_t, pull, ha_message_t*,
{
ha_message_t *message;
char buf[1024];
- int oldstate;
+ bool oldstate;
ssize_t len;
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &oldstate);
+ oldstate = thread_cancelability(TRUE);
len = recv(this->fd, buf, sizeof(buf), 0);
- pthread_setcancelstate(oldstate, NULL);
+ thread_cancelability(oldstate);
if (len <= 0)
{
switch (errno)