1. 03 Jun, 2020 2 commits
  2. 26 May, 2020 1 commit
  3. 27 Apr, 2020 1 commit
  4. 27 Feb, 2020 1 commit
    • George Nash's avatar
      Fix static analysis warnings from Codan static analysis tool · 33144537
      George Nash authored
      The codan static analysis tool is built into eclipse CDT which
      I used time to time.
      
      Most of these warnings were suggestions to surround bitwise
      operations with parenthesis.  Some of the suggetions were
      about return values for pthread code in the network_event_thread
      function.
      
      In addition a white space error was fixed in the documentation
      in oc_api.h
      
      The most common warning is about not break statment at the end
      of case statments. All but one of these was done purposly.
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      33144537
  5. 25 Jan, 2020 1 commit
    • George Nash's avatar
      Add OC_STORAGE define that is set in oc_config.h · b0e9dac7
      George Nash authored
      Persistant storage is currently only enabled if OC_SECURITY
      is defined.  This has lead implementation problems when
      implementing features like introspection, cloud, or
      software-update which also require persistant storage.
      
      This commit replaces the `#ifdef OC_SECURITY` with
      `#ifdef OC_STORAGE` in oc_storage.c.
      
      Inside config.h OC_STORAGE is defined if OC_SECURITY, OC_IDD_API
      OC_SOFTWARE_UPDATE, or OC_SECURITY is defined.
      
      Also updated samples that call oc_storage_config so they call it
      if OC_STORAGE is defined instead of OC_SECURITY.
      
      Removed the dummy storage implmentation from the
      oc_cloud_storage.c since OC_STORAGE is now defined by default
      when OC_CLOUD is defined.
      
      Some preprocessor check were added to check it one of the
      features that require OC_STORAGE is set but OC_STORAGE is not
      set. This will cause a build error and inform developers to
      check oc_config.h to make sure OC_STORAGE is set there.
      
      Change-Id: I9a9242349e939393f190cab373fe7d0252ae656c
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      b0e9dac7
  6. 07 Oct, 2019 1 commit
  7. 18 Jul, 2019 1 commit
  8. 06 Jul, 2019 1 commit
  9. 10 Jun, 2019 1 commit
    • Kishen Maloor's avatar
      Complete OCF Cloud Support and sample test apps · 28ae13db
      Kishen Maloor authored
      This change massively overhauls OCF Cloud code and fully
      integrates it into the stack as a core feature. It has
      been tested for compliance with the current OCF Specification
      via the OCF conformance tool.
      
      Below is a high level summary of the changes:
      
      -Introduced new Cloud APIs to register, login, logout,
      deregister, perform token refresh, and publish resources.
      This enables application logic to drive their interactions with
      the OCF Cloud.
      
      Support for the Cloud Manager is being maintained per earlier
      contributions and serve as an alternative method for
      applications to connect with the Cloud. The cloud_manager_start/_stop
      APIs may be invoked by applications with a callback to
      provide an indication of connection state. The state machine has
      been updated to not switch to a "reconnecting" state upon
      receiving a redirect, but rather to just close the current
      connection and attempt a "login" with the REGISTERED bit staying
      set (more on this below wrt to the handling of oc_cloud_status_t).
      
      The full set of public APIs for Cloud support is now declared
      in include/oc_cloud.h.
      
      Response callbacks for all Cloud APIs has been kept consistent
      and only include the current Cloud Status and user parameter.
      
      -The CoAPCloudConf resource is now instantiated internally as an
      OCF "core resource" and is treated as a Device Configuration
      Resource (DCR) for access-control behaviors.
      
      -Initialization and shutdown of the internal constructs for Cloud
      support is now handled internally. Applications only ever need to
      invoke the aforementioned APIs for working with the Cloud feature
      anytime after oc_main_init().
      
      -Device Ownership State (dos) is checked internally in all Cloud
      API implementations to ensure that requests are not issued unless
      the dos is RFNOP.
      
      -Following a hard reset via /oic/sec/pstat or /oic/mnt, the Device
      is made to deregister from the Cloud, the connection is closed,
      and CoAPCloudConf is fully cleared, as required by the specification.
      
      -Internal response handlers for all Cloud requests have been updated
      to correctly handle the distinction between an "error response" and
      "error connect" in setting the last error code.
      
      -As Cloud support requires full support of Client and Server
      functions, it is incorporated into the Client_Server configuration.
      Accordingly, applications must link in the lib..client-server..
      library.
      
      Cloud support code is guarded by #ifdef OC_CLOUD (to make it
      optional), and all references to the Cloud feature in the rest of
      the stack require both OC_CLIENT and OC_SERVER to be defined.
      
      -oc_cloud_status_t has been updated to act as a bit mask (not
      exclusive) and hence all Cloud API callbacks must query the
      status for all relevant bits and take appropriate actions.
      For e.g., after successfully logging into the Cloud, the cloud
      status has both the REGISTERED and LOGGED_IN bits set. The
      sample applications illustrate the use of this pattern.
      
      -The status flags in oc_cloud_status_t have been renamed to match
      their names from the Cloud specification for sake of consistency.
      Further, new flags have been added to capture the LOGGED_OUT and
      DEREGISTERED statuses. When a response from the Cloud includes the
      expires_in property, the new status bit TOKEN_EXPIRY is set.
      Applications are expected to query this bit, and if set must
      retrieve the "expires_in" value using the new
      oc_cloud_get_token_expiry() API.
      
      -All of the Cloud code has been moved under api/cloud.
      
      -Preexisting unit tests have been updated but may need to be
      reworked,and possibly new tests added for better coverage. They
      are currently excluded from the Linux build pending their
      completion.
      
      -A new sample cloud_certification_tests has been added to
      illustrate the use of all Cloud APs with a command-line interface
      and serves as the means to perform all certification tests
      pertaining to the Cloud using OCF's Conformance Test Tool.
      The cloud_linux sample has been updated to reflect the recent
      API updates.
      
      -Misc. cleanup and code style fixes.
      Signed-off-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
      Change-Id: I6f65551dfd0f02cf37186ecf3ccc0320c16ad251
      28ae13db