r_heartbeat.c (1da177e4c3f41524e886b7f1b8a0c1fc7321cac2) | r_heartbeat.c (8818760512424f60ad9fafb7a087b007a9274eb3) |
---|---|
1 2/* 3 * This program is free software; you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation; either version 2 of the License, or 6 * (at your option) any later version. 7 * 8 * This program is distributed in the hope that it will be useful, --- 49 unchanged lines hidden (view full) --- 58 * processor fails to respond 3 times or we were interrupted. 59 */ 60int ibmasm_start_reverse_heartbeat(struct service_processor *sp, struct reverse_heartbeat *rhb) 61{ 62 struct command *cmd; 63 int times_failed = 0; 64 int result = 1; 65 | 1 2/* 3 * This program is free software; you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation; either version 2 of the License, or 6 * (at your option) any later version. 7 * 8 * This program is distributed in the hope that it will be useful, --- 49 unchanged lines hidden (view full) --- 58 * processor fails to respond 3 times or we were interrupted. 59 */ 60int ibmasm_start_reverse_heartbeat(struct service_processor *sp, struct reverse_heartbeat *rhb) 61{ 62 struct command *cmd; 63 int times_failed = 0; 64 int result = 1; 65 |
66 cmd = ibmasm_new_command(sizeof rhb_dot_cmd); | 66 cmd = ibmasm_new_command(sp, sizeof rhb_dot_cmd); |
67 if (!cmd) 68 return -ENOMEM; 69 70 while (times_failed < 3) { 71 memcpy(cmd->buffer, (void *)&rhb_dot_cmd, sizeof rhb_dot_cmd); 72 cmd->status = IBMASM_CMD_PENDING; 73 ibmasm_exec_command(sp, cmd); 74 ibmasm_wait_for_response(cmd, IBMASM_CMD_TIMEOUT_NORMAL); --- 24 unchanged lines hidden --- | 67 if (!cmd) 68 return -ENOMEM; 69 70 while (times_failed < 3) { 71 memcpy(cmd->buffer, (void *)&rhb_dot_cmd, sizeof rhb_dot_cmd); 72 cmd->status = IBMASM_CMD_PENDING; 73 ibmasm_exec_command(sp, cmd); 74 ibmasm_wait_for_response(cmd, IBMASM_CMD_TIMEOUT_NORMAL); --- 24 unchanged lines hidden --- |