Fix the gateway cache add the hostname and increase the security.

This commit is contained in:
Mark Crane
2013-11-27 16:47:06 +00:00
parent 283dee6d15
commit cb8279e085
3 changed files with 25 additions and 23 deletions

View File

@@ -251,12 +251,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
save_gateway_xml();
//synchronize the xml config
save_dialplan_xml();
//save_dialplan_xml();
//delete the sip profiles from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete configuration:sofia.conf";
$hostname = trim(event_socket_request($fp, 'api switchname'));
$switch_cmd = "memcache delete configuration:sofia.conf:".$hostname;
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}