fixed log mask parsing in main.c.

touched up error handling a little bit
This commit is contained in:
hyunghwan.chung
2017-12-28 04:58:17 +00:00
parent 9f27e27d25
commit edba0207fb
6 changed files with 39 additions and 27 deletions

View File

@ -44,13 +44,13 @@ extend Socket
{
## this primitive method may return failure.
## but ignore it here.
if (self.insem)
if (self.insem notNil)
{
System unsignal: self.insem.
System removeAsyncSemaphore: self.insem.
self.insem := nil.
}.
if (self.outsem)
if (self.outsem notNil)
{
System unsignal: self.outsem.
System removeAsyncSemaphore: self.outsem.
@ -158,15 +158,18 @@ class MyObject(Object)
if (n == 0)
{
sck close.
}
else
{
(n asString & ' bytes read') dump.
data dump.
}.
(n asString & ' bytes read') dump.
data dump.
].
outact := [:sck :state |
if (state)
{
sck writeBytes: #[ $h, $e, $l, $l, $o ].
sck writeBytes: #[ $h, $e, $l, $l, $o, 10 ].
}
else
@ -178,7 +181,6 @@ class MyObject(Object)
if (state)
{
'CONNECTED NOW.............' dump.
##s onOutputDo: outact.
s writeBytes: #[ $h $e $l $l $o ].
s watchInput.