Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > Re: Trouble wit...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 6 Topic 44125 of 48417
Post > Topic >>

Re: Trouble with getbyhostname()

by abubakarm@[EMAIL PROTECTED] Mar 26, 2008 at 05:32 AM

Hi, i think this a wrong group to post the kind of problem that u r
looking to solve. You have to find some newsgroup where sockets
related stuff is discussed.

Regards,
=2E.ab

On Mar 26, 5:18=A0pm, sam.bark...@[EMAIL PROTECTED]
 wrote:
> Hi,
> I am having trouble with getbyhostname().I works sometimes but on
> other occasions it crashes.
> IPADDRESS is a string say "192.123.12.1"
>
> (gdb)
> =A0Client::SendSocket (this=3D0xbfa9493c, QuerBuf=3D@[EMAIL PROTECTED]
> =A0 =A0 IPADDRESS=3D@[EMAIL PROTECTED]
) at Client.cc:141
> 141 =A0 =A0 =A0 =A0 =A0 =A0 h =3D gethostbyname(IPADDRESS.c_str());
> (gdb)
> *** glibc detected *** /home/workspace/DNSResolver1/checkstring:
> free(): invalid next size (normal): 0x0804eb38 ***
> =3D=3D=3D=3D=3D=3D=3D Backtrace: =3D=3D=3D=3D=3D=3D=3D=3D=3D
> /lib/tls/i686/cmov/libc.so.6[0xb7db1d65]
> /lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7db5800]
> /lib/tls/i686/cmov/libc.so.6(fclose+0x134)[0xb7da06f4]
> /lib/tls/i686/cmov/libc.so.6[0xb7e2a73d]
> /lib/tls/i686/cmov/libc.so.6(__res_ninit+0x25)[0xb7e2ae65]
> /lib/tls/i686/cmov/libc.so.6(__res_maybe_init+0x7b)[0xb7e2c30b]
> /lib/tls/i686/cmov/libc.so.6(__nss_hostname_digits_dots+0x2d)
> [0xb7e2dcdd]
> /lib/tls/i686/cmov/libc.so.6(gethostbyname+0x9a)[0xb7e3227a]
 




 6 Posts in Topic:
Trouble with getbyhostname()
sam.barker0@[EMAIL PROTEC  2008-03-26 05:18:40 
Re: Trouble with getbyhostname()
abubakarm@[EMAIL PROTECTE  2008-03-26 05:32:02 
Re: Trouble with getbyhostname()
sam.barker0@[EMAIL PROTEC  2008-03-26 07:29:03 
Re: Trouble with getbyhostname()
"Victor Bazarov"  2008-03-26 10:33:57 
Re: Trouble with getbyhostname()
dave_mikesell@[EMAIL PROT  2008-03-26 07:35:07 
Re: Trouble with getbyhostname()
sam.barker0@[EMAIL PROTEC  2008-03-26 17:00:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 9:41:17 CST 2008.