Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 8d6bcc8c in mainline for uspace/srv/clipboard/clipboard.c


Ignore:
Timestamp:
2017-09-25T20:51:51Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
7b616e2
Parents:
11d9630
Message:

Move clipboard under location service.

File:
1 edited

Legend:

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

    r11d9630 r8d6bcc8c  
    2727 */
    2828
     29#include <async.h>
     30#include <errno.h>
     31#include <fibril_synch.h>
     32#include <ipc/services.h>
     33#include <ipc/clipboard.h>
     34#include <loc.h>
     35#include <malloc.h>
    2936#include <stdio.h>
    3037#include <stdbool.h>
    31 #include <async.h>
    32 #include <ns.h>
    33 #include <ipc/services.h>
    34 #include <ipc/clipboard.h>
    35 #include <malloc.h>
    36 #include <fibril_synch.h>
    37 #include <errno.h>
     38#include <task.h>
    3839
    3940#define NAME  "clipboard"
     
    4344static clipboard_tag_t clip_tag = CLIPBOARD_TAG_NONE;
    4445static FIBRIL_MUTEX_INITIALIZE(clip_mtx);
     46static service_id_t svc_id;
    4547
    4648static void clip_put_data(ipc_callid_t rid, ipc_call_t *request)
     
    179181int main(int argc, char *argv[])
    180182{
     183        int rc;
     184       
    181185        printf("%s: HelenOS clipboard service\n", NAME);
    182        
    183186        async_set_fallback_port_handler(clip_connection, NULL);
    184         int rc = service_register(SERVICE_CLIPBOARD);
    185         if (rc != EOK)
     187       
     188        rc = loc_server_register(NAME);
     189        if (rc != EOK) {
     190                printf("%s: Failed registering server. (%d)\n", NAME, rc);
    186191                return rc;
     192        }
     193       
     194        rc = loc_service_register(SERVICE_NAME_CLIPBOARD, &svc_id);
     195        if (rc != EOK) {
     196                printf("%s: Failed registering service. (%d)\n", NAME, rc);
     197                return rc;
     198        }
    187199       
    188200        printf("%s: Accepting connections\n", NAME);
Note: See TracChangeset for help on using the changeset viewer.