summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-06-29 11:28:30 +0200
committerRemi Collet <remi@remirepo.net>2018-06-29 11:28:30 +0200
commit52fbe69d84f31c926dc0a2e42350e05a3f3551d5 (patch)
tree62b48353742ee89325a2faa65652cc8cefbd9acd
parent72ecd8910ffe30b3701891ec8e54265585f03bbb (diff)
v2.0.2
-rw-r--r--9f0f5e450b0c27a565d9ffc5644be9cdc8345d71.patch105
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-stomp.spec11
4 files changed, 7 insertions, 113 deletions
diff --git a/9f0f5e450b0c27a565d9ffc5644be9cdc8345d71.patch b/9f0f5e450b0c27a565d9ffc5644be9cdc8345d71.patch
deleted file mode 100644
index 9329551..0000000
--- a/9f0f5e450b0c27a565d9ffc5644be9cdc8345d71.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From 9f0f5e450b0c27a565d9ffc5644be9cdc8345d71 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@php.net>
-Date: Fri, 29 Jun 2018 09:36:49 +0200
-Subject: [PATCH] fix for 7.3 php_url fields are zend_string + some -Wformat
- issues
-
----
- php_stomp.c | 18 +++++++++++++-----
- stomp.c | 4 ++--
- 2 files changed, 15 insertions(+), 7 deletions(-)
-
-diff --git a/php_stomp.c b/php_stomp.c
-index 0213d13..7a6de74 100644
---- a/php_stomp.c
-+++ b/php_stomp.c
-@@ -75,7 +75,7 @@
- efree(frame.headers);
-
- #define THROW_STOMP_EXCEPTION(excobj, errnum, error) \
-- ZVAL_OBJ(excobj, zend_throw_exception_ex(stomp_ce_exception, errnum , error));
-+ ZVAL_OBJ(excobj, zend_throw_exception_ex(stomp_ce_exception, errnum, "%s", error));
-
- #define STOMP_ERROR(errno, msg) \
- STOMP_G(error_no) = errno; \
-@@ -101,6 +101,12 @@
- } \
- }
-
-+#if PHP_VERSION_ID < 70300
-+#define STOMP_URL_STR(a) (a)
-+#else
-+#define STOMP_URL_STR(a) ZSTR_VAL(a)
-+#endif
-+
- static int le_stomp;
- static zend_object_handlers stomp_obj_handlers;
-
-@@ -484,7 +490,7 @@ PHP_FUNCTION(stomp_connect)
- zend_string_release(broker);
-
- if (url_parts->scheme) {
-- if (strcmp(url_parts->scheme, "ssl") == 0) {
-+ if (strcmp(STOMP_URL_STR(url_parts->scheme), "ssl") == 0) {
- #if HAVE_STOMP_SSL
- use_ssl = 1;
- #else
-@@ -492,7 +498,7 @@ PHP_FUNCTION(stomp_connect)
- php_url_free(url_parts);
- return;
- #endif
-- } else if (strcmp(url_parts->scheme, "tcp") != 0) {
-+ } else if (strcmp(STOMP_URL_STR(url_parts->scheme), "tcp") != 0) {
- STOMP_ERROR(0, PHP_STOMP_ERR_INVALID_BROKER_URI_SCHEME);
- php_url_free(url_parts);
- return;
-@@ -510,7 +516,7 @@ PHP_FUNCTION(stomp_connect)
- stomp->options.connect_timeout_sec = STOMP_G(connection_timeout_sec);
- stomp->options.connect_timeout_usec = STOMP_G(connection_timeout_usec);
-
-- stomp->status = stomp_connect(stomp, url_parts->host, url_parts->port ? url_parts->port : 61613 );
-+ stomp->status = stomp_connect(stomp, STOMP_URL_STR(url_parts->host), url_parts->port ? url_parts->port : 61613 );
- php_url_free(url_parts);
-
- if (stomp->status) {
-@@ -908,7 +914,7 @@ PHP_FUNCTION(stomp_read_frame)
- if (class_name && ZSTR_LEN(class_name)) {
- ce = zend_fetch_class(class_name, ZEND_FETCH_CLASS_AUTO);
- if (!ce) {
-- php_error_docref(NULL , E_WARNING, "Could not find class '%s'", class_name);
-+ php_error_docref(NULL , E_WARNING, "Could not find class '%s'", ZSTR_VAL(class_name));
- ce = stomp_ce_frame;
- }
- } else if (stomp_object) {
-@@ -979,7 +985,9 @@ PHP_FUNCTION(stomp_read_frame)
- fci.retval = &retval;
- fci.no_separation = 1;
-
-+#if PHP_VERSION_ID < 70300
- fcc.initialized = 1;
-+#endif
- fcc.function_handler = ce->constructor;
- #if (PHP_MAJOR_VERSION == 7 && PHP_MINOR_VERSION == 0)
- fcc.calling_scope = EG(scope);
-diff --git a/stomp.c b/stomp.c
-index be822e0..4831f2f 100644
---- a/stomp.c
-+++ b/stomp.c
-@@ -209,7 +209,7 @@ int stomp_connect(stomp_t *stomp, const char *host, unsigned short port TSRMLS_D
-
- stomp->fd = php_network_connect_socket_to_host(stomp->host, stomp->port, SOCK_STREAM, 0, &tv, NULL, NULL, NULL, 0, 0);
- if (stomp->fd == -1) {
-- snprintf(error, sizeof(error), "Unable to connect to %s:%ld", stomp->host, stomp->port);
-+ snprintf(error, sizeof(error), "Unable to connect to %s:%d", stomp->host, stomp->port);
- stomp_set_error(stomp, error, errno, "%s", strerror(errno));
- return 0;
- }
-@@ -257,7 +257,7 @@ int stomp_connect(stomp_t *stomp, const char *host, unsigned short port TSRMLS_D
- #endif
- return 1;
- } else {
-- snprintf(error, sizeof(error), "Unable to connect to %s:%ld", stomp->host, stomp->port);
-+ snprintf(error, sizeof(error), "Unable to connect to %s:%d", stomp->host, stomp->port);
- stomp_set_error(stomp, error, errno, "%s", strerror(errno));
- return 0;
- }
diff --git a/PHPINFO b/PHPINFO
index 6171102..612b593 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,7 +2,7 @@
Stomp
Stomp => enabled
-API version => 2.0.1
+API version => 2.0.2
SSL Support => enabled
Directive => Local Value => Master Value
diff --git a/REFLECTION b/REFLECTION
index 75ca409..6251362 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #146 Stomp version 2.0.1 ] {
+Extension [ <persistent> extension #146 Stomp version 2.0.2 ] {
- INI {
Entry [ stomp.default_broker <ALL> ]
diff --git a/php-pecl-stomp.spec b/php-pecl-stomp.spec
index c4ed221..64fb2ec 100644
--- a/php-pecl-stomp.spec
+++ b/php-pecl-stomp.spec
@@ -15,14 +15,12 @@
Summary: Stomp client extension
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 2.0.1
-Release: 4%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Version: 2.0.2
+Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-Patch0: https://github.com/php/pecl-tools-stomp/commit/9f0f5e450b0c27a565d9ffc5644be9cdc8345d71.patch
-
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 7
BuildRequires: %{?scl_prefix}php-pear
@@ -84,8 +82,6 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
-%patch0 -p1 -b .upstream
-
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_STOMP_VERSION/{s/.* "//;s/".*$//;p}' php_stomp.h)
if test "x${extver}" != "x%{version}%{?versuf}"; then
@@ -214,6 +210,9 @@ fi
%changelog
+* Fri Jun 29 2018 Remi Collet <remi@remirepo.net> - 2.0.2-1
+- update to 2.0.2
+
* Fri Jun 29 2018 Remi Collet <remi@remirepo.net> - 2.0.1-4
- add upstream patch for PHP 7.3