On Jan 4, 2013 12:58 AM, "Aleksander Morgado" <aleksan...@lanedo.com> wrote:
> You cannot mix in the same async method a code execution path using > mm_base_modem_at_command() with another one using GSimpleAsyncResult and > completion in idle. When you use mm_base_modem_at_command(), in > finish() you're expected to use mm_base_modem_at_command_finish(), like > you did. But when you use GSimpleAsyncResult and completion in idle you > should use g_simple_async_result_propagate_error() in finish(). The fact > that it may work as expected is due to how at_command_finish() is > implemented; but you shouldn't rely on that. > > So you'll need to use GSimpleAsyncResult for both cases, i.e. provide a > _ready() GAsyncReadyCallback in mm_base_modem_at_command() to which you > pass 'simple' as user_data; and then complete the 'simple' from within > the _ready() method. In this way, you can safely call > g_simple_async_result_propagate_error() in finish(). Offtopic, but do you know where this is documented? Any books, online docs or api docs to recommend? Is it part of gnome/glibs, or dbus? -- Marius
_______________________________________________ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list