TAILQ_INIT(&tcg->tcg_channels);
- TAILQ_INSERT_HEAD(&all_channel_groups, tcg, tcg_global_link);
+ TAILQ_INSERT_TAIL(&all_channel_groups, tcg, tcg_global_link);
return tcg;
}
top_menu(hc, &tq);
- tcp_qprintf(&tq, "<form method=\"get\" action=\"/chgrp\">");
-
- box_top(&tq, "box");
- tcp_qprintf(&tq, "<div class=\"content3\">"
- "<input type=\"text\" name=\"newgrpname\"> "
- "<input type=\"submit\" name=\"newgrp\""
- " value=\"Add new group\">"
- "</div>");
-
- box_bottom(&tq);
- tcp_qprintf(&tq, "</form><br>\r\n");
-
-
TAILQ_FOREACH(tcg, &all_channel_groups, tcg_global_link) {
tcp_qprintf(&tq, "<form method=\"get\" action=\"/chgrp\">");
}
+ tcp_qprintf(&tq, "<form method=\"get\" action=\"/chgrp\">");
+
+ box_top(&tq, "box");
+ tcp_qprintf(&tq, "<div class=\"content3\">"
+ "<input type=\"text\" name=\"newgrpname\"> "
+ "<input type=\"submit\" name=\"newgrp\""
+ " value=\"Add new group\">"
+ "</div>");
+
+ box_bottom(&tq);
+ tcp_qprintf(&tq, "</form><br>\r\n");
+
+
+
http_output_queue(hc, &tq, "text/html; charset=UTF-8");
return 0;
}