X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fbus-proxyd%2Fproxy.c;h=c6896188533b1cdca258a62e4c7d9267385a073e;hp=0c851f93c14fb4cf4bb4b8bd334a9d7d38ff6531;hb=ec2c7b56599981a7d9e76b15c75af3e1af3e6f81;hpb=2eec67acbb00593e414549a7e5b35eb7dd776b1b diff --git a/src/bus-proxyd/proxy.c b/src/bus-proxyd/proxy.c index 0c851f93c..c68961885 100644 --- a/src/bus-proxyd/proxy.c +++ b/src/bus-proxyd/proxy.c @@ -719,13 +719,21 @@ static int proxy_process_destination_to_local(Proxy *p) { /* Return the error to the client, if we can */ synthetic_reply_method_errnof(m, r, "Failed to forward message we got from destination: %m"); - log_error_errno(r, - "Failed to forward message we got from destination: uid=" UID_FMT " gid=" GID_FMT" message=%s destination=%s path=%s interface=%s member=%s: %m", - p->local_creds.uid, p->local_creds.gid, bus_message_type_to_string(m->header->type), - strna(m->destination), strna(m->path), strna(m->interface), strna(m->member)); + if (r == -ENOBUFS) { + /* if local dbus1 peer does not dispatch its queue, warn only once */ + if (!p->queue_overflow) + log_error("Dropped messages due to queue overflow of local peer (pid: "PID_FMT" uid: "UID_FMT")", p->local_creds.pid, p->local_creds.uid); + p->queue_overflow = true; + } else + log_error_errno(r, + "Failed to forward message we got from destination: uid=" UID_FMT " gid=" GID_FMT" message=%s destination=%s path=%s interface=%s member=%s: %m", + p->local_creds.uid, p->local_creds.gid, bus_message_type_to_string(m->header->type), + strna(m->destination), strna(m->path), strna(m->interface), strna(m->member)); + return 1; } + p->queue_overflow = false; return 1; }