[packagekit] pk-backend-status crash
Scott Reeves
sreeves at novell.com
Wed Nov 21 16:01:31 PST 2007
Updated the patch. This patches pk-backend-status.c in the gnome-packagekit repo which I don't think I have commit access to - the access email from you just listed how to get access to the PackageKit repo.
btw - this patch fixes a crash if the dbus setup fails and errors out - before it even gets to talk with the backend.
>>> On Sat, Nov 17, 2007 at 3:55 AM, in message
<1195296933.2648.26.camel at hughsie-laptop>, Richard Hughes <hughsient at gmail.com>
wrote:
> On Fri, 2007-11-16 at 17:30 -0700, Scott Reeves wrote:
>> pk-backend-status segfaults if the dbus GetBackendDetail call returns errors.
>
> GetBackendDetail should be provided by every backend... it's pretty
> trivial.
>
>> The attached patch fixes the error.
>
> Well, comments about that (I'm a fussy git):
>
> /* general stuff */
> - pk_client_get_backend_detail (client, &name, &author);
> + if(!pk_client_get_backend_detail (client, &name, &author))
> + {
> + pk_warning (_("Exiting on failure\n"));
> + return 1;
> + }
>
> I would write this:
>
> ret = pk_client_get_backend_detail (client, &name, &author);
> if (ret == FALSE) {
> pk_warning ("backend does not provide details");
> return 1;
> }
>
> Notice the tabs and ret? The ret is compiled away by the compiler and is
> a lot easier to code review. Can you correct your patch and commit
> please. Thanks.
>
> Richard.
>
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: backend_crash.patch
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20071121/6f634fac/attachment-0004.txt>
More information about the PackageKit
mailing list