1. 06 Oct, 2021 1 commit
    • Victor Toso's avatar
      operation-options: bypass checks for NULL GValues · 3f971c40
      Victor Toso authored
      grl_registry_metadata_key_clamp() is a helper to check if a given
      @value is between @min and @Max. Only @min and @Max should be well
      defined values to be compared with. We can simply bypass when @value
      is NULL (which means, @value is not changed).
      This comes with a unit test that shows issue #148 but also highlights
      some other bugs around the code. Those will be discussed in its own
      issue trackers.
      Resolves: #148
  2. 05 Oct, 2021 1 commit
  3. 04 Oct, 2021 6 commits
  4. 18 Sep, 2021 1 commit
  5. 29 Aug, 2021 1 commit
  6. 29 Jun, 2021 1 commit
  7. 28 Jun, 2021 1 commit
  8. 22 Jun, 2021 1 commit
  9. 21 Jun, 2021 1 commit
  10. 19 Apr, 2021 2 commits
  11. 15 Apr, 2021 1 commit
  12. 27 Mar, 2021 1 commit
  13. 20 Mar, 2021 3 commits
    • Victor Toso's avatar
      operation-options: Update doc on undefined behavior · 7ffb45b1
      Victor Toso authored
      As pointed out by Carlos in the issue below, we are currently calling
      va_arg (args, gint) to the user parameter, that translates to 0 which
      we would happily take in Grilo as correct.
      For numeric types, user can simply use G_MAXINT and friends to limit
      lower/upper limits. Grilo will take care of clamping this if value if
      it is outside boundaries of a specific metadata-key.
      Resolves: #140
    • Victor Toso's avatar
      tests: Add GrlOperationOptions test file · 928134e2
      Victor Toso authored
      At this point, only a simple unit test related to the previous commit
      that fix GrlOperationOptions storing upper and lower limits that are
      outside the boundaries of numeric types metadata-keys.
    • Victor Toso's avatar
      operation-options: Fix storing numeric limits · b50dc15f
      Victor Toso authored
      GrlOperationOptions needs to validate user input against the maximum
      and minimum values of a metadata-key of numeric type. For numeric
      types, the follow should always be true:
        @min_value_registered <= @min_value_user
        @min_value_user <= @max_value_user
        @max_value_user <= @max_value_registered.
      So, we do implement some sort generic CLAMP for numeric types.  Sadly,
      glib does not provide as of yet a g_value_cmp() [0] so we need to
      write a bit more code to make this checks in Grilo today.
      The followup commit adds a unit test.
      Related: #140
      [0] glib#129
  14. 24 Feb, 2021 1 commit
  15. 25 Jan, 2021 1 commit
  16. 11 Dec, 2020 1 commit
  17. 20 Sep, 2020 1 commit
    • Rosen Penev's avatar
      net: Fix wrong printf format under 32-bit · 8ad058f7
      Rosen Penev authored
      Found with -Wformat :
      In file included from ../src/grilo.h:31,
                       from ../libs/net/grl-net-wc.c:52:
      ../libs/net/grl-net-wc.c: In function 'get_url':
      ../libs/net/grl-net-wc.c:770:16: warning: format '%lu' expects argument
      of type 'long unsigned int', but argument 5 has type 'gint64' {aka
      'long long int'} [-Wformat=]
        770 |     GRL_DEBUG ("delaying web request by %lu seconds",
            |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        771 |                priv->last_request - now);
            |                ~~~~~~~~~~~~~~~~~~~~~~~~
            |                                   |
            |                                   gint64 {aka long long int}
  18. 08 Sep, 2020 1 commit
  19. 03 Sep, 2020 1 commit
  20. 02 Sep, 2020 2 commits
  21. 30 Aug, 2020 1 commit
  22. 26 Aug, 2020 2 commits
    • Bastien Nocera's avatar
      grilo-test-ui: Fix tool not working in Flatpak · eff42ea8
      Bastien Nocera authored
      Since commit adc11e54, it's
      impossible to use grilo-test-ui in the Flatpak for another
      application, as it tries to request a D-Bus name that it cannot own.
      Instead of using our own app-id/D-Bus name, try to own a variant of the
      real app's name.
    • Bastien Nocera's avatar
      grilo-test-ui: Fix crash if app couldn't get on the bus · 3d30f160
      Bastien Nocera authored
      If the application couldn't own a name on the session bus, then it would
      never setup its UI, and view would be a NULL pointer which we'd
      dereference, and crash.
      Exit early from cleanup function if the view was never setup.
  23. 24 Aug, 2020 1 commit
  24. 21 Aug, 2020 1 commit
    • Victor Toso's avatar
      ci: use stable fedora to fix ci · 5dfaa6cf
      Victor Toso authored
      Rawhide is breaking the introspecting build with a permission to read
          ldd: error: you do not have read permission for `/builds/victortoso/grilo/_build/tmp-introspectba6itfp6/Grl-0.3'
      That is a temporary folder created by meson (0.55.0-2) but I think the
      issue is in the new python 3.9. I could not reproduce locally but for
      now, let's fix CI for grilo and grilo-plugins (due subprojects)
  25. 28 Jul, 2020 1 commit
  26. 23 Jul, 2020 1 commit
    • Victor Toso's avatar
      registry: do not load .so* files or folders · 9b61d87f
      Victor Toso authored
      Latest meson is creating a .so.p temporary folder to lua-factory plugin
      and current code in grl-registry would try to load all .so* files. This
      patch makes sure that it only tries to load files with .so suffix
      (actually, G_MODULE_SUFFIX that could be different in other platforms)
      	Bail out! Grilo-FATAL-WARNING: [registry]
      	  ../subprojects/grilo/src/grl-registry.c:1210: Failed to open module:
      	  /builds/victortoso/grilo-plugins/_build/src/lua-factory/libgrlluafactory.so.p: cannot read file data: Is a directory
  27. 22 Jul, 2020 2 commits
    • Jean Felder's avatar
      core: Add grl_related_keys_set_for_id() · 8de41d7c
      Jean Felder authored
      It is the counterpart of grl_data_set_for_id() for GrlRelatedKeys (see
      commit b30608ab).
      grl_related_keys_set_for_id() allows keys that aren't registered,
      to be registered and set it's value. It simply sets the value
      for registered keys.
      grl_registry_register_metadata_key_for_type() and
      grl_registry_register_or_lookup_metadata_key() need to be updated to
      add a new bind_key parameter. For related keys, bind_key parameters is
      used to create a relation between the key and bind_key.
    • Jean Felder's avatar
      core: Factor out register or lookup key logic from GrlData · cd875d01
      Jean Felder authored
      grl_data_set_for_id() and grl_data_new_for_id() share some code to
      register or lookup a key by its name.
      This shared code is put in a new private function named
      grl_registry_register_or_lookup_metadata_key() will be used in the
      commit by the new grl_related_keys_set_for_id() function.
  28. 14 May, 2020 2 commits