Changeset 25

Show
Ignore:
Timestamp:
03/13/04 23:34:52 (5 years ago)
Author:
minaguib
Message:

Implemented simple callback http://foo.bar:2060/about for testing

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/incorporate_libhttpd/wifidog/src/common.h

    r22 r25  
    4444#include <errno.h> 
    4545 
     46#include "httpd.h" 
     47 
    4648#include "gateway.h" 
    4749#include "conf.h" 
     
    5355#include "centralserver.h" 
    5456 
    55 #include "httpd.h" 
    56  
    5757#define MAX_BUF 4096 
    5858 
  • branches/incorporate_libhttpd/wifidog/src/gateway.c

    r24 r25  
    4747                exit(1); 
    4848         } 
     49    debug(D_LOG_DEBUG, "Assigning callbacks to web server"); 
     50         httpdAddCContent(webserver, "/", "about", 0, NULL, http_callback_about); 
    4951 
    5052         // Init the signals to catch chld/quit/etc 
  • branches/incorporate_libhttpd/wifidog/src/http.c

    r22 r25  
    195195} 
    196196 
     197void http_callback_about(httpd * webserver) 
     198{ 
     199        httpdOutput(webserver, "<html><body><h1>About:</h1>"); 
     200        httpdOutput(webserver, "This is WiFiDog. Copyright (C) 2004 and released under the GNU GPL license."); 
     201        httpdOutput(webserver, "<p>"); 
     202        httpdOutput(webserver, "For more information visit <a href='http://www.ilesansfil.org/wiki/WiFiDog'>http://www.ilesansfil.org/wiki/WiFiDog</a>"); 
     203        httpdOutput(webserver, "</body></html>"); 
     204} 
     205 
  • branches/incorporate_libhttpd/wifidog/src/http.h

    r22 r25  
    3434char *gmtdate(); 
    3535 
     36void http_callback_about(httpd * webserver); 
     37 
    3638#endif /* _HTTP_H_ */