Implementation of HTTPD protocol, gwbuf properties and a dmeo web application

interface to test the new httpd.
This commit is contained in:
Mark Riddoch
2014-07-15 17:39:31 +01:00
parent 4ddc9c81a1
commit 6fd5dff349
14 changed files with 898 additions and 168 deletions

View File

@ -756,3 +756,28 @@ session_getUser(SESSION *session)
{
return (session && session->client) ? session->client->user : NULL;
}
/**
* Iterate over the sessions, calling a function per call
*
* @param fcn The function to call
* @param data The data to pass to each call
*/
void
sessionIterate(void (*fcn)(SESSION *, void *), void *data)
{
SESSION *session, *next;
spinlock_acquire(&session_spin);
session = allSessions;
while (session)
{
next = session->next;
spinlock_release(&session_spin);
(*fcn)(session, data);
spinlock_acquire(&session_spin);
session = next;
}
spinlock_release(&session_spin);
}