Can you put this in a file that we could download and try? Do you have a web server somewhere that can serve this up?<br>-MC<br><br><div class="gmail_quote">On Mon, May 3, 2010 at 1:36 PM, Peter Olsson <span dir="ltr"><<a href="mailto:peter.olsson@visionutveckling.se">peter.olsson@visionutveckling.se</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I also came across this error today on a Windows 2003 server (same issue as XP). For now I've commented out the call to inet_ntop(), but I think the code below probably could be used - I Googled it. I'll try to find some time to get it working within FS. I think there are still some XP/2003 boxes out there, so it should be worth fixing.<br>
<br>
/Peter<br>
<br>
/* const char *<br>
* inet_ntop6(src, dst, size)<br>
* convert IPv6 binary address into presentation (printable) format<br>
* author:<br>
* Paul Vixie, 1996.<br>
*/<br>
<br>
static const char *<br>
inet_ntop6(src, dst, size)<br>
const u_char *src;<br>
char *dst;<br>
size_t size;<br>
{<br>
/*<br>
* Note that int32_t and int16_t need only be "at least" large enough<br>
* to contain a value of the specified size. On some systems, like<br>
* Crays, there is no such thing as an integer variable with 16 bits.<br>
* Keep this in mind if you think this function should have been coded<br>
* to use pointer overlays. All the world's not a VAX.<br>
*/<br>
char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;<br>
struct { int base, len; } best, cur;<br>
u_int words[IN6ADDRSZ / INT16SZ];<br>
int i;<br>
<br>
/*<br>
* Preprocess:<br>
* Copy the input (bytewise) array into a wordwise array.<br>
* Find the longest run of 0x00's in src[] for :: shorthanding.<br>
*/<br>
memset(words, '\0', sizeof words);<br>
for (i = 0; i < IN6ADDRSZ; i++)<br>
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));<br>
best.base = -1;<br>
cur.base = -1;<br>
for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {<br>
if (words[i] == 0) {<br>
if (cur.base == -1)<br>
cur.base = i, cur.len = 1;<br>
else<br>
cur.len++;<br>
} else {<br>
if (cur.base != -1) {<br>
if (best.base == -1 || cur.len > best.len)<br>
best = cur;<br>
cur.base = -1;<br>
}<br>
}<br>
}<br>
if (cur.base != -1) {<br>
if (best.base == -1 || cur.len > best.len)<br>
best = cur;<br>
}<br>
if (best.base != -1 && best.len < 2)<br>
best.base = -1;<br>
<br>
/*<br>
* Format the result.<br>
*/<br>
tp = tmp;<br>
for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {<br>
/* Are we inside the best run of 0x00's? */<br>
if (best.base != -1 && i >= best.base &&<br>
i < (best.base + best.len)) {<br>
if (i == best.base)<br>
*tp++ = ':';<br>
continue;<br>
}<br>
/* Are we following an initial run of 0x00s or any real hex? */<br>
if (i != 0)<br>
*tp++ = ':';<br>
/* Is this address an encapsulated IPv4? */<br>
if (i == 6 && best.base == 0 &&<br>
(best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {<br>
if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))<br>
return (NULL);<br>
tp += strlen(tp);<br>
break;<br>
}<br>
tp += SPRINTF((tp, "%x", words[i]));<br>
}<br>
/* Was it a trailing run of 0x00's? */<br>
if (best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))<br>
*tp++ = ':';<br>
*tp++ = '\0';<br>
<br>
/*<br>
* Check for overflow, copy, and we're done.<br>
*/<br>
if ((size_t)(tp - tmp) > size) {<br>
errno = ENOSPC;<br>
return (NULL);<br>
}<br>
strcpy(dst, tmp);<br>
return (dst);<br>
}<br>
<br>
________________________________________<br>
Från: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a> [<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] f&#246;r Michael Jerris [<a href="mailto:mike@jerris.com">mike@jerris.com</a>]<br>
Skickat: den 3 maj 2010 06:04<br>
Till: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
Ämne: Re: [Freeswitch-users] run error after building in vs 2008!<br>
<br>
This was just added in :<br>
<br>
commit f1430d521a767a13035d6d8e96686564552194fd<br>
Author: Anthony Minessale <<a href="mailto:anthm@freeswitch.org">anthm@freeswitch.org</a><mailto:<a href="mailto:anthm@freeswitch.org">anthm@freeswitch.org</a>>><br>
Date: Fri Apr 30 15:01:32 2010 -0500<br>
<br>
fix switch_get_addr to work with v6 properly<br>
<br>
to fix ipv6 support. We welcome a patch to restore xp support.<br>
<br>
Mike<br>
<br>
On May 1, 2010, at 3:29 PM, Phillip Jones wrote:<br>
<br>
Oh yeah - looks like that call is not supported in older os like XP.<br>
<br>
<a href="http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/e40465f2-41b7-4243-ad33-15ae9366f4e6" target="_blank">http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/e40465f2-41b7-4243-ad33-15ae9366f4e6</a><br>
<br>
FreeSWITCH does support XP though - <a href="http://wiki.freeswitch.org/wiki/Users_Guide_Introduction" target="_blank">http://wiki.freeswitch.org/wiki/Users_Guide_Introduction</a><br>
<br>
So I don't know.<br>
<br>
On Sat, May 1, 2010 at 2:31 PM, babak yakhchali <<a href="mailto:babak.freeswitch@gmail.com">babak.freeswitch@gmail.com</a><mailto:<a href="mailto:babak.freeswitch@gmail.com">babak.freeswitch@gmail.com</a>>> wrote:<br>
ya I've got that in place<br>
but as I searched the web they say it's related to windows version (xp vista . . .)<br>
<br>
!DSPAM:4bde4cca32933312412468!<br>
<div><div></div><div class="h5"><br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br>