Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NM plugin fixes #13

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nm/src/nm.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,9 @@ _j4status_nm_device_update(J4statusPluginContext *context, J4statusNmSection *se

if ( context->formats.up_wifi_tokens & TOKEN_FLAG_UP_WIFI_SSID )
{
const GByteArray *raw_ssid;
raw_ssid = nm_access_point_get_ssid(section->ap);
data.ssid = g_variant_new_take_string(g_strndup((const gchar *)raw_ssid->data, raw_ssid->len));
GBytes *raw_ssid = nm_access_point_get_ssid(section->ap);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, that’s new from the libnm merge, so you need to say that in the commit message.

data.ssid = g_variant_new_take_string(g_strndup(g_bytes_get_data(raw_ssid, NULL),
g_bytes_get_size(raw_ssid)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: please do not change the style of the code. Here, just make it one (not event that long) line

}
}

Expand Down