Jabberd14-1.6.0/jabberd/jabberd.cc/_jabberd_restart

Last-modified: 2007-03-09 (金) 21:35:26

このページを編集する際は,編集に関する方針に従ってください.

概要

* reload the configuration file
*
* this gets called if jabberd receives a SIGHUP signal
*
* The configuration file is reloaded, but not much is done with the reloaded configuration file yet :(

引数

  • j--jabberdのインスタンス

実装

static void _jabberd_restart(jabberd_struct *j) {
    xmlnode temp_greymatter;
    log_notice(NULL, "reloading configuration");
    /* keep greymatter around till we are sure the reload is OK */
    temp_greymatter = greymatter__;
    log_debug2(ZONE, LOGT_CONFIG, "Loading new config file");
  • 設定ファイル、コマンドラインオプション、再起動フラグを渡して再設定
    /* try to load the config file */
    if(configurate(j->cfgfile, j->cmd_line, 1))
    { /* failed to load.. restore the greymatter */
	 log_debug2(ZONE, LOGT_CONFIG, "Failed to load new config, resetting greymatter");
	 log_alert(ZONE, "Failed to reload config!  Resetting internal config -- please check your configuration!");
	 greymatter__ = temp_greymatter;
	 return;
    }
    /* free old greymatter (NOTE: shea, right! many internal tables/callbacs/etc have old config pointers :)
    if(temp_greymatter != NULL)
	 xmlnode_free(temp_greymatter); */
    /* XXX do more smarts on new config */
    log_debug2(ZONE, LOGT_CONFIG, "reload process complete");
}

呼出元

#related: relatedプラグインは廃止されました。