summaryrefslogtreecommitdiff
path: root/src/urtc.c
diff options
context:
space:
mode:
authorMatt Durgavich <matthew.durgavich@unity3d.com>2022-09-24 22:04:54 -0700
committerChris Hiszpanski <chris@liburtc.org>2022-09-24 22:06:25 -0700
commit97b0ebc80fa6c975dac3df7ddf3d3158db342366 (patch)
treeb19a6c1fecbcaec627a0d0ad76340ac71bcfcc4d /src/urtc.c
parent838d2b41ab43ed4779c65f8bf65999f21f59ace5 (diff)
Logging fixesHEADmaster
Signed-off-by: Chris Hiszpanski <chris@liburtc.org>
Diffstat (limited to 'src/urtc.c')
-rw-r--r--src/urtc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/urtc.c b/src/urtc.c
index 7cbf790..e111999 100644
--- a/src/urtc.c
+++ b/src/urtc.c
@@ -212,17 +212,17 @@ static int socket_event_handler(struct peerconn *pc) {
// rtp
if ((127 < buffer[0]) && (buffer[0] < 192)) {
- log(INFO, "[rtp] %s", inet_ntoa(ra.sin_addr));
+ urtc_log(URTC_INFO, "[rtp] %s", inet_ntoa(ra.sin_addr));
rtp_handler(pc, buffer, n);
} else
// dtls
if ((19 < buffer[0]) && (buffer[0] < 64)) {
- log(INFO, "[dtls] %s", inet_ntoa(ra.sin_addr));
+ urtc_log(URTC_INFO, "[dtls] %s", inet_ntoa(ra.sin_addr));
dtls_handler(pc, buffer, n);
} else
// stun
if (buffer[0] < 2) {
- log(INFO, "[stun] %s", inet_ntoa(ra.sin_addr));
+ urtc_log(URTC_INFO, "[stun] %s", inet_ntoa(ra.sin_addr));
stun_handler(pc, buffer, n);
}
@@ -265,7 +265,7 @@ static int mdns_handler(struct peerconn *pc) {
NULL,
NULL
), -1 == n) {
- log(ERROR, "%s", strerror(errno));
+ urtc_log(URTC_ERROR, "%s", strerror(errno));
goto _fail_recvfrom;
}
@@ -273,12 +273,12 @@ static int mdns_handler(struct peerconn *pc) {
int type = mdns_validate_query(buffer, n, pc->mdns.hostname);
if (type > 0) {
if (type | TYPE_A) {
- log(DEBUG, "[mdns] received A query");
+ urtc_log(URTC_DEBUG, "[mdns] received A query");
// ...respond to query with interface addresses
mdns_send_response(pc->mdns.sockfd, pc->mdns.hostname);
}
if (type | TYPE_AAAA) {
- log(DEBUG, "[mdns] received AAAA query");
+ urtc_log(URTC_DEBUG, "[mdns] received AAAA query");
}
}
@@ -385,7 +385,7 @@ urtc_peerconn_t * urtc_peerconn_create(const char *stun[]) {
// generate a unique local mDNS hostname
uuid_create_str(pc->mdns.hostname);
- log(INFO, "mDNS hostname is %s.local", pc->mdns.hostname);
+ urtc_log(URTC_INFO, "mDNS hostname is %s.local", pc->mdns.hostname);
// open multicast udp socket for replying to mDNS queries
pc->mdns.sockfd = mdns_subscribe();