PUD: follow-up for 5addf68
authorFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 5 Mar 2012 10:39:17 +0000 (11:39 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 5 Mar 2012 10:39:33 +0000 (11:39 +0100)
forgot to initialise the gateay that is used for
uplink messages.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/src/receiver.c

index 4b35986..396e4c3 100644 (file)
@@ -911,6 +911,7 @@ bool startReceiver(void) {
        }
 
        nmea_zero_INFO(&transmitGpsInformation.txPosition.nmeaInfo);
+       memcpy(&transmitGpsInformation.txGateway, &olsr_cnf->main_addr, olsr_cnf->ipsize);
        transmitGpsInformation.updated = false;
 
        nmea_zero_INFO(&txPosition.nmeaInfo);
@@ -958,6 +959,7 @@ void stopReceiver(void) {
 
        transmitGpsInformation.updated = false;
        nmea_zero_INFO(&transmitGpsInformation.txPosition.nmeaInfo);
+       memcpy(&transmitGpsInformation.txGateway, &olsr_cnf->main_addr, olsr_cnf->ipsize);
 
        nmea_parser_destroy(&nmeaParser);