Lines Matching refs:pfc

33 MYSQLND_METHOD(mysqlnd_pfc, reset)(MYSQLND_PFC * const pfc, MYSQLND_STATS * const conn_stats, MYSQL…  in MYSQLND_METHOD()
36 pfc->data->packet_no = pfc->data->compressed_envelope_packet_no = 0; in MYSQLND_METHOD()
53 const MYSQLND_PFC *pfc, MYSQLND_VIO *vio, in write_compressed_packet() argument
60 …if (PASS == pfc->data->m.encode((compress_buf + COMPRESSED_HEADER_SIZE + MYSQLND_HEADER_SIZE), &tm… in write_compressed_packet()
72 int1store(compress_buf + 3, pfc->data->compressed_envelope_packet_no); in write_compressed_packet()
76 pfc->data->compressed_envelope_packet_no++; in write_compressed_packet()
81 int error = pfc->data->m.decode(decompressed_data, decompressed_size, in write_compressed_packet()
115 MYSQLND_METHOD(mysqlnd_pfc, send)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const vio, zend_uchar * co… in MYSQLND_METHOD()
128 DBG_INF_FMT("count=" MYSQLND_SZ_T_SPEC " compression=%u", count, pfc->data->compressed); in MYSQLND_METHOD()
130 if (pfc->data->compressed == TRUE) { in MYSQLND_METHOD()
140 DBG_INF_FMT("compressed_envelope_packet_no=%u", pfc->data->compressed_envelope_packet_no); in MYSQLND_METHOD()
141 DBG_INF_FMT("packet_no=%u", pfc->data->packet_no); in MYSQLND_METHOD()
143 if (pfc->data->compressed == TRUE) { in MYSQLND_METHOD()
147 int1store(uncompressed_payload + 3, pfc->data->packet_no); in MYSQLND_METHOD()
150 pfc, vio, conn_stats, error_info, in MYSQLND_METHOD()
157 pfc, vio, conn_stats, error_info, in MYSQLND_METHOD()
160 pfc, vio, conn_stats, error_info, in MYSQLND_METHOD()
171 int1store(p + 3, pfc->data->packet_no); in MYSQLND_METHOD()
174 pfc->data->compressed_envelope_packet_no++; in MYSQLND_METHOD()
176 pfc->data->packet_no++; in MYSQLND_METHOD()
190 DBG_INF_FMT("packet_size="MYSQLND_SZ_T_SPEC" packet_no=%u", left, pfc->data->packet_no); in MYSQLND_METHOD()
216 …(MYSQLND_PFC * pfc, MYSQLND_VIO * vio, size_t net_payload_size, MYSQLND_STATS * conn_stats, MYSQLN… in MYSQLND_METHOD()
239 pfc->data->uncompressed_data = mysqlnd_create_read_buffer(decompressed_size); in MYSQLND_METHOD()
240 …retval = pfc->data->m.decode(pfc->data->uncompressed_data->data, decompressed_size, compressed_dat… in MYSQLND_METHOD()
246 pfc->data->uncompressed_data = mysqlnd_create_read_buffer(net_payload_size); in MYSQLND_METHOD()
247 …if (FAIL == vio->data->m.network_read(vio, pfc->data->uncompressed_data->data, net_payload_size, c… in MYSQLND_METHOD()
315 MYSQLND_METHOD(mysqlnd_pfc, receive)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const vio, zend_uchar *… in MYSQLND_METHOD()
323 if (pfc->data->compressed) { in MYSQLND_METHOD()
324 if (pfc->data->uncompressed_data) { in MYSQLND_METHOD()
325 …size_t to_read_from_buffer = MIN(pfc->data->uncompressed_data->bytes_left(pfc->data->uncompressed_… in MYSQLND_METHOD()
328pfc->data->uncompressed_data->read(pfc->data->uncompressed_data, to_read_from_buffer, (zend_uchar … in MYSQLND_METHOD()
333 if (TRUE == pfc->data->uncompressed_data->is_empty(pfc->data->uncompressed_data)) { in MYSQLND_METHOD()
335 pfc->data->uncompressed_data->free_buffer(&pfc->data->uncompressed_data); in MYSQLND_METHOD()
348 if (pfc->data->compressed_envelope_packet_no != packet_no) { in MYSQLND_METHOD()
350 pfc->data->compressed_envelope_packet_no, packet_no, net_payload_size); in MYSQLND_METHOD()
353 pfc->data->compressed_envelope_packet_no, packet_no, net_payload_size); in MYSQLND_METHOD()
356 pfc->data->compressed_envelope_packet_no++; in MYSQLND_METHOD()
361pfc->data->m.read_compressed_packet_from_stream_and_fill_read_buffer(pfc, vio, net_payload_size, c… in MYSQLND_METHOD()
369 DBG_RETURN(pfc->data->m.receive(pfc, vio, p, to_read, conn_stats, error_info)); in MYSQLND_METHOD()
381 MYSQLND_METHOD(mysqlnd_pfc, set_client_option)(MYSQLND_PFC * const pfc, enum_mysqlnd_client_option … in MYSQLND_METHOD()
387 pfc->data->flags |= MYSQLND_PROTOCOL_FLAG_USE_COMPRESSION; in MYSQLND_METHOD()
390 const zend_bool pers = pfc->persistent; in MYSQLND_METHOD()
391 if (pfc->data->sha256_server_public_key) { in MYSQLND_METHOD()
392 mnd_pefree(pfc->data->sha256_server_public_key, pers); in MYSQLND_METHOD()
394 pfc->data->sha256_server_public_key = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
402 pfc->cmd_buffer.length = *(unsigned int*) value; in MYSQLND_METHOD()
403 DBG_INF_FMT("new_length="MYSQLND_SZ_T_SPEC, pfc->cmd_buffer.length); in MYSQLND_METHOD()
404 if (!pfc->cmd_buffer.buffer) { in MYSQLND_METHOD()
405 pfc->cmd_buffer.buffer = mnd_pemalloc(pfc->cmd_buffer.length, pfc->persistent); in MYSQLND_METHOD()
407pfc->cmd_buffer.buffer = mnd_perealloc(pfc->cmd_buffer.buffer, pfc->cmd_buffer.length, pfc->persis… in MYSQLND_METHOD()
421 MYSQLND_METHOD(mysqlnd_pfc, free_contents)(MYSQLND_PFC * pfc) in MYSQLND_METHOD()
426 if (pfc->data->uncompressed_data) { in MYSQLND_METHOD()
427 pfc->data->uncompressed_data->free_buffer(&pfc->data->uncompressed_data); in MYSQLND_METHOD()
430 if (pfc->data->sha256_server_public_key) { in MYSQLND_METHOD()
431 mnd_pefree(pfc->data->sha256_server_public_key, pfc->persistent); in MYSQLND_METHOD()
432 pfc->data->sha256_server_public_key = NULL; in MYSQLND_METHOD()
442 MYSQLND_METHOD(mysqlnd_pfc, init)(MYSQLND_PFC * const pfc, MYSQLND_STATS * const stats, MYSQLND_ERR… in MYSQLND_METHOD()
448 pfc->data->m.set_client_option(pfc, MYSQLND_OPT_NET_CMD_BUFFER_SIZE, (char *) &buf_size); in MYSQLND_METHOD()
457 MYSQLND_METHOD(mysqlnd_pfc, dtor)(MYSQLND_PFC * const pfc, MYSQLND_STATS * const stats, MYSQLND_ERR… in MYSQLND_METHOD()
460 if (pfc) { in MYSQLND_METHOD()
461 pfc->data->m.free_contents(pfc); in MYSQLND_METHOD()
463 if (pfc->cmd_buffer.buffer) { in MYSQLND_METHOD()
465 mnd_pefree(pfc->cmd_buffer.buffer, pfc->persistent); in MYSQLND_METHOD()
466 pfc->cmd_buffer.buffer = NULL; in MYSQLND_METHOD()
469 mnd_pefree(pfc, pfc->persistent); in MYSQLND_METHOD()
504 MYSQLND_PFC * pfc; in mysqlnd_pfc_init() local
506 pfc = factory->get_protocol_frame_codec(persistent, stats, error_info); in mysqlnd_pfc_init()
507 DBG_RETURN(pfc); in mysqlnd_pfc_init()
514 mysqlnd_pfc_free(MYSQLND_PFC * const pfc, MYSQLND_STATS * stats, MYSQLND_ERROR_INFO * error_info) in mysqlnd_pfc_free() argument
517 if (pfc) { in mysqlnd_pfc_free()
518 pfc->data->m.dtor(pfc, stats, error_info); in mysqlnd_pfc_free()