$this->queryInsertDataSet($dataSetInstance, array(self::DB_COLUMN_PEER_SESSION_ID => true));
// Debug message
- /* NOISY-DEBUG: */ $this->debugOutput('DATABASE-WRAPPER: Peer ' . $packageData[NetworkPackage::PACKAGE_DATA_SENDER] . ' has been registered.');
+ //* NOISY-DEBUG: */ $this->debugOutput('DATABASE-WRAPPER: Peer ' . $packageData[NetworkPackage::PACKAGE_DATA_SENDER] . ' has been registered.');
}
/**
}
// Debug message
- /* NOISY-DEBUG: */ $this->debugOutput('DATABASE-WRAPPER: Peer ' . $packageData[NetworkPackage::PACKAGE_DATA_SENDER] . ' has been registered/updated with state ' . $stateInstance->getStateName());
+ //* NOISY-DEBUG: */ $this->debugOutput('DATABASE-WRAPPER: Peer ' . $packageData[NetworkPackage::PACKAGE_DATA_SENDER] . ' has been registered/updated with state ' . $stateInstance->getStateName());
}
/**
} // END - if
// Debug message
- /* NOISY-DEBUG: */ $this->debugOutput('DATABASE-WRAPPER: peerName=' . $peerName . ',peerPort=' . $peerPort . ' - UNFINISHED!');
+ //* NOISY-DEBUG: */ $this->debugOutput('DATABASE-WRAPPER: peerName=' . $peerName . ',peerPort=' . $peerPort . ' - UNFINISHED!');
}
/**
*/
public function isSamePeerState (ConnectionHelper $helperInstance, array $packageData) {
// Debug message
- /* NOISY-DEBUG: */ $this->debugOutput('DATABASE-WRAPPER: State ' . $helperInstance->getPrintableState() . ' needs to be checked it has changed ...');
+ //* NOISY-DEBUG: */ $this->debugOutput('DATABASE-WRAPPER: State ' . $helperInstance->getPrintableState() . ' needs to be checked it has changed ...');
// Now get the search instance from given package data
$searchInstance = $this->getSenderSearchInstanceFromPackageData($packageData);
$isSamePeerState = ($rowData[self::DB_COLUMN_PEER_STATE] == $helperInstance->getPrintableState());
// Debug message
- /* NOISY-DEBUG: */ $this->debugOutput('DATABASE-WRAPPER: state in database: ' . $rowData[self::DB_COLUMN_PEER_STATE] . ', new state: ' . $helperInstance->getPrintableState() . ',isSamePeerState=' . intval($isSamePeerState));
+ //* NOISY-DEBUG: */ $this->debugOutput('DATABASE-WRAPPER: state in database: ' . $rowData[self::DB_COLUMN_PEER_STATE] . ', new state: ' . $helperInstance->getPrintableState() . ',isSamePeerState=' . intval($isSamePeerState));
// Return it
return $isSamePeerState;
$tableInstance->purgeOldEntriesBySocketResource($socketResource);
} catch (InvalidSocketException $e) {
// Just log all errors
- /* NOISY-DEBUG: */ $tableInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Purging of old entries failed. Message from exception: ' . $e->getMessage());
+ //* NOISY-DEBUG: */ $tableInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Purging of old entries failed. Message from exception: ' . $e->getMessage());
}
// Do we have an entry?
if ($tableInstance->isSenderNewPeer($packageData)) {
// Debug output
- /* NOISY-DEBUG: */ $tableInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] errorCode=' . $errorCode);
+ //* NOISY-DEBUG: */ $tableInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] errorCode=' . $errorCode);
// Register the new peer with its session id
$tableInstance->registerPeerByPackageData($packageData, $socketResource);
$tableInstance->registerPeerState($stateInstance, $packageData);
} elseif ($tableInstance->isSamePeerState($helperInstance, $packageData)) {
// Debug output
- /* NOISY-DEBUG: */ $tableInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state unchanged, re-generating old state ...');
+ //* NOISY-DEBUG: */ $tableInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state unchanged, re-generating old state ...');
/*
* The peer's state has noot changed, still we have to return a
$stateInstance = self::createPeerStateInstanceByName($helperInstance->getPrintableState(), $helperInstance);
} else {
// Debug output
- /* NOISY-DEBUG: */ $tableInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Updating peer state ...');
+ //* NOISY-DEBUG: */ $tableInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Updating peer state ...');
/*
* It is an already known peer but with a changed state. So first
}
// Debug message
- /* NOISY-DEBUG: */ $stateInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state has changed from ' . $helperInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . ' (' . $stateInstance->__toString() . ').');
+ //* NOISY-DEBUG: */ $stateInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state has changed from ' . $helperInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . ' (' . $stateInstance->__toString() . ').');
// Set the state in the helper
$helperInstance->setStateInstance($stateInstance);
$stateInstance = self::createObjectByConfiguredName('peer_' . $stateName . '_state_class', array($helperInstance));
// Debug message
- /* NOISY-DEBUG: */ $stateInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state has changed from ' . $helperInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . ' (' . $stateInstance->__toString() . ').');
+ //* NOISY-DEBUG: */ $stateInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state has changed from ' . $helperInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . ' (' . $stateInstance->__toString() . ').');
// Once we have that state, set it in the peer instance
$helperInstance->setStateInstance($stateInstance);