Merge branch '1.3-rel' (5cfded4d) into 'master' 01/23001/2
authorGeorge Nash <george.nash@intel.com>
Thu, 26 Oct 2017 00:30:15 +0000 (17:30 -0700)
committerGeorge Nash <george.nash@intel.com>
Tue, 31 Oct 2017 17:51:13 +0000 (10:51 -0700)
Relates-to:
https://gerrit.iotivity.org/gerrit/#/c/22977/
https://gerrit.iotivity.org/gerrit/#/c/22811/
https://gerrit.iotivity.org/gerrit/#/c/22953/
https://gerrit.iotivity.org/gerrit/#/c/22975/
https://gerrit.iotivity.org/gerrit/#/c/22979/
https://gerrit.iotivity.org/gerrit/#/c/22033/
https://gerrit.iotivity.org/gerrit/#/c/22951/
https://gerrit.iotivity.org/gerrit/#/c/22973/
https://gerrit.iotivity.org/gerrit/#/c/22929/
https://gerrit.iotivity.org/gerrit/#/c/22965/
https://gerrit.iotivity.org/gerrit/#/c/22949/
https://gerrit.iotivity.org/gerrit/#/c/22923/
https://gerrit.iotivity.org/gerrit/#/c/22881/
https://gerrit.iotivity.org/gerrit/#/c/22935/
https://gerrit.iotivity.org/gerrit/#/c/22933/
https://gerrit.iotivity.org/gerrit/#/c/22921/
https://gerrit.iotivity.org/gerrit/#/c/22883/
https://gerrit.iotivity.org/gerrit/#/c/22925/
https://gerrit.iotivity.org/gerrit/#/c/22619/
https://gerrit.iotivity.org/gerrit/#/c/22879/
https://gerrit.iotivity.org/gerrit/#/c/22915/
https://gerrit.iotivity.org/gerrit/#/c/22895/
https://gerrit.iotivity.org/gerrit/#/c/22905/
https://gerrit.iotivity.org/gerrit/#/c/22891/
https://gerrit.iotivity.org/gerrit/#/c/22889/
https://gerrit.iotivity.org/gerrit/#/c/22893/
https://gerrit.iotivity.org/gerrit/#/c/22899/
https://gerrit.iotivity.org/gerrit/#/c/22779/
https://gerrit.iotivity.org/gerrit/#/c/22657/
https://gerrit.iotivity.org/gerrit/#/c/22903/
https://gerrit.iotivity.org/gerrit/#/c/22867/
https://gerrit.iotivity.org/gerrit/#/c/22875/
https://gerrit.iotivity.org/gerrit/#/c/22913/
https://gerrit.iotivity.org/gerrit/#/c/22873/
https://gerrit.iotivity.org/gerrit/#/c/22747/
https://gerrit.iotivity.org/gerrit/#/c/22855/
https://gerrit.iotivity.org/gerrit/#/c/22857/
https://gerrit.iotivity.org/gerrit/#/c/21675/
https://gerrit.iotivity.org/gerrit/#/c/22833/
https://gerrit.iotivity.org/gerrit/#/c/22721/
https://gerrit.iotivity.org/gerrit/#/c/22813/
https://gerrit.iotivity.org/gerrit/#/c/22823/
https://gerrit.iotivity.org/gerrit/#/c/22849/
https://gerrit.iotivity.org/gerrit/#/c/22835/
https://gerrit.iotivity.org/gerrit/#/c/22821/
https://gerrit.iotivity.org/gerrit/#/c/22825/
https://gerrit.iotivity.org/gerrit/#/c/22817/
https://gerrit.iotivity.org/gerrit/#/c/22815/
https://gerrit.iotivity.org/gerrit/#/c/22799/
https://gerrit.iotivity.org/gerrit/#/c/22587/
https://gerrit.iotivity.org/gerrit/#/c/22845/
https://gerrit.iotivity.org/gerrit/#/c/21919/
https://gerrit.iotivity.org/gerrit/#/c/22827/
https://gerrit.iotivity.org/gerrit/#/c/22819/
https://gerrit.iotivity.org/gerrit/#/c/22841/

Conflicts:
  resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c
  resource/csdk/connectivity/src/tcp_adapter/catcpserver.c
  resource/csdk/security/provisioning/sample/oic_svr_db_server_mfg.dat
  resource/csdk/security/tool/svrdbeditor_src/svrdbeditorcommon.c
  resource/csdk/security/tool/svrdbeditor_src/svrdbeditordoxm.c
  resource/csdk/stack/src/ocstack.c
  resource/examples/oic_svr_db_server.dat

Bug: https://jira.iotivity.org/browse/IOT-2453
Change-Id: Ia7f9297dda815fb518f6d869f8ad94fcae953633
Signed-off-by: George Nash <george.nash@intel.com>
63 files changed:
1  2 
build_common/SConscript
build_common/tools/UnpackAll.py
extlibs/libcoap/SConscript
java/jni/JniOcProvisioning.cpp
java/jni/JniOcProvisioning.h
resource/csdk/connectivity/common/src/caremotehandler.c
resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c
resource/csdk/connectivity/src/caconnectivitymanager.c
resource/csdk/connectivity/src/tcp_adapter/catcpserver.c
resource/csdk/routing/src/routingmanager.c
resource/csdk/routing/src/routingtablemanager.c
resource/csdk/security/provisioning/sample/cloud/cloudWrapper.c
resource/csdk/security/provisioning/src/credentialgenerator.c
resource/csdk/security/provisioning/src/multipleownershiptransfermanager.c
resource/csdk/security/provisioning/src/ocprovisioningmanager.c
resource/csdk/security/provisioning/src/ownershiptransfermanager.c
resource/csdk/security/provisioning/src/secureresourceprovider.c
resource/csdk/security/src/aclresource.c
resource/csdk/security/src/credresource.c
resource/csdk/security/src/csrresource.c
resource/csdk/security/src/deviceonboardingstate.c
resource/csdk/security/src/doxmresource.c
resource/csdk/security/src/policyengine.c
resource/csdk/security/src/psinterface.c
resource/csdk/security/src/pstatresource.c
resource/csdk/security/src/rolesresource.c
resource/csdk/security/unittest/credentialresource.cpp
resource/csdk/security/unittest/pstatresource.cpp
resource/csdk/stack/include/internal/ocstackinternal.h
resource/csdk/stack/include/ocpayload.h
resource/csdk/stack/src/occollection.c
resource/csdk/stack/src/ocpayload.c
resource/csdk/stack/test/cbortests.cpp
resource/csdk/stack/test/stacktests.cpp
resource/examples/oic_svr_db_server.dat
resource/provisioning/examples/cloudClient.cpp
resource/provisioning/examples/cloudWrapper.cpp
resource/provisioning/unittests/OCProvisioningTest.cpp
service/easy-setup/enrollee/src/easysetup.c
service/easy-setup/enrollee/src/resourcehandler.c
service/easy-setup/mediator/richsdk/inc/ESRichCommon.h
service/easy-setup/mediator/richsdk/src/RemoteEnrollee.cpp
service/easy-setup/sampleapp/enrollee/arduino/enrolleewifi.cpp
service/easy-setup/sampleapp/enrollee/linux/easysetup_x.c
service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/easysetup_wifi_conn.c
service/notification/cpp-wrapper/examples/linux/notificationserviceprovider.cpp
service/notification/src/consumer/NSConsumerScheduler.c
service/notification/src/provider/NSProviderNotification.c
service/simulator/src/client/get_request_generator.cpp
service/simulator/src/client/post_request_generator.cpp
service/simulator/src/client/put_request_generator.cpp
service/simulator/src/client/request_automation_manager.cpp
service/simulator/src/client/request_sender.cpp
service/simulator/src/client/simulator_remote_resource_impl.cpp
service/simulator/src/common/request_model.cpp
service/simulator/src/common/request_model_builder.cpp
service/simulator/src/common/resource_model_schema_builder.cpp
service/simulator/src/common/simulator_resource_model.cpp
service/simulator/src/server/resource_update_automation.cpp
service/simulator/src/server/simulator_collection_resource_impl.cpp
service/simulator/src/server/simulator_resource_factory.cpp
service/simulator/src/server/simulator_single_resource_impl.cpp
tools/scons/UnpackAll.py

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1156,16 -1151,20 +1156,15 @@@ void CATCPStopServer(
          caglobals.tcp.shutdownFds[1] = OC_INVALID_SOCKET;
          // receive thread will stop immediately
      }
 -    if (caglobals.tcp.connectionFds[1] != -1)
 -    {
 -        close(caglobals.tcp.connectionFds[1]);
 -        caglobals.tcp.connectionFds[1] = OC_INVALID_SOCKET;
 -    }
  #else
-     // Unit tests are calling CATCPStopServer even without CATCPStartServer being called.
-     if (caglobals.tcp.started)
+     // unit tests sometimes stop the TCP Server after starting just the UDP Server.
+     if (caglobals.tcp.updateEvent != NULL)
      {
-         // Ask the receive thread to shut down.
-         OC_STATIC_ASSERT((WSA_INVALID_EVENT == ((WSAEVENT)NULL)),
-             "The assert() below relies on the default value of "
-             "caglobals.tcp.updateEvent being WSA_INVALID_EVENT");
-         assert(caglobals.tcp.updateEvent != WSA_INVALID_EVENT);
-         OC_VERIFY(WSASetEvent(caglobals.tcp.updateEvent));
+         // receive thread will stop immediately.
+         if (!WSASetEvent(caglobals.tcp.updateEvent))
+         {
+             OIC_LOG_V(DEBUG, TAG, "set shutdown event failed: %u", GetLastError());
+         }
      }
  #endif
  
  #include "oic_string.h"
  #include "ocstackinternal.h"
  #include "ocresource.h"
 -#include "logger.h"
 +#include "experimental/logger.h"
  #include "ocendpoint.h"
  #include "cacommon.h"
+ #include "ocstack.h"
  
  #define TAG "OIC_RI_PAYLOAD"
  #define CSV_SEPARATOR ','
index da21cb3,e46c1f1..125dd14
Binary files differ
  #include "oic_string.h"
  #include "oic_malloc.h"
  #include "cautilinterface.h"
 -#include "payload_logging.h"
 +#include "experimental/payload_logging.h"
  
+ // TODO: Remove this flag and enable the code it guards.
+ // This is a temporary workaround to ignore the failure of OCLinksPayloadArrayCreate
+ // in some cases. This allows the response to still be made, even though links property will be
+ // missing.
+ // Bug: IOT-2762
+ #define ES_IGNORE_OCLinksPayloadArrayCreate_FAILIURE
  /**
   * @var ES_RH_TAG
   * @brief Logging tag for module name.
@@@ -22,8 -22,9 +22,9 @@@
  #include "easysetup_x.h"
  #include "string.h"
  #include "oic_malloc.h"
 -#include "logger.h"
 +#include "experimental/logger.h"
  #include "ocpayload.h"
+ #include <inttypes.h>
  
  /**
   * @var ESX_ENROLLEE_TAG
@@@ -20,8 -20,9 +20,9 @@@
  
  #include "request_model_builder.h"
  #include "resource_model_schema_builder.h"
 -#include "logger.h"
 +#include "experimental/logger.h"
  #include "Raml.h"
+ #include <assert.h>
  
  #define TAG "REQ_MODEL_BUILDER"
  
Simple merge