projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
openflow: Use spaces for indentation
[openvswitch]
/
lib
/
unixctl.c
diff --git
a/lib/unixctl.c
b/lib/unixctl.c
index 054ce49c0cfad72bd1b42211db713f69b971c604..4ab493d48775ea0504b57d4f4233b52c7f3483a9 100644
(file)
--- a/
lib/unixctl.c
+++ b/
lib/unixctl.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira
Networks
.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira
, Inc
.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-221,13
+221,10
@@
unixctl_server_create(const char *path, struct unixctl_server **serverp)
program_name, (long int) getpid());
}
program_name, (long int) getpid());
}
- error = pstream_open(punix_path, &listener);
- free(punix_path);
- punix_path = NULL;
-
+ error = pstream_open(punix_path, &listener, 0);
if (error) {
if (error) {
- ovs_error(error, "could not initialize control socket %s", path);
-
return error
;
+ ovs_error(error, "could not initialize control socket %s", p
unix_p
ath);
+
goto exit
;
}
unixctl_command_register("help", "", 0, 0, unixctl_help, NULL);
}
unixctl_command_register("help", "", 0, 0, unixctl_help, NULL);
@@
-237,7
+234,10
@@
unixctl_server_create(const char *path, struct unixctl_server **serverp)
server->listener = listener;
list_init(&server->conns);
*serverp = server;
server->listener = listener;
list_init(&server->conns);
*serverp = server;
- return 0;
+
+exit:
+ free(punix_path);
+ return error;
}
static void
}
static void
@@
-422,7
+422,8
@@
unixctl_client_create(const char *path, struct jsonrpc **client)
abs_path = abs_file_name(ovs_rundir(), path);
unix_path = xasprintf("unix:%s", abs_path);
abs_path = abs_file_name(ovs_rundir(), path);
unix_path = xasprintf("unix:%s", abs_path);
- error = stream_open_block(stream_open(unix_path, &stream), &stream);
+ error = stream_open_block(stream_open(unix_path, &stream, DSCP_DEFAULT),
+ &stream);
free(unix_path);
free(abs_path);
free(unix_path);
free(abs_path);