3 Replies Latest reply on Aug 24, 2017 8:03 AM by riya

    Error in ota2_failsafe application?

    devin_1684766

      in the apps/waf/ota2_failsafe application that is built in by default for ota2 projects one of the first things it does is call wiced_ota2_image_extract_uncompressed_component to extract the APPS LUT.  This is in SDK 5.0.1

       

      The first line in that function looks like this

       

          /* we only support LUT and OTA_APP */

          if ((component != WICED_OTA2_IMAGE_COMPONENT_LUT) && (component != WICED_OTA2_IMAGE_COMPONENT_OTA_APP))

          {

              OTA2_WPRINT_ERROR(("wiced_ota2_image_extract_uncompressed_component(%s) bad arg!\r\n", ota2_image_type_name_string[ota_type]));

              return WICED_BADARG;

          }

       

      This looks incorrect as there is no way past this line unless component isn't LUT or OTA_APP, which is contrary to the comment.  Is this correct?

       

      Should it instead be:

       

          /* we only support LUT and OTA_APP */

          if ((component != WICED_OTA2_IMAGE_COMPONENT_LUT) || (component != WICED_OTA2_IMAGE_COMPONENT_OTA_APP))

          {

              OTA2_WPRINT_ERROR(("wiced_ota2_image_extract_uncompressed_component(%s) bad arg!\r\n", ota2_image_type_name_string[ota_type]));

              return WICED_BADARG;

          }

       

      Thank you!