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