mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-19 11:16:32 +00:00
retval fix
This commit is contained in:
parent
e73868bc5a
commit
8189b2ba91
@ -175,7 +175,7 @@ struct shutdown_st
|
|||||||
|
|
||||||
|
|
||||||
/* LWIP error beautification */
|
/* LWIP error beautification */
|
||||||
/*
|
|
||||||
const char *lwiperror(int n)
|
const char *lwiperror(int n)
|
||||||
{
|
{
|
||||||
switch(n)
|
switch(n)
|
||||||
@ -216,6 +216,6 @@ const char *lwiperror(int n)
|
|||||||
return "UNKNOWN_RET_VAL";
|
return "UNKNOWN_RET_VAL";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -652,6 +652,7 @@ void NetconEthernetTap::handle_retval(NetconClient *client, unsigned char* buf)
|
|||||||
{
|
{
|
||||||
if(client->unmapped_conn != NULL) {
|
if(client->unmapped_conn != NULL) {
|
||||||
memcpy(&(client->unmapped_conn->their_fd), &buf[1], sizeof(int));
|
memcpy(&(client->unmapped_conn->their_fd), &buf[1], sizeof(int));
|
||||||
|
client->connections.push_back(client->unmapped_conn);
|
||||||
client->unmapped_conn = NULL;
|
client->unmapped_conn = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -703,6 +704,7 @@ void NetconEthernetTap::handle_connect(NetconClient *client, struct connect_st*
|
|||||||
// that's it!
|
// that's it!
|
||||||
// - Most instances of a retval for a connect() should happen
|
// - Most instances of a retval for a connect() should happen
|
||||||
// in the nc_connect() and nc_err() callbacks!
|
// in the nc_connect() and nc_err() callbacks!
|
||||||
|
fprintf(stderr, "failed to connect: %s\n", lwiperror(err));
|
||||||
send_return_value(client, err);
|
send_return_value(client, err);
|
||||||
}
|
}
|
||||||
// Everything seems to be ok, but we don't have enough info to retval
|
// Everything seems to be ok, but we don't have enough info to retval
|
||||||
|
Loading…
Reference in New Issue
Block a user