git://git.onelab.eu
/
sliver-openvswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f1126f4
)
Make it possible to open more than one vlog client socket at a time.
author
Ben Pfaff
<blp@nicira.com>
Wed, 22 Oct 2008 22:42:16 +0000
(15:42 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Thu, 23 Oct 2008 17:58:24 +0000
(10:58 -0700)
lib/vlog-socket.c
patch
|
blob
|
history
diff --git
a/lib/vlog-socket.c
b/lib/vlog-socket.c
index
43d0acb
..
7fffc13
100644
(file)
--- 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)
{
int
vlog_client_connect(const char *path, struct vlog_client **clientp)
{
+ static int counter;
struct vlog_client *client;
int fd;
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));
? 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);
fd = make_unix_socket(SOCK_DGRAM, false, false,
client->bind_path, client->connect_path);