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