Skip to content

Commit

Permalink
add more debug flags to build. commit new libjnsctp.so with extra deb…
Browse files Browse the repository at this point in the history
…ug prints
  • Loading branch information
bbaldino committed Feb 1, 2017
1 parent 4f128c9 commit 3d4739d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
Binary file modified lib/native/linux-x86-64/libjnsctp.so
Binary file not shown.
1 change: 1 addition & 0 deletions src/native/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,7 @@
outfile="${native_install_dir}/jnsctp"
objdir="${obj}">

<compilerarg value="-g" />
<compilerarg value="-D_JNI_IMPLEMENTATION_" />
<compilerarg value="-DINET6=1" />
<compilerarg value="-fPIC" />
Expand Down
6 changes: 3 additions & 3 deletions src/native/sctp/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ CC=gcc
JNI_HEADERS = -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/linux"
SCTP_HEADERS = -I"usrsctp/usrsctplib"

#CFLAGS = -Wall -Werror -std=c99 $(JNI_HEADERS) $(SCTP_HEADERS) -DSCTP_DEBUG=1 -DINET6=1
CFLAGS = -Wall -Werror -std=c99 $(JNI_HEADERS) $(SCTP_HEADERS) -DINET6=1
CFLAGS = -Wall -Werror -std=c99 $(JNI_HEADERS) $(SCTP_HEADERS) -DSCTP_DEBUG=1 -DINET6=1
#CFLAGS = -Wall -Werror -std=c99 $(JNI_HEADERS) $(SCTP_HEADERS) -DINET6=1

OBJS = org_jitsi_sctp4j_Sctp.c

LIBS = -lusrsctp -lpthread
LIBS = -L"usrsctp/.libs" -lusrsctp -lpthread

libjnsctp.so: clean
$(CC) $(CFLAGS) -fPIC -shared $(OBJS) -o libjnsctp.so $(LIBS)
Expand Down
4 changes: 4 additions & 0 deletions src/native/sctp/org_jitsi_sctp4j_Sctp.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,16 @@ Java_org_jitsi_sctp4j_Sctp_usrsctp_1init
* First argument is udp_encapsulation_port which is not relevant to our
* AF_CONN use of SCTP.
*/
debugSctpPrintf("=====>: org_jitsi_sctp4j_Sctp.c calling init\n");
usrsctp_init((uint16_t) port, onSctpOutboundPacket, debugSctpPrintf);

debugSctpPrintf("=====>: org_jitsi_sctp4j_Sctp.c about to set SCTP_DEBUG_ALL\n");
#ifdef SCTP_DEBUG
debugSctpPrintf("=====>: org_jitsi_sctp4j_Sctp.c setting SCTP_DEBUG_ALL\n");
usrsctp_sysctl_set_sctp_debug_on(SCTP_DEBUG_ALL);
#endif


/* TODO(ldixon) Consider turning this on/off. */
usrsctp_sysctl_set_sctp_ecn_enable(0);

Expand Down
1 change: 1 addition & 0 deletions src/org/jitsi/sctp4j/Sctp.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ public static synchronized void init()
// return;
if(!initialized)
{
logger.error("Init'ing brian's patched usrsctp");
usrsctp_init(0);
initialized = true;
}
Expand Down

0 comments on commit 3d4739d

Please sign in to comment.