mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 23:53:26 +02:00
added force_crash to test crashing behavior
This commit is contained in:
parent
58b74e1f58
commit
c1b22dfdd6
1 changed files with 11 additions and 0 deletions
|
@ -110,6 +110,17 @@ void VoxelServer::initMongoose(int port) {
|
|||
|
||||
int VoxelServer::civetwebRequestHandler(struct mg_connection* connection) {
|
||||
const struct mg_request_info* ri = mg_get_request_info(connection);
|
||||
|
||||
if (strcmp(ri->uri, "/force_crash") == 0 && strcmp(ri->request_method, "GET") == 0) {
|
||||
qDebug() << "About to force a crash!\n";
|
||||
int foo;
|
||||
int* forceCrash = &foo;
|
||||
mg_printf(connection, "%s", "HTTP/1.0 200 OK\r\n\r\n");
|
||||
mg_printf(connection, "%s", "forcing a crash....\r\n");
|
||||
delete[] forceCrash;
|
||||
mg_printf(connection, "%s", "did it crash....\r\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (strcmp(ri->uri, "/") == 0 && strcmp(ri->request_method, "GET") == 0) {
|
||||
uint64_t checkSum;
|
||||
|
|
Loading…
Reference in a new issue