changeset 27473:1d30e9d6de9b

Added the function in util.h, forgot it here.
author Paul Aurich <paul@darkrain42.org>
date Sat, 11 Jul 2009 08:11:14 +0000
parents f1f901b3d6f2
children 319b09e2590f
files libpurple/util.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/util.c	Sat Jul 11 07:55:03 2009 +0000
+++ b/libpurple/util.c	Sat Jul 11 08:11:14 2009 +0000
@@ -4446,9 +4446,8 @@
 	return ((c - domain) > 3 ? TRUE : FALSE);
 }
 
-/* TODO 3.0.0: Rename this to purple_ipv4_address_is_valid */
 gboolean
-purple_ip_address_is_valid(const char *ip)
+purple_ipv4_address_is_valid(const char *ip)
 {
 	int c, o1, o2, o3, o4;
 	char end;
@@ -4506,6 +4505,13 @@
 	return (double_colon && chunks < 8) || (!double_colon && chunks == 8);
 }
 
+/* TODO 3.0.0: Add ipv6 check, too */
+gboolean
+purple_ip_address_is_valid(const char *ip)
+{
+	return purple_ipv4_address_is_valid(ip);
+}
+
 /* Stolen from gnome_uri_list_extract_uris */
 GList *
 purple_uri_list_extract_uris(const gchar *uri_list)