2008-04-15 Dan Williams <dcbw@redhat.com>

* nm-setting-ip4-config.c
		- (ip4_addresses_from_gvalue): handle NULL address array

	* nm-setting-8021x.c
		- (verify_tls, verify_ttls): warn on failed verification



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3559 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2008-04-15 14:09:56 +00:00
parent e1ecb1ff71
commit 84011a9a5c
3 changed files with 21 additions and 5 deletions

View file

@ -1,3 +1,11 @@
2008-04-15 Dan Williams <dcbw@redhat.com>
* nm-setting-ip4-config.c
- (ip4_addresses_from_gvalue): handle NULL address array
* nm-setting-8021x.c
- (verify_tls, verify_ttls): warn on failed verification
2008-04-10 Dan Williams <dcbw@redhat.com>
* src/nm-gsm-device.c

View file

@ -79,11 +79,15 @@ static gboolean
verify_tls (NMSetting8021x *self, gboolean phase2)
{
if (phase2) {
if (!self->phase2_client_cert || !self->phase2_client_cert->len)
if (!self->phase2_client_cert || !self->phase2_client_cert->len) {
g_warning ("%s: phase2 client certificate invalid", __func__);
return FALSE;
}
} else {
if (!self->client_cert || !self->client_cert->len)
if (!self->client_cert || !self->client_cert->len) {
g_warning ("%s: client certificate invalid", __func__);
return FALSE;
}
}
return TRUE;
@ -92,11 +96,15 @@ verify_tls (NMSetting8021x *self, gboolean phase2)
static gboolean
verify_ttls (NMSetting8021x *self, gboolean phase2)
{
if (!self->identity && !self->anonymous_identity)
if (!self->identity && !self->anonymous_identity) {
g_warning ("%s: missing identity or anonymous identity", __func__);
return FALSE;
}
if (!self->phase2_auth && !self->phase2_autheap)
if (!self->phase2_auth && !self->phase2_autheap) {
g_warning ("%s: missing phase2 auth method", __func__);
return FALSE;
}
return TRUE;
}

View file

@ -95,7 +95,7 @@ ip4_addresses_from_gvalue (const GValue *value)
GSList *list = NULL;
addresses = (GPtrArray *) g_value_get_boxed (value);
for (i = 0; i < addresses->len; i++) {
for (i = 0; addresses && (i < addresses->len); i++) {
GArray *array = (GArray *) g_ptr_array_index (addresses, i);
if (array->len == 2 || array->len == 3) {