mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
deprecate duplicated lws_protocol_get
Use the identical lws_get_protocol() Signed-off-by: Andy Green <andy@warmcat.com>
This commit is contained in:
parent
34b8161e04
commit
3dcbf6abc1
4 changed files with 10 additions and 9 deletions
|
@ -1644,8 +1644,9 @@ lws_init_vhost_client_ssl(const struct lws_context_creation_info *info,
|
|||
LWS_VISIBLE LWS_EXTERN struct lws_vhost *
|
||||
lws_vhost_get(struct lws *wsi);
|
||||
|
||||
/* deprecated: use lws_get_protocol */
|
||||
LWS_VISIBLE LWS_EXTERN const struct lws_protocols *
|
||||
lws_protocol_get(struct lws *wsi);
|
||||
lws_protocol_get(struct lws *wsi) LWS_WARN_DEPRECATED;
|
||||
|
||||
LWS_VISIBLE LWS_EXTERN void *
|
||||
lws_protocol_vh_priv_zalloc(struct lws_vhost *vhost, const struct lws_protocols *prot,
|
||||
|
|
|
@ -56,7 +56,7 @@ callback_dumb_increment(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
struct per_vhost_data__dumb_increment *vhd =
|
||||
(struct per_vhost_data__dumb_increment *)
|
||||
lws_protocol_vh_priv_get(lws_vhost_get(wsi),
|
||||
lws_protocol_get(wsi));
|
||||
lws_get_protocol(wsi));
|
||||
unsigned char buf[LWS_PRE + 512];
|
||||
unsigned char *p = &buf[LWS_PRE];
|
||||
int n, m;
|
||||
|
@ -64,10 +64,10 @@ callback_dumb_increment(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
switch (reason) {
|
||||
case LWS_CALLBACK_PROTOCOL_INIT:
|
||||
vhd = lws_protocol_vh_priv_zalloc(lws_vhost_get(wsi),
|
||||
lws_protocol_get(wsi),
|
||||
lws_get_protocol(wsi),
|
||||
sizeof(struct per_vhost_data__dumb_increment));
|
||||
vhd->context = lws_get_context(wsi);
|
||||
vhd->protocol = lws_protocol_get(wsi);
|
||||
vhd->protocol = lws_get_protocol(wsi);
|
||||
vhd->vhost = lws_vhost_get(wsi);
|
||||
uv_timer_init(lws_uv_getloop(vhd->context, 0),
|
||||
&vhd->timeout_watcher);
|
||||
|
|
|
@ -52,7 +52,7 @@ callback_dumb_increment(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
struct per_vhost_data__dumb_increment *vhd =
|
||||
(struct per_vhost_data__dumb_increment *)
|
||||
lws_protocol_vh_priv_get(lws_vhost_get(wsi),
|
||||
lws_protocol_get(wsi));
|
||||
lws_get_protocol(wsi));
|
||||
unsigned char buf[LWS_PRE + 512];
|
||||
unsigned char *p = &buf[LWS_PRE];
|
||||
int n, m;
|
||||
|
@ -60,10 +60,10 @@ callback_dumb_increment(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
switch (reason) {
|
||||
case LWS_CALLBACK_PROTOCOL_INIT:
|
||||
vhd = lws_protocol_vh_priv_zalloc(lws_vhost_get(wsi),
|
||||
lws_protocol_get(wsi),
|
||||
lws_get_protocol(wsi),
|
||||
sizeof(struct per_vhost_data__dumb_increment));
|
||||
vhd->context = lws_get_context(wsi);
|
||||
vhd->protocol = lws_protocol_get(wsi);
|
||||
vhd->protocol = lws_get_protocol(wsi);
|
||||
vhd->vhost = lws_vhost_get(wsi);
|
||||
uv_timer_init(lws_uv_getloop(vhd->context, 0),
|
||||
&vhd->timeout_watcher);
|
||||
|
|
|
@ -49,7 +49,7 @@ callback_lws_mirror(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
struct per_vhost_data__lws_mirror *v =
|
||||
(struct per_vhost_data__lws_mirror *)
|
||||
lws_protocol_vh_priv_get(lws_vhost_get(wsi),
|
||||
lws_protocol_get(wsi));
|
||||
lws_get_protocol(wsi));
|
||||
int n, m;
|
||||
|
||||
switch (reason) {
|
||||
|
@ -62,7 +62,7 @@ callback_lws_mirror(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
|
||||
case LWS_CALLBACK_PROTOCOL_INIT: /* per vhost */
|
||||
lws_protocol_vh_priv_zalloc(lws_vhost_get(wsi),
|
||||
lws_protocol_get(wsi),
|
||||
lws_get_protocol(wsi),
|
||||
sizeof(struct per_vhost_data__lws_mirror));
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue