Summary:ASTERISK-12021: Whenever I issue reload, I get "No [csv] section in cdr.conf. Unregistering backend."
Reporter:Dennis DeDonatis (dennisd)Labels:
Date Opened:2008-05-14 14:05:41Date Closed:2008-05-15 12:53:39
Versions:Frequency of
It looks like this COULD be the problem:

In cdr_csv.c:

   if (!(cfg = ast_config_load(config, config_flags))) {
       ast_log(LOG_WARNING, "unable to load config: %s\n", config);
       return 0;
       return 0;

Shouldn't line 107 return 1 if the config file status unchanged?

****** STEPS TO REPRODUCE ******

At the asterisk CLI, issue reload with only cdr-csv configured in cdr.conf.


I saw this in beta 8 and it happens in beta 9.
Comments:By: Jason Parker (jparker) 2008-05-14 14:10:22

I believe you are correct.  It also looks like all of the cdr modules have this same flaw.

By: Steve Murphy (murf) 2008-05-14 22:55:32

Just about every module (everywhere) returns 0 (success) if it's unchanged. The principle is that if the config file hasn't changed, you just skip loading it again. Why would you want to DECLINE? Isn't that like an error; wouldn't that unload the module?

Some modules tell you there were no changes, and that the config file was skipped. That might be nicer, but the affect is the same.

By: Steve Murphy (murf) 2008-05-15 10:33:52

I'm putting this issue in feedback to have the reporter (and others) give their opinions on what, if anything, should be done here.

1. have all modules report something to the log when a reload event skips
  reading in a config file when FILEUNCHANGED is true?
2. Chop the [csv] section out of the cdr.conf file and put it in cdr_csv.conf?
  and, if the cdr_csv.conf file is not there, it will print a message and DECLINE
  the module load?
3. Completely remove the cdr_csv stuff, users should use cdr_custom instead
4. Do nothing and close this bug, because (1) will just add useless info
  to the logs, (2) will result in zero advantage, (3) will inconvenience
  those users already using the cdr_csv stuff.

By: Digium Subversion (svnbot) 2008-05-15 12:52:29

Repository: asterisk
Revision: 116631

U   trunk/cdr/cdr_csv.c

r116631 | tilghman | 2008-05-15 12:52:24 -0500 (Thu, 15 May 2008) | 3 lines

Don't unload config on reload, when config has not changed.
(Closes issue ASTERISK-12021)



By: Digium Subversion (svnbot) 2008-05-15 12:53:39

Repository: asterisk
Revision: 116636

_U  branches/1.6.0/
U   branches/1.6.0/cdr/cdr_csv.c

r116636 | tilghman | 2008-05-15 12:53:37 -0500 (Thu, 15 May 2008) | 11 lines

Merged revisions 116631 via svnmerge from

r116631 | tilghman | 2008-05-15 12:58:22 -0500 (Thu, 15 May 2008) | 3 lines

Don't unload config on reload, when config has not changed.
(Closes issue ASTERISK-12021)