[mw-devel] MW3 r1059 - trunk/src

psycodom at sucs.org psycodom at sucs.org
Fri Oct 24 12:58:53 BST 2008


Author: psycodom
Date: 2008-10-24 12:58:53 +0100 (Fri, 24 Oct 2008)
New Revision: 1059

Modified:
   trunk/src/js.c
Log:
Whoops, someone (ok me) missed a ! off all his DestroyLink()s so it was
moaning when the bind did exist but not if it didn't.



Modified: trunk/src/js.c
===================================================================
--- trunk/src/js.c	2008-10-08 16:04:34 UTC (rev 1058)
+++ trunk/src/js.c	2008-10-24 11:58:53 UTC (rev 1059)
@@ -572,7 +572,7 @@
 				JS_ReportError(cx, "Error: Empty bind");
 				return JS_TRUE;
 			}
-			if(DestroyLink(&bind_list, bind))
+			if(!DestroyLink(&bind_list, bind))
 			{
 				printf("Bind %s does not exist for unbinding.\n", bind);
 			}
@@ -583,7 +583,7 @@
 				printf("Error: Empty bind\n");
 				return JS_TRUE;
 			}
-			if (DestroyLink(&alias_list, bind))
+			if (!DestroyLink(&alias_list, bind))
 			{
 				printf("Alias %s does not exist for unbinding.\n", bind);
 			}
@@ -594,45 +594,45 @@
 				printf("Error: Empty bind\n");
 				return JS_TRUE;
 			}
-			if (DestroyLink(&rpc_list, bind))
+			if (!DestroyLink(&rpc_list, bind))
 			{
 				printf("RPC %s does not exist for unbinding.\n", bind);
 			}
 
 			break;
 		case K_BIND_EVENT:
-			if(DestroyLink(&event_list, function_name))
+			if(!DestroyLink(&event_list, function_name))
 			{
 				printf("Event bind %s does not exist for unbinding.\n", function_name);
 			}
 			break;
 		case K_BIND_ONOFF:
-			if(DestroyLink(&onoff_list, function_name))
+			if(!DestroyLink(&onoff_list, function_name))
 			{
 				printf("CheckOnOff bind %s does not exist for unbinding.\n", function_name);
 			}
 			break;
 		case K_BIND_IPC:
-			if(DestroyLink(&ipc_list, function_name))
+			if(!DestroyLink(&ipc_list, function_name))
 			{
 				printf("IPC bind %s does not exist for unbinding.\n", function_name);
 			}
 			break;
 		case K_BIND_FORCE:
-			if(DestroyLink(&force_list, function_name))
+			if(!DestroyLink(&force_list, function_name))
 			{
 				printf("Force bind %s does not exist for unbinding.\n", function_name);
 			}
 			break;
 		case K_BIND_SHUTDOWN:
-			if(DestroyLink(&shutdown_list, function_name))
+			if(!DestroyLink(&shutdown_list, function_name))
 			{
 				printf("Shutdown bind %s does not exist for unbinding.\n", function_name);
 			}
 			
 			break;
 		case K_BIND_INPUT:
-			if(DestroyLink(&eventin_list, function_name))
+			if(!DestroyLink(&eventin_list, function_name))
 			{
 				printf("Input Event bind %s does not exist for unbinding.\n", function_name);
 			}





More information about the mw-devel mailing list