Browse Source

FIX: building without SSL

Juan José Gutiérrez de Quevedo Pérez 6 years ago
parent
commit
5627834132
2 changed files with 12 additions and 2 deletions
  1. 2 0
      src/Proxy.cpp
  2. 10 2
      src/Socket.cpp

+ 2 - 0
src/Proxy.cpp

@@ -261,8 +261,10 @@ void Proxy::run(string &peer_address)
           outside.writeLine(strtemp);
           strtemp="";
           string ssltls="";
+          #ifdef HAVE_SSL
           if (outside.is_ssl_enabled())
             ssltls=" (SSL/TLS)";
+          #endif //HAVE_SSL
 
           if(cfg.getAddHeaders())
           {

+ 10 - 2
src/Socket.cpp

@@ -294,7 +294,11 @@ string Socket::readLine()
   }
   while(c!=10&&!isClosed());
 
-  LDEB("r" + string(ssl_enabled?"s":"") + ">" + s.str());
+  LDEB(string("r") +
+  #ifdef HAVE_SSL
+    string(ssl_enabled?"s":"") +
+  #endif //HAVE_SSL
+  ">" + s.str());
 
   return s.str();
 }
@@ -344,7 +348,11 @@ void Socket::writeByte(char c)
 void Socket::writeLine(string s)
 {
 
-  LDEB("w" + string(ssl_enabled?"s":"") + ">" + s);
+  LDEB(string("w") +
+  #ifdef HAVE_SSL
+  string(ssl_enabled?"s":"") +
+  #endif //HAVE_SSL
+  ">" + s);
   s+="\r\n";
 
   writeBytes((void *)s.c_str(),s.length());