Changes in uspace/srv/net/slip/slip.c [ca48672:b4edc96] in mainline
- File:
-
- 1 edited
-
uspace/srv/net/slip/slip.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/slip/slip.c
rca48672 rb4edc96 1 1 /* 2 * Copyright (c) 202 5Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * Copyright (c) 2013 Jakub Jermar 4 4 * All rights reserved. … … 307 307 chardev_t *chardev_out = NULL; 308 308 fid_t fid; 309 loc_srv_t *srv;310 309 errno_t rc; 311 310 … … 315 314 async_set_fallback_port_handler(slip_client_conn, NULL); 316 315 317 rc = loc_server_register(NAME , &srv);316 rc = loc_server_register(NAME); 318 317 if (rc != EOK) { 319 318 log_msg(LOG_DEFAULT, LVL_ERROR, … … 324 323 rc = loc_service_get_id(svcstr, &svcid, 0); 325 324 if (rc != EOK) { 326 loc_server_unregister(srv);327 325 log_msg(LOG_DEFAULT, LVL_ERROR, 328 326 "Failed getting ID for service %s", svcstr); … … 332 330 rc = loc_category_get_id(CAT_IPLINK, &iplinkcid, 0); 333 331 if (rc != EOK) { 334 loc_server_unregister(srv);335 332 log_msg(LOG_DEFAULT, LVL_ERROR, 336 333 "Failed to get category ID for %s", … … 345 342 sess_out = loc_service_connect(svcid, INTERFACE_DDF, 0); 346 343 if (!sess_out) { 347 loc_server_unregister(srv);348 344 log_msg(LOG_DEFAULT, LVL_ERROR, 349 345 "Failed to connect to service %s (ID=%d)", … … 354 350 rc = chardev_open(sess_out, &chardev_out); 355 351 if (rc != EOK) { 356 loc_server_unregister(srv);357 352 log_msg(LOG_DEFAULT, LVL_ERROR, 358 353 "Failed opening character device."); … … 378 373 } 379 374 380 rc = loc_service_register( srv, linkstr, fallback_port_id, &linksid);375 rc = loc_service_register(linkstr, &linksid); 381 376 if (rc != EOK) { 382 377 log_msg(LOG_DEFAULT, LVL_ERROR, … … 386 381 } 387 382 388 rc = loc_service_add_to_cat(srv, linksid, iplinkcid); 389 if (rc != EOK) { 390 loc_service_unregister(srv, linksid); 383 rc = loc_service_add_to_cat(linksid, iplinkcid); 384 if (rc != EOK) { 391 385 log_msg(LOG_DEFAULT, LVL_ERROR, 392 386 "Failed to add service %d (%s) to category %d (%s).", … … 407 401 408 402 fail: 409 loc_server_unregister(srv);410 403 chardev_close(chardev_out); 411 404 if (sess_out)
Note:
See TracChangeset
for help on using the changeset viewer.
