--- a/ChangeLog.API Fri Dec 18 01:39:20 2020 -0600
+++ b/ChangeLog.API Fri Dec 18 01:39:49 2020 -0600
@@ -188,6 +188,10 @@
* PurpleLog, purple_log_new, purple_log_write and
PurpleLogLogger->write take a GDateTime instead of a time_t
+ * purple_network_get_local_system_ip no longer takes a file + descriptor as first parameter + * purple_network_get_my_ip no longer takes a file descriptor * purple_network_listen now takes the protocol family as the second
* purple_network_listen now takes a boolean indicating external port
--- a/libpurple/core.c Fri Dec 18 01:39:20 2020 -0600
+++ b/libpurple/core.c Fri Dec 18 01:39:49 2020 -0600
@@ -188,7 +188,7 @@
* Call this early on to try to auto-detect our IP address and
* hopefully save some time later.
- purple_network_get_my_ip(-1);
+ purple_network_get_my_ip(); if (ops != NULL && ops->ui_init != NULL)
--- a/libpurple/network.c Fri Dec 18 01:39:20 2020 -0600
+++ b/libpurple/network.c Fri Dec 18 01:39:49 2020 -0600
@@ -105,8 +105,8 @@
return purple_prefs_get_string("/purple/network/public_ip");
-purple_network_get_local_system_ip(int fd)
+purple_network_get_local_system_ip(void) struct ifreq buffer[100];
@@ -116,17 +116,17 @@
struct sockaddr_in *sinptr;
guint32 lhost = g_htonl((127 << 24) + 1); /* 127.0.0.1 */
- source = socket(PF_INET,SOCK_STREAM, 0);
+ source = socket(PF_INET, SOCK_STREAM, 0); ifc.ifc_len = sizeof(buffer);
ioctl(source, SIOCGIFCONF, &ifc);
- if (fd < 0 && source >= 0)
it_end = it + ifc.ifc_len;
@@ -202,8 +202,8 @@
return g_hostname_is_ip_address(hostname);
-purple_network_get_my_ip(int fd)
+purple_network_get_my_ip(void) PurpleStunNatDiscovery *stun;
@@ -232,7 +232,7 @@
/* Just fetch the IP of the local system */
- return purple_network_get_local_system_ip(fd);
+ return purple_network_get_local_system_ip(); --- a/libpurple/network.h Fri Dec 18 01:39:20 2020 -0600
+++ b/libpurple/network.h Fri Dec 18 01:39:49 2020 -0600
@@ -75,7 +75,6 @@
* purple_network_get_local_system_ip:
- * @fd: The fd to use to help figure out the IP, or else -1.
* Returns the IP address of the local system.
@@ -87,11 +86,10 @@
* Returns: The local IP address.
-const char *purple_network_get_local_system_ip(int fd);
+const gchar *purple_network_get_local_system_ip(void); * purple_network_get_my_ip:
- * @fd: The fd to use to help figure out the IP, or -1.
* Returns the IP address that should be used anywhere a
* public IP addresses is needed (listening for an incoming
@@ -108,7 +106,7 @@
* Returns: The local IP address to be used.
-const char *purple_network_get_my_ip(int fd);
+const gchar *purple_network_get_my_ip(void); * purple_network_get_my_ip_from_gio:
--- a/pidgin/gtkprefs.c Fri Dec 18 01:39:20 2020 -0600
+++ b/pidgin/gtkprefs.c Fri Dec 18 01:39:49 2020 -0600
@@ -1778,7 +1778,7 @@
ip = purple_pmp_get_public_ip();
/* Just fetch the IP of the local system */
- ip = purple_network_get_local_system_ip(-1);
+ ip = purple_network_get_local_system_ip();