Commit 14483645 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #192 in ZP/z-push from...

Merge pull request #192 in ZP/z-push from feature/ZP-698-Allow-different-IPC-backends-using-current-IPC-logic to develop

* commit '2bb112bd':
  ZP-698 Renamed getIsDownTime() to getIsDownUntil().
  ZP-698 Fixed name as it was wrong in the correction comments.
  ZP-698 Another dot in a class that shouldn't need to be touched.
  ZP-698 added a dot before someone gets crazy and writes another 64 comments about it.
  ZP-698 fixed typo in memcached provider filename, when waiting for a mutex only log up to 5 messages (spread over the configured total amount of time), if memcache is down don't retry in other connections for up to 30 seconds (configurable), removed TCP_NODELAY and NO_BLOCK options, memcache servers are setup in a single string, renamed ReInitSharedMem() to ReInitIPC(), fixed comments and public/private/protected visibility, fixed upper/lowercasing of method names, added some dots.
  ZP-698 Remove debug.
  ZP-698 Renamed IPC backend to IPC Provider, added general config section, added config file for memcache provider, InterProcessData autoloads available IPC providers.
  ZP-698 Allow different IPC backends using current IPC logic. Released under the Affero GNU General Public License (AGPL) version 3. adding a Memcached backend and - by default disabled - configuration in config.php
  ZP-698 Allow different IPC backends using current IPC logic. Released under the Affero GNU General Public License (AGPL) version 3. split up into a backend interface, a SHM backend and abstract class
  ZP-698 Allow different IPC backends using current IPC logic. Released under the Affero GNU General Public License (AGPL) version 3.
parents d3390c22 2bb112bd
<?php
/***********************************************
* File : ipcmemcached/config.php
* Project : Z-Push
* Descr : Configuration file for the
* memcache IPC provider.
*
* Created : 02.05.2016
*
* Copyright 2007-2016 Zarafa Deutschland GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation with the following additional
* term according to sec. 7:
*
* According to sec. 7 of the GNU Affero General Public License, version 3,
* the terms of the AGPL are supplemented with the following terms:
*
* "Zarafa" is a registered trademark of Zarafa B.V.
* "Z-Push" is a registered trademark of Zarafa Deutschland GmbH
* The licensing of the Program under the AGPL does not imply a trademark license.
* Therefore any rights, title and interest in our trademarks remain entirely with us.
*
* However, if you propagate an unmodified version of the Program you are
* allowed to use the term "Z-Push" to indicate that you distribute the Program.
* Furthermore you may use our trademarks where it is necessary to indicate
* the intended purpose of a product or service provided you use it in accordance
* with honest practices in industrial or commercial matters.
* If you want to propagate modified versions of the Program under the name "Z-Push",
* you may only do so if you have a written permission by Zarafa Deutschland GmbH
* (to acquire a permission please contact Zarafa at trademark@zarafa.com).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Consult LICENSE file for details
************************************************/
// Comma separated list of available memcache servers.
// Servers can be added as 'hostname:port,otherhost:port'
define('MEMCACHED_SERVERS','localhost:11211');
// Memcached down indicator
// In case memcached is not available, a lock file will be written to disk
define('MEMCACHED_DOWN_LOCK_FILE', '/tmp/z-push-memcache-down');
// indicates how long the lock file will be maintained (in seconds)
define('MEMCACHED_DOWN_LOCK_EXPIRATION', 30);
// Prefix to used for keys
define('MEMCACHED_PREFIX', 'z-push-ipc');
// Connection timeout in ms
define('MEMCACHED_TIMEOUT', 100);
// Mutex timeout (in seconds)
define('MEMCACHED_MUTEX_TIMEOUT', 5);
// Waiting time before re-trying to aquire mutex (in ms), must be higher than 0
define('MEMCACHED_BLOCK_WAIT', 10);
This diff is collapsed.
<?php
/***********************************************
* File : ipcsharedmemoryprovider.php
* Project : Z-Push
* Descr : IPC Provider for PHP shared memory extension
*
* Created : 20.10.2011
*
* Copyright 2007 - 2016 Zarafa Deutschland GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation with the following additional
* term according to sec. 7:
*
* According to sec. 7 of the GNU Affero General Public License, version 3,
* the terms of the AGPL are supplemented with the following terms:
*
* "Zarafa" is a registered trademark of Zarafa B.V.
* "Z-Push" is a registered trademark of Zarafa Deutschland GmbH
* The licensing of the Program under the AGPL does not imply a trademark license.
* Therefore any rights, title and interest in our trademarks remain entirely with us.
*
* However, if you propagate an unmodified version of the Program you are
* allowed to use the term "Z-Push" to indicate that you distribute the Program.
* Furthermore you may use our trademarks where it is necessary to indicate
* the intended purpose of a product or service provided you use it in accordance
* with honest practices in industrial or commercial matters.
* If you want to propagate modified versions of the Program under the name "Z-Push",
* you may only do so if you have a written permission by Zarafa Deutschland GmbH
* (to acquire a permission please contact Zarafa at trademark@zarafa.com).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Consult LICENSE file for details
************************************************/
class IpcSharedMemoryProvider implements IIpcProvider {
private $mutexid;
private $memid;
protected $type;
protected $allocate;
/**
* Constructor
*
* @param int $type
* @param int $allocate
* @param string $class
*/
public function __construct($type, $allocate, $class) {
$this->type = $type;
$this->allocate = $allocate;
if ($this->initSharedMem())
ZLog::Write(LOGLEVEL_DEBUG, sprintf("%s(): Initialized mutexid %s and memid %s.", $class, $this->mutexid, $this->memid));
}
/**
* Allocates shared memory.
*
* @access private
* @return boolean
*/
private function initSharedMem() {
if (!function_exists('sem_get') || !function_exists('shm_attach') || !function_exists('sem_acquire')|| !function_exists('shm_get_var')) {
ZLog::Write(LOGLEVEL_INFO, "IpcSharedMemoryProvider->initSharedMem(): PHP libraries for the use shared memory are not available. Check the isntalled php packages or use e.g. the memcache IPC provider.");
return false;
}
// Create mutex
$this->mutexid = @sem_get($this->type, 1);
if ($this->mutexid === false) {
ZLog::Write(LOGLEVEL_ERROR, "IpcSharedMemoryProvider->initSharedMem(): could not aquire semaphore");
return false;
}
// Attach shared memory
$this->memid = shm_attach($this->type+10, $this->allocate);
if ($this->memid === false) {
ZLog::Write(LOGLEVEL_ERROR, "IpcSharedMemoryProvider->initSharedMem(): could not attach shared memory");
@sem_remove($this->mutexid);
$this->mutexid = false;
return false;
}
// TODO mem cleanup has to be implemented
//$this->setInitialCleanTime();
return true;
}
/**
* Removes and detaches shared memory.
*
* @access private
* @return boolean
*/
private function removeSharedMem() {
if ((isset($this->mutexid) && $this->mutexid !== false) && (isset($this->memid) && $this->memid !== false)) {
@sem_acquire($this->mutexid);
$memid = $this->memid;
$this->memid = false;
@sem_release($this->mutexid);
@sem_remove($this->mutexid);
@shm_remove($memid);
@shm_detach($memid);
$this->mutexid = false;
return true;
}
return false;
}
/**
* Reinitializes the IPC data by removing, detaching and re-allocating it.
*
* @access public
* @return boolean
*/
public function ReInitIPC() {
return ($this->removeSharedMem() && $this->initSharedMem());
}
/**
* Cleans up the IPC data block.
*
* @access public
* @return boolean
*/
public function Clean() {
$stat = false;
// exclusive block
if ($this->BlockMutex()) {
$cleanuptime = ($this->HasData(1)) ? $this->GetData(1) : false;
// TODO implement Shared Memory cleanup
$this->ReleaseMutex();
}
// end exclusive block
return $stat;
}
/**
* Indicates if the IPC is active.
*
* @access public
* @return boolean
*/
public function IsActive() {
return ((isset($this->mutexid) && $this->mutexid !== false) && (isset($this->memid) && $this->memid !== false));
}
/**
* Blocks the class mutex.
* Method blocks until mutex is available!
* ATTENTION: make sure that you *always* release a blocked mutex!
*
* @access public
* @return boolean
*/
public function BlockMutex() {
if ((isset($this->mutexid) && $this->mutexid !== false) && (isset($this->memid) && $this->memid !== false))
return @sem_acquire($this->mutexid);
return false;
}
/**
* Releases the class mutex.
* After the release other processes are able to block the mutex themselves.
*
* @access public
* @return boolean
*/
public function ReleaseMutex() {
if ((isset($this->mutexid) && $this->mutexid !== false) && (isset($this->memid) && $this->memid !== false))
return @sem_release($this->mutexid);
return false;
}
/**
* Indicates if the requested variable is available in IPC data.
*
* @param int $id int indicating the variable
*
* @access public
* @return boolean
*/
public function HasData($id = 2) {
if ((isset($this->mutexid) && $this->mutexid !== false) && (isset($this->memid) && $this->memid !== false)) {
if (function_exists("shm_has_var"))
return @shm_has_var($this->memid, $id);
else {
$some = $this->GetData($id);
return isset($some);
}
}
return false;
}
/**
* Returns the requested variable from IPC data.
*
* @param int $id int indicating the variable
*
* @access public
* @return mixed
*/
public function GetData($id = 2) {
if ((isset($this->mutexid) && $this->mutexid !== false) && (isset($this->memid) && $this->memid !== false))
return @shm_get_var($this->memid, $id);
return ;
}
/**
* Writes the transmitted variable to IPC data.
* Subclasses may never use an id < 2!
*
* @param mixed $data data which should be saved into IPC data
* @param int $id int indicating the variable (bigger than 2!)
*
* @access public
* @return boolean
*/
public function SetData($data, $id = 2) {
if ((isset($this->mutexid) && $this->mutexid !== false) && (isset($this->memid) && $this->memid !== false))
return @shm_put_var($this->memid, $id, $data);
return false;
}
/**
* Sets the time when the shared memory block was created.
*
* @access private
* @return boolean
*/
private function setInitialCleanTime() {
$stat = false;
// exclusive block
if ($this->BlockMutex()) {
if ($this->HasData(1) == false)
$stat = $this->SetData(time(), 1);
$this->ReleaseMutex();
}
// end exclusive block
return $stat;
}
}
...@@ -71,10 +71,19 @@ ...@@ -71,10 +71,19 @@
define('USE_FULLEMAIL_FOR_LOGIN', true); define('USE_FULLEMAIL_FOR_LOGIN', true);
/********************************************************************************** /**********************************************************************************
* Default FileStateMachine settings * Default State settings
*/ */
define('STATE_DIR', '/var/lib/z-push/'); define('STATE_DIR', '/var/lib/z-push/');
/**********************************************************************************
* IPC - InterProcessCommunication
*
* Is either provided by using shared memory on a single host or
* using the memcache provider for multi-host environments.
* When another implementation should be used, the class can be set here explicitly.
* If empty Z-Push will try to use available providers.
*/
define('IPC_PROVIDER', '');
/********************************************************************************** /**********************************************************************************
* Logging settings * Logging settings
......
This diff is collapsed.
...@@ -305,7 +305,7 @@ class LoopDetection extends InterProcessData { ...@@ -305,7 +305,7 @@ class LoopDetection extends InterProcessData {
*/ */
private function updateProcessStack() { private function updateProcessStack() {
// initialize params // initialize params
$this->InitializeParams(); $this->initializeParams();
if ($this->blockMutex()) { if ($this->blockMutex()) {
$loopdata = ($this->hasData()) ? $this->getData() : array(); $loopdata = ($this->hasData()) ? $this->getData() : array();
...@@ -354,7 +354,7 @@ class LoopDetection extends InterProcessData { ...@@ -354,7 +354,7 @@ class LoopDetection extends InterProcessData {
*/ */
private function getProcessStack() { private function getProcessStack() {
// initialize params // initialize params
$this->InitializeParams(); $this->initializeParams();
$stack = array(); $stack = array();
if ($this->blockMutex()) { if ($this->blockMutex()) {
...@@ -401,7 +401,7 @@ class LoopDetection extends InterProcessData { ...@@ -401,7 +401,7 @@ class LoopDetection extends InterProcessData {
$brokenkey = self::BROKENMSGS ."-". $folderid; $brokenkey = self::BROKENMSGS ."-". $folderid;
// initialize params // initialize params
$this->InitializeParams(); $this->initializeParams();
if ($this->blockMutex()) { if ($this->blockMutex()) {
$loopdata = ($this->hasData()) ? $this->getData() : array(); $loopdata = ($this->hasData()) ? $this->getData() : array();
...@@ -443,7 +443,7 @@ class LoopDetection extends InterProcessData { ...@@ -443,7 +443,7 @@ class LoopDetection extends InterProcessData {
$okIds = array(); $okIds = array();
// initialize params // initialize params
$this->InitializeParams(); $this->initializeParams();
if ($this->blockMutex()) { if ($this->blockMutex()) {
$loopdata = ($this->hasData()) ? $this->getData() : array(); $loopdata = ($this->hasData()) ? $this->getData() : array();
...@@ -504,7 +504,7 @@ class LoopDetection extends InterProcessData { ...@@ -504,7 +504,7 @@ class LoopDetection extends InterProcessData {
*/ */
public function SetSyncStateUsage($folderid, $uuid, $counter) { public function SetSyncStateUsage($folderid, $uuid, $counter) {
// initialize params // initialize params
$this->InitializeParams(); $this->initializeParams();
ZLog::Write(LOGLEVEL_DEBUG, sprintf("LoopDetection->SetSyncStateUsage(): uuid: %s counter: %d", $uuid, $counter)); ZLog::Write(LOGLEVEL_DEBUG, sprintf("LoopDetection->SetSyncStateUsage(): uuid: %s counter: %d", $uuid, $counter));
...@@ -551,7 +551,7 @@ class LoopDetection extends InterProcessData { ...@@ -551,7 +551,7 @@ class LoopDetection extends InterProcessData {
*/ */
public function IsSyncStateObsolete($folderid, $uuid, $counter) { public function IsSyncStateObsolete($folderid, $uuid, $counter) {
// initialize params // initialize params
$this->InitializeParams(); $this->initializeParams();
$obsolete = false; $obsolete = false;
...@@ -636,7 +636,7 @@ class LoopDetection extends InterProcessData { ...@@ -636,7 +636,7 @@ class LoopDetection extends InterProcessData {
} }
// initialize params // initialize params
$this->InitializeParams(); $this->initializeParams();
$loop = false; $loop = false;
......
...@@ -89,7 +89,7 @@ class PingTracking extends InterProcessData { ...@@ -89,7 +89,7 @@ class PingTracking extends InterProcessData {
$stat = false; $stat = false;
// initialize params // initialize params
$this->InitializeParams(); $this->initializeParams();
// exclusive block // exclusive block
if ($this->blockMutex()) { if ($this->blockMutex()) {
......
...@@ -63,7 +63,7 @@ class TopCollector extends InterProcessData { ...@@ -63,7 +63,7 @@ class TopCollector extends InterProcessData {
parent::__construct(); parent::__construct();
// initialize params // initialize params
$this->InitializeParams(); $this->initializeParams();
$this->preserved = array(); $this->preserved = array();
// static vars come from the parent class // static vars come from the parent class
...@@ -222,8 +222,9 @@ class TopCollector extends InterProcessData { ...@@ -222,8 +222,9 @@ class TopCollector extends InterProcessData {
} }
} }
} }
foreach ($toClear as $tc) foreach ($toClear as $tc) {
unset($topdata[$tc[0]][$tc[1]][$tc[2]]); unset($topdata[$tc[0]][$tc[1]][$tc[2]]);
}
} }
$stat = $this->setData($topdata, self::TOPDATA); $stat = $this->setData($topdata, self::TOPDATA);
...@@ -260,6 +261,20 @@ class TopCollector extends InterProcessData { ...@@ -260,6 +261,20 @@ class TopCollector extends InterProcessData {
return true; return true;
} }
/**
* Reinitializes the IPC data.
*
* @access public
* @return boolean
*/
public function ReInitIPC() {
$status = parent::ReInitIPC();
if (!status) {
$this->SetData(array(), self::TOPDATA);
}
return $status;
}
/** /**
* Indicates if top data should be saved or not * Indicates if top data should be saved or not
* Returns true for 10 seconds after the latest CollectData() * Returns true for 10 seconds after the latest CollectData()
......
...@@ -57,7 +57,7 @@ class SimpleMutex extends InterProcessData { ...@@ -57,7 +57,7 @@ class SimpleMutex extends InterProcessData {
} }
/** /**
* Blocks the mutex * Blocks the mutex.
* Method blocks until mutex is available! * Method blocks until mutex is available!
* ATTENTION: make sure that you *always* release a blocked mutex! * ATTENTION: make sure that you *always* release a blocked mutex!
* *
...@@ -74,7 +74,7 @@ class SimpleMutex extends InterProcessData { ...@@ -74,7 +74,7 @@ class SimpleMutex extends InterProcessData {
/** /**
* Releases the mutex * Releases the mutex
* After the release other processes are able to block the mutex themselfs * After the release other processes are able to block the mutex themselves.
* *
* @access public * @access public
* @return boolean * @return boolean
......
<?php
/***********************************************
* File : iipcprovider.php
* Project : Z-Push
* Descr : Interface for interprocess communication
* providers for different purposes
*
* Created : 20.10.2011
*
* Copyright 2007 - 2016 Zarafa Deutschland GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation with the following additional
* term according to sec. 7:
*
* According to sec. 7 of the GNU Affero General Public License, version 3,
* the terms of the AGPL are supplemented with the following terms:
*
* "Zarafa" is a registered trademark of Zarafa B.V.
* "Z-Push" is a registered trademark of Zarafa Deutschland GmbH
* The licensing of the Program under the AGPL does not imply a trademark license.
* Therefore any rights, title and interest in our trademarks remain entirely with us.
*
* However, if you propagate an unmodified version of the Program you are
* allowed to use the term "Z-Push" to indicate that you distribute the Program.
* Furthermore you may use our trademarks where it is necessary to indicate
* the intended purpose of a product or service provided you use it in accordance
* with honest practices in industrial or commercial matters.
* If you want to propagate modified versions of the Program under the name "Z-Push",
* you may only do so if you have a written permission by Zarafa Deutschland GmbH
* (to acquire a permission please contact Zarafa at trademark@zarafa.com).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Consult LICENSE file for details
************************************************/
interface IIpcProvider
{
/**
* Constructor
*
* @param int $type
* @param int $allocate
* @param string $class
*/
public function __construct($type, $allocate, $class);
/**
* Reinitializes the IPC data. If the provider has no way of performing
* this action, it should return 'false'.
*
* @access public
* @return boolean
*/
public function ReInitIPC();
/**
* Cleans up the IPC data block.
*
* @access public
* @return boolean
*/
public function Clean();
/**
* Indicates if the IPC is active.
*
* @access public
* @return boolean
*/
public function IsActive();
/**
* Blocks the class mutex.
* Method blocks until mutex is available!
* ATTENTION: make sure that you *always* release a blocked mutex!
*
* @access public
* @return boolean
*/
public function BlockMutex();
/**
* Releases the class mutex.
* After the release other processes are able to block the mutex themselves.
*
* @access public
* @return boolean
*/
public function ReleaseMutex();
/**
* Indicates if the requested variable is available in IPC data.
*
* @param int $id int indicating the variable
*
* @access public
* @return boolean
*/
public function HasData($id = 2);
/**
* Returns the requested variable from IPC data.
*
* @param int $id int indicating the variable
*
* @access public
* @return mixed
*/
public function GetData($id = 2);
/**
* Writes the transmitted variable to IPC data.
* Subclasses may never use an id < 2!
*
* @param mixed $data data which should be saved into IPC data
* @param int $id int indicating the variable (bigger than 2!)
*
* @access public
* @return boolean
*/
public function SetData($data, $id = 2);
}
Copyright (c) 2015 Nils Adermann, Jordi Boggiano Copyright (c) 2016 Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
......
...@@ -34,6 +34,7 @@ return array( ...@@ -34,6 +34,7 @@ return array(
'IChanges' => $baseDir . '/lib/interface/ichanges.php', 'IChanges' => $baseDir . '/lib/interface/ichanges.php',
'IExportChanges' => $baseDir . '/lib/interface/iexportchanges.php', 'IExportChanges' => $baseDir . '/lib/interface/iexportchanges.php',
'IImportChanges' => $baseDir . '/lib/interface/iimportchanges.php', 'IImportChanges' => $baseDir . '/lib/interface/iimportchanges.php',
'IIpcProvider' => $baseDir . '/lib/interface/iipcprovider.php',
'ISearchProvider' => $baseDir . '/lib/interface/isearchprovider.php', 'ISearchProvider' => $baseDir . '/lib/interface/isearchprovider.php',
'IStateMachine' => $baseDir . '/lib/interface/istatemachine.php', 'IStateMachine' => $baseDir . '/lib/interface/istatemachine.php',
'ImportChangesDiff' => $baseDir . '/lib/default/diffbackend/importchangesdiff.php', 'ImportChangesDiff' => $baseDir . '/lib/default/diffbackend/importchangesdiff.php',
......
...@@ -23,24 +23,35 @@ class ComposerAutoloaderInitd6749fc2fb9944bbe86b2b7d79a7852f ...@@ -23,24 +23,35 @@ class ComposerAutoloaderInitd6749fc2fb9944bbe86b2b7d79a7852f
self::$loader = $loader = new \Composer\Autoload\ClassLoader(); self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitd6749fc2fb9944bbe86b2b7d79a7852f', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInitd6749fc2fb9944bbe86b2b7d79a7852f', 'loadClassLoader'));
$map = require __DIR__ . '/autoload_namespaces.php'; $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
foreach ($map as $namespace => $path) { if ($useStaticLoader) {
$loader->set($namespace, $path); require_once __DIR__ . '/autoload_static.php';
}
$map = require __DIR__ . '/autoload_psr4.php'; call_user_func(\Composer\Autoload\ComposerStaticInitd6749fc2fb9944bbe86b2b7d79a7852f::getInitializer($loader));
foreach ($map as $namespace => $path) { } else {
$loader->setPsr4($namespace, $path); $map = require __DIR__ . '/autoload_namespaces.php';
} foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php'; $map = require __DIR__ . '/autoload_psr4.php';
if ($classMap) { foreach ($map as $namespace => $path) {
$loader->addClassMap($classMap); $loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
} }
$loader->register(true); $loader->register(true);
$includeFiles = require __DIR__ . '/autoload_files.php'; if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitd6749fc2fb9944bbe86b2b7d79a7852f::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) { foreach ($includeFiles as $fileIdentifier => $file) {
composerRequired6749fc2fb9944bbe86b2b7d79a7852f($fileIdentifier, $file); composerRequired6749fc2fb9944bbe86b2b7d79a7852f($fileIdentifier, $file);
} }
......
This diff is collapsed.
...@@ -480,7 +480,7 @@ class ZPushTop { ...@@ -480,7 +480,7 @@ class ZPushTop {
else if ($cmds[0] == "clear" ) { else if ($cmds[0] == "clear" ) {
$this->topCollector->ClearLatest(true); $this->topCollector->ClearLatest(true);
$this->topCollector->CollectData(true); $this->topCollector->CollectData(true);
$this->topCollector->ReInitSharedMem(); $this->topCollector->ReInitIPC();
} }
else if ($cmds[0] == "filter" || $cmds[0] == "f") { else if ($cmds[0] == "filter" || $cmds[0] == "f") {
if (!isset($cmds[1]) || $cmds[1] == "") { if (!isset($cmds[1]) || $cmds[1] == "") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment