Skip to content
Snippets Groups Projects
Commit 90ac15e7 authored by benbergk's avatar benbergk
Browse files

fixed bug (multiple initialization of ssl library)

parent 18c2de5a
Branches front-end
No related tags found
No related merge requests found
...@@ -29,9 +29,6 @@ void HttpsReader::request() ...@@ -29,9 +29,6 @@ void HttpsReader::request()
// Build an SSL layer and set it to read/write // Build an SSL layer and set it to read/write
// to the socket we've connected. // to the socket we've connected.
SSL_library_init( );
ctx = SSL_CTX_new( SSLv23_method( ) ); ctx = SSL_CTX_new( SSLv23_method( ) );
assert( ctx ); assert( ctx );
ssl = SSL_new( ctx ); ssl = SSL_new( ctx );
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <pthread.h> #include <pthread.h>
#include <queue> #include <queue>
#include "crawler/crawler.h" #include "crawler/crawler.h"
#include <openssl/ssl.h>
#include <string> #include <string>
//#include "crawler/CrawlerStatistics.h" //#include "crawler/CrawlerStatistics.h"
#include <unordered_map> #include <unordered_map>
...@@ -49,7 +50,7 @@ int main( int argc, char *argv[] ) ...@@ -49,7 +50,7 @@ int main( int argc, char *argv[] )
string mode = "web"; string mode = "web";
int numberOfSpiders = 1; int numberOfSpiders = 3;
opterr = true; opterr = true;
int choice; int choice;
...@@ -94,8 +95,11 @@ int main( int argc, char *argv[] ) ...@@ -94,8 +95,11 @@ int main( int argc, char *argv[] )
char *seeds; char *seeds;
if (mode == "local") if (mode == "local")
seeds = util::getFileMap("/tests/localSeed.txt"); seeds = util::getFileMap("/tests/localSeed.txt");
else else {
seeds = util::getFileMap("/tests/webSeed.txt"); seeds = util::getFileMap("/tests/webSeed.txt");
SSL_library_init( );
}
string testFile; string testFile;
while (*seeds) { while (*seeds) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment