r12513: Similar change as my previous commit, but now for transfer syntaxes.
[sfrench/samba-autobuild/.git] / source4 / rpc_server / epmapper / rpc_epmapper.c
index e7371a632fad510c2f0764c72f5185b8eab3f89a..8ff4ffdf2de5f35112f8b4c0de9b2f9cbbbd05c8 100644 (file)
@@ -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;
        }