Skip to content

Commit

Permalink
Removed serveFunction - now calling orion::requestServe() directly
Browse files Browse the repository at this point in the history
  • Loading branch information
kzangeli committed Mar 7, 2018
1 parent 74c7a9c commit 124c24a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 2 additions & 5 deletions src/lib/rest/rest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
* Globals
*/
static unsigned short port = 0;
static RestServeFunction serveFunction = NULL;
static char bindIp[MAX_LEN_IP] = "0.0.0.0";
static char bindIPv6[MAX_LEN_IP] = "::";
IpVersion ipVersionUsed = IPDUAL;
Expand Down Expand Up @@ -1559,7 +1558,7 @@ static int connectionTreat
}
else
{
serveFunction(ciP);
orion::requestServe(ciP);
}

return MHD_YES;
Expand Down Expand Up @@ -1766,8 +1765,7 @@ void restInit
int _corsMaxAge,
int _mhdTimeoutInSeconds,
const char* _httpsKey,
const char* _httpsCertificate,
RestServeFunction _serveFunction
const char* _httpsCertificate
)
{
const char* key = _httpsKey;
Expand All @@ -1777,7 +1775,6 @@ void restInit

port = _port;
ipVersionUsed = _ipVersion;
serveFunction = (_serveFunction != NULL)? _serveFunction : orion::requestServe;
multitenant = _multitenant;
connMemory = _connectionMemory;
maxConns = _maxConnections;
Expand Down
3 changes: 1 addition & 2 deletions src/lib/rest/rest.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ extern void restInit
int _corsMaxAge,
int _mhdTimeoutInSeconds,
const char* _httpsKey = NULL,
const char* _httpsCert = NULL,
RestServeFunction _serveFunction = NULL
const char* _httpsCert = NULL
);


Expand Down

0 comments on commit 124c24a

Please sign in to comment.