<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git, branch th/device-pending-action-bgo777831</title>
<subtitle>gitlab.freedesktop.org: NetworkManager/NetworkManager.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/'/>
<entry>
<title>core: define a full sort order for nm_settings_connection_cmp_timestamp()</title>
<updated>2017-02-09T09:59:13+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-02-05T19:05:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=f966acd9cebc65972533891528a42df2e2b21f83'/>
<id>f966acd9cebc65972533891528a42df2e2b21f83</id>
<content type='text'>
We want to have some guaranteed order when comparing different connections.
So, in case of equal timestamps, proceed with comparing more properties.

It makes sense to consider the autoconnect-priority next.
This is what get_existing_connection() needs, thus we no longer
need to pre-sort the list.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We want to have some guaranteed order when comparing different connections.
So, in case of equal timestamps, proceed with comparing more properties.

It makes sense to consider the autoconnect-priority next.
This is what get_existing_connection() needs, thus we no longer
need to pre-sort the list.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: consolidate sorting of connections by autoconnect/timestamp</title>
<updated>2017-02-09T09:59:13+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-02-05T15:24:27+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=afb85b49d8c7cbdcd23e76af9083d931034b52c5'/>
<id>afb85b49d8c7cbdcd23e76af9083d931034b52c5</id>
<content type='text'>
NMPolicy's auto_activate_device() wants to sort by autoconnect-priority,
nm_utils_cmp_connection_by_autoconnect_priority() but fallback to the default
nm_settings_connection_cmp_default(), which includes the timestamp.

Extend nm_settings_connection_cmp_default() to consider the
autoconnect-priority as well. Thus change behavior so that
nm_settings_connection_cmp_default() is the sort order that
auto_activate_device() wants. That makes sense, as
nm_settings_connection_cmp_default() already considered the
ability to autoconnect as first. Hence, it should also honor
the autoconnect priority.

When doing that, rename nm_settings_connection_cmp_default()
to nm_settings_connection_cmp_autoconnect_priority().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
NMPolicy's auto_activate_device() wants to sort by autoconnect-priority,
nm_utils_cmp_connection_by_autoconnect_priority() but fallback to the default
nm_settings_connection_cmp_default(), which includes the timestamp.

Extend nm_settings_connection_cmp_default() to consider the
autoconnect-priority as well. Thus change behavior so that
nm_settings_connection_cmp_default() is the sort order that
auto_activate_device() wants. That makes sense, as
nm_settings_connection_cmp_default() already considered the
ability to autoconnect as first. Hence, it should also honor
the autoconnect priority.

When doing that, rename nm_settings_connection_cmp_default()
to nm_settings_connection_cmp_autoconnect_priority().
</pre>
</div>
</content>
</entry>
<entry>
<title>core: make nm_utils_cmp_connection_by_autoconnect_priority() more robust</title>
<updated>2017-02-09T09:59:13+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-02-05T18:14:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=c7f71f2740526d40ccca2255ef224651a3ca44fe'/>
<id>c7f71f2740526d40ccca2255ef224651a3ca44fe</id>
<content type='text'>
Check for NULL and unexpected missing NMSettingConnection.
Be more forgiving and accept whatever is there when comparing
@a with @b.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check for NULL and unexpected missing NMSettingConnection.
Be more forgiving and accept whatever is there when comparing
@a with @b.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: refactor nm_manager_get_activatable_connections() to return an array</title>
<updated>2017-02-09T09:59:13+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-02-03T14:13:03+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=8a3b1c2748ec8f29ac9b7855666a494c72a84090'/>
<id>8a3b1c2748ec8f29ac9b7855666a494c72a84090</id>
<content type='text'>
... instead of a GSList.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... instead of a GSList.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: refactor nm_settings_get_connections_sorted() to return array instead of GSList</title>
<updated>2017-02-09T09:59:13+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-02-03T13:15:16+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=45903d5fa4093791f27d0d6e0e3292fce477c804'/>
<id>45903d5fa4093791f27d0d6e0e3292fce477c804</id>
<content type='text'>
We call these functions a lot. A GSList is just the wrong tool for the
job. Refactor the code to use instead a sorted array everywhere.

This means, we malloc() one array for all connections instead
slice-allocate a GSList item for each. Also, sorting an array
is faster then sorting a GSList.
Technically, the GSList implementation had the same big-O runtime
complexity, but using an array is still faster. That is, sorting
an array and a GSList is both O(n*log(n)).

Actually, nm_settings_get_connections_sorted() used
g_slist_insert_sorted() instead of g_slist_sort(). That results
in O(n^2). That could have been fixed to have O(n*log(n)), but
instead refactor the code to use an array.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We call these functions a lot. A GSList is just the wrong tool for the
job. Refactor the code to use instead a sorted array everywhere.

This means, we malloc() one array for all connections instead
slice-allocate a GSList item for each. Also, sorting an array
is faster then sorting a GSList.
Technically, the GSList implementation had the same big-O runtime
complexity, but using an array is still faster. That is, sorting
an array and a GSList is both O(n*log(n)).

Actually, nm_settings_get_connections_sorted() used
g_slist_insert_sorted() instead of g_slist_sort(). That results
in O(n^2). That could have been fixed to have O(n*log(n)), but
instead refactor the code to use an array.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: drop nm_settings_get_best_connections() for new nm_settings_get_connections_clone()</title>
<updated>2017-02-09T09:59:13+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-02-03T11:27:15+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=9f0c13de2c583c2015c99ea1e5d951f53bd5e2ad'/>
<id>9f0c13de2c583c2015c99ea1e5d951f53bd5e2ad</id>
<content type='text'>
nm_settings_get_best_connections() has only one caller: to create
the hidden-SSID list.

Instead of having a highly specialised function (that accepts 3 ways for
filtering -- one of them broken, has one hard-coded way of sorting, and
a @max_requested argument), add a more generic nm_settings_get_connections_clone()
function.

Also invert nm_settings_sort_connections(). The two callers want
to sort descending, not ascending.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
nm_settings_get_best_connections() has only one caller: to create
the hidden-SSID list.

Instead of having a highly specialised function (that accepts 3 ways for
filtering -- one of them broken, has one hard-coded way of sorting, and
a @max_requested argument), add a more generic nm_settings_get_connections_clone()
function.

Also invert nm_settings_sort_connections(). The two callers want
to sort descending, not ascending.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: add and use nm_settings_connection_cmp_default*()</title>
<updated>2017-02-09T09:59:13+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-02-03T15:00:33+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=8403cbd0b06d26de322f9913cd9e4b4fbb218e11'/>
<id>8403cbd0b06d26de322f9913cd9e4b4fbb218e11</id>
<content type='text'>
Only move the function, no change in behavior.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only move the function, no change in behavior.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: add and use nm_settings_connection_cmp_timestamp*()</title>
<updated>2017-02-09T09:59:12+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-02-03T14:45:06+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=b522ec68b24e845c42b3958267409fd496ae592c'/>
<id>b522ec68b24e845c42b3958267409fd496ae592c</id>
<content type='text'>
Only move the function, no change in behavior.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only move the function, no change in behavior.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: add nm_utils_cmp_connection_by_autoconnect_priority_p_with_data() function</title>
<updated>2017-02-09T09:59:12+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-02-03T14:38:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=8ef71fe85c19bd1945352f8d14a74d1416cee8d9'/>
<id>8ef71fe85c19bd1945352f8d14a74d1416cee8d9</id>
<content type='text'>
Have a proper cmp() function and a wrapper *_p_with_data() that can be
used for g_qsort_with_data().

Thus, establish a naming scheme (*_p_with_data()) for these compare
wrappers that we need all over the place. Note, we also have
nm_strcmp_p_with_data() for the same reason and later more such
functions will follow.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Have a proper cmp() function and a wrapper *_p_with_data() that can be
used for g_qsort_with_data().

Thus, establish a naming scheme (*_p_with_data()) for these compare
wrappers that we need all over the place. Note, we also have
nm_strcmp_p_with_data() for the same reason and later more such
functions will follow.
</pre>
</div>
</content>
</entry>
<entry>
<title>device/wifi: prevent clearing pending wifi scan action during inactive supplicant</title>
<updated>2017-02-09T09:59:12+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-02-05T20:32:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=a48ab1987fe1aa18895c1cc5a11da1b3c299374e'/>
<id>a48ab1987fe1aa18895c1cc5a11da1b3c299374e</id>
<content type='text'>
    &lt;debug&gt; [1486325858.0691] device[0x563b8fba42e0] (wlp3s0): wifi-scan: scan-done callback: successful
    &lt;debug&gt; [1486325858.0692] device[0x563b8fba42e0] (wlp3s0): wifi-scan: scheduled in 23 seconds (interval now 33 seconds)
    &lt;debug&gt; [1486325858.0692] device[0x563b8fba42e0] (wlp3s0): remove_pending_action (0): 'wifi-scan'
    &lt;trace&gt; [1486325858.0692] properties-changed[0x563b8fba42e0]: ignoring notification for prop has-pending-action on type NMDeviceWifi
    &lt;debug&gt; [1486325858.0692] manager: check_if_startup_complete returns FALSE because of enp0s25
    &lt;info&gt;  [1486325858.0697] device (wlp3s0): supplicant interface state: ready -&gt; inactive
    &lt;debug&gt; [1486325858.0698] device[0x563b8fba42e0] (wlp3s0): wifi-scan: scanning requested
    &lt;debug&gt; [1486325858.0698] device[0x563b8fba42e0] (wlp3s0): wifi-scan: (0) probe scanning SSID &lt;hidden&gt;
    &lt;debug&gt; [1486325858.0698] device[0x563b8fba42e0] (wlp3s0): wifi-scan: (1) probe scanning SSID "aaa"
    &lt;trace&gt; [1486325858.0699] device[0x563b8fba42e0] (wlp3s0): set-hw-addr: no MAC address change needed (2A:71:5D:54:85:1F)
    &lt;debug&gt; [1486325858.0699] device[0x563b8fba42e0] (wlp3s0): add_pending_action (1): 'wifi-scan'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    &lt;debug&gt; [1486325858.0691] device[0x563b8fba42e0] (wlp3s0): wifi-scan: scan-done callback: successful
    &lt;debug&gt; [1486325858.0692] device[0x563b8fba42e0] (wlp3s0): wifi-scan: scheduled in 23 seconds (interval now 33 seconds)
    &lt;debug&gt; [1486325858.0692] device[0x563b8fba42e0] (wlp3s0): remove_pending_action (0): 'wifi-scan'
    &lt;trace&gt; [1486325858.0692] properties-changed[0x563b8fba42e0]: ignoring notification for prop has-pending-action on type NMDeviceWifi
    &lt;debug&gt; [1486325858.0692] manager: check_if_startup_complete returns FALSE because of enp0s25
    &lt;info&gt;  [1486325858.0697] device (wlp3s0): supplicant interface state: ready -&gt; inactive
    &lt;debug&gt; [1486325858.0698] device[0x563b8fba42e0] (wlp3s0): wifi-scan: scanning requested
    &lt;debug&gt; [1486325858.0698] device[0x563b8fba42e0] (wlp3s0): wifi-scan: (0) probe scanning SSID &lt;hidden&gt;
    &lt;debug&gt; [1486325858.0698] device[0x563b8fba42e0] (wlp3s0): wifi-scan: (1) probe scanning SSID "aaa"
    &lt;trace&gt; [1486325858.0699] device[0x563b8fba42e0] (wlp3s0): set-hw-addr: no MAC address change needed (2A:71:5D:54:85:1F)
    &lt;debug&gt; [1486325858.0699] device[0x563b8fba42e0] (wlp3s0): add_pending_action (1): 'wifi-scan'
</pre>
</div>
</content>
</entry>
</feed>
