Changes in uspace/lib/c/generic/net/modules.c [c7a8442:1bfd3d3] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/net/modules.c
rc7a8442 r1bfd3d3 41 41 #include <async.h> 42 42 #include <malloc.h> 43 #include <err .h>43 #include <errno.h> 44 44 #include <sys/time.h> 45 45 … … 137 137 ipcarg_t arg3, async_client_conn_t client_receiver, suseconds_t timeout) 138 138 { 139 ERROR_DECLARE;139 int rc; 140 140 141 141 /* Connect to the needed service */ … … 144 144 /* Request the bidirectional connection */ 145 145 ipcarg_t phonehash; 146 if (ERROR_OCCURRED(ipc_connect_to_me(phone, arg1, arg2, arg3, 147 &phonehash))) { 146 147 rc = ipc_connect_to_me(phone, arg1, arg2, arg3, &phonehash); 148 if (rc != EOK) { 148 149 ipc_hangup(phone); 149 return ERROR_CODE;150 return rc; 150 151 } 151 152 async_new_connection(phonehash, 0, NULL, client_receiver); … … 158 159 * 159 160 * @param[in] need The needed module service. 160 * @return sThe phone of the needed service.161 * @return The phone of the needed service. 161 162 */ 162 163 int connect_to_service(services_t need) … … 170 171 * @param[in] timeout The connection timeout in microseconds. No timeout if 171 172 * set to zero (0). 172 * @return sThe phone of the needed service.173 * @return sETIMEOUT if the connection timeouted.173 * @return The phone of the needed service. 174 * @return ETIMEOUT if the connection timeouted. 174 175 */ 175 176 int connect_to_service_timeout(services_t need, suseconds_t timeout) … … 203 204 * @param[out] data The data buffer to be filled. 204 205 * @param[out] length The buffer length. 205 * @return sEOK on success.206 * @return sEBADMEM if the data or the length parameter is NULL.207 * @return sEINVAL if the client does not send data.208 * @return sENOMEM if there is not enough memory left.209 * @return sOther error codes as defined for the206 * @return EOK on success. 207 * @return EBADMEM if the data or the length parameter is NULL. 208 * @return EINVAL if the client does not send data. 209 * @return ENOMEM if there is not enough memory left. 210 * @return Other error codes as defined for the 210 211 * async_data_write_finalize() function. 211 212 */ 212 213 int data_receive(void **data, size_t *length) 213 214 { 214 ERROR_DECLARE;215 216 215 ipc_callid_t callid; 216 int rc; 217 217 218 218 if (!data || !length) … … 229 229 230 230 // fetch the data 231 if (ERROR_OCCURRED(async_data_write_finalize(callid, *data, *length))) { 231 rc = async_data_write_finalize(callid, *data, *length); 232 if (rc != EOK) { 232 233 free(data); 233 return ERROR_CODE;234 return rc; 234 235 } 235 236 … … 241 242 * @param[in] data The data buffer to be sent. 242 243 * @param[in] data_length The buffer length. 243 * @return sEOK on success.244 * @return sEINVAL if the client does not expect the data.245 * @return sEOVERFLOW if the client does not expect all the data.244 * @return EOK on success. 245 * @return EINVAL if the client does not expect the data. 246 * @return EOVERFLOW if the client does not expect all the data. 246 247 * Only partial data are transfered. 247 * @return sOther error codes as defined for the248 * @return Other error codes as defined for the 248 249 * async_data_read_finalize() function. 249 250 */
Note:
See TracChangeset
for help on using the changeset viewer.