moar c++11alisation

master
john stone 8 years ago
parent 8df97cdb3a
commit 926fe29317
  1. 3
      src/DynamicObjects.cc
  2. 4
      src/Routerin.H
  3. 2
      src/Routerin.cc
  4. 15
      src/sicmain.cc

@ -1,4 +1,3 @@
#include "DynamicObjects.H"
//add parameter for ordering??
@ -23,7 +22,7 @@ std::string DynamicObjects::render_object_list()
}
//<li>
//<a href="/file/23/Foobar.jpg">Foobar.jpg</a> <span class="size">80 KB</span>
//<span class="stats"><b>42×</b> seit 1.1.1970 0:00 Uhr</span> //<--- TODO
//<span class="stats"><b>42×</b> seit 1.1.1970 0:00 Uhr</span> //<--- TODO
//</li>
//

@ -29,7 +29,9 @@ public:
//after configuration:
void start(void);
void function_name()
{
}
/*enum mg_result { MG_FALSE, MG_TRUE, MG_MORE };*/
//enum mg_event {

@ -207,7 +207,7 @@ int Routerin::rq_upload(char const * const reststr __attribute__((unused)),
// get Dynamic Object form Upload
// Persist
// render thankyou page
return 1;
return MG_TRUE;
}
/*int Routerin::event_requend_route(struct mg_connection *conn __attribute__((unused)) ){*/

@ -23,7 +23,6 @@ class MongooseHandler{
// = {"listening_ports", "8080", NULL};
//
struct mg_server * srv;
public:
@ -129,12 +128,8 @@ static void signalhandler(int signum){
}
}
static void exithandlerfunc(){
std::cout << "alles hat ein ende" << std::endl;
}
int main(int argc, char **argv)
auto main(int argc, char **argv)->int
{
killme = false;
if ( !configfile_parsing_action(argc, argv) ) {
@ -145,7 +140,9 @@ int main(int argc, char **argv)
#ifdef DEBUG
dump_args();
if (std::atexit(&exithandlerfunc))
if (std::atexit(
[](){std::cout << "alles hat ein ende" << std::endl;}
))
exit(-4);
#endif
struct sigaction sa;
@ -165,12 +162,8 @@ int main(int argc, char **argv)
std::cerr << "json_path: "<< merouterin->get_json_path() << "\n";
std::cerr << "file_path: "<< merouterin->get_file_path() << "\n";
MongooseHandler *m = new MongooseHandler(args_info.port_arg);
if (!args_info.daemonize_flag) {
while((not killme))
m->serveloop(1000);

Loading…
Cancel
Save