[packagekit] packagekit: Branch 'master' - 4 commits

Grzegorz Dąbrowski gdx at o2.pl
Wed Sep 5 14:16:09 PDT 2007


On Tue, 2007-09-04 at 11:41 -0700, Richard Hughes wrote:
> helpers/BACKENDS                |    2 
>  helpers/conary/conaryBackend.py |   46 +++--
>  src/pk-engine.c                 |  341 ++++++++++++++++++++++++++++------------
>  src/pk-task-common.c            |   25 --
>  src/pk-task-common.h            |    3 
>  src/pk-task-conary.c            |   23 +-
>  src/pk-task.h                   |    1 
>  7 files changed, 290 insertions(+), 151 deletions(-)
...

> @@ -1177,19 +1315,19 @@ gboolean
>  pk_engine_get_job_role (PkEngine *engine, guint job,
>  			const gchar **role, const gchar **package_id, GError **error)
>  {
> -	PkTask *task;
> +	PkEngineMap *map;
>  	PkTaskRole role_enum;
>  
>  	g_return_val_if_fail (engine != NULL, FALSE);
>  	g_return_val_if_fail (PK_IS_ENGINE (engine), FALSE);
>  
> -	task = pk_get_task_from_job (engine, job);
> -	if (task == NULL) {
> +	map = pk_get_map_from_job (engine, job);
> +	if (map == NULL) {
>  		g_set_error (error, PK_ENGINE_ERROR, PK_ENGINE_ERROR_NO_SUCH_JOB,
> -			     "No job:%i", job);
> +			     "No job:%i", map->job);
>  		return FALSE;
>  	}

Segmentation fault? If map is NULL, map->job shouldn't be used. Similar
code is in other places too.

-- 
Grzegorz Dabrowski
Pingwinek GNU/Linux http://home.gna.org/pingwinek/




More information about the PackageKit mailing list