Преглед на файлове

IPC: Call lib function only when it's possible

send_ok was incorrectly tested as boolean, even it's errno type
variable.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Jan Friesse преди 13 години
родител
ревизия
e3cef955bf
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      exec/ipc_glue.c

+ 1 - 1
exec/ipc_glue.c

@@ -635,7 +635,7 @@ static int32_t cs_ipcs_msg_process(qb_ipcs_connection_t *c,
 		res = -ENOBUFS;
 	}
 
-	if (send_ok) {
+	if (send_ok >= 0) {
 		corosync_service[service]->lib_engine[request_pt->id].lib_handler_fn(c, request_pt);
 		res = 0;
 	}