projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ovs_stats: Optimize read callback
[collectd.git]
/
src
/
utils_ovs.c
diff --git
a/src/utils_ovs.c
b/src/utils_ovs.c
index
57629a0
..
4ca86ae
100644
(file)
--- a/
src/utils_ovs.c
+++ b/
src/utils_ovs.c
@@
-191,7
+191,7
@@
struct ovs_db_s {
};
/* Global variables */
};
/* Global variables */
-static uint64_t ovs_uid
= 0
;
+static uint64_t ovs_uid;
static pthread_mutex_t ovs_uid_mutex = PTHREAD_MUTEX_INITIALIZER;
/* Post an event to event thread.
static pthread_mutex_t ovs_uid_mutex = PTHREAD_MUTEX_INITIALIZER;
/* Post an event to event thread.
@@
-1051,6
+1051,8
@@
ovs_db_t *ovs_db_init(const char *node, const char *service,
ret = ovs_db_destroy(pdb);
if (ret > 0)
goto failure;
ret = ovs_db_destroy(pdb);
if (ret > 0)
goto failure;
+ else
+ return NULL;
}
/* init polling thread */
}
/* init polling thread */
@@
-1059,6
+1061,8
@@
ovs_db_t *ovs_db_init(const char *node, const char *service,
if (ret > 0) {
ovs_db_event_thread_data_destroy(pdb);
goto failure;
if (ret > 0) {
ovs_db_event_thread_data_destroy(pdb);
goto failure;
+ } else {
+ return NULL;
}
}
return pdb;
}
}
return pdb;