8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 18:03:04 +01:00

Minor cleanup.

This commit is contained in:
dimitr 2006-02-04 10:37:15 +00:00
parent 326d7758a9
commit 7ca955e43a
5 changed files with 7 additions and 36 deletions

View File

@ -342,7 +342,6 @@ static void unhook_disconnected_ports(rem_port*);
static void unhook_port(rem_port*, rem_port*);
static int xdrinet_create(XDR *, rem_port*, UCHAR *, USHORT, enum xdr_op);
static bool_t xdrinet_endofrecord(XDR *, bool_t);
static XDR::xdr_ops inet_ops =
@ -2680,7 +2679,7 @@ static int send_full( rem_port* port, PACKET * packet)
}
#endif
return xdrinet_endofrecord(&port->port_send, TRUE);
return inet_write(&port->port_send, TRUE);
}
static int send_partial( rem_port* port, PACKET * packet)
@ -2738,21 +2737,6 @@ static int xdrinet_create(
return TRUE;
}
static bool_t xdrinet_endofrecord( XDR * xdrs, bool_t flushnow)
{
/**************************************
*
* x d r i n e t _ e n d o f r e c o r d
*
**************************************
*
* Functional description
* Write out the rest of a record.
*
**************************************/
return inet_write(xdrs, flushnow);
}
#ifdef HAVE_SETITIMER
static void alarm_handler( int x)
{

View File

@ -1999,7 +1999,7 @@ ISC_STATUS GDS_DSQL_FREE(ISC_STATUS * user_status, RSR * stmt_handle, USHORT opt
}
statement->rsr_handle = (FB_API_HANDLE) (IPTR) packet->p_resp.p_resp_object;
if (packet->p_resp.p_resp_object == 0xFFFF) {
if (packet->p_resp.p_resp_object == INVALID_OBJECT) {
release_sql_request(statement);
*stmt_handle = NULL;
}
@ -5260,12 +5260,6 @@ static void disconnect( rem_port* port)
M. Romanini
*/
/* Win95 SPX does not like the server closing the connection, just as the client
is attempting to send data. Such a scenario is caused by both sides trying to
perform a disconnect. So, disable client side disconnect for spx. Though,
this is really not a NT issue, let me leave the same behaviour for NT & 95
RaviKumar Jan 3, 98
*/
PACKET* packet = &rdb->rdb_packet;
if (port->port_type != port_pipe) {
@ -6298,7 +6292,7 @@ static bool release_object(RDB rdb,
**************************************
*
* Functional description
* Tell the server to zap an object. This doesn't not necessary
* Tell the server to zap an object. This doesn't necessary
* release the object, but usually does.
*
**************************************/

View File

@ -149,6 +149,7 @@ const USHORT ptype_out_of_band = 4; /* Batch sends w/ out of band notification *
typedef USHORT OBJCT;
const int MAX_OBJCT_HANDLES = 65000;
const int INVALID_OBJECT = MAX_USHORT;
/* Operation (packet) types */

View File

@ -324,17 +324,9 @@ enum blk_t
enum rem_port_t
{
port_mailbox, /* Apollo mailbox */
port_pcic, /* IBM PC interconnect */
port_inet, /* Internet (TCP/IP) */
port_asyn_homebrew, /* homebrew asynchronous connection */
port_decnet, /* DECnet connection */
port_ipc, /* NetIPC connection */
port_pipe, /* Windows NT named pipe connection */
port_mslan, /* Microsoft LanManager connection */
port_spx, /* Novell SPX connection */
//port_ipserver, // InterBase interprocess server
port_xnet /* Windows NT named xnet connection */
port_xnet /* Windows NT shared memory connection */
};
enum state_t

View File

@ -1639,7 +1639,7 @@ ISC_STATUS rem_port::end_statement(P_SQLFREE* free_stmt, PACKET* sendL)
statement->rsr_message = statement->rsr_buffer;
}
const USHORT object = (statement) ? statement->rsr_id : (USHORT) - 1;
const USHORT object = (statement) ? statement->rsr_id : INVALID_OBJECT;
return this->send_response(sendL, object, 0, status_vector);
}
@ -2891,7 +2891,7 @@ ISC_STATUS rem_port::prepare_statement(P_SQLST * prepareL, PACKET* sendL)
{
/*****************************************
*
* p r e p a r e _ s t a t m e n t
* p r e p a r e _ s t a t e m e n t
*
*****************************************
*