4
0

evs.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. /*
  2. * Copyright (c) 2004-2006 MontaVista Software, Inc.
  3. * Copyright (c) 2006 Red Hat, Inc.
  4. * Copyright (c) 2006 Sun Microsystems, Inc.
  5. *
  6. * All rights reserved.
  7. *
  8. * Author: Steven Dake (sdake@mvista.com)
  9. *
  10. * This software licensed under BSD license, the text of which follows:
  11. *
  12. * Redistribution and use in source and binary forms, with or without
  13. * modification, are permitted provided that the following conditions are met:
  14. *
  15. * - Redistributions of source code must retain the above copyright notice,
  16. * this list of conditions and the following disclaimer.
  17. * - Redistributions in binary form must reproduce the above copyright notice,
  18. * this list of conditions and the following disclaimer in the documentation
  19. * and/or other materials provided with the distribution.
  20. * - Neither the name of the MontaVista Software, Inc. nor the names of its
  21. * contributors may be used to endorse or promote products derived from this
  22. * software without specific prior written permission.
  23. *
  24. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  25. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  26. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  27. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  28. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  29. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  30. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  31. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  32. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  33. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  34. * THE POSSIBILITY OF SUCH DAMAGE.
  35. */
  36. #include <sys/types.h>
  37. #include <sys/socket.h>
  38. #include <sys/un.h>
  39. #include <sys/ioctl.h>
  40. #include <netinet/in.h>
  41. #include <sys/uio.h>
  42. #include <unistd.h>
  43. #include <fcntl.h>
  44. #include <stdlib.h>
  45. #include <stdio.h>
  46. #include <errno.h>
  47. #include <signal.h>
  48. #include <time.h>
  49. #include <netinet/in.h>
  50. #include <arpa/inet.h>
  51. #include "swab.h"
  52. #include "totem.h"
  53. #include "../include/saAis.h"
  54. #include "../include/ipc_gen.h"
  55. #include "../include/ipc_evs.h"
  56. #include "../include/list.h"
  57. #include "../include/queue.h"
  58. #include "../lcr/lcr_comp.h"
  59. #include "totempg.h"
  60. #include "main.h"
  61. #include "ipc.h"
  62. #include "mempool.h"
  63. #include "service.h"
  64. #include "print.h"
  65. enum evs_exec_message_req_types {
  66. MESSAGE_REQ_EXEC_EVS_MCAST = 0
  67. };
  68. /*
  69. * Service Interfaces required by service_message_handler struct
  70. */
  71. static int evs_exec_init_fn(struct objdb_iface_ver0 *objdb);
  72. static void evs_confchg_fn (
  73. enum totem_configuration_type configuration_type,
  74. unsigned int *member_list, int member_list_entries,
  75. unsigned int *left_list, int left_list_entries,
  76. unsigned int *joined_list, int joined_list_entries,
  77. struct memb_ring_id *ring_id);
  78. static void message_handler_req_exec_mcast (void *msg, unsigned int nodeid);
  79. static void req_exec_mcast_endian_convert (void *msg);
  80. static void message_handler_req_evs_join (void *conn, void *msg);
  81. static void message_handler_req_evs_leave (void *conn, void *msg);
  82. static void message_handler_req_evs_mcast_joined (void *conn, void *msg);
  83. static void message_handler_req_evs_mcast_groups (void *conn, void *msg);
  84. static void message_handler_req_evs_membership_get (void *conn, void *msg);
  85. static int evs_lib_init_fn (void *conn);
  86. static int evs_lib_exit_fn (void *conn);
  87. struct evs_pd {
  88. struct evs_group *groups;
  89. int group_entries;
  90. struct list_head list;
  91. void *conn;
  92. };
  93. static struct openais_lib_handler evs_lib_service[] =
  94. {
  95. { /* 0 */
  96. .lib_handler_fn = message_handler_req_evs_join,
  97. .response_size = sizeof (struct res_lib_evs_join),
  98. .response_id = MESSAGE_RES_EVS_JOIN,
  99. .flow_control = OPENAIS_FLOW_CONTROL_NOT_REQUIRED
  100. },
  101. { /* 1 */
  102. .lib_handler_fn = message_handler_req_evs_leave,
  103. .response_size = sizeof (struct res_lib_evs_leave),
  104. .response_id = MESSAGE_RES_EVS_LEAVE,
  105. .flow_control = OPENAIS_FLOW_CONTROL_NOT_REQUIRED
  106. },
  107. { /* 2 */
  108. .lib_handler_fn = message_handler_req_evs_mcast_joined,
  109. .response_size = sizeof (struct res_lib_evs_mcast_joined),
  110. .response_id = MESSAGE_RES_EVS_MCAST_JOINED,
  111. .flow_control = OPENAIS_FLOW_CONTROL_REQUIRED
  112. },
  113. { /* 3 */
  114. .lib_handler_fn = message_handler_req_evs_mcast_groups,
  115. .response_size = sizeof (struct res_lib_evs_mcast_groups),
  116. .response_id = MESSAGE_RES_EVS_MCAST_GROUPS,
  117. .flow_control = OPENAIS_FLOW_CONTROL_REQUIRED
  118. },
  119. { /* 4 */
  120. .lib_handler_fn = message_handler_req_evs_membership_get,
  121. .response_size = sizeof (struct res_lib_evs_membership_get),
  122. .response_id = MESSAGE_RES_EVS_MEMBERSHIP_GET,
  123. .flow_control = OPENAIS_FLOW_CONTROL_NOT_REQUIRED
  124. }
  125. };
  126. static struct openais_exec_handler evs_exec_service[] =
  127. {
  128. {
  129. .exec_handler_fn = message_handler_req_exec_mcast,
  130. .exec_endian_convert_fn = req_exec_mcast_endian_convert
  131. }
  132. };
  133. struct openais_service_handler evs_service_handler = {
  134. .name = "openais extended virtual synchrony service",
  135. .id = EVS_SERVICE,
  136. .private_data_size = sizeof (struct evs_pd),
  137. .flow_control = OPENAIS_FLOW_CONTROL_REQUIRED,
  138. .lib_init_fn = evs_lib_init_fn,
  139. .lib_exit_fn = evs_lib_exit_fn,
  140. .lib_service = evs_lib_service,
  141. .lib_service_count = sizeof (evs_lib_service) / sizeof (struct openais_lib_handler),
  142. .exec_service = evs_exec_service,
  143. .exec_service_count = sizeof (evs_exec_service) / sizeof (struct openais_exec_handler),
  144. .confchg_fn = evs_confchg_fn,
  145. .exec_init_fn = evs_exec_init_fn,
  146. .exec_dump_fn = NULL
  147. };
  148. static DECLARE_LIST_INIT (confchg_notify);
  149. /*
  150. * Dynamic loading descriptor
  151. */
  152. static struct openais_service_handler *evs_get_service_handler_ver0 (void);
  153. static struct openais_service_handler_iface_ver0 evs_service_handler_iface = {
  154. .openais_get_service_handler_ver0 = evs_get_service_handler_ver0
  155. };
  156. static struct lcr_iface openais_evs_ver0[1] = {
  157. {
  158. .name = "openais_evs",
  159. .version = 0,
  160. .versions_replace = 0,
  161. .versions_replace_count = 0,
  162. .dependencies = 0,
  163. .dependency_count = 0,
  164. .constructor = NULL,
  165. .destructor = NULL,
  166. .interfaces = NULL,
  167. }
  168. };
  169. static struct lcr_comp evs_comp_ver0 = {
  170. .iface_count = 1,
  171. .ifaces = openais_evs_ver0
  172. };
  173. static struct openais_service_handler *evs_get_service_handler_ver0 (void)
  174. {
  175. return (&evs_service_handler);
  176. }
  177. __attribute__ ((constructor)) static void evs_comp_register (void) {
  178. lcr_interfaces_set (&openais_evs_ver0[0], &evs_service_handler_iface);
  179. lcr_component_register (&evs_comp_ver0);
  180. }
  181. static int evs_exec_init_fn(struct objdb_iface_ver0 *objdb)
  182. {
  183. (void) objdb;
  184. log_init ("EVS");
  185. return 0;
  186. }
  187. struct res_evs_confchg_callback res_evs_confchg_callback;
  188. static void evs_confchg_fn (
  189. enum totem_configuration_type configuration_type,
  190. unsigned int *member_list, int member_list_entries,
  191. unsigned int *left_list, int left_list_entries,
  192. unsigned int *joined_list, int joined_list_entries,
  193. struct memb_ring_id *ring_id)
  194. {
  195. struct list_head *list;
  196. struct evs_pd *evs_pd;
  197. /*
  198. * Build configuration change message
  199. */
  200. res_evs_confchg_callback.header.size = sizeof (struct res_evs_confchg_callback);
  201. res_evs_confchg_callback.header.id = MESSAGE_RES_EVS_CONFCHG_CALLBACK;
  202. res_evs_confchg_callback.header.error = SA_AIS_OK;
  203. memcpy (res_evs_confchg_callback.member_list,
  204. member_list, member_list_entries * sizeof(*member_list));
  205. res_evs_confchg_callback.member_list_entries = member_list_entries;
  206. memcpy (res_evs_confchg_callback.left_list,
  207. left_list, left_list_entries * sizeof(*left_list));
  208. res_evs_confchg_callback.left_list_entries = left_list_entries;
  209. memcpy (res_evs_confchg_callback.joined_list,
  210. joined_list, joined_list_entries * sizeof(*joined_list));
  211. res_evs_confchg_callback.joined_list_entries = joined_list_entries;
  212. /*
  213. * Send configuration change message to every EVS library user
  214. */
  215. for (list = confchg_notify.next; list != &confchg_notify; list = list->next) {
  216. evs_pd = list_entry (list, struct evs_pd, list);
  217. openais_conn_send_response (evs_pd->conn,
  218. &res_evs_confchg_callback,
  219. sizeof (res_evs_confchg_callback));
  220. }
  221. }
  222. static int evs_lib_init_fn (void *conn)
  223. {
  224. struct evs_pd *evs_pd = (struct evs_pd *)openais_conn_private_data_get (conn);
  225. log_printf (LOG_LEVEL_DEBUG, "Got request to initalize evs service.\n");
  226. evs_pd->groups = NULL;
  227. evs_pd->group_entries = 0;
  228. evs_pd->conn = conn;
  229. list_init (&evs_pd->list);
  230. list_add (&evs_pd->list, &confchg_notify);
  231. openais_conn_send_response (conn, &res_evs_confchg_callback,
  232. sizeof (res_evs_confchg_callback));
  233. return (0);
  234. }
  235. static int evs_lib_exit_fn (void *conn)
  236. {
  237. struct evs_pd *evs_pd = (struct evs_pd *)openais_conn_private_data_get (conn);
  238. list_del (&evs_pd->list);
  239. return (0);
  240. }
  241. static void message_handler_req_evs_join (void *conn, void *msg)
  242. {
  243. evs_error_t error = EVS_OK;
  244. struct req_lib_evs_join *req_lib_evs_join = (struct req_lib_evs_join *)msg;
  245. struct res_lib_evs_join res_lib_evs_join;
  246. void *addr;
  247. struct evs_pd *evs_pd = (struct evs_pd *)openais_conn_private_data_get (conn);
  248. if (req_lib_evs_join->group_entries > 50) {
  249. error = EVS_ERR_TOO_MANY_GROUPS;
  250. goto exit_error;
  251. }
  252. addr = realloc (evs_pd->groups, sizeof (struct evs_group) *
  253. (evs_pd->group_entries + req_lib_evs_join->group_entries));
  254. if (addr == NULL) {
  255. error = SA_AIS_ERR_NO_MEMORY;
  256. goto exit_error;
  257. }
  258. evs_pd->groups = addr;
  259. memcpy (&evs_pd->groups[evs_pd->group_entries],
  260. req_lib_evs_join->groups,
  261. sizeof (struct evs_group) * req_lib_evs_join->group_entries);
  262. evs_pd->group_entries += req_lib_evs_join->group_entries;
  263. exit_error:
  264. res_lib_evs_join.header.size = sizeof (struct res_lib_evs_join);
  265. res_lib_evs_join.header.id = MESSAGE_RES_EVS_JOIN;
  266. res_lib_evs_join.header.error = error;
  267. openais_conn_send_response (conn, &res_lib_evs_join,
  268. sizeof (struct res_lib_evs_join));
  269. }
  270. static void message_handler_req_evs_leave (void *conn, void *msg)
  271. {
  272. struct req_lib_evs_leave *req_lib_evs_leave = (struct req_lib_evs_leave *)msg;
  273. struct res_lib_evs_leave res_lib_evs_leave;
  274. evs_error_t error = EVS_OK;
  275. int error_index;
  276. int i, j;
  277. int found;
  278. struct evs_pd *evs_pd = (struct evs_pd *)openais_conn_private_data_get (conn);
  279. for (i = 0; i < req_lib_evs_leave->group_entries; i++) {
  280. found = 0;
  281. for (j = 0; j < evs_pd->group_entries;) {
  282. if (memcmp (&req_lib_evs_leave->groups[i],
  283. &evs_pd->groups[j], sizeof (struct evs_group)) == 0) {
  284. /*
  285. * Delete entry
  286. */
  287. memmove (&evs_pd->groups[j], &evs_pd->groups[j + 1],
  288. (evs_pd->group_entries - j - 1) * sizeof (struct evs_group));
  289. evs_pd->group_entries -= 1;
  290. found = 1;
  291. break;
  292. } else {
  293. j++;
  294. }
  295. }
  296. if (found == 0) {
  297. error = EVS_ERR_NOT_EXIST;
  298. error_index = i;
  299. break;
  300. }
  301. }
  302. res_lib_evs_leave.header.size = sizeof (struct res_lib_evs_leave);
  303. res_lib_evs_leave.header.id = MESSAGE_RES_EVS_LEAVE;
  304. res_lib_evs_leave.header.error = error;
  305. openais_conn_send_response (conn, &res_lib_evs_leave,
  306. sizeof (struct res_lib_evs_leave));
  307. }
  308. static void message_handler_req_evs_mcast_joined (void *conn, void *msg)
  309. {
  310. evs_error_t error = EVS_ERR_TRY_AGAIN;
  311. struct req_lib_evs_mcast_joined *req_lib_evs_mcast_joined = (struct req_lib_evs_mcast_joined *)msg;
  312. struct res_lib_evs_mcast_joined res_lib_evs_mcast_joined;
  313. struct iovec req_exec_evs_mcast_iovec[3];
  314. struct req_exec_evs_mcast req_exec_evs_mcast;
  315. int send_ok = 0;
  316. int res;
  317. struct evs_pd *evs_pd = (struct evs_pd *)openais_conn_private_data_get (conn);
  318. req_exec_evs_mcast.header.size = sizeof (struct req_exec_evs_mcast) +
  319. evs_pd->group_entries * sizeof (struct evs_group) +
  320. req_lib_evs_mcast_joined->msg_len;
  321. req_exec_evs_mcast.header.id =
  322. SERVICE_ID_MAKE (EVS_SERVICE, MESSAGE_REQ_EXEC_EVS_MCAST);
  323. req_exec_evs_mcast.msg_len = req_lib_evs_mcast_joined->msg_len;
  324. req_exec_evs_mcast.group_entries = evs_pd->group_entries;
  325. req_exec_evs_mcast_iovec[0].iov_base = (char *)&req_exec_evs_mcast;
  326. req_exec_evs_mcast_iovec[0].iov_len = sizeof (req_exec_evs_mcast);
  327. req_exec_evs_mcast_iovec[1].iov_base = (char *)evs_pd->groups;
  328. req_exec_evs_mcast_iovec[1].iov_len = evs_pd->group_entries * sizeof (struct evs_group);
  329. req_exec_evs_mcast_iovec[2].iov_base = (char *)&req_lib_evs_mcast_joined->msg;
  330. req_exec_evs_mcast_iovec[2].iov_len = req_lib_evs_mcast_joined->msg_len;
  331. // TODO this doesn't seem to work for some reason
  332. send_ok = totempg_groups_send_ok_joined (openais_group_handle, req_exec_evs_mcast_iovec, 3);
  333. res = totempg_groups_mcast_joined (openais_group_handle, req_exec_evs_mcast_iovec, 3, TOTEMPG_AGREED);
  334. // TODO
  335. if (res == 0) {
  336. error = EVS_OK;
  337. }
  338. res_lib_evs_mcast_joined.header.size = sizeof (struct res_lib_evs_mcast_joined);
  339. res_lib_evs_mcast_joined.header.id = MESSAGE_RES_EVS_MCAST_JOINED;
  340. res_lib_evs_mcast_joined.header.error = error;
  341. openais_conn_send_response (conn, &res_lib_evs_mcast_joined,
  342. sizeof (struct res_lib_evs_mcast_joined));
  343. }
  344. static void message_handler_req_evs_mcast_groups (void *conn, void *msg)
  345. {
  346. evs_error_t error = EVS_ERR_TRY_AGAIN;
  347. struct req_lib_evs_mcast_groups *req_lib_evs_mcast_groups = (struct req_lib_evs_mcast_groups *)msg;
  348. struct res_lib_evs_mcast_groups res_lib_evs_mcast_groups;
  349. struct iovec req_exec_evs_mcast_iovec[3];
  350. struct req_exec_evs_mcast req_exec_evs_mcast;
  351. char *msg_addr;
  352. int send_ok = 0;
  353. int res;
  354. req_exec_evs_mcast.header.size = sizeof (struct req_exec_evs_mcast) +
  355. sizeof (struct evs_group) * req_lib_evs_mcast_groups->group_entries +
  356. req_lib_evs_mcast_groups->msg_len;
  357. req_exec_evs_mcast.header.id =
  358. SERVICE_ID_MAKE (EVS_SERVICE, MESSAGE_REQ_EXEC_EVS_MCAST);
  359. req_exec_evs_mcast.msg_len = req_lib_evs_mcast_groups->msg_len;
  360. req_exec_evs_mcast.group_entries = req_lib_evs_mcast_groups->group_entries;
  361. msg_addr = (char *)req_lib_evs_mcast_groups +
  362. sizeof (struct req_lib_evs_mcast_groups) +
  363. (sizeof (struct evs_group) * req_lib_evs_mcast_groups->group_entries);
  364. req_exec_evs_mcast_iovec[0].iov_base = (char *)&req_exec_evs_mcast;
  365. req_exec_evs_mcast_iovec[0].iov_len = sizeof (req_exec_evs_mcast);
  366. req_exec_evs_mcast_iovec[1].iov_base = (char *)&req_lib_evs_mcast_groups->groups;
  367. req_exec_evs_mcast_iovec[1].iov_len = sizeof (struct evs_group) * req_lib_evs_mcast_groups->group_entries;
  368. req_exec_evs_mcast_iovec[2].iov_base = msg_addr;
  369. req_exec_evs_mcast_iovec[2].iov_len = req_lib_evs_mcast_groups->msg_len;
  370. // TODO this is wacky
  371. send_ok = totempg_groups_send_ok_joined (openais_group_handle, req_exec_evs_mcast_iovec, 3);
  372. res = totempg_groups_mcast_joined (openais_group_handle, req_exec_evs_mcast_iovec, 3, TOTEMPG_AGREED);
  373. if (res == 0) {
  374. error = EVS_OK;
  375. }
  376. res_lib_evs_mcast_groups.header.size = sizeof (struct res_lib_evs_mcast_groups);
  377. res_lib_evs_mcast_groups.header.id = MESSAGE_RES_EVS_MCAST_GROUPS;
  378. res_lib_evs_mcast_groups.header.error = error;
  379. openais_conn_send_response (conn, &res_lib_evs_mcast_groups,
  380. sizeof (struct res_lib_evs_mcast_groups));
  381. }
  382. static void message_handler_req_evs_membership_get (void *conn, void *msg)
  383. {
  384. struct res_lib_evs_membership_get res_lib_evs_membership_get;
  385. res_lib_evs_membership_get.header.size = sizeof (struct res_lib_evs_membership_get);
  386. res_lib_evs_membership_get.header.id = MESSAGE_RES_EVS_MEMBERSHIP_GET;
  387. res_lib_evs_membership_get.header.error = EVS_OK;
  388. res_lib_evs_membership_get.local_nodeid = totempg_my_nodeid_get ();
  389. memcpy (&res_lib_evs_membership_get.member_list,
  390. &res_evs_confchg_callback.member_list,
  391. sizeof (res_lib_evs_membership_get.member_list));
  392. res_lib_evs_membership_get.member_list_entries =
  393. res_evs_confchg_callback.member_list_entries;
  394. openais_conn_send_response (conn, &res_lib_evs_membership_get,
  395. sizeof (struct res_lib_evs_membership_get));
  396. }
  397. static void req_exec_mcast_endian_convert (void *msg)
  398. {
  399. struct req_exec_evs_mcast *req_exec_evs_mcast =
  400. (struct req_exec_evs_mcast *)msg;
  401. req_exec_evs_mcast->group_entries =
  402. swab32 (req_exec_evs_mcast->group_entries);
  403. req_exec_evs_mcast->msg_len = swab32 (req_exec_evs_mcast->msg_len);
  404. }
  405. static void message_handler_req_exec_mcast (
  406. void *msg,
  407. unsigned int nodeid)
  408. {
  409. struct req_exec_evs_mcast *req_exec_evs_mcast = (struct req_exec_evs_mcast *)msg;
  410. struct res_evs_deliver_callback res_evs_deliver_callback;
  411. char *msg_addr;
  412. struct list_head *list;
  413. int found = 0;
  414. int i, j;
  415. struct evs_pd *evs_pd;
  416. res_evs_deliver_callback.header.size = sizeof (struct res_evs_deliver_callback) +
  417. req_exec_evs_mcast->msg_len;
  418. res_evs_deliver_callback.header.id = MESSAGE_RES_EVS_DELIVER_CALLBACK;
  419. res_evs_deliver_callback.header.error = SA_AIS_OK;
  420. res_evs_deliver_callback.msglen = req_exec_evs_mcast->msg_len;
  421. msg_addr = (char *)req_exec_evs_mcast + sizeof (struct req_exec_evs_mcast) +
  422. (sizeof (struct evs_group) * req_exec_evs_mcast->group_entries);
  423. for (list = confchg_notify.next; list != &confchg_notify; list = list->next) {
  424. found = 0;
  425. evs_pd = list_entry (list, struct evs_pd, list);
  426. for (i = 0; i < evs_pd->group_entries; i++) {
  427. for (j = 0; j < req_exec_evs_mcast->group_entries; j++) {
  428. if (memcmp (&evs_pd->groups[i], &req_exec_evs_mcast->groups[j],
  429. sizeof (struct evs_group)) == 0) {
  430. found = 1;
  431. break;
  432. }
  433. }
  434. if (found) {
  435. break;
  436. }
  437. }
  438. if (found) {
  439. res_evs_deliver_callback.local_nodeid = nodeid;
  440. openais_conn_send_response (evs_pd->conn, &res_evs_deliver_callback,
  441. sizeof (struct res_evs_deliver_callback));
  442. openais_conn_send_response (evs_pd->conn, msg_addr,
  443. req_exec_evs_mcast->msg_len);
  444. }
  445. }
  446. }