Rev 2636 | Rev 2638 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2636 | Rev 2637 | ||
---|---|---|---|
Line 175... | Line 175... | ||
175 | 175 | ||
176 | if (!olddata) |
176 | if (!olddata) |
177 | return 0; |
177 | return 0; |
178 | 178 | ||
179 | if (IPC_GET_METHOD(*olddata) == IPC_M_CONNECT_TO_ME) { |
179 | if (IPC_GET_METHOD(*olddata) == IPC_M_CONNECT_TO_ME) { |
180 | phoneid = IPC_GET_ARG3(*olddata); |
180 | phoneid = IPC_GET_ARG5(*olddata); |
181 | if (IPC_GET_RETVAL(answer->data)) { |
181 | if (IPC_GET_RETVAL(answer->data)) { |
182 | /* The connection was not accepted */ |
182 | /* The connection was not accepted */ |
183 | phone_dealloc(phoneid); |
183 | phone_dealloc(phoneid); |
184 | } else { |
184 | } else { |
185 | /* The connection was accepted */ |
185 | /* The connection was accepted */ |
186 | phone_connect(phoneid, &answer->sender->answerbox); |
186 | phone_connect(phoneid, &answer->sender->answerbox); |
187 | /* Set 'phone hash' as arg3 of response */ |
187 | /* Set 'phone hash' as arg3 of response */ |
188 | IPC_SET_ARG3(answer->data, |
188 | IPC_SET_ARG5(answer->data, |
189 | (unative_t) &TASK->phones[phoneid]); |
189 | (unative_t) &TASK->phones[phoneid]); |
190 | } |
190 | } |
191 | } else if (IPC_GET_METHOD(*olddata) == IPC_M_CONNECT_ME_TO) { |
191 | } else if (IPC_GET_METHOD(*olddata) == IPC_M_CONNECT_ME_TO) { |
192 | /* If the users accepted call, connect */ |
192 | /* If the users accepted call, connect */ |
193 | if (!IPC_GET_RETVAL(answer->data)) { |
193 | if (!IPC_GET_RETVAL(answer->data)) { |
Line 339... | Line 339... | ||
339 | if (phoneid < 0) { /* Failed to allocate phone */ |
339 | if (phoneid < 0) { /* Failed to allocate phone */ |
340 | IPC_SET_RETVAL(call->data, ELIMIT); |
340 | IPC_SET_RETVAL(call->data, ELIMIT); |
341 | ipc_answer(box, call); |
341 | ipc_answer(box, call); |
342 | return -1; |
342 | return -1; |
343 | } |
343 | } |
344 | IPC_SET_ARG3(call->data, phoneid); |
344 | IPC_SET_ARG5(call->data, phoneid); |
345 | } |
345 | } |
346 | return 0; |
346 | return 0; |
347 | } |
347 | } |
348 | 348 | ||
349 | /** Make a fast call over IPC, wait for reply and return to user. |
349 | /** Make a fast call over IPC, wait for reply and return to user. |