Changes in uspace/lib/net/tl/tl_common.c [0ab68f6:84c20da] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/tl/tl_common.c
r0ab68f6 r84c20da 54 54 #include <ipc/services.h> 55 55 #include <errno.h> 56 #include <err.h> 56 57 57 58 DEVICE_MAP_IMPLEMENT(packet_dimensions, packet_dimension_t); … … 123 124 packet_dimension_ref *packet_dimension) 124 125 { 125 int rc;126 ERROR_DECLARE; 126 127 127 128 if (!packet_dimension) … … 136 137 return ENOMEM; 137 138 138 rc = ip_packet_size_req(ip_phone, device_id, *packet_dimension);139 if (rc != EOK) {139 if (ERROR_OCCURRED(ip_packet_size_req(ip_phone, device_id, 140 *packet_dimension))) { 140 141 free(*packet_dimension); 141 return rc;142 return ERROR_CODE; 142 143 } 143 144 144 rc= packet_dimensions_add(packet_dimensions, device_id,145 ERROR_CODE = packet_dimensions_add(packet_dimensions, device_id, 145 146 *packet_dimension); 146 if ( rc< 0) {147 if (ERROR_CODE < 0) { 147 148 free(*packet_dimension); 148 return rc;149 return ERROR_CODE; 149 150 } 150 151 } … … 291 292 socklen_t addrlen) 292 293 { 294 ERROR_DECLARE; 295 293 296 ipc_callid_t callid; 294 297 size_t length; 295 void *data; 296 int rc; 298 void * data; 297 299 298 300 if (!dimension) … … 317 319 318 320 // read the data into the packet 319 rc = async_data_write_finalize(callid, data, length); 320 if (rc != EOK) { 321 if (ERROR_OCCURRED(async_data_write_finalize(callid, data, length)) || 322 // set the packet destination address 323 ERROR_OCCURRED(packet_set_addr(*packet, NULL, (uint8_t *) addr, 324 addrlen))) { 321 325 pq_release_remote(packet_phone, packet_get_id(*packet)); 322 return rc; 323 } 324 325 // set the packet destination address 326 rc = packet_set_addr(*packet, NULL, (uint8_t *) addr, addrlen); 327 if (rc != EOK) { 328 pq_release_remote(packet_phone, packet_get_id(*packet)); 329 return rc; 326 return ERROR_CODE; 330 327 } 331 328
Note:
See TracChangeset
for help on using the changeset viewer.