logger_t *logger;
httpd_callbacks_t callbacks;
- int use_rtsp;
-
int max_connections;
int open_connections;
http_connection_t *connections;
};
httpd_t *
-httpd_init(logger_t *logger, httpd_callbacks_t *callbacks, int max_connections, int use_rtsp)
+httpd_init(logger_t *logger, httpd_callbacks_t *callbacks, int max_connections)
{
httpd_t *httpd;
return NULL;
}
- httpd->use_rtsp = !!use_rtsp;
httpd->max_connections = max_connections;
httpd->connections = calloc(max_connections, sizeof(http_connection_t));
if (!httpd->connections) {
/* If not in the middle of request, allocate one */
if (!connection->request) {
- connection->request = http_request_init(httpd->use_rtsp);
+ connection->request = http_request_init();
assert(connection->request);
}
}
written += ret;
}
+
+ if (http_response_get_disconnect(response)) {
+ logger_log(httpd->logger, LOGGER_INFO, "Disconnecting on software request");
+ httpd_remove_connection(httpd, connection);
+ }
} else {
logger_log(httpd->logger, LOGGER_INFO, "Didn't get response");
}
http_response_destroy(response);
+ } else {
+ logger_log(httpd->logger, LOGGER_DEBUG, "Request not complete, waiting for more data...");
}
}
}