Bug in Java HashMap Code
$15-20 USD
$15-20 USD
Paid on delivery
I have a bug in the following code.? It works the first time around but not the 2nd.? I think something is not? getting? cleared out.? I can send the entire package to the wining bidder.
The finished product will be? to resolve the bug.
? static HashMap<Integer, Integer> reassembledIn = new HashMap<Integer, Integer>();
? static HashMap<Integer, List<Integer>> reassemblyMap;
? static HashMap<Integer, byte[]> reassemblyFrameData = new HashMap<Integer, byte[]>();
if (reassemblyMap != null && [login to view URL](new Integer(FrameNum)) != null) {
? ? ? ? ? ? List<Integer> framesList = [login to view URL](new Integer(FrameNum));
? ? ? ? ? ? int total = 0;
? ? ? ? ? ? Iterator<Integer> it = [login to view URL]();
? ? ? ? ? ? while ([login to view URL]()) {
? ? ? ? ? ? ? Integer frame = [login to view URL]();
? ? ? ? ? ? ? byte[] frameData = [login to view URL](frame);
? ? ? ? ? ? ? total += [login to view URL];
? ? ? ? ? ? }
? ? ? ? ? ? PacketBuf = new byte[total];
? ? ? ? ? ? it = [login to view URL]();
? ? ? ? ? ? int pos = 0;
? ? ? ? ? ? while ([login to view URL]()) {
? ? ? ? ? ? ? Integer frame = [login to view URL]();
? ? ? ? ? ? ? byte[] frameData = [login to view URL](frame);
? ? ? ? ? ? ? [login to view URL](frameData, 0, PacketBuf, pos, [login to view URL]);
? ? ? ? ? ? ? pos += [login to view URL];
? ? ? ? ? ? }
? ? ? ? ? ? start_offs = 0;
? ? ? ? ? ? [login to view URL]("Reassembled Frames on Frame " + FrameNum + ": " + framesList).append([login to view URL]);
? ? ? ? ? ? ? ? ? ? ? ? [login to view URL]("Reassembled Frames on Frame " + FrameNum + ": " + framesList);
?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? } else if (reassembledInFrame != null) {
? ? ? ? ? ? [login to view URL]("Frame ").append(FrameNum).append(" is reassembled in frame ").append(reassembledInFrame).append([login to view URL]);
? ? ? ? ? ? start_offs = [login to view URL];
? ? ? ? ? ? break;
? ? ? ? ? } else if ([login to view URL] + startIpOffset == start_offs) {
? ? ? ? ? ? //the buffer has reached the end of the frame, the remaining data is the ethernet trailer
? ? ? ? ? ? start_offs = [login to view URL];
? ? ? ? ? ? break;
? ? ? ? ? }
Project ID: 2980106
About the project
2 proposals
Remote project
Active 14 yrs ago
Looking to make some money?
Benefits of bidding on Freelancer
Set your budget and timeframe
It's free to sign up and bid on jobs
2 freelancers are bidding on average $12 USD for this job
$14.45 USD in 3 days
5.0 (15 reviews)