FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 11-23-2011, 09:15 AM
"Fabio M. Di Nitto"
 
Default cman: make 2 var const and allow backup defaults

Spotted by Coverity Scan

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
:100644 100644 9d52fde... 522994b... M cman/daemon/cman-preconfig.c
cman/daemon/cman-preconfig.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/cman/daemon/cman-preconfig.c b/cman/daemon/cman-preconfig.c
index 9d52fde..522994b 100644
--- a/cman/daemon/cman-preconfig.c
+++ b/cman/daemon/cman-preconfig.c
@@ -805,8 +805,8 @@ out:
static void add_logging_overrides(struct objdb_iface_ver0 *objdb)
{
char *logstr;
- char *logfacility;
- char *loglevel;
+ const char *logfacility;
+ const char *loglevel;
hdb_handle_t object_handle;
hdb_handle_t find_handle;

@@ -820,7 +820,11 @@ static void add_logging_overrides(struct objdb_iface_ver0 *objdb)
objdb->object_find_destroy(find_handle);

logfacility = facility_name_get(SYSLOGFACILITY);
+ if (!logfacility)
+ logfacility = "LOG_LOCAL4";
loglevel = priority_name_get(SYSLOGLEVEL);
+ if (!loglevel)
+ loglevel = "LOG_INFO";

/* enable timestamps on logging */
if (objdb_get_string(objdb, object_handle, "timestamp", &logstr)) {
--
1.7.4.4
 

Thread Tools




All times are GMT. The time now is 11:42 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org