All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Lindner <mareklindner@neomailbox.ch>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Sven Eckelmann <sven@narfation.org>
Subject: Re: [PATCH] alfred: notify event listener via unix socket
Date: Sun, 01 May 2022 11:10:13 +0200	[thread overview]
Message-ID: <1831000.Ehg04xY5OU@rousseau> (raw)
In-Reply-To: <3246469.CvshgyVVUE@sven-l14>

[-- Attachment #1: Type: text/plain, Size: 1418 bytes --]

On Sunday, 1 May 2022 09:54:26 CEST Sven Eckelmann wrote:
> >  	printf("\n");
> >  	printf("server mode options:\n");
> >  	printf("  -i, --interface                     specify the interface 
(or
> >  	comma separated list of interfaces) to listen on\n");> 
> > @@ -164,6 +165,7 @@ static struct globals *alfred_init(int argc, char
> > *argv[])> 
> >  		{"change-interface",	required_argument,	NULL,	
'I'},
> >  		{"change-bat-iface",	required_argument,	NULL,	
'B'},
> >  		{"server-status",	required_argument,	NULL,	'S'},
> > 
> > +		{"event-monitor",	required_argument,	NULL,	'E'},
> 
> Why does it require an argument but the usage doesn't describe the argument?

Copy & paste error from server-status which does not require an argument 
either. Might need to fix in a separate patch.


> I am wondering now if it could be interesting for the listener whether the
> data is from us or some remote (for example via the source mac). Does anyone
> else have an opinion about that?

Currently, no use-case comes to my mind.


> > +static void unix_sock_event_listener_free(struct event_listener
> > *listener)
> > +{
> > +	list_del_init(&listener->list);
> > +	close(listener->fd);
> > +	free(listener);
> 
> list_del_init has no benefit (only downsides) when you free the memory
> anyway at the end of the function

What are those downsides you are referring to ?

Thanks for the review!

Kind regards,
Marek Lindner

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-05-01  9:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-30 10:56 [PATCH] alfred: notify event listener via unix socket Marek Lindner
2022-05-01  7:54 ` Sven Eckelmann
2022-05-01  9:10   ` Marek Lindner [this message]
2022-05-01  9:12     ` Sven Eckelmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1831000.Ehg04xY5OU@rousseau \
    --to=mareklindner@neomailbox.ch \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=sven@narfation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.