exit(0);
}
-static struct afb_wsj1_itf itf = {
+constexpr static struct afb_wsj1_itf itf = {
onHangup, onCall, onEvent,
};
asprintf(&uribuf, "ws://localhost:%d/api?token=%s", port, token);
/* connect the websocket wsj1 to the uri given by the first argument */
- wsj1 = afb_ws_client_connect_wsj1(loop, uribuf, &itf, nullptr);
+ wsj1 = afb_ws_client_connect_wsj1(
+ loop, uribuf, const_cast<struct afb_wsj1_itf *>(&itf), nullptr);
if (wsj1 == nullptr) {
sd_event_unref(loop);
fprintf(stderr, "Connection to %s failed: %m\n", uribuf);