Subversion Repositories HelenOS

Rev

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

Rev 2948 Rev 3107
Line 166... Line 166...
166
 
166
 
167
    if ((native_t) IPC_GET_RETVAL(answer->data) == EHANGUP) {
167
    if ((native_t) IPC_GET_RETVAL(answer->data) == EHANGUP) {
168
        /* In case of forward, hangup the forwared phone,
168
        /* In case of forward, hangup the forwared phone,
169
         * not the originator
169
         * not the originator
170
         */
170
         */
171
        spinlock_lock(&answer->data.phone->lock);
171
        mutex_lock(&answer->data.phone->lock);
172
        spinlock_lock(&TASK->answerbox.lock);
172
        spinlock_lock(&TASK->answerbox.lock);
173
        if (answer->data.phone->state == IPC_PHONE_CONNECTED) {
173
        if (answer->data.phone->state == IPC_PHONE_CONNECTED) {
174
            list_remove(&answer->data.phone->link);
174
            list_remove(&answer->data.phone->link);
175
            answer->data.phone->state = IPC_PHONE_SLAMMED;
175
            answer->data.phone->state = IPC_PHONE_SLAMMED;
176
        }
176
        }
177
        spinlock_unlock(&TASK->answerbox.lock);
177
        spinlock_unlock(&TASK->answerbox.lock);
178
        spinlock_unlock(&answer->data.phone->lock);
178
        mutex_unlock(&answer->data.phone->lock);
179
    }
179
    }
180
 
180
 
181
    if (!olddata)
181
    if (!olddata)
182
        return 0;
182
        return 0;
183
 
183