Commit Graph

405 Commits

Author SHA1 Message Date
Gustavo André dos Santos Lopes
8dfe15a12e - Fixed accidental change. 2011-05-01 04:16:28 +00:00
Gustavo André dos Santos Lopes
93f65cdeac - Fixed bug #54623 (Segfault when when writing to a persistent socket after
closing a copy of the socket).
2011-05-01 03:57:01 +00:00
Pierrick Charron
1368364469 Fix common typos in the source code (Reported in Bug #54065)
# External libraries were excluded
# Thanks eitan at eitanadler dot com for the first patch :)
2011-04-03 21:46:52 +00:00
Gustavo André dos Santos Lopes
7f2937223d - Make fclose() actually close stream, even when the resource refcount is > 1.
This reverts the fix for bug #24557.
- Make php_stream_free delete the stream from the resources list, not merely
  decrease its refcount, as a single call to zend_list_delete does.           
#Not worth the risk merging to 5.3. While change #2 may prevent some segfaults,
#a quick and dirty survey to the codebase only showed calls to php_stream_close
#or php_stream_free on streams allocated in the same function, which would have
#refcount == 1. May be reconsidered.
2011-03-21 02:58:54 +00:00
Gustavo André dos Santos Lopes
a3a5157286 - PHP_STREAM_OPTION_WRITE_BUFFER no longer disables the read buffer of a plain
stream when 0 is given as the value.
- PHP_STREAM_OPTION_WRITE_BUFFER no longer changes the chunk size in socket
  streams.
- Added stream_set_chunk_size() function.
- Some signedness fixes.
- Test for commit r308474, now that it's possible to actually test it.
2011-02-19 01:28:37 +00:00
Gustavo André dos Santos Lopes
3759331276 - Changed return value in userspace stream set_option to "not implemented",
instead of failure.
#Currently, there's no way to test this, because the only operations that have
#a default implementation, set_chunk_size and set_read_buffer are either not
#exposed or, in the 2nd case, completely delegated to the user implementation,
#which can only return true/false, not "not implemented" (and not implementing
#the set_option method in the userspace stream results in error).
2011-02-18 17:53:26 +00:00
Gustavo André dos Santos Lopes
9bbc114b59 - Classes that implement stream wrappers can define a method called
stream_truncate that will respond to truncation, e.g. through ftruncate.
  Closes feature request #53888.
2011-02-17 00:25:32 +00:00
Adam Harvey
2b4fb94e8e Fix bug #53913 (Streams functions assume HAVE_GLOB is defined). Patch by Chris
Jones.
2011-02-04 10:47:41 +00:00
Gustavo André dos Santos Lopes
1f49902999 - Fixed bug #53903 (userspace stream stat callback does not separate the
elements of the returned array before converting them).
2011-02-01 22:55:17 +00:00
Gustavo André dos Santos Lopes
c6ccc43285 - Fixed several comparisons that always result in true of false
due to signedness of one of the operands, either by removing
  dead code or fixing it.
- Thrown some comments around in php_stream_get_record.
- See http://www.mail-archive.com/internals@lists.php.net/msg49525.html
2011-02-01 18:11:16 +00:00
Pierre Joye
657c934513 - don't continue if no valid option value 2011-01-20 07:38:00 +00:00
Pierre Joye
966a82c776 - no need of assert here 2011-01-20 06:32:59 +00:00
Ilia Alshanetsky
93fd1bf53f Fixed variable re-declaration 2011-01-13 12:56:28 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Gustavo André dos Santos Lopes
5a1b77422a - Reverted unintended change. 2010-11-19 23:42:44 +00:00
Gustavo André dos Santos Lopes
e10454ded8 - Fixed bug #52820 (writes to fopencookie FILE* not commited when seeking the
stream).
2010-11-15 18:22:52 +00:00
Gustavo André dos Santos Lopes
3a02cfb675 - Added leak_variable() function.
- Added mechanism to force outer streams to be closed before their inner ones.
- Fixed temp:// streams only handling correctly (through an ad hoc mechanism)  reverse closing order
  when the  inner stream is of type memory.
2010-11-15 03:05:32 +00:00
Gustavo André dos Santos Lopes
d37e1ea243 - Renamed php_stream_rep_nonstand_mode to
php_stream_mode_sanitize_fdopen_fopencookie, made it not
  exported and movied it from php_streams.h to
  php_streams_int.h.
2010-11-05 18:53:48 +00:00
Gustavo André dos Santos Lopes
0a35133524 - Fixed bug #53241 (stream casting that relies on fdopen/fopencookie fails
with streams opened with, inter alia, the 'xb' mode).
2010-11-05 01:29:08 +00:00
Gustavo André dos Santos Lopes
a1888f585c - Fixed forward stream seeking emulation in streams that don't support seeking
in situations where the read operation gives back less data than requested
  and when there was data in the buffer before the emulation started. Also made
  more consistent its behavior -- should return failure every time less data
  than was requested was skipped.
- Small performance improvement by correcting off-by-one error that generate an
  invalid call to the seek handler or read handler. in _php_stream_seek.
2010-10-13 03:13:29 +00:00
Pierre Joye
ed58636f00 - use TSRMLS_D/C with php_stream_context_alloc 2010-09-16 09:33:42 +00:00
Pierre Joye
daa90813fb - use TSRMLS_*C instead of TSRMLS_FETCH in zend_list_insert, missing header 2010-09-16 09:18:46 +00:00
Pierre Joye
aa0ed267a2 - use TSRMLS_*C instead of TSRMLS_FETCH in zend_list_insert 2010-09-16 09:13:19 +00:00
Felipe Pena
feda017cce - Fixed bug #49215 (make fails on glob_wrapper) 2010-09-10 21:33:50 +00:00
Pierre Joye
ada5423308 - WS 2010-09-01 10:16:48 +00:00
Pierre Joye
dec8593fac - add lstat support for Windows 2010-09-01 09:49:53 +00:00
Kalle Sommer Nielsen
159cd6916d Fixed compiler warnings in main/ 2010-08-17 12:49:19 +00:00
Pierre Joye
3a19fee38b - #51854, fix logic (patch by Tjerk) 2010-05-18 19:39:39 +00:00
Kalle Sommer Nielsen
dd8e59da8f Removed safe_mode
* Removed ini options, safe_mode*
 * Removed --enable-safe-mode --with-exec-dir configure options on Unix
 * Updated extensions, SAPI's and core
 * php_get_current_user() is now declared in main.c, thrus no need to include safe_mode.h anymore
2010-04-26 23:53:30 +00:00
Pierre Joye
c264445a37 - WS 2010-04-08 07:55:35 +00:00
Michael Wallner
5b277c4da0 add backlock socket context option for stream_socket_server(),
which had a hardcoded backlog of 5 at two occurrances
2010-03-11 16:37:24 +00:00
Pierre Joye
acc6609a27 - get the right error on windows 2010-02-21 17:44:25 +00:00
Pierre Joye
658e86b847 - prevent unexpectable behaviors (for the user) with invalid path 2010-02-07 20:15:58 +00:00
Pierre Joye
b7aee13069 - removed debug breakpoint and improve inline comment 2010-01-27 02:03:41 +00:00
Pierre Joye
6925763347 - prevent bad things to happen when invalid path are passed to MoveFileEx 2010-01-27 01:18:43 +00:00
Pierre Joye
573c33b3b7 - [DOC] #45986, bad file descriptor warning when rename is used with invalid path, add php_win32_docref2_from_error to display system error for non posix api 2010-01-26 20:04:03 +00:00
Jani Taskinen
3d733ce6fa - Fixed bug #50791 (Compile failure: Bad logic in defining fopencookie emulation) 2010-01-19 13:44:08 +00:00
Jani Taskinen
95a4f5fabe - WS + CS fixes 2010-01-19 12:03:07 +00:00
Ilia Alshanetsky
7e1f29e930 Fixed bug #50787 (stream_set_write_buffer() has no effect on socket streams). 2010-01-18 12:50:08 +00:00
Ilia Alshanetsky
d5b2007bed Fixed bug #50657 (copy() with an empty (zero-byte) HTTP source succeeds but returns false). 2010-01-06 12:54:53 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Antony Dovgal
42d05a5c02 remove automatic file unlocking on shutdown and/or stream close
(make it win32-specific for 5_2, as discussed with Ilia)
2009-12-25 20:34:59 +00:00
Stanislav Malyshev
0401c6ca2d fix bug #50196 2009-12-19 01:13:33 +00:00
Kalle Sommer Nielsen
1063c8346b MFT: VC10 build support 2009-12-03 11:50:32 +00:00
Felipe Pena
f61a06350a - Switching to TSRMLS_FETCH version 2009-11-16 10:36:27 +00:00
Felipe Pena
5411bb32a8 - Fixed bug #49936 (crash with ftp stream in php_stream_context_get_option())
(patch by Pierrick)
2009-11-15 20:30:57 +00:00
Johannes Schlüter
473d75475a Fix #50063 (safe_mode_include_dir fails) 2009-11-12 15:05:03 +00:00
Dmitry Stogov
4b1c7c5615 Fixed ext/standard/tests/streams/stream_get_contents_002.phpt 2009-09-23 10:25:54 +00:00
Sriram Natarajan
fbc335e5d1 - Fixed bug #49572 (use of C++ style comments causes build failure) 2009-09-17 02:45:25 +00:00
Sriram Natarajan
ac2d3990f2 - Fixed bug #49447 (php engine need to correctly check for socket API
return status on windows). (Sriram Natarajan)
2009-09-04 07:59:48 +00:00