smartdevicelink / sdl_core

SmartDeviceLink In-Vehicle Software and Sample HMI
BSD 3-Clause "New" or "Revised" License
239 stars 245 forks source link

Fix/Invalid VR.AddCommand sent during CreateInteractionChoiceSet resumption #3938

Closed ShobhitAd closed 1 year ago

ShobhitAd commented 1 year ago

Fixes #3888

This PR is ready for review.

Risk

This PR makes no API changes.

Testing Plan

ATF tests PR submitted for issue

Summary

Modified creation messages for AddCommand DeleteCommand requests Added check of vr part in VRAddCommandRequest Added check of grammar_id in VRDeleteCommandRequest Added unit tests

CLA

jacobkeeler commented 1 year ago

Ah, another note is that we would need to skip the VR.DeleteCommand sending step in delete_interaction_choice_set_request.cc as part of this solution as well.

  if (choice_set.keyExists(strings::grammar_id) &&
      choice_set[strings::grammar_id].asInt() != -1) {
    SendVrDeleteCommand(app);
  } else {
    SendDeleteInteractionChoiceSetResponse();
  }

Those three changes on their own should solve the issue though