From d7149ba8fc1cca561e4ad3ae30c12c2348842edc Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Mon, 27 Aug 2001 02:06:32 +0000 Subject: [PATCH] Cleanup --- ext/session/session.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/ext/session/session.c b/ext/session/session.c index 7250820ee4..86fc613c89 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -84,25 +84,11 @@ static ps_module *_php_find_ps_module(char *name TSRMLS_DC); static const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC); static void php_session_end_output_handler(TSRMLS_D); -static int session_adapt_uris(const char *src, size_t srclen, char **new, size_t *newlen, zend_bool do_flush TSRMLS_DC) +static void php_session_output_handler(char *output, uint output_len, char **handled_output, uint *handled_output_len, int mode TSRMLS_DC) { if (PS(define_sid) && (PS(session_status) == php_session_active)) { - *new = url_adapt_ext_ex(src, srclen, PS(session_name), PS(id), newlen, do_flush TSRMLS_CC); - return SUCCESS; + *handled_output = url_adapt_ext_ex(output, output_len, PS(session_name), PS(id), handled_output_len, (zend_bool) (mode&PHP_OUTPUT_HANDLER_END ? 1 : 0) TSRMLS_CC); } else { - return FAILURE; - } -} - - -static void php_session_output_handler(char *output, uint output_len, char **handled_output, uint *handled_output_len, int mode TSRMLS_DC) -{ - zend_bool do_flush; - - if (mode&PHP_OUTPUT_HANDLER_END) { - do_flush=1; - } - if (session_adapt_uris(output, output_len, handled_output, handled_output_len, do_flush TSRMLS_CC)==FAILURE) { *handled_output = NULL; } } -- 2.50.1