rpms/loudmouth/FC-5 loudmouth-1.0.3-reentrancy.patch, NONE, 1.1 loudmouth.spec, 1.12, 1.13
Brian Pepple (bpepple)
fedora-extras-commits at redhat.com
Fri May 26 14:49:48 UTC 2006
Author: bpepple
Update of /cvs/extras/rpms/loudmouth/FC-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15667
Modified Files:
loudmouth.spec
Added Files:
loudmouth-1.0.3-reentrancy.patch
Log Message:
* Fri May 26 2006 Brian Pepple <bdpepple at ameritech.net> - 1.0.3-3
- Add patch to fix some reentrancy crashes. (Thanks, Havoc)
loudmouth-1.0.3-reentrancy.patch:
--- NEW FILE loudmouth-1.0.3-reentrancy.patch ---
--- loudmouth-1.0.3/loudmouth/lm-connection.c.reentrancy 2006-04-03 12:14:31.000000000 -0400
+++ loudmouth-1.0.3/loudmouth/lm-connection.c 2006-05-21 23:14:22.000000000 -0400
@@ -82,9 +82,9 @@
LmCallback *open_cb;
gboolean cancel_open;
- LmCallback *close_cb;
+ LmCallback *close_cb; /* unused */
LmCallback *auth_cb;
- LmCallback *register_cb;
+ LmCallback *register_cb; /* unused */
LmCallback *disconnect_cb;
@@ -224,6 +224,13 @@
connection_do_close (connection);
}
+ if (connection->open_cb)
+ _lm_utils_free_callback (connection->open_cb);
+ if (connection->auth_cb)
+ _lm_utils_free_callback (connection->auth_cb);
+
+ lm_connection_set_disconnect_function (connection, NULL, NULL, NULL);
+
while ((m = g_queue_pop_head (connection->incoming_messages)) != NULL) {
lm_message_unref (m);
}
@@ -253,9 +260,11 @@
const gchar *id;
LmHandlerResult result = LM_HANDLER_RESULT_ALLOW_MORE_HANDLERS;
+ lm_connection_ref (connection);
+
if (lm_message_get_type (m) == LM_MESSAGE_TYPE_STREAM) {
connection_stream_received (connection, m);
- return;
+ goto out;
}
id = lm_message_node_get_attribute (m->node, "id");
@@ -271,7 +280,7 @@
}
if (result == LM_HANDLER_RESULT_REMOVE_MESSAGE) {
- return;
+ goto out;
}
for (l = connection->handlers[lm_message_get_type (m)];
@@ -283,6 +292,9 @@
connection,
m);
}
+
+out:
+ lm_connection_unref (connection);
return;
}
@@ -447,11 +459,13 @@
if (connect_data->current_addr == NULL) {
connection_do_close (connection);
- if (connection->open_cb && connection->open_cb->func) {
+ if (connection->open_cb) {
LmCallback *cb = connection->open_cb;
+ connection->open_cb = NULL;
(* ((LmResultFunction) cb->func)) (connection, FALSE,
cb->user_data);
+ _lm_utils_free_callback (cb);
}
freeaddrinfo (connect_data->resolved_addrs);
@@ -467,7 +481,7 @@
{
_lm_connection_failed_with_error (connect_data,errno);
}
-
+
static gboolean
connection_connect_cb (GIOChannel *source,
GIOCondition condition,
@@ -1169,16 +1183,17 @@
lm_verbose ("AUTH reply: %d\n", result);
- if (connection->auth_cb && connection->auth_cb->func) {
- LmCallback *cb = connection->auth_cb;
+ if (connection->auth_cb) {
+ LmCallback *cb = connection->auth_cb;
+ connection->auth_cb = NULL;
+
+ if (cb->func)
+ (* ((LmResultFunction) cb->func)) (connection,
+ result, cb->user_data);
- (* ((LmResultFunction) cb->func)) (connection,
- result, cb->user_data);
+ _lm_utils_free_callback (cb);
}
- _lm_utils_free_callback (connection->auth_cb);
- connection->auth_cb = NULL;
-
return LM_HANDLER_RESULT_REMOVE_MESSAGE;
}
@@ -1203,15 +1218,16 @@
connection_start_keep_alive (connection);
- if (connection->open_cb && connection->open_cb->func) {
+ if (connection->open_cb) {
LmCallback *cb = connection->open_cb;
+ connection->open_cb = NULL;
- (* ((LmResultFunction) cb->func)) (connection, result,
- cb->user_data);
+ if (cb->func)
+ (* ((LmResultFunction) cb->func)) (connection, result,
+ cb->user_data);
+
+ _lm_utils_free_callback (connection->open_cb);
}
-
- _lm_utils_free_callback (connection->open_cb);
- connection->open_cb = NULL;
}
static gint
@@ -2129,9 +2145,12 @@
_lm_utils_free_callback (connection->disconnect_cb);
}
- connection->disconnect_cb = _lm_utils_new_callback (function,
- user_data,
- notify);
+ if (function)
+ connection->disconnect_cb = _lm_utils_new_callback (function,
+ user_data,
+ notify);
+ else
+ connection->disconnect_cb = NULL;
}
/**
Index: loudmouth.spec
===================================================================
RCS file: /cvs/extras/rpms/loudmouth/FC-5/loudmouth.spec,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- loudmouth.spec 5 Apr 2006 17:08:13 -0000 1.12
+++ loudmouth.spec 26 May 2006 14:49:48 -0000 1.13
@@ -2,13 +2,14 @@
Name: loudmouth
Version: 1.0.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Loudmouth is a Jabber programming library written in C
Group: System Environment/Libraries
License: LGPL
URL: http://www.imendio.com/projects/loudmouth
Source0: http://ftp.gnome.org/pub/GNOME/sources/%{name}/%{version}/%{name}-%{version}.tar.bz2
+Patch0: %{name}-%{version}-reentrancy.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: glib2-devel >= 2.4.0
@@ -20,11 +21,13 @@
BuildRequires: libtasn1 >= 0.2.6
%endif
+
%description
Loudmouth is a lightweight and easy-to-use C library for programming
with the Jabber protocol. It's designed to be easy to get started with
and yet extensible to let you do anything the Jabber protocol allows.
+
%package devel
Summary: Development files for Loudmouth
Group: Development/Libraries
@@ -34,13 +37,16 @@
BuildRequires: gnutls-devel >= 1.0.0
%endif
+
%description devel
Loudmouth is a lightweight and easy-to-use C library for programming
with the Jabber protocol. It's designed to be easy to get started with
and yet extensible to let you do anything the Jabber protocol allows.
+
%prep
%setup -q
+%patch0 -p1 -b .reentrancy
%build
@@ -78,15 +84,19 @@
%doc ChangeLog NEWS README COPYING
%{_libdir}/libloudmouth*.so.*
+
%files devel
%defattr(-,root,root,-)
%{_libdir}/libloudmouth*.so
-%{_libdir}/pkgconfig/*
+%{_libdir}/pkgconfig/%{name}-1.0.pc
%{_includedir}/%{name}-1.0
%{_datadir}/gtk-doc/html/%{name}
%changelog
+* Fri May 26 2006 Brian Pepple <bdpepple at ameritech.net> - 1.0.3-3
+- Add patch to fix some reentrancy crashes. (Thanks, Havoc)
+
* Wed Apr 5 2006 Brian Pepple <bdpepple at ameritech.net> - 1.0.3-2
- Update to 1.0.3.
- Add BR for gnutls-devel to devel package.
More information about the fedora-extras-commits
mailing list