Parallel sessions don't mix well with call forwarding
|Reported by:||Jakub Jermář||Owned by:||Jakub Jermář|
|Blocker for:||Depends on:|
As of mainline,1739, there appear to be two problems with parallel sessions:
devman_device_connect(EXCHANGE_PARALLEL, ...)works only by accident
devman_parent_device_connect(EXCHANGE_PARALLEL, ...)does not work at all
The fundamental issue here is that the first session phone gets created as a result of forwarding the
IPC_M_CONNECT_ME_TO call through
devman, which applies some transformations to it prior to forwarding it further along to the destination driver. In contrast, all additional phones are cloned from the first one, which is already directly connected to the respective driver, using the remembered original session arguments. The problem here is that in this latter case, the arguments don't go through the same set of transformations as in the former case.
As a result of this,
devman_device_connect() works only because the device handle is still passed unmodified as ARG2 and both the translated and unmodified methods accidentally lead to the same behaviour. On the other hand,
devman_parent_device_connect() will fail on the first attempt to clone the original session phone because the numeric value of the original method (i.e. DEVMAN_CONNECT_TO_PARENTS_DEVICE) is not recognized by libdrv's driver_connection(), which in turn returns ENOENT. In addition, the handle does not get translated as is necessary, which would also likely make the function fail.