get the username using cocoa instead of carbon

This commit is contained in:
Mitchell Livingston 2009-10-10 01:19:51 +00:00
parent 4e16e80ad6
commit 8a5814aa66
1 changed files with 1 additions and 3 deletions

View File

@ -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];