Skip to content

Commit

Permalink
Merge pull request Mbed-TLS#323 from JonathanLennox/objdir-build-fix
Browse files Browse the repository at this point in the history
Fix rtpw invocation if srcdir != objdir
  • Loading branch information
pabuhler authored Jul 31, 2017
2 parents 9e54896 + 9c3a00c commit 846d13d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ runtest: test
test/roc_driver$(EXE) -v >/dev/null
test/replay_driver$(EXE) -v >/dev/null
test/dtls_srtp_driver$(EXE) >/dev/null
cd test; $(abspath $(srcdir))/test/rtpw_test.sh >/dev/null
cd test; $(abspath $(srcdir))/test/rtpw_test.sh -w $(abspath $(srcdir))/test/words.txt >/dev/null
ifeq (1, $(USE_OPENSSL))
cd test; $(abspath $(srcdir))/test/rtpw_test_gcm.sh >/dev/null
cd test; $(abspath $(srcdir))/test/rtpw_test_gcm.sh -w $(abspath $(srcdir))/test/words.txt >/dev/null
endif
@echo "libsrtp2 test applications passed."
$(MAKE) -C crypto runtest
Expand Down
12 changes: 8 additions & 4 deletions test/rtpw.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
* This app is a simple RTP application intended only for testing
* libsrtp. It reads one word at a time from words.txt (or
* whatever file is specified as DICT_FILE), and sends one word out
* whatever file is specified as DICT_FILE or with -w), and sends one word out
* each USEC_RATE microseconds. Secure RTP protections can be
* applied. See the usage() function for more details.
*
Expand Down Expand Up @@ -198,7 +198,7 @@ main (int argc, char *argv[]) {

/* check args */
while (1) {
c = getopt_s(argc, argv, "b:k:rsgt:ae:ld:");
c = getopt_s(argc, argv, "b:k:rsgt:ae:ld:w:");
if (c == -1) {
break;
}
Expand Down Expand Up @@ -247,6 +247,9 @@ main (int argc, char *argv[]) {
case 'l':
do_list_mods = 1;
break;
case 'w':
dictfile = optarg_s;
break;
default:
usage(argv[0]);
}
Expand Down Expand Up @@ -640,8 +643,9 @@ usage(char *string) {
" -s act as rtp sender\n"
" -r act as rtp receiver\n"
" -l list debug modules\n"
" -d <debug> turn on debugging for module <debug>\n",
string, string);
" -d <debug> turn on debugging for module <debug>\n"
" -w <wordsfile> use <wordsfile> for input, rather than %s\n",
string, string, DICT_FILE);
exit(1);

}
Expand Down

0 comments on commit 846d13d

Please sign in to comment.