/* Copyright (C) 2015-2020, Dirk Krause SPDX-License-Identifier: BSD-3-Clause */ /* WARNING: This file was generated by the dkct program (see http://dktools.sourceforge.net/ for details). Changes you make here will be lost if dkct is run again! You should modify the original source and run dkct on it. Original source: dk4socka04.ctr */ /** @file dk4socka04.c The dk4socka04 module. */ #line 10 "dk4socka04.ctr" #include "dk4conf.h" #include "dk4sock.h" #include "dk4socka.h" #include "dk4mem.h" #line 19 "dk4socka04.ctr" int dk4socket_bind_app( dk4_socket_t sock, const struct sockaddr *pAddr, size_t szAddr, dk4_app_t *app ) { dkChar buf[128]; dk4_er_t er; size_t szbuf = DK4_SIZEOF(buf,dkChar); int back = DK4_SOCKET_RESULT_FAILED; int res; dk4error_init(&er); back = dk4socket_bind(sock, pAddr, szAddr, &er); if (DK4_SOCKET_RESULT_SUCCESS != back) { if (0 != dk4app_log_do(app, DK4_LL_ERROR)) { res = dk4socket_addr_port_to_text( buf, szbuf, pAddr->sa_family, pAddr, szAddr, NULL ); if (DK4_SOCKET_RESULT_SUCCESS == res) { dk4socket_log_simple_3(app, DK4_LL_ERROR, 129, 130, buf, &er); } else { dk4socket_log_simple_1(app, DK4_LL_ERROR, 4, &er); } } } return back; }