+
+ /* count enabled watches */
+ n_fds = 0;
+ link = _dbus_list_get_first_link (&callbacks);
+ while (link != NULL)
+ {
+ DBusList *next = _dbus_list_get_next_link (&callbacks, link);
+ Callback *cb = link->data;
+ if (cb->type == CALLBACK_WATCH)
+ {
+ WatchCallback *wcb = WATCH_CALLBACK (cb);
+
+ if (dbus_watch_get_enabled (wcb->watch))
+ ++n_fds;
+ }