jeffreyalles / ichm

Automatically exported from code.google.com/p/ichm
0 stars 0 forks source link

URL shows "http://(null):8080" #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Platform:
iPhone

What steps will reproduce the problem?
1. Open iChm on iPhone
2. Open "Manage"

What is the expected output? What do you see instead?
I should see http://<IP Address>:8080, but I'm see http://(null):8080

What version of the product are you using? On what operating system?
iChm v1.0 on 16GiB iPhone 2.1 (5F136)

Please provide any additional information below.
Network info - WPA2 wireless, DHCP, Current IP: 10.20.50.43/26

Even though the UI isn't showing the IP, the service is listening on the
phone's IP address.

# nmap -sS 10.20.50.43
Starting Nmap 4.53 ( http://insecure.org ) at 2008-11-16 21:52 CST
Interesting ports on 10.20.50.43:
Not shown: 1713 closed ports
PORT     STATE SERVICE
8080/tcp open  http-proxy
MAC Address: 00:23:12:71:DC:FF (Unknown)

If I put in the proper IP, I can connect to via HTTP and upload files
properly. 

Let me know if you need any additional information.

Cheers!
Daniel

Original issue reported on code.google.com by rugmons...@gmail.com on 17 Nov 2008 at 4:01

GoogleCodeExporter commented 9 years ago
Great thanks for the report! 

I use gethostname and gethostbyname to find out the ip address of the device. 
If any
of the steps failed, it returns 'null'.

Does it always happen for you? If you go back to the root view by clicking 
'iChm' and
then go to "manage" again, is it still 'null'?

Original comment by iamawal...@gmail.com on 17 Nov 2008 at 4:15

GoogleCodeExporter commented 9 years ago
Ah, that would be the problem. I had the name on my phone set to "Daniel J. 
Givens",
so it wasn't trying to register its hostname when pulling its IP. When I 
changed it
to Daniel-iPhone (via iTunes), it set the hostname properly and registered its 
name
in DNS.

(From my DHCP/DNS server's logs)

Nov 16 22:57:03 server dhcpd: Added new forward map from Daniel-iPhone.home. to
10.20.50.36
Nov 16 22:57:03 server dhcpd: added reverse map from 36.50.20.10.in-addr.arpa. 
to
Daniel-iPhone.home.

I don't know anything about iPhone app development, but is getaddrinfo an option
instead? 

http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/getaddri
nfo.3.html

Original comment by rugmons...@gmail.com on 17 Nov 2008 at 5:20

GoogleCodeExporter commented 9 years ago
It's really helpful. I will have a try as soon as possible.

Original comment by iamawal...@gmail.com on 17 Nov 2008 at 5:41

GoogleCodeExporter commented 9 years ago
I use "getifaddrs" at last. I've tested and it works with me. The fix will be
included in the next release.

Original comment by iamawal...@gmail.com on 17 Nov 2008 at 8:40

GoogleCodeExporter commented 9 years ago
Hi, I have the same problem (null):8080 on the display
I have never changed the name of my iphone in iTunes. In DNS I see 192.168.1.1, 
the IP-address is 192.168.1.7. 
If I load a chm file in the root directory it is not in the list when i open 
iCHM.
How can I solve this problem?

Original comment by jnmbaren...@me.com on 20 Nov 2008 at 10:52

GoogleCodeExporter commented 9 years ago
jnmbarendregt, iChm 1.0.1 is in review which contains the fix. See if it can 
solve
your problem after it is released.

Original comment by iamawal...@gmail.com on 21 Nov 2008 at 3:59

GoogleCodeExporter commented 9 years ago

Original comment by iamawal...@gmail.com on 7 Aug 2009 at 9:26

GoogleCodeExporter commented 9 years ago
hai

Original comment by shivared...@gmail.com on 20 Feb 2012 at 6:08