Skip to content
  • Guillaume Roguez's avatar
    upnp: fix early crash by std::terminate · c4fc51a2
    Guillaume Roguez authored and Andreas Traczyk's avatar Andreas Traczyk committed
    
    
    In NAP-PMP implementation, a std::thread member of
    UPnPContext class is placed before member used by the thread.
    This thread is run during the class initialization (ctor).
    So the thread can start and access to these members when
    they are not initialized.
    
    The consequence is a std::terminate() call causing the stop
    of daemon.
    
    Fix that by moving the thread member after *ALL* used members.
    
    Reviewed-by: default avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
    Change-Id: Ibb7334e653a9c80c566ffc3944c93a6ef64e0a8b
    c4fc51a2