Simple HTTP Server with one page index.html stored inside MBED as char vector and javascript to update a table content
Fork of HTTP_SERVER by
Diff: handlers/Filehandler.cpp
- Revision:
- 7:184c6f1ace94
- Parent:
- 0:cc483bea4fe3
- Child:
- 10:4a48594c2f44
diff -r 4eb469f51570 -r 184c6f1ace94 handlers/Filehandler.cpp --- a/handlers/Filehandler.cpp Sat Nov 26 19:15:20 2016 +0000 +++ b/handlers/Filehandler.cpp Mon Nov 28 08:27:42 2016 +0000 @@ -25,10 +25,11 @@ { FILE *tmp; - printf("\r\nfp: %d@FileHandler::open\r\n", fp); + printf("\r\n" + "fp: %d@FileHandler::open\r\n", fp); if (fullpath != NULL) free(fullpath); fullpath = (char*)malloc(sizeof(char) * (strlen("/local/") + strlen(arg_filepath) + strlen("index.htm") + 1)); - printf("\r\nfp: %d@FileHandler::open\r\n", fp); + printf("fp: %d@FileHandler::open\r\n", fp); // Path formatting if (arg_filepath[0] == '/') { @@ -81,12 +82,12 @@ int FileHandler::close() { int tmp; - - if(fp != NULL){ + + if(fp != NULL) { tmp = fclose(fp); fp = NULL; return tmp; - } else{ + } else { return 1; } }