summaryrefslogtreecommitdiff
path: root/src/libcharon/plugins/ha/ha_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/plugins/ha/ha_socket.c')
-rw-r--r--src/libcharon/plugins/ha/ha_socket.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libcharon/plugins/ha/ha_socket.c b/src/libcharon/plugins/ha/ha_socket.c
index 614c70ed3..29734bea3 100644
--- a/src/libcharon/plugins/ha/ha_socket.c
+++ b/src/libcharon/plugins/ha/ha_socket.c
@@ -20,10 +20,17 @@
#include <sys/socket.h>
#include <errno.h>
#include <unistd.h>
+<<<<<<< HEAD
#include <pthread.h>
#include <daemon.h>
#include <utils/host.h>
+=======
+
+#include <daemon.h>
+#include <utils/host.h>
+#include <threading/thread.h>
+>>>>>>> upstream/4.5.1
#include <processing/jobs/callback_job.h>
typedef struct private_ha_socket_t private_ha_socket_t;
@@ -121,12 +128,21 @@ METHOD(ha_socket_t, pull, ha_message_t*,
{
ha_message_t *message;
char buf[1024];
+<<<<<<< HEAD
int oldstate;
ssize_t len;
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &oldstate);
len = recv(this->fd, buf, sizeof(buf), 0);
pthread_setcancelstate(oldstate, NULL);
+=======
+ bool oldstate;
+ ssize_t len;
+
+ oldstate = thread_cancelability(TRUE);
+ len = recv(this->fd, buf, sizeof(buf), 0);
+ thread_cancelability(oldstate);
+>>>>>>> upstream/4.5.1
if (len <= 0)
{
switch (errno)