Changes in uspace/srv/clip/clip.c [ffa2c8ef:007e6efa] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/clip/clip.c
rffa2c8ef r007e6efa 30 30 #include <bool.h> 31 31 #include <async.h> 32 #include <ipc/ipc.h> 32 33 #include <ipc/ns.h> 33 34 #include <ipc/services.h> … … 62 63 63 64 fibril_mutex_unlock(&clip_mtx); 64 async_answer_0(rid, EOK);65 ipc_answer_0(rid, EOK); 65 66 break; 66 67 case CLIPBOARD_TAG_DATA: 67 68 rc = async_data_write_accept((void **) &data, false, 0, 0, 0, &size); 68 69 if (rc != EOK) { 69 async_answer_0(rid, rc);70 ipc_answer_0(rid, rc); 70 71 break; 71 72 } … … 81 82 82 83 fibril_mutex_unlock(&clip_mtx); 83 async_answer_0(rid, EOK);84 ipc_answer_0(rid, EOK); 84 85 break; 85 86 default: 86 async_answer_0(rid, EINVAL);87 ipc_answer_0(rid, EINVAL); 87 88 } 88 89 } … … 99 100 case CLIPBOARD_TAG_DATA: 100 101 if (!async_data_read_receive(&callid, &size)) { 101 async_answer_0(callid, EINVAL);102 async_answer_0(rid, EINVAL);102 ipc_answer_0(callid, EINVAL); 103 ipc_answer_0(rid, EINVAL); 103 104 break; 104 105 } … … 106 107 if (clip_tag != CLIPBOARD_TAG_DATA) { 107 108 /* So far we only understand binary data */ 108 async_answer_0(callid, EOVERFLOW);109 async_answer_0(rid, EOVERFLOW);109 ipc_answer_0(callid, EOVERFLOW); 110 ipc_answer_0(rid, EOVERFLOW); 110 111 break; 111 112 } … … 113 114 if (clip_size != size) { 114 115 /* The client expects different size of data */ 115 async_answer_0(callid, EOVERFLOW);116 async_answer_0(rid, EOVERFLOW);116 ipc_answer_0(callid, EOVERFLOW); 117 ipc_answer_0(rid, EOVERFLOW); 117 118 break; 118 119 } … … 120 121 sysarg_t retval = async_data_read_finalize(callid, clip_data, size); 121 122 if (retval != EOK) { 122 async_answer_0(rid, retval);123 ipc_answer_0(rid, retval); 123 124 break; 124 125 } 125 126 126 async_answer_0(rid, EOK);127 ipc_answer_0(rid, EOK); 127 128 default: 128 129 /* … … 130 131 * data from the clipbard 131 132 */ 132 async_answer_0(rid, EINVAL);133 ipc_answer_0(rid, EINVAL); 133 134 break; 134 135 } … … 145 146 146 147 fibril_mutex_unlock(&clip_mtx); 147 async_answer_2(rid, EOK, (sysarg_t) size, (sysarg_t) tag);148 ipc_answer_2(rid, EOK, (sysarg_t) size, (sysarg_t) tag); 148 149 } 149 150 … … 151 152 { 152 153 /* Accept connection */ 153 async_answer_0(iid, EOK);154 ipc_answer_0(iid, EOK); 154 155 155 156 bool cont = true; … … 172 173 break; 173 174 default: 174 async_answer_0(callid, ENOENT);175 ipc_answer_0(callid, ENOENT); 175 176 } 176 177 }
Note:
See TracChangeset
for help on using the changeset viewer.