Changeset 2a786f9 in mainline for uspace/lib/net/generic/packet_remote.c
- Timestamp:
- 2010-09-22T19:07:02Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ec1bdc8
- Parents:
- dc94cb2 (diff), 921a860 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/generic/packet_remote.c
rdc94cb2 r2a786f9 64 64 * 65 65 */ 66 static int packet_return(int phone, packet_ref packet, packet_id_t packet_id, size_t size){ 66 static int 67 packet_return(int phone, packet_ref packet, packet_id_t packet_id, size_t size) 68 { 67 69 ERROR_DECLARE; 68 70 69 71 ipc_call_t answer; 70 72 aid_t message = async_send_1(phone, NET_PACKET_GET, packet_id, &answer); 73 71 74 *packet = (packet_t) as_get_mappable_page(size); 72 75 if (ERROR_OCCURRED(async_share_in_start_0_0(phone, *packet, size)) || … … 91 94 92 95 *packet = pm_find(packet_id); 93 if (! (*packet)) {96 if (!*packet) { 94 97 ipcarg_t size; 95 98 96 ERROR_PROPAGATE(async_req_1_1(phone, NET_PACKET_GET_SIZE, packet_id, &size)); 99 ERROR_PROPAGATE(async_req_1_1(phone, NET_PACKET_GET_SIZE, 100 packet_id, &size)); 97 101 ERROR_PROPAGATE(packet_return(phone, packet, packet_id, size)); 98 102 } 99 if ((* * packet).next) {103 if ((*packet)->next) { 100 104 packet_t next; 101 105 102 return packet_translate_remote(phone, &next, (* * packet).next);106 return packet_translate_remote(phone, &next, (*packet)->next); 103 107 } 104 108 … … 114 118 ipcarg_t size; 115 119 116 if (ERROR_OCCURRED(async_req_4_2(phone, NET_PACKET_CREATE_4, max_content,117 addr_len, max_prefix, max_suffix, &packet_id, &size)))120 if (ERROR_OCCURRED(async_req_4_2(phone, NET_PACKET_CREATE_4, 121 max_content, addr_len, max_prefix, max_suffix, &packet_id, &size))) 118 122 return NULL; 119 123 … … 121 125 packet_t packet = pm_find(packet_id); 122 126 if (!packet) { 123 if (ERROR_OCCURRED(packet_return(phone, &packet, packet_id, size))) 127 if (ERROR_OCCURRED(packet_return(phone, &packet, packet_id, 128 size))) 124 129 return NULL; 125 130 } … … 141 146 packet_t packet = pm_find(packet_id); 142 147 if (!packet) { 143 if (ERROR_OCCURRED(packet_return(phone, &packet, packet_id, size))) 148 if (ERROR_OCCURRED(packet_return(phone, &packet, packet_id, 149 size))) 144 150 return NULL; 145 151 }
Note:
See TracChangeset
for help on using the changeset viewer.