summaryrefslogtreecommitdiff
path: root/ext/session
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2015-01-03 01:22:58 -0800
committerStanislav Malyshev <stas@php.net>2015-01-10 15:07:38 -0800
commitb7a7b1a624c97945c0aaa49d46ae996fc0bdb6bc (patch)
tree0e09490075ee4f9a75a77ef4168d8ee254c52e5b /ext/session
parent773c8b0c092a0e9ad5c5548815bcb9991d54d5c1 (diff)
downloadphp-git-b7a7b1a624c97945c0aaa49d46ae996fc0bdb6bc.tar.gz
trailing whitespace removal
Diffstat (limited to 'ext/session')
-rw-r--r--ext/session/mod_files.c2
-rw-r--r--ext/session/mod_files.h2
-rw-r--r--ext/session/mod_mm.c2
-rw-r--r--ext/session/mod_mm.h2
-rw-r--r--ext/session/mod_user.c6
-rw-r--r--ext/session/mod_user.h2
-rw-r--r--ext/session/mod_user_class.c10
-rw-r--r--ext/session/php_session.h2
-rw-r--r--ext/session/session.c18
9 files changed, 23 insertions, 23 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index 64aa0ce145..897167382e 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -148,7 +148,7 @@ static void ps_files_open(ps_files *data, const char *key)
#ifdef O_NOFOLLOW
data->fd = VCWD_OPEN_MODE(buf, O_CREAT | O_RDWR | O_BINARY | O_NOFOLLOW, data->filemode);
#else
- /* Check to make sure that the opened file is not outside of allowable dirs.
+ /* Check to make sure that the opened file is not outside of allowable dirs.
This is not 100% safe but it's hard to do something better without O_NOFOLLOW */
if(PG(open_basedir) && lstat(buf, &sbuf) == 0 && S_ISLNK(sbuf.st_mode) && php_check_open_basedir(buf)) {
return;
diff --git a/ext/session/mod_files.h b/ext/session/mod_files.h
index a56dce1d36..f08305b40e 100644
--- a/ext/session/mod_files.h
+++ b/ext/session/mod_files.h
@@ -1,4 +1,4 @@
-/*
+/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
diff --git a/ext/session/mod_mm.c b/ext/session/mod_mm.c
index d267dd0e1f..4db8f0e40f 100644
--- a/ext/session/mod_mm.c
+++ b/ext/session/mod_mm.c
@@ -122,7 +122,7 @@ static ps_sd *ps_sd_new(ps_mm *data, const char *key)
sd = mm_malloc(data->mm, sizeof(ps_sd) + keylen);
if (!sd) {
-
+
php_error_docref(NULL, E_WARNING, "mm_malloc failed, avail %ld, err %s", mm_available(data->mm), mm_error());
return NULL;
}
diff --git a/ext/session/mod_mm.h b/ext/session/mod_mm.h
index e0f2c1239f..07a1ecdaba 100644
--- a/ext/session/mod_mm.h
+++ b/ext/session/mod_mm.h
@@ -1,4 +1,4 @@
-/*
+/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c
index 0e6e00eb32..dc443d382a 100644
--- a/ext/session/mod_user.c
+++ b/ext/session/mod_user.c
@@ -1,4 +1,4 @@
-/*
+/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
@@ -94,11 +94,11 @@ PS_OPEN_FUNC(user)
{
zval args[2];
STDVARS;
-
+
if (Z_ISUNDEF(PSF(open))) {
php_error_docref(NULL, E_WARNING,
"user session functions not defined");
-
+
return FAILURE;
}
diff --git a/ext/session/mod_user.h b/ext/session/mod_user.h
index 72a119cbab..38749c581e 100644
--- a/ext/session/mod_user.h
+++ b/ext/session/mod_user.h
@@ -1,4 +1,4 @@
-/*
+/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
diff --git a/ext/session/mod_user_class.c b/ext/session/mod_user_class.c
index 0c8fb2c701..282137386e 100644
--- a/ext/session/mod_user_class.c
+++ b/ext/session/mod_user_class.c
@@ -25,14 +25,14 @@
if (PS(default_mod) == NULL) { \
php_error_docref(NULL, E_CORE_ERROR, "Cannot call default session handler"); \
RETURN_FALSE; \
- }
+ }
#define PS_SANITY_CHECK_IS_OPEN \
PS_SANITY_CHECK; \
if (!PS(mod_user_is_open)) { \
php_error_docref(NULL, E_WARNING, "Parent session handler is not open"); \
RETURN_FALSE; \
- }
+ }
/* {{{ proto bool SessionHandler::open(string save_path, string session_name)
Wraps the old open handler */
@@ -61,7 +61,7 @@ PHP_METHOD(SessionHandler, close)
// don't return on failure, since not closing the default handler
// could result in memory leaks or other nasties
zend_parse_parameters_none();
-
+
PS(mod_user_is_open) = 0;
RETVAL_BOOL(SUCCESS == PS(default_mod)->s_close(&PS(mod_data)));
}
@@ -116,7 +116,7 @@ PHP_METHOD(SessionHandler, destroy)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &key) == FAILURE) {
return;
}
-
+
RETURN_BOOL(SUCCESS == PS(default_mod)->s_destroy(&PS(mod_data), key));
}
/* }}} */
@@ -133,7 +133,7 @@ PHP_METHOD(SessionHandler, gc)
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &maxlifetime) == FAILURE) {
return;
}
-
+
RETURN_BOOL(SUCCESS == PS(default_mod)->s_gc(&PS(mod_data), maxlifetime, &nrdels));
}
/* }}} */
diff --git a/ext/session/php_session.h b/ext/session/php_session.h
index f47938cab5..3160875ddf 100644
--- a/ext/session/php_session.h
+++ b/ext/session/php_session.h
@@ -1,4 +1,4 @@
-/*
+/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
diff --git a/ext/session/session.c b/ext/session/session.c
index 31f944df69..680ce73cbe 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -203,7 +203,7 @@ static zend_string *php_session_encode(void) /* {{{ */
if (!PS(serializer)) {
php_error_docref(NULL, E_WARNING, "Unknown session.serialize_handler. Failed to encode session object");
return NULL;
- }
+ }
return PS(serializer)->encode();
} else {
php_error_docref(NULL, E_WARNING, "Cannot encode non-existent session");
@@ -415,7 +415,7 @@ PHPAPI zend_string *php_session_create_id(PS_CREATE_SID_ARGS) /* {{{ */
php_error_docref(NULL, E_WARNING, "The ini setting hash_bits_per_character is out of range (should be 4, 5, or 6) - using 4 for now");
}
-
+
outid = zend_string_alloc((digest_len + 2) * ((8.0f / PS(hash_bits_per_character) + 0.5)), 0);
outid->len = (int)(bin_to_readable((char *)digest, digest_len, outid->val, (char)PS(hash_bits_per_character)) - (char *)&outid->val);
efree(digest);
@@ -836,7 +836,7 @@ PS_SERIALIZER_DECODE_FUNC(php_serialize) /* {{{ */
}
if (Z_TYPE(session_vars) == IS_NULL) {
array_init(&session_vars);
- }
+ }
ZVAL_NEW_REF(&PS(http_session_vars), &session_vars);
Z_ADDREF_P(&PS(http_session_vars));
zend_hash_update_ind(&EG(symbol_table).ht, var_name, &PS(http_session_vars));
@@ -1849,7 +1849,7 @@ static PHP_FUNCTION(session_set_save_handler)
}
zend_string_release(name);
}
-
+
if (PS(mod) && PS(mod) != &ps_mod_user) {
ini_name = zend_string_init("session.save_handler", sizeof("session.save_handler") - 1, 0);
ini_val = zend_string_init("user", sizeof("user") - 1, 0);
@@ -2670,12 +2670,12 @@ static int php_session_rfc1867_callback(unsigned int event, void *event_data, vo
case MULTIPART_EVENT_FILE_START: {
multipart_event_file_start *data = (multipart_event_file_start *) event_data;
- /* Do nothing when $_POST["PHP_SESSION_UPLOAD_PROGRESS"] is not set
+ /* Do nothing when $_POST["PHP_SESSION_UPLOAD_PROGRESS"] is not set
* or when we have no session id */
if (!Z_TYPE(progress->sid) || !progress->key.s) {
break;
}
-
+
/* First FILE_START event, initializing data */
if (Z_ISUNDEF(progress->data)) {
@@ -2717,7 +2717,7 @@ static int php_session_rfc1867_callback(unsigned int event, void *event_data, vo
add_assoc_long_ex(&progress->current_file, "bytes_processed", sizeof("bytes_processed") - 1, 0);
add_next_index_zval(&progress->files, &progress->current_file);
-
+
progress->current_file_bytes_processed = zend_hash_str_find(Z_ARRVAL(progress->current_file), "bytes_processed", sizeof("bytes_processed") - 1);
Z_LVAL_P(progress->current_file_bytes_processed) = data->post_bytes_processed;
@@ -2730,7 +2730,7 @@ static int php_session_rfc1867_callback(unsigned int event, void *event_data, vo
if (!Z_TYPE(progress->sid) || !progress->key.s) {
break;
}
-
+
Z_LVAL_P(progress->current_file_bytes_processed) = data->offset + data->length;
Z_LVAL_P(progress->post_bytes_processed) = data->post_bytes_processed;
@@ -2743,7 +2743,7 @@ static int php_session_rfc1867_callback(unsigned int event, void *event_data, vo
if (!Z_TYPE(progress->sid) || !progress->key.s) {
break;
}
-
+
if (data->temp_filename) {
add_assoc_string_ex(&progress->current_file, "tmp_name", sizeof("tmp_name") - 1, data->temp_filename);
}