Lines Matching refs:data
81 php_stream * net_stream = vio->data->m.get_stream(vio); in MYSQLND_METHOD()
112 ret = php_stream_write(vio->data->m.get_stream(vio), (char *)buffer, count); in MYSQLND_METHOD()
170 vio->data->stream = NULL; in MYSQLND_METHOD()
177 if (vio->data->options.timeout_connect) { in MYSQLND_METHOD()
178 tv.tv_sec = vio->data->options.timeout_connect; in MYSQLND_METHOD()
184 hashed_details, (vio->data->options.timeout_connect) ? &tv : NULL, in MYSQLND_METHOD()
249 php_stream * net_stream = vio->data->m.get_stream(vio); in MYSQLND_METHOD()
252 if (vio->data->options.timeout_read) { in MYSQLND_METHOD()
254 DBG_INF_FMT("setting %u as PHP_STREAM_OPTION_READ_TIMEOUT", vio->data->options.timeout_read); in MYSQLND_METHOD()
255 tv.tv_sec = vio->data->options.timeout_read; in MYSQLND_METHOD()
267 net_stream->chunk_size = vio->data->options.net_read_buffer_size; in MYSQLND_METHOD()
283 ret = vio->data->m.open_pipe; in MYSQLND_METHOD()
288 ret = vio->data->m.open_tcp_or_unix; in MYSQLND_METHOD()
309 vio->data->m.close_stream(vio, conn_stats, error_info); in MYSQLND_METHOD()
311 open_stream = vio->data->m.get_open_stream(vio, scheme, error_info); in MYSQLND_METHOD()
314 if (net_stream && PASS == vio->data->m.set_stream(vio, net_stream)) { in MYSQLND_METHOD()
315 vio->data->m.post_connect_set_opt(vio, scheme, conn_stats, error_info); in MYSQLND_METHOD()
334 net->data->options.net_read_buffer_size = *(unsigned int*) value; in MYSQLND_METHOD()
335 DBG_INF_FMT("new_length="MYSQLND_SZ_T_SPEC, net->data->options.net_read_buffer_size); in MYSQLND_METHOD()
339 net->data->options.timeout_connect = *(unsigned int*) value; in MYSQLND_METHOD()
344 if (net->data->options.ssl_key) { in MYSQLND_METHOD()
345 mnd_pefree(net->data->options.ssl_key, pers); in MYSQLND_METHOD()
347 net->data->options.ssl_key = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
353 if (net->data->options.ssl_cert) { in MYSQLND_METHOD()
354 mnd_pefree(net->data->options.ssl_cert, pers); in MYSQLND_METHOD()
356 net->data->options.ssl_cert = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
362 if (net->data->options.ssl_ca) { in MYSQLND_METHOD()
363 mnd_pefree(net->data->options.ssl_ca, pers); in MYSQLND_METHOD()
365 net->data->options.ssl_ca = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
371 if (net->data->options.ssl_capath) { in MYSQLND_METHOD()
372 mnd_pefree(net->data->options.ssl_capath, pers); in MYSQLND_METHOD()
374 net->data->options.ssl_capath = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
380 if (net->data->options.ssl_cipher) { in MYSQLND_METHOD()
381 mnd_pefree(net->data->options.ssl_cipher, pers); in MYSQLND_METHOD()
383 net->data->options.ssl_cipher = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
389 if (net->data->options.ssl_passphrase) { in MYSQLND_METHOD()
390 mnd_pefree(net->data->options.ssl_passphrase, pers); in MYSQLND_METHOD()
392 net->data->options.ssl_passphrase = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
414 net->data->options.ssl_verify_peer = val; in MYSQLND_METHOD()
418 net->data->options.timeout_read = *(unsigned int*) value; in MYSQLND_METHOD()
422 net->data->options.timeout_write = *(unsigned int*) value; in MYSQLND_METHOD()
448 php_stream * net_stream = net->data->get_stream(net); in MYSQLND_METHOD()
495 php_stream * net_stream = net->data->m.get_stream(net); in MYSQLND_METHOD()
500 if (net->data->options.ssl_key) { in MYSQLND_METHOD()
502 ZVAL_STRING(&key_zval, net->data->options.ssl_key); in MYSQLND_METHOD()
507 if (net->data->options.ssl_cert) { in MYSQLND_METHOD()
509 ZVAL_STRING(&cert_zval, net->data->options.ssl_cert); in MYSQLND_METHOD()
511 if (!net->data->options.ssl_key) { in MYSQLND_METHOD()
517 if (net->data->options.ssl_ca) { in MYSQLND_METHOD()
519 ZVAL_STRING(&cafile_zval, net->data->options.ssl_ca); in MYSQLND_METHOD()
524 if (net->data->options.ssl_capath) { in MYSQLND_METHOD()
526 ZVAL_STRING(&capath_zval, net->data->options.ssl_capath); in MYSQLND_METHOD()
531 if (net->data->options.ssl_passphrase) { in MYSQLND_METHOD()
533 ZVAL_STRING(&passphrase_zval, net->data->options.ssl_passphrase); in MYSQLND_METHOD()
538 if (net->data->options.ssl_cipher) { in MYSQLND_METHOD()
540 ZVAL_STRING(&cipher_zval, net->data->options.ssl_cipher); in MYSQLND_METHOD()
549 if (net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_DEFAULT) { in MYSQLND_METHOD()
550 …net->data->options.ssl_verify_peer = any_flag? MYSQLND_SSL_PEER_DEFAULT_ACTION:MYSQLND_SSL_PEER_DO… in MYSQLND_METHOD()
553 verify = net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_VERIFY? TRUE:FALSE; in MYSQLND_METHOD()
559 if (net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_DONT_VERIFY) { in MYSQLND_METHOD()
572 net->data->ssl = TRUE; in MYSQLND_METHOD()
582 if (net->data->options.timeout_read) { in MYSQLND_METHOD()
584 DBG_INF_FMT("setting %u as PHP_STREAM_OPTION_READ_TIMEOUT", net->data->options.timeout_read); in MYSQLND_METHOD()
585 tv.tv_sec = net->data->options.timeout_read; in MYSQLND_METHOD()
617 if (net->data->options.ssl_key) { in MYSQLND_METHOD()
618 mnd_pefree(net->data->options.ssl_key, pers); in MYSQLND_METHOD()
619 net->data->options.ssl_key = NULL; in MYSQLND_METHOD()
621 if (net->data->options.ssl_cert) { in MYSQLND_METHOD()
622 mnd_pefree(net->data->options.ssl_cert, pers); in MYSQLND_METHOD()
623 net->data->options.ssl_cert = NULL; in MYSQLND_METHOD()
625 if (net->data->options.ssl_ca) { in MYSQLND_METHOD()
626 mnd_pefree(net->data->options.ssl_ca, pers); in MYSQLND_METHOD()
627 net->data->options.ssl_ca = NULL; in MYSQLND_METHOD()
629 if (net->data->options.ssl_capath) { in MYSQLND_METHOD()
630 mnd_pefree(net->data->options.ssl_capath, pers); in MYSQLND_METHOD()
631 net->data->options.ssl_capath = NULL; in MYSQLND_METHOD()
633 if (net->data->options.ssl_cipher) { in MYSQLND_METHOD()
634 mnd_pefree(net->data->options.ssl_cipher, pers); in MYSQLND_METHOD()
635 net->data->options.ssl_cipher = NULL; in MYSQLND_METHOD()
649 if (net && (net_stream = net->data->m.get_stream(net))) { in MYSQLND_METHOD()
664 net->data->m.set_stream(net, NULL); in MYSQLND_METHOD()
680 net->data->m.set_client_option(net, MYSQLND_OPT_NET_READ_BUFFER_SIZE, (char *)&buf_size); in MYSQLND_METHOD()
683 net->data->m.set_client_option(net, MYSQL_OPT_READ_TIMEOUT, (char *)&buf_size); in MYSQLND_METHOD()
696 vio->data->m.free_contents(vio); in MYSQLND_METHOD()
697 vio->data->m.close_stream(vio, stats, error_info); in MYSQLND_METHOD()
711 DBG_INF_FMT("%p", net? net->data->stream:NULL); in MYSQLND_METHOD()
712 DBG_RETURN(net? net->data->stream:NULL); in MYSQLND_METHOD()
723 vio->data->stream = net_stream; in MYSQLND_METHOD()
736 DBG_INF_FMT("%p %p", vio, vio? vio->data->stream:NULL); in MYSQLND_METHOD()
737 DBG_RETURN((vio && vio->data->stream)? TRUE: FALSE); in MYSQLND_METHOD()
791 vio->data->m.dtor(vio, stats, error_info); in mysqlnd_vio_free()