Subversion Repositories HelenOS-historic

Rev

Rev 1502 | Rev 1573 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1502 Rev 1568
Line 103... Line 103...
103
        /* In case of forward, hangup the forwared phone,
103
        /* In case of forward, hangup the forwared phone,
104
         * not the originator
104
         * not the originator
105
         */
105
         */
106
        spinlock_lock(&answer->data.phone->lock);
106
        spinlock_lock(&answer->data.phone->lock);
107
        spinlock_lock(&TASK->answerbox.lock);
107
        spinlock_lock(&TASK->answerbox.lock);
108
        if (answer->data.phone->callee) {
108
        if (answer->data.phone->state == IPC_PHONE_CONNECTED) {
109
            list_remove(&answer->data.phone->list);
109
            list_remove(&answer->data.phone->list);
110
            answer->data.phone->callee = 0;
110
            answer->data.phone->state = IPC_PHONE_SLAMMED;
111
        }
111
        }
112
        spinlock_unlock(&TASK->answerbox.lock);
112
        spinlock_unlock(&TASK->answerbox.lock);
113
        spinlock_unlock(&answer->data.phone->lock);
113
        spinlock_unlock(&answer->data.phone->lock);
114
    }
114
    }
115
 
115
 
Line 490... Line 490...
490
{
490
{
491
    phone_t *phone;
491
    phone_t *phone;
492
 
492
 
493
    GET_CHECK_PHONE(phone, phoneid, return ENOENT);
493
    GET_CHECK_PHONE(phone, phoneid, return ENOENT);
494
 
494
 
495
    if (ipc_phone_hangup(phone))
495
    if (ipc_phone_hangup(phone, 0))
496
        return -1;
496
        return -1;
497
 
497
 
498
    return 0;
498
    return 0;
499
}
499
}
500
 
500