Initialize variables in protocol_edge.c
This commit is contained in:
parent
fb1a8fd631
commit
932dc76f43
1 changed files with 4 additions and 1 deletions
|
@ -70,10 +70,13 @@ bool add_edge_h(connection_t *c, const char *request) {
|
||||||
char to_port[MAX_STRING_SIZE];
|
char to_port[MAX_STRING_SIZE];
|
||||||
char address_local[MAX_STRING_SIZE];
|
char address_local[MAX_STRING_SIZE];
|
||||||
char port_local[MAX_STRING_SIZE];
|
char port_local[MAX_STRING_SIZE];
|
||||||
sockaddr_t address, local_address = {{0}};
|
sockaddr_t address, local_address;
|
||||||
uint32_t options;
|
uint32_t options;
|
||||||
int weight;
|
int weight;
|
||||||
|
|
||||||
|
memset(&address, 0x0, sizeof(sockaddr_t));
|
||||||
|
memset(&local_address, 0x0, sizeof(sockaddr_t));
|
||||||
|
|
||||||
int parameter_count = sscanf(request, "%*d %*x "MAX_STRING" "MAX_STRING" "MAX_STRING" "MAX_STRING" %x %d "MAX_STRING" "MAX_STRING,
|
int parameter_count = sscanf(request, "%*d %*x "MAX_STRING" "MAX_STRING" "MAX_STRING" "MAX_STRING" %x %d "MAX_STRING" "MAX_STRING,
|
||||||
from_name, to_name, to_address, to_port, &options, &weight, address_local, port_local);
|
from_name, to_name, to_address, to_port, &options, &weight, address_local, port_local);
|
||||||
if (parameter_count != 6 && parameter_count != 8) {
|
if (parameter_count != 6 && parameter_count != 8) {
|
||||||
|
|
Loading…
Reference in a new issue