Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAM: Implement direct media requests fallback #576

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Commits on May 27, 2023

  1. NAM: implement direct media requests fallback

    This is behind a configuration switch because direct unauthenticated
    requests are at odds with the Matrix model where clients stick to their
    homeservers and only homeservers talk to each other. The implementation
    is also quite inefficient atm, causing a .well-known resolution
    roundtrip every single time a direct media request is made.
    KitsuneRal committed May 27, 2023
    Configuration menu
    Copy the full SHA
    b34e13d View commit details
    Browse the repository at this point in the history

Commits on May 28, 2023

  1. Quotest, sendFile(): actually test file contents

    Also: simplify the expression in FINISH_TEST.
    KitsuneRal committed May 28, 2023
    Configuration menu
    Copy the full SHA
    ccf5084 View commit details
    Browse the repository at this point in the history
  2. Use std::atomic_flag

    Going through QSettings doesn't work quite well on Windows; setting it
    in Quotest and immediately testing through another QSettings instance
    inside NetworkAccessManager (in another thread) returns the previous
    value. In fact, there's no general guarantee for that, as almost all
    QSettings member functions are reentrant but not thread-safe. The flag
    is only initialised from QSettings once at the first NAM creation, and its
    changes are only propagated to QSettings but never read again.
    Implication: changes in QSettings files when the client is running will
    only be reflected at the next run (or may be overwritten altogether),
    so just don't change settings files while the client is running, ok?
    KitsuneRal committed May 28, 2023
    Configuration menu
    Copy the full SHA
    e337379 View commit details
    Browse the repository at this point in the history
  3. Default-initialise std::atomic_flag

    std::atomic_flag(bool) is not a standard constructor, and MSVC doesn't
    have it, for one.
    KitsuneRal committed May 28, 2023
    Configuration menu
    Copy the full SHA
    3080875 View commit details
    Browse the repository at this point in the history