void vio_ssl_delete(Vio *vio) { if (!vio) return; /* It must be safe to delete null pointer */ if (vio->inactive == FALSE) vio_ssl_shutdown(vio); /* Still open, close connection first */ if (vio->ssl_arg) { SSL_free((SSL*) vio->ssl_arg); vio->ssl_arg= 0; } vio_delete(vio); }
void vio_ssl_delete(Vio *vio) { if (!vio) return; /* It must be safe to delete null pointer */ if (vio->type == VIO_TYPE_SSL) vio_ssl_close(vio); /* Still open, close connection first */ if (vio->ssl_arg) { SSL_free((SSL*) vio->ssl_arg); vio->ssl_arg= 0; } vio_delete(vio); }
void vio_delete_shared_memory(Vio *vio) { DBUG_ENTER("vio_delete_shared_memory"); if (!vio) DBUG_VOID_RETURN; if (vio->inactive == FALSE) vio->vioshutdown(vio); /* Close all handlers. UnmapViewOfFile and CloseHandle return non-zero result if they are success. */ if (UnmapViewOfFile(vio->handle_map) == 0) DBUG_PRINT("vio_error", ("UnmapViewOfFile() failed")); if (CloseHandle(vio->event_server_wrote) == 0) DBUG_PRINT("vio_error", ("CloseHandle(vio->esw) failed")); if (CloseHandle(vio->event_server_read) == 0) DBUG_PRINT("vio_error", ("CloseHandle(vio->esr) failed")); if (CloseHandle(vio->event_client_wrote) == 0) DBUG_PRINT("vio_error", ("CloseHandle(vio->ecw) failed")); if (CloseHandle(vio->event_client_read) == 0) DBUG_PRINT("vio_error", ("CloseHandle(vio->ecr) failed")); if (CloseHandle(vio->handle_file_map) == 0) DBUG_PRINT("vio_error", ("CloseHandle(vio->hfm) failed")); if (CloseHandle(vio->event_conn_closed) == 0) DBUG_PRINT("vio_error", ("CloseHandle(vio->ecc) failed")); vio_delete(vio); DBUG_VOID_RETURN; }