Changes in uspace/srv/net/dhcp/main.c [1bbc6dc:fafb8e5] in mainline
- File:
-
- 1 edited
-
uspace/srv/net/dhcp/main.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/dhcp/main.c
r1bbc6dc rfafb8e5 1 1 /* 2 * Copyright (c) 20 24Jiri Svoboda2 * Copyright (c) 2013 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 38 38 #include <str_error.h> 39 39 #include <io/log.h> 40 #include <inet/inetcfg.h> 40 41 #include <ipc/dhcp.h> 41 42 #include <ipc/services.h> … … 53 54 static errno_t dhcp_init(void) 54 55 { 55 loc_srv_t *srv;56 56 errno_t rc; 57 57 … … 60 60 dhcpsrv_links_init(); 61 61 62 rc = inetcfg_init(); 63 if (rc != EOK) { 64 log_msg(LOG_DEFAULT, LVL_ERROR, "Error contacting inet configuration service.\n"); 65 return EIO; 66 } 67 62 68 async_set_fallback_port_handler(dhcp_client_conn, NULL); 63 69 64 rc = loc_server_register(NAME , &srv);70 rc = loc_server_register(NAME); 65 71 if (rc != EOK) { 66 72 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server: %s.", str_error(rc)); … … 69 75 70 76 service_id_t sid; 71 rc = loc_service_register( srv,SERVICE_NAME_DHCP, &sid);77 rc = loc_service_register(SERVICE_NAME_DHCP, &sid); 72 78 if (rc != EOK) { 73 loc_server_unregister(srv);74 79 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service: %s.", str_error(rc)); 75 80 return EEXIST;
Note:
See TracChangeset
for help on using the changeset viewer.
