Skip to content
Snippets Groups Projects
Commit 55f58e97 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

utils: add filling of local address information string

refs #2137

Change-Id: Ia74b4db57cbe07661f71f69517bc23719dd95ab7
parent 4d0a0667
No related branches found
No related tags found
No related merge requests found
......@@ -248,6 +248,10 @@ int net_connect(net_t *net)
// Bind address to socket if specified.
if (net->local_info != NULL) {
// Set local information string.
get_addr_str((struct sockaddr_storage *)net->local_info->ai_addr,
net->socktype, &net->local_str);
if (bind(sockfd, net->local_info->ai_addr,
net->local_info->ai_addrlen) == -1) {
WARN("can't assign address %s\n", net->local_str);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment