+ if (z_pdu && z_pdu->which == Z_GDU_HTTP_Request)
+ {
+ Z_HTTP_Request *hreq = z_pdu->u.HTTP_Request;
+
+ if (m_p->m_stat_req.length()
+ && !strcmp(hreq->path, m_p->m_stat_req.c_str()))
+ {
+ mp::odr o;
+
+ Z_GDU *gdu_res = o.create_HTTP_Response(m_session, hreq, 200);
+
+ Z_HTTP_Response *hres = gdu_res->u.HTTP_Response;
+
+ mp::wrbuf w;
+ size_t i;
+ int number_total = 0;
+
+ for (i = 0; m_p->m_duration_lim[i] != 0.0; i++)
+ number_total += m_p->m_duration_freq[i];
+ number_total += m_p->m_duration_freq[i];
+
+ wrbuf_puts(w, "<?xml version=\"1.0\">\n");
+ wrbuf_puts(w, "<frontend_net>\n");
+ wrbuf_printf(w, " <responses frequency=\"%d\">\n", number_total);
+ for (i = 0; m_p->m_duration_lim[i] != 0.0; i++)
+ {
+ if (m_p->m_duration_freq[i] > 0)
+ wrbuf_printf(
+ w, " <response mintime=\"%f\" "
+ "maxtime=\"%f\" frequency=\"%d\"/>\n",
+ i > 0 ? m_p->m_duration_lim[i - 1] : 0.0,
+ m_p->m_duration_lim[i], m_p->m_duration_freq[i]);
+ }
+
+ if (m_p->m_duration_freq[i] > 0)
+ wrbuf_printf(
+ w, " <response mintime=\"%f\" frequency=\"%d\"/>\n",
+ m_p->m_duration_lim[i - 1], m_p->m_duration_freq[i]);
+ wrbuf_puts(w, " </responses>\n");
+ wrbuf_puts(w, "</frontend_net>\n");
+
+ hres->content_len = w.len();
+ hres->content_buf = (char *) w.buf();
+
+ int len;
+ send_GDU(gdu_res, &len);
+ return;
+ }
+ }
+