]> granicus.if.org Git - transmission/commitdiff
More Mac fixes
authorEric Petit <eric@lapsus.org>
Fri, 26 Sep 2008 09:09:15 +0000 (09:09 +0000)
committerEric Petit <eric@lapsus.org>
Fri, 26 Sep 2008 09:09:15 +0000 (09:09 +0000)
macosx/PrefsController.m

index 0bedd0e928d6a8041239645e3109549e00a0549a..5fac1df6952e747f3bb2421bca981edbfec25c80 100644 (file)
@@ -888,12 +888,7 @@ tr_handle * fHandle;
     
     NSString * string = [components componentsJoinedByString: @","];
     
-    char * error = NULL;
-    if (tr_sessionSetRPCACL(fHandle, [string UTF8String], &error))
-    {
-        NSLog([NSString stringWithUTF8String: error]);
-        tr_free(error);
-    }
+    tr_sessionSetRPCACL(fHandle, [string UTF8String]);
 }
 
 - (void) addRemoveRPCIP: (id) sender
@@ -975,24 +970,13 @@ tr_handle * fHandle;
         
         NSString * newIP = [newComponents componentsJoinedByString: @"."];
         
-        //verify ip string
-        if (!tr_sessionTestRPCACL(fHandle, [[@"+" stringByAppendingString: newIP] UTF8String], NULL))
-        {
-            NSDictionary * newDict = [NSDictionary dictionaryWithObjectsAndKeys: newIP, @"IP",
-                                        [oldDict objectForKey: @"Allow"], @"Allow", nil];
-            [fRPCAccessArray replaceObjectAtIndex: row withObject: newDict];
-            
-            NSSortDescriptor * descriptor = [[[NSSortDescriptor alloc] initWithKey: @"IP" ascending: YES
-                                                selector: @selector(compareNumeric:)] autorelease];
-            [fRPCAccessArray sortUsingDescriptors: [NSArray arrayWithObject: descriptor]];
-        }
-        else
-        {
-            NSBeep();
-            
-            if ([[oldDict objectForKey: @"IP"] isEqualToString: @""])
-                [fRPCAccessArray removeObjectAtIndex: row];
-        }
+        NSDictionary * newDict = [NSDictionary dictionaryWithObjectsAndKeys: newIP, @"IP",
+                                    [oldDict objectForKey: @"Allow"], @"Allow", nil];
+        [fRPCAccessArray replaceObjectAtIndex: row withObject: newDict];
+        
+        NSSortDescriptor * descriptor = [[[NSSortDescriptor alloc] initWithKey: @"IP" ascending: YES
+                                            selector: @selector(compareNumeric:)] autorelease];
+        [fRPCAccessArray sortUsingDescriptors: [NSArray arrayWithObject: descriptor]];
         
         [fRPCAccessTable deselectAll: self];
         [fRPCAccessTable reloadData];