From Jo-Philipp Wich <freifunk@wwsnet.net: fix olsr_ip_to_string() buffer quirk
authorHannes Gredler <hannes@gredler.at>
Wed, 16 Jan 2008 13:56:44 +0000 (14:56 +0100)
committerHannes Gredler <hannes@gredler.at>
Wed, 16 Jan 2008 13:56:44 +0000 (14:56 +0100)
src/parser.c

index eff85e9..d123b87 100644 (file)
@@ -309,8 +309,9 @@ parse_packet(struct olsr *olsr, int size, struct interface *in_if, union olsr_ip
       if(ipequal((union olsr_ip_addr *)&m->v4.originator, &olsr_cnf->main_addr) || !olsr_validate_address((union olsr_ip_addr *)&m->v4.originator))
         {
 #ifdef DEBUG
+         struct ipaddr_str buf;
          OLSR_PRINTF(3, "Not processing message originating from %s!\n",
-           olsr_ip_to_string((union olsr_ip_addr *)&m->v4.originator));
+           olsr_ip_to_string(&buf,(union olsr_ip_addr *)&m->v4.originator));
 #endif
           continue;
         }