[MEDIUM] Enhance message errors management on binds
diff --git a/include/proto/proto_tcp.h b/include/proto/proto_tcp.h
index 1b46d37..c81be9b 100644
--- a/include/proto/proto_tcp.h
+++ b/include/proto/proto_tcp.h
@@ -30,7 +30,6 @@
int tcpv4_bind_socket(int fd, int flags, struct sockaddr_in *local, struct sockaddr_in *remote);
void tcpv4_add_listener(struct listener *listener);
void tcpv6_add_listener(struct listener *listener);
-int tcp_bind_listener(struct listener *listener, char *errmsg, int errlen);
int tcpv4_connect_server(struct stream_interface *si,
struct proxy *be, struct server *srv,
struct sockaddr *srv_addr, struct sockaddr *from_addr);
diff --git a/include/proto/protocols.h b/include/proto/protocols.h
index cd54ec8..d0364c0 100644
--- a/include/proto/protocols.h
+++ b/include/proto/protocols.h
@@ -82,7 +82,7 @@
/* binds all listeneres of all registered protocols. Returns a composition
* of ERR_NONE, ERR_RETRYABLE, ERR_FATAL.
*/
-int protocol_bind_all(void);
+int protocol_bind_all(char *errmsg, int errlen);
/* unbinds all listeners of all registered protocols. They are also closed.
* This must be performed before calling exit() in order to get a chance to
diff --git a/include/types/protocols.h b/include/types/protocols.h
index 64e1c55..3dcb2e7 100644
--- a/include/types/protocols.h
+++ b/include/types/protocols.h
@@ -135,7 +135,8 @@
int (*accept)(int fd); /* generic accept function */
int (*read)(int fd); /* generic read function */
int (*write)(int fd); /* generic write function */
- int (*bind_all)(struct protocol *proto); /* bind all unbound listeners */
+ int (*bind)(struct listener *l, char *errmsg, int errlen); /* bind a listener */
+ int (*bind_all)(struct protocol *proto, char *errmsg, int errlen); /* bind all unbound listeners */
int (*unbind_all)(struct protocol *proto); /* unbind all bound listeners */
int (*enable_all)(struct protocol *proto); /* enable all bound listeners */
int (*disable_all)(struct protocol *proto); /* disable all bound listeners */