Using mg_connection::callback_param for mg_iterate_over_connection()

This commit is contained in:
Sergey Lyubka committed 2014-02-06 10:00:20 +00:00
1 parent c9036f3ac0
commit a3a63f7e56
4 files changed
+6 -5

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ extern const char *find_embedded_file(const char *, size_t *);
static int iterate_callback(struct mg_connection *c) {
if (c->is_websocket) {
char buf[20];
int len = snprintf(buf, sizeof(buf), "%d", * (int *) c->connection_param);
int len = snprintf(buf, sizeof(buf), "%d", * (int *) c->callback_param);
mg_websocket_write(c, 1, buf, len);
}
return MG_REQUEST_PROCESSED;