diff options
-rw-r--r-- | 07c762243598947e932502e92674df7fc6d01204.patch | 129 | ||||
-rw-r--r-- | REFLECTION | 4 | ||||
-rw-r--r-- | php-pecl-swoole.spec | 12 |
3 files changed, 10 insertions, 135 deletions
diff --git a/07c762243598947e932502e92674df7fc6d01204.patch b/07c762243598947e932502e92674df7fc6d01204.patch deleted file mode 100644 index b5a23f5..0000000 --- a/07c762243598947e932502e92674df7fc6d01204.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 07c762243598947e932502e92674df7fc6d01204 Mon Sep 17 00:00:00 2001 -From: matyhtf <mikan.tenny@gmail.com> -Date: Tue, 18 Apr 2017 18:46:34 +0800 -Subject: [PATCH] fixed compile error with enable-ringbuffer - ---- - src/network/ReactorThread.c | 91 +-------------------------------------------- - 1 file changed, 2 insertions(+), 89 deletions(-) - -diff --git a/src/network/ReactorThread.c b/src/network/ReactorThread.c -index 877fdc4..5994d27 100644 ---- a/src/network/ReactorThread.c -+++ b/src/network/ReactorThread.c -@@ -1263,7 +1263,6 @@ int swReactorThread_dispatch(swConnection *conn, char *data, uint32_t length) - #ifdef SW_USE_RINGBUFFER - swServer *serv = SwooleG.serv; - swReactorThread *thread = swServer_get_thread(serv, SwooleTG.id); -- int target_worker_id = swServer_worker_schedule(serv, conn->fd); - - swPackage package; - package.length = length; -@@ -1271,12 +1270,12 @@ int swReactorThread_dispatch(swConnection *conn, char *data, uint32_t length) - - task.data.info.type = SW_EVENT_PACKAGE; - task.data.info.len = sizeof(package); -- task.target_worker_id = target_worker_id; - -- //swoole_dump_bin(package.data, 's', buffer->length); - memcpy(package.data, data, package.length); - memcpy(task.data.data, &package, sizeof(package)); - -+ task.target_worker_id = swServer_worker_schedule(serv, conn->fd, &task.data); -+ - //dispatch failed, free the memory. - if (factory->dispatch(factory, &task) < 0) - { -@@ -1335,92 +1334,6 @@ int swReactorThread_dispatch(swConnection *conn, char *data, uint32_t length) - return SW_OK; - } - --#if 0 --int swReactorThread_dispatch_array_buffer(swReactorThread *thread, swConnection *conn) --{ -- swDispatchData task; -- swFactory *factory = SwooleG.factory; -- -- task.data.info.fd = conn->fd; -- task.data.info.from_id = conn->from_id; -- -- swBuffer *buffer = conn->in_buffer; -- swBuffer_trunk *trunk = swBuffer_get_trunk(buffer); -- --#ifdef SW_USE_RINGBUFFER -- swServer *serv = SwooleG.serv; -- uint16_t target_worker_id = swServer_worker_schedule(serv, conn->fd); -- swPackage package; -- -- package.length = 0; -- package.data = swReactorThread_alloc(thread, buffer->length); -- -- task.data.info.type = SW_EVENT_PACKAGE; -- -- while (trunk != NULL) -- { -- task.data.info.len = trunk->length; -- memcpy(package.data + package.length, trunk->store.ptr, trunk->length); -- package.length += trunk->length; -- -- swBuffer_pop_trunk(buffer, trunk); -- trunk = swBuffer_get_trunk(buffer); -- } -- task.data.info.len = sizeof(package); -- task.target_worker_id = target_worker_id; -- memcpy(task.data.data, &package, sizeof(package)); -- //swWarn("[ReactorThread] copy_n=%d", package.length); -- //dispatch failed, free the memory. -- if (factory->dispatch(factory, &task) < 0) -- { -- thread->buffer_input->free(thread->buffer_input, package.data); -- } -- else -- { -- return SW_OK; -- } --#else -- int ret; -- task.data.info.type = SW_EVENT_PACKAGE_START; -- task.target_worker_id = -1; -- -- /** -- * lock target -- */ -- SwooleTG.factory_lock_target = 1; -- -- while (trunk != NULL) -- { -- task.data.info.fd = conn->fd; -- task.data.info.len = trunk->length; -- memcpy(task.data.data, trunk->store.ptr, task.data.info.len); -- //package end -- if (trunk->next == NULL) -- { -- task.data.info.type = SW_EVENT_PACKAGE_END; -- } -- ret = factory->dispatch(factory, &task); -- //TODO: 处理数据失败,数据将丢失 -- if (ret < 0) -- { -- swWarn("factory->dispatch() failed."); -- } -- swBuffer_pop_trunk(buffer, trunk); -- trunk = swBuffer_get_trunk(buffer); -- -- swTrace("send2worker[trunk_num=%d][type=%d]", buffer->trunk_num, task.data.info.type); -- } -- /** -- * unlock -- */ -- SwooleTG.factory_target_worker = -1; -- SwooleTG.factory_lock_target = 0; -- --#endif -- return SW_OK; --} --#endif -- - void swReactorThread_free(swServer *serv) - { - int i; @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #80 swoole version 1.9.9 ] { +Extension [ <persistent> extension #80 swoole version 1.9.10 ] { - INI { Entry [ swoole.aio_thread_num <ALL> ] @@ -66,7 +66,7 @@ Extension [ <persistent> extension #80 swoole version 1.9.9 ] { Constant [ integer SWOOLE_DTLSv1_CLIENT_METHOD ] { 17 } Constant [ integer SWOOLE_EVENT_READ ] { 512 } Constant [ integer SWOOLE_EVENT_WRITE ] { 1024 } - Constant [ string SWOOLE_VERSION ] { 1.9.9 } + Constant [ string SWOOLE_VERSION ] { 1.9.10 } Constant [ integer SWOOLE_AIO_BASE ] { 0 } Constant [ integer SWOOLE_AIO_LINUX ] { 1 } Constant [ integer SWOOLE_FILELOCK ] { 2 } diff --git a/php-pecl-swoole.spec b/php-pecl-swoole.spec index 91d383e..df50e9f 100644 --- a/php-pecl-swoole.spec +++ b/php-pecl-swoole.spec @@ -32,15 +32,13 @@ Summary: PHP's asynchronous concurrent distributed networking framework Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 1.9.9 +Version: 1.9.10 Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz -Patch0: 07c762243598947e932502e92674df7fc6d01204.patch - BuildRequires: %{?scl_prefix}php-devel >= 5.3.10 BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-sockets @@ -93,6 +91,10 @@ Obsoletes: php70w-pecl-%{pecl_name} <= %{version} Obsoletes: php71u-pecl-%{pecl_name} <= %{version} Obsoletes: php71w-pecl-%{pecl_name} <= %{version} %endif +%if "%{php_version}" > "7.2" +Obsoletes: php72u-pecl-%{pecl_name} <= %{version} +Obsoletes: php72w-pecl-%{pecl_name} <= %{version} +%endif %endif %if 0%{?fedora} < 20 && 0%{?rhel} < 7 @@ -152,7 +154,6 @@ sed -e 's/role="test"/role="src"/' \ cd NTS -%patch0 -p1 -b .upstream # Sanity check, really often broken extver=$(sed -n '/#define PHP_SWOOLE_VERSION/{s/.* "//;s/".*$//;p}' php_swoole.h) @@ -307,6 +308,9 @@ cd ../ZTS %changelog +* Thu May 4 2017 Remi Collet <remi@remirepo.net> - 1.9.10-1 +- Update to 1.9.10 + * Fri Apr 21 2017 Remi Collet <remi@remirepo.net> - 1.9.9-1 - Update to 1.9.9 - add upstream patch for broken build, see |