Changes in uspace/srv/locsrv/locsrv.c [9940ce0:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/locsrv/locsrv.c
r9940ce0 rb7fd2a0 47 47 #include <stdlib.h> 48 48 #include <str.h> 49 #include <str_error.h> 49 50 #include <ipc/loc.h> 50 51 #include <assert.h> … … 355 356 * Get server name 356 357 */ 357 int rc = async_data_write_accept((void **) &server->name, true, 0,358 errno_t rc = async_data_write_accept((void **) &server->name, true, 0, 358 359 LOC_NAME_MAXLEN, 0, NULL); 359 360 if (rc != EOK) { … … 409 410 * 410 411 */ 411 static int loc_server_unregister(loc_server_t *server)412 static errno_t loc_server_unregister(loc_server_t *server) 412 413 { 413 414 if (server == NULL) … … 470 471 /* Get fqsn */ 471 472 char *fqsn; 472 int rc = async_data_write_accept((void **) &fqsn, true, 0,473 errno_t rc = async_data_write_accept((void **) &fqsn, true, 0, 473 474 LOC_NAME_MAXLEN, 0, NULL); 474 475 if (rc != EOK) { … … 598 599 } 599 600 600 sysarg_t retval = async_data_read_finalize(callid, cat->name,601 errno_t retval = async_data_read_finalize(callid, cat->name, 601 602 min(size, act_size)); 602 603 … … 646 647 } 647 648 648 sysarg_t retval = async_data_read_finalize(callid, fqn,649 errno_t retval = async_data_read_finalize(callid, fqn, 649 650 min(size, act_size)); 650 651 free(fqn); … … 693 694 } 694 695 695 sysarg_t retval = async_data_read_finalize(callid, svc->server->name,696 errno_t retval = async_data_read_finalize(callid, svc->server->name, 696 697 min(size, act_size)); 697 698 … … 742 743 743 744 /* Get fqsn */ 744 int rc = async_data_write_accept((void **) &fqsn, true, 0,745 errno_t rc = async_data_write_accept((void **) &fqsn, true, 0, 745 746 LOC_NAME_MAXLEN, 0, NULL); 746 747 if (rc != EOK) { … … 805 806 806 807 /* Get service name */ 807 int rc = async_data_write_accept((void **) &name, true, 0,808 errno_t rc = async_data_write_accept((void **) &name, true, 0, 808 809 LOC_NAME_MAXLEN, 0, NULL); 809 810 if (rc != EOK) { … … 850 851 * events. 851 852 * 852 * On success, answer will contain EOK int retval.853 * On success, answer will contain EOK errno_t retval. 853 854 * On failure, error code will be sent in retval. 854 855 * … … 894 895 /** Find ID for category specified by name. 895 896 * 896 * On success, answer will contain EOK int retval and service ID in arg1.897 * On success, answer will contain EOK errno_t retval and service ID in arg1. 897 898 * On failure, error code will be sent in retval. 898 899 * … … 904 905 905 906 /* Get service name */ 906 int rc = async_data_write_accept((void **) &name, true, 0,907 errno_t rc = async_data_write_accept((void **) &name, true, 0, 907 908 LOC_NAME_MAXLEN, 0, NULL); 908 909 if (rc != EOK) { … … 971 972 size_t size; 972 973 size_t act_size; 973 int rc;974 errno_t rc; 974 975 975 976 if (!async_data_read_receive(&callid, &size)) { … … 999 1000 fibril_mutex_unlock(&cdir.mutex); 1000 1001 1001 sysarg_t retval = async_data_read_finalize(callid, id_buf, size);1002 errno_t retval = async_data_read_finalize(callid, id_buf, size); 1002 1003 free(id_buf); 1003 1004 … … 1046 1047 } 1047 1048 1048 sysarg_t retval = async_data_read_finalize(callid, desc, size);1049 errno_t retval = async_data_read_finalize(callid, desc, size); 1049 1050 1050 1051 free(desc); … … 1109 1110 } 1110 1111 1111 sysarg_t retval = async_data_read_finalize(callid, desc, size);1112 errno_t retval = async_data_read_finalize(callid, desc, size); 1112 1113 1113 1114 free(desc); … … 1122 1123 size_t size; 1123 1124 size_t act_size; 1124 int rc;1125 errno_t rc; 1125 1126 1126 1127 if (!async_data_read_receive(&callid, &size)) { … … 1162 1163 fibril_mutex_unlock(&cdir.mutex); 1163 1164 1164 sysarg_t retval = async_data_read_finalize(callid, id_buf, size);1165 errno_t retval = async_data_read_finalize(callid, id_buf, size); 1165 1166 free(id_buf); 1166 1167 … … 1277 1278 catid_t cat_id; 1278 1279 service_id_t svc_id; 1279 sysarg_t retval;1280 errno_t retval; 1280 1281 1281 1282 svc_id = IPC_GET_ARG1(*icall); … … 1527 1528 1528 1529 port_id_t port; 1529 int rc = async_create_port(INTERFACE_LOC_SUPPLIER,1530 errno_t rc = async_create_port(INTERFACE_LOC_SUPPLIER, 1530 1531 loc_connection_supplier, NULL, &port); 1531 if (rc != EOK) 1532 if (rc != EOK) { 1533 printf("%s: Error while creating supplier port: %s\n", NAME, str_error(rc)); 1532 1534 return rc; 1535 } 1533 1536 1534 1537 rc = async_create_port(INTERFACE_LOC_CONSUMER, 1535 1538 loc_connection_consumer, NULL, &port); 1536 if (rc != EOK) 1539 if (rc != EOK) { 1540 printf("%s: Error while creating consumer port: %s\n", NAME, str_error(rc)); 1537 1541 return rc; 1542 } 1538 1543 1539 1544 /* Set a handler of incomming connections */ … … 1542 1547 /* Register location service at naming service */ 1543 1548 rc = service_register(SERVICE_LOC); 1544 if (rc != EOK) 1549 if (rc != EOK) { 1550 printf("%s: Error while registering service: %s\n", NAME, str_error(rc)); 1545 1551 return rc; 1552 } 1546 1553 1547 1554 printf("%s: Accepting connections\n", NAME);
Note:
See TracChangeset
for help on using the changeset viewer.