rpms/dbus/FC-5 dbus-0.61.dbus-connection.c.backport.patch, NONE, 1.1 dbus.spec, 1.74, 1.75
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Apr 28 21:07:14 UTC 2006
- Previous message (by thread): rpms/kernel/devel kernel-2.6.spec,1.2177,1.2178
- Next message (by thread): rpms/libgtk-java/devel .cvsignore, 1.17, 1.18 libgtk-java.spec, 1.46, 1.47 sources, 1.17, 1.18 GdkCairoFix.patch, 1.1, NONE libgtk-java-glib-timer-gc.patch, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: johnp
Update of /cvs/dist/rpms/dbus/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv444
Modified Files:
dbus.spec
Added Files:
dbus-0.61.dbus-connection.c.backport.patch
Log Message:
- Backport patch from dbus-connection.c
- Allows interfaces to be NULL in the message header as per the spec
- Fixes a problem with pendings calls blocking on a data starved socket
dbus-0.61.dbus-connection.c.backport.patch:
dbus-connection.c | 67 +++++++++++++++++++++++++++++++++---------------------
1 files changed, 42 insertions(+), 25 deletions(-)
--- NEW FILE dbus-0.61.dbus-connection.c.backport.patch ---
--- dbus-0.61/dbus/dbus-connection.c.backport 2006-04-25 14:26:31.000000000 -0400
+++ dbus-0.61/dbus/dbus-connection.c 2006-04-25 14:26:54.000000000 -0400
@@ -2257,8 +2257,7 @@
_dbus_return_if_fail (message != NULL);
_dbus_return_if_fail (preallocated->connection == connection);
_dbus_return_if_fail (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_METHOD_CALL ||
- (dbus_message_get_interface (message) != NULL &&
- dbus_message_get_member (message) != NULL));
+ dbus_message_get_member (message) != NULL);
_dbus_return_if_fail (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_SIGNAL ||
(dbus_message_get_interface (message) != NULL &&
dbus_message_get_member (message) != NULL));
@@ -2533,6 +2532,36 @@
return NULL;
}
+static dbus_bool_t
+check_for_reply_and_update_dispatch_unlocked (DBusPendingCall *pending)
+{
+ DBusMessage *reply;
+ DBusDispatchStatus status;
+ DBusConnection *connection;
+
+ connection = pending->connection;
+
+ reply = check_for_reply_unlocked (connection, pending->reply_serial);
+ if (reply != NULL)
+ {
+ _dbus_verbose ("%s checked for reply\n", _DBUS_FUNCTION_NAME);
+
+ _dbus_verbose ("dbus_connection_send_with_reply_and_block(): got reply\n");
+
+ _dbus_pending_call_complete_and_unlock (pending, reply);
+ dbus_message_unref (reply);
+
+ CONNECTION_LOCK (connection);
+ status = _dbus_connection_get_dispatch_status_unlocked (connection);
+ _dbus_connection_update_dispatch_status_and_unlock (connection, status);
+ dbus_pending_call_unref (pending);
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
/**
* When a function that blocks has been called with a timeout, and we
* run out of memory, the time to wait for memory is based on the
@@ -2616,6 +2645,11 @@
start_tv_sec, start_tv_usec,
end_tv_sec, end_tv_usec);
+ /* check to see if we already got the data off the socket */
+ /* from another blocked pending call */
+ if (check_for_reply_and_update_dispatch_unlocked (pending))
+ return;
+
/* Now we wait... */
/* always block at least once as we know we don't have the reply yet */
_dbus_connection_do_iteration_unlocked (connection,
@@ -2645,27 +2679,8 @@
}
if (status == DBUS_DISPATCH_DATA_REMAINS)
- {
- DBusMessage *reply;
-
- reply = check_for_reply_unlocked (connection, client_serial);
- if (reply != NULL)
- {
- _dbus_verbose ("%s checked for reply\n", _DBUS_FUNCTION_NAME);
-
- _dbus_verbose ("dbus_connection_send_with_reply_and_block(): got reply\n");
-
- _dbus_pending_call_complete_and_unlock (pending, reply);
- dbus_message_unref (reply);
-
- CONNECTION_LOCK (connection);
- status = _dbus_connection_get_dispatch_status_unlocked (connection);
- _dbus_connection_update_dispatch_status_and_unlock (connection, status);
- dbus_pending_call_unref (pending);
-
- return;
- }
- }
+ if (check_for_reply_and_update_dispatch_unlocked (pending))
+ return;
_dbus_get_current_time (&tv_sec, &tv_usec);
@@ -2874,8 +2889,6 @@
DBusDispatchStatus dstatus;
dbus_bool_t dispatched_disconnected;
- _dbus_return_val_if_fail (connection != NULL, FALSE);
- _dbus_return_val_if_fail (timeout_milliseconds >= 0 || timeout_milliseconds == -1, FALSE);
dstatus = dbus_connection_get_dispatch_status (connection);
if (dispatch && dstatus == DBUS_DISPATCH_DATA_REMAINS)
@@ -2947,6 +2960,8 @@
dbus_connection_read_write_dispatch (DBusConnection *connection,
int timeout_milliseconds)
{
+ _dbus_return_val_if_fail (connection != NULL, FALSE);
+ _dbus_return_val_if_fail (timeout_milliseconds >= 0 || timeout_milliseconds == -1, FALSE);
return _dbus_connection_read_write_dispatch(connection, timeout_milliseconds, TRUE);
}
@@ -2970,6 +2985,8 @@
dbus_connection_read_write (DBusConnection *connection,
int timeout_milliseconds)
{
+ _dbus_return_val_if_fail (connection != NULL, FALSE);
+ _dbus_return_val_if_fail (timeout_milliseconds >= 0 || timeout_milliseconds == -1, FALSE);
return _dbus_connection_read_write_dispatch(connection, timeout_milliseconds, FALSE);
}
Index: dbus.spec
===================================================================
RCS file: /cvs/dist/rpms/dbus/FC-5/dbus.spec,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- dbus.spec 24 Feb 2006 23:10:54 -0000 1.74
+++ dbus.spec 28 Apr 2006 21:07:08 -0000 1.75
@@ -19,7 +19,7 @@
Summary: D-BUS message bus
Name: dbus
Version: 0.61
-Release: 3
+Release: 3.fc5.1
URL: http://www.freedesktop.org/software/dbus/
Source0: %{name}-%{version}.tar.gz
License: AFL/GPL
@@ -53,6 +53,8 @@
#make sure we take this out if ABI changes
Patch4: dbus-0.61-mono-no-abi-version-change.patch
+Patch5: dbus-0.61.dbus-connection.c.backport.patch
+
%description
D-BUS is a system for sending messages between applications. It is
@@ -142,6 +144,7 @@
#make sure we take this out if ABI changes
%patch4 -p1 -b .mono-no-abi-version-change
+%patch5 -p1 -b .backport
autoreconf -f -i
%build
@@ -342,7 +345,12 @@
%endif
%changelog
-* Fri Feb 24 2006 John (J5) Palmieri <johnp at redhat.com> 0.61-2
+* Fri Apr 28 2006 John (J5) Palmieri <johnp at redhat.com> - 0.61-3.fc5.1
+- Backport patch from dbus-connection.c
+ - Allows interfaces to be NULL in the message header as per the spec
+ - Fixes a problem with pendings calls blocking on a data starved socket
+
+* Fri Feb 24 2006 John (J5) Palmieri <johnp at redhat.com> 0.61-3
- ABI hasn't changed so add patch that makes dbus-sharp think
it is still 0.60 (mono uses hard version names so any change
means apps need to recompile)
- Previous message (by thread): rpms/kernel/devel kernel-2.6.spec,1.2177,1.2178
- Next message (by thread): rpms/libgtk-java/devel .cvsignore, 1.17, 1.18 libgtk-java.spec, 1.46, 1.47 sources, 1.17, 1.18 GdkCairoFix.patch, 1.1, NONE libgtk-java-glib-timer-gc.patch, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list