[libss7-commits] mattf: trunk r80 - /trunk/ss7linktest.c

libss7-commits at lists.digium.com libss7-commits at lists.digium.com
Wed May 2 08:47:44 MST 2007


Author: mattf
Date: Wed May  2 10:47:44 2007
New Revision: 80

URL: http://svn.digium.com/view/libss7?view=rev&rev=80
Log:
Let's make sure we get that logic right...

Modified:
    trunk/ss7linktest.c

Modified: trunk/ss7linktest.c
URL: http://svn.digium.com/view/libss7/trunk/ss7linktest.c?view=diff&rev=80&r1=79&r2=80
==============================================================================
--- trunk/ss7linktest.c (original)
+++ trunk/ss7linktest.c Wed May  2 10:47:44 2007
@@ -234,9 +234,9 @@
 	}
 	channum = atoi(argv[1]);
 
-	if (strcasecmp(argv[2], "ansi")) {
+	if (!strcasecmp(argv[2], "ansi")) {
 		type = SS7_ANSI;
-	} else if (strcasecmp(argv[2], "itu")) {
+	} else if (!strcasecmp(argv[2], "itu")) {
 		type = SS7_ITU;
 	} else {
 		print_args();
@@ -247,6 +247,9 @@
 	dpc = atoi(argv[4]);
 
 	fd = zap_open(channum);
+
+	if (fd == -1)
+		return -1;
 
 	if (!(ss7 = ss7_new(type))) {
 		perror("ss7_new");



More information about the libss7-commits mailing list