From 118b808207636f6bcfb9ec4a96a130c2fec921df Mon Sep 17 00:00:00 2001 From: Sergey Dryabzhinsky Date: Thu, 24 Dec 2015 14:43:37 +0300 Subject: [PATCH] Update: - use arg-count-named debug functions - fix void result use --- ngx_rtmp_send.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/ngx_rtmp_send.c b/ngx_rtmp_send.c index 817273d..31d4b18 100644 --- a/ngx_rtmp_send.c +++ b/ngx_rtmp_send.c @@ -603,10 +603,10 @@ ngx_rtmp_create_redirect_status(ngx_rtmp_session_t *s, char *callMethod, char *d static double dtrans; static double dcode; - ngx_log_debug(NGX_LOG_DEBUG, s->connection->log, 0, + ngx_log_debug0(NGX_LOG_DEBUG, s->connection->log, 0, "create redirect status: got data"); - ngx_log_debug(NGX_LOG_DEBUG, s->connection->log, 0, + ngx_log_debug5(NGX_LOG_DEBUG, s->connection->log, 0, "create redirect status: method='%s', status code='%s' level='%s' " "ex.code=%ui ex.redirect='%s'", callMethod, "NetConnection.Connect.Rejected", "error", 302, to_url.data); @@ -662,7 +662,7 @@ ngx_rtmp_create_redirect_status(ngx_rtmp_session_t *s, char *callMethod, char *d sizeof(out_inf) }, }; - ngx_log_debug(NGX_LOG_DEBUG, s->connection->log, 0, + ngx_log_debug0(NGX_LOG_DEBUG, s->connection->log, 0, "create redirect status: set structure data"); out_elts[0].data = callMethod; @@ -708,7 +708,7 @@ ngx_rtmp_create_close_method(ngx_rtmp_session_t *s, char *methodName) &dtrans, 0 }, }; - ngx_log_debug(NGX_LOG_DEBUG, s->connection->log, 0, + ngx_log_debug0(NGX_LOG_DEBUG, s->connection->log, 0, "create close method: set structure data"); out_elts[0].data = methodName; @@ -774,7 +774,7 @@ ngx_rtmp_create_fcpublish(ngx_rtmp_session_t *s, u_char *desc) sizeof(out_inf) }, }; - ngx_log_debug(NGX_LOG_DEBUG, s->connection->log, 0, + ngx_log_debug0(NGX_LOG_DEBUG, s->connection->log, 0, "create: fcpublish - set structure data"); out_inf[2].data = desc; @@ -841,7 +841,7 @@ ngx_rtmp_create_fcunpublish(ngx_rtmp_session_t *s, u_char *desc) sizeof(out_inf) }, }; - ngx_log_debug(NGX_LOG_DEBUG, s->connection->log, 0, + ngx_log_debug0(NGX_LOG_DEBUG, s->connection->log, 0, "create: fcunpublish - set structure data"); out_inf[2].data = desc; @@ -914,13 +914,7 @@ ngx_rtmp_create_fi(ngx_rtmp_session_t *s) trans = 0; - errfl = ngx_gettimeofday(&tv); - - if (errfl) { - ngx_log_debug(NGX_LOG_DEBUG, s->connection->log, 0, - "create: fi - can't get time!"); - return NULL; - } + ngx_gettimeofday(&tv); ngx_libc_localtime((time_t)tv.tv_sec, &tm);