From e748b53e4343fbac00a19e8fc76b42624eb5af02 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 27 Dec 2005 16:47:09 +0000 Subject: r12513: Similar change as my previous commit, but now for transfer syntaxes. Avoids converting a static string to GUID every time we check whether a transfer syntax is equal to that of NDR. (This used to be commit 8dcfcaf75ab8cf4a54cf5e56f6be25acc68e3989) --- source4/rpc_server/epmapper/rpc_epmapper.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'source4/rpc_server/epmapper/rpc_epmapper.c') diff --git a/source4/rpc_server/epmapper/rpc_epmapper.c b/source4/rpc_server/epmapper/rpc_epmapper.c index e7371a632f..8ff4ffdf2d 100644 --- a/source4/rpc_server/epmapper/rpc_epmapper.c +++ b/source4/rpc_server/epmapper/rpc_epmapper.c @@ -37,18 +37,6 @@ struct dcesrv_ep_iface { struct epm_tower ep; }; -/* - simple routine to compare a GUID string to a GUID structure -*/ -static int guid_cmp(TALLOC_CTX *mem_ctx, const struct GUID *guid, const char *uuid_str) -{ - const char *s = GUID_string(mem_ctx, guid); - if (!s || strcasecmp(s, uuid_str)) { - return -1; - } - return 0; -} - /* build a list of all interfaces handled by all endpoint servers */ @@ -213,8 +201,8 @@ static error_status_t epm_Map(struct dcesrv_call_state *dce_call, TALLOC_CTX *me dcerpc_floor_get_lhs_data(&r->in.map_tower->tower.floors[1], &ndr_uuid, &ndr_version); if (floors[1].lhs.protocol != EPM_PROTOCOL_UUID || - guid_cmp(mem_ctx, &ndr_uuid, NDR_GUID) != 0 || - ndr_version != NDR_GUID_VERSION) { + !GUID_equal(&ndr_uuid, &ndr_transfer_syntax.uuid) || + ndr_version != ndr_transfer_syntax.if_version) { goto failed; } -- cgit