handover: Change behavior for empty (no ac) frames
authorOlivier Guiter <olivier.guiter@linux.intel.com>
Mon, 22 Oct 2012 13:52:52 +0000 (15:52 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 24 Oct 2012 15:44:58 +0000 (17:44 +0200)
Some frame may not have ac records, so we have to jump to the parsing code
right after checking the frame header.

plugins/handover.c

index 318c85f..67506b5 100644 (file)
@@ -304,6 +304,12 @@ static near_bool_t handover_read_hr(int client_fd,
        ndef->in_extra_read = TRUE;
        ndef->cfg_record_state = TRUE;
 
+       /* But, if there's no ac record, we jump to the parsing */
+       if (ndef->extra_ndef_count == 0) {
+               handover_ndef_parse(client_fd, ndef);
+               return FALSE;
+       }
+
        return TRUE;
 
 fail: