mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 17:51:01 +00:00
Minor tidyup.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13825 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f73df6155c
commit
36207cdaf1
1 changed files with 8 additions and 10 deletions
|
@ -344,7 +344,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
info = RETAIN([NSMutableDictionary dictionaryWithCapacity: 4]);
|
info = [[NSMutableDictionary alloc] initWithCapacity: 4];
|
||||||
[info setObject: address forKey: NSFileHandleNotificationDataItem];
|
[info setObject: address forKey: NSFileHandleNotificationDataItem];
|
||||||
[info setObject: GSFileHandleConnectCompletionNotification
|
[info setObject: GSFileHandleConnectCompletionNotification
|
||||||
forKey: NotificationKey];
|
forKey: NotificationKey];
|
||||||
|
@ -945,7 +945,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
||||||
[self checkAccept];
|
[self checkAccept];
|
||||||
readPos = 0;
|
readPos = 0;
|
||||||
RELEASE(readInfo);
|
RELEASE(readInfo);
|
||||||
readInfo = RETAIN([NSMutableDictionary dictionaryWithCapacity: 4]);
|
readInfo = [[NSMutableDictionary alloc] initWithCapacity: 4];
|
||||||
[readInfo setObject: NSFileHandleConnectionAcceptedNotification
|
[readInfo setObject: NSFileHandleConnectionAcceptedNotification
|
||||||
forKey: NotificationKey];
|
forKey: NotificationKey];
|
||||||
[self watchReadDescriptorForModes: modes];
|
[self watchReadDescriptorForModes: modes];
|
||||||
|
@ -961,7 +961,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
||||||
[self checkRead];
|
[self checkRead];
|
||||||
readPos = 0;
|
readPos = 0;
|
||||||
RELEASE(readInfo);
|
RELEASE(readInfo);
|
||||||
readInfo = RETAIN([NSMutableDictionary dictionaryWithCapacity: 4]);
|
readInfo = [[NSMutableDictionary alloc] initWithCapacity: 4];
|
||||||
[readInfo setObject: NSFileHandleReadCompletionNotification
|
[readInfo setObject: NSFileHandleReadCompletionNotification
|
||||||
forKey: NotificationKey];
|
forKey: NotificationKey];
|
||||||
[readInfo setObject: [NSMutableData dataWithCapacity: 0]
|
[readInfo setObject: [NSMutableData dataWithCapacity: 0]
|
||||||
|
@ -979,7 +979,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
||||||
[self checkRead];
|
[self checkRead];
|
||||||
readPos = 0;
|
readPos = 0;
|
||||||
RELEASE(readInfo);
|
RELEASE(readInfo);
|
||||||
readInfo = RETAIN([NSMutableDictionary dictionaryWithCapacity: 4]);
|
readInfo = [[NSMutableDictionary alloc] initWithCapacity: 4];
|
||||||
[readInfo setObject: NSFileHandleReadToEndOfFileCompletionNotification
|
[readInfo setObject: NSFileHandleReadToEndOfFileCompletionNotification
|
||||||
forKey: NotificationKey];
|
forKey: NotificationKey];
|
||||||
[readInfo setObject: [NSMutableData dataWithCapacity: 0]
|
[readInfo setObject: [NSMutableData dataWithCapacity: 0]
|
||||||
|
@ -997,7 +997,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
||||||
[self checkRead];
|
[self checkRead];
|
||||||
readPos = 0;
|
readPos = 0;
|
||||||
RELEASE(readInfo);
|
RELEASE(readInfo);
|
||||||
readInfo = RETAIN([NSMutableDictionary dictionaryWithCapacity: 4]);
|
readInfo = [[NSMutableDictionary alloc] initWithCapacity: 4];
|
||||||
[readInfo setObject: NSFileHandleDataAvailableNotification
|
[readInfo setObject: NSFileHandleDataAvailableNotification
|
||||||
forKey: NotificationKey];
|
forKey: NotificationKey];
|
||||||
[readInfo setObject: [NSMutableData dataWithCapacity: 0]
|
[readInfo setObject: [NSMutableData dataWithCapacity: 0]
|
||||||
|
@ -1151,7 +1151,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
||||||
|
|
||||||
[self checkWrite];
|
[self checkWrite];
|
||||||
|
|
||||||
info = RETAIN([NSMutableDictionary dictionaryWithCapacity: 4]);
|
info = [[NSMutableDictionary alloc] initWithCapacity: 4];
|
||||||
[info setObject: item forKey: NSFileHandleNotificationDataItem];
|
[info setObject: item forKey: NSFileHandleNotificationDataItem];
|
||||||
[info setObject: GSFileHandleWriteCompletionNotification
|
[info setObject: GSFileHandleWriteCompletionNotification
|
||||||
forKey: NotificationKey];
|
forKey: NotificationKey];
|
||||||
|
@ -1554,11 +1554,9 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
||||||
|
|
||||||
- (void) setAddr: (struct sockaddr_in *)sin
|
- (void) setAddr: (struct sockaddr_in *)sin
|
||||||
{
|
{
|
||||||
address = [NSString stringWithCString: (char*)inet_ntoa(sin->sin_addr)];
|
address = [[NSString alloc] initWithCString: (char*)inet_ntoa(sin->sin_addr)];
|
||||||
RETAIN(address);
|
service = [[NSString alloc] initWithFormat: @"%d",
|
||||||
service = [NSString stringWithFormat: @"%d",
|
|
||||||
(int)GSSwapBigI16ToHost(sin->sin_port)];
|
(int)GSSwapBigI16ToHost(sin->sin_port)];
|
||||||
RETAIN(service);
|
|
||||||
protocol = @"tcp";
|
protocol = @"tcp";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue