Changeset 2659
Legend:
- Unmodified
- Added
- Removed
-
rat/trunk/session.c
r2658 r2659 104 104 init_session(session_struct *sp) 105 105 { 106 struct hostent *addr;107 u_long netaddr;108 char hostname[MAXHOSTNAMELEN + 1];109 106 codec_id_t cid; 110 107 const codec_format_t *cf; … … 169 166 170 167 strcpy(sp->title, "Untitled Session"); 171 172 if (gethostname(hostname, MAXHOSTNAMELEN + 1) != 0) {173 perror("Cannot get hostname");174 abort();175 }176 if ((addr = gethostbyname(hostname)) == NULL) {177 perror("Cannot get host address");178 abort();179 }180 memcpy(&netaddr, addr->h_addr, 4);181 sp->ipaddr = ntohl(netaddr);182 183 168 strcpy(sp->asc_address[0], "127.0.0.3"); /* Yeuch! This value should never be used! */ 184 169 } -
rat/trunk/session.h
r2600 r2659 61 61 int ttl; 62 62 int filter_loopback; 63 u_long ipaddr;64 63 struct s_fast_time *clock; 65 64 struct s_time *device_clock;
