From 1403d5bbaea88ca4dc19920452abb986f3ae1209 Mon Sep 17 00:00:00 2001 From: chatty Date: Wed, 8 Feb 1995 14:43:04 +0000 Subject: Temporarily switched back to the buffer reading messages (rather than the msg stream) --- comm/OLD/ReqMgr.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/comm/OLD/ReqMgr.cc b/comm/OLD/ReqMgr.cc index 288f203..8a238c2 100644 --- a/comm/OLD/ReqMgr.cc +++ b/comm/OLD/ReqMgr.cc @@ -3,7 +3,7 @@ * * by Michel Beaudouin-Lafon * - * Copyright 1993 + * Copyright 1993-1995 * Centre d'Etudes de la Navigation Aerienne (CENA) * * Request management, by Stephane Chatty @@ -190,7 +190,7 @@ UchMsgMgr :: DumpClientCode (ofstream& f) { f << "UchMessage*\n" << Name << "Service :: ConvertAnswer (UchMsgBuffer& b)\n{\n"; f << "\tlword type;\n"; - f << "\tReadLong (type);\n\n"; + f << "\tb.PeekLong (type, lwsize);\n\n"; f << "\tUchMessage* a = 0;\n"; f << "\tswitch (type) {\n"; CcuListIterOf ans = Answers; @@ -200,12 +200,12 @@ UchMsgMgr :: DumpClientCode (ofstream& f) f << "\t\tbreak;\n"; } f << "\t}\n"; - f << "\tif (a)\n\t\tReadMsg (*a);\n\treturn a;\n}\n\n"; + f << "\tif (a)\n\t\tb.ReadMsg (*a);\n\treturn a;\n}\n\n"; f << "bool\n" << Name << "Service :: NewMessage (UchMsgBuffer& b, bool)\n{\n"; f << "\tlword type;\n"; - f << "\tReadLong (type);\n\n"; + f << "\tb.PeekLong (type, lwsize);\n\n"; f << "\tUchMessage* m = 0;\n"; f << "\tswitch (type) {\n"; CcuListIterOf evt = Events; @@ -215,7 +215,7 @@ UchMsgMgr :: DumpClientCode (ofstream& f) f << "\t\tbreak;\n"; } f << "\t}\n"; - f << "\tif (m) {\n\t\tReadMsg (*m);\n\t\tPutEvent (m);\n\t\treturn true;\n"; + f << "\tif (m) {\n\t\tb.ReadMsg (*m);\n\t\tPutEvent (m);\n\t\treturn true;\n"; f << "\t} else\n\t\treturn false;\n}\n\n"; } @@ -225,7 +225,7 @@ UchMsgMgr :: DumpServerCode (ofstream& f) { f << "bool\n" << Name << "Client :: NewMessage (UchMsgBuffer& b, bool)\n{\n"; f << "\tlword type;\n"; - f << "\tReadLong (type);\n\n"; + f << "\tb.PeekLong (type, lwsize);\n\n"; f << "\tUchMessage* m = 0;\n"; f << "\tswitch (type) {\n"; CcuListIterOf req = Requests; @@ -235,7 +235,7 @@ UchMsgMgr :: DumpServerCode (ofstream& f) f << "\t\tbreak;\n"; } f << "\t}\n"; - f << "\tif (m) {\n\t\tReadMsg (*m);\n\t\tm->Activate (*this);\n\t\treturn true;\n"; + f << "\tif (m) {\n\t\tb.ReadMsg (*m);\n\t\tm->Activate (*this);\n\t\treturn true;\n"; f << "\t} else\n\t\treturn false;\n}\n\n"; f << "UchClient*\n" << Name << "Server :: CreateClient (int fd)\n{\n"; @@ -388,7 +388,7 @@ MsgType :: DumpCode (ofstream& f, int dest) CcuListIterOf field (Fields); if (receiver) { f << "void\n" << classname << " :: ReadFrom (UchIOS& b, lword)\n{\n"; -#if 0 +#if 1 f << "\tlword type;\n\tb >> type"; #else f << "\t b "; -- cgit v1.1