On Wed, Apr 06, 2016 at 09:26:57PM +0200, Holger Freyther wrote:
Hi,
sua.c: In function 'rx_inact_tmr_cb':
sua.c:288: warning: unused variable 'conn'
sua.c: In function 'sua_rx_coref':
sua.c:908: warning: unused variable 'cause'
sua.c: In function 'sua_rx_codt':
sua.c:1059: warning: unused variable 'cur'
sua.c: In function 'sua_srv_conn_cb':
sua.c:1266: error: 'SCTP_SENDER_DRY_EVENT' undeclared (first use in this
function)
sua.c:1266: error: (Each undeclared identifier is reported only once
sua.c:1266: error: for each function it appears in.)
sua.c: In function 'sua_cli_read_cb':
sua.c:1451: error: 'SCTP_SENDER_DRY_EVENT' undeclared (first use in this
function)
can we make the SCTP_SENDER_DRY_EVENT optional or is a strict requirement? If it is
strict then maybe we can check for this in autoconf?
It's completely unnecessary, I only added logging for it. Before, it printed a
notification for "32777", and we surely want to know what that's supposed
to
mean.
We could add a conditional define like
#ifndef SCTP_SENDER_DRY_EVENT
#define SCTP_SENDER_DRY_EVENT ((1<<15)+9)
#endif
because sctp.h defines the value both as enum *and* as a #define:
enum sctp_sn_type {
SCTP_SN_TYPE_BASE = (1<<15),
SCTP_ASSOC_CHANGE,
#define SCTP_ASSOC_CHANGE SCTP_ASSOC_CHANGE
SCTP_PEER_ADDR_CHANGE,
#define SCTP_PEER_ADDR_CHANGE SCTP_PEER_ADDR_CHANGE
SCTP_SEND_FAILED,
#define SCTP_SEND_FAILED SCTP_SEND_FAILED
SCTP_REMOTE_ERROR,
#define SCTP_REMOTE_ERROR SCTP_REMOTE_ERROR
SCTP_SHUTDOWN_EVENT,
#define SCTP_SHUTDOWN_EVENT SCTP_SHUTDOWN_EVENT
SCTP_PARTIAL_DELIVERY_EVENT,
#define SCTP_PARTIAL_DELIVERY_EVENT SCTP_PARTIAL_DELIVERY_EVENT
SCTP_ADAPTATION_INDICATION,
#define SCTP_ADAPTATION_INDICATION SCTP_ADAPTATION_INDICATION
SCTP_AUTHENTICATION_INDICATION,
#define SCTP_AUTHENTICATION_INDICATION SCTP_AUTHENTICATION_INDICATION
SCTP_SENDER_DRY_EVENT,
#define SCTP_SENDER_DRY_EVENT SCTP_SENDER_DRY_EVENT
};
Not sure though whether we should rely on this.
I could also hardcode 32777, but that's not such a good idea either.
Last resort is to not log the event and hope that all of us know what 32777 is
all about.
~Neels