Lines Matching refs:sock_ctx
107 static struct lwm2m_ctx *sock_ctx[MAX_POLL_FD]; variable
116 struct lwm2m_ctx **lwm2m_sock_ctx(void) { return sock_ctx; } in lwm2m_sock_ctx()
547 sock_ctx[sock_nfds] = ctx; in lwm2m_socket_add()
560 if (sock_ctx[i] != ctx) { in lwm2m_socket_update()
573 if (sock_ctx[i] != ctx) { in lwm2m_socket_del()
581 sock_ctx[i] = sock_ctx[sock_nfds]; in lwm2m_socket_del()
587 sock_ctx[sock_nfds] = NULL; in lwm2m_socket_del()
772 if (sock_ctx[i] != NULL) { in socket_reset_pollfd_events()
773 lwm2m_client_lock(sock_ctx[i]); in socket_reset_pollfd_events()
774 set_pollout = !sys_slist_is_empty(&sock_ctx[i]->pending_sends); in socket_reset_pollfd_events()
775 lwm2m_client_unlock(sock_ctx[i]); in socket_reset_pollfd_events()
825 struct lwm2m_ctx *ctx = sock_ctx[i]; in socket_loop()
881 if (sock_ctx[i] != NULL && sock_ctx[i]->sock_fd < 0) { in socket_loop()
887 if (sock_ctx[i] != NULL && sock_ctx[i]->fault_cb != NULL) { in socket_loop()
888 sock_ctx[i]->fault_cb(EIO); in socket_loop()
894 while (sock_ctx[i]) { in socket_loop()
895 rc = socket_recv_message(sock_ctx[i]); in socket_loop()
901 hint_socket_state(sock_ctx[i], NULL); in socket_loop()
905 rc = socket_send_message(sock_ctx[i]); in socket_loop()
910 if (sock_ctx[i] != NULL && sock_ctx[i]->fault_cb != NULL) { in socket_loop()
911 sock_ctx[i]->fault_cb(-rc); in socket_loop()