evs.c 17 KB

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