Changeset feeac0d in mainline for uspace/srv/net/inetsrv/reass.c
- Timestamp:
- 2013-09-10T16:32:35Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4982d87
- Parents:
- e8d6ce2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/inetsrv/reass.c
re8d6ce2 rfeeac0d 129 129 assert(fibril_mutex_is_locked(&reass_dgram_map_lock)); 130 130 131 list_foreach(reass_dgram_map, link) { 132 reass_dgram_t *rdg = list_get_instance(link, reass_dgram_t, 133 map_link); 134 131 list_foreach(reass_dgram_map, map_link, reass_dgram_t, rdg) { 135 132 link_t *f1_link = list_first(&rdg->frags); 136 133 assert(f1_link != NULL); … … 289 286 size_t fragoff_limit; 290 287 inet_dgram_t dgram; 288 uint8_t proto; 291 289 reass_frag_t *frag; 292 uint8_t proto;293 290 294 291 /* … … 297 294 */ 298 295 frag = NULL; 299 list_foreach(rdg->frags, link) { 300 frag = list_get_instance(link, reass_frag_t, dgram_link); 301 302 if (!frag->packet.mf) 296 list_foreach(rdg->frags, dgram_link, reass_frag_t, cfrag) { 297 if (!cfrag->packet.mf) { 298 frag = cfrag; 303 299 break; 300 } 304 301 } 305 302 … … 330 327 size_t doffs = 0; 331 328 332 frag = NULL; 333 list_foreach(rdg->frags, link) { 334 frag = list_get_instance(link, reass_frag_t, dgram_link); 335 329 list_foreach(rdg->frags, dgram_link, reass_frag_t, cfrag) { 336 330 size_t cb, ce; 337 331 338 cb = max(doffs, frag->packet.offs);339 ce = min(dgram_size, frag->packet.offs +frag->packet.size);332 cb = max(doffs, cfrag->packet.offs); 333 ce = min(dgram_size, cfrag->packet.offs + cfrag->packet.size); 340 334 341 335 if (ce > cb) { 342 336 memcpy(dgram.data + cb, 343 frag->packet.data + cb -frag->packet.offs,337 cfrag->packet.data + cb - cfrag->packet.offs, 344 338 ce - cb); 345 339 } 346 340 347 if (! frag->packet.mf)341 if (!cfrag->packet.mf) 348 342 break; 349 343 }
Note:
See TracChangeset
for help on using the changeset viewer.