Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/clip/clip.c

    r007e6efa rffa2c8ef  
    3030#include <bool.h>
    3131#include <async.h>
    32 #include <ipc/ipc.h>
    3332#include <ipc/ns.h>
    3433#include <ipc/services.h>
     
    6362               
    6463                fibril_mutex_unlock(&clip_mtx);
    65                 ipc_answer_0(rid, EOK);
     64                async_answer_0(rid, EOK);
    6665                break;
    6766        case CLIPBOARD_TAG_DATA:
    6867                rc = async_data_write_accept((void **) &data, false, 0, 0, 0, &size);
    6968                if (rc != EOK) {
    70                         ipc_answer_0(rid, rc);
     69                        async_answer_0(rid, rc);
    7170                        break;
    7271                }
     
    8281               
    8382                fibril_mutex_unlock(&clip_mtx);
    84                 ipc_answer_0(rid, EOK);
     83                async_answer_0(rid, EOK);
    8584                break;
    8685        default:
    87                 ipc_answer_0(rid, EINVAL);
     86                async_answer_0(rid, EINVAL);
    8887        }
    8988}
     
    10099        case CLIPBOARD_TAG_DATA:
    101100                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);
    104103                        break;
    105104                }
     
    107106                if (clip_tag != CLIPBOARD_TAG_DATA) {
    108107                        /* 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);
    111110                        break;
    112111                }
     
    114113                if (clip_size != size) {
    115114                        /* 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);
    118117                        break;
    119118                }
     
    121120                sysarg_t retval = async_data_read_finalize(callid, clip_data, size);
    122121                if (retval != EOK) {
    123                         ipc_answer_0(rid, retval);
     122                        async_answer_0(rid, retval);
    124123                        break;
    125124                }
    126125               
    127                 ipc_answer_0(rid, EOK);
     126                async_answer_0(rid, EOK);
    128127        default:
    129128                /*
     
    131130                 * data from the clipbard
    132131                 */
    133                 ipc_answer_0(rid, EINVAL);
     132                async_answer_0(rid, EINVAL);
    134133                break;
    135134        }
     
    146145       
    147146        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);
    149148}
    150149
     
    152151{
    153152        /* Accept connection */
    154         ipc_answer_0(iid, EOK);
     153        async_answer_0(iid, EOK);
    155154       
    156155        bool cont = true;
     
    173172                        break;
    174173                default:
    175                         ipc_answer_0(callid, ENOENT);
     174                        async_answer_0(callid, ENOENT);
    176175                }
    177176        }
Note: See TracChangeset for help on using the changeset viewer.