Implementation of HTTPD protocol, gwbuf properties and a dmeo web application
interface to test the new httpd.
This commit is contained in:
@ -1171,3 +1171,28 @@ serviceGetWeightingParameter(SERVICE *service)
|
||||
{
|
||||
return service->weightby;
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterate over the services, calling a function per call
|
||||
*
|
||||
* @param fcn The function to call
|
||||
* @param data The data to pass to each call
|
||||
*/
|
||||
void
|
||||
serviceIterate(void (*fcn)(SERVICE *, void *), void *data)
|
||||
{
|
||||
SERVICE *service, *next;
|
||||
|
||||
spinlock_acquire(&service_spin);
|
||||
service = allServices;
|
||||
while (service)
|
||||
{
|
||||
next = service->next;
|
||||
spinlock_release(&service_spin);
|
||||
(*fcn)(service, data);
|
||||
spinlock_acquire(&service_spin);
|
||||
service = next;
|
||||
}
|
||||
spinlock_release(&service_spin);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user