org.freedesktop.DBus.Error.LimitsExceeded

Havoc Pennington hp at pobox.com
Mon May 12 10:03:25 PDT 2008


Hi,

One thought, it could be a different limit exceeded, not the number of
match rules. If it's number of rules the message should indicate that
like this:

  if (bus_connection_get_n_match_rules (connection) >=
      bus_context_get_max_match_rules_per_connection
(bus_transaction_get_context (transaction)))
    {
      dbus_set_error (error, DBUS_ERROR_LIMITS_EXCEEDED,
                      "Connection \"%s\" is not allowed to add more
match rules "
                      "(increase limits in configuration file if required)",
                      bus_connection_is_active (connection) ?
                      bus_connection_get_name (connection) :
                      "(inactive)");
      goto failed;
    }

I looked over the code related to this and it looks reasonable on quick glance.

In bus_driver_handle_add_match() it does not add a remove_rule()
callback to the transaction, so if some action after
bus_driver_handle_add_match() failed  and the transaction were
canceled, a match rule might leak. But that would be really obscure
and unlikely to happen, even if it could; reading the code, I don't
think anything that can fail happens after this point so I don't think
it can happen.

Havoc


More information about the dbus mailing list