Make functions visible only within the module

This prevents linking problems.
Signed-off-by: 's avatarGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
parent f2f0390d
...@@ -72,12 +72,12 @@ static Tree heap; /**< Tree that holds the allocation records */ ...@@ -72,12 +72,12 @@ static Tree heap; /**< Tree that holds the allocation records */
static const char *errmsg = "Memory allocation error"; static const char *errmsg = "Memory allocation error";
size_t Heap_roundup(size_t size); static size_t Heap_roundup(size_t size);
int ptrCompare(void* a, void* b, int value); static int ptrCompare(void* a, void* b, int value);
void Heap_check(char* string, void* ptr); static void Heap_check(char* string, void* ptr);
void checkEyecatchers(char* file, int line, void* p, size_t size); static void checkEyecatchers(char* file, int line, void* p, size_t size);
int Internal_heap_unlink(char* file, int line, void* p); static int Internal_heap_unlink(char* file, int line, void* p);
void HeapScan(enum LOG_LEVELS log_level); static void HeapScan(enum LOG_LEVELS log_level);
/** /**
...@@ -87,7 +87,7 @@ void HeapScan(enum LOG_LEVELS log_level); ...@@ -87,7 +87,7 @@ void HeapScan(enum LOG_LEVELS log_level);
* @param size the size actually needed * @param size the size actually needed
* @return the rounded up size * @return the rounded up size
*/ */
size_t Heap_roundup(size_t size) static size_t Heap_roundup(size_t size)
{ {
static int multsize = 4*sizeof(int); static int multsize = 4*sizeof(int);
...@@ -103,7 +103,7 @@ size_t Heap_roundup(size_t size) ...@@ -103,7 +103,7 @@ size_t Heap_roundup(size_t size)
* @param b pointer to the memory to free * @param b pointer to the memory to free
* @return boolean indicating whether a and b are equal * @return boolean indicating whether a and b are equal
*/ */
int ptrCompare(void* a, void* b, int value) static int ptrCompare(void* a, void* b, int value)
{ {
a = ((storageElement*)a)->ptr; a = ((storageElement*)a)->ptr;
if (value) if (value)
...@@ -113,7 +113,7 @@ int ptrCompare(void* a, void* b, int value) ...@@ -113,7 +113,7 @@ int ptrCompare(void* a, void* b, int value)
} }
void Heap_check(char* string, void* ptr) static void Heap_check(char* string, void* ptr)
{ {
return; return;
/*Node* curnode = NULL; /*Node* curnode = NULL;
...@@ -192,7 +192,7 @@ void* mymalloc(char* file, int line, size_t size) ...@@ -192,7 +192,7 @@ void* mymalloc(char* file, int line, size_t size)
} }
void checkEyecatchers(char* file, int line, void* p, size_t size) static void checkEyecatchers(char* file, int line, void* p, size_t size)
{ {
int *sp = (int*)p; int *sp = (int*)p;
char *cp = (char*)p; char *cp = (char*)p;
...@@ -215,7 +215,7 @@ void checkEyecatchers(char* file, int line, void* p, size_t size) ...@@ -215,7 +215,7 @@ void checkEyecatchers(char* file, int line, void* p, size_t size)
* @param line use the __LINE__ macro to indicate which line this item was allocated at * @param line use the __LINE__ macro to indicate which line this item was allocated at
* @param p pointer to the item to be removed * @param p pointer to the item to be removed
*/ */
int Internal_heap_unlink(char* file, int line, void* p) static int Internal_heap_unlink(char* file, int line, void* p)
{ {
Node* e = NULL; Node* e = NULL;
int rc = 0; int rc = 0;
...@@ -345,7 +345,7 @@ void* Heap_findItem(void* p) ...@@ -345,7 +345,7 @@ void* Heap_findItem(void* p)
* Scans the heap and reports any items currently allocated. * Scans the heap and reports any items currently allocated.
* To be used at shutdown if any heap items have not been freed. * To be used at shutdown if any heap items have not been freed.
*/ */
void HeapScan(enum LOG_LEVELS log_level) static void HeapScan(enum LOG_LEVELS log_level)
{ {
Node* current = NULL; Node* current = NULL;
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "Heap.h" #include "Heap.h"
int ListUnlink(List* aList, void* content, int(*callback)(void*, void*), int freeContent); static int ListUnlink(List* aList, void* content, int(*callback)(void*, void*), int freeContent);
/** /**
...@@ -197,7 +197,7 @@ ListElement* ListFindItem(List* aList, void* content, int(*callback)(void*, void ...@@ -197,7 +197,7 @@ ListElement* ListFindItem(List* aList, void* content, int(*callback)(void*, void
* @param freeContent boolean value to indicate whether the item found is to be freed * @param freeContent boolean value to indicate whether the item found is to be freed
* @return 1=item removed, 0=item not removed * @return 1=item removed, 0=item not removed
*/ */
int ListUnlink(List* aList, void* content, int(*callback)(void*, void*), int freeContent) static int ListUnlink(List* aList, void* content, int(*callback)(void*, void*), int freeContent)
{ {
ListElement* next = NULL; ListElement* next = NULL;
ListElement* saved = aList->current; ListElement* saved = aList->current;
......
...@@ -109,8 +109,8 @@ static void Log_output(enum LOG_LEVELS log_level, const char *msg); ...@@ -109,8 +109,8 @@ static void Log_output(enum LOG_LEVELS log_level, const char *msg);
static void Log_posttrace(enum LOG_LEVELS log_level, traceEntry* cur_entry); static void Log_posttrace(enum LOG_LEVELS log_level, traceEntry* cur_entry);
static void Log_trace(enum LOG_LEVELS log_level, const char *buf); static void Log_trace(enum LOG_LEVELS log_level, const char *buf);
#if 0 #if 0
FILE* Log_destToFile(const char *dest); static FILE* Log_destToFile(const char *dest);
int Log_compareEntries(const char *entry1, const char *entry2); static int Log_compareEntries(const char *entry1, const char *entry2);
#endif #endif
static int sametime_count = 0; static int sametime_count = 0;
...@@ -471,7 +471,7 @@ void Log_stackTrace(enum LOG_LEVELS log_level, int msgno, int thread_id, int cur ...@@ -471,7 +471,7 @@ void Log_stackTrace(enum LOG_LEVELS log_level, int msgno, int thread_id, int cur
#if 0 #if 0
FILE* Log_destToFile(const char *dest) static FILE* Log_destToFile(const char *dest)
{ {
FILE* file = NULL; FILE* file = NULL;
...@@ -490,7 +490,7 @@ FILE* Log_destToFile(const char *dest) ...@@ -490,7 +490,7 @@ FILE* Log_destToFile(const char *dest)
} }
int Log_compareEntries(const char *entry1, const char *entry2) static int Log_compareEntries(const char *entry1, const char *entry2)
{ {
int comp = strncmp(&entry1[7], &entry2[7], 19); int comp = strncmp(&entry1[7], &entry2[7], 19);
......
This diff is collapsed.
...@@ -253,31 +253,31 @@ long MQTTClient_elapsed(struct timeval start) ...@@ -253,31 +253,31 @@ long MQTTClient_elapsed(struct timeval start)
} }
#endif #endif
void MQTTClient_terminate(void); static void MQTTClient_terminate(void);
void MQTTClient_emptyMessageQueue(Clients* client); static void MQTTClient_emptyMessageQueue(Clients* client);
int MQTTClient_deliverMessage( static int MQTTClient_deliverMessage(
int rc, MQTTClients* m, int rc, MQTTClients* m,
char** topicName, int* topicLen, char** topicName, int* topicLen,
MQTTClient_message** message); MQTTClient_message** message);
int clientSockCompare(void* a, void* b); static int clientSockCompare(void* a, void* b);
thread_return_type WINAPI connectionLost_call(void* context); static thread_return_type WINAPI connectionLost_call(void* context);
thread_return_type WINAPI MQTTClient_run(void* n); static thread_return_type WINAPI MQTTClient_run(void* n);
void MQTTClient_stop(void); static void MQTTClient_stop(void);
void MQTTClient_closeSession(Clients* client); static void MQTTClient_closeSession(Clients* client);
int MQTTClient_cleanSession(Clients* client); static int MQTTClient_cleanSession(Clients* client);
int MQTTClient_connectURIVersion( static int MQTTClient_connectURIVersion(
MQTTClient handle, MQTTClient_connectOptions* options, MQTTClient handle, MQTTClient_connectOptions* options,
const char* serverURI, int MQTTVersion, const char* serverURI, int MQTTVersion,
START_TIME_TYPE start, long millisecsTimeout); START_TIME_TYPE start, long millisecsTimeout);
int MQTTClient_connectURI(MQTTClient handle, MQTTClient_connectOptions* options, const char* serverURI); static int MQTTClient_connectURI(MQTTClient handle, MQTTClient_connectOptions* options, const char* serverURI);
int MQTTClient_disconnect1(MQTTClient handle, int timeout, int internal, int stop); static int MQTTClient_disconnect1(MQTTClient handle, int timeout, int internal, int stop);
int MQTTClient_disconnect_internal(MQTTClient handle, int timeout); static int MQTTClient_disconnect_internal(MQTTClient handle, int timeout);
void MQTTClient_retry(void); static void MQTTClient_retry(void);
MQTTPacket* MQTTClient_cycle(int* sock, unsigned long timeout, int* rc); static MQTTPacket* MQTTClient_cycle(int* sock, unsigned long timeout, int* rc);
MQTTPacket* MQTTClient_waitfor(MQTTClient handle, int packet_type, int* rc, long timeout); static MQTTPacket* MQTTClient_waitfor(MQTTClient handle, int packet_type, int* rc, long timeout);
int pubCompare(void* a, void* b); static int pubCompare(void* a, void* b);
void MQTTProtocol_checkPendingWrites(void); static void MQTTProtocol_checkPendingWrites(void);
void MQTTClient_writeComplete(int socket); static void MQTTClient_writeComplete(int socket);
int MQTTClient_create(MQTTClient* handle, const char* serverURI, const char* clientId, int MQTTClient_create(MQTTClient* handle, const char* serverURI, const char* clientId,
...@@ -361,7 +361,7 @@ exit: ...@@ -361,7 +361,7 @@ exit:
} }
void MQTTClient_terminate(void) static void MQTTClient_terminate(void)
{ {
FUNC_ENTRY; FUNC_ENTRY;
MQTTClient_stop(); MQTTClient_stop();
...@@ -384,7 +384,7 @@ void MQTTClient_terminate(void) ...@@ -384,7 +384,7 @@ void MQTTClient_terminate(void)
} }
void MQTTClient_emptyMessageQueue(Clients* client) static void MQTTClient_emptyMessageQueue(Clients* client)
{ {
FUNC_ENTRY; FUNC_ENTRY;
/* empty message queue */ /* empty message queue */
...@@ -465,7 +465,7 @@ void MQTTClient_free(void* memory) ...@@ -465,7 +465,7 @@ void MQTTClient_free(void* memory)
} }
int MQTTClient_deliverMessage(int rc, MQTTClients* m, char** topicName, int* topicLen, MQTTClient_message** message) static int MQTTClient_deliverMessage(int rc, MQTTClients* m, char** topicName, int* topicLen, MQTTClient_message** message)
{ {
qEntry* qe = (qEntry*)(m->c->messageQueue->first->content); qEntry* qe = (qEntry*)(m->c->messageQueue->first->content);
...@@ -491,7 +491,7 @@ int MQTTClient_deliverMessage(int rc, MQTTClients* m, char** topicName, int* top ...@@ -491,7 +491,7 @@ int MQTTClient_deliverMessage(int rc, MQTTClients* m, char** topicName, int* top
* @param b second integer value * @param b second integer value
* @return boolean indicating whether a and b are equal * @return boolean indicating whether a and b are equal
*/ */
int clientSockCompare(void* a, void* b) static int clientSockCompare(void* a, void* b)
{ {
MQTTClients* m = (MQTTClients*)a; MQTTClients* m = (MQTTClients*)a;
return m->c->net.socket == *(int*)b; return m->c->net.socket == *(int*)b;
...@@ -504,7 +504,7 @@ int clientSockCompare(void* a, void* b) ...@@ -504,7 +504,7 @@ int clientSockCompare(void* a, void* b)
* @param context a pointer to the relevant client * @param context a pointer to the relevant client
* @return thread_return_type standard thread return value - not used here * @return thread_return_type standard thread return value - not used here
*/ */
thread_return_type WINAPI connectionLost_call(void* context) static thread_return_type WINAPI connectionLost_call(void* context)
{ {
MQTTClients* m = (MQTTClients*)context; MQTTClients* m = (MQTTClients*)context;
...@@ -514,7 +514,7 @@ thread_return_type WINAPI connectionLost_call(void* context) ...@@ -514,7 +514,7 @@ thread_return_type WINAPI connectionLost_call(void* context)
/* This is the thread function that handles the calling of callback functions if set */ /* This is the thread function that handles the calling of callback functions if set */
thread_return_type WINAPI MQTTClient_run(void* n) static thread_return_type WINAPI MQTTClient_run(void* n)
{ {
long timeout = 10L; /* first time in we have a small timeout. Gets things started more quickly */ long timeout = 10L; /* first time in we have a small timeout. Gets things started more quickly */
...@@ -647,7 +647,7 @@ thread_return_type WINAPI MQTTClient_run(void* n) ...@@ -647,7 +647,7 @@ thread_return_type WINAPI MQTTClient_run(void* n)
} }
void MQTTClient_stop(void) static void MQTTClient_stop(void)
{ {
int rc = 0; int rc = 0;
...@@ -715,7 +715,7 @@ int MQTTClient_setCallbacks(MQTTClient handle, void* context, MQTTClient_connect ...@@ -715,7 +715,7 @@ int MQTTClient_setCallbacks(MQTTClient handle, void* context, MQTTClient_connect
} }
void MQTTClient_closeSession(Clients* client) static void MQTTClient_closeSession(Clients* client)
{ {
FUNC_ENTRY; FUNC_ENTRY;
client->good = 0; client->good = 0;
...@@ -744,7 +744,7 @@ void MQTTClient_closeSession(Clients* client) ...@@ -744,7 +744,7 @@ void MQTTClient_closeSession(Clients* client)
} }
int MQTTClient_cleanSession(Clients* client) static int MQTTClient_cleanSession(Clients* client)
{ {
int rc = 0; int rc = 0;
...@@ -805,7 +805,7 @@ void Protocol_processPublication(Publish* publish, Clients* client) ...@@ -805,7 +805,7 @@ void Protocol_processPublication(Publish* publish, Clients* client)
} }
int MQTTClient_connectURIVersion(MQTTClient handle, MQTTClient_connectOptions* options, const char* serverURI, int MQTTVersion, static int MQTTClient_connectURIVersion(MQTTClient handle, MQTTClient_connectOptions* options, const char* serverURI, int MQTTVersion,
START_TIME_TYPE start, long millisecsTimeout) START_TIME_TYPE start, long millisecsTimeout)
{ {
MQTTClients* m = handle; MQTTClients* m = handle;
...@@ -987,7 +987,7 @@ exit: ...@@ -987,7 +987,7 @@ exit:
} }
int MQTTClient_connectURI(MQTTClient handle, MQTTClient_connectOptions* options, const char* serverURI) static int MQTTClient_connectURI(MQTTClient handle, MQTTClient_connectOptions* options, const char* serverURI)
{ {
MQTTClients* m = handle; MQTTClients* m = handle;
START_TIME_TYPE start; START_TIME_TYPE start;
...@@ -1167,7 +1167,7 @@ exit: ...@@ -1167,7 +1167,7 @@ exit:
/** /**
* mqttclient_mutex must be locked when you call this function, if multi threaded * mqttclient_mutex must be locked when you call this function, if multi threaded
*/ */
int MQTTClient_disconnect1(MQTTClient handle, int timeout, int call_connection_lost, int stop) static int MQTTClient_disconnect1(MQTTClient handle, int timeout, int call_connection_lost, int stop)
{ {
MQTTClients* m = handle; MQTTClients* m = handle;
START_TIME_TYPE start; START_TIME_TYPE start;
...@@ -1226,7 +1226,7 @@ exit: ...@@ -1226,7 +1226,7 @@ exit:
/** /**
* mqttclient_mutex must be locked when you call this function, if multi threaded * mqttclient_mutex must be locked when you call this function, if multi threaded
*/ */
int MQTTClient_disconnect_internal(MQTTClient handle, int timeout) static int MQTTClient_disconnect_internal(MQTTClient handle, int timeout)
{ {
return MQTTClient_disconnect1(handle, timeout, 1, 1); return MQTTClient_disconnect1(handle, timeout, 1, 1);
} }
...@@ -1572,7 +1572,7 @@ exit: ...@@ -1572,7 +1572,7 @@ exit:
} }
void MQTTClient_retry(void) static void MQTTClient_retry(void)
{ {
time_t now; time_t now;
...@@ -1590,7 +1590,7 @@ void MQTTClient_retry(void) ...@@ -1590,7 +1590,7 @@ void MQTTClient_retry(void)
} }
MQTTPacket* MQTTClient_cycle(int* sock, unsigned long timeout, int* rc) static MQTTPacket* MQTTClient_cycle(int* sock, unsigned long timeout, int* rc)
{ {
struct timeval tp = {0L, 0L}; struct timeval tp = {0L, 0L};
static Ack ack; static Ack ack;
...@@ -1671,7 +1671,7 @@ MQTTPacket* MQTTClient_cycle(int* sock, unsigned long timeout, int* rc) ...@@ -1671,7 +1671,7 @@ MQTTPacket* MQTTClient_cycle(int* sock, unsigned long timeout, int* rc)
} }
MQTTPacket* MQTTClient_waitfor(MQTTClient handle, int packet_type, int* rc, long timeout) static MQTTPacket* MQTTClient_waitfor(MQTTClient handle, int packet_type, int* rc, long timeout)
{ {
MQTTPacket* pack = NULL; MQTTPacket* pack = NULL;
MQTTClients* m = handle; MQTTClients* m = handle;
...@@ -1857,7 +1857,7 @@ exit: ...@@ -1857,7 +1857,7 @@ exit:
} }
int pubCompare(void* a, void* b) static int pubCompare(void* a, void* b)
{ {
Messages* msg = (Messages*)a; Messages* msg = (Messages*)a;
return msg->publish == (Publications*)b; return msg->publish == (Publications*)b;
...@@ -1989,7 +1989,7 @@ MQTTClient_nameValue* MQTTClient_getVersionInfo(void) ...@@ -1989,7 +1989,7 @@ MQTTClient_nameValue* MQTTClient_getVersionInfo(void)
* Cleaning up means removing any publication data that was stored because the write did * Cleaning up means removing any publication data that was stored because the write did
* not originally complete. * not originally complete.
*/ */
void MQTTProtocol_checkPendingWrites(void) static void MQTTProtocol_checkPendingWrites(void)
{ {
FUNC_ENTRY; FUNC_ENTRY;
if (state.pending_writes.count > 0) if (state.pending_writes.count > 0)
...@@ -2012,7 +2012,7 @@ void MQTTProtocol_checkPendingWrites(void) ...@@ -2012,7 +2012,7 @@ void MQTTProtocol_checkPendingWrites(void)
} }
void MQTTClient_writeComplete(int socket) static void MQTTClient_writeComplete(int socket)
{ {
ListElement* found = NULL; ListElement* found = NULL;
......
...@@ -86,8 +86,8 @@ pf new_packets[] = ...@@ -86,8 +86,8 @@ pf new_packets[] =
}; };
char* readUTFlen(char** pptr, char* enddata, int* len); static char* readUTFlen(char** pptr, char* enddata, int* len);
int MQTTPacket_send_ack(int type, int msgid, int dup, networkHandles *net); static int MQTTPacket_send_ack(int type, int msgid, int dup, networkHandles *net);
/** /**
* Reads one MQTT packet from a socket. * Reads one MQTT packet from a socket.
...@@ -349,7 +349,7 @@ int readInt(char** pptr) ...@@ -349,7 +349,7 @@ int readInt(char** pptr)
* have caused an overrun. * have caused an overrun.
* *
*/ */
char* readUTFlen(char** pptr, char* enddata, int* len) static char* readUTFlen(char** pptr, char* enddata, int* len)
{ {
char* string = NULL; char* string = NULL;
...@@ -530,7 +530,7 @@ void MQTTPacket_freePublish(Publish* pack) ...@@ -530,7 +530,7 @@ void MQTTPacket_freePublish(Publish* pack)
* @param net the network handle to send the data to * @param net the network handle to send the data to
* @return the completion code (e.g. TCPSOCKET_COMPLETE) * @return the completion code (e.g. TCPSOCKET_COMPLETE)
*/ */
int MQTTPacket_send_ack(int type, int msgid, int dup, networkHandles *net) static int MQTTPacket_send_ack(int type, int msgid, int dup, networkHandles *net)
{ {
Header header; Header header;
int rc; int rc;
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
#include "Heap.h" #include "Heap.h"
MQTTPersistence_qEntry* MQTTPersistence_restoreQueueEntry(char* buffer, size_t buflen); static MQTTPersistence_qEntry* MQTTPersistence_restoreQueueEntry(char* buffer, size_t buflen);
void MQTTPersistence_insertInSeqOrder(List* list, MQTTPersistence_qEntry* qEntry, size_t size); static void MQTTPersistence_insertInSeqOrder(List* list, MQTTPersistence_qEntry* qEntry, size_t size);
/** /**
* Creates a ::MQTTClient_persistence structure representing a persistence implementation. * Creates a ::MQTTClient_persistence structure representing a persistence implementation.
...@@ -538,7 +538,7 @@ int MQTTPersistence_persistQueueEntry(Clients* aclient, MQTTPersistence_qEntry* ...@@ -538,7 +538,7 @@ int MQTTPersistence_persistQueueEntry(Clients* aclient, MQTTPersistence_qEntry*
} }
MQTTPersistence_qEntry* MQTTPersistence_restoreQueueEntry(char* buffer, size_t buflen) static MQTTPersistence_qEntry* MQTTPersistence_restoreQueueEntry(char* buffer, size_t buflen)
{ {
MQTTPersistence_qEntry* qe = NULL; MQTTPersistence_qEntry* qe = NULL;
char* ptr = buffer; char* ptr = buffer;
...@@ -584,7 +584,7 @@ MQTTPersistence_qEntry* MQTTPersistence_restoreQueueEntry(char* buffer, size_t b ...@@ -584,7 +584,7 @@ MQTTPersistence_qEntry* MQTTPersistence_restoreQueueEntry(char* buffer, size_t b
} }
void MQTTPersistence_insertInSeqOrder(List* list, MQTTPersistence_qEntry* qEntry, size_t size) static void MQTTPersistence_insertInSeqOrder(List* list, MQTTPersistence_qEntry* qEntry, size_t size)
{ {
ListElement* index = NULL; ListElement* index = NULL;
ListElement* current = NULL; ListElement* current = NULL;
......
...@@ -45,13 +45,13 @@ extern MQTTProtocol state; ...@@ -45,13 +45,13 @@ extern MQTTProtocol state;
extern ClientStates* bstate; extern ClientStates* bstate;
void MQTTProtocol_storeQoS0(Clients* pubclient, Publish* publish); static void MQTTProtocol_storeQoS0(Clients* pubclient, Publish* publish);
int MQTTProtocol_startPublishCommon( static int MQTTProtocol_startPublishCommon(
Clients* pubclient, Clients* pubclient,
Publish* publish, Publish* publish,
int qos, int qos,
int retained); int retained);
void MQTTProtocol_retries(time_t now, Clients* client, int regardless); static void MQTTProtocol_retries(time_t now, Clients* client, int regardless);
/** /**
* List callback function for comparing Message structures by message id * List callback function for comparing Message structures by message id
...@@ -95,7 +95,7 @@ int MQTTProtocol_assignMsgId(Clients* client) ...@@ -95,7 +95,7 @@ int MQTTProtocol_assignMsgId(Clients* client)
} }
void MQTTProtocol_storeQoS0(Clients* pubclient, Publish* publish) static void MQTTProtocol_storeQoS0(Clients* pubclient, Publish* publish)
{ {
int len; int len;
pending_write* pw = NULL; pending_write* pw = NULL;
...@@ -123,7 +123,7 @@ void MQTTProtocol_storeQoS0(Clients* pubclient, Publish* publish) ...@@ -123,7 +123,7 @@ void MQTTProtocol_storeQoS0(Clients* pubclient, Publish* publish)
* @param retained boolean - whether to set the MQTT retained flag * @param retained boolean - whether to set the MQTT retained flag
* @return the completion code * @return the completion code
*/ */
int MQTTProtocol_startPublishCommon(Clients* pubclient, Publish* publish, int qos, int retained) static int MQTTProtocol_startPublishCommon(Clients* pubclient, Publish* publish, int qos, int retained)
{ {
int rc = TCPSOCKET_COMPLETE; int rc = TCPSOCKET_COMPLETE;
...@@ -558,7 +558,7 @@ void MQTTProtocol_keepalive(time_t now) ...@@ -558,7 +558,7 @@ void MQTTProtocol_keepalive(time_t now)
* @param client - the client to which to apply the retry processing * @param client - the client to which to apply the retry processing
* @param regardless boolean - retry packets regardless of retry interval (used on reconnect) * @param regardless boolean - retry packets regardless of retry interval (used on reconnect)
*/ */
void MQTTProtocol_retries(time_t now, Clients* client, int regardless) static void MQTTProtocol_retries(time_t now, Clients* client, int regardless)
{ {
ListElement* outcurrent = NULL; ListElement* outcurrent = NULL;
......
...@@ -64,7 +64,7 @@ valid_ranges[] = ...@@ -64,7 +64,7 @@ valid_ranges[] =
}; };
const char* UTF8_char_validate(int len, const char* data); static const char* UTF8_char_validate(int len, const char* data);
/** /**
...@@ -73,7 +73,7 @@ const char* UTF8_char_validate(int len, const char* data); ...@@ -73,7 +73,7 @@ const char* UTF8_char_validate(int len, const char* data);
* @param data the bytes to check for a valid UTF-8 char * @param data the bytes to check for a valid UTF-8 char
* @return pointer to the start of the next UTF-8 character in "data" * @return pointer to the start of the next UTF-8 character in "data"
*/ */
const char* UTF8_char_validate(int len, const char* data) static const char* UTF8_char_validate(int len, const char* data)
{ {
int good = 0; int good = 0;
int charlen = 2; int charlen = 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment