change stun log levels

pull/23/head
Richard Fuchs 11 years ago
parent ec21806c95
commit 58940b5018

@ -595,8 +595,10 @@ static int stream_packet(struct stream_fd *sfd, str *s, struct sockaddr_in6 *fsi
stun_ret = stun(s, stream, fsin);
if (!stun_ret)
goto done;
if (stun_ret == 1) /* use candidate */
if (stun_ret == 1) {
ilog(LOG_INFO, "STUN: using this candidate");
goto use_cand;
}
else /* not an stun packet */
stun_ret = 0;
}

@ -159,7 +159,7 @@ static int stun_attributes(struct stun_attrs *out, str *s, u_int16_t *unknowns)
break;
default:
ilog(LOG_INFO, "Unknown STUN attribute: 0x%04x", type);
ilog(LOG_NOTICE, "Unknown STUN attribute: 0x%04x", type);
if ((type & 0x8000))
break;
unknowns[uc] = tlv->type;
@ -479,20 +479,20 @@ int stun(str *b, struct packet_stream *ps, struct sockaddr_in6 *sin) {
if (check_auth(b, &attrs, ps->media))
goto unauth;
ilog(LOG_NOTICE, "Successful STUN binding request" SLF, SLP);
ilog(LOG_INFO, "Successful STUN binding request" SLF, SLP);
stun_binding_success(ps->sfd->fd.fd, req, &attrs, sin, ps->media);
return attrs.use ? 1 : 0;
bad_req:
ilog(LOG_INFO, "Received invalid STUN packet" SLF ": %s", SLP, err);
ilog(LOG_NOTICE, "Received invalid STUN packet" SLF ": %s", SLP, err);
stun_error(cm, ps->sfd->fd.fd, sin, req, 400, "Bad request");
return 0;
unauth:
ilog(LOG_INFO, "STUN authentication mismatch" SLF, SLP);
ilog(LOG_NOTICE, "STUN authentication mismatch" SLF, SLP);
stun_error(cm, ps->sfd->fd.fd, sin, req, 401, "Unauthorized");
return 0;
ignore:
ilog(LOG_INFO, "Not handling potential STUN packet" SLF ": %s", SLP, err);
ilog(LOG_NOTICE, "Not handling potential STUN packet" SLF ": %s", SLP, err);
return -1;
}

Loading…
Cancel
Save