_config =& $params; } // ------------------------------------------------------------------------ protected function _cookie_destroy() { return setcookie( $this->_config['cookie_name'], NULL, 1, $this->_config['cookie_path'], $this->_config['cookie_domain'], $this->_config['cookie_secure'], TRUE ); } // ------------------------------------------------------------------------ /** * Get lock * * A default locking mechanism via semaphores, if ext/sysvsem is available. * * Drivers will usually override this and only fallback to it if no other * locking mechanism is available. * * @param string $session_id * @return bool */ protected function _get_lock($session_id) { if ( ! extension_loaded('sysvsem')) { $this->_lock = TRUE; return TRUE; } if (($this->_lock = sem_get($session_id.($this->_config['match_ip'] ? '_'.$_SERVER['REMOTE_ADDR'] : ''), 1, 0644)) === FALSE) { return FALSE; } if ( ! sem_acquire($this->_lock)) { sem_remove($this->_lock); $this->_lock = FALSE; return FALSE; } return TRUE; } // ------------------------------------------------------------------------ /** * Release lock * * @return bool */ protected function _release_lock() { if (extension_loaded('sysvsem') && $this->_lock) { sem_release($this->_lock); sem_remove($this->_lock); $this->_lock = FALSE; } return TRUE; } } /* End of file Session_driver.php */ /* Location: ./system/libraries/Session/Session_driver.php */