summaryrefslogtreecommitdiff
path: root/comm/OLD/Agent.cc
diff options
context:
space:
mode:
Diffstat (limited to 'comm/OLD/Agent.cc')
-rw-r--r--comm/OLD/Agent.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/comm/OLD/Agent.cc b/comm/OLD/Agent.cc
index 6c06f01..ec4c28d 100644
--- a/comm/OLD/Agent.cc
+++ b/comm/OLD/Agent.cc
@@ -158,7 +158,7 @@ UchAgent :: HandleRead ()
SysError (ErrWarn, "UchAgent::HandleRead: Accept");
return;
}
- UchRemoteAgent* ra = new UchRemoteAgent (this, ch);
+ UchRemoteAgent* ra = HandleNew (ch);
delete ch;
ra->SetMode (IOReadSelect);
@@ -170,9 +170,10 @@ UchAgent :: HandleRead ()
/*?
This virtual function is called whenever a new agent connects to this one.
?*/
-void
-UchAgent :: HandleNew (UchRemoteAgent*)
+UchRemoteAgent*
+UchAgent :: HandleNew (UchChannel* ch)
{
+ return new UchRemoteAgent (this, ch);
}
/*?
@@ -359,9 +360,12 @@ UchRemoteAgent :: UchRemoteAgent (UchAgent* a, UchChannel* ch)
}
UchRemoteAgent :: UchRemoteAgent (UchAgent* a, UchAddress* addr)
-: UchMsgStream (addr, 0),
+: UchMsgStream (0, addr),
MyLocalAgent (a)
{
+ if (!Setup ())
+ SysError (ErrWarn, "Connect");
+ SetSyncMode (TRUE);
}