public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-users] hci.c  hacked
@ 2004-12-27 11:36 blookk -
  2004-12-27 11:52 ` Erwin Authried
  0 siblings, 1 reply; 2+ messages in thread
From: blookk - @ 2004-12-27 11:36 UTC (permalink / raw)
  To: bluez-users


Hello Marcel!

When I compiled the BlueZ for ARM7TDMI with uclibc 0.9.19  I detect a 
problem in "hci.c" . In "poll" call because seems that my arquitecture 
doesn't support this call. I modified the "hci.c" and use "select" instead 
of "poll". The modification is this:

		if (to) {
			struct pollfd p;
			int n;

			//p.fd = dd; p.events = POLLIN;

			n = select( dd + 1, &temp_rfds, NULL, NULL, &tv );
			printf("Descriptor in select: %d\n",n);
			printf("timeover: %d\n",to);
			switch( n )
			{
			    case -1: // Error
			        goto failed;
				break;

			    case 0:  // Timeout
			        continue;
				break;

			    default: // Data...
			        printf( "The file descriptor with data\n" );
				if( FD_ISSET( dd, &temp_rfds ) )
				{
				     printf( "The file descriptor was signaled\n" );
				}
				break;
			}

			//while ((n = poll(&p, 1, to)) < 0) {
			//printf("(4.3.4)\n");
			//	if (errno == EAGAIN || errno == EINTR)
			//		continue;
			//	goto failed;
			//}

			//if (!n) {
			//	errno = ETIMEDOUT;
			//	goto failed;
			//}

			to -= 10;
			if (to < 0) to = 0;

		}

with this changes the program don't work , but I don't know why.
Do you know where is the problem?

Regards.




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-27 11:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-27 11:36 [Bluez-users] hci.c hacked blookk -
2004-12-27 11:52 ` Erwin Authried

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox