[Freeswitch-trunk] [commit] r6128 - freeswitch/trunk/src
Freeswitch SVN
anthm at freeswitch.org
Thu Nov 1 10:22:58 EDT 2007
Author: anthm
Date: Thu Nov 1 10:22:58 2007
New Revision: 6128
Modified:
freeswitch/trunk/src/switch_ivr_async.c
Log:
attempt to make gcc 4.3 happy, getting off to a great new friendship
Modified: freeswitch/trunk/src/switch_ivr_async.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_async.c (original)
+++ freeswitch/trunk/src/switch_ivr_async.c Thu Nov 1 10:22:58 2007
@@ -1233,23 +1233,24 @@
switch_copy_string(helper->uuid_str, uuid, sizeof(helper->uuid_str));
- cur = (char *) helper + sizeof(*helper);
+ cur = (char *) helper;
+ cur += sizeof(*helper);
if (extension) {
+ switch_copy_string(cur, extension, strlen(extension) + 1);
helper->extension = cur;
- switch_copy_string(helper->extension, extension, strlen(extension) + 1);
cur += strlen(helper->extension) + 1;
}
if (dialplan) {
+ switch_copy_string(cur, dialplan, strlen(dialplan) + 1);
helper->dialplan = cur;
- switch_copy_string(helper->dialplan, dialplan, strlen(dialplan) + 1);
cur += strlen(helper->dialplan) + 1;
}
if (context) {
+ switch_copy_string(cur, context, strlen(context) + 1);
helper->context = cur;
- switch_copy_string(helper->context, context, strlen(context) + 1);
}
return switch_scheduler_add_task(runtime, sch_transfer_callback, (char *) __SWITCH_FUNC__, uuid, 0, helper, SSHF_FREE_ARG);
@@ -1275,14 +1276,17 @@
{
struct broadcast_helper *helper;
size_t len = sizeof(*helper) + strlen(path) + 1;
+ char *cur = NULL;
switch_zmalloc(helper, len);
-
+
+ cur = (char *) helper;
+ cur += sizeof(*helper);
switch_copy_string(helper->uuid_str, uuid, sizeof(helper->uuid_str));
helper->flags = flags;
- helper->path = (char *) helper + sizeof(*helper);
- switch_copy_string(helper->path, path, len - sizeof(helper));
-
+
+ switch_copy_string(cur, path, len - sizeof(helper));
+ helper->path = cur;
return switch_scheduler_add_task(runtime, sch_broadcast_callback, (char *) __SWITCH_FUNC__, uuid, 0, helper, SSHF_FREE_ARG);
}
More information about the Freeswitch-trunk
mailing list