Commit fdde8ff4 authored by Pekka Pessi's avatar Pekka Pessi
Browse files

nta.c: fixed problem of reporting resolver error.

darcs-hash:20070222205419-88462-0ffc6a66952d83fd366bef46ee30b51a05c19957.gz
parent cb21ade5
......@@ -8071,7 +8071,8 @@ int outgoing_recv(nta_outgoing_t *orq,
}
else if (orq->orq_method != sip_method_ack) {
/* Non-INVITE */
if (orq->orq_queue == sa->sa_out.trying) {
if (orq->orq_queue == sa->sa_out.trying ||
orq->orq_queue == sa->sa_out.resolving) {
assert(orq_status < 200); (void)orq_status;
if (status < 200) {
......@@ -8086,7 +8087,8 @@ int outgoing_recv(nta_outgoing_t *orq,
msg_destroy(msg);
return 0;
}
} else {
}
else {
/* Already completed or terminated */
assert(orq->orq_queue == sa->sa_out.completed ||
orq->orq_queue == sa->sa_out.terminated);
......
......@@ -713,7 +713,7 @@ static int test_bad_messages(agent_t *ag)
TEST(su_getaddrinfo(host, port, hints, &ai), 0); TEST_1(ai);
s = su_socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); TEST_1(s != -1);
memset(su, 0, sulen = sizeof su);
memset(su, 0, sulen = ai->ai_addrlen);
su->su_len = sizeof su; su->su_family = ai->ai_family;
TEST_1(bind(s, &su->su_sa, sulen) == 0);
TEST_1(getsockname(s, &su->su_sa, &sulen) == 0);
......@@ -733,6 +733,7 @@ static int test_bad_messages(agent_t *ag)
strncpy(name + offset, d->d_name, PATH_MAX - offset);
TEST_1(f = fopen(name, "rb"));
TEST_1((blen = readfile(f, &buffer)) > 0);
fclose(f);
r = buffer;
if (strncmp(r, "JUNK ", 5) == 0) {
......
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