Merge the adaptive realtime branch, which will make adding new required fields
[asterisk/asterisk.git] / channels / chan_iax2.c
index ce8553f..e7b2d55 100644 (file)
@@ -11284,6 +11284,7 @@ static int reload_config(void)
        
        reload_firmware(0);
        iax_provision_reload(1);
+       ast_unload_realtime("iaxpeers");
 
        return 0;
 }
@@ -12034,7 +12035,7 @@ static int __unload_module(void)
        con = ast_context_find(regcontext);
        if (con)
                ast_context_destroy(con, "IAX2");
-       
+       ast_unload_realtime("iaxpeers");
        return 0;
 }
 
@@ -12187,6 +12188,8 @@ static int load_module(void)
        reload_firmware(0);
        iax_provision_reload(0);
 
+       ast_realtime_require_field("iaxpeers", "name", RQ_CHAR, 10, "ipaddr", RQ_CHAR, 15, "port", RQ_INTEGER, 5, "regseconds", RQ_INTEGER, 6, NULL);
+
        return AST_MODULE_LOAD_SUCCESS;
 }