-struct udev_ctrl_connection *udev_ctrl_connection_ref(struct udev_ctrl_connection *conn) {
- if (conn == NULL)
- return NULL;
- conn->refcount++;
- return conn;
-}
-
-struct udev_ctrl_connection *udev_ctrl_connection_unref(struct udev_ctrl_connection *conn) {
- if (conn && -- conn->refcount == 0) {
- if (conn->sock >= 0)
- close(conn->sock);
-
- udev_ctrl_unref(conn->uctrl);