mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 05:07:56 +00:00
Fix reading port number
This commit is contained in:
parent
abd804dd0c
commit
10ce16e1f3
2
log.c
2
log.c
@ -397,7 +397,6 @@ ssize_t get_self_executable_path(char *buf, size_t len)
|
||||
|
||||
int log_backtrace(struct __sourceloc whence)
|
||||
{
|
||||
#if 0
|
||||
open_logging();
|
||||
char execpath[MAXPATHLEN];
|
||||
if (get_self_executable_path(execpath, sizeof execpath) == -1)
|
||||
@ -495,6 +494,5 @@ int log_backtrace(struct __sourceloc whence)
|
||||
strbuf_append_exit_status(b, status);
|
||||
logMessage(LOG_LEVEL_DEBUG, __NOWHERE__, "gdb %s", buf);
|
||||
unlink(tempfile);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ int load_subscriber_address(struct subscriber *subscriber){
|
||||
}
|
||||
|
||||
snprintf(buff, sizeof(buff), "%s.port", sid_hex);
|
||||
addr.sin_port = confValueGetInt64Range(buff, PORT_DNA, 1, 65535);
|
||||
addr.sin_port = htons(confValueGetInt64Range(buff, PORT_DNA, 1, 65535));
|
||||
|
||||
return overlay_send_probe(subscriber, addr, interface);
|
||||
}
|
||||
|
@ -345,7 +345,7 @@ int overlay_send_probe(struct subscriber *peer, struct sockaddr_in addr, overlay
|
||||
op_free(frame);
|
||||
return -1;
|
||||
}
|
||||
DEBUGF("Queued probe packet on interface %s", interface->name);
|
||||
DEBUGF("Queued probe packet on interface %s to %s", interface->name, inet_ntoa(addr.sin_addr));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user