Просмотр исходного кода

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 лет назад
Родитель
Сommit
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;
 	}