From 8e696bb9f0ce4ecfd7918bb3cdde6ff057807724 Mon Sep 17 00:00:00 2001 From: Richard Aas Date: Thu, 22 Dec 2011 07:53:40 +0000 Subject: [PATCH] sipevent: remove printf's --- src/sipevent/listen.c | 7 ------- src/sipevent/notify.c | 13 ------------- src/sipevent/subscribe.c | 15 --------------- 3 files changed, 35 deletions(-) diff --git a/src/sipevent/listen.c b/src/sipevent/listen.c index 3ea3a5a..1ef0d82 100644 --- a/src/sipevent/listen.c +++ b/src/sipevent/listen.c @@ -169,8 +169,6 @@ static void notify_handler(struct sipevent_sock *sock, return; } - re_printf("*** new subscription forked from NOTIFY\n"); - sub = fsub; } else { @@ -179,8 +177,6 @@ static void notify_handler(struct sipevent_sock *sock, (void)sip_reply(sip, msg, 500, strerror(err)); return; } - - re_printf("*** dialog established from NOTIFY\n"); } } else { @@ -201,9 +197,6 @@ static void notify_handler(struct sipevent_sock *sock, } } - re_printf("notify: %s (%r)\n", sipevent_substate_name(state.state), - &state.params); - switch (state.state) { case SIPEVENT_ACTIVE: diff --git a/src/sipevent/notify.c b/src/sipevent/notify.c index 007815f..0e0059e 100644 --- a/src/sipevent/notify.c +++ b/src/sipevent/notify.c @@ -3,7 +3,6 @@ * * Copyright (C) 2010 Creytiv.com */ -#include // todo: remove #include #include #include @@ -102,8 +101,6 @@ static void tmr_handler(void *arg) if (not->terminated) return; - re_printf("subscription expired\n"); - sipnot_terminate(not, ETIMEDOUT, NULL, SIPEVENT_TIMEOUT); } @@ -112,8 +109,6 @@ void sipnot_refresh(struct sipnot *not, uint32_t expires) { not->expires = min(expires, not->expires_max); - re_printf("will expire in %u secs\n", not->expires); - tmr_start(¬->tmr, not->expires * 1000, tmr_handler, not); } @@ -122,11 +117,6 @@ static void response_handler(int err, const struct sip_msg *msg, void *arg) { struct sipnot *not = arg; - if (err) - re_printf("notify reply: %s\n", strerror(err)); - else - re_printf("notify reply: %u %r\n", msg->scode, &msg->reason); - if (err) { if (err == ETIMEDOUT) not->subscribed = false; @@ -178,7 +168,6 @@ static void response_handler(int err, const struct sip_msg *msg, void *arg) sipnot_terminate(not, err, msg, -1); } else if (not->notify_pending) { - re_printf("sending queued request\n"); (void)notify_request(not, true); } } @@ -277,12 +266,10 @@ static int notify_request(struct sipnot *not, bool reset_ls) int sipnot_notify(struct sipnot *not) { if (not->expires == 0) { - re_printf("NOTIFY will be sent at timeout\n"); return 0; } if (not->req) { - re_printf("waiting for previous request to complete\n"); not->notify_pending = true; return 0; } diff --git a/src/sipevent/subscribe.c b/src/sipevent/subscribe.c index 58fc0f1..3f17a42 100644 --- a/src/sipevent/subscribe.c +++ b/src/sipevent/subscribe.c @@ -3,7 +3,6 @@ * * Copyright (C) 2010 Creytiv.com */ -#include // todo: remove #include #include #include @@ -107,8 +106,6 @@ static void notify_timeout_handler(void *arg) { struct sipsub *sub = arg; - re_printf("timeout waiting for NOTIFY\n"); - sub->termwait = false; if (sub->terminated) @@ -140,8 +137,6 @@ static void tmr_handler(void *arg) void sipsub_reschedule(struct sipsub *sub, uint64_t wait) { - re_printf("will re-subscribe in %llu secs\n", wait/1000); - tmr_start(&sub->tmr, wait, tmr_handler, sub); } @@ -166,11 +161,6 @@ static void response_handler(int err, const struct sip_msg *msg, void *arg) const struct sip_hdr *minexp; struct sipsub *sub = arg; - if (err) - re_printf("reply: %s\n", strerror(err)); - else - re_printf("reply: %u %r\n", msg->scode, &msg->reason); - if (err || sip_request_loops(&sub->ls, msg->scode)) goto out; @@ -191,8 +181,6 @@ static void response_handler(int err, const struct sip_msg *msg, void *arg) err = sub->forkh(&fsub, sub, msg, sub->arg); if (err) return; - - re_printf("*** new subscription forked\n"); } else { (void)sip_dialog_update(fsub->dlg, msg); @@ -207,8 +195,6 @@ static void response_handler(int err, const struct sip_msg *msg, void *arg) sub->subscribed = false; goto out; } - - re_printf("*** dialog established\n"); } else { /* Ignore 2xx responses for other dialogs @@ -226,7 +212,6 @@ static void response_handler(int err, const struct sip_msg *msg, void *arg) if (!sub->expires && !sub->termconf) { - re_printf("waiting for last NOTIFY\n"); tmr_start(&sub->tmr, NOTIFY_TIMEOUT, notify_timeout_handler, sub); sub->termwait = true;