great cleaning

This commit is contained in:
2017-10-16 00:29:43 +02:00
parent 87d1841fc8
commit 4ad1f09f73
9 changed files with 161 additions and 69 deletions
+4 -4
View File
@@ -5,18 +5,18 @@
#include <stdio.h>
#include "../demo.h"
bool testIdListener(TF_MSG *msg)
TF_Result testIdListener(TF_Msg *msg)
{
printf("testIdListener()\n");
dumpFrameInfo(msg);
return true;
return TF_CLOSE;
}
bool testGenericListener(TF_MSG *msg)
TF_Result testGenericListener(TF_Msg *msg)
{
printf("testGenericListener()\n");
dumpFrameInfo(msg);
return true;
return TF_STAY;
}
int main(void)
+10 -4
View File
@@ -6,14 +6,14 @@
#include "../demo.h"
#include <memory.h>
bool helloListener(TF_MSG *msg)
TF_Result helloListener(TF_Msg *msg)
{
printf("helloListener()\n");
dumpFrameInfo(msg);
return true;
return TF_STAY;
}
bool replyListener(TF_MSG *msg)
TF_Result replyListener(TF_Msg *msg)
{
printf("replyListener()\n");
dumpFrameInfo(msg);
@@ -21,8 +21,14 @@ bool replyListener(TF_MSG *msg)
msg->len = (TF_LEN) strlen((const char *) msg->data);
TF_Respond(msg);
// unsolicted reply - will not be handled
msg->data = (const uint8_t *) "SPAM";
msg->len = 5;
TF_Respond(msg);
// unrelated message
TF_SendSimple(77, (const uint8_t *) "NAZDAR", 7);
return true;
return TF_STAY;
}
int main(void)