CVS update: php31/main

From: Date: Tue, 25 Aug 1998 18:56:41 +0000
Subject: CVS update: php31/main
Groups: php.dev 
Request: Send a blank email to php-dev+get-573@lists.php.net to get a copy of this message
Date: Tuesday August 25, 1998 @ 14:56 Author: rasmus Update of /repository/php31/main In directory asf:/export/home/rasmus/php31/main Modified Files: control_structures_inline.h list.c mime.c tls.h Log Message: Delete file upload temp files after a request Index: php31/main/control_structures_inline.h diff -c php31/main/control_structures_inline.h:2.8 php31/main/control_structures_inline.h:2.9 *** php31/main/control_structures_inline.h:2.8 Fri Aug 21 12:41:05 1998 --- php31/main/control_structures_inline.h Tue Aug 25 14:56:40 1998 *************** *** 29,35 **** */ ! /* $Id: control_structures_inline.h,v 2.8 1998/08/21 16:41:05 shane Exp $ */ #ifdef THREAD_SAFE #include "tls.h" --- 29,35 ---- */ ! /* $Id: control_structures_inline.h,v 2.9 1998/08/25 18:56:40 rasmus Exp $ */ #ifdef THREAD_SAFE #include "tls.h" *************** *** 43,49 **** #ifndef THREAD_SAFE extern pval *array_ptr; static pval return_value; ! static HashTable list, plist; #endif extern inline int cs_global_variable(pval *varname INLINE_TLS); --- 43,49 ---- #ifndef THREAD_SAFE extern pval *array_ptr; static pval return_value; ! HashTable list, plist; #endif extern inline int cs_global_variable(pval *varname INLINE_TLS); Index: php31/main/list.c diff -c php31/main/list.c:2.0 php31/main/list.c:2.1 *** php31/main/list.c:2.0 Fri Jul 3 09:17:20 1998 --- php31/main/list.c Tue Aug 25 14:56:40 1998 *************** *** 29,35 **** */ ! /* $Id: list.c,v 2.0 1998/07/03 13:17:20 rasmus Exp $ */ #ifdef THREAD_SAFE #include "tls.h" --- 29,35 ---- */ ! /* $Id: list.c,v 2.1 1998/08/25 18:56:40 rasmus Exp $ */ #ifdef THREAD_SAFE #include "tls.h" *************** *** 49,55 **** #include "os/nt/readdir.h" #endif ! HashTable list,plist; PHPAPI int le_index_ptr; PHPAPI int php3_list_do_insert(HashTable *list,void *ptr, int type) --- 49,55 ---- #include "os/nt/readdir.h" #endif ! /* HashTable list,plist; */ PHPAPI int le_index_ptr; PHPAPI int php3_list_do_insert(HashTable *list,void *ptr, int type) Index: php31/main/mime.c diff -c php31/main/mime.c:2.1 php31/main/mime.c:2.2 *** php31/main/mime.c:2.1 Fri Jul 17 12:03:44 1998 --- php31/main/mime.c Tue Aug 25 14:56:41 1998 *************** *** 27,33 **** | | +----------------------------------------------------------------------+ */ ! /* $Id: mime.c,v 2.1 1998/07/17 16:03:44 ssb Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif --- 27,33 ---- | | +----------------------------------------------------------------------+ */ ! /* $Id: mime.c,v 2.2 1998/08/25 18:56:41 rasmus Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif *************** *** 37,43 **** --- 37,48 ---- #include "ext/standard/type.h" #include "post.h" #include "mime.h" + #include "php3_list.h" + #ifndef THREAD_SAFE + int le_uploads; + extern HashTable list; + #endif #define NEW_BOUNDARY_CHECK 1 #define SAFE_RETURN { if (namebuf) efree(namebuf); if (filenamebuf) efree(filenamebuf); if (lbuf) efree(lbuf); return; } *************** *** 207,212 **** --- 212,218 ---- } bytes = fwrite(ptr, 1, loc - ptr - 4, fp); fclose(fp); + php3_list_do_insert(&GLOBAL(list),fn,GLOBAL(le_uploads)); /* Tell PHP about the file so the destructor can unlink it later */ if (bytes < (loc - ptr - 4)) { php3_error(E_WARNING, "Only %d bytes were written, expected to write %ld", bytes, loc - ptr - 4); } Index: php31/main/tls.h diff -c php31/main/tls.h:2.7 php31/main/tls.h:2.8 *** php31/main/tls.h:2.7 Fri Aug 21 17:00:44 1998 --- php31/main/tls.h Tue Aug 25 14:56:41 1998 *************** *** 174,179 **** --- 174,180 ---- int header_called; /*post.c*/ int php3_track_vars; + int le_uploads; /*strings.h*/ char *strtok_string; char *strtok_pos1; /*STATIC VAR*/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#573) next »