Skip to content
  • Thomas Haller's avatar
    libnm/device-p2p-wifi: cleanup peers handling · 41b2d8c6
    Thomas Haller authored
    Don't reallocate peers-array nor set it to %NULL. Instead,
    just emit the signal for the peers and take them out one-by-one.
    
    I am slightly surprised, that the peers array does not need to hold
    a reference on the NMP2PPeer instances. But that seems intentional.
    I think, the libnm code here should be significantly reworked, but
    that is for another time.
    
    Also, delay clearing the pointers until finalize() method. For
    the most part, it shouldn't make a difference. Still avoid having
    the instance in a badly defined state during dispose() (which
    theoretically could be called multiple times).
    41b2d8c6