/[projects]/smsdaemon/embedded-http/embeddedhttp.cpp
ViewVC logotype

Diff of /smsdaemon/embedded-http/embeddedhttp.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 682 by torben, Wed Apr 28 07:38:39 2010 UTC revision 683 by torben, Wed Apr 28 08:51:24 2010 UTC
# Line 9  Line 9 
9  #include "Common.h"  #include "Common.h"
10  #include "ConfigFile.h"  #include "ConfigFile.h"
11  #include <sstream>  #include <sstream>
12    #include <iomanip>
13  #include <stdlib.h>  #include <stdlib.h>
14    
15  void show_secret(struct mg_connection *conn, const struct mg_request_info *request_info, void *user_data) {  void show_secret(struct mg_connection *conn, const struct mg_request_info *request_info, void *user_data) {
# Line 28  void show_secret(struct mg_connection *c Line 29  void show_secret(struct mg_connection *c
29          os << "Status:" << std::endl;          os << "Status:" << std::endl;
30          os << "Recv: " << cmn->smsCounter.incomming << std::endl;          os << "Recv: " << cmn->smsCounter.incomming << std::endl;
31          os << "Send: " << cmn->smsCounter.outgoing << std::endl;          os << "Send: " << cmn->smsCounter.outgoing << std::endl;
32          os << "Uptime: " << days << "d, " << hour << ":" << min << ":" << sec;          os << "Uptime: " << days << "d, ";
33            os << std::setw(2) << std::setfill('0') << hour << ":";
34            os << std::setw(2) << min << ":" ;
35            os << std::setw(2) << sec;
36    
37          mg_printf(conn, "%s", "HTTP/1.1 200 OK\r\n");          mg_printf(conn, "%s", "HTTP/1.1 200 OK\r\n");
38          mg_printf(conn, "%s", "Content-Type: text/plain\r\n\r\n");          mg_printf(conn, "%s", "Content-Type: text/plain\r\n\r\n");

Legend:
Removed from v.682  
changed lines
  Added in v.683

  ViewVC Help
Powered by ViewVC 1.1.20