Changeset 8b655705 in mainline for uspace/srv/net/net/net.c
- Timestamp:
- 2011-04-15T19:38:07Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9dd730d1
- Parents:
- 6b9e85b (diff), b2fb47f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/net/net.c
r6b9e85b r8b655705 47 47 #include <str_error.h> 48 48 49 #include <ipc/ipc.h>50 49 #include <ipc/services.h> 51 50 #include <ipc/net.h> … … 290 289 if (rc != EOK) 291 290 return rc; 291 292 292 rc = add_module(NULL, &net_globals.modules, (uint8_t *) NE2000_NAME, 293 293 (uint8_t *) NE2000_FILENAME, SERVICE_NE2000, 0, connect_to_service); 294 294 if (rc != EOK) 295 295 return rc; 296 296 297 rc = add_module(NULL, &net_globals.modules, (uint8_t *) ETHERNET_NAME, 297 298 (uint8_t *) ETHERNET_FILENAME, SERVICE_ETHERNET, 0, connect_to_service); 298 299 if (rc != EOK) 299 300 return rc; 301 300 302 rc = add_module(NULL, &net_globals.modules, (uint8_t *) NILDUMMY_NAME, 301 303 (uint8_t *) NILDUMMY_FILENAME, SERVICE_NILDUMMY, 0, connect_to_service); … … 326 328 static int net_module_start(async_client_conn_t client_connection) 327 329 { 328 sysarg_t phonehash;329 330 int rc; 330 331 … … 338 339 goto out; 339 340 340 rc = ipc_connect_to_me(PHONE_NS, SERVICE_NETWORKING, 0, 0, &phonehash);341 rc = async_connect_to_me(PHONE_NS, SERVICE_NETWORKING, 0, 0, NULL); 341 342 if (rc != EOK) 342 343 goto out; … … 554 555 rc = read_netif_configuration(conf_files[i], netif); 555 556 if (rc != EOK) { 556 measured_strings_destroy(&netif->configuration );557 measured_strings_destroy(&netif->configuration, free); 557 558 free(netif); 558 559 return rc; … … 564 565 if (!setting) { 565 566 fprintf(stderr, "%s: Network interface name is missing\n", NAME); 566 measured_strings_destroy(&netif->configuration );567 measured_strings_destroy(&netif->configuration, free); 567 568 free(netif); 568 569 return EINVAL; … … 573 574 int index = netifs_add(&net_globals.netifs, netif->id, netif); 574 575 if (index < 0) { 575 measured_strings_destroy(&netif->configuration );576 measured_strings_destroy(&netif->configuration, free); 576 577 free(netif); 577 578 return index; … … 585 586 index); 586 587 if (rc != EOK) { 587 measured_strings_destroy(&netif->configuration );588 netifs_exclude_index(&net_globals.netifs, index );588 measured_strings_destroy(&netif->configuration, free); 589 netifs_exclude_index(&net_globals.netifs, index, free); 589 590 return rc; 590 591 } … … 592 593 rc = start_device(netif); 593 594 if (rc != EOK) { 594 printf("%s: Error startinginterface %s (%s)\n", NAME,595 printf("%s: Ignoring failed interface %s (%s)\n", NAME, 595 596 netif->name, str_error(rc)); 596 measured_strings_destroy(&netif->configuration); 597 netifs_exclude_index(&net_globals.netifs, index); 598 599 return rc; 597 measured_strings_destroy(&netif->configuration, free); 598 netifs_exclude_index(&net_globals.netifs, index, free); 599 continue; 600 600 } 601 601 … … 687 687 * - Answer the first IPC_M_CONNECT_ME_TO call. 688 688 */ 689 ipc_answer_0(iid, EOK);689 async_answer_0(iid, EOK); 690 690 691 691 while (true) {
Note:
See TracChangeset
for help on using the changeset viewer.