void notify_send_watches (server * serv) { struct notify *notify; GSList *list; GSList *point; int len; len = 0; point = list = notify_list; while (list) { notify = list->data; if (notify_do_network (notify, serv)) { len += strlen (notify->name) + 2 /* + and space */; if (len > 500) { notify_flush_watches (serv, point, list); len = strlen (notify->name) + 2; point = list; } } list = list->next; } if (point) notify_flush_watches (serv, point, NULL); }
void notify_send_watches (server * serv) { struct notify *notify; GSList *list; GSList *point; int len; len = 0; point = list = notify_list; while (list) { notify = list->data; if (notify_do_network (notify, serv)) { len += strlen (notify->name) + serv->supports_monitor ? 1 : 2; /* just , for monitor or + and space for watch */; if (len > 500) { notify_flush_watches (serv, point, list); len = strlen (notify->name) + serv->supports_monitor ? 1 : 2; point = list; } } list = list->next; } if (point) notify_flush_watches (serv, point, NULL); }