Add checks for networks if attribute is not available
authorSamuel Ortiz <sameo@linux.intel.com>
Tue, 7 Jul 2009 16:02:27 +0000 (18:02 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 7 Jul 2009 17:26:54 +0000 (10:26 -0700)
commitcbcec6c878630ed341079d52e44506f6e9c79e8f
treea8b997c71ee3568b726a2c849c9f0a0036f5370c
parent74a26e212a48d86c6f5aaa70a15173cc1f37c994
Add checks for networks if attribute is not available

We do actually want to check for NULL pointers, not to prevent g_strcmp0
from crashing, but because we want to compare the 2 pointers when we've
been given one and the network we're looking at has a pointer too.

For example if we call find_network() without an address, it basically
means "find a network with an SSID, and with _any_ address". But then
we're going to compare a NULL pointer with the network's address and
that's gonna be -1. As a consequence, we'll skip this network while
we shouldnt.
src/device.c