Skip to content

Commit

Permalink
Merge pull request #125 from digital-science/fix_ssh2_crash
Browse files Browse the repository at this point in the history
initialize threading in ssh2 module
  • Loading branch information
postwait committed Dec 18, 2012
2 parents 9b93e9a + f22693d commit 6190acd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modules/ssh2.c
Expand Up @@ -48,6 +48,7 @@
#include "utils/noit_hash.h"

#include <libssh2.h>
#include <gcrypt.h>

#define DEFAULT_SSH_PORT 22

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 6190acd

Please sign in to comment.