rpms/logjam/devel logjam-libsoup24.diff, NONE, 1.1 logjam.spec, 1.33, 1.34
Tom Callaway (spot)
fedora-extras-commits at redhat.com
Wed Jan 30 21:58:09 UTC 2008
Author: spot
Update of /cvs/extras/rpms/logjam/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27964
Modified Files:
logjam.spec
Added Files:
logjam-libsoup24.diff
Log Message:
Resolve 430966, fix logjam to use libsoup24 properly.
logjam-libsoup24.diff:
--- NEW FILE logjam-libsoup24.diff ---
diff -rN -u old-logjam/configure.in new-logjam/configure.in
--- old-logjam/configure.in 2008-01-30 15:11:38.000000000 -0500
+++ new-logjam/configure.in 2008-01-30 15:11:38.000000000 -0500
@@ -63,7 +63,7 @@
LJ_PKG_ARG_WITH(libsoup, [LIBSOUP],
AC_HELP_STRING([--with-libsoup],
[use libsoup network backend]),
- libsoup-2.2)
+ libsoup-2.4)
AC_MSG_CHECKING(whether to use gtk)
if test "$with_gtk" = "yes" ; then
diff -rN -u old-logjam/src/network-soup.c new-logjam/src/network-soup.c
--- old-logjam/src/network-soup.c 2008-01-30 15:11:38.000000000 -0500
+++ new-logjam/src/network-soup.c 2008-01-30 15:11:38.000000000 -0500
@@ -22,18 +22,16 @@
} CallbackInfo;
static void
-got_chunk_cb(SoupMessage *msg, CallbackInfo *info) {
+got_chunk_cb(SoupMessage *msg, SoupBuffer *chunk, CallbackInfo *info) {
NetStatusProgress progress = {0};
const char* clen;
if (info->total == 0) {
- clen = soup_message_get_header(msg->response_headers,
- "Content-length");
- if (!clen)
+ info->total = soup_message_headers_get_content_length(msg->response_headers);
+ if (info->total == 0)
return;
- info->total = atoi(clen);
}
- info->current += msg->response.length;
+ info->current += chunk->length;
progress.current = info->current;
progress.total = info->total;
@@ -44,31 +42,27 @@
net_post_blocking(const char *url, GSList *headers, GString *post,
NetStatusCallback cb, gpointer data,
GError **err) {
- SoupUri* suri = NULL;
+ SoupURI* suri = NULL;
SoupMessage *req = NULL;
- SoupSocket *sock = NULL;
+ SoupSession *session = NULL;
guint status = 0;
GString *response = NULL;
CallbackInfo info = { cb, data, 0, 0 };
- suri = soup_uri_new(conf.options.useproxy ? conf.proxy : url);
- sock = soup_socket_client_new_sync(suri->host, suri->port, NULL, &status);
- if (status != SOUP_STATUS_OK) {
- g_set_error(err, NET_ERROR, NET_ERROR_GENERIC,
- soup_status_get_phrase(status));
- goto out;
- }
- g_free(suri);
- suri = NULL;
+ if (conf.options.useproxy) {
+ suri = soup_uri_new(conf.proxy);
+ if (conf.options.useproxyauth) {
+ soup_uri_set_user(suri, conf.proxyuser);
+ soup_uri_set_password(suri, conf.proxypass);
+ }
+ session = soup_session_sync_new_with_options (
+ SOUP_SESSION_PROXY_URI, suri,
+ NULL);
+ soup_uri_free(suri);
+ } else
+ session = soup_session_sync_new ();
- suri = soup_uri_new(url);
- if (conf.options.useproxy && conf.options.useproxyauth) {
- g_free(suri->user);
- g_free(suri->passwd);
- suri->user = g_strdup(conf.proxyuser);
- suri->passwd = g_strdup(conf.proxypass);
- }
- req = soup_message_new_from_uri(post ? "POST" : "GET", suri);
+ req = soup_message_new(post ? "POST" : "GET", url);
g_signal_connect(G_OBJECT(req), "got-chunk",
G_CALLBACK(got_chunk_cb), &info);
for (; headers; headers = headers->next) {
@@ -77,31 +71,27 @@
* a bit. */
char *colonpos = strchr(header, ':');
*colonpos = 0;
- soup_message_add_header(req->request_headers, header, colonpos+1);
+ soup_message_headers_append(req->request_headers, header, colonpos+1);
*colonpos = ':';
}
soup_message_set_request(req, "application/x-www-form-urlencoded",
- SOUP_BUFFER_USER_OWNED, post->str, post->len);
+ SOUP_MEMORY_TEMPORARY, post->str, post->len);
- soup_message_send_request(req, sock, conf.options.useproxy);
+ status = soup_session_send_message(session, req);
if (status != SOUP_STATUS_OK) {
g_set_error(err, NET_ERROR, NET_ERROR_GENERIC,
- soup_status_get_phrase(status));
+ req->reason_phrase);
goto out;
}
- response = g_string_new_len(req->response.body, req->response.length);
+ response = g_string_new_len(req->response_body->data, req->response_body->length);
if (conf.options.netdump)
fprintf(stderr, _("Response: [%s]\n"), response->str);
out:
- if (suri) soup_uri_free(suri);
- if (sock) {
- soup_socket_disconnect(sock);
- g_object_unref(G_OBJECT(sock));
- }
if (req) g_object_unref(G_OBJECT(req));
+ if (session) g_object_unref(G_OBJECT(session));
return response;
}
Index: logjam.spec
===================================================================
RCS file: /cvs/extras/rpms/logjam/devel/logjam.spec,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- logjam.spec 29 Jan 2008 14:29:49 -0000 1.33
+++ logjam.spec 30 Jan 2008 21:57:33 -0000 1.34
@@ -2,7 +2,7 @@
Name: logjam
Version: 4.5.3
-Release: 10%{?dist}
+Release: 11%{?dist}
Epoch: 1
Summary: GTK2 client for LiveJournal
License: GPLv2+
@@ -16,7 +16,7 @@
BuildRequires: curl-devel, gtk2-devel, gtkspell-devel, gtkhtml3-devel
BuildRequires: gettext, desktop-file-utils, aspell-devel, librsvg2-devel
BuildRequires: libsoup-devel, sqlite-devel, gnutls-devel, libgcrypt-devel
-BuildRequires: autoconf, intltool
+BuildRequires: autoconf, intltool, popt-devel
Obsoletes: loserjabber, logjam-gnome
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch2: logjam-4.4.1-backdated.patch
@@ -28,6 +28,7 @@
Patch8: logjam-4.5.3-gtkspell.patch
Patch9: http://people.freebsd.org/~novel/patches/non-freebsd/logjam_docklet_context_menu.diff
Patch10: logjam-4.5.3-rhythmbox-fix.patch
+Patch11: logjam-libsoup24.diff
%description
This is the new GTK2 client for LiveJournal (http://www.livejournal.com).
@@ -55,6 +56,7 @@
#patch8 -p1 -b .bz186906
%patch9 -p1 -b .docklet-context-menu
%patch10 -p1 -b .rhythmboxfix
+%patch11 -p1 -b .libsoup
%build
autoconf
@@ -94,6 +96,9 @@
rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed Jan 30 2008 Tom "spot" Callaway <tcallawa at redhat.com> 1:4.5.3-11
+- apply patch for new libsoup from bz 430966
+
* Tue Jan 29 2008 Tom "spot" Callaway <tcallawa at redhat.com> 1:4.5.3-10
- rebuild for new libsoup
More information about the fedora-extras-commits
mailing list