]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_corosync: Add check for config file before calling corosync apis 23/223/8
authorGeorge Joseph <george.joseph@fairview5.com>
Wed, 22 Apr 2015 21:22:10 +0000 (15:22 -0600)
committerMatt Jordan <mjordan@digium.com>
Thu, 23 Apr 2015 11:30:11 +0000 (06:30 -0500)
commit1474bb05f64c2b1db4417667a4d27576dbe219a7
tree7eb67ce76ac01f1fe8624bb15883faf2fa7d3dc8
parentb0e929219b40f134a925d68dbd764910e3389f3e
res_corosync: Add check for config file before calling corosync apis

On some systems, res_corosync isn't compatible with the installed version of
corosync so corosync_cfg_initialize fails, load_module returns LOAD_FAILURE,
and Asterisk terminates.  The work around has been to remember to add
res_corosync as a noload in modules.conf.  A better solution though is to have
res_corosync check for its config file before attempting to call corosync apis
and return LOAD_DECLINE if there's no config file.  This lets Asterisk loading
continue.

If you have a res_corosync.conf file and res_corosync fails, you get the same
behavior as today and the fatal error tells you something is wrong with the
install.

ASTERISK-24998

Change-Id: Iaf94a9431a4922ec4ec994003f02135acfdd3889
res/res_corosync.c