Rev 3186 | Rev 3363 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3186 | Rev 3362 | ||
---|---|---|---|
Line 345... | Line 345... | ||
345 | { |
345 | { |
346 | spinlock_lock(&oldbox->lock); |
346 | spinlock_lock(&oldbox->lock); |
347 | list_remove(&call->link); |
347 | list_remove(&call->link); |
348 | spinlock_unlock(&oldbox->lock); |
348 | spinlock_unlock(&oldbox->lock); |
349 | 349 | ||
350 | if (mode & IPC_FF_ROUTE_FROM_ME) |
350 | if (mode & IPC_FF_ROUTE_FROM_ME) { |
- | 351 | if (!call->data.caller_phone) |
|
- | 352 | call->data.caller_phone = call->data.phone; |
|
351 | call->data.phone = newphone; |
353 | call->data.phone = newphone; |
- | 354 | } |
|
352 | 355 | ||
353 | return ipc_call(newphone, call); |
356 | return ipc_call(newphone, call); |
354 | } |
357 | } |
355 | 358 | ||
356 | 359 | ||
Line 390... | Line 393... | ||
390 | interrupts_restore(ipl); |
393 | interrupts_restore(ipl); |
391 | } else if (!list_empty(&box->answers)) { |
394 | } else if (!list_empty(&box->answers)) { |
392 | /* Handle asynchronous answers */ |
395 | /* Handle asynchronous answers */ |
393 | request = list_get_instance(box->answers.next, call_t, link); |
396 | request = list_get_instance(box->answers.next, call_t, link); |
394 | list_remove(&request->link); |
397 | list_remove(&request->link); |
- | 398 | if (request->data.caller_phone) |
|
- | 399 | atomic_dec(&request->data.caller_phone->active_calls); |
|
- | 400 | else |
|
395 | atomic_dec(&request->data.phone->active_calls); |
401 | atomic_dec(&request->data.phone->active_calls); |
396 | } else if (!list_empty(&box->calls)) { |
402 | } else if (!list_empty(&box->calls)) { |
397 | /* Handle requests */ |
403 | /* Handle requests */ |
398 | request = list_get_instance(box->calls.next, call_t, link); |
404 | request = list_get_instance(box->calls.next, call_t, link); |
399 | list_remove(&request->link); |
405 | list_remove(&request->link); |
400 | /* Append request to dispatch queue */ |
406 | /* Append request to dispatch queue */ |