3 #include "http_vhostdb.h"
8 static http_vhostdb_backend_t http_vhostdb_backends
[8];
10 void http_vhostdb_dumbdata_reset (void)
12 memset(http_vhostdb_backends
, 0, sizeof(http_vhostdb_backends
));
15 const http_vhostdb_backend_t
* http_vhostdb_backend_get (const buffer
*name
)
18 while (NULL
!= http_vhostdb_backends
[i
].name
19 && 0 != strcmp(http_vhostdb_backends
[i
].name
, name
->ptr
)) {
22 return (NULL
!= http_vhostdb_backends
[i
].name
)
23 ? http_vhostdb_backends
+i
27 void http_vhostdb_backend_set (const http_vhostdb_backend_t
*backend
)
30 while (NULL
!= http_vhostdb_backends
[i
].name
) ++i
;
31 /*(must resize http_vhostdb_backends[] if too many different backends)*/
33 i
< (sizeof(http_vhostdb_backends
)/sizeof(http_vhostdb_backend_t
))-1);
34 memcpy(http_vhostdb_backends
+i
, backend
, sizeof(http_vhostdb_backend_t
));