Changeset 4532

Show
Ignore:
Timestamp:
11/02/09 23:46:51 (4 years ago)
Author:
piers
Message:

Added better debug message reporting

Location:
vic/branches/mpeg4/net
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • vic/branches/mpeg4/net/inet.c

    r4439 r4532  
    7171        if (!gethostname(name, sizeof(name))) { 
    7272                local_addr = LookupHostAddr(name); 
    73             debug_msg("gethostname:%x\n",local_addr); 
     73            debug_msg("gethostname Name:%s (looked up addr[Hex]:%x)\n",name, local_addr); 
    7474        } 
    7575        return (local_addr); 
  • vic/branches/mpeg4/net/net-ip.cpp

    r4452 r4532  
    301301 
    302302        if ((result = getsockname(ssock_, (struct sockaddr *)p, &len)) < 0) { 
     303                debug_msg("getsockname failed, perror following:"); 
    303304                perror("getsockname"); 
    304305                p->sin_addr.s_addr = 0; 
    305306                p->sin_port = 0; 
    306307        } else  
    307             debug_msg("getsockname localname:%s\n",(const char*)local_); 
     308            debug_msg("getsockname succeeded sin_addr.s_addr:%x\n",p->sin_addr.s_addr); 
    308309 
    309310        if (p->sin_addr.s_addr == 0) { 
     311                debug_msg("getsockname returned 0 so resorting to gethostname()\n"); 
    310312                p->sin_addr.s_addr = LookupLocalAddr(); 
    311313                result = ((p->sin_addr.s_addr != 0) ? (0) : (-1));