diff mbox series

notifier: Don't create 'NotifyServer:' socket

Message ID 47438658-8BEA-4CD2-B90B-9CE404E4163B@siemens.com
State Accepted
Headers show
Series notifier: Don't create 'NotifyServer:' socket | expand

Commit Message

Storm, Christian Dec. 19, 2023, 7:55 a.m. UTC
When attempt == 9, attempt++ makes it 10 so that
'0' + attempt is 0x3A which is ':' ASCII.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
---
 core/notifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Babic Dec. 19, 2023, 2:56 p.m. UTC | #1
On 19.12.23 08:55, 'Storm, Christian' via swupdate wrote:
> When attempt == 9, attempt++ makes it 10 so that
> '0' + attempt is 0x3A which is ':' ASCII.
> 
> Signed-off-by: Christian Storm <christian.storm@siemens.com>
> ---
>   core/notifier.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/core/notifier.c b/core/notifier.c
> index cb9b8626..15220605 100644
> --- a/core/notifier.c
> +++ b/core/notifier.c
> @@ -449,7 +449,7 @@ static void *notifier_thread (void __attribute__ ((__unused__)) *data)
>   		errno = 0;
>   		if (bind(serverfd, (const struct sockaddr *) &notify_server,
>   			sizeof(struct sockaddr_un)) < 0) {
> -			if (errno == EADDRINUSE && attempt < 10) {
> +			if (errno == EADDRINUSE && attempt < 9) {
>   				attempt++;
>   				/*
>   				 * Start increasing the socket as


Applied to -master, thanks !

Best regards,
Stefano
diff mbox series

Patch

diff --git a/core/notifier.c b/core/notifier.c
index cb9b8626..15220605 100644
--- a/core/notifier.c
+++ b/core/notifier.c
@@ -449,7 +449,7 @@  static void *notifier_thread (void __attribute__ ((__unused__)) *data)
 		errno = 0;
 		if (bind(serverfd, (const struct sockaddr *) &notify_server,
 			sizeof(struct sockaddr_un)) < 0) {
-			if (errno == EADDRINUSE && attempt < 10) {
+			if (errno == EADDRINUSE && attempt < 9) {
 				attempt++;
 				/*
 				 * Start increasing the socket as