[commit] r7580 - freeswitch/trunk/src/mod/event_handlers/mod_event_multicast
Author: mikej Date: Mon Feb 11 01:45:03 2008 New Revision: 7580 Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c Log: fix length error introduced in r6827 (should fix MODEVENT-15) Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c ============================================================================== --- freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c (original) +++ freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c Mon Feb 11 01:45:03 2008 @@ -171,7 +171,7 @@ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Multicast-Sender", "%s", globals.hostname); if (switch_event_serialize(event, &packet, SWITCH_TRUE) == SWITCH_STATUS_SUCCESS) { memcpy(buf, &globals.host_hash, sizeof(globals.host_hash)); - switch_copy_string(buf + sizeof(globals.host_hash), packet, sizeof(buf) - sizeof(globals.host_hash)); + switch_copy_string(buf + sizeof(globals.host_hash), packet, MULTICAST_BUFFSIZE - sizeof(globals.host_hash)); len = strlen(packet) + sizeof(globals.host_hash);; //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "\nEVENT\n--------------------------------\n%s\n", buf); switch_socket_sendto(globals.udp_socket, globals.addr, 0, buf, &len); @@ -270,7 +270,7 @@ globals.running = 1; while (globals.running == 1) { char *myaddr; - size_t len = sizeof(buf); + size_t len = MULTICAST_BUFFSIZE; memset(buf, 0, len); switch_sockaddr_ip_get(&myaddr, globals.addr);
participants (1)
-
Freeswitch SVN