Changeset 95c675b in mainline for uspace/lib/c/generic/clipboard.c


Ignore:
Timestamp:
2017-10-17T13:11:35Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
60af4cdb
Parents:
dbf32b1 (diff), a416d070 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/clipboard.c

    rdbf32b1 r95c675b  
    3838 */
    3939
     40#include <async.h>
    4041#include <clipboard.h>
    41 #include <ns.h>
     42#include <errno.h>
     43#include <fibril_synch.h>
     44#include <ipc/clipboard.h>
    4245#include <ipc/services.h>
    43 #include <ipc/clipboard.h>
    44 #include <fibril_synch.h>
    45 #include <async.h>
     46#include <loc.h>
     47#include <malloc.h>
    4648#include <str.h>
    47 #include <errno.h>
    48 #include <malloc.h>
    4949
    5050static FIBRIL_MUTEX_INITIALIZE(clip_mutex);
     
    5858static async_exch_t *clip_exchange_begin(void)
    5959{
     60        service_id_t sid;
     61        int rc;
     62       
    6063        fibril_mutex_lock(&clip_mutex);
    6164       
    62         while (clip_sess == NULL)
    63                 clip_sess = service_connect_blocking(SERVICE_CLIPBOARD,
    64                     INTERFACE_CLIPBOARD, 0);
     65        while (clip_sess == NULL) {
     66                rc = loc_service_get_id(SERVICE_NAME_CLIPBOARD, &sid,
     67                    IPC_FLAG_BLOCKING);
     68                if (rc != EOK)
     69                        continue;
     70               
     71                clip_sess = loc_service_connect(sid, INTERFACE_CLIPBOARD,
     72                    IPC_FLAG_BLOCKING);
     73        }
    6574       
    6675        fibril_mutex_unlock(&clip_mutex);
Note: See TracChangeset for help on using the changeset viewer.