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) size_t onReceive(const uint8_t* p, size_t n)
{ {
#ifdef DEBUG_CONSOLE #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 #endif
switch(state) switch(state)
{ {

View File

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