Compare commits

...

8 Commits

Author SHA1 Message Date
Vitaliy Filippov acf43f619f Only add content-length header for messages containing zero byte
Allows OpenMQ/ActiveMQ to correctly map messages to JMS TextMessages
instead of only BytesMessages.

Fixes https://bugs.php.net/bug.php?id=70280
2015-08-18 12:08:17 +03:00
Vitaliy Filippov 618d2bd4d4 Fix compiler warning (assignment makes pointer from integer without a cast) 2015-08-18 12:07:50 +03:00
Gennady Feldman eb55496781 Fixing stomp_writable() check so we can catch when connect failed. 2015-06-05 14:41:04 -04:00
Gennady Feldman 15a3b9a059 1.0.8 => 1.0.9-dev 2015-05-18 18:19:58 -04:00
Gennady Feldman 50bfb5d8da Releasing v1.0.8 2015-05-18 18:17:11 -04:00
Gennady Feldman 4bd40f20a2 Fixing PHP_STOMP_VERSION constant, per Remi's request. 2015-05-18 18:08:25 -04:00
Remi Collet bf4539e523 fix perm on source files 2015-05-16 07:18:45 +02:00
Gennady Feldman 2c4b2f8bf1 1.0.7 => 1.0.8-dev 2015-05-15 17:21:29 -04:00
5 changed files with 19 additions and 13 deletions

View File

@ -18,14 +18,11 @@ This extension allows php applications to communicate with any Stomp compliant M
<email>gena01@php.net</email>
<active>yes</active>
</lead>
<date>2015-05-15</date>
<version><release>1.0.7</release><api>1.0.7</api></version>
<date>XXXX-XX-XX</date>
<version><release>1.0.X</release><api>1.0.X</api></version>
<stability><release>stable</release><api>stable</api></stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- add LICENSE file as documentation (Remi)
- Fixed Windows compilation regression due to new TCP_NODELAY code. (Gennady Feldman)
- Fixed bug where error checking was missing after stomp_send(). (Gennady Feldman)
</notes>
<contents>
<dir name="/">
@ -86,6 +83,16 @@ This extension allows php applications to communicate with any Stomp compliant M
</extsrcrelease>
<changelog>
<release>
<version><release>1.0.8</release><api>1.0.8</api></version>
<stability><release>stable</release><api>stable</api></stability>
<license uri="http://www.php.net/license">PHP License</license>
<date>2015-05-18</date>
<notes>
- Fix perm on source files. (Remi)
- Fixing PHP_STOMP_VERSION constant, per Remi's request. (Gennady)
</notes>
</release>
<release>
<version><release>1.0.7</release><api>1.0.7</api></version>
<stability><release>stable</release><api>stable</api></stability>

7
php_stomp.c Executable file → Normal file
View File

@ -531,6 +531,7 @@ PHP_FUNCTION(stomp_connect)
if (stomp->status) {
stomp_frame_t *res;
int rres;
stomp_frame_t frame = {0};
INIT_FRAME(frame, "CONNECT");
@ -549,9 +550,9 @@ PHP_FUNCTION(stomp_connect)
FRAME_HEADER_FROM_HASHTABLE(frame.headers, Z_ARRVAL_P(headers));
}
res = stomp_send(stomp, &frame TSRMLS_CC);
rres = stomp_send(stomp, &frame TSRMLS_CC);
CLEAR_FRAME(frame);
if (0 == res) {
if (0 == rres) {
zval *excobj = zend_throw_exception_ex(stomp_ce_exception, stomp->errnum TSRMLS_CC, stomp->error);
if (stomp->error_details) {
zend_update_property_string(stomp_ce_exception, excobj, "details", sizeof("details")-1, stomp->error_details TSRMLS_CC);
@ -746,6 +747,8 @@ PHP_FUNCTION(stomp_send)
CLEAR_FRAME(frame);
RETURN_FALSE;
}
if (frame.body_length > 0 && strnlen(frame.body, frame.body_length) >= frame.body_length)
frame.body_length = 0;
if (stomp_send(stomp, &frame TSRMLS_CC) > 0) {
success = stomp_valid_receipt(stomp, &frame);

View File

@ -29,11 +29,7 @@ typedef struct _stomp_object {
} stomp_object_t;
#define PHP_STOMP_EXTNAME "Stomp"
#define PHP_STOMP_MAJOR_VERSION "1"
#define PHP_STOMP_MINOR_VERSION "0"
#define PHP_STOMP_PATCH_VERSION "7"
#define PHP_STOMP_VERSION_STATUS "-dev"
#define PHP_STOMP_VERSION PHP_STOMP_MAJOR_VERSION "." PHP_STOMP_MINOR_VERSION "." PHP_STOMP_PATCH_VERSION PHP_STOMP_VERSION_STATUS
#define PHP_STOMP_VERSION "1.0.9-dev"
#define PHP_STOMP_RES_NAME "stomp connection"

View File

@ -181,7 +181,7 @@ int stomp_writable(stomp_t *stomp)
int n;
n = php_pollfd_for_ms(stomp->fd, POLLOUT, 1000);
if (n < 1) {
if (n != POLLOUT) {
#ifndef PHP_WIN32
if (n == 0) {
errno = ETIMEDOUT;

0
stomp.h Executable file → Normal file
View File