[asterisk-bugs] [Asterisk 0017277]: [patch] The heap data structure can't cope with a removal and reinsert

Asterisk Bug Tracker noreply at bugs.digium.com
Thu May 6 09:15:58 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17277 
====================================================================== 
Reported By:                cappucinoking
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   17277
Category:                   Tests/General
Reproducibility:            always
Severity:                   block
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
JIRA:                       SWP-1405 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.2 
SVN Revision (number only!):  
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2010-05-03 12:42 CDT
Last Modified:              2010-05-06 09:15 CDT
====================================================================== 
Summary:                    [patch] The heap data structure can't cope with a
removal and reinsert
Description: 
Whilst looking into why qualify events are being scheduled out of sequence
I started looking into why items on the maxheap weren't in the correct
order.
The qualify code is a different use case then the current tests allow for.
When a response to a qualify request is made, the event is rescheduled via
a remove and re-add to the maxheap structure.
I have written a test to demonstrate the failure of the heap to keep the
items in order when removing and re-inserting items.

======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0016936 [patch] Qualify frequency has big pause...
====================================================================== 

---------------------------------------------------------------------- 
 (0121474) svnbot (reporter) - 2010-05-06 09:15
 https://issues.asterisk.org/view.php?id=17277#c121474 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 261500

U   trunk/tests/test_heap.c

------------------------------------------------------------------------
r261500 | russell | 2010-05-06 09:15:57 -0500 (Thu, 06 May 2010) | 10
lines

Add test case for removing random elements from a heap.

I modified the original patch for trunk to use the unit test API.

(issue https://issues.asterisk.org/view.php?id=17277)
Reported by: cappucinoking
Patches:
      test_heap.diff uploaded by cappucinoking (license 1036)
Tested by: cappucinoking, russell

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=261500 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-05-06 09:15 svnbot         Checkin                                      
2010-05-06 09:15 svnbot         Note Added: 0121474                          
======================================================================




More information about the asterisk-bugs mailing list