Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/input/proto/mousedev.c

    r5288463 rcce8a83  
    5454        /** Link to generic mouse device */
    5555        mouse_dev_t *mouse_dev;
     56       
     57        /** Session to mouse device */
     58        async_sess_t *sess;
    5659} mousedev_t;
    5760
     
    6972static void mousedev_destroy(mousedev_t *mousedev)
    7073{
     74        if (mousedev->sess != NULL)
     75                async_hangup(mousedev->sess);
     76       
    7177        free(mousedev);
    7278}
     
    8389               
    8490                if (!IPC_GET_IMETHOD(call)) {
    85                         mousedev_destroy(mousedev);
     91                        /* XXX Handle hangup */
    8692                        return;
    8793                }
     
    123129                printf("%s: Failed allocating device structure for '%s'.\n",
    124130                    NAME, mdev->svc_name);
    125                 async_hangup(sess);
    126131                return -1;
    127132        }
     133       
     134        mousedev->sess = sess;
    128135       
    129136        async_exch_t *exch = async_exchange_begin(sess);
     
    132139                    mdev->svc_name);
    133140                mousedev_destroy(mousedev);
    134                 async_hangup(sess);
    135141                return -1;
    136142        }
     
    138144        int rc = async_connect_to_me(exch, 0, 0, 0, mousedev_callback_conn, mousedev);
    139145        async_exchange_end(exch);
    140         async_hangup(sess);
    141146       
    142147        if (rc != EOK) {
Note: See TracChangeset for help on using the changeset viewer.