Skip to content

Commit

Permalink
[update] fix issues bug
Browse files Browse the repository at this point in the history
  • Loading branch information
liukangcc committed Mar 11, 2022
1 parent 92c2fae commit 0e4c9af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MQTTClient-RT/paho_mqtt.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ struct MQTTClient

/* publish interface */
rt_mutex_t pub_mutex; /* publish data mutex for blocking */
#if defined(RT_USING_POSIX) && (defined(RT_USING_DFS_NET) || defined(SAL_USING_POSIX))
#if defined(RT_USING_POSIX_FS) && (defined(RT_USING_DFS_NET) || defined(SAL_USING_POSIX))
struct rt_pipe_device* pipe_device;
int pub_pipe[2];
#else
Expand Down
10 changes: 9 additions & 1 deletion MQTTClient-RT/paho_mqtt_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@

#include <rtthread.h>
#include <rtdevice.h>
#include <dfs_posix.h>
#include <sys/time.h>

#include <netdb.h>
#include <sys/socket.h>
#include <sys/select.h>

#include <fcntl.h>
#include <sys/errno.h>

#include "MQTTPacket.h"
#include "paho_mqtt.h"

Expand Down Expand Up @@ -41,6 +43,12 @@
#endif
#endif

#ifndef RT_PIPE_BUFSZ
#define PIPE_BUFSZ 512
#else
#define PIPE_BUFSZ RT_PIPE_BUFSZ
#endif

/*
* resolve server address
* @param server the server sockaddress
Expand Down

0 comments on commit 0e4c9af

Please sign in to comment.