Permalink
Browse files

fixed IP fetching

  • Loading branch information...
1 parent 3308898 commit f440a0f7e4d0410f7c0e1f5615b6020f60efab3f @oneamtu oneamtu committed Apr 16, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 corpus/RoboGuardian.cpp
View
2 corpus/RoboGuardian.cpp
@@ -409,7 +409,7 @@ string RoboGuardian::getHostName()const {
}
const string RoboGuardian::discoverIP() const{
- int result = system("/opt/naoqi/bin/ip.sh > /tmp/ip.txt");
+ int result = system("ifconfig|grep 'inet'|cut -d':' -f2|awk '{print $1}'|grep -v 127.0.0.1 > /tmp/ip.txt");
char ip[100];
FILE * ipf = fopen("/tmp/ip.txt","r");
if(ipf != NULL){

0 comments on commit f440a0f

Please sign in to comment.