]> granicus.if.org Git - transmission/commitdiff
print the rpc access list error message to Console
authorMitchell Livingston <livings124@transmissionbt.com>
Wed, 4 Jun 2008 16:24:49 +0000 (16:24 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Wed, 4 Jun 2008 16:24:49 +0000 (16:24 +0000)
macosx/PrefsController.m

index 4116f223e9c26bff069e5fdc966a3b97175ec34d..532c3917b49973cf243676e482823558c954619b 100644 (file)
     
     NSString * string = [components componentsJoinedByString: @","];
     
-    #warning check for an error!
-    tr_sessionSetRPCACL(fHandle, [string UTF8String], NULL);
+    char ** error = (char **)tr_malloc(sizeof(char **));
+    if (tr_sessionSetRPCACL(fHandle, [string UTF8String], error))
+    {
+        NSLog([NSString stringWithUTF8String: *error]);
+        tr_free(*error);
+    }
+    tr_free(error);
 }
 
 - (void) addRemoveRPCIP: (id) sender