mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 01:23:03 +01:00
Cleanup of my old changes that were never used.
This commit is contained in:
parent
4f9d69e796
commit
ce99169d94
@ -42,7 +42,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
$Id: why.cpp,v 1.7 2003-01-04 17:18:27 skidder Exp $
|
$Id: why.cpp,v 1.8 2003-01-15 12:11:31 dimitr Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "firebird.h"
|
#include "firebird.h"
|
||||||
@ -91,7 +91,6 @@ $Id: why.cpp,v 1.7 2003-01-04 17:18:27 skidder Exp $
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_FCNTL_H
|
#ifdef HAVE_FCNTL_H
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#endif
|
#endif
|
||||||
@ -228,11 +227,6 @@ static void check_status_vector(STATUS *, STATUS);
|
|||||||
static STATUS error(STATUS *, STATUS *);
|
static STATUS error(STATUS *, STATUS *);
|
||||||
static STATUS error2(STATUS *, STATUS *);
|
static STATUS error2(STATUS *, STATUS *);
|
||||||
static void event_ast(UCHAR *, USHORT, UCHAR *);
|
static void event_ast(UCHAR *, USHORT, UCHAR *);
|
||||||
#ifdef EVENTS_WILDCARDING
|
|
||||||
#if defined(PIPE_CLIENT) || defined(SUPERCLIENT)
|
|
||||||
static void event_ast_stub(UCHAR *, USHORT, UCHAR *);
|
|
||||||
#endif /* PIPE_CLIENT || SUPERCLIENT */
|
|
||||||
#endif /* EVENTS_WILDCARDING */
|
|
||||||
static void exit_handler(EVENT);
|
static void exit_handler(EVENT);
|
||||||
static WHY_TRA find_transaction(WHY_DBB, WHY_TRA);
|
static WHY_TRA find_transaction(WHY_DBB, WHY_TRA);
|
||||||
static void free_block(void*);
|
static void free_block(void*);
|
||||||
@ -3970,34 +3964,10 @@ STATUS API_ROUTINE GDS_QUE_EVENTS(STATUS * user_status,
|
|||||||
STATUS local[ISC_STATUS_LENGTH], *status;
|
STATUS local[ISC_STATUS_LENGTH], *status;
|
||||||
WHY_ATT database;
|
WHY_ATT database;
|
||||||
|
|
||||||
/* Simple structure that incapsulates the real arguments
|
|
||||||
that should be passed to the AST stub */
|
|
||||||
#ifdef EVENTS_WILDCARDING
|
|
||||||
struct {
|
|
||||||
void (*ast)();
|
|
||||||
void *arg;
|
|
||||||
} *ast_arg = NULL;
|
|
||||||
#endif /* EVENTS_WILDCARDING */
|
|
||||||
|
|
||||||
GET_STATUS;
|
GET_STATUS;
|
||||||
database = *handle;
|
database = *handle;
|
||||||
CHECK_HANDLE(database, HANDLE_database, isc_bad_db_handle);
|
CHECK_HANDLE(database, HANDLE_database, isc_bad_db_handle);
|
||||||
|
|
||||||
|
|
||||||
/* Substitute real AST and argument with the stub and the above structure */
|
|
||||||
|
|
||||||
#ifdef EVENTS_WILDCARDING
|
|
||||||
#if defined(PIPE_CLIENT) || defined(SUPERCLIENT)
|
|
||||||
ast_arg = gds__alloc(sizeof(void*) * 2);
|
|
||||||
if (ast_arg) {
|
|
||||||
ast_arg->arg = arg;
|
|
||||||
ast_arg->ast = ast;
|
|
||||||
ast = event_ast_stub;
|
|
||||||
arg = ast_arg;
|
|
||||||
}
|
|
||||||
#endif /* PIPE_CLIENT || SUPERCLIENT */
|
|
||||||
#endif /* EVENTS_WILDCARDING */
|
|
||||||
|
|
||||||
subsystem_enter();
|
subsystem_enter();
|
||||||
|
|
||||||
if (CALL(PROC_QUE_EVENTS, database->implementation) (status,
|
if (CALL(PROC_QUE_EVENTS, database->implementation) (status,
|
||||||
@ -5361,55 +5331,6 @@ static void event_ast(UCHAR * buffer, USHORT length, UCHAR * items)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef EVENTS_WILDCARDING
|
|
||||||
#if defined(PIPE_CLIENT) || defined(SUPERCLIENT)
|
|
||||||
static void event_ast_stub(UCHAR * buffer, USHORT length, UCHAR * items)
|
|
||||||
{
|
|
||||||
/**************************************
|
|
||||||
*
|
|
||||||
* e v e n t _ a s t _ s t u b
|
|
||||||
*
|
|
||||||
**************************************
|
|
||||||
*
|
|
||||||
* Functional description
|
|
||||||
* We've got the detailed EPB passed,
|
|
||||||
* so we must parse it and let client
|
|
||||||
* think that it's the original one.
|
|
||||||
*
|
|
||||||
* This mechanism has been implemented
|
|
||||||
* to support events wildcarding. The
|
|
||||||
* stub passes 'length' argument decremented
|
|
||||||
* by the length of the detailed part
|
|
||||||
* of EPB. So all existing software should
|
|
||||||
* keep living.
|
|
||||||
*
|
|
||||||
**************************************/
|
|
||||||
|
|
||||||
USHORT i;
|
|
||||||
UCHAR *p = items, *end = items + length;
|
|
||||||
|
|
||||||
struct {
|
|
||||||
void (*ast)();
|
|
||||||
void *arg;
|
|
||||||
} *q = buffer;
|
|
||||||
|
|
||||||
p++;
|
|
||||||
while (p < end && *p) {
|
|
||||||
i = (USHORT) *p++;
|
|
||||||
p += i;
|
|
||||||
p += sizeof (SLONG);
|
|
||||||
}
|
|
||||||
p++;
|
|
||||||
|
|
||||||
length -= *(USHORT*)(p);
|
|
||||||
|
|
||||||
(q->ast)(q->arg, length, items);
|
|
||||||
|
|
||||||
gds__free(q);
|
|
||||||
}
|
|
||||||
#endif /* PIPE_CLIENT || SUPERCLIENT */
|
|
||||||
#endif /* EVENTS_WILDCARDING */
|
|
||||||
|
|
||||||
#ifndef REQUESTER
|
#ifndef REQUESTER
|
||||||
static void exit_handler(EVENT why_event)
|
static void exit_handler(EVENT why_event)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user