[cig-commits] commit:

Mercurial hg at geodynamics.org
Mon Nov 24 11:59:12 PST 2008


changeset:   107:5595dce57725
user:        JulianGiordani
date:        Wed May 28 02:07:15 2008 +0000
files:       Utils/src/TimeIntegrator.c
description:
Bug fix.
TimeIntegrator was adding hooks on it's finishEP with the function,
_Stg_ObjectList_InsertAtIndex, that meant it wasn't checking if it had room to store the routine on the EP.
Bec found this error when 5+ swarms needed advecting.
Fixed by the function Stg_ObjectList_InsertAtIndex, which just does a size check / modify before storing the hook.


diff -r 94d44997cc9e -r 5595dce57725 Utils/src/TimeIntegrator.c
--- a/Utils/src/TimeIntegrator.c	Thu May 15 23:12:59 2008 +0000
+++ b/Utils/src/TimeIntegrator.c	Wed May 28 02:07:15 2008 +0000
@@ -614,7 +614,7 @@ void TimeIntegrator_InsertBeforeFinishEP
 
 	if ( Stg_ObjectList_GetIndex( self->finishEP->hooks, hookToInsertBefore ) != (unsigned int)-1 ) {
 		EntryPoint_InsertBefore( self->finishEP, hookToInsertBefore, name, funcPtr, addedBy );
-		_Stg_ObjectList_InsertAtIndex( 
+		Stg_ObjectList_InsertAtIndex( 
 				self->finishData,
 				Stg_ObjectList_GetIndex( self->finishEP->hooks, name ),
 				data );
@@ -636,7 +636,7 @@ void TimeIntegrator_InsertAfterFinishEP(
 
 	if ( Stg_ObjectList_GetIndex( self->finishEP->hooks, hookToInsertAfter ) != (unsigned int)-1 ) {
 		EntryPoint_InsertAfter( self->finishEP, hookToInsertAfter, name, funcPtr, addedBy );
-		_Stg_ObjectList_InsertAtIndex(
+		Stg_ObjectList_InsertAtIndex(
 				self->finishData,
 				Stg_ObjectList_GetIndex( self->finishEP->hooks, name ),
 				data );



More information about the CIG-COMMITS mailing list