Skip to content

Commit a850551

Browse files
committed
ss allow build with disabled
1 parent 5465d9c commit a850551

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

lib/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,10 @@ if (NOT LWS_WITHOUT_SERVER OR LWS_WITH_SECURE_STREAMS_PROCESS_API)
212212
list(APPEND LWS_LIB_BUILD_INC_PATHS_TEMP ${CMAKE_CURRENT_SOURCE_DIR}/roles/listen)
213213
endif()
214214

215-
215+
if (LWS_WITH_SECURE_STREAMS)
216216
include_directories(secure-streams)
217+
endif()
218+
217219
list(APPEND LWS_LIB_BUILD_INC_PATHS_TEMP "${CMAKE_CURRENT_SOURCE_DIR}/../core")
218220

219221

lib/core/private-lib-core.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,9 @@ struct lws_ring {
321321
struct lws_protocols;
322322
struct lws;
323323

324+
#if defined(LWS_WITH_SECURE_STREAMS)
324325
#include "private-lib-secure-streams.h"
326+
#endif
325327

326328
#if defined(LWS_WITH_NETWORK) /* network */
327329
#include "private-lib-event-libs.h"

lib/misc/dlo/dlo-ss.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ lws_lhp_image_dimensions_cb(lws_sorted_usec_list_t *sul)
8484
lws_lhp_ss_html_parse_from_lhp(m->lhp);
8585
}
8686

87+
#if defined(LWS_WITH_SECURE_STREAMS)
88+
8789
/* secure streams payload interface */
8890

8991
static lws_ss_state_return_t
@@ -187,6 +189,7 @@ static LWS_SS_INFO("__default", dloss_t)
187189
.rx = dloss_rx,
188190
.state = dloss_state
189191
};
192+
#endif
190193

191194
/*
192195
* If we have an active image asset from this URL, return a pointer to its
@@ -196,6 +199,7 @@ static LWS_SS_INFO("__default", dloss_t)
196199
int
197200
lws_dlo_ss_find(struct lws_context *cx, const char *url, lws_dlo_image_t *u)
198201
{
202+
#if defined(LWS_WITH_SECURE_STREAMS)
199203
lws_start_foreach_dll(struct lws_dll2 *, d,
200204
lws_dll2_get_head(&cx->active_assets)) {
201205
dloss_t *ds = lws_container_of(d, dloss_t, active_asset_list);
@@ -207,13 +211,14 @@ lws_dlo_ss_find(struct lws_context *cx, const char *url, lws_dlo_image_t *u)
207211
}
208212

209213
} lws_end_foreach_dll(d);
210-
214+
#endif
211215
return 1; /* not found */
212216
}
213217

214218
int
215219
lws_dlo_ss_create(lws_dlo_ss_create_info_t *i, lws_dlo_t **pdlo)
216220
{
221+
#if defined(LWS_WITH_SECURE_STREAMS)
217222
lws_dlo_jpeg_t *dlo_jpeg = NULL;
218223
lws_dlo_png_t *dlo_png = NULL;
219224
size_t ul = strlen(i->url);
@@ -337,6 +342,6 @@ lws_dlo_ss_create(lws_dlo_ss_create_info_t *i, lws_dlo_t **pdlo)
337342
lws_display_dlo_jpeg_destroy(&dlo_jpeg->dlo);
338343
break;
339344
}
340-
345+
#endif
341346
return 1;
342347
}

0 commit comments

Comments
 (0)