Changeset 54464f6a in mainline for uspace/srv/hid/input/proto/mousedev.c
- Timestamp:
- 2011-11-11T19:48:33Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 50a01a9
- Parents:
- c2e50d7 (diff), 747ef72 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/proto/mousedev.c
rc2e50d7 r54464f6a 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 } … … 129 123 printf("%s: Failed allocating device structure for '%s'.\n", 130 124 NAME, mdev->svc_name); 125 async_hangup(sess); 131 126 return -1; 132 127 } 133 134 mousedev->sess = sess;135 128 136 129 async_exch_t *exch = async_exchange_begin(sess); … … 139 132 mdev->svc_name); 140 133 mousedev_destroy(mousedev); 134 async_hangup(sess); 141 135 return -1; 142 136 } … … 144 138 int rc = async_connect_to_me(exch, 0, 0, 0, mousedev_callback_conn, mousedev); 145 139 async_exchange_end(exch); 140 async_hangup(sess); 146 141 147 142 if (rc != EOK) {
Note:
See TracChangeset
for help on using the changeset viewer.