1. 18 Sep, 2014 15 commits
  2. 17 Sep, 2014 11 commits
    • Dan Winship's avatar
      libnm-core: fix nm_connection_replace_settings() · b40dc506
      Dan Winship authored
      The rewrite mistakenly used nm_connection_add_setting() rather than
      _nm_connection_add_setting(), causing it to emit the "changed" signal
      while the connection was only partially rebuilt.
      b40dc506
    • Dan Winship's avatar
      tui: fix an out-of-date comment · ca5f23a8
      Dan Winship authored
      nmtui-connect.c claimed that it didn't implement deactivation yet, but
      that was implemented long ago.
      ca5f23a8
    • Dan Winship's avatar
      Misc libnm-core fixes (bgo #736700) · 831a70d1
      Dan Winship authored
      831a70d1
    • Dan Winship's avatar
      libnm: fix race conditions when creating the same object twice · f9f9d297
      Dan Winship authored
      If two code paths try to asynchronously create the same object at the
      same time (eg, because it shows up in two different properties), we
      are supposed to deal with that. But at some point a race condition
      appeared where we could end up returning a partially-initialized
      object for one of the properties in the async case. Fix that.
      
      Also add comments to both the sync and async cases explaining why they
      work the way they do.
      f9f9d297
    • Dan Winship's avatar
      libnm: drop two unnecessary NM_IS_OBJECT() checks · f3c02058
      Dan Winship authored
      Now that NMRemoteConnection is an NMObject, the code only creates
      NMObjects, so we don't need that check.
      f3c02058
    • Dan Winship's avatar
      libnm: fix object-creation-failure code · a5913687
      Dan Winship authored
      If _nm_object_create() hit an error, it would return the
      (half-initialized) object anyway. If _nm_object_create_async() hit an
      error, it would return NULL, but leak the half-initialized object. Fix
      both cases.
      a5913687
    • Dan Winship's avatar
      libnm-core: fix up connection deserialize/copy/replace semantics · ad8b1309
      Dan Winship authored
      libnm-util's connection deserializing/copying/replacing functions have
      odd semantics where sometimes they both modify a connection AND return
      an error. libnm-core tried to improve things by guaranteeing that the
      connection would not be modified if the new settings were invalid, but
      this ended up breaking a bunch of places that needed to be able to
      work with invalid connections. So re-fix the functions by reverting
      back to the old semantics, but having return values that clearly
      distinguish whether the connection was modified or not.
      
      For comparison:
      
        - nm_connection_new_from_hash() / nm_simple_connection_new_from_dbus():
      
            - libnm-util: returns a valid connection or NULL.
      
            - OLD libnm-core: returned a valid connection or NULL.
      
            - NEW libnm-core: returns a valid connection or NULL.
      
        - nm_connection_duplicate() / nm_simple_connection_new_clone():
      
            - libnm-util: always succeeds, whether or not the connection is
              valid.
      
            - OLD libnm-core: returned a valid connection or NULL
      
            - NEW libnm-core: always succeeds, whether or not the connection
              is valid.
      
          - nm_connection_replace_settings_from_connection():
      
            - libnm-util: always replaces the settings, but returns FALSE if
              the connection is now invalid.
      
            - OLD libnm-core: either replaced the settings and returned TRUE
              (if the settings were valid), or else left the connection
              unchanged and returned FALSE (if not).
      
            - NEW libnm-core: always replaces the settings, and has no
              return value. (The modified connection is valid if and only if
              the replaced-from connection was valid; just like with the
              libnm-util version.)
      
          - nm_connection_replace_settings():
      
            - libnm-util: returns TRUE if the new settings are valid, or
              FALSE if either (a) the new settings could not be deserialized
              and the connection is unchanged, or (b) the new settings were
              deserialized, and the connection was updated, but is now not
              valid.
      
            - OLD libnm-core: either replaced the settings and returned TRUE
              (if the settings were valid), or else left the connection
              unchanged and returned FALSE (if not).
      
            - NEW libnm-core: returns TRUE if the connection was updated
              (whether or not it is valid), or FALSE if the new settings
              could not be deserialized and the connection is unchanged.
      ad8b1309
    • Dan Winship's avatar
      libnm-core: drop the ability to verify settings from property overrides · c4716508
      Dan Winship authored
      It needs to be possible to deserialize a connection hash into an
      invalid NMConnection; in particular, AddAndActivateConnection()
      explicitly allows this.
      
      Previously, the SetFunc and NotSetFunc passed to
      _nm_setting_class_override_property() could return a verification
      error immediately, but this functionality has to go away if we're
      going to be able to deserialize invalid connections.
      
      That functionality was only used in the handling of invalid virtual
      interface names; reorganize how that code works so that
      NMSettingConnection does all of the verification itself. (The code to
      make sure that it returned the "correct" error domain in that case
      turned out to be irrelevant, since the setting error domains don't get
      serialized over D-Bus correctly anyway.)
      c4716508
    • Dan Winship's avatar
      libnm-core: fix getting/setting 0-length array properties · 6c6cec03
      Dan Winship authored
      Empty array-valued properties should return a 0-length array from
      get_property(), but should also accept NULL as equivalent to a
      0-length array from set_property().
      6c6cec03
    • Dan Winship's avatar
      Revert "tui: fix a crash" · b9f9fd39
      Dan Winship authored
      This reverts commit c0ecd2f6.
      b9f9fd39
    • Lubomir Rintel's avatar
      core: fix casting of factory type (bgo #736780) · b05c8dbd
      Lubomir Rintel authored
      UINT is just 32bit, truncating the GType on 64-bit platforms. We do already use
      cast to SIZE, which is as wide as a pointer, when we need a GType in another
      place (nmtui); let's do it here as well.
      
      Broken by [0bc1b513] core: add support for internal device factories
      
      https://bugzilla.gnome.org/show_bug.cgi?id=736780
      b05c8dbd
  3. 16 Sep, 2014 7 commits
  4. 15 Sep, 2014 2 commits
  5. 12 Sep, 2014 2 commits
  6. 11 Sep, 2014 3 commits