| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2006, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2007, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
*bytes_consumed += ptr->buflen;
}
- if ((size_t) -1 == phpstr_append(PHPSTR(buffer), ptr->buf, ptr->buflen)) {
+ if (PHPSTR_NOMEM == phpstr_append(PHPSTR(buffer), ptr->buf, ptr->buflen)) {
return PSFS_ERR_FATAL;
}
} else
if (!strcasecmp(name, "http.inflate")) {
- int flags = HTTP_ENCODING_STREAM_FLUSH_SYNC | (p ? HTTP_ENCODING_STREAM_PERSISTENT : 0);
+ int flags = p ? HTTP_ENCODING_STREAM_PERSISTENT : 0;
HTTP_FILTER_BUFFER(inflate) *b = NULL;
if ((b = http_encoding_inflate_stream_init(NULL, flags))) {
} else
if (!strcasecmp(name, "http.deflate")) {
- int flags = HTTP_ENCODING_STREAM_FLUSH_SYNC | (p ? HTTP_ENCODING_STREAM_PERSISTENT : 0);
+ int flags = p ? HTTP_ENCODING_STREAM_PERSISTENT : 0;
HTTP_FILTER_BUFFER(deflate) *b = NULL;
if (params) {
- switch (Z_TYPE_P(params))
- {
+ switch (Z_TYPE_P(params)) {
case IS_ARRAY:
case IS_OBJECT:
if (SUCCESS != zend_hash_find(HASH_OF(params), "flags", sizeof("flags"), (void *) &tmp)) {
zval *orig = *tmp;
convert_to_long_ex(tmp);
- flags |= (Z_LVAL_PP(tmp) & 0x00ffffff);
+ flags |= (Z_LVAL_PP(tmp) & 0x0fffffff);
if (orig != *tmp) zval_ptr_dtor(tmp);
}
}