[mw-devel] [Git][arthur/mw][master] Fix 'Unknown message type' when user doesn't have +s

Andrew Price welshbyte at sucs.org
Sat Nov 10 23:51:04 GMT 2018


Andrew Price pushed to branch master at Justin Mitchell / mw


Commits:
df189737 by Andrew Price at 2018-11-10T23:48:38+00:00
Fix 'Unknown message type' when user doesn't have +s

- - - - -


1 changed file:

- src/client/incoming.c


Changes:

=====================================
src/client/incoming.c
=====================================
--- a/src/client/incoming.c
+++ b/src/client/incoming.c
@@ -553,14 +553,16 @@ static void display_content(ipc_message_t *msg)
 			gaglist_append(json_string_value(jgag));
 		}
 	} else
-	if (msg->head.type == IPC_CHECKONOFF && cp_test(user, CP_SCRIPT)) {
-		struct mstack *ms;
-
-		ms = calloc(1, sizeof(*ms));
-		ms->flags = MST_SCREV;
-		ms->preamble = EST_CHECKONOFF;
-		ms->from = strdup(whom);
-		InsertMesg(ms, msg);
+	if (msg->head.type == IPC_CHECKONOFF) {
+		if (cp_test(user, CP_SCRIPT)) {
+			struct mstack *ms;
+
+			ms = calloc(1, sizeof(*ms));
+			ms->flags = MST_SCREV;
+			ms->preamble = EST_CHECKONOFF;
+			ms->from = strdup(whom);
+			InsertMesg(ms, msg);
+		}
 	} else {
 		printf("Unknown message type %4.4s", (char *)&msg->head.type);
 	}



View it on GitLab: https://projects.sucs.org/arthur/mw/commit/df189737e3c272e9215f9f2a873562cb2c48ab45

-- 
View it on GitLab: https://projects.sucs.org/arthur/mw/commit/df189737e3c272e9215f9f2a873562cb2c48ab45
You're receiving this email because of your account on projects.sucs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20181110/ecefa486/attachment.html>


More information about the mw-devel mailing list