Hi

Removes a GCC warning, and having this check doesn't hurt.

- Lauri
>From 86a989a0fb64e083af8dfb3624e5a21cd09f80a0 Mon Sep 17 00:00:00 2001
From: Lauri Kasanen <[email protected]>
Date: Fri, 1 Jun 2012 16:37:05 +0300
Subject: [PATCH] plugin: Check that the would-be-removed handler matches


Signed-off-by: Lauri Kasanen <[email protected]>
---
 src/mk_plugin.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mk_plugin.c b/src/mk_plugin.c
index 0324f34..62228c7 100644
--- a/src/mk_plugin.c
+++ b/src/mk_plugin.c
@@ -715,7 +715,7 @@ void mk_plugin_request_handler_add(struct session_request 
*sr, struct plugin *p)
 
 void mk_plugin_request_handler_del(struct session_request *sr, struct plugin 
*p)
 {
-    if (!sr->handled_by) {
+    if (!sr->handled_by || sr->handled_by != p) {
         return;
     }
 
-- 
1.7.2.1

_______________________________________________
Monkey mailing list
[email protected]
http://lists.monkey-project.com/listinfo/monkey

Reply via email to