LaunchAPPLServer: logging changes

This commit is contained in:
Wolfgang Thaller 2019-01-09 20:12:59 +01:00
parent ee5a3b13ca
commit 75f72af9ac
2 changed files with 13 additions and 2 deletions

View File

@ -301,7 +301,7 @@ public:
size_t onReceive(const uint8_t* p, size_t n)
{
#ifdef DEBUG_CONSOLE
printf("Received %d bytes in state %d.\n", (int)n, (int)state);
// printf("Received %d bytes in state %d.\n", (int)n, (int)state);
#endif
switch(state)
{

View File

@ -11,6 +11,10 @@
#include <string.h>
#include <TextUtils.h>
#ifdef DEBUG_CONSOLE
#include <stdio.h>
#endif
OpenTptStream::OpenTptStream()
{
InitOpenTransport();
@ -53,12 +57,20 @@ void OpenTptStream::tryListening()
OSStatus err;
err = endpoint->Listen(&call);
#ifdef DEBUG_CONSOLE
printf("Listen: err = %d.\n", (int)err);
#endif
if(err < 0)
return; // hopefully, kOTNoData
endpoint->SetBlocking();
err = endpoint->Accept(endpoint, &call);
#ifdef DEBUG_CONSOLE
printf("Accept: err = %d.\n", (int)err);
#endif
endpoint->SetNonBlocking();
connected = true;
@ -122,4 +134,3 @@ void OpenTptStream::idle()
break;
}
}