summaryrefslogtreecommitdiff
path: root/deskutils/superkaramba/files/patch-misc_python.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'deskutils/superkaramba/files/patch-misc_python.cpp')
-rw-r--r--deskutils/superkaramba/files/patch-misc_python.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/deskutils/superkaramba/files/patch-misc_python.cpp b/deskutils/superkaramba/files/patch-misc_python.cpp
index 22b3e7b8267c..53aaf624bc71 100644
--- a/deskutils/superkaramba/files/patch-misc_python.cpp
+++ b/deskutils/superkaramba/files/patch-misc_python.cpp
@@ -1,6 +1,6 @@
---- src/misc_python.cpp.orig Fri Nov 19 13:31:33 2004
-+++ src/misc_python.cpp Fri Nov 19 13:37:12 2004
-@@ -380,6 +380,9 @@
+--- src/misc_python.cpp.orig Wed Apr 20 00:55:42 2005
++++ src/misc_python.cpp Wed May 11 00:05:48 2005
+@@ -385,6 +385,9 @@
#include <sys/ioctl.h>
#include <net/if.h>
#include <arpa/inet.h>
@@ -10,3 +10,12 @@
/* now a method we need to expose to Python */
QString getIp(char *device_name)
+@@ -435,7 +438,7 @@
+ /* devptr points into an array of ifreq structs. */
+ devptr = &ifc_conf.ifc_req[i];
+
+- if (devptr->ifr_addr.sa_family != AF_INET)
++ if (ioctl(sd, SIOCGIFADDR, devptr) < 0 || devptr->ifr_addr.sa_family != AF_INET)
+ continue;
+
+ if (ioctl(sd,SIOCGIFFLAGS,devptr) < 0)