Project

General

Profile

mod_status.1.4.2.patch

-- cyberline - Anonymous, 2008-01-17 08:29

View differences:

src/mod_status.c 2008-01-16 12:19:36.000000000 +0100
560 560
	double avg;
561 561
	time_t ts;
562 562
	char buf[32];
563
	unsigned int k;
564
	unsigned int l;
563 565

  
564 566
	b = chunkqueue_get_append_buffer(con->write_queue);
565 567

  
......
588 590
	buffer_append_long(b, srv->conns->used);
589 591
	BUFFER_APPEND_STRING_CONST(b, "\n");
590 592

  
593
	BUFFER_APPEND_STRING_CONST(b, "IdleServers: ");
594
       buffer_append_long(b, srv->conns->size - srv->conns->used);
595
       BUFFER_APPEND_STRING_CONST(b, "\n");
596

  
597
       /* output scoreboard */
598
       BUFFER_APPEND_STRING_CONST(b, "Scoreboard: ");
599
       for (k = 0; k < srv->conns->used; k++) {
600
        	connection *c = srv->conns->ptr[k];
601
		const char *state = connection_get_short_state(c->state);
602
		buffer_append_string_len(b, state, 1);
603
	}
604
	for (l = 0; l < srv->conns->size - srv->conns->used; l++) {
605
		BUFFER_APPEND_STRING_CONST(b, "_");
606
	}
607
	BUFFER_APPEND_STRING_CONST(b, "\n");
608

  
591 609
	/* set text/plain output */
592 610

  
593 611
	response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_STR_LEN("text/plain"));