X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Fhttp_command.c;h=2e8a6eadb540e3d8dc69499f3ce6f7017096598d;hb=bbefc8e129c52134c62405c693846876541aac0e;hp=d1af016c9da7fdbea609f5633ac18584badb9e9a;hpb=1df928b3ab324b955a24a9d537b3d05b4700ec2f;p=pazpar2-moved-to-github.git diff --git a/src/http_command.c b/src/http_command.c index d1af016..2e8a6ea 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -1,5 +1,5 @@ /* This file is part of Pazpar2. - Copyright (C) 2006-2012 Index Data + Copyright (C) 2006-2013 Index Data Pazpar2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -162,7 +162,7 @@ struct http_session *http_session_create(struct conf_service *service, char tmp_str[50]; sprintf(tmp_str, "session#%u", sesid); - r->psession = new_session(nmem, service, sesid); + r->psession = session_create(nmem, service, sesid); r->session_id = sesid; r->timestamp = 0; r->nmem = nmem; @@ -825,7 +825,9 @@ static void cmd_bytarget(struct http_channel *c) return; } } + session_enter_ro(s->psession, "cmd_bytarget"); bytarget_response(c, s, status_message); + session_leave_ro(s->psession, "cmd_bytarget"); release_session(c, s); } @@ -1115,7 +1117,6 @@ static void show_records(struct http_channel *c, struct http_session *s, int act { error(rs, PAZPAR2_MALFORMED_PARAMETER_VALUE, "sort"); return; - } rl = show_range_start(s->psession, sp, startn, &numn, &total, &total_hits, &approx_hits); @@ -1161,7 +1162,6 @@ static void show_records(struct http_channel *c, struct http_session *s, int act } show_range_stop(s->psession, rl); - response_close(c, "show"); } @@ -1265,7 +1265,9 @@ static void cmd_show(struct http_channel *c) } } } + session_enter_ro(s->psession, "show_records"); show_records(c, s, status); + session_leave_ro(s->psession, "show_records"); release_session(c, s); }