eddyleo / doubango

Automatically exported from code.google.com/p/doubango
0 stars 0 forks source link

SigComp finding state (tcomp_statehandler.c) #204

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

tcomp_statehandler_findState to report the state as found.  There were two 
compartments and state was found in one compartment but not in a subseqent one 
there for count was set to zero rather than one.

What version of the product are you using? On what operating system?

Please provide any additional information below.

in tcomp_statehandler_findState should the following lines be updated from

    tsk_list_foreach(item, statehandler->compartments){
        tcomp_compartment_t *compartment = item->data;
        count = tcomp_compartment_findState(compartment,  
                         partial_identifier, lpState);
    }

to

    tsk_list_foreach(item, statehandler->compartments){
        tcomp_compartment_t *compartment = item->data;
        count += tcomp_compartment_findState(compartment,  
                         partial_identifier, lpState);
    }

so that finding the state in any associated comparment is acceptable?

Original issue reported on code.google.com by alistair...@gmail.com on 4 Feb 2013 at 2:58

GoogleCodeExporter commented 8 years ago

Original comment by boss...@yahoo.fr on 5 Feb 2013 at 4:55

GoogleCodeExporter commented 8 years ago
It make sense to add the "+=" but I don't see how it's possible to have the 
same state with two different compartments.
The issue should happen only if the state exist but not in the last compartment 
as "count" would be overwritten.

Original comment by boss...@yahoo.fr on 6 Feb 2013 at 9:51

GoogleCodeExporter commented 8 years ago
Fixed by r814

Original comment by boss...@yahoo.fr on 6 Feb 2013 at 12:10