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