ndef: Do not build a reply to handover select messages
authorOlivier Guiter <olivier.guiter@linux.intel.com>
Mon, 11 Feb 2013 14:33:52 +0000 (15:33 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 12 Feb 2013 19:12:07 +0000 (20:12 +0100)
Handover select frames must not be replied to.

This fixes the following bt-handover error:
"ERROR:dbus.connection:Exception in handler for D-Bus signal"

src/ndef.c

index 48c1282..03604bc 100644 (file)
@@ -1427,7 +1427,7 @@ parse_mime_type(struct near_ndef_record *record, uint8_t *ndef_data,
        } else {
                err = __near_bluetooth_parse_oob_record(&data,
                                        &mime->handover.properties, action);
-               if (err == 0 && reply != NULL) {
+               if (err == 0 && reply != NULL && action == FALSE) {
                        *reply = near_ndef_prepare_handover_record("Hs",
                                        record, NEAR_CARRIER_BLUETOOTH, NULL);
                        if (*reply == NULL)