bool disabled;
};
-/* per open/close data */
+/* One active buddy */
struct sync_buddy {
int fd;
struct sync_buddy_info *sbi;
struct list_head node;
};
+/* Allocated in ->open() */
struct sync_filter_context {
int listen_fd;
struct list_head buddies;
bool ping_sent;
};
+/* Allocated and freed in ->parse_config() and ->free_config(). */
struct sync_filter_config {
struct sync_filter_args_info *conf;
struct sync_buddy_info *buddy_info;
}
}
+/*
+ * At parse config time, we build an array of struct sync_buddy_info with one
+ * entry for each buddy given in the arguments. This array is not affected by
+ * sync_close(), so information stored there can be used for multiple instances
+ * (para_audiod). We store the resolved url and the ->disabled bit in this
+ * array.
+ */
static int sync_parse_config(int argc, char **argv, void **result)
{
int i, ret, n;
}
/*
- * True if we sent a packet to all budies and received a packet from each
+ * True if we sent a packet to all buddies and received a packet from each
* enabled buddy.
*/
static bool sync_complete(struct sync_filter_context *ctx)
return 1;
/*
* Although all enabled buddies are in sync we do not splice out
- * ourselves immediately. We rather wait until the timout expires,
+ * ourselves immediately. We rather wait until the timeout expires,
* or the buddy list has become empty. This opens a time window
* for disabled buddies to become enabled by sending us a packet.
*/