Tue, 29 Mar 2011 20:04:34 +0200
Rework package yet again, correcting and introducing new buildconf logic:
Conditionally disable bootstrap stage comparison correctly, correct
english grammar, better find system as(1) and ld(1), indotruce detailed
optimization option messages, more completely guess cpu types, allow
profiled bootstrapping without a preinstalled GCC because many other
compilers have long since implemented 64-bit arithmetic, instruct make
to build sequentially (not in sparallel) when building a profiled
bootstrap as GCC online documents recommend, and generally improve
comment blocks.
The single most important correction in this changeset relates to the
GCC changed optimization policy since at least GCC 4.5, in which -march
is always passed and not always correctly guessed. In the case of this
package, allowing GCC to guess the architecture leads to wild build
errors at various subcomponents (zlib, libgcc, libiberty...) and
bootstrap stages. It seems quite platform specific, and the safest
approach to correcting this seems to be explicitly always specifying the
-march argument when bootstrapping GCC. Because the best choice 'native'
is not available when bootstrapping using a foreign (non GCC) compiler,
a guess is made according to rpmmacros l_platform in that case.
It is questionable as to whether these recent optimization changes
on the part of GCC or this package are compatible with each other,
or if either are complete or correct at all. At least applying these
corrections allows this package to build again in most cases test.
michael@311 | 1 | Index: channels/chan_sip.c |
michael@311 | 2 | diff -Nau channels/chan_sip.c.orig channels/chan_sip.c |
michael@311 | 3 | --- channels/chan_sip.c.orig 2011-01-14 18:32:52.000000000 +0100 |
michael@311 | 4 | +++ channels/chan_sip.c 2011-03-13 14:32:58.000000000 +0100 |
michael@311 | 5 | @@ -27854,6 +27854,7 @@ |
michael@311 | 6 | \todo Fix this function so that we wait for reply to the REFER and |
michael@311 | 7 | react to errors, denials or other issues the other end might have. |
michael@311 | 8 | */ |
michael@311 | 9 | +/* MSvB: Paramater dest may be SIPS encoded, having '@' before domain */ |
michael@311 | 10 | static int sip_sipredirect(struct sip_pvt *p, const char *dest) |
michael@311 | 11 | { |
michael@311 | 12 | char *cdest; |
michael@311 | 13 | @@ -27862,7 +27863,7 @@ |
michael@311 | 14 | cdest = ast_strdupa(dest); |
michael@311 | 15 | |
michael@311 | 16 | extension = strsep(&cdest, "@"); |
michael@311 | 17 | - domain = strsep(&cdest, ":"); |
michael@311 | 18 | + domain = strsep(&cdest, ":"); /* MSvB: Could begin with '@' if SIPS */ |
michael@311 | 19 | if (ast_strlen_zero(extension)) { |
michael@311 | 20 | ast_log(LOG_ERROR, "Missing mandatory argument: extension\n"); |
michael@311 | 21 | return 0; |
michael@311 | 22 | @@ -27894,7 +27895,14 @@ |
michael@311 | 23 | } |
michael@311 | 24 | } |
michael@311 | 25 | |
michael@311 | 26 | - ast_string_field_build(p, our_contact, "Transfer <sip:%s@%s>", extension, domain); |
michael@311 | 27 | + if (domain && *domain == '@') { |
michael@311 | 28 | + ast_log(LOG_DEBUG, "Decoding TLS incapable Asterisk SIP URI to a standard SIPS URI before redirecting via 302 Moved Temporarily\n"); |
michael@311 | 29 | + ast_string_field_build(p, our_contact, "Transfer <sips:%s@%s>", extension, domain); |
michael@311 | 30 | + |
michael@311 | 31 | + } |
michael@311 | 32 | + else |
michael@311 | 33 | + ast_string_field_build(p, our_contact, "Transfer <sip:%s@%s>", extension, domain); |
michael@311 | 34 | + |
michael@311 | 35 | transmit_response_reliable(p, "302 Moved Temporarily", &p->initreq); |
michael@311 | 36 | |
michael@311 | 37 | sip_scheddestroy(p, SIP_TRANS_TIMEOUT); /* Make sure we stop send this reply. */ |