Commit 7f0989e5 authored by Pekka Pessi's avatar Pekka Pessi

Fixed nat testing code.

darcs-hash:20060331152726-88462-45071e5bc303accf2cdf62e9b7ed079f32842843.gz
parent 77e9c23f
......@@ -445,8 +445,6 @@ struct binding *nat_binding_new(struct nat *nat,
if (binding_init(b, protoname, connected, nat->fake, from, fromlen) < 0)
nat_binding_destroy(b), b = NULL;
else
nat_binding_insert(&nat->bindings, b);
return b;
}
......@@ -524,8 +522,6 @@ static int binding_init(struct binding *b,
addr->su_family == AF_INET6 ? "[%s]:%u" : "%s:%u",
ipname, ntohs(addr->su_port));
nat_binding_insert(&nat->bindings, b);
if (su_wait_create(wait, b->in_socket, SU_WAIT_IN) < 0) {
su_perror("nat_binding_new: su_wait_create");
return -1;
......@@ -548,6 +544,8 @@ static int binding_init(struct binding *b,
return -1;
}
nat_binding_insert(&nat->bindings, b);
printf("nat: new %s binding %s <=> %s\n",
protoname, b->in_name, b->out_name);
......
......@@ -1355,6 +1355,7 @@ int test_init(struct context *ctx,
TAG_IF(a_bind != a_bind2, NUTAG_SIPS_URL(a_bind2)),
SOATAG_USER_SDP_STR("m=audio 5004 RTP/AVP 0 8"),
NTATAG_SIP_T1X64(4000),
NUTAG_KEEPALIVE(1),
TAG_END());
TEST_1(ctx->a.nua);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment