Changes in uspace/srv/net/il/arp/arp.c [87e373b:5fe7692] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/il/arp/arp.c
r87e373b r5fe7692 45 45 #include <task.h> 46 46 #include <adt/measured_strings.h> 47 #include <ipc/ipc.h>48 47 #include <ipc/services.h> 49 48 #include <ipc/net.h> … … 158 157 159 158 arp_clear_addr(&proto->addresses); 160 arp_addr_destroy(&proto->addresses );161 } 162 } 163 164 arp_protos_clear(&device->protos );159 arp_addr_destroy(&proto->addresses, free); 160 } 161 } 162 163 arp_protos_clear(&device->protos, free); 165 164 } 166 165 … … 185 184 } 186 185 187 arp_cache_clear(&arp_globals.cache );186 arp_cache_clear(&arp_globals.cache, free); 188 187 fibril_mutex_unlock(&arp_globals.lock); 189 188 … … 213 212 arp_clear_trans(trans); 214 213 215 arp_addr_exclude(&proto->addresses, address->value, address->length );214 arp_addr_exclude(&proto->addresses, address->value, address->length, free); 216 215 217 216 fibril_mutex_unlock(&arp_globals.lock); … … 346 345 header->protocol_length, trans); 347 346 if (rc != EOK) { 348 /* The generic char map has already freed trans! */347 free(trans); 349 348 return rc; 350 349 } … … 428 427 case NET_IL_DEVICE_STATE: 429 428 /* Do nothing - keep the cache */ 430 ipc_answer_0(iid, (sysarg_t) EOK);429 async_answer_0(iid, (sysarg_t) EOK); 431 430 break; 432 431 … … 448 447 fibril_mutex_unlock(&arp_globals.lock); 449 448 } 450 ipc_answer_0(iid, (sysarg_t) rc);449 async_answer_0(iid, (sysarg_t) rc); 451 450 break; 452 451 … … 454 453 rc = arp_mtu_changed_message(IPC_GET_DEVICE(*icall), 455 454 IPC_GET_MTU(*icall)); 456 ipc_answer_0(iid, (sysarg_t) rc);455 async_answer_0(iid, (sysarg_t) rc); 457 456 break; 458 457 459 458 default: 460 ipc_answer_0(iid, (sysarg_t) ENOTSUP);459 async_answer_0(iid, (sysarg_t) ENOTSUP); 461 460 } 462 461 … … 557 556 if (index < 0) { 558 557 fibril_mutex_unlock(&arp_globals.lock); 559 arp_protos_destroy(&device->protos );558 arp_protos_destroy(&device->protos, free); 560 559 free(device); 561 560 return index; … … 570 569 if (device->phone < 0) { 571 570 fibril_mutex_unlock(&arp_globals.lock); 572 arp_protos_destroy(&device->protos );571 arp_protos_destroy(&device->protos, free); 573 572 free(device); 574 573 return EREFUSED; … … 580 579 if (rc != EOK) { 581 580 fibril_mutex_unlock(&arp_globals.lock); 582 arp_protos_destroy(&device->protos );581 arp_protos_destroy(&device->protos, free); 583 582 free(device); 584 583 return rc; … … 590 589 if (rc != EOK) { 591 590 fibril_mutex_unlock(&arp_globals.lock); 592 arp_protos_destroy(&device->protos );591 arp_protos_destroy(&device->protos, free); 593 592 free(device); 594 593 return rc; … … 602 601 free(device->addr); 603 602 free(device->addr_data); 604 arp_protos_destroy(&device->protos );603 arp_protos_destroy(&device->protos, free); 605 604 free(device); 606 605 return rc; … … 615 614 free(device->broadcast_addr); 616 615 free(device->broadcast_data); 617 arp_protos_destroy(&device->protos );616 arp_protos_destroy(&device->protos, free); 618 617 free(device); 619 618 return rc; … … 747 746 arp_clear_trans(trans); 748 747 arp_addr_exclude(&proto->addresses, target->value, 749 target->length );748 target->length, free); 750 749 return EAGAIN; 751 750 } … … 795 794 trans); 796 795 if (rc != EOK) { 797 /* The generic char map has already freed trans! */796 free(trans); 798 797 return rc; 799 798 } … … 808 807 arp_clear_trans(trans); 809 808 arp_addr_exclude(&proto->addresses, target->value, 810 target->length );809 target->length, free); 811 810 return ENOENT; 812 811 }
Note:
See TracChangeset
for help on using the changeset viewer.