Changes in kernel/generic/src/ipc/ops/stchngath.c [455241b:fafb8e5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ops/stchngath.c
r455241b rfafb8e5 45 45 task_t *other_task_s; 46 46 47 phone_t *sender_phone = phone_from_kobject(kobject_get(TASK,48 (cap_handle_t) ipc_get_arg5(&call->data), KOBJECT_TYPE_PHONE) );49 if (!sender_ phone)47 kobject_t *sender_obj = kobject_get(TASK, 48 (cap_handle_t) ipc_get_arg5(&call->data), KOBJECT_TYPE_PHONE); 49 if (!sender_obj) 50 50 return ENOENT; 51 51 52 mutex_lock(&sender_ phone->lock);53 if (sender_ phone->state != IPC_PHONE_CONNECTED) {54 mutex_unlock(&sender_ phone->lock);55 kobject_put( &sender_phone->kobject);52 mutex_lock(&sender_obj->phone->lock); 53 if (sender_obj->phone->state != IPC_PHONE_CONNECTED) { 54 mutex_unlock(&sender_obj->phone->lock); 55 kobject_put(sender_obj); 56 56 return EINVAL; 57 57 } 58 58 59 other_task_s = sender_ phone->callee->task;59 other_task_s = sender_obj->phone->callee->task; 60 60 61 mutex_unlock(&sender_ phone->lock);61 mutex_unlock(&sender_obj->phone->lock); 62 62 63 63 /* Remember the third party task hash. */ 64 64 ipc_set_arg5(&call->data, (sysarg_t) other_task_s); 65 65 66 kobject_put( &sender_phone->kobject);66 kobject_put(sender_obj); 67 67 return EOK; 68 68 } … … 77 77 task_t *other_task_r; 78 78 79 phone_t *recipient_phone = phone_from_kobject(kobject_get(TASK,79 kobject_t *recipient_obj = kobject_get(TASK, 80 80 (cap_handle_t) ipc_get_arg1(&answer->data), 81 KOBJECT_TYPE_PHONE) );82 if (!recipient_ phone) {81 KOBJECT_TYPE_PHONE); 82 if (!recipient_obj) { 83 83 ipc_set_retval(&answer->data, ENOENT); 84 84 return ENOENT; 85 85 } 86 86 87 mutex_lock(&recipient_ phone->lock);88 if (recipient_ phone->state != IPC_PHONE_CONNECTED) {89 mutex_unlock(&recipient_ phone->lock);87 mutex_lock(&recipient_obj->phone->lock); 88 if (recipient_obj->phone->state != IPC_PHONE_CONNECTED) { 89 mutex_unlock(&recipient_obj->phone->lock); 90 90 ipc_set_retval(&answer->data, EINVAL); 91 kobject_put( &recipient_phone->kobject);91 kobject_put(recipient_obj); 92 92 return EINVAL; 93 93 } 94 94 95 other_task_r = recipient_ phone->callee->task;95 other_task_r = recipient_obj->phone->callee->task; 96 96 other_task_s = (task_t *) ipc_get_arg5(olddata); 97 97 … … 114 114 } 115 115 116 mutex_unlock(&recipient_ phone->lock);117 kobject_put( &recipient_phone->kobject);116 mutex_unlock(&recipient_obj->phone->lock); 117 kobject_put(recipient_obj); 118 118 } 119 119
Note:
See TracChangeset
for help on using the changeset viewer.