From: Brian D H. <bdh...@c4...> - 2001-07-17 05:05:41
|
Actually my first thought on cleaning the "*"s or "}"s from the ax25Source didn't work either. The following does: -------------- if (ax25Source.find_first_of("*") <= ax25Source.length()) { int nfind = ax25Source.find_first_of("*"); //cerr << "Found * in source at position: " << nfind << endl; ax25Source.erase(nfind,1); } -------------- Something didn't like the initial "int nfind" portion of the IF conditional. Everytime it matched was returning position of "1" for either "*" or "}". I've got this running on the test machine now and it's simply deleting the character without any other adverse affects. I'll run some more and if it looks clean I'll commit it. 73/N5VFF -- ============================================================ Brian D Heaton | I fear that we have awakened Principal Consultant | a sleeping giant and instilled C4I2.com System Consultants | in him a terrible resolve. bdh...@c4... | -- Admiral Isoruku Yamamoto USA (719) 623-0381 | -- Imperial Japanese Navy UK +44 (0)845 127-5400 | -- December 7, 1941 On 2001.07.16 22:31 Brian D Heaton wrote: > A second concern is the current way we are stripping "*" from the > ax25Source field of packets. At present it appears to be erasing the > full > ax25Source of the packet and thus the other filtering code is marking it > as > an error packet. I've got badpacket logging turned on and I see > everything > with a "*" in the ax25Source field (mostly digi ID's) being dropped. > Thus > we are dropping any packets directly heard by the IGATE. ---- SNIP SNIP------ > I think if we change to: > > -------------------- > if (int nfind = ax25Source.find_first_of('*') <= ax25Source.length()) { > //cerr << "Found * in source at position: " << nfind << endl; > ax25Source.erase(nfind,1); > } > -------------------- > > We will ensure that we only delete the "*". I'm testing this > now, > but wanted to make sure I understand the implementation. > > 73/N5VFF > > > > -- > ============================================================ > Brian D Heaton | I fear that we have awakened > Principal Consultant | a sleeping giant and instilled > C4I2.com System Consultants | in him a terrible resolve. > bdh...@c4... | -- Admiral Isoruku Yamamoto > USA (719) 623-0381 | -- Imperial Japanese Navy > UK +44 (0)845 127-5400 | -- December 7, 1941 > > _______________________________________________ > Aprsd-devel mailing list > Apr...@li... > http://lists.sourceforge.net/lists/listinfo/aprsd-devel > |