GSTcpPort tidyup

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6122 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 2000-02-27 09:39:06 +00:00
parent f483855510
commit ce05a6d371
2 changed files with 3 additions and 2 deletions

View file

@ -704,7 +704,7 @@ static NSMapTable *tcpHandleTable = 0;
nItems = GSSwapBigI32ToHost(h->nItems);
NSAssert(nItems >0, NSInternalInconsistencyException);
rItems = [[NSMutableArray alloc] initWithCapacity: nItems];
if (rLength > sizeof(GSPortMsgHeader))
if (rWant > sizeof(GSPortMsgHeader))
{
NSData *d;

View file

@ -26,7 +26,8 @@ main()
remote = [names portForName: @"GSTcpPort"];
[loop addPort: (NSPort*)local forMode: NSDefaultRunLoopMode];
[remote sendBeforeDate: [NSDate dateWithTimeIntervalSinceNow: 240]
components: [NSMutableArray arrayWithObject: [NSData data]]
components: [NSMutableArray arrayWithObject:
[NSData dataWithBytes: "hello" length: 5]]
from: local
reserved: 0];
[loop run];