Order of subject parameters is wrong in 0.3 series

Bug #718472 reported by Michal Hruby on 2011-02-14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mikkel Kamstrup Erlandsen
libzeitgeist (Ubuntu)

Bug Description

The order of subject parameters in 0.3 series is incorrect - notice that origin field is on index 3 in the python model, yet on index 4 in libzeitgeist:


    Fields = (Uri,
        Storage) = range(7)

src/zeitgeist-event.c: zeitgeist_event_to_variant():

      g_variant_builder_open (&b, G_VARIANT_TYPE ("as"));
      g_variant_builder_add (&b, "s", (bif = zeitgeist_subject_get_uri(su), bif ? bif : ""));
      g_variant_builder_add (&b, "s", (bif = zeitgeist_subject_get_interpretation(su), bif ? bif : ""));
      g_variant_builder_add (&b, "s", (bif = zeitgeist_subject_get_manifestation(su), bif ? bif : ""));
      g_variant_builder_add (&b, "s", (bif = zeitgeist_subject_get_mimetype(su), bif ? bif : ""));
      g_variant_builder_add (&b, "s", (bif = zeitgeist_subject_get_origin(su), bif ? bif : ""));
      g_variant_builder_add (&b, "s", (bif = zeitgeist_subject_get_text(su), bif ? bif : ""));
      g_variant_builder_add (&b, "s", (bif = zeitgeist_subject_get_storage(su), bif ? bif : ""));
      g_variant_builder_close (&b);

The same applies to from_variant method (otherwise the tests would be failing).

Thanks Michal! Well spotted! Fixed in revno 193, which will be included in 0.3.4 which I intend to roll later today.

Changed in libzeitgeist:
assignee: nobody → Mikkel Kamstrup Erlandsen (kamstrup)
importance: Undecided → Critical
status: New → Fix Committed
Changed in libzeitgeist:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libzeitgeist - 0.3.4-0ubuntu1

libzeitgeist (0.3.4-0ubuntu1) natty; urgency=low

  * New upstream release:
    - Remove libzeitgeist GIO module - zeitgeist-datahub does the same now
      (LP: #724199)
    - Order of subject parameters is wrong in 0.3 series (LP: #718472)
  * debian/control, debian/libzeitgeist-gio.install:
    - remove libzeitgeist-gio package
  * debian/libzeitgeist-1.0-1.symbols:
    - updated
 -- Didier Roche <email address hidden> Thu, 24 Feb 2011 10:48:37 +0100

Changed in libzeitgeist (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers