|
|
Sponsor |
Updated patch: msg#00063freedesktop.dbus
On Mon 2005-12-05 at 13:56:07 PST, Havoc Pennington wrote: > On Mon, 2005-12-05 at 13:33 +0000, Matthew Johnson wrote: >> >> 8853: assertion failed "(*(const char*)_DBUS_FUNCTION_NAME) != '_'" file "dbus-connection.c" line 2877 function _dbus_connection_read_write_dispatch >> >> Which appears to enforce that _dbus_return_val_if_fail can only be >> called from functions that don't start with an underscore. I have no >> idea why this is, but have accordingly moved the calls to that into the >> wrapper functions. > > The underscore functions are internal/private, and return_if_fail should > only be used to check correctness of arguments to public API. For > private API, just use dbus_assert() (and be sure public API that calls > the private API has return_if_fail so we don't hit the assert when > checks are enabled) I found the above in the list archive. If I understand it correctly, then the asserts are incorrect in dbus_connection_read_write, dbus_connection_read_write_dispatch, and _dbus_connection_read_write_dispatch. I've attached a patch that I believe corrects the problem. I think this is what Matthew Johnson said he did to get these functions working. This patch works on my FC5 system but should be tested more thoroughly. On a related note, the FC5 spec file is producing code with the asserts enabled although the spec file appears to be only enabling the asserts for a 'make check' run. I mention this in case anyone here has influence over the FC5 spec file (and can figure out why it's enabling asserts). Tim Moloney --- dbus-0.61/dbus/dbus-connection.c.~1.116~ 2006-04-17 15:17:04.000000000 -0400 +++ dbus-0.61/dbus/dbus-connection.c 2006-04-17 15:19:20.000000000 -0400 @@ -2874,8 +2874,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 +2945,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 +2970,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); } _______________________________________________ dbus mailing list dbus-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@xxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dbus
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Matching signals in Python, Robert McQueen |
|---|---|
| Next by Date: | Re: Updated patch, John (J5) Palmieri |
| Previous by Thread: | Re: [Patch] Fill out content in 'INSTALL' file, Daniel P. Berrange |
| Next by Thread: | Re: Updated patch, John (J5) Palmieri |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|