BPortLink now has a FlushWithReply() method itself.
BPortLink::AttachString() now accepts a length argument, and will no longer send a terminating null byte; LinkMsgReader::ReadString(), however, will make sure the string read is null terminated. Changed client communication code to use FlushWithReply() instead of Flush() and GetNextReply() - there were many bugs and shortcomings in the code, I hope I've fixed them all. Converted ClientFontList.cpp to our coding style (but not completely, the class members are missing). Some more cleanup - I hope Adi will adopt our coding style one day! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12998 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -401,23 +401,19 @@ AppServer::Run(void)
|
||||
void
|
||||
AppServer::MainLoop(void)
|
||||
{
|
||||
BPortLink pmsg(-1,fMessagePort);
|
||||
int32 code=0;
|
||||
status_t err=B_OK;
|
||||
|
||||
while(1)
|
||||
{
|
||||
STRACE(("info: AppServer::MainLoop listening on port %ld.\n", fMessagePort));
|
||||
err=pmsg.GetNextReply(&code);
|
||||
BPortLink pmsg(-1, fMessagePort);
|
||||
|
||||
if(err<B_OK)
|
||||
{
|
||||
while (1) {
|
||||
STRACE(("info: AppServer::MainLoop listening on port %ld.\n", fMessagePort));
|
||||
|
||||
int32 code;
|
||||
status_t err = pmsg.GetNextReply(code);
|
||||
if (err < B_OK) {
|
||||
STRACE(("MainLoop:pmsg.GetNextReply failed\n"));
|
||||
continue;
|
||||
}
|
||||
|
||||
switch(code)
|
||||
{
|
||||
|
||||
switch (code) {
|
||||
case B_QUIT_REQUESTED:
|
||||
case AS_CREATE_APP:
|
||||
case AS_DELETE_APP:
|
||||
|
||||
Reference in New Issue
Block a user