Skip to content

Commit

Permalink
Cleanups from refactor of locking.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarske committed Nov 6, 2023
1 parent 76cb326 commit efde83c
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 181 deletions.
2 changes: 1 addition & 1 deletion examples/mqttnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ static int NetRead_ex(void *context, byte* buf, int buf_len,

if (do_read) {
/* Try and read number of buf_len provided,
minus what's already been read */
* minus what's already been read */
rc = (int)SOCK_RECV(sock->fd,
&buf[bytes],
buf_len - bytes,
Expand Down
8 changes: 4 additions & 4 deletions examples/multithread/multithread.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ static void *waitMessage_task(void *param)
#endif
else if (rc == MQTT_CODE_ERROR_TIMEOUT) {
if (mqttCtx->test_mode) {
mqtt_stop_set();
/* timeout in test mode should exit */
mqtt_stop_set();
PRINTF("MQTT Exiting timeout...");
break;
}
Expand Down Expand Up @@ -748,11 +748,11 @@ int multithread_test(MQTTCtx *mqttCtx)
/* Join threads - wait for completion */
if (THREAD_JOIN(threadList, threadCount)) {
#ifdef __GLIBC__
/* %m is specific to glibc/uclibc/musl, and recently (2018)
* added to FreeBSD */
/* "%m" is specific to glibc/uclibc/musl, and FreeBSD (as of 2018).
* Uses errno and not argument required */
PRINTF("THREAD_JOIN failed: %m");
#else
PRINTF("THREAD_JOIN failed: %d",errno);
PRINTF("THREAD_JOIN failed: %d", errno);
#endif
}

Expand Down
Loading

0 comments on commit efde83c

Please sign in to comment.