Changeset 4428d62 in mainline


Ignore:
Timestamp:
2018-03-11T07:35:05Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Children:
b131ef3
Parents:
6df41418
git-author:
Jakub Jermar <jakub@…> (2018-02-20 22:33:58)
git-committer:
Jakub Jermar <jakub@…> (2018-03-11 07:35:05)
Message:

Destroy the phone capability on hangup

The capability must be destroyed at the time of the hangup otherwise the
phone would linger in the hungup state until the task is destroyed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/sysipc.c

    r6df41418 r4428d62  
    724724sys_errno_t sys_ipc_hangup(sysarg_t handle)
    725725{
    726         kobject_t *kobj = kobject_get(TASK, handle, KOBJECT_TYPE_PHONE);
     726        kobject_t *kobj = cap_unpublish(TASK, handle, KOBJECT_TYPE_PHONE);
    727727        if (!kobj)
    728728                return ENOENT;
     
    730730        errno_t rc = ipc_phone_hangup(kobj->phone);
    731731        kobject_put(kobj);
     732        cap_free(TASK, handle);
    732733        return rc;
    733734}
Note: See TracChangeset for help on using the changeset viewer.