Optimize code

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
This commit is contained in:
Jianhui Zhao committed 2017-12-29 16:09:47 +08:00
1 parent 8a8680f92a
commit 70f5016e61
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -48,7 +48,7 @@ err:
return -1;
}
bool handle_action_request(struct uh_client *cl, char *path)
bool handle_action_request(struct uh_client *cl, const char *path)
{
struct uh_action *a;
+1 -1
View File
@@ -34,7 +34,7 @@ struct uh_action {
int uh_add_action(struct uh_server *srv, const char *path, action_cb_t cb);
bool handle_action_request(struct uh_client *cl, char *url);
bool handle_action_request(struct uh_client *cl, const char *path);
void uh_action_free(struct uh_server *srv);
+1 -1
View File
@@ -394,7 +394,7 @@ error:
cl->send_error(cl, 403, "Forbidden", "You don't have permission to access %s on this server.", path);
}
bool handle_file_request(struct uh_client *cl, char *path)
bool handle_file_request(struct uh_client *cl, const char *path)
{
struct path_info *pi;
+1 -1
View File
@@ -34,6 +34,6 @@ struct mimetype {
const char *mime;
};
bool handle_file_request(struct uh_client *cl, char *url);
bool handle_file_request(struct uh_client *cl, const char *path);
#endif