From cec9aeb79e809449dae1d2861c8d85d34fc9aba1 Mon Sep 17 00:00:00 2001 From: Xuefer Date: Sun, 4 Oct 2009 11:04:34 +0000 Subject: [PATCH] segv because dir/filepath is unused by var key, need space optimize later git-svn-id: svn://svn.lighttpd.net/xcache/trunk@688 c26eb9a1-5813-0410-bd6c-c2e55f420ca7 --- processor/processor.m4 | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/processor/processor.m4 b/processor/processor.m4 index 63f2444..2f8cfc9 100644 --- a/processor/processor.m4 +++ b/processor/processor.m4 @@ -933,17 +933,30 @@ DEF_STRUCT_P_FUNC(`xc_entry_t', , ` DISPATCH(int, inode) #endif - DISPATCH(int, filepath_len) - IFRESTORE(`COPY(filepath)', `PROC_STRING_L(filepath, filepath_len)') - DISPATCH(int, dirpath_len) - IFRESTORE(`COPY(dirpath)', `PROC_STRING_L(dirpath, dirpath_len)') + if (src->type == XC_TYPE_PHP) { + DISPATCH(int, filepath_len) + IFRESTORE(`COPY(filepath)', `PROC_STRING_L(filepath, filepath_len)') + DISPATCH(int, dirpath_len) + IFRESTORE(`COPY(dirpath)', `PROC_STRING_L(dirpath, dirpath_len)') #ifdef IS_UNICODE - DISPATCH(int, ufilepath_len) - IFRESTORE(`COPY(ufilepath)', `PROC_USTRING_L(ufilepath, ufilepath_len)') - DISPATCH(int, udirpath_len) - IFRESTORE(`COPY(udirpath)', `PROC_USTRING_L(udirpath, udirpath_len)') + DISPATCH(int, ufilepath_len) + IFRESTORE(`COPY(ufilepath)', `PROC_USTRING_L(ufilepath, ufilepath_len)') + DISPATCH(int, udirpath_len) + IFRESTORE(`COPY(udirpath)', `PROC_USTRING_L(udirpath, udirpath_len)') #endif - + } + else { + DONE(filepath_len) + DONE(filepath) + DONE(dirpath_len) + DONE(dirpath) +#ifdef IS_UNICODE + DONE(ufilepath_len) + DONE(ufilepath) + DONE(udirpath_len) + DONE(udirpath) +#endif + } ') dnl }}} dnl ====================================================