diff --git a/http_server.c b/http_server.c index a37aab8..cc25984 100644 --- a/http_server.c +++ b/http_server.c @@ -62,7 +62,7 @@ void accept_request(int client) } sprintf(path, server_config.htdocs); strcat(path, url); - //printf("path is : %s \n", path); + LOG("Path is : %s \n", path); //if (path[strlen(path) - 1] == '/') // strcat(path, "index.html"); if (stat(path, &st) == -1) { diff --git a/plugins/plugin.c b/plugins/plugin.c index 307464b..debfe35 100644 --- a/plugins/plugin.c +++ b/plugins/plugin.c @@ -19,8 +19,9 @@ sqldb __getdb(char *name) int plen = strlen(name)+strlen(__plugin__.dbpath)+4; char* path = (char*) malloc(plen*sizeof(char)); strcpy(path,__plugin__.dbpath); - strcat(path,__plugin__.name); + strcat(path,name); strcat(path,".db"); + LOG("data base: %s\n", path); sqldb ret = (sqldb)database(path); free(path); return ret;