diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2007-07-16 20:22:41 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2007-07-16 20:22:41 +0000 |
commit | 25fe8f00e4496e270e2a58c823581b9676e172bb (patch) | |
tree | 6f7d0242d50306ac33a641f5eece0fa778e63350 /vehicle.c | |
parent | a0fbbc817e7ebc7b61c83fc90f6abf2662c4f2f8 (diff) | |
download | navit-svn-25fe8f00e4496e270e2a58c823581b9676e172bb.tar.gz |
Fixed a few bugs, added one way support to tracking
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@352 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'vehicle.c')
-rw-r--r-- | vehicle.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -363,7 +363,7 @@ struct packet { int y __attribute__ ((packed)); unsigned char speed; unsigned char dir; - } pos; + } pos __attribute__ ((packed)) ; } u; } __attribute__ ((packed)) ; @@ -374,7 +374,7 @@ vehicle_udp_recv(struct vehicle *this) int size; dbg(2,"enter this=%p",this); - size=recv(this->fd, &pkt, sizeof(pkt), 0); + size=recv(this->fd, &pkt, 15, 0); if (pkt.magic == this->magic) { dbg(3,"magic 0x%x size=%d\n", pkt.magic, size); this->current_pos.x=pkt.u.pos.x; @@ -401,7 +401,7 @@ vehicle_udp_update(struct vehicle *child, void *data) pkt.u.pos.y=pos->y; pkt.u.pos.speed=speed; pkt.u.pos.dir=dir; - sendto(this->fd, &pkt, sizeof(pkt), 0, (struct sockaddr *)&this->rem, sizeof(this->rem)); + sendto(this->fd, &pkt, 15, 0, (struct sockaddr *)&this->rem, sizeof(this->rem)); this->current_pos=child->current_pos; this->speed=child->speed; this->dir=child->dir; |