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