summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_net.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2011-10-21 15:28:58 +0000
committerAndrey Hristov <andrey@php.net>2011-10-21 15:28:58 +0000
commit652490d43a6d5d2c16c8ceb8a93284fbe24d377a (patch)
tree337d5e9a2ca305289aaac8c9b5b8ca47f793f215 /ext/mysqlnd/mysqlnd_net.c
parentd81ea16ef14735b97f22702ca1a78c3674fd987e (diff)
downloadphp-git-652490d43a6d5d2c16c8ceb8a93284fbe24d377a.tar.gz
shift code around to two new files - mysqlnd_driver.c
and mysqlnd_ext_plugin.c (mysqlnd extension plugin)
Diffstat (limited to 'ext/mysqlnd/mysqlnd_net.c')
-rw-r--r--ext/mysqlnd/mysqlnd_net.c32
1 files changed, 6 insertions, 26 deletions
diff --git a/ext/mysqlnd/mysqlnd_net.c b/ext/mysqlnd/mysqlnd_net.c
index 405919339c..e36c3e8020 100644
--- a/ext/mysqlnd/mysqlnd_net.c
+++ b/ext/mysqlnd/mysqlnd_net.c
@@ -12,11 +12,13 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Georg Richter <georg@mysql.com> |
- | Andrey Hristov <andrey@mysql.com> |
+ | Authors: Andrey Hristov <andrey@mysql.com> |
| Ulf Wendel <uwendel@mysql.com> |
+ | Georg Richter <georg@mysql.com> |
+----------------------------------------------------------------------+
*/
+
+/* $Id: mysqlnd_ps.c 316906 2011-09-17 10:24:18Z pajoye $ */
#include "php.h"
#include "php_globals.h"
#include "mysqlnd.h"
@@ -24,7 +26,7 @@
#include "mysqlnd_wireprotocol.h"
#include "mysqlnd_statistics.h"
#include "mysqlnd_debug.h"
-#include "ext/standard/sha1.h"
+#include "mysqlnd_ext_plugin.h"
#include "php_network.h"
#include "zend_ini.h"
#ifdef MYSQLND_COMPRESSION_ENABLED
@@ -1002,7 +1004,6 @@ MYSQLND_METHOD(mysqlnd_net, dtor)(MYSQLND_NET * const net, MYSQLND_STATS * const
/* }}} */
-static
MYSQLND_CLASS_METHODS_START(mysqlnd_net)
MYSQLND_METHOD(mysqlnd_net, init),
MYSQLND_METHOD(mysqlnd_net, dtor),
@@ -1043,7 +1044,7 @@ mysqlnd_net_init(zend_bool persistent, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO
DBG_INF_FMT("persistent=%u", persistent);
if (net) {
net->persistent = persistent;
- net->m = mysqlnd_mysqlnd_net_methods;
+ net->m = *mysqlnd_net_get_methods();
if (PASS != net->m.init(net, stats, error_info TSRMLS_CC)) {
net->m.dtor(net, stats, error_info TSRMLS_CC);
@@ -1068,27 +1069,6 @@ mysqlnd_net_free(MYSQLND_NET * const net, MYSQLND_STATS * stats, MYSQLND_ERROR_I
/* }}} */
-/* {{{ _mysqlnd_plugin_get_plugin_net_data */
-PHPAPI void ** _mysqlnd_plugin_get_plugin_net_data(const MYSQLND_NET * net, unsigned int plugin_id TSRMLS_DC)
-{
- DBG_ENTER("_mysqlnd_plugin_get_plugin_net_data");
- DBG_INF_FMT("plugin_id=%u", plugin_id);
- if (!net || plugin_id >= mysqlnd_plugin_count()) {
- return NULL;
- }
- DBG_RETURN((void *)((char *)net + sizeof(MYSQLND_NET) + plugin_id * sizeof(void *)));
-}
-/* }}} */
-
-
-/* {{{ mysqlnd_net_get_methods */
-PHPAPI struct st_mysqlnd_net_methods *
-mysqlnd_net_get_methods()
-{
- return &mysqlnd_mysqlnd_net_methods;
-}
-/* }}} */
-
/*
* Local variables: