diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-12-27 16:47:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:49 -0500 |
commit | e748b53e4343fbac00a19e8fc76b42624eb5af02 (patch) | |
tree | bd19a3baa052d404af9452f53ab90ba26244fad2 /source4/rpc_server/epmapper | |
parent | d658de65d32e6746ac51aeb4da7aa74b3da40c2b (diff) | |
download | samba-e748b53e4343fbac00a19e8fc76b42624eb5af02.tar.gz samba-e748b53e4343fbac00a19e8fc76b42624eb5af02.tar.bz2 samba-e748b53e4343fbac00a19e8fc76b42624eb5af02.zip |
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)
Diffstat (limited to 'source4/rpc_server/epmapper')
-rw-r--r-- | source4/rpc_server/epmapper/rpc_epmapper.c | 16 |
1 files changed, 2 insertions, 14 deletions
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 @@ -38,18 +38,6 @@ struct dcesrv_ep_iface { }; /* - 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 */ static uint32_t build_ep_list(TALLOC_CTX *mem_ctx, @@ -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; } |