uhttpd: rename struct uh_path_info to path_info, drop wdir member

This commit is contained in:
Jo-Philipp Wich 2010-03-20 14:31:05 +00:00
parent 35e6a59ef2
commit 074690aa54
7 changed files with 10 additions and 11 deletions

View file

@ -132,7 +132,7 @@ static void uh_cgi_error_500(struct client *cl, struct http_request *req, const
} }
void uh_cgi_request(struct client *cl, struct http_request *req, struct uh_path_info *pi) void uh_cgi_request(struct client *cl, struct http_request *req, struct path_info *pi)
{ {
int i, hdroff, bufoff; int i, hdroff, bufoff;
int hdrlen = 0; int hdrlen = 0;

View file

@ -25,7 +25,7 @@
#include <linux/limits.h> #include <linux/limits.h>
void uh_cgi_request( void uh_cgi_request(
struct client *cl, struct http_request *req, struct uh_path_info *pi struct client *cl, struct http_request *req, struct path_info *pi
); );
#endif #endif

View file

@ -248,7 +248,7 @@ static int uh_file_scandir_filter_dir(const struct dirent *e)
return strcmp(e->d_name, ".") ? 1 : 0; return strcmp(e->d_name, ".") ? 1 : 0;
} }
static void uh_file_dirlist(struct client *cl, struct http_request *req, struct uh_path_info *pi) static void uh_file_dirlist(struct client *cl, struct http_request *req, struct path_info *pi)
{ {
int i, count; int i, count;
char filename[PATH_MAX]; char filename[PATH_MAX];
@ -314,7 +314,7 @@ static void uh_file_dirlist(struct client *cl, struct http_request *req, struct
} }
void uh_file_request(struct client *cl, struct http_request *req, struct uh_path_info *pi) void uh_file_request(struct client *cl, struct http_request *req, struct path_info *pi)
{ {
int fd, rlen; int fd, rlen;
char buf[UH_LIMIT_MSGHEAD]; char buf[UH_LIMIT_MSGHEAD];

View file

@ -32,7 +32,7 @@ struct mimetype {
}; };
void uh_file_request( void uh_file_request(
struct client *cl, struct http_request *req, struct uh_path_info *pi struct client *cl, struct http_request *req, struct path_info *pi
); );
#endif #endif

View file

@ -352,11 +352,11 @@ int uh_path_normalize(char *buf, int blen, const char *src, int slen)
} }
struct uh_path_info * uh_path_lookup(struct client *cl, const char *url) struct path_info * uh_path_lookup(struct client *cl, const char *url)
{ {
static char path_phys[PATH_MAX]; static char path_phys[PATH_MAX];
static char path_info[PATH_MAX]; static char path_info[PATH_MAX];
static struct uh_path_info p; static struct path_info p;
char buffer[UH_LIMIT_MSGHEAD]; char buffer[UH_LIMIT_MSGHEAD];
char *docroot = cl->server->conf->docroot; char *docroot = cl->server->conf->docroot;

View file

@ -31,9 +31,8 @@
#define foreach_header(i, h) \ #define foreach_header(i, h) \
for( i = 0; (i + 1) < (sizeof(h) / sizeof(h[0])) && h[i]; i += 2 ) for( i = 0; (i + 1) < (sizeof(h) / sizeof(h[0])) && h[i]; i += 2 )
struct uh_path_info { struct path_info {
char *root; char *root;
char *wdir;
char *phys; char *phys;
char *name; char *name;
char *info; char *info;
@ -74,7 +73,7 @@ int uh_urldecode(char *buf, int blen, const char *src, int slen);
int uh_urlencode(char *buf, int blen, const char *src, int slen); int uh_urlencode(char *buf, int blen, const char *src, int slen);
int uh_path_normalize(char *buf, int blen, const char *src, int slen); int uh_path_normalize(char *buf, int blen, const char *src, int slen);
struct uh_path_info * uh_path_lookup(struct client *cl, const char *url); struct path_info * uh_path_lookup(struct client *cl, const char *url);
struct listener * uh_listener_add(int sock, struct config *conf); struct listener * uh_listener_add(int sock, struct config *conf);
struct listener * uh_listener_lookup(int sock); struct listener * uh_listener_lookup(int sock);

View file

@ -347,7 +347,7 @@ int main (int argc, char **argv)
/* working structs */ /* working structs */
struct addrinfo hints; struct addrinfo hints;
struct http_request *req; struct http_request *req;
struct uh_path_info *pin; struct path_info *pin;
struct client *cl; struct client *cl;
struct sigaction sa; struct sigaction sa;
struct config conf; struct config conf;