mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-28 12:30:58 +00:00
Add sizep param to mg_file_read()
This commit is contained in:
1 parent
381d7cce54
commit
4528cc28ef
7 files changed
+14
-12
No files matched your search
@@ -143,8 +143,8 @@ static void broadcast_mjpeg_frame(struct mg_mgr *mgr) {
|
||||
size_t nfiles = sizeof(files) / sizeof(files[0]);
|
||||
static size_t i;
|
||||
const char *path = files[i++ % nfiles];
|
||||
size_t size = mg_file_size(path);
|
||||
char *data = mg_file_read(path); // Read next file
|
||||
size_t size = 0;
|
||||
char *data = mg_file_read(path, &size); // Read next file
|
||||
struct mg_connection *c;
|
||||
for (c = mgr->conns; c != NULL; c = c->next) {
|
||||
if (c->label[0] != 'S') continue; // Skip non-stream connections
|
||||
|
||||
@@ -32,8 +32,8 @@ static void broadcast_mjpeg_frame(struct mg_mgr *mgr) {
|
||||
size_t nfiles = sizeof(files) / sizeof(files[0]);
|
||||
static size_t i;
|
||||
const char *path = files[i++ % nfiles];
|
||||
size_t size = mg_file_size(path);
|
||||
char *data = mg_file_read(path); // Read next file
|
||||
size_t size = 0;
|
||||
char *data = mg_file_read(path, &size); // Read next file
|
||||
struct mg_connection *c;
|
||||
for (c = mgr->conns; c != NULL; c = c->next) {
|
||||
if (c->label[0] != 'S') continue; // Skip non-stream connections
|
||||
|
||||
Reference in new issue
Block a user