Experimenting with modules

FossilOrigin-Name: 02076431dabccef850cba729d5eb3c26c0bf7c4334b47649b04e0bc232433a64
This commit is contained in:
7u83@mail.ru
2016-02-14 16:30:14 +00:00
parent e5158696c4
commit b393486b4b
5 changed files with 21 additions and 11 deletions

View File

@ -105,6 +105,7 @@ int check_discovery(struct conn *conn, struct cw_action_in *a, uint8_t * data, i
static void wtpman_run_discovery(void *arg)
{
struct wtpman *wtpman = (struct wtpman *) arg;
//struct cwrmsg *cwrmsg;
@ -583,12 +584,14 @@ void wtpman_lw_addpacket(struct wtpman *wtpman, uint8_t * packet, int len)
void wtpman_start(struct wtpman *wtpman, int dtlsmode)
{
if (dtlsmode) {
cw_dbg(DBG_INFO, "Starting wtpman in DTLS mode");
pthread_create(&wtpman->thread, NULL, (void *) &wtpman_run,
(void *) wtpman);
} else {
cw_dbg(DBG_INFO, "Starting wtpman in non-dtls mode");
pthread_create(&wtpman->thread, NULL, (void *) &wtpman_run_discovery,
(void *) wtpman);
}