Reply limits exceeded problems
Olivier Andrieu
oliv__a at users.sourceforge.net
Sun Aug 8 13:43:22 PDT 2004
Christian Hammond [Sun, 8 Aug 2004]:
> Since upgrading to D-BUS 0.22cvs, I've received a large number of
> LimitsExceeded errors specifying that the max_relies_per_connection
> limit has been reached. I've seen reference to this issue in bug
> #894, but the committed patch in the tracker didn't fix the problem
> here.
>
> The limit of 32 seems rather low, but it feels more like things
> aren't being handled correctly in some fashion. Is this a known
> problem that others are having trouble with, and if so, what's the
> solution to this? I'd like to know if it's something that must be
> fixed on my end or the D-BUS end before 0.22 is released.
Yeah, you must either:
- make sure that the server application does send replies
back when it handles a method call. If it doesn't, that's a bug in the
server app.
- if you're not interested in the reply on the client side, call
_message_set_no_reply() before sending the method call.
Maybe we could add a convenience function so that message handlers
(server implementations) can easily send a reply without
data. Something like this:
,----
| dbus_bool_t
| dbus_connection_send_ack (DBusConnection *conn, DBusMessage *msg)
| {
| DBusMessage *reply;
| dbus_bool_t ret;
| ret = TRUE;
| if (!dbus_message_get_no_reply (msg))
| {
| reply = dbus_message_new_method_return (msg);
| if (reply == NULL)
| {
| ret = FALSE;
| break;
| }
| ret = dbus_connection_send (conn, reply, NULL);
| dbus_message_unref (reply);
| }
| return ret;
| }
`----
Also, maybe dbus_connection_send() could automatically call
dbus_message_set_no_reply() on the message ? In other words, make the
status of the no_reply flag consistent with the way the message is
sent, i.e. with _connection_send() or _connection_send_with_reply() ?
--
Olivier
More information about the dbus
mailing list