Skip to contentSkip to conversation

hci_send_req and EVT_CMD_STATUS

Bluez-devel Johan Hedberg 2 participants 2 messages Oct 23, 2005 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi Marcel,

I see that you changed hci_send_req so that it will never return cmd_status events with non-zero status (instead the function fails with EIO). If this was intentional (the fix I sent would have allowed getting the cmd status event in all circumstanses), please apply the attached patch since checking for rp.status after hci_send_req has successfully returned is unecessary.

Johan

Index: dbus.c
===================================================================
RCS file: /cvsroot/bluez/utils/hcid/dbus.c,v
retrieving revision 1.31

dbus.c +0 -18
diff -u -r1.31 dbus.c
@@ -1374,12 +1374,6 @@
 		goto failed;
 	}
 
-	if (rp.status) {
-		syslog(LOG_ERR, "Inquiry command failed with status 0x%02X", rp.status);
-		reply = bluez_new_failure_msg(msg, BLUEZ_ESYSTEM_OFFSET + EIO);
-		goto failed;
-	}
-
 	reply = dbus_message_new_method_return(msg);
 
 failed:
@@ -1496,12 +1490,6 @@
 		goto failed;
 	}
 
-	if (rp.status) {
-		syslog(LOG_ERR, "Remote name command failed with status 0x%02X", rp.status);
-		reply = bluez_new_failure_msg(msg, BLUEZ_ESYSTEM_OFFSET + EIO);
-		goto failed;
-	}
-
 	reply = dbus_message_new_method_return(msg);
 
 failed:
@@ -1655,12 +1643,6 @@
 		goto failed;
 	}
 
-	if (rp.status) {
-		syslog(LOG_ERR, "Authentication command failed with status 0x%02X", rp.status);
-		reply = bluez_new_failure_msg(msg, BLUEZ_ESYSTEM_OFFSET + EIO);
-		goto failed;
-	}
-
 failed:
 	if (sock >= 0)
 		close(sock);
maintainer
#1 lore raw

Hi Johan,

Quoted 6 lines

I see that you changed hci_send_req so that it will never return cmd_status events with non-zero status (instead the function fails with EIO). If this was intentional (the fix I sent would have allowed getting the cmd status event in all circumstanses), please apply the attached patch since checking for rp.status after hci_send_req has successfully returned is unecessary.

I didn't thought that much about it, but since you mentioned it, yes it was intentional. The patch is in the CVS now.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel