]> source.dussan.org Git - rspamd.git/commitdiff
Do not use __FUNCTION__ as it's unportable.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 8 Jul 2015 13:44:22 +0000 (14:44 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 8 Jul 2015 13:44:22 +0000 (14:44 +0100)
src/libserver/buffer.c
src/libutil/logger.c
src/lua/lua_logger.c
src/smtp_proxy.c

index 1cb09df46f46c9813e2939f63a7902f05739969d..2e41dd94c77a98ad0811f3e4783cc619cdfdded9 100644 (file)
@@ -33,7 +33,7 @@
 #define G_DISPATCHER_ERROR dispatcher_error_quark ()
 #define debug_ip(...) rspamd_conditional_debug (rspamd_main->logger, \
                NULL, \
-               __FUNCTION__, \
+               G_STRFUNC, \
                __VA_ARGS__)
 
 static void dispatcher_cb (gint fd, short what, void *arg);
index cdbbc0154bfac6347360d36aaad958ae3bc8a7fe..5c2670856c72b453e933a3ede3950d96f0e42583 100644 (file)
@@ -226,7 +226,7 @@ rspamd_log_close_priv (rspamd_logger_t *rspamd_log, uid_t uid, gid_t gid)
                                }
                                /* It is safe to use temporary buffer here as it is not static */
                                file_log_function (NULL,
-                                       __FUNCTION__,
+                                       G_STRFUNC,
                                        rspamd_log->cfg->log_level,
                                        tmpbuf,
                                        TRUE,
@@ -628,7 +628,7 @@ file_log_function (const gchar * log_domain,
                                                arg);
                                }
                                file_log_function (log_domain,
-                                       __FUNCTION__,
+                                       G_STRFUNC,
                                        log_level,
                                        tmpbuf,
                                        forced,
@@ -665,7 +665,7 @@ file_log_function (const gchar * log_domain,
                                        rspamd_log->saved_function = NULL;
                                }
                                file_log_function (log_domain,
-                                       __FUNCTION__,
+                                       G_STRFUNC,
                                        log_level,
                                        tmpbuf,
                                        forced,
index 7108c94a3ab07bc0ca75b8ca5fd62b509480015d..dd5d90cc8cc98fdd368e2155a8537b849eaf6717 100644 (file)
@@ -174,14 +174,14 @@ lua_common_log_line (GLogLevelFlags level, lua_State *L, const gchar *msg)
                if (level == G_LOG_LEVEL_DEBUG) {
                        rspamd_conditional_debug (rspamd_main->logger,
                                NULL,
-                               __FUNCTION__,
+                               G_STRFUNC,
                                "%s",
                                msg);
                }
                else {
                        rspamd_common_log_function (rspamd_main->logger,
                                level,
-                               __FUNCTION__,
+                               G_STRFUNC,
                                "%s",
                                msg);
                }
index 281c93b6b8a996d63d5f1a1fcff55855d2b615d6..bb53a7e7d884d2bd19b276db59da06cc1f875a72 100644 (file)
@@ -657,7 +657,7 @@ smtp_dns_cb (struct rdns_reply *reply, void *arg)
                /* Parse reverse reply and start resolve of this ip */
                if (reply->code != RDNS_RC_NOERROR) {
                        rspamd_conditional_debug (rspamd_main->logger,
-                               NULL, __FUNCTION__, "DNS error: %s",
+                               NULL, G_STRFUNC, "DNS error: %s",
                                rdns_strerror (reply->code));
 
                        if (reply->code == RDNS_RC_NXDOMAIN) {
@@ -686,7 +686,7 @@ smtp_dns_cb (struct rdns_reply *reply, void *arg)
        case SMTP_PROXY_STATE_RESOLVE_NORMAL:
                if (reply->code != RDNS_RC_NOERROR) {
                        rspamd_conditional_debug (rspamd_main->logger,
-                               NULL, __FUNCTION__, "DNS error: %s",
+                               NULL, G_STRFUNC, "DNS error: %s",
                                rdns_strerror (reply->code));
 
                        if (reply->code == RDNS_RC_NXDOMAIN) {