Browse Source
make sessions start on any request and clean them when they have timed out.
release0.1.5
make sessions start on any request and clean them when they have timed out.
release0.1.5
19 changed files with 294 additions and 131 deletions
-
31include/application/application.h
-
3include/http/worker.h
-
9include/session.h
-
2src/Makefile.am
-
160src/application/adapter/http/update.c
-
25src/application/application.c
-
33src/application/login.c
-
5src/application/session_get.c
-
12src/application/session_start.c
-
6src/application/session_stop.c
-
20src/application/session_update.c
-
3src/http/Makefile.am
-
7src/http/response/session.c
-
7src/http/worker.c
-
47src/http/worker/add_computed_header.c
-
2src/http/worker/process.c
-
20src/session/session.c
-
15src/taskrambler.c
-
18src/uuid.c
@ -0,0 +1,47 @@ |
|||||
|
/** |
||||
|
* \file |
||||
|
* |
||||
|
* \author Georg Hopp |
||||
|
* |
||||
|
* \copyright |
||||
|
* Copyright © 2012 Georg Hopp |
||||
|
* |
||||
|
* This program 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 Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
|
*/ |
||||
|
|
||||
|
#include <sys/types.h> |
||||
|
|
||||
|
#include "class.h" |
||||
|
|
||||
|
#include "http/message.h" |
||||
|
#include "http/header.h" |
||||
|
#include "http/worker.h" |
||||
|
|
||||
|
#include "queue.h" |
||||
|
|
||||
|
#include "utils/memory.h" |
||||
|
|
||||
|
|
||||
|
void |
||||
|
httpWorkerAddComputedHeader(HttpWorker this) |
||||
|
{ |
||||
|
HttpHeader header = (HttpHeader)queueGet(this->additional_headers); |
||||
|
|
||||
|
while(NULL != header) { |
||||
|
hashAdd(this->current_response->header, header); |
||||
|
header = (HttpHeader)queueGet(this->additional_headers); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// vim: set ts=4 sw=4: |
||||
@ -0,0 +1,18 @@ |
|||||
|
#include <uuid/uuid.h> |
||||
|
#include <stdio.h> |
||||
|
|
||||
|
int |
||||
|
main(int argc, char * argv[]) |
||||
|
{ |
||||
|
uuid_t uuid; |
||||
|
char uuid_str[37]; |
||||
|
|
||||
|
uuid_generate(uuid); |
||||
|
uuid_unparse(uuid, uuid_str); |
||||
|
|
||||
|
printf("%s\n", uuid_str); |
||||
|
|
||||
|
return 0; |
||||
|
} |
||||
|
|
||||
|
// vim: set ts=4 sw=4: |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue