Markus Fischer [Wed, 1 May 2002 10:41:10 +0000 (10:41 +0000)]
- Fix couple of problems with socket_create_pair():
- Force fourth argument to be passed by reference
- Since the argument is modified there is no need to force it to be an array
since it's destroyed anyway
- Only modify the argument if socketpair() was successfully
- Fix string modified for error message message
- Set global last_error when socketpair() fails
Jason Greene [Wed, 1 May 2002 04:46:59 +0000 (04:46 +0000)]
Changed socket_select to force reference copy, the older code would modify all references
@Fixed a bug in socket_select() that could cause unexpected behavior when using a statement
@ like $w=$e=array($sock);
@This change unfortunately prevents the use of constant values(NULL) for the socket array paramaters.
@Instead use a temporary variable or an expression with the leftmost member being a temporary variable.
@ ex. socket_select($w, $r, $e=NULL, 10);
Implement context option setting API.
Add/amend debugging code for sockets.
Add a flag that will help the http wrapper optimize itself when
it is not being used for include/require.
Markus Fischer [Mon, 29 Apr 2002 14:52:29 +0000 (14:52 +0000)]
- Store last errno in the module global 'last_error' implicitely
- Set the global 'last_error' explicitely for functions which can't return an
error withing a single socket context (socket_create and socket_select)
- Modified socket_last_error() to return global modules last
error if no socket resource is given
- Added a couple of more E_WARNING messages in case something
goes foobar so the user isn't left alone in the dark.
Fix couple of nasty serializer bugs:
a) When array unserializer encounters less data than it expects (like:
a:1:{}) it crashes. I don't understand exactly why it does, but the fact
is it does. So now it should catch "}" and bail out.
b) When array/object data are serialized, the count is written by hash
count. However, it can be that in-loop check fails and less data than
expected will then be written into the array. Which, due to a), would
crash on unserialize. So now it will write empty entries in place of
entries it cannot serialize (the other choice would be make two passes on
the data, which I don't like).
MFZE1: If the size-operands of memset are constants, the compiler can turn them into fast inline code. So, instead of using ecalloc, we use emalloc + memset in macro form now. emalloc will not return NULL, so the chosen macro form is safe. This is not true for malloc(3). An inline function accomodates our needs here. Suggested by: http://www.mail-archive.com/dev%40httpd.apache.org/msg02492.html (Sascha)
@ - added session_set_userdata() which enables you to specify one variable
@ that will be kept in the browser in addition to the session-id. This
@ only works when using trans-sid sessions (no cookie). (thies)
Fixed bug #16861.
touch sets wrong atime or mtime when they are not specified.
touch silently failed when HAVE_UTIME is not defined.
(This needs more consideration. Which platform does not support it?)
# Derick, after HAVE_UTIME issue is resovled, this should be merged.
# or we can just merge 1st problem for now.
Harald Radi [Fri, 26 Apr 2002 18:20:45 +0000 (18:20 +0000)]
this patch should fix a bug where intermediate comvals were not
released before they were freed. this caused outproc com server
to belive that they still referenced even when the php process
already terminated.