Skip to content
Snippets Groups Projects
  1. May 11, 2017
    • Emmanuel Lepage Vallée's avatar
      contactMethod: Prevent duplication of registered name CMs · a1f07277
      Emmanuel Lepage Vallée authored
      
      **WARNING** This makes the setRegisteredName method private and
      thus break the API. That method could not stay public as this
      would potentially corrupt the indexes.
      
      This patch adds the registered names to the global name
      directory. If `::getNumber()` is used with a known registered
      name, no new CM are created.
      
      This patch fixes the "most common" case, but doesn't implement the
      following corner cases:
      
       * If the registered name is already part of the directory, but
         not fully linked to an account and/or RingId.
       * If there is multiple name service
      
      For the multiple name service, the
      `NameDirectory::registeredNameFound` signal will need to use full
      URIs for the names (ring:foo@ns.ring.cx). This is out of this
      patch scope and will have side effects that needs to be addressed
      in each clients.
      
      Change-Id: If06561dc4cb56453cc77092f4c30c633e852b7fd
      Reviewed-by: default avatarNicolas Jäger <nicolas.jager@savoirfairelinux.com>
      a1f07277
    • Emmanuel Lepage Vallée's avatar
      certificatemodel: Make the CertificateModel reentrant · 44dcaf01
      Emmanuel Lepage Vallée authored
      
      First of all, [begin/end][Insert/Remove][Rows/Columns] is a
      flat transaction and can only exist once per model. The code
      was calling begin in other begin section due to some
      lazy-loading code. This could result in SIGSEGV if the model
      had active proxies.
      
      More importantly, this code is called from the collections.
      Some collections run in different threads. The class had a
      mutex, but only used it in half the places it should have
      been used. This caused a crash on the macOS and KDE client.
      I could not manage to crash the Gnome client, but it is
      probably possible. ASAN also got asserted due to this even
      when it would have otherwise not crashed.
      
      The commit alse fix a memory leak when the ID was duplicated
      by the race condition. This is a band-aid on the problem: IDs
      potentially not unique. However a band-aid is better than
      acrash and the patch to fix this would be too invasive to get
      past Gerrit.
      
      Change-Id: I92e313d0243659b6af374a0cbf8bab18c3f6ba76
      Reviewed-by: default avatarNicolas Jäger <nicolas.jager@savoirfairelinux.com>
      44dcaf01
  2. May 10, 2017
  3. May 08, 2017
  4. May 05, 2017
  5. May 02, 2017
    • Nicolas Jager's avatar
      add vcard from contact request · 59e3cd18
      Nicolas Jager authored
      
      - mapToPersonFromIncomingContactRequest : this function creates a
      Person from a vCard stored by the daemon; we make sure to ignore any
      ContactMethods which might be contained in the vCard and only use
      the CM from which we receive it.
      
      - PendingContactRequestModel::data now can return :
        * PEER_ID : get the username if possible or ring Id if not.
        * FORMATTED_NAME : get the profile name stored in the vCard.
        * COUNT__ : used to get the number of elements in the enum.
      
      - ContactRequest now store a person. This person matches the vCard.
      
      - PeerProfileCollection updates the CM(s) of the vCards it stores
      with the last modified date of the vCard in to get the date at which
      the contact request was accepted.
      
      [SS: update commit message]
      [SS: change how we restore the ContactRequest accept date]
      
      Change-Id: I3bafda5b38d5e2332e095cd5f1f1d0b101847f86
      Signed-off-by: default avatarStepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
      Reviewed-by: default avatarStepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
      59e3cd18
  6. May 01, 2017
  7. Apr 28, 2017
  8. Apr 27, 2017
Loading