diff -r 7847eb4b93b0 -r 3590ceb242b5 libpurple/protocols/gg/utils.c --- a/libpurple/protocols/gg/utils.c Tue Jan 07 18:53:13 2014 +0100 +++ b/libpurple/protocols/gg/utils.c Tue Jan 07 19:02:19 2014 +0100 @@ -190,6 +190,20 @@ return joined; } +const gchar * ggp_ipv4_to_str(uint32_t raw_ip) +{ + static gchar buff[INET_ADDRSTRLEN]; + buff[0] = '\0'; + + g_snprintf(buff, sizeof(buff), "%d.%d.%d.%d", + ((raw_ip >> 0) & 0xFF), + ((raw_ip >> 8) & 0xFF), + ((raw_ip >> 16) & 0xFF), + ((raw_ip >> 24) & 0xFF)); + + return buff; +} + GList * ggp_list_truncate(GList *list, guint length, GDestroyNotify free_func) { while (g_list_length(list) > length)