more handlers

Dependents:   bandwidth-meter-net mbedRail24v

Fork of Tiny-HTTPD by ban4jp -

Files at this revision

API Documentation at this revision

Comitter:
Jasper
Date:
Fri May 30 03:55:43 2014 +0000
Parent:
2:905fe8dfebd6
Commit message:
NULL isn't always 0, we need more handlers

Changed in this revision

HTTPD.h Show annotated file Show diff for this revision Revisions of this file
HTTPD_util.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 905fe8dfebd6 -r 145c65ab9805 HTTPD.h
--- a/HTTPD.h	Tue Feb 04 03:07:05 2014 +0000
+++ b/HTTPD.h	Fri May 30 03:55:43 2014 +0000
@@ -29,7 +29,7 @@
 #define HTTPD_MAX_CLIENTS 1
 #define HTTPD_KEEPALIVE 0 // keep-alive off
 #define HTTPD_TIMEOUT 15000
-#define HTTPD_MAX_HANDLES 10
+#define HTTPD_MAX_HANDLES 12
  
 #define HTTPD_CMD_SIZE 100
 #define HTTPD_BUF_SIZE 256
diff -r 905fe8dfebd6 -r 145c65ab9805 HTTPD_util.cpp
--- a/HTTPD_util.cpp	Tue Feb 04 03:07:05 2014 +0000
+++ b/HTTPD_util.cpp	Fri May 30 03:55:43 2014 +0000
@@ -84,7 +84,7 @@
     int i;
 
     for (i = 0; i < _handler_count; i ++) {
-        if (strncmp(uri, _handler[i].uri, strlen(_handler[i].uri)) == NULL) {
+        if (strncmp(uri, _handler[i].uri, strlen(_handler[i].uri)) == 0) {
             // found
             return i;
         }