Changeset 6742
- Timestamp:
- 10/06/08 17:05:24 (2 months ago)
- Location:
- trunk/centstorage/centStorage
- Files:
-
- 3 modified
-
modules/db_functions/db_connection.c (modified) (1 diff)
-
modules/recup_perf_datas/confModule.c (modified) (2 diffs)
-
src/Conf.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/centstorage/centStorage/modules/db_functions/db_connection.c
r6709 r6742 81 81 if (!strcmp(db->type, "MySQL")) 82 82 mysql_disconnect((MYSQL *)db_connection, log, MOD_NAME); 83 84 83 #endif 85 84 -
trunk/centstorage/centStorage/modules/recup_perf_datas/confModule.c
r6737 r6742 25 25 26 26 #include <confModule.h> 27 #include "../db_functions/db_connection.h" 27 28 28 29 #ifdef HAVE_SSL … … 449 450 450 451 /* if the databases configuration has changed */ 451 if (changeDBPerf == 1 )452 if (changeDBPerf == 1 && db_connection) 452 453 { 453 454 printf("%s.", DB_CONF_CHANGED); 454 455 if (log == 1) 455 456 logger(" [module %s] %s." , MOD_NAME, DB_CONF_CHANGED); 456 db_disconnect(db_connection, log); 457 LOCK_MUTEX(&mutex); 458 db_disconnect(db_connection, log, MOD_NAME, conf->perfBase); 459 conf->perfBase->baseChanged = 0; 460 UNLOCK_MUTEX(&mutex); 457 461 db_connection = NULL; 458 462 } 459 463 460 if (changeDBConf == 1 )464 if (changeDBConf == 1 && rped_conf_db_connection) 461 465 { 462 466 printf("%s.", DB_CONF_CHANGED); 463 467 if (log == 1) 464 468 logger(" [module %s] %s." , MOD_NAME, DB_CONF_CHANGED); 465 db_disconnect(rped_conf_db_connection, log); 469 LOCK_MUTEX(&mutex); 470 db_disconnect(rped_conf_db_connection, log, MOD_NAME, conf->confBase); 471 conf->confBase->baseChanged = 0; 472 UNLOCK_MUTEX(&mutex); 466 473 rped_conf_db_connection = NULL; 467 474 } -
trunk/centstorage/centStorage/src/Conf.c
r6737 r6742 108 108 else if (conf->logs->log_file == NULL 109 109 && (!xmlStrcmp(sub->name, (const xmlChar *)LOGGING_NODE))) 110 {110 { 111 111 /* if the node <logging> is found load all logging value */ 112 112 … … 241 241 242 242 conf->confBase = loadBaseConf(xmlConfContext, doc, 0); 243 conf->confBase->baseChanged = 0; 243 244 conf->perfBase = loadBaseConf(xmlConfContext, doc, 1); 245 conf->perfBase->baseChanged = 0; 244 246 245 247 printf("%s\n", LOAD_CONF_SUCCESS);
