On 2014-07-17 17:25, Alexandru Ardelean wrote: > This can serve as a convenience for sync requets, since no explicit > ubus_connect() + ubus_free() need to be done. > > It can also help in cases where there are async + sync requests, > where one async request is working and sync calls are done. > Seems to create some weird races, probably because of possible > concurrent poll() calls on the same fd. I don't like this approach. If you want to avoid races in your code between async calls and sync calls, just create a separate context for sync calls. Also, allowing NULL to be passed as context creates the illusion that it is generally sane to do so. In the case of adding/removing objects it makes no sense and is completely misleading: any object that you add with the internally allocated ubus context gets deleted as soon as the context is freed.
- Felix _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
