1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

minimal http client multi: rename struct user so it cant conflict

This commit is contained in:
Andy Green 2019-12-08 04:41:21 +00:00
parent 2eeec91d3d
commit fb25b64b83

View file

@ -36,13 +36,13 @@
#define COUNT 8
struct user {
struct cliuser {
int index;
};
static int interrupted, completed, failed, numbered, stagger_idx;
static struct lws *client_wsi[COUNT];
static struct user user[COUNT];
static struct cliuser cliuser[COUNT];
static lws_sorted_usec_list_t sul_stagger;
static struct lws_client_connect_info i;
struct lws_context *context;
@ -51,7 +51,7 @@ static int
callback_http(struct lws *wsi, enum lws_callback_reasons reason,
void *user, void *in, size_t len)
{
struct user *u = (struct user *)user;
struct cliuser *u = (struct cliuser *)cliuser;
switch (reason) {
@ -194,8 +194,8 @@ lws_try_client_connection(struct lws_client_connect_info *i, int m)
i->path = "/";
i->pwsi = &client_wsi[m];
user[m].index = m;
i->userdata = &user[m];
cliuser[m].index = m;
i->userdata = &cliuser[m];
if (!lws_client_connect_via_info(i)) {
failed++;