rpcrt4: Make the protseq_ops structure constant.

This commit is contained in:
Alexandre Julliard 2006-06-09 13:12:58 +02:00
parent 9aea3b2d31
commit c32dc6744c
2 changed files with 6 additions and 6 deletions

View File

@ -45,7 +45,7 @@ typedef struct _RpcConnection
BOOL server;
LPSTR NetworkAddr;
LPSTR Endpoint;
struct protseq_ops *ops;
const struct protseq_ops *ops;
USHORT MaxTransmissionSize;
/* The active interface bound to server. */
RPC_SYNTAX_IDENTIFIER ActiveInterface;

View File

@ -701,7 +701,7 @@ static RPC_STATUS rpcrt4_ncacn_ip_tcp_parse_top_of_tower(const unsigned char *to
return RPC_S_OK;
}
struct protseq_ops protseq_list[] = {
static const struct protseq_ops protseq_list[] = {
{ "ncacn_np",
{ EPM_PROTOCOL_NCACN, EPM_PROTOCOL_SMB },
rpcrt4_conn_np_alloc,
@ -742,7 +742,7 @@ struct protseq_ops protseq_list[] = {
#define MAX_PROTSEQ (sizeof protseq_list / sizeof protseq_list[0])
static struct protseq_ops *rpcrt4_get_protseq_ops(const char *protseq)
static const struct protseq_ops *rpcrt4_get_protseq_ops(const char *protseq)
{
int i;
for(i=0; i<MAX_PROTSEQ; i++)
@ -771,7 +771,7 @@ RPC_STATUS RPCRT4_CreateConnection(RpcConnection** Connection, BOOL server,
LPCSTR Protseq, LPCSTR NetworkAddr, LPCSTR Endpoint,
LPCSTR NetworkOptions, RpcAuthInfo* AuthInfo, RpcBinding* Binding)
{
struct protseq_ops *ops;
const struct protseq_ops *ops;
RpcConnection* NewConnection;
ops = rpcrt4_get_protseq_ops(Protseq);
@ -863,7 +863,7 @@ RPC_STATUS RpcTransport_GetTopOfTower(unsigned char *tower_data,
const char *endpoint)
{
twr_empty_floor_t *protocol_floor;
struct protseq_ops *protseq_ops = rpcrt4_get_protseq_ops(protseq);
const struct protseq_ops *protseq_ops = rpcrt4_get_protseq_ops(protseq);
*tower_size = 0;
@ -901,7 +901,7 @@ RPC_STATUS RpcTransport_ParseTopOfTower(const unsigned char *tower_data,
{
twr_empty_floor_t *protocol_floor;
twr_empty_floor_t *floor4;
struct protseq_ops *protseq_ops = NULL;
const struct protseq_ops *protseq_ops = NULL;
RPC_STATUS status;
int i;