Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #125 from digital-science/fix_ssh2_crash

initialize threading in ssh2 module
  • Loading branch information...
commit 6190acd6f9f05160f76f59affe1496742d51aa48 2 parents 9b93e9a + f22693d
@postwait postwait authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/modules/ssh2.c
View
5 src/modules/ssh2.c
@@ -48,6 +48,7 @@
#include "utils/noit_hash.h"
#include <libssh2.h>
+#include <gcrypt.h>
#define DEFAULT_SSH_PORT 22
@@ -103,7 +104,11 @@ static void ssh2_cleanup(noit_module_t *self, noit_check_t *check) {
memset(ci, 0, sizeof(*ci));
}
}
+
+GCRY_THREAD_OPTION_PTHREAD_IMPL;
+
static int ssh2_init(noit_module_t *self) {
+ gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
return 0;
}
static int ssh2_config(noit_module_t *self, noit_hash_table *options) {
Please sign in to comment.
Something went wrong with that request. Please try again.