b.a.t.m.a.n.lists.open-mesh.org archive mirror
 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 2/4] alfred: Allow operating without any interface specified
Date: Sun, 02 Jan 2022 20:01:47 +0100	[thread overview]
Message-ID: <2907656.mQGJSZOrAB@rousseau> (raw)
In-Reply-To: <2887321.KE3FGX6OkO@sven-l14>

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

On Sunday, 2 January 2022 15:20:20 CET Sven Eckelmann wrote:
> This now causes the "--force" option (+its storage in the globals data
> structure) to be completely useless. 

Why would global->force be useless ? The alfred_server() function still uses 
the global->force state to determine if globals->mesh_iface is configured 
correctly.


> I would prefer to have this handling still be there when
> !list_empty(&globals->interfaces).

To be honest, I hadn't fully understood what use case global->force is trying 
to address. What do you have in mind ? Checking for list_empty() will require 
alfred to be always started with an interface configured while alfred could be 
used without any interface at all and operate as local data storage between 2 
processes on the same system or the interface could be configured at a later 
time (via unix socket).


> And why is it necessary to not open the sockets on startup when interfaces
> are already given?

The main while loop calls netsock_reopen() in each round which will open all 
necessary sockets (unless I am mistaken). My guess is that this was added when 
the ALFRED_CHANGE_INTERFACE call was added. Therefore, the netsock_open() call 
is somewhat redundant unless alfred is meant to always require an interface at 
startup time and alfred is meant to bail out whenever that configured interface 
isn't available at startup time.

Cheers,
Marek

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

  reply	other threads:[~2022-01-02 19:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-02 11:30 alfred: runtime configuration Marek Lindner
2022-01-02 11:31 ` [PATCH 1/4] alfred: remove meaningless printf() call Marek Lindner
2022-01-02 11:31   ` [PATCH 2/4] alfred: Allow operating without any interface specified Marek Lindner
2022-01-02 14:20     ` Sven Eckelmann
2022-01-02 19:01       ` Marek Lindner [this message]
2022-01-03  8:54         ` Sven Eckelmann
2022-01-02 11:31   ` [PATCH 3/4] alfred: introduce 'change batman-adv interface' IPC call Marek Lindner
2022-01-02 11:31   ` [PATCH 4/4] alfred: introduce 'server status' " Marek Lindner
2022-01-02 14:43     ` Sven Eckelmann
2022-01-12 21:14       ` Marek Lindner
2022-01-20  8:25         ` Sven Eckelmann
2022-01-03  9:09     ` 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=2907656.mQGJSZOrAB@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).