iwd.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: eNV25 <env252525@gmail.com>
To: iwd@lists.linux.dev
Cc: eNV25 <env252525@gmail.com>
Subject: [PATCH 1/2] client: fix spurious newlines in station show
Date: Wed,  2 Nov 2022 14:51:55 +0530	[thread overview]
Message-ID: <20221102092156.71357-1-env252525@gmail.com> (raw)

This change removes duplicated calls to display_table_footer(), in
station show.

Before this change, the bug caused an extra newline to be output every
time the table updated. This only occurred when the network was
disconnected.

    $ iwctl
    [iwd]# station wlan0 show

---
 client/station.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/client/station.c b/client/station.c
index b070807b..1d958ef2 100644
--- a/client/station.c
+++ b/client/station.c
@@ -217,15 +217,9 @@ static void display_station(const char *device_name,
 			47, network_get_name(station->connected_network));
 
 		display_addresses(device_name);
-
-		/*
-		 * If connected the diagnostic interface is presumably up so
-		 * don't add the table footer just yet.
-		 */
-		return;
 	}
 
-	display_table_footer();
+	/* The table footer is handled by cmd_show. */
 }
 
 static void display_station_inline(const char *margin, const void *data)
-- 
2.38.1


             reply	other threads:[~2022-11-02  9:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02  9:21 eNV25 [this message]
2022-11-02  9:21 ` [PATCH 2/2] gitignore: add .cache eNV25
2022-11-02 18:59 ` [PATCH 1/2] client: fix spurious newlines in station show James Prestwood
2022-11-02 19:59 ` Denis Kenzior
2022-11-02 20:13   ` eNV25

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=20221102092156.71357-1-env252525@gmail.com \
    --to=env252525@gmail.com \
    --cc=iwd@lists.linux.dev \
    /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).