sk-unix: add a peer only if it's not in a list yet

I tried to fix that by:
commit bc2ac71c1a
Author: Andrey Vagin <avagin@openvz.org>
Date:   Wed Sep 12 15:16:39 2012 +0400

    sk-unix: don't add a socket in a second time

but made a mistake and now a peer would be added only if it's in a list.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin 2012-09-12 17:49:36 +04:00 committed by Pavel Emelyanov
parent 3c51808f1a
commit ca567e76c3

View file

@ -163,7 +163,7 @@ static int dump_one_unix_fd(int lfd, u32 id, const struct fd_parms *p)
* It can be external socket, so we defer dumping
* until all sockets the program owns are processed.
*/
if (!peer->sd.already_dumped && !list_empty(&peer->list)) {
if (!peer->sd.already_dumped && list_empty(&peer->list)) {
show_one_unix("Add a peer", peer);
list_add_tail(&peer->list, &unix_sockets);
}