Fix bind ip
This commit is contained in:
parent
a3d2b4a4b0
commit
bef129da85
3 changed files with 4 additions and 4 deletions
|
@ -106,7 +106,7 @@ void donar_client(struct donar_client_ctx* ctx, struct donar_params* dp) {
|
|||
for (int i = 0; i < dp->exposed_ports->len; i++) {
|
||||
init_udp_exposed(dp->bound_ip, g_ptr_array_index (dp->exposed_ports, i), &(ctx->evts));
|
||||
}
|
||||
printf("--- Local UDP services are exposed\n");
|
||||
printf("--- Local UDP services (on %s) are exposed\n", dp->bound_ip);
|
||||
|
||||
evt_core_loop(&(ctx->evts));
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ void init_udp_exposed(char* bound_ip, char* port, struct evt_core_ctx* evts) {
|
|||
fdinfo.free_other = free_udp_t;
|
||||
fdinfo.other = udp_t;
|
||||
|
||||
sock1 = create_udp_client ("127.0.0.1", port);
|
||||
sock1 = create_udp_client (bound_ip, port);
|
||||
if (sock1 < 0) goto socket_failed;
|
||||
sock2 = dup(sock1);
|
||||
if (sock2 < 0) goto socket_failed;
|
||||
|
@ -153,7 +153,7 @@ void donar_init_params(struct donar_params* dp) {
|
|||
dp->is_healing = 0;
|
||||
dp->is_waiting_bootstrap = 0;
|
||||
dp->errored = 0;
|
||||
dp->links = 2;
|
||||
dp->links = 8;
|
||||
dp->fresh_data = 1;
|
||||
dp->redundant_data = 0;
|
||||
dp->remote_ports = g_ptr_array_new_with_free_func (free_port);
|
||||
|
|
|
@ -85,7 +85,7 @@ void donar_server(struct donar_server_ctx* ctx, struct donar_params* dp) {
|
|||
for (int i = 0; i < dp->exposed_ports->len; i++) {
|
||||
init_udp_exposed(dp->bound_ip, g_ptr_array_index (dp->exposed_ports, i), &(ctx->evts));
|
||||
}
|
||||
printf("--- Local UDP services are exposed\n");
|
||||
printf("--- Local UDP services (on %s) are exposed\n", dp->bound_ip);
|
||||
|
||||
evt_core_loop (&(ctx->evts));
|
||||
|
||||
|
|
Loading…
Reference in a new issue