Rev 1090 | Rev 1248 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1090 | Rev 1141 | ||
---|---|---|---|
Line 90... | Line 90... | ||
90 | static inline void answer_preprocess(call_t *answer, ipc_data_t *olddata) |
90 | static inline void answer_preprocess(call_t *answer, ipc_data_t *olddata) |
91 | { |
91 | { |
92 | int phoneid; |
92 | int phoneid; |
93 | 93 | ||
94 | if (IPC_GET_RETVAL(answer->data) == EHANGUP) { |
94 | if (IPC_GET_RETVAL(answer->data) == EHANGUP) { |
- | 95 | /* In case of forward, hangup the forwared phone, |
|
95 | /* Atomic operation */ |
96 | * not the originator |
- | 97 | */ |
|
- | 98 | spinlock_lock(&answer->data.phone->lock); |
|
- | 99 | spinlock_lock(&TASK->answerbox.lock); |
|
- | 100 | if (answer->data.phone->callee) { |
|
- | 101 | list_remove(&answer->data.phone->list); |
|
96 | answer->data.phone->callee = NULL; |
102 | answer->data.phone->callee = 0; |
- | 103 | } |
|
- | 104 | spinlock_unlock(&TASK->answerbox.lock); |
|
- | 105 | spinlock_unlock(&answer->data.phone->lock); |
|
97 | } |
106 | } |
98 | 107 | ||
99 | if (!olddata) |
108 | if (!olddata) |
100 | return; |
109 | return; |
101 | 110 |