Changeset 77f0a1d in mainline for uspace/srv/clipboard/clipboard.c
- Timestamp:
- 2018-03-22T22:54:52Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- eed4139
- Parents:
- a46e56b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/clipboard/clipboard.c
ra46e56b r77f0a1d 47 47 static service_id_t svc_id; 48 48 49 static void clip_put_data(cap_call_handle_t r id, ipc_call_t *request)49 static void clip_put_data(cap_call_handle_t req_handle, ipc_call_t *request) 50 50 { 51 51 char *data; … … 65 65 66 66 fibril_mutex_unlock(&clip_mtx); 67 async_answer_0(r id, EOK);67 async_answer_0(req_handle, EOK); 68 68 break; 69 69 case CLIPBOARD_TAG_DATA: 70 70 rc = async_data_write_accept((void **) &data, false, 0, 0, 0, &size); 71 71 if (rc != EOK) { 72 async_answer_0(r id, rc);72 async_answer_0(req_handle, rc); 73 73 break; 74 74 } … … 84 84 85 85 fibril_mutex_unlock(&clip_mtx); 86 async_answer_0(r id, EOK);86 async_answer_0(req_handle, EOK); 87 87 break; 88 88 default: 89 async_answer_0(r id, EINVAL);90 } 91 } 92 93 static void clip_get_data(cap_call_handle_t r id, ipc_call_t *request)89 async_answer_0(req_handle, EINVAL); 90 } 91 } 92 93 static void clip_get_data(cap_call_handle_t req_handle, ipc_call_t *request) 94 94 { 95 95 fibril_mutex_lock(&clip_mtx); … … 103 103 if (!async_data_read_receive(&chandle, &size)) { 104 104 async_answer_0(chandle, EINVAL); 105 async_answer_0(r id, EINVAL);105 async_answer_0(req_handle, EINVAL); 106 106 break; 107 107 } … … 110 110 /* So far we only understand binary data */ 111 111 async_answer_0(chandle, EOVERFLOW); 112 async_answer_0(r id, EOVERFLOW);112 async_answer_0(req_handle, EOVERFLOW); 113 113 break; 114 114 } … … 117 117 /* The client expects different size of data */ 118 118 async_answer_0(chandle, EOVERFLOW); 119 async_answer_0(r id, EOVERFLOW);119 async_answer_0(req_handle, EOVERFLOW); 120 120 break; 121 121 } … … 123 123 errno_t retval = async_data_read_finalize(chandle, clip_data, size); 124 124 if (retval != EOK) { 125 async_answer_0(r id, retval);126 break; 127 } 128 129 async_answer_0(r id, EOK);125 async_answer_0(req_handle, retval); 126 break; 127 } 128 129 async_answer_0(req_handle, EOK); 130 130 break; 131 131 default: … … 134 134 * data from the clipbard 135 135 */ 136 async_answer_0(r id, EINVAL);136 async_answer_0(req_handle, EINVAL); 137 137 break; 138 138 } … … 141 141 } 142 142 143 static void clip_content(cap_call_handle_t r id, ipc_call_t *request)143 static void clip_content(cap_call_handle_t req_handle, ipc_call_t *request) 144 144 { 145 145 fibril_mutex_lock(&clip_mtx); … … 149 149 150 150 fibril_mutex_unlock(&clip_mtx); 151 async_answer_2(rid, EOK, (sysarg_t) size, (sysarg_t) tag); 152 } 153 154 static void clip_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 151 async_answer_2(req_handle, EOK, (sysarg_t) size, (sysarg_t) tag); 152 } 153 154 static void clip_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, 155 void *arg) 155 156 { 156 157 /* Accept connection */
Note:
See TracChangeset
for help on using the changeset viewer.