From 8a5814aa664bd5b48b6dc7c88912a7d87fca1573 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sat, 10 Oct 2009 01:19:51 +0000 Subject: [PATCH] get the username using cocoa instead of carbon --- macosx/BonjourController.m | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/macosx/BonjourController.m b/macosx/BonjourController.m index 4cee655a3..902ccfbbd 100644 --- a/macosx/BonjourController.m +++ b/macosx/BonjourController.m @@ -44,9 +44,7 @@ BonjourController * fDefaultController = nil; { [self stop]; - CFStringRef userName = CSCopyUserName(TRUE); - NSString * serviceName = [NSString stringWithFormat: @"Transmission Web Interface (%@)", (NSString *)userName]; - CFRelease(userName); + NSString * serviceName = [NSString stringWithFormat: @"Transmission Web Interface (%@)", NSUserName()]; fService = [[NSNetService alloc] initWithDomain: @"local." type: @"_http._tcp." name: serviceName port: port]; [fService setDelegate: self];