From: Ben Pfaff Date: Wed, 22 Oct 2008 22:42:16 +0000 (-0700) Subject: Make it possible to open more than one vlog client socket at a time. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26d6b159f3b9d624992f5da432fa8f7f9ac897c5;p=openvswitch Make it possible to open more than one vlog client socket at a time. --- diff --git a/lib/vlog-socket.c b/lib/vlog-socket.c index 43d0acb2..7fffc131 100644 --- a/lib/vlog-socket.c +++ b/lib/vlog-socket.c @@ -285,6 +285,7 @@ struct vlog_client { int vlog_client_connect(const char *path, struct vlog_client **clientp) { + static int counter; struct vlog_client *client; int fd; @@ -293,7 +294,8 @@ vlog_client_connect(const char *path, struct vlog_client **clientp) ? xstrdup(path) : xasprintf("/tmp/vlogs.%s", path)); - client->bind_path = xasprintf("/tmp/vlog.%ld", (long int) getpid()); + client->bind_path = xasprintf("/tmp/vlog.%ld.%d", + (long int) getpid(), counter++); fd = make_unix_socket(SOCK_DGRAM, false, false, client->bind_path, client->connect_path);