]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Print out failure reasons
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 31 Oct 2016 21:14:32 +0000 (17:14 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 31 Oct 2016 21:14:32 +0000 (17:14 -0400)
src/modules/rlm_sigtran/libosmo-m3ua/sctp_m3ua_client.c

index dd2fe71113f2be58c7aad27e52dec2c47ef3d651..e2d7c1e63170938ee2f110892f98171fbfdbffe6 100644 (file)
@@ -318,7 +318,7 @@ static int m3ua_sctp_assoc_complete(struct osmo_fd *ofd, unsigned int what)
        osmo_fd_unregister(ofd);        /* Remove our connect callback */
 
        if (what & BSC_FD_EXCEPT) {
-               LOGP(DINP, LOGL_ERROR, "SCTP association failed errno: %d\n", errno);
+               LOGP(DINP, LOGL_ERROR, "SCTP association failed: %s.\n", strerror(errno));
                fail_link(link);
                return -1;
        }
@@ -376,7 +376,7 @@ static void m3ua_start(void *data)
        }
 
        if (bind(sctp, (struct sockaddr *) &link->local, sizeof(link->local)) != 0) {
-               LOGP(DINP, LOGL_ERROR, "Failed to bind.\n");
+               LOGP(DINP, LOGL_ERROR, "Failed to bind: %s.\n", strerror(errno));
                close(sctp);
                return fail_link(link);
        }
@@ -388,7 +388,7 @@ static void m3ua_start(void *data)
 
        ret = connect(sctp, (struct sockaddr *) &link->remote, sizeof(link->remote));
        if ((ret != 0) && (ret != EINPROGRESS)) {
-               LOGP(DINP, LOGL_ERROR, "Failed to connect\n");
+               LOGP(DINP, LOGL_ERROR, "Failed to connect: %s.\n", strerror(errno));
                close(sctp);
                return fail_link(link);
        }