handover: Reply with no ACs when getting an Hr with an empty AC list
authorOlivier Guiter <olivier.guiter@linux.intel.com>
Mon, 11 Feb 2013 15:52:32 +0000 (16:52 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 12 Feb 2013 19:12:48 +0000 (20:12 +0100)
This fixes handover validation test #2.

If the Hr comes with no alternative carriers, the Hs AC list should be
empty as well.

plugins/handover.c

index 2e7b2a2..5fa33f5 100644 (file)
@@ -225,7 +225,9 @@ static near_bool_t handover_read_cfg_records(int client_fd,
        if (ndef->missing_bytes)
                return TRUE;    /* more bytes to come... */
 
-       ndef->extra_ndef_count--;
+       if (ndef->extra_ndef_count > 0)
+               ndef->extra_ndef_count--;
+
        ndef->in_extra_read = TRUE;
 
        if (ndef->extra_ndef_count == 0) {