Skip to content
Snippets Groups Projects
Commit 624692ce authored by f4grx's avatar f4grx
Browse files

fixed both rx threads

parent af3e20a8
No related branches found
No related tags found
No related merge requests found
......@@ -176,7 +176,7 @@ int hn70ap_radio_devinit(struct radio_s *radio, const char *dev)
radio->callback = NULL;
radio->alive = true;
ret = pthread_create(&radio->rxthread, NULL, hn70ap_radio_rxthread, NULL);
ret = pthread_create(&radio->rxthread, NULL, hn70ap_radio_rxthread, radio);
if(ret < 0)
{
syslog(LOG_ERR, "Failed to start the receive thread\n");
......
......@@ -82,8 +82,6 @@ void *hn70ap_tun_rxthread(void *arg)
if(tunnel->callback)
{
//Wait for messages on the air
printf("t");
fflush(stdout);
ret = read(tunnel->fd, tunnel->userbuf, tunnel->userbuflen);
if(ret > 0)
{
......@@ -93,8 +91,7 @@ fflush(stdout);
else
{
//syslog(LOG_ERR, "tunnel rx failed -> errno=%d\n", errno);
printf("T");
}
}
} //callback defined
else
{
......@@ -186,6 +183,7 @@ int hn70ap_tun_devinit(char name[IFNAMSIZ])
//Start RX thread
tunnel->alive = true;
tunnel->callback = NULL;
ret = pthread_create(&tunnel->rxthread, NULL, hn70ap_tun_rxthread, tunnel);
if(ret < 0)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment