mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-02-22 21:43:07 +01:00
Formatting
This commit is contained in:
parent
476f7121c3
commit
d346179137
|
|
@ -30,6 +30,7 @@ static int packet_data_remaining = 0;
|
|||
extern "C" {
|
||||
#include "mosquitto_broker_internal.h"
|
||||
|
||||
|
||||
ssize_t net__read(struct mosquitto *mosq, void *buf, size_t count)
|
||||
{
|
||||
int res = count < packet_data_remaining?count:packet_data_remaining;
|
||||
|
|
@ -38,6 +39,7 @@ ssize_t net__read(struct mosquitto *mosq, void *buf, size_t count)
|
|||
return res;
|
||||
}
|
||||
|
||||
|
||||
int net__socket_get_address(mosq_sock_t sock, char *buf, size_t len, uint16_t *remote_port)
|
||||
{
|
||||
snprintf(buf, len, "localhost");
|
||||
|
|
@ -45,6 +47,7 @@ int net__socket_get_address(mosq_sock_t sock, char *buf, size_t len, uint16_t *r
|
|||
return MOSQ_ERR_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int http__context_init(struct mosquitto *context)
|
||||
{
|
||||
context->transport = mosq_t_http;
|
||||
|
|
@ -52,6 +55,7 @@ int http__context_init(struct mosquitto *context)
|
|||
return MOSQ_ERR_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int log__printf(struct mosquitto *mosq, unsigned int priority, const char *fmt, ...)
|
||||
{
|
||||
return MOSQ_ERR_SUCCESS;
|
||||
|
|
@ -62,8 +66,8 @@ int log__printf(struct mosquitto *mosq, unsigned int priority, const char *fmt,
|
|||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
{
|
||||
struct mosquitto context{};
|
||||
struct mosquitto__listener listener{};
|
||||
struct mosquitto context {};
|
||||
struct mosquitto__listener listener {};
|
||||
|
||||
packet_data = data;
|
||||
packet_data_pos = 0;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ static int packet_data_remaining = 0;
|
|||
extern "C" {
|
||||
#include "mosquitto_broker_internal.h"
|
||||
|
||||
|
||||
ssize_t net__read(struct mosquitto *mosq, void *buf, size_t count)
|
||||
{
|
||||
int res = count < packet_data_remaining?count:packet_data_remaining;
|
||||
|
|
@ -38,6 +39,7 @@ ssize_t net__read(struct mosquitto *mosq, void *buf, size_t count)
|
|||
return res;
|
||||
}
|
||||
|
||||
|
||||
int http__context_init(struct mosquitto *context)
|
||||
{
|
||||
context->transport = mosq_t_http;
|
||||
|
|
@ -45,6 +47,7 @@ int http__context_init(struct mosquitto *context)
|
|||
return MOSQ_ERR_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int log__printf(struct mosquitto *mosq, unsigned int priority, const char *fmt, ...)
|
||||
{
|
||||
return MOSQ_ERR_SUCCESS;
|
||||
|
|
@ -55,8 +58,8 @@ int log__printf(struct mosquitto *mosq, unsigned int priority, const char *fmt,
|
|||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
{
|
||||
struct mosquitto context{};
|
||||
struct mosquitto__listener listener{};
|
||||
struct mosquitto context {};
|
||||
struct mosquitto__listener listener {};
|
||||
|
||||
packet_data = data;
|
||||
packet_data_pos = 0;
|
||||
|
|
|
|||
|
|
@ -395,6 +395,8 @@ static int read_header(struct mosquitto *mosq, ssize_t (*func_read)(struct mosqu
|
|||
|
||||
|
||||
#ifdef WITH_BROKER
|
||||
|
||||
|
||||
static int packet__check_in_packet_oversize(struct mosquitto *mosq)
|
||||
{
|
||||
switch(mosq->in_packet.command & 0xF0){
|
||||
|
|
|
|||
|
|
@ -956,7 +956,7 @@ void service_uninstall(char *name);
|
|||
void service_run(char *name);
|
||||
|
||||
#ifdef WIN32
|
||||
DWORD WINAPI SigThreadProc(void* data);
|
||||
DWORD WINAPI SigThreadProc(void *data);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,13 @@
|
|||
#include "mosquitto/mqtt_protocol.h"
|
||||
#include "property_common.h"
|
||||
|
||||
|
||||
//int mosquitto_base64_encode(const unsigned char *in, size_t in_len, char **encoded);
|
||||
|
||||
|
||||
//int mosquitto_base64_decode(const char *in, unsigned char **decoded, unsigned int *decoded_len);
|
||||
|
||||
|
||||
static void check_encode(const char *input, size_t in_len, const char *expected_output)
|
||||
{
|
||||
char *encoded;
|
||||
|
|
|
|||
Loading…
Reference in a new issue