bus/policy: fix obvious mistake send->receive 15/273015/1
authorAdrian Szyndela <adrian.s@samsung.com>
Tue, 29 Mar 2022 14:03:45 +0000 (16:03 +0200)
committerAdrian Szyndela <adrian.s@samsung.com>
Tue, 29 Mar 2022 14:03:45 +0000 (16:03 +0200)
Fortunately, the bit fields are at the exact same position,
in the union, so it worked so far...

Change-Id: Iaad9589dfc0f4f7e6a0f4ef4767a600f4cf2f54a

bus/policy.c

index 081f564..606d9a8 100644 (file)
@@ -1530,7 +1530,7 @@ check_receive_rule (const BusPolicyRule *rule,
        * only when reply was requested. requested_reply=false means the
        * rule always applies
        */
-      if (!match_params->u.sr.requested_reply && rule->access != BUS_POLICY_RULE_ACCESS_DENY && rule->d.send.requested_reply && !rule->d.send.eavesdrop)
+      if (!match_params->u.sr.requested_reply && rule->access != BUS_POLICY_RULE_ACCESS_DENY && rule->d.receive.requested_reply && !rule->d.receive.eavesdrop)
         {
           _dbus_verbose ("  (policy) skipping %s rule since it only applies to requested replies and does not allow eavesdropping\n",
               rule->access == BUS_POLICY_RULE_ACCESS_DENY ? "allow" : "deny");