Changes in uspace/srv/hid/input/proto/mousedev.c [cce8a83:edb3cf2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/proto/mousedev.c
rcce8a83 redb3cf2 54 54 /** Link to generic mouse device */ 55 55 mouse_dev_t *mouse_dev; 56 57 /** Session to mouse device */58 async_sess_t *sess;59 56 } mousedev_t; 60 57 … … 72 69 static void mousedev_destroy(mousedev_t *mousedev) 73 70 { 74 if (mousedev->sess != NULL)75 async_hangup(mousedev->sess);76 77 71 free(mousedev); 78 72 } … … 89 83 90 84 if (!IPC_GET_IMETHOD(call)) { 91 /* XXX Handle hangup */85 mousedev_destroy(mousedev); 92 86 return; 93 87 } … … 97 91 switch (IPC_GET_IMETHOD(call)) { 98 92 case MOUSEEV_MOVE_EVENT: 99 mouse_push_event_move(mousedev->mouse_dev, IPC_GET_ARG1(call), 100 IPC_GET_ARG2(call)); 93 mouse_push_event_move(mousedev->mouse_dev, 94 IPC_GET_ARG1(call), IPC_GET_ARG2(call), 95 IPC_GET_ARG3(call)); 101 96 retval = EOK; 102 97 break; 103 98 case MOUSEEV_BUTTON_EVENT: 104 mouse_push_event_button(mousedev->mouse_dev, IPC_GET_ARG1(call),105 IPC_GET_ARG 2(call));99 mouse_push_event_button(mousedev->mouse_dev, 100 IPC_GET_ARG1(call), IPC_GET_ARG2(call)); 106 101 retval = EOK; 107 102 break; … … 129 124 printf("%s: Failed allocating device structure for '%s'.\n", 130 125 NAME, mdev->svc_name); 126 async_hangup(sess); 131 127 return -1; 132 128 } 133 134 mousedev->sess = sess;135 129 136 130 async_exch_t *exch = async_exchange_begin(sess); … … 139 133 mdev->svc_name); 140 134 mousedev_destroy(mousedev); 135 async_hangup(sess); 141 136 return -1; 142 137 } … … 144 139 int rc = async_connect_to_me(exch, 0, 0, 0, mousedev_callback_conn, mousedev); 145 140 async_exchange_end(exch); 141 async_hangup(sess); 146 142 147 143 if (rc != EOK) {
Note:
See TracChangeset
for help on using the changeset viewer.