Subversion Repositories HelenOS

Rev

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

Rev 3362 Rev 3363
Line 193... Line 193...
193
{
193
{
194
    answerbox_t *callerbox = call->callerbox;
194
    answerbox_t *callerbox = call->callerbox;
195
 
195
 
196
    call->flags |= IPC_CALL_ANSWERED;
196
    call->flags |= IPC_CALL_ANSWERED;
197
 
197
 
-
 
198
    if (call->flags & IPC_CALL_FORWARDED) {
-
 
199
        if (call->data.caller_phone) {
-
 
200
            /* Demasquerade the caller phone. */
-
 
201
            call->data.phone = call->data.caller_phone;
-
 
202
        }
-
 
203
    }
-
 
204
 
198
    spinlock_lock(&callerbox->lock);
205
    spinlock_lock(&callerbox->lock);
199
    list_append(&call->link, &callerbox->answers);
206
    list_append(&call->link, &callerbox->answers);
200
    spinlock_unlock(&callerbox->lock);
207
    spinlock_unlock(&callerbox->lock);
201
    waitq_wakeup(&callerbox->wq, WAKEUP_FIRST);
208
    waitq_wakeup(&callerbox->wq, WAKEUP_FIRST);
202
}
209
}
Line 393... Line 400...
393
        interrupts_restore(ipl);
400
        interrupts_restore(ipl);
394
    } else if (!list_empty(&box->answers)) {
401
    } else if (!list_empty(&box->answers)) {
395
        /* Handle asynchronous answers */
402
        /* Handle asynchronous answers */
396
        request = list_get_instance(box->answers.next, call_t, link);
403
        request = list_get_instance(box->answers.next, call_t, link);
397
        list_remove(&request->link);
404
        list_remove(&request->link);
398
        if (request->data.caller_phone)
-
 
399
            atomic_dec(&request->data.caller_phone->active_calls);
-
 
400
        else
-
 
401
            atomic_dec(&request->data.phone->active_calls);
405
        atomic_dec(&request->data.phone->active_calls);
402
    } else if (!list_empty(&box->calls)) {
406
    } else if (!list_empty(&box->calls)) {
403
        /* Handle requests */
407
        /* Handle requests */
404
        request = list_get_instance(box->calls.next, call_t, link);
408
        request = list_get_instance(box->calls.next, call_t, link);
405
        list_remove(&request->link);
409
        list_remove(&request->link);
406
        /* Append request to dispatch queue */
410
        /* Append request to dispatch queue */