On inspection this looks correct. Wouldn't the other libraries need
this kind of change? Did you test DISPATCH_ONE flag with multiple
dispatches outstanding?
Regards
-steve
On Sun, 2009-10-25 at 11:58 +1300, Angus Salkeld wrote:
> 322 switch (dispatch_types) {
> 323 case EVS_DISPATCH_ONE:
>
> Event dead_error_condition: On this path, the condition "ignore_dispatch !=
> 0" could not be true
> Also see events: [dead_error_line][const][assignment][new_values]
>
> 324 if (ignore_dispatch) {
>
> Event dead_error_line: Cannot reach this line of code
> Also see events: [dead_error_condition][const][assignment][new_values]
>
> 325 ignore_dispatch = 0;
> 326 } else {
> 327 cont = 0;
> 328 }
> 329 break;
> 330 case EVS_DISPATCH_ALL:
>
> Event const: After this line, the value of "ignore_dispatch" is equal to 0
> Event new_values: Conditional "ignore_dispatch != 0"
> Also see events:
> [dead_error_line][dead_error_condition][assignment][new_values]
>
> 331 if (ignore_dispatch) {
> 332 ignore_dispatch = 0;
> 333 }
> 334 break;
> 335 case EVS_DISPATCH_BLOCKING:
> 336 break;
> 337 }
>
> Signed-off-by: Angus Salkeld <[email protected]>
> ---
> lib/evs.c | 18 ++----------------
> 1 files changed, 2 insertions(+), 16 deletions(-)
>
> diff --git a/lib/evs.c b/lib/evs.c
> index bb18e65..01aa288 100644
> --- a/lib/evs.c
> +++ b/lib/evs.c
> @@ -231,7 +231,6 @@ evs_error_t evs_dispatch (
> struct res_evs_deliver_callback *res_evs_deliver_callback;
> evs_callbacks_t callbacks;
> coroipc_response_header_t *dispatch_data;
> - int ignore_dispatch = 0;
>
> error = hdb_error_to_cs(hdb_handle_get (&evs_handle_t_db, handle, (void
> *)&evs_inst));
> if (error != CS_OK) {
> @@ -319,21 +318,8 @@ evs_error_t evs_dispatch (
> /*
> * Determine if more messages should be processed
> * */
> - switch (dispatch_types) {
> - case EVS_DISPATCH_ONE:
> - if (ignore_dispatch) {
> - ignore_dispatch = 0;
> - } else {
> - cont = 0;
> - }
> - break;
> - case EVS_DISPATCH_ALL:
> - if (ignore_dispatch) {
> - ignore_dispatch = 0;
> - }
> - break;
> - case EVS_DISPATCH_BLOCKING:
> - break;
> + if (dispatch_types == EVS_DISPATCH_ONE) {
> + cont = 0;
> }
> } while (cont);
>
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais