Added SILC HTTP Server API
[runtime.git] / lib / silchttp / silchttpserver.c
index f43b26a354d8fd0703d82beab9929246e57586df..0cc3ccdc67afd7eb8a8e35c498ee7a32650d6871 100644 (file)
@@ -17,7 +17,7 @@
 
 */
 
-#include "silc.h"
+#include "silcruntime.h"
 #include "silchttpserver.h"
 
 /************************** Types and definitions ***************************/
@@ -93,7 +93,8 @@ static void silc_http_server_close_connection(SilcHttpConnection conn)
 static SilcBool silc_http_server_parse(SilcHttpServer httpd,
                                       SilcHttpConnection conn)
 {
-  SilcUInt32 data_len, cll;
+  SilcUInt32 data_len;
+  unsigned long cll;
   unsigned char *data, *tmp;
   const char *value, *cl;
   SilcBufferStruct postdata;
@@ -457,6 +458,9 @@ SilcHttpServer silc_http_server_alloc(const char *ip, SilcUInt16 port,
 
   SILC_LOG_DEBUG(("Start HTTP server at %s:%d", ip, port));
 
+  if (!schedule)
+    schedule = silc_schedule_get_global();
+
   if (!ip || !schedule || !callback)
     return FALSE;