Skip to content

Commit

Permalink
Remove CachingApp hierarchy as quick fix for fuzzing
Browse files Browse the repository at this point in the history
  • Loading branch information
uNetworkingAB committed Nov 21, 2024
1 parent 1f0e581 commit 607b8f6
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 76 deletions.
2 changes: 1 addition & 1 deletion build.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ int main(int argc, char **argv) {
char *CXX = strcpy(calloc(1024, 1), or_else(getenv("CXX"), "g++"));
char *EXEC_SUFFIX = strcpy(calloc(1024, 1), maybe(getenv("EXEC_SUFFIX")));

char *EXAMPLE_FILES[] = {"EchoBody", "CachingApp", "HelloWorldThreaded", "Http3Server", "Broadcast", "HelloWorld", "Crc32", "ServerName",
char *EXAMPLE_FILES[] = {"EchoBody", "HelloWorldThreaded", "Http3Server", "Broadcast", "HelloWorld", "Crc32", "ServerName",
"EchoServer", "BroadcastingEchoServer", "UpgradeSync", "UpgradeAsync", "ParameterRoutes"};

strcat(CXXFLAGS, " -march=native -O3 -Wpedantic -Wall -Wextra -Wsign-conversion -Wconversion -std=c++20 -Isrc -IuSockets/src");
Expand Down
133 changes: 64 additions & 69 deletions src/App.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/AsyncSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct AsyncSocket {
/* This guy is promiscuous */
template <bool> friend struct HttpContext;
template <bool, bool, typename> friend struct WebSocketContext;
template <bool, typename> friend struct TemplatedAppBase;
template <bool> friend struct TemplatedApp;
template <bool, typename> friend struct WebSocketContextData;
template <typename, typename> friend struct TopicTree;
template <bool> friend struct HttpResponse;
Expand Down
2 changes: 1 addition & 1 deletion src/HttpContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ template<bool> struct HttpResponse;

template <bool SSL>
struct HttpContext {
template<bool, typename> friend struct TemplatedAppBase;
template<bool> friend struct TemplatedApp;
template<bool> friend struct HttpResponse;
private:
HttpContext() = delete;
Expand Down
2 changes: 1 addition & 1 deletion src/HttpContextData.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ template <bool SSL>
struct alignas(16) HttpContextData {
template <bool> friend struct HttpContext;
template <bool> friend struct HttpResponse;
template <bool, typename> friend struct TemplatedAppBase;
template <bool> friend struct TemplatedApp;
private:
std::vector<MoveOnlyFunction<void(HttpResponse<SSL> *, int)>> filterHandlers;

Expand Down
2 changes: 1 addition & 1 deletion src/HttpResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static const int HTTP_TIMEOUT_S = 10;
template <bool SSL>
struct HttpResponse : public AsyncSocket<SSL> {
/* Solely used for getHttpResponseData() */
template <bool, typename> friend struct TemplatedAppBase;
template <bool> friend struct TemplatedApp;
typedef AsyncSocket<SSL> Super;
private:
HttpResponseData<SSL> *getHttpResponseData() {
Expand Down
2 changes: 1 addition & 1 deletion src/WebSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace uWS {

template <bool SSL, bool isServer, typename USERDATA>
struct WebSocket : AsyncSocket<SSL> {
template <bool, typename> friend struct TemplatedAppBase;
template <bool> friend struct TemplatedApp;
template <bool> friend struct HttpResponse;
private:
typedef AsyncSocket<SSL> Super;
Expand Down
2 changes: 1 addition & 1 deletion src/WebSocketContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace uWS {

template <bool SSL, bool isServer, typename USERDATA>
struct WebSocketContext {
template <bool, typename> friend struct TemplatedAppBase;
template <bool> friend struct TemplatedApp;
template <bool, typename> friend struct WebSocketProtocol;
private:
WebSocketContext() = delete;
Expand Down

0 comments on commit 607b8f6

Please sign in to comment.