[dahdi-commits] dbailey: tools/trunk r5827 - /tools/trunk/fxstest.c

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Tue Jan 27 09:14:36 CST 2009


Author: dbailey
Date: Tue Jan 27 09:14:36 2009
New Revision: 5827

URL: http://svn.digium.com/svn-view/dahdi?view=rev&rev=5827
Log:
Break VMWI ioctl calls into two separate calls to maintain old revision compatibility 

(issue #14104)
Reported by: alecdavis
Tested by: dbailey


Modified:
    tools/trunk/fxstest.c

Modified: tools/trunk/fxstest.c
URL: http://svn.digium.com/svn-view/dahdi/tools/trunk/fxstest.c?view=diff&rev=5827&r1=5826&r2=5827
==============================================================================
--- tools/trunk/fxstest.c (original)
+++ tools/trunk/fxstest.c Tue Jan 27 09:14:36 2009
@@ -82,25 +82,25 @@
 		} else if ( !strcasecmp(argv[2], "hvdc") ) {
 			mwisend_setting.vmwi_type = DAHDI_VMWI_HVDC;
 		}
-
-		mwisend_setting.messages = 1;
-		res = ioctl(fd, DAHDI_VMWI, &mwisend_setting);
+		res = ioctl(fd, DAHDI_VMWI_CONFIG, &mwisend_setting);
+
+		x = 1;
+		res = ioctl(fd, DAHDI_VMWI, &x);
 		if (res) {
 			fprintf(stderr, "Unable to set %s ...\n", argv[2]);
 		} else {
 			fprintf(stderr, "Set 1 Voice Message...\n");
 
 			sleep(5);
-			mwisend_setting.messages = 2;
-			ioctl(fd, DAHDI_VMWI, &mwisend_setting);
+			x = 2;
+			ioctl(fd, DAHDI_VMWI, &x);
 			fprintf(stderr, "Set 2 Voice Messages...\n");
 
 			sleep(5);
-			mwisend_setting.messages = 0;
-			ioctl(fd, DAHDI_VMWI, &mwisend_setting);
+			x = 0;
+			ioctl(fd, DAHDI_VMWI, &x);
 			fprintf(stderr, "Set No Voice messages...\n");
 			sleep(2);
-
 			mwisend_setting.vmwi_type = 0;
 		}
 	} else if (!strcasecmp(argv[2], "ring")) {




More information about the dahdi-commits mailing list