diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-03-13 13:04:54 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-03-13 13:15:51 +0100 |
commit | 3f0dfe5fbb4f8217fe6e022fdf41a361f3a1cf8c (patch) | |
tree | ce88c081521d096a96c46ec4530173182cd1ac3a /econfind.c | |
parent | c86a48ce405f5aa8911ffb290c3e0d03077b5cae (diff) | |
download | econ-3f0dfe5fbb4f8217fe6e022fdf41a361f3a1cf8c.tar.gz econ-3f0dfe5fbb4f8217fe6e022fdf41a361f3a1cf8c.tar.bz2 econ-3f0dfe5fbb4f8217fe6e022fdf41a361f3a1cf8c.zip |
econfind: Beamer IP has to be optained from recvmsg directly
The econ_header IPaddress field holds only our client ip.
econpacket needs to store the addr in the packet.
Diffstat (limited to 'econfind.c')
-rw-r--r-- | econfind.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -30,10 +30,12 @@ static void parse_clientinfo(struct econ_packet *pkt) { - struct in_addr beamer; - - beamer.s_addr = *(uint32_t*)pkt->hdr.IPaddress; - printf("%s", inet_ntoa(beamer)); + /* Clientinfo has our ip in the packet header, + * and the record has the ip 16.0.32.0, + * none of them are the acutal beamer ip, + * so we retreive that from the up packet directly. */ + printf("%s", inet_ntoa(pkt->addr.sin_addr)); + if (pkt->hdr.datasize > 0) { char *name = pkt->cmd.command.clientinfo.projName; int state = pkt->cmd.command.clientinfo.projState; |