X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=src%2Fhttp_command.c;h=4d6c35504f47a87ab59c05ad7321835c24c7cf6e;hb=235995289021a11b33312c91a55ccfbca605348b;hp=0dfbc6d605c711fce45c2c336eaf1f28999071b6;hpb=975482621691b3dbd8d08cb5fbd81eeb6d9b05dd;p=pazpar2-moved-to-github.git diff --git a/src/http_command.c b/src/http_command.c index 0dfbc6d..4d6c355 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -1,5 +1,5 @@ /* - * $Id: http_command.c,v 1.27 2007-03-20 05:32:58 quinn Exp $ + * $Id: http_command.c,v 1.29 2007-03-28 12:05:18 marc Exp $ */ #include @@ -53,7 +53,7 @@ struct http_session *http_session_create() r->timestamp = 0; r->next = session_list; session_list = r; - r->timeout_iochan = iochan_create(-1, session_timeout, 0); + r->timeout_iochan = iochan_create(-1, 0, session_timeout, 0); iochan_setdata(r->timeout_iochan, r); iochan_settimeout(r->timeout_iochan, global_parameters.session_timeout); r->timeout_iochan->next = channel_list; @@ -237,7 +237,7 @@ static void cmd_termlist(struct http_channel *c) name++; } wrbuf_puts(c->wrbuf, ""); - rs->payload = nmem_strdup(rq->channel->nmem, wrbuf_buf(c->wrbuf)); + rs->payload = nmem_strdup(rq->channel->nmem, wrbuf_cstr(c->wrbuf)); http_send_response(c); } @@ -272,7 +272,7 @@ static void cmd_bytarget(struct http_channel *c) } wrbuf_puts(c->wrbuf, ""); - rs->payload = nmem_strdup(c->nmem, wrbuf_buf(c->wrbuf)); + rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf)); http_send_response(c); } @@ -348,7 +348,7 @@ static void cmd_record(struct http_channel *c) for (r = rec->records; r; r = r->next) write_subrecord(r, c->wrbuf, service); wrbuf_puts(c->wrbuf, "\n"); - rs->payload = nmem_strdup(c->nmem, wrbuf_buf(c->wrbuf)); + rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf)); http_send_response(c); } @@ -415,7 +415,7 @@ static void show_records(struct http_channel *c, int active) } wrbuf_puts(c->wrbuf, "\n"); - rs->payload = nmem_strdup(c->nmem, wrbuf_buf(c->wrbuf)); + rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf)); http_send_response(c); } @@ -519,7 +519,7 @@ static void cmd_stat(struct http_channel *c) wrbuf_printf(c->wrbuf, "%d\n", stat.num_failed); wrbuf_printf(c->wrbuf, "%d\n", stat.num_error); wrbuf_puts(c->wrbuf, ""); - rs->payload = nmem_strdup(c->nmem, wrbuf_buf(c->wrbuf)); + rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf)); http_send_response(c); } @@ -539,7 +539,7 @@ static void cmd_info(struct http_channel *c) wrbuf_printf(c->wrbuf, " \n"); wrbuf_puts(c->wrbuf, ""); - rs->payload = nmem_strdup(c->nmem, wrbuf_buf(c->wrbuf)); + rs->payload = nmem_strdup(c->nmem, wrbuf_cstr(c->wrbuf)); http_send_response(c); }