8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 06:03:02 +01:00

Renamed MSG to CSV_MSG.

This commit is contained in:
dimitr 2002-11-19 12:31:53 +00:00
parent 523ab4905e
commit 1d2f574cee
6 changed files with 32 additions and 32 deletions

View File

@ -93,7 +93,7 @@ static void event_handler(PTR);
static void event_thread(PTR); static void event_thread(PTR);
#endif #endif
static STATUS get_response(RDB, MSG, STATUS *, HANDLE *, USHORT, UCHAR *, static STATUS get_response(RDB, CSV_MSG, STATUS *, HANDLE *, USHORT, UCHAR *,
USHORT *); USHORT *);
static STATUS handle_error(STATUS *, STATUS); static STATUS handle_error(STATUS *, STATUS);
static STATUS info(RDB, STATUS *, HANDLE, MSG_T, USHORT, USHORT, UCHAR *, static STATUS info(RDB, STATUS *, HANDLE, MSG_T, USHORT, USHORT, UCHAR *,
@ -2407,7 +2407,7 @@ static void event_thread( PTR connection)
static STATUS get_response( static STATUS get_response(
RDB rdb, RDB rdb,
MSG message, CSV_MSG message,
STATUS * user_status, STATUS * user_status,
HANDLE * handle, HANDLE * handle,
USHORT buffer_length, UCHAR * buffer, USHORT * return_length) USHORT buffer_length, UCHAR * buffer, USHORT * return_length)

View File

@ -226,12 +226,12 @@ typedef enum {
MSG_drop_database MSG_drop_database
} MSG_T; } MSG_T;
typedef struct msg { typedef struct csv_msg {
HDR msg_header; HDR msg_header;
SRQ msg_que; SRQ msg_que;
MSG_T msg_type; /* Specific message type */ MSG_T msg_type; /* Specific message type */
PTR msg_connection; /* Process sending message */ PTR msg_connection; /* Process sending message */
} *MSG; } *CSV_MSG;
/* Miscellaneous message formats */ /* Miscellaneous message formats */

View File

@ -81,7 +81,7 @@ static void init(void *, SH_MEM, int);
static void insert_tail(SRQ *, SRQ *); static void insert_tail(SRQ *, SRQ *);
static void mutex_bugcheck(UCHAR *, int); static void mutex_bugcheck(UCHAR *, int);
static void punt(TEXT *); static void punt(TEXT *);
static int put_message(PTR, MSG, int); static int put_message(PTR, CSV_MSG, int);
#ifdef UNIX #ifdef UNIX
static void release_semaphore(USHORT); static void release_semaphore(USHORT);
#endif #endif
@ -398,7 +398,7 @@ PTR CSS_find_process( SLONG process_number)
} }
MSG CSS_get_message(PTR partner, MSG old_message, SSHORT timeout) CSV_MSG CSS_get_message(PTR partner, CSV_MSG old_message, SSHORT timeout)
{ {
/************************************** /**************************************
* *
@ -414,7 +414,7 @@ MSG CSS_get_message(PTR partner, MSG old_message, SSHORT timeout)
* *
**************************************/ **************************************/
PRB process; PRB process;
MSG message; CSV_MSG message;
CNCT connection; CNCT connection;
SRQ *que; SRQ *que;
SLONG count, status; SLONG count, status;
@ -445,7 +445,7 @@ MSG CSS_get_message(PTR partner, MSG old_message, SSHORT timeout)
for (;;) { for (;;) {
process->prb_flags &= ~PRB_signal_me; process->prb_flags &= ~PRB_signal_me;
QUE_LOOP(process->prb_messages, que) { QUE_LOOP(process->prb_messages, que) {
message = (MSG) ((UCHAR *) que - OFFSET(MSG, msg_que)); message = (CSV_MSG) ((UCHAR *) que - OFFSET(CSV_MSG, msg_que));
connection = (CNCT) ABS_PTR(message->msg_connection); connection = (CNCT) ABS_PTR(message->msg_connection);
if (!partner || connection->cnct_mirror == partner) if (!partner || connection->cnct_mirror == partner)
goto got_one; goto got_one;
@ -659,7 +659,7 @@ void CSS_probe_processes(void)
} }
int CSS_put_message( PTR connection_id, MSG message, MSG old_message) int CSS_put_message( PTR connection_id, CSV_MSG message, CSV_MSG old_message)
{ {
/************************************** /**************************************
* *
@ -946,7 +946,7 @@ static void delete_process( SLONG process_offset)
* *
**************************************/ **************************************/
PRB process; PRB process;
MSG message; CSV_MSG message;
process = (PRB) ABS_PTR(process_offset); process = (PRB) ABS_PTR(process_offset);
@ -961,8 +961,8 @@ static void delete_process( SLONG process_offset)
while (!QUE_EMPTY(process->prb_messages)) { while (!QUE_EMPTY(process->prb_messages)) {
message = message =
(MSG) ABS_PTR(process->prb_messages.srq_forward - (CSV_MSG) ABS_PTR(process->prb_messages.srq_forward -
OFFSET(MSG, msg_que)); OFFSET(CSV_MSG, msg_que));
remove_que(&message->msg_que); remove_que(&message->msg_que);
free_global(message); free_global(message);
} }
@ -997,7 +997,7 @@ static void disconnect( SLONG process_offset, SLONG cnct_id)
* *
**************************************/ **************************************/
CNCT connection, mirror; CNCT connection, mirror;
MSG message; CSV_MSG message;
PRB process, partner; PRB process, partner;
SRQ *que; SRQ *que;
@ -1008,7 +1008,7 @@ static void disconnect( SLONG process_offset, SLONG cnct_id)
/* Purge message que of any traffic from connection */ /* Purge message que of any traffic from connection */
QUE_LOOP(process->prb_messages, que) { QUE_LOOP(process->prb_messages, que) {
message = (MSG) ((UCHAR *) que - OFFSET(MSG, msg_que)); message = (CSV_MSG) ((UCHAR *) que - OFFSET(CSV_MSG, msg_que));
if (message->msg_connection == connection->cnct_mirror) { if (message->msg_connection == connection->cnct_mirror) {
que = (SRQ *) ABS_PTR(que->srq_backward); que = (SRQ *) ABS_PTR(que->srq_backward);
remove_que(&message->msg_que); remove_que(&message->msg_que);
@ -1026,7 +1026,7 @@ static void disconnect( SLONG process_offset, SLONG cnct_id)
if (connection->cnct_partner) { if (connection->cnct_partner) {
partner = (PRB) ABS_PTR(connection->cnct_partner); partner = (PRB) ABS_PTR(connection->cnct_partner);
partner->prb_flags |= PRB_signal_me; partner->prb_flags |= PRB_signal_me;
message = (MSG) alloc_global(type_msg, sizeof(struct msg)); message = (CSV_MSG) alloc_global(type_msg, sizeof(struct msg));
message->msg_type = MSG_disconnect; message->msg_type = MSG_disconnect;
put_message(cnct_id, message, FALSE); put_message(cnct_id, message, FALSE);
mirror->cnct_partner = 0; mirror->cnct_partner = 0;
@ -1054,7 +1054,7 @@ static void dump(void)
SRQ *que; SRQ *que;
HDR *block; HDR *block;
PRB process; PRB process;
MSG message; CSV_MSG message;
FRB free; FRB free;
CNCT connection; CNCT connection;
SLONG offset; SLONG offset;
@ -1092,8 +1092,8 @@ static void dump(void)
break; break;
case type_msg: case type_msg:
printf("MSG (%ld)\n", block->hdr_length); printf("CSV_MSG (%ld)\n", block->hdr_length);
message = (MSG) block; message = (CSV_MSG) block;
printf("\tType: %d, connection: %ld\n", message->msg_type, printf("\tType: %d, connection: %ld\n", message->msg_type,
message->msg_connection); message->msg_connection);
dump_que("\tMsg que", &message->msg_que); dump_que("\tMsg que", &message->msg_que);
@ -1386,7 +1386,7 @@ static void punt( TEXT * string)
} }
static int put_message( PTR connection_id, MSG message, int release_flag) static int put_message( PTR connection_id, CSV_MSG message, int release_flag)
{ {
/************************************** /**************************************
* *

View File

@ -34,14 +34,14 @@ extern void CSS_disconnect(SLONG);
extern void CSS_free_global(FRB); extern void CSS_free_global(FRB);
extern void CSS_free_local(BLK); extern void CSS_free_local(BLK);
extern PTR CSS_find_process(SLONG); extern PTR CSS_find_process(SLONG);
extern MSG CSS_get_message(PTR, MSG, SSHORT); extern CSV_MSG CSS_get_message(PTR, CSV_MSG, SSHORT);
#ifndef PIPE_SERVER #ifndef PIPE_SERVER
extern CSH CSS_init(STATUS *, USHORT); extern CSH CSS_init(STATUS *, USHORT);
#else #else
extern CSH CSS_init(STATUS *, USHORT, SSHORT); extern CSH CSS_init(STATUS *, USHORT, SSHORT);
#endif #endif
extern void CSS_probe_processes(void); extern void CSS_probe_processes(void);
extern int CSS_put_message(PTR, MSG, MSG); extern int CSS_put_message(PTR, CSV_MSG, CSV_MSG);
extern void CSS_release(void); extern void CSS_release(void);
extern void CSS_validate(void); extern void CSS_validate(void);

View File

@ -21,7 +21,7 @@
* Contributor(s): ______________________________________. * Contributor(s): ______________________________________.
*/ */
/* /*
$Id: csv.cpp,v 1.8 2002-11-14 08:17:23 dimitr Exp $ $Id: csv.cpp,v 1.9 2002-11-19 12:31:52 dimitr Exp $
*/ */
#include "firebird.h" #include "firebird.h"
@ -80,7 +80,7 @@ static void multi_thread(void);
static void open_blob(MSG_BLOB); static void open_blob(MSG_BLOB);
static void ping(MSG_OP); static void ping(MSG_OP);
static void prepare_statement(MSG_PSTMT); static void prepare_statement(MSG_PSTMT);
static void process_message(MSG); static void process_message(CSV_MSG);
static void put_segment(MSG_SEG); static void put_segment(MSG_SEG);
static void put_slice(MSG_SLICE); static void put_slice(MSG_SLICE);
static void que_events(MSG_EVENT); static void que_events(MSG_EVENT);
@ -94,7 +94,7 @@ static void release_sql_request(RSR);
static void release_transaction(RTR); static void release_transaction(RTR);
static void seek_blob(MSG_SEEK); static void seek_blob(MSG_SEEK);
static void send_msg(MSG_MSG); static void send_msg(MSG_MSG);
static int send_response(MSG, STATUS *, SLONG, USHORT, UCHAR *); static int send_response(CSV_MSG, STATUS *, SLONG, USHORT, UCHAR *);
static void server_ast(EVNT, USHORT, UCHAR *); static void server_ast(EVNT, USHORT, UCHAR *);
static void set_cursor(MSG_SETCUR); static void set_cursor(MSG_SETCUR);
static void start(MSG_MSG); static void start(MSG_MSG);
@ -132,7 +132,7 @@ typedef struct teb {
typedef struct req { typedef struct req {
struct req *req_next; struct req *req_next;
MSG req_message; CSV_MSG req_message;
} *REQ; } *REQ;
static REQ request_que, free_requests; static REQ request_que, free_requests;
@ -212,7 +212,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
* Start up central server. * Start up central server.
* *
**************************************/ **************************************/
MSG message; CSV_MSG message;
STATUS status_vector[ISC_STATUS_LENGTH]; STATUS status_vector[ISC_STATUS_LENGTH];
USHORT sw_multi, sw_name, sw_buffers, sw_limit, length; USHORT sw_multi, sw_name, sw_buffers, sw_limit, length;
TEXT **end, *p, *q, c, expanded_name[256], dflt_name[16]; TEXT **end, *p, *q, c, expanded_name[256], dflt_name[16];
@ -359,7 +359,7 @@ int CLIB_ROUTINE main( int argc, char **argv)
PRB process; PRB process;
PTR connection, server, client; PTR connection, server, client;
MSG_RESP response; MSG_RESP response;
MSG message; CSV_MSG message;
SSHORT parent_pin; SSHORT parent_pin;
THREAD_ENTER; THREAD_ENTER;
@ -1882,7 +1882,7 @@ static void prepare_statement( MSG_PSTMT message)
} }
static void process_message( MSG message) static void process_message( CSV_MSG message)
{ {
/************************************** /**************************************
* *
@ -2595,7 +2595,7 @@ static void send_msg( MSG_MSG message)
static int send_response( static int send_response(
MSG source, CSV_MSG source,
STATUS * status_vector, STATUS * status_vector,
SLONG handle, USHORT length, UCHAR * data) SLONG handle, USHORT length, UCHAR * data)
{ {

View File

@ -45,7 +45,7 @@ void main( int argc, char **argv)
SRQ *que; SRQ *que;
HDR *block; HDR *block;
PRB process; PRB process;
MSG message; CSV_MSG message;
FRB free; FRB free;
CNCT connection; CNCT connection;
SLONG offset; SLONG offset;
@ -90,8 +90,8 @@ void main( int argc, char **argv)
break; break;
case type_msg: case type_msg:
printf("MSG (%ld)\n", block->hdr_length); printf("CSV_MSG (%ld)\n", block->hdr_length);
message = (MSG) block; message = (CSV_MSG) block;
printf("\tType: %d, connection: %ld\n", message->msg_type, printf("\tType: %d, connection: %ld\n", message->msg_type,
message->msg_connection); message->msg_connection);
prt_que("\tMsg que", &message->msg_que); prt_que("\tMsg que", &message->msg_que);