From 406fd28070ad09f6e6976ddf6b4f2721e803b55b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 19 2015 15:37:21 +0000 Subject: import rest-0.7.92-3.el7 --- diff --git a/SOURCES/0001-oauth-Add-missing-include.patch b/SOURCES/0001-oauth-Add-missing-include.patch new file mode 100644 index 0000000..cf41fed --- /dev/null +++ b/SOURCES/0001-oauth-Add-missing-include.patch @@ -0,0 +1,25 @@ +From b50ace7738ea03817acdad87fb2b338a86018329 Mon Sep 17 00:00:00 2001 +From: Christophe Fergeau +Date: Wed, 3 Sep 2014 11:31:49 +0200 +Subject: [PATCH] oauth: Add missing include + +This fixes a compilation warning about a missing prototype. +--- + rest/oauth-proxy-call.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/rest/oauth-proxy-call.c b/rest/oauth-proxy-call.c +index dce2c66..ab77b1a 100644 +--- a/rest/oauth-proxy-call.c ++++ b/rest/oauth-proxy-call.c +@@ -25,6 +25,7 @@ + #include + #include "oauth-proxy-call.h" + #include "oauth-proxy-private.h" ++#include "rest-proxy-call-private.h" + #include "sha1.h" + + G_DEFINE_TYPE (OAuthProxyCall, oauth_proxy_call, REST_TYPE_PROXY_CALL) +-- +2.1.0 + diff --git a/SOURCES/0001-tests-proxy-continuous-Server-chunks-can-be-differen.patch b/SOURCES/0001-tests-proxy-continuous-Server-chunks-can-be-differen.patch new file mode 100644 index 0000000..a05d55f --- /dev/null +++ b/SOURCES/0001-tests-proxy-continuous-Server-chunks-can-be-differen.patch @@ -0,0 +1,128 @@ +From 5af733210438aef493008b92ef5857a27e952596 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +Date: Wed, 16 Sep 2015 18:40:59 +0200 +Subject: [PATCH] tests/proxy-continuous: Server chunks can be different from + client ones + +https://bugzilla.gnome.org/show_bug.cgi?id=755124 +--- + tests/proxy-continuous.c | 52 ++++++++++++++++++++++-------------------------- + 1 file changed, 24 insertions(+), 28 deletions(-) + +diff --git a/tests/proxy-continuous.c b/tests/proxy-continuous.c +index 9395cd28cc8f..5be64fa696b5 100644 +--- a/tests/proxy-continuous.c ++++ b/tests/proxy-continuous.c +@@ -32,26 +32,31 @@ static int errors = 0; + static GMainLoop *loop = NULL; + + #define NUM_CHUNKS 20 +-static int server_count = 0; +-static gint client_count = 0; ++#define SIZE_CHUNK 4 ++static guint8 server_count = 0; ++static guint8 client_count = 0; + static SoupServer *server; + + static gboolean + send_chunks (gpointer user_data) + { + SoupMessage *msg = SOUP_MESSAGE (user_data); +- char *s; + SoupBuffer *buf; ++ guint i; ++ guint8 data[SIZE_CHUNK]; + +- s = g_strdup_printf ("%d %d %d %d\n", +- server_count, server_count, +- server_count, server_count); +- buf = soup_buffer_new (SOUP_MEMORY_TAKE, s, strlen (s)); ++ for (i = 0; i < SIZE_CHUNK; i++) ++ { ++ data[i] = server_count; ++ server_count++; ++ } ++ ++ buf = soup_buffer_new (SOUP_MEMORY_COPY, data, SIZE_CHUNK); + + soup_message_body_append_buffer (msg->response_body, buf); + soup_server_unpause_message (server, msg); + +- if (++server_count == NUM_CHUNKS) ++ if (server_count == NUM_CHUNKS * SIZE_CHUNK) + { + soup_message_body_complete (msg->response_body); + return FALSE; +@@ -71,7 +76,6 @@ server_callback (SoupServer *server, SoupMessage *msg, + SOUP_ENCODING_CHUNKED); + soup_server_pause_message (server, msg); + +- server_count = 1; + g_idle_add (send_chunks, msg); + } + } +@@ -84,7 +88,7 @@ _call_continuous_cb (RestProxyCall *call, + GObject *weak_object, + gpointer userdata) + { +- gint a = 0, b = 0, c = 0, d = 0; ++ guint i; + + if (error) + { +@@ -102,7 +106,7 @@ _call_continuous_cb (RestProxyCall *call, + + if (buf == NULL && len == 0) + { +- if (client_count != NUM_CHUNKS) ++ if (client_count < NUM_CHUNKS * SIZE_CHUNK) + { + g_printerr ("stream ended prematurely\n"); + errors++; +@@ -110,25 +114,19 @@ _call_continuous_cb (RestProxyCall *call, + goto out; + } + +- if (sscanf (buf, "%d %d %d %d\n", &a, &b, &c, &d) != 4) ++ for (i = 0; i < len; i++) + { +- g_printerr ("stream data not formatted as expected\n"); +- errors++; +- goto out; +- } ++ if (buf[i] != client_count) ++ { ++ g_printerr ("stream data not as expected (got %d, expected %d)\n", ++ (gint) buf[i], client_count); ++ errors++; ++ goto out; ++ } + +- if (a != client_count || +- b != client_count || +- c != client_count || +- d != client_count) +- { +- g_printerr ("stream data not as expected (got %d %d %d %d, expected %d)\n", +- a, b, c, d, client_count); +- errors++; +- goto out; ++ client_count++; + } + +- client_count++; + return; + out: + g_main_loop_quit (loop); +@@ -141,8 +139,6 @@ stream_test (RestProxy *proxy) + RestProxyCall *call; + GError *error; + +- client_count = 1; +- + call = rest_proxy_new_call (proxy); + rest_proxy_call_set_function (call, "stream"); + +-- +2.1.0 + diff --git a/SPECS/rest.spec b/SPECS/rest.spec index 4c74699..84709be 100644 --- a/SPECS/rest.spec +++ b/SPECS/rest.spec @@ -1,6 +1,6 @@ Name: rest Version: 0.7.92 -Release: 1%{?dist} +Release: 3%{?dist} Summary: A library for access to RESTful web services Group: System Environment/Libraries @@ -8,6 +8,8 @@ License: LGPLv2 URL: http://www.gnome.org Source0: http://download.gnome.org/sources/%{name}/0.7/%{name}-%{version}.tar.xz Patch0: rest-fixdso.patch +Patch1: 0001-oauth-Add-missing-include.patch +Patch2: 0001-tests-proxy-continuous-Server-chunks-can-be-differen.patch BuildRequires: glib2-devel BuildRequires: gobject-introspection-devel @@ -39,6 +41,8 @@ Files for development with %{name}. %prep %setup -q %patch0 -p1 -b .fixdso +%patch1 -p1 -b .missinginclude +%patch2 -p1 -b .proxycontinuous %build autoreconf -vif @@ -77,6 +81,14 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %{_datadir}/gir-1.0/RestExtras-0.7.gir %changelog +* Thu Sep 17 2015 Debarshi Ray - 0.7.92-3 +- Fix tests/proxy-continuous +Resolves: #1250935 + +* Mon Apr 27 2015 Debarshi Ray - 0.7.92-2 +- Fix memory error due to implicit declaration of rest_proxy_call_get_url +Resolves: #1183982 + * Mon Sep 8 2014 Debarshi Ray - 0.7.92-1 - Update to 0.7.92 Resolves: #1136793