]> git.kaiwu.me - haproxy.git/commitdiff
[BUG] connect_server: server might not exist when sending error report
authorWilly Tarreau <w@1wt.eu>
Sat, 12 Jan 2008 21:22:34 +0000 (22:22 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 20 Jan 2008 23:28:02 +0000 (00:28 +0100)
In connect_server(), we may send an alert with the server name while
the server might not exist, eg in dispatch mode.

src/backend.c

index 49f294421f7c070479fbfa38005f48d0fa93d452..fc2b1af3a2d743d3e19b16e2e8cb10f1c48f3c4c 100644 (file)
@@ -469,8 +469,8 @@ int connect_server(struct session *s)
                        Alert("Cannot bind to source address before connect() for proxy %s. Aborting.\n", s->be->id);
                        close(fd);
                        send_log(s->be, LOG_EMERG,
-                                "Cannot bind to source address before connect() for server %s/%s.\n",
-                                s->be->id, s->srv->id);
+                                "Cannot bind to source address before connect() for proxy %s.\n",
+                                s->be->id);
                        return SN_ERR_RESOURCE;
                }
 #ifdef CONFIG_HAP_CTTPROXY
@@ -503,8 +503,8 @@ int connect_server(struct session *s)
                                      s->be->id);
                                close(fd);
                                send_log(s->be, LOG_EMERG,
-                                        "Cannot bind to tproxy source address before connect() for server %s/%s.\n",
-                                        s->be->id, s->srv->id);
+                                        "Cannot bind to tproxy source address before connect() for proxy %s.\n",
+                                        s->be->id);
                                return SN_ERR_RESOURCE;
                        }
                }