You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 22, 2023. It is now read-only.
Merge development into master in prep for Release 1.0.3 (#122)
* fix fopen FILE* unsigned comparison bug
iotc_bsp_io_fs_open() in
src/bsp/platform/posix/iotc_bsp_io_fs_posix.c
sets resource_handle_out to the FILE* returned by fopen() if fopen()
doesn't fail. This in turn gets assigned to the resource manager's
context->resource_handle. Later, iotc_resource_manager_read() in
src/libiotc/io/fs/iotc_resource_manager.c
checks to make sure context->resource_handle is not less the
zero. But there's nothing about fopen() that ensures that the FILE*
returned by fopen() can't be a value less than zero (when used in a
signed comparison).
If iotc_resource_manager_read() is going to assume a value less than
0 indicates a BSP file io open error, then we need to replace the use
of fopen() in iotc_bsp_io_fs_posix.c with open().
* Fix User Guide Links to Headings
We must use all lower case, remove the colons, and substitute spaces
for hypens to get heading links working correctly.
See the code that creates links here:
https://github.com/jch/html-pipeline/blob/master/lib/html/pipeline/toc_filter.rb
* downcases the string
* removes anything that is not a letter, number, space or hyphen (see the source for how Unicode is handled)
* changes any space to a hyphen.
* if that is not unique, add "-1", "-2", "-3",... to make it unique
* Release notes update and in-code version increase to 1.0.3. (#123)
* Release notes update and in-code version increase to 1.0.3.
Co-authored-by: Philip Fisher <[email protected]>
Co-authored-by: Gus Class <[email protected]>
Co-authored-by: Mike V <[email protected]>
Co-authored-by: Arpad Tigyi <[email protected]>
Copy file name to clipboardexpand all lines: RELEASE-NOTES.md
+10
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,13 @@
1
+
# Google Cloud IoT Core Device SDK for Embedded C version 1.0.3
2
+
#### April 28, 2021
3
+
4
+
- Updated the POSIX BSP to use `open` instead of `fopen` for more consistent error detection, [#100](https://github.com/GoogleCloudPlatform/iot-device-sdk-embedded-c/pull/100) by [@pnfisher](https://github.com/pnfisher).
5
+
- Fixed a non null-terminated issue in message.topic with ‘iotc_user_subscription_callback_’, [#111](https://github.com/GoogleCloudPlatform/iot-device-sdk-embedded-c/issues/111) by [@csobrinho](https://github.com/csobrinho).
6
+
- Added overflow protection to ‘__iotc_calloc()’ calls, [#119](https://github.com/GoogleCloudPlatform/iot-device-sdk-embedded-c/pull/119)
7
+
- Updates to the Zephyr Troubleshooting guide, [#104](https://github.com/GoogleCloudPlatform/iot-device-sdk-embedded-c/pull/104) by [@galz10](https://github.com/galz10).
8
+
- Fixes to links within the User Guide, [#102](https://github.com/GoogleCloudPlatform/iot-device-sdk-embedded-c/pull/102) by [@mikevoyt](https://github.com/mikevoyt).
9
+
- Thank you to all of our contributors!
10
+
1
11
# Google Cloud IoT Core Device SDK for Embedded C version 1.0.2
Copy file name to clipboardexpand all lines: doc/user_guide.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -204,11 +204,11 @@ To connect to Cloud IoT Core, call **`iotc_connect()`**. This function enqueues
204
204
* TLS handshaking and certificate validation
205
205
* MQTT credential handshaking
206
206
207
-
Note: the call to connect returns immediately. The connection operation is fulfilled on subsequent calls to the Device SDK's event processing functions, as described in [Step 3: Process Events](step-3-process-events).
207
+
Note: the call to connect returns immediately. The connection operation is fulfilled on subsequent calls to the Device SDK's event processing functions, as described in [Step 3: Process Events](#step-3-process-events).
208
208
209
209
#### Connect callback
210
210
211
-
When the **`iotc_connect()`** function runs, the Device SDK initalizes a callback function. The callback function is invoked when a connection to Cloud IoT Core is established or when the connection is unsuccessful. The callback function is also invoked when an established connection is lost or shut down. See [Step 6: Disconnect and Shut Down](step-6-disconnect-and-shut-down) for details.
211
+
When the **`iotc_connect()`** function runs, the Device SDK initalizes a callback function. The callback function is invoked when a connection to Cloud IoT Core is established or when the connection is unsuccessful. The callback function is also invoked when an established connection is lost or shut down. See [Step 6: Disconnect and Shut Down](#step-6-disconnect-and-shut-down) for details.
212
212
213
213
### Step 3: Process events
214
214
@@ -228,7 +228,7 @@ Incoming messages include the topic data as part of the callback parameters. Spe
228
228
229
229
#### QoS level
230
230
231
-
The [specified QoS level](#MQTT v3.1.1) is the maximum QoS level of incoming messages. For instance, if you set the QoS level to 0, QoS 1 messages are downgraded to QoS 0.
231
+
The [specified QoS level](#mqtt-v3.1.1) is the maximum QoS level of incoming messages. For instance, if you set the QoS level to 0, QoS 1 messages are downgraded to QoS 0.
232
232
233
233
The QoS level also affects the Device SDK's memory overhead. QoS 2 messages use the most memory overhead, while QoS 0 messages use the least.
234
234
@@ -250,17 +250,17 @@ This callback function is for environments with severe memory restrictions. For
250
250
251
251
### Step 6: Disconnect and shut down
252
252
253
-
To disconnect from Cloud IoT Core, invoke the **`iotc_shutdown_connection()`** function. This function enqueues an event that cleanly closes the socket connection. After the connection is terminated, the Device SDK invokes the [connect callback](#Step 2: Connect) function.
253
+
To disconnect from Cloud IoT Core, invoke the **`iotc_shutdown_connection()`** function. This function enqueues an event that cleanly closes the socket connection. After the connection is terminated, the Device SDK invokes the [connect callback](#step-2-connect) function.
254
254
255
255
Note: Do not delete the context until the the connect callback is invoked.
256
256
257
257
#### Disconnection types and reconnecting
258
258
259
259
The Device SDK checks the parameters of the connect callback function to determine if a device was intentionally or incidentally disconnected. See the [**Connect callback**](#connect-callback) section for more information.
260
260
261
-
If an error disconnects a device, the client application can safely and immediately call **`iotc_connect()`** from within the connect callback function itself, using the same context that was just disconnected. This ques a new [connection request](#Step 2: Connect).
261
+
If an error disconnects a device, the client application can safely and immediately call **`iotc_connect()`** from within the connect callback function itself, using the same context that was just disconnected. This ques a new [connection request](#step-2-connect).
262
262
263
-
If a client application intentionally closes a connection, it retains the [existing context](#Step 1: Create a context) and invokes the connect function again later.
263
+
If a client application intentionally closes a connection, it retains the [existing context](#step-1-create-a-context) and invokes the connect function again later.
0 commit comments