Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Update to latest master in iothub sdk, pull in latest submodules to do
Browse files Browse the repository at this point in the history
so.

use iothub_client shared library's new name.
fix strftime in logger

The C SDK moved parson, need to fix our build.
  • Loading branch information
darobs committed Sep 12, 2017
1 parent 0518e89 commit 58b82bf
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 43 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,10 @@ endfunction(copy_module_host_dll)

function(copy_iothub_client_dll whatIsBuilding whatIsBuildingLocation)
if(WIN32)
if(EXISTS "${azure_iot_sdks_DIR}/../bin/iothub_client.dll")
if(EXISTS "${azure_iot_sdks_DIR}/../bin/iothub_client_dll.dll")
add_custom_command(TARGET ${whatIsBuilding} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${azure_iot_sdks_DIR}/../bin/iothub_client.dll"
"${azure_iot_sdks_DIR}/../bin/iothub_client_dll.dll"
${whatIsBuildingLocation})
endif()
endif()
Expand Down
4 changes: 2 additions & 2 deletions core/tests/gateway_e2e/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ findAndInstall(umqtt 1.0.25 ${PROJECT_SOURCE_DIR}/deps/umqtt ${PROJECT_SOURCE_DI
#######################Find/Install/Build azure_iot_sdks#######################
###############################################################################
#The azure_iot_sdks repo requires special treatment. Parson submodule must be initialized.
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c/parson/README.md)
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c/deps/parson/README.md)
execute_process(
COMMAND git submodule update --init ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
Expand All @@ -28,7 +28,7 @@ if(NOT EXISTS ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c/parson/README.md)
message(FATAL_ERROR "Error pulling iot-sdk-c submodule: ${res}")
endif()
execute_process(
COMMAND git submodule update --init parson
COMMAND git submodule update --init deps/parson
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c
RESULT_VARIABLE res
)
Expand Down
4 changes: 2 additions & 2 deletions core/tests/testtools/iothub_test/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ findAndInstall(uamqp 1.0.25 ${PROJECT_SOURCE_DIR}/deps/uamqp ${PROJECT_SOURCE_DI
#######################Find/Install/Build azure_iot_sdks#######################
###############################################################################
#The azure_iot_sdks repo requires special treatment. Parson submodule must be initialized.
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c/parson/README.md)
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c/deps/parson/README.md)
execute_process(
COMMAND git submodule update --init ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
Expand All @@ -24,7 +24,7 @@ if(NOT EXISTS ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c/parson/README.md)
message(FATAL_ERROR "Error pulling iot-sdk-c submodule: ${res}")
endif()
execute_process(
COMMAND git submodule update --init parson
COMMAND git submodule update --init deps/parson
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c
RESULT_VARIABLE res
)
Expand Down
2 changes: 1 addition & 1 deletion deps/ctest
Submodule ctest updated from f75c43 to 037e31
2 changes: 1 addition & 1 deletion deps/iot-sdk-c
Submodule iot-sdk-c updated 304 files
2 changes: 1 addition & 1 deletion deps/parson
Submodule parson updated 4 files
+9 −9 README.md
+22 −22 parson.c
+39 −10 tests.c
+1 −1 tests/test_1_2.txt
2 changes: 1 addition & 1 deletion deps/testrunner
2 changes: 1 addition & 1 deletion deps/umock-c
4 changes: 2 additions & 2 deletions modules/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ findAndInstall(umqtt 1.0.25 ${PROJECT_SOURCE_DIR}/deps/umqtt ${PROJECT_SOURCE_DI
#######################Find/Install/Build azure_iot_sdks#######################
###############################################################################
#The azure_iot_sdks repo requires special treatment. Parson submodule must be initialized.
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c/parson/README.md)
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c/deps/parson/README.md)
execute_process(
COMMAND git submodule update --init ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
Expand All @@ -28,7 +28,7 @@ if(NOT EXISTS ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c/parson/README.md)
message(FATAL_ERROR "Error pulling iot-sdk-c submodule: ${res}")
endif()
execute_process(
COMMAND git submodule update --init parson
COMMAND git submodule update --init deps/parson
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/deps/iot-sdk-c
RESULT_VARIABLE res
)
Expand Down
2 changes: 1 addition & 1 deletion modules/iothub/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ add_library(iothub MODULE
)
target_link_libraries(iothub
gateway
iothub_client
iothub_client_dll
)

#this builds the iothub static library
Expand Down
8 changes: 4 additions & 4 deletions modules/logger/src/logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ static int LogStartStop_Print(char* destination, size_t destinationSize, bool ap

if (isAbsoluteStart)
{
err = strftime(destination, destinationSize, "{\"time\":\"%C\",\"content\":\"Log started\"}]", t);
err = strftime(destination, destinationSize, "{\"time\":\"%c\",\"content\":\"Log started\"}]", t);
}
else if (appendStart)
{
err = strftime(destination, destinationSize, ",{\"time\":\"%C\",\"content\":\"Log started\"}]", t);
err = strftime(destination, destinationSize, ",{\"time\":\"%c\",\"content\":\"Log started\"}]", t);
}
else
{
err = strftime(destination, destinationSize, ",{\"time\":\"%C\",\"content\":\"Log stopped\"}]", t);
err = strftime(destination, destinationSize, ",{\"time\":\"%c\",\"content\":\"Log stopped\"}]", t);
}

if (err == 0)
Expand Down Expand Up @@ -431,7 +431,7 @@ static void Logger_Receive(MODULE_HANDLE moduleHandle, MESSAGE_HANDLE messageHan
else
{
char timetemp[80] = { 0 };
if (strftime(timetemp, sizeof(timetemp) / sizeof(timetemp[0]), "%C", t) == 0)
if (strftime(timetemp, sizeof(timetemp) / sizeof(timetemp[0]), "%c", t) == 0)
{
LogError("unable to strftime");
/*Codes_SRS_LOGGER_02_012: [If producing the JSON format or writing it to the file fails, then Logger_Receive shall fail and return.]*/
Expand Down
Loading

0 comments on commit 58b82bf

Please sign in to comment.