Commit b9b09368 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

local network: simplify ftp bonjour discovery

parent eb12ad4a
......@@ -129,6 +129,7 @@
- (void)viewWillAppear:(BOOL)animated
{
[_ftpNetServiceBrowser searchForServicesOfType:@"_ftp._tcp." inDomain:@""];
[_activityIndicator stopAnimating];
[super viewWillAppear:animated];
......@@ -138,21 +139,14 @@
- (void)netReachabilityChanged:(NSNotification *)notification
{
if (_reachability.currentReachabilityStatus == ReachableViaWiFi) {
[self _triggerNetServiceBrowser];
[self performSelectorInBackground:@selector(_startUPNPDiscovery) withObject:nil];
[self performSelectorInBackground:@selector(_startSAPDiscovery) withObject:nil];
} else {
[_ftpNetServiceBrowser stop];
[self _stopUPNPDiscovery];
[self _stopSAPDiscovery];
}
}
- (void)_triggerNetServiceBrowser
{
[_ftpNetServiceBrowser searchForServicesOfType:@"_ftp._tcp." inDomain:@""];
}
- (void)_startUPNPDiscovery
{
if (_reachability.currentReachabilityStatus != ReachableViaWiFi)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment