Created
November 15, 2016 12:42
-
-
Save kristapsk/1936b187509e9db72f732ca179bfab6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/hphp/runtime/ext/mysql/mysql_common.cpp b/hphp/runtime/ext/mysql/mysql_common.cpp | |
index 4ab1d17..a4947b0 100644 | |
--- a/hphp/runtime/ext/mysql/mysql_common.cpp | |
+++ b/hphp/runtime/ext/mysql/mysql_common.cpp | |
@@ -48,7 +48,7 @@ | |
#include "hphp/runtime/ext/std/ext_std_network.h" | |
#include "hphp/runtime/server/server-stats.h" | |
-#include "hphp/runtime/ext/async_mysql/ext_async_mysql.h" | |
+//#include "hphp/runtime/ext/async_mysql/ext_async_mysql.h" | |
#include "hphp/runtime/vm/native-data.h" | |
namespace HPHP { | |
@@ -605,11 +605,11 @@ Variant php_mysql_do_connect_with_ssl( | |
int query_timeout_ms, | |
const Variant& sslContextProvider /* = null */) { | |
std::shared_ptr<SSLOptionsProviderBase> ssl_provider; | |
- if (!sslContextProvider.isNull()) { | |
- auto* obj = | |
- Native::data<HPHP::MySSLContextProvider>(sslContextProvider.toObject()); | |
- ssl_provider = obj->getSSLProvider(); | |
- } | |
+// if (!sslContextProvider.isNull()) { | |
+// auto* obj = | |
+// Native::data<HPHP::MySSLContextProvider>(sslContextProvider.toObject()); | |
+// ssl_provider = obj->getSSLProvider(); | |
+// } | |
return php_mysql_do_connect_on_link( | |
nullptr, | |
@@ -636,16 +636,16 @@ static void mysql_set_ssl_options( | |
return; // shouldn't happen | |
} | |
- MYSQL* conn = mySQL->get(); | |
- mysql_options(conn, MYSQL_OPT_SSL_CONTEXT, ssl_context->getSSLCtx()); | |
- auto ssl_session = ssl_provider->getSSLSession(); | |
- if (ssl_session) { | |
- mysql_options4( | |
- conn, | |
- MYSQL_OPT_SSL_SESSION, | |
- ssl_session, | |
- (void*)1 /* take ownership */); | |
- } | |
+// MYSQL* conn = mySQL->get(); | |
+// mysql_options(conn, MYSQL_OPT_SSL_CONTEXT, ssl_context->getSSLCtx()); | |
+// auto ssl_session = ssl_provider->getSSLSession(); | |
+// if (ssl_session) { | |
+// mysql_options4( | |
+// conn, | |
+// MYSQL_OPT_SSL_SESSION, | |
+// ssl_session, | |
+// (void*)1 /* take ownership */); | |
+// } | |
} | |
static void mysql_store_ssl_session( | |
@@ -654,14 +654,14 @@ static void mysql_store_ssl_session( | |
if (!ssl_provider || !mySQL || mySQL->get() == nullptr) { | |
return; | |
} | |
- MYSQL* conn = mySQL->get(); | |
+// MYSQL* conn = mySQL->get(); | |
// if we reused the session it means we already have it, no need to store | |
- if (!mysql_get_ssl_session_reused(conn)) { | |
- wangle::SSLSessionPtr session((SSL_SESSION*)mysql_get_ssl_session(conn)); | |
- if (session) { | |
- ssl_provider->storeSSLSession(std::move(session)); | |
- } | |
- } | |
+// if (!mysql_get_ssl_session_reused(conn)) { | |
+// wangle::SSLSessionPtr session((SSL_SESSION*)mysql_get_ssl_session(conn)); | |
+// if (session) { | |
+// ssl_provider->storeSSLSession(std::move(session)); | |
+// } | |
+// } | |
} | |
Variant php_mysql_do_connect_on_link( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment