Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 12 Sep 2008 23:30:03 +0000 (23:30 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 12 Sep 2008 23:30:03 +0000 (23:30 +0000)
commit08af5bb31222c39739b8ec216b403756fb250924
tree790035cc6aca2440080bd357a68a09fdbbb2624c
parent5d39c767c12477610cf13f5c2e00e7eed7839352
Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating
when a file is invalid from when a file is missing.  This is most important when
we have two configuration files.  Consider the following example:

Old system:
sip.conf     users.conf     Old result               New result
========     ==========     ==========               ==========
Missing      Missing        SIP doesn't load         SIP doesn't load
Missing      OK             SIP doesn't load         SIP doesn't load
Missing      Invalid        SIP doesn't load         SIP doesn't load
OK           Missing        SIP loads                SIP loads
OK           OK             SIP loads                SIP loads
OK           Invalid        SIP loads incompletely   SIP doesn't load
Invalid      Missing        SIP doesn't load         SIP doesn't load
Invalid      OK             SIP doesn't load         SIP doesn't load
Invalid      Invalid        SIP doesn't load         SIP doesn't load

So in the case when users.conf doesn't load because there's a typo that
disrupts the syntax, we may only partially load users, instead of failing with
an error, which may cause some calls not to get processed.  Worse yet, the old
system would do this with no indication that anything was even wrong.

(closes issue #10690)
 Reported by: dtyoo
 Patches:
       20080716__bug10690.diff.txt uploaded by Corydon76 (license 14)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
62 files changed:
apps/app_alarmreceiver.c
apps/app_amd.c
apps/app_directory.c
apps/app_festival.c
apps/app_followme.c
apps/app_meetme.c
apps/app_minivm.c
apps/app_osplookup.c
apps/app_playback.c
apps/app_queue.c
apps/app_rpt.c
apps/app_voicemail.c
channels/chan_agent.c
channels/chan_alsa.c
channels/chan_console.c
channels/chan_dahdi.c
channels/chan_gtalk.c
channels/chan_h323.c
channels/chan_iax2.c
channels/chan_jingle.c
channels/chan_mgcp.c
channels/chan_oss.c
channels/chan_phone.c
channels/chan_sip.c
channels/chan_skinny.c
channels/chan_unistim.c
codecs/codec_adpcm.c
codecs/codec_alaw.c
codecs/codec_dahdi.c
codecs/codec_g722.c
codecs/codec_g726.c
codecs/codec_gsm.c
codecs/codec_lpc10.c
codecs/codec_speex.c
codecs/codec_ulaw.c
funcs/func_config.c
funcs/func_odbc.c
include/asterisk/config.h
main/asterisk.c
main/cdr.c
main/config.c
main/dnsmgr.c
main/dsp.c
main/enum.c
main/features.c
main/http.c
main/loader.c
main/manager.c
main/rtp.c
main/udptl.c
res/res_adsi.c
res/res_config_ldap.c
res/res_config_pgsql.c
res/res_config_sqlite.c
res/res_http_post.c
res/res_indications.c
res/res_jabber.c
res/res_musiconhold.c
res/res_odbc.c
res/res_phoneprov.c
res/res_smdi.c
res/res_snmp.c