SILC_LOG_DEBUG(("URI: '%s'", conn->uri));
/* Protocol version compatibility */
- tmp = memchr(tmp, '\0', data_len - (tmp - data)) + 1;
+ tmp = ((unsigned char *)memchr(tmp, '\0', data_len - (tmp - data))) + 1;
SILC_LOG_DEBUG(("Protocol: %s", tmp));
if (strstr(tmp, "HTTP/1.0"))
conn->keepalive = FALSE;
/* Check we have received all data */
cl = silc_mime_get_field(conn->curheaders, "Content-Length");
- if (cl && sscanf(cl, "%lu", (unsigned long *)&cll) == 1) {
+ if (cl && sscanf(cl, "%lu", &cll) == 1) {
if (data_len < cll) {
/* More data to come */
silc_mime_free(conn->curheaders);
/* Accepts new connection */
-static void silc_http_server_new_connection(SilcNetStatus status,
+static void silc_http_server_new_connection(SilcResult status,
SilcStream stream,
void *context)
{
SILC_LOG_DEBUG(("Start HTTP server at %s:%d", ip, port));
+ if (!schedule)
+ schedule = silc_schedule_get_global();
+
if (!ip || !schedule || !callback)
return FALSE;