diff options
Diffstat (limited to 'linden/indra/llcommon')
-rw-r--r-- | linden/indra/llcommon/llapr.h | 2 | ||||
-rw-r--r-- | linden/indra/llcommon/llavatarconstants.h | 2 | ||||
-rw-r--r-- | linden/indra/llcommon/llchat.h | 3 | ||||
-rw-r--r-- | linden/indra/llcommon/lldefs.h | 33 | ||||
-rw-r--r-- | linden/indra/llcommon/llfile.cpp | 1 | ||||
-rw-r--r-- | linden/indra/llcommon/llmortician.cpp | 1 | ||||
-rw-r--r-- | linden/indra/llcommon/llprocessor.cpp | 12 | ||||
-rw-r--r-- | linden/indra/llcommon/llsd.cpp | 1 | ||||
-rw-r--r-- | linden/indra/llcommon/llsdserialize_xml.cpp | 5 | ||||
-rw-r--r-- | linden/indra/llcommon/llsdutil.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llcommon/llstreamtools.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llcommon/llstring.cpp | 20 | ||||
-rw-r--r-- | linden/indra/llcommon/llstring.h | 3 | ||||
-rw-r--r-- | linden/indra/llcommon/lluri.cpp | 78 | ||||
-rw-r--r-- | linden/indra/llcommon/lluri.h | 15 | ||||
-rw-r--r-- | linden/indra/llcommon/llversion.h | 4 | ||||
-rw-r--r-- | linden/indra/llcommon/processor.h | 2 | ||||
-rw-r--r-- | linden/indra/llcommon/string_table.h | 2 | ||||
-rw-r--r-- | linden/indra/llcommon/timer.h | 2 | ||||
-rw-r--r-- | linden/indra/llcommon/timing.cpp | 2 |
20 files changed, 157 insertions, 35 deletions
diff --git a/linden/indra/llcommon/llapr.h b/linden/indra/llcommon/llapr.h index a36b177..e7b12d5 100644 --- a/linden/indra/llcommon/llapr.h +++ b/linden/indra/llcommon/llapr.h | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <sys/param.h> // Need PATH_MAX in APR headers... | 35 | #include <sys/param.h> // Need PATH_MAX in APR headers... |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #include "boost/noncopyable.hpp" | 38 | #include <boost/noncopyable.hpp> |
39 | 39 | ||
40 | #include "apr-1/apr_thread_proc.h" | 40 | #include "apr-1/apr_thread_proc.h" |
41 | #include "apr-1/apr_thread_mutex.h" | 41 | #include "apr-1/apr_thread_mutex.h" |
diff --git a/linden/indra/llcommon/llavatarconstants.h b/linden/indra/llcommon/llavatarconstants.h index 3eedf4e..ab49368 100644 --- a/linden/indra/llcommon/llavatarconstants.h +++ b/linden/indra/llcommon/llavatarconstants.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /** | 1 | /** |
2 | * @file indra_constants.h | 2 | * @file llavatarconstants.h |
3 | * @brief some useful short term constants for Indra | 3 | * @brief some useful short term constants for Indra |
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
diff --git a/linden/indra/llcommon/llchat.h b/linden/indra/llcommon/llchat.h index bb2610b..7339e9a 100644 --- a/linden/indra/llcommon/llchat.h +++ b/linden/indra/llcommon/llchat.h | |||
@@ -50,7 +50,8 @@ typedef enum e_chat_type | |||
50 | CHAT_TYPE_START = 4, | 50 | CHAT_TYPE_START = 4, |
51 | CHAT_TYPE_STOP = 5, | 51 | CHAT_TYPE_STOP = 5, |
52 | CHAT_TYPE_DEBUG_MSG = 6, | 52 | CHAT_TYPE_DEBUG_MSG = 6, |
53 | CHAT_TYPE_REGION = 7 | 53 | CHAT_TYPE_REGION = 7, |
54 | CHAT_TYPE_OWNER = 8 | ||
54 | } EChatType; | 55 | } EChatType; |
55 | 56 | ||
56 | typedef enum e_chat_audible_level | 57 | typedef enum e_chat_audible_level |
diff --git a/linden/indra/llcommon/lldefs.h b/linden/indra/llcommon/lldefs.h index a3651ff..25f4e73 100644 --- a/linden/indra/llcommon/lldefs.h +++ b/linden/indra/llcommon/lldefs.h | |||
@@ -55,13 +55,15 @@ const U32 SOUTHWEST = 6; | |||
55 | const U32 SOUTHEAST = 7; | 55 | const U32 SOUTHEAST = 7; |
56 | const U32 MIDDLE = 8; | 56 | const U32 MIDDLE = 8; |
57 | 57 | ||
58 | const U8 LL_SOUND_FLAG_NONE = 0x00; | 58 | const U8 EAST_MASK = 0x1<<EAST; |
59 | const U8 LL_SOUND_FLAG_LOOP = 0x01; | 59 | const U8 NORTH_MASK = 0x1<<NORTH; |
60 | const U8 LL_SOUND_FLAG_SYNC_MASTER = 0x02; | 60 | const U8 WEST_MASK = 0x1<<WEST; |
61 | const U8 LL_SOUND_FLAG_SYNC_SLAVE = 0x04; | 61 | const U8 SOUTH_MASK = 0x1<<SOUTH; |
62 | const U8 LL_SOUND_FLAG_SYNC_PENDING = 0x08; | 62 | |
63 | const U8 LL_SOUND_FLAG_SYNC_MASK = LL_SOUND_FLAG_SYNC_MASTER | LL_SOUND_FLAG_SYNC_SLAVE | LL_SOUND_FLAG_SYNC_PENDING; | 63 | const U8 NORTHEAST_MASK = NORTH_MASK | EAST_MASK; |
64 | const U8 LL_SOUND_FLAG_QUEUE = 0x10; | 64 | const U8 NORTHWEST_MASK = NORTH_MASK | WEST_MASK; |
65 | const U8 SOUTHWEST_MASK = SOUTH_MASK | WEST_MASK; | ||
66 | const U8 SOUTHEAST_MASK = SOUTH_MASK | EAST_MASK; | ||
65 | 67 | ||
66 | const U32 gDirOpposite[8] = {2, 3, 0, 1, 6, 7, 4, 5}; | 68 | const U32 gDirOpposite[8] = {2, 3, 0, 1, 6, 7, 4, 5}; |
67 | const U32 gDirAdjacent[8][2] = { | 69 | const U32 gDirAdjacent[8][2] = { |
@@ -87,15 +89,6 @@ const S32 gDirAxes[8][2] = { | |||
87 | { 1,-1}, // se | 89 | { 1,-1}, // se |
88 | }; | 90 | }; |
89 | 91 | ||
90 | const U8 EAST_MASK = 1; | ||
91 | const U8 NORTH_MASK = 2; | ||
92 | const U8 WEST_MASK = 4; | ||
93 | const U8 SOUTH_MASK = 8; | ||
94 | const U8 NORTHEAST_MASK = NORTH_MASK | EAST_MASK; | ||
95 | const U8 NORTHWEST_MASK = NORTH_MASK | WEST_MASK; | ||
96 | const U8 SOUTHWEST_MASK = SOUTH_MASK | WEST_MASK; | ||
97 | const U8 SOUTHEAST_MASK = SOUTH_MASK | EAST_MASK; | ||
98 | |||
99 | const S32 gDirMasks[8] = { | 92 | const S32 gDirMasks[8] = { |
100 | EAST_MASK, | 93 | EAST_MASK, |
101 | NORTH_MASK, | 94 | NORTH_MASK, |
@@ -133,6 +126,14 @@ const U32 RIGHT_SIDE = 4; | |||
133 | const U32 TOP_SIDE = 5; | 126 | const U32 TOP_SIDE = 5; |
134 | const U32 BOTTOM_SIDE = 6; | 127 | const U32 BOTTOM_SIDE = 6; |
135 | 128 | ||
129 | const U8 LL_SOUND_FLAG_NONE = 0x0; | ||
130 | const U8 LL_SOUND_FLAG_LOOP = 1<<0; | ||
131 | const U8 LL_SOUND_FLAG_SYNC_MASTER = 1<<1; | ||
132 | const U8 LL_SOUND_FLAG_SYNC_SLAVE = 1<<2; | ||
133 | const U8 LL_SOUND_FLAG_SYNC_PENDING = 1<<3; | ||
134 | const U8 LL_SOUND_FLAG_QUEUE = 1<<4; | ||
135 | const U8 LL_SOUND_FLAG_STOP = 1<<5; | ||
136 | const U8 LL_SOUND_FLAG_SYNC_MASK = LL_SOUND_FLAG_SYNC_MASTER | LL_SOUND_FLAG_SYNC_SLAVE | LL_SOUND_FLAG_SYNC_PENDING; | ||
136 | 137 | ||
137 | // | 138 | // |
138 | // *NOTE: These values may be used as hard-coded numbers in scanf() variants. | 139 | // *NOTE: These values may be used as hard-coded numbers in scanf() variants. |
diff --git a/linden/indra/llcommon/llfile.cpp b/linden/indra/llcommon/llfile.cpp index 4520fd1..6fcfc42 100644 --- a/linden/indra/llcommon/llfile.cpp +++ b/linden/indra/llcommon/llfile.cpp | |||
@@ -29,6 +29,7 @@ | |||
29 | * COMPLETENESS OR PERFORMANCE. | 29 | * COMPLETENESS OR PERFORMANCE. |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include "linden_common.h" | ||
32 | #include "llfile.h" | 33 | #include "llfile.h" |
33 | #include "llstring.h" | 34 | #include "llstring.h" |
34 | #include "llerror.h" | 35 | #include "llerror.h" |
diff --git a/linden/indra/llcommon/llmortician.cpp b/linden/indra/llcommon/llmortician.cpp index ec1383f..be362bf 100644 --- a/linden/indra/llcommon/llmortician.cpp +++ b/linden/indra/llcommon/llmortician.cpp | |||
@@ -25,6 +25,7 @@ | |||
25 | * COMPLETENESS OR PERFORMANCE. | 25 | * COMPLETENESS OR PERFORMANCE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "linden_common.h" | ||
28 | #include "llmortician.h" | 29 | #include "llmortician.h" |
29 | 30 | ||
30 | #include <list> | 31 | #include <list> |
diff --git a/linden/indra/llcommon/llprocessor.cpp b/linden/indra/llcommon/llprocessor.cpp index 40dc00c..bd21351 100644 --- a/linden/indra/llcommon/llprocessor.cpp +++ b/linden/indra/llcommon/llprocessor.cpp | |||
@@ -453,7 +453,7 @@ bool CProcessor::AnalyzeIntelProcessor() | |||
453 | case 3: // Model = 8, Brand id = 3: Pentium III Xeon (on-die L2 cache) processor model | 453 | case 3: // Model = 8, Brand id = 3: Pentium III Xeon (on-die L2 cache) processor model |
454 | strncat(strCPUName, "Intel Pentium III Xeon (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ | 454 | strncat(strCPUName, "Intel Pentium III Xeon (0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ |
455 | break; | 455 | break; |
456 | default: // ...² | 456 | default: // ... |
457 | strncat(strCPUName, "Intel Pentium III core (unknown model, 0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ | 457 | strncat(strCPUName, "Intel Pentium III core (unknown model, 0.18 micron process) with internal L2 cache", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ |
458 | break; | 458 | break; |
459 | } | 459 | } |
@@ -664,8 +664,8 @@ bool CProcessor::AnalyzeAMDProcessor() | |||
664 | mov dword ptr [tmp+44], edx | 664 | mov dword ptr [tmp+44], edx |
665 | } | 665 | } |
666 | // And copy it to the brand id string | 666 | // And copy it to the brand id string |
667 | strncpy(CPUInfo.strBrandID, tmp,sizeof(CPUInfo.strBrandID-1)); /* Flawfinder: ignore */ | 667 | strncpy(CPUInfo.strBrandID, tmp,sizeof(CPUInfo.strBrandID)-1); |
668 | CPUInfo.strBrandID[sizeof(CPUInfo.strBrandID-1)]='\0'; | 668 | CPUInfo.strBrandID[sizeof(CPUInfo.strBrandID)-1]='\0'; |
669 | } | 669 | } |
670 | else | 670 | else |
671 | { | 671 | { |
@@ -1280,17 +1280,17 @@ void CProcessor::DecodeProcessorConfiguration(unsigned int cfg) | |||
1280 | CPUInfo._L1.Data.uiAssociativeWays = 4; | 1280 | CPUInfo._L1.Data.uiAssociativeWays = 4; |
1281 | CPUInfo._L1.Data.uiLineSize = 64; | 1281 | CPUInfo._L1.Data.uiLineSize = 64; |
1282 | break; | 1282 | break; |
1283 | case 0x70: // cfg = 0x70: trace L1 cache present, 12 KµOPs, 4 ways | 1283 | case 0x70: // cfg = 0x70: trace L1 cache present, 12 KuOPs, 4 ways |
1284 | CPUInfo._Trace.bPresent = true; | 1284 | CPUInfo._Trace.bPresent = true; |
1285 | strcpy(CPUInfo._Trace.strSize, "12 K-micro-ops"); /* Flawfinder: ignore */ | 1285 | strcpy(CPUInfo._Trace.strSize, "12 K-micro-ops"); /* Flawfinder: ignore */ |
1286 | CPUInfo._Trace.uiAssociativeWays = 4; | 1286 | CPUInfo._Trace.uiAssociativeWays = 4; |
1287 | break; | 1287 | break; |
1288 | case 0x71: // cfg = 0x71: trace L1 cache present, 16 KµOPs, 4 ways | 1288 | case 0x71: // cfg = 0x71: trace L1 cache present, 16 KuOPs, 4 ways |
1289 | CPUInfo._Trace.bPresent = true; | 1289 | CPUInfo._Trace.bPresent = true; |
1290 | strcpy(CPUInfo._Trace.strSize, "16 K-micro-ops"); /* Flawfinder: ignore */ | 1290 | strcpy(CPUInfo._Trace.strSize, "16 K-micro-ops"); /* Flawfinder: ignore */ |
1291 | CPUInfo._Trace.uiAssociativeWays = 4; | 1291 | CPUInfo._Trace.uiAssociativeWays = 4; |
1292 | break; | 1292 | break; |
1293 | case 0x72: // cfg = 0x72: trace L1 cache present, 32 KµOPs, 4 ways | 1293 | case 0x72: // cfg = 0x72: trace L1 cache present, 32 KuOPs, 4 ways |
1294 | CPUInfo._Trace.bPresent = true; | 1294 | CPUInfo._Trace.bPresent = true; |
1295 | strcpy(CPUInfo._Trace.strSize, "32 K-micro-ops"); /* Flawfinder: ignore */ | 1295 | strcpy(CPUInfo._Trace.strSize, "32 K-micro-ops"); /* Flawfinder: ignore */ |
1296 | CPUInfo._Trace.uiAssociativeWays = 4; | 1296 | CPUInfo._Trace.uiAssociativeWays = 4; |
diff --git a/linden/indra/llcommon/llsd.cpp b/linden/indra/llcommon/llsd.cpp index 376a0de..f6d8d0e 100644 --- a/linden/indra/llcommon/llsd.cpp +++ b/linden/indra/llcommon/llsd.cpp | |||
@@ -26,6 +26,7 @@ | |||
26 | * COMPLETENESS OR PERFORMANCE. | 26 | * COMPLETENESS OR PERFORMANCE. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "linden_common.h" | ||
29 | #include "llsd.h" | 30 | #include "llsd.h" |
30 | 31 | ||
31 | #include <sstream> | 32 | #include <sstream> |
diff --git a/linden/indra/llcommon/llsdserialize_xml.cpp b/linden/indra/llcommon/llsdserialize_xml.cpp index 04cdd57..85d3883 100644 --- a/linden/indra/llcommon/llsdserialize_xml.cpp +++ b/linden/indra/llcommon/llsdserialize_xml.cpp | |||
@@ -398,7 +398,10 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data) | |||
398 | status = XML_ParseBuffer(mParser, 0, true); | 398 | status = XML_ParseBuffer(mParser, 0, true); |
399 | if (status == XML_STATUS_ERROR && !mGracefullStop) | 399 | if (status == XML_STATUS_ERROR && !mGracefullStop) |
400 | { | 400 | { |
401 | ((char*) buffer)[count? count - 1 : 0] = '\0'; | 401 | if (buffer) |
402 | { | ||
403 | ((char*) buffer)[count ? count - 1 : 0] = '\0'; | ||
404 | } | ||
402 | llinfos << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << llendl; | 405 | llinfos << "LLSDXMLParser::Impl::parse: XML_STATUS_ERROR parsing:" << (char*) buffer << llendl; |
403 | data = LLSD(); | 406 | data = LLSD(); |
404 | return -1; | 407 | return -1; |
diff --git a/linden/indra/llcommon/llsdutil.cpp b/linden/indra/llcommon/llsdutil.cpp index 85718ba..e8b3ac5 100644 --- a/linden/indra/llcommon/llsdutil.cpp +++ b/linden/indra/llcommon/llsdutil.cpp | |||
@@ -297,4 +297,4 @@ char* ll_pretty_print_sd(const LLSD& sd) | |||
297 | strncpy(buffer, stream.str().c_str(), bufferSize); | 297 | strncpy(buffer, stream.str().c_str(), bufferSize); |
298 | buffer[bufferSize - 1] = '\0'; | 298 | buffer[bufferSize - 1] = '\0'; |
299 | return buffer; | 299 | return buffer; |
300 | } \ No newline at end of file | 300 | } |
diff --git a/linden/indra/llcommon/llstreamtools.cpp b/linden/indra/llcommon/llstreamtools.cpp index d70fa60..e6cd909 100644 --- a/linden/indra/llcommon/llstreamtools.cpp +++ b/linden/indra/llcommon/llstreamtools.cpp | |||
@@ -26,6 +26,8 @@ | |||
26 | * COMPLETENESS OR PERFORMANCE. | 26 | * COMPLETENESS OR PERFORMANCE. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "linden_common.h" | ||
30 | |||
29 | #include <iostream> | 31 | #include <iostream> |
30 | #include <string> | 32 | #include <string> |
31 | 33 | ||
diff --git a/linden/indra/llcommon/llstring.cpp b/linden/indra/llcommon/llstring.cpp index 22d7b47..b5e307f 100644 --- a/linden/indra/llcommon/llstring.cpp +++ b/linden/indra/llcommon/llstring.cpp | |||
@@ -673,6 +673,26 @@ std::string mbcsstring_makeASCII(const std::string& wstr) | |||
673 | } | 673 | } |
674 | return out_str; | 674 | return out_str; |
675 | } | 675 | } |
676 | std::string utf8str_removeCRLF(const std::string& utf8str) | ||
677 | { | ||
678 | if (0 == utf8str.length()) | ||
679 | { | ||
680 | return std::string(); | ||
681 | } | ||
682 | const char CR = 13; | ||
683 | |||
684 | std::string out; | ||
685 | out.reserve(utf8str.length()); | ||
686 | const S32 len = (S32)utf8str.length(); | ||
687 | for( S32 i = 0; i < len; i++ ) | ||
688 | { | ||
689 | if( utf8str[i] != CR ) | ||
690 | { | ||
691 | out.push_back(utf8str[i]); | ||
692 | } | ||
693 | } | ||
694 | return out; | ||
695 | } | ||
676 | 696 | ||
677 | #if LL_WINDOWS | 697 | #if LL_WINDOWS |
678 | /* If the size of the passed in buffer is not large enough to hold the string, | 698 | /* If the size of the passed in buffer is not large enough to hold the string, |
diff --git a/linden/indra/llcommon/llstring.h b/linden/indra/llcommon/llstring.h index 8a2c24c..a24f944 100644 --- a/linden/indra/llcommon/llstring.h +++ b/linden/indra/llcommon/llstring.h | |||
@@ -457,6 +457,9 @@ std::string utf8str_makeASCII(const std::string& utf8str); | |||
457 | // Hack - used for evil notecards. | 457 | // Hack - used for evil notecards. |
458 | std::string mbcsstring_makeASCII(const std::string& str); | 458 | std::string mbcsstring_makeASCII(const std::string& str); |
459 | 459 | ||
460 | std::string utf8str_removeCRLF(const std::string& utf8str); | ||
461 | |||
462 | |||
460 | template <class T> | 463 | template <class T> |
461 | std::ostream& operator<<(std::ostream &s, const LLStringBase<T> &str) | 464 | std::ostream& operator<<(std::ostream &s, const LLStringBase<T> &str) |
462 | { | 465 | { |
diff --git a/linden/indra/llcommon/lluri.cpp b/linden/indra/llcommon/lluri.cpp index c838b25..83de022 100644 --- a/linden/indra/llcommon/lluri.cpp +++ b/linden/indra/llcommon/lluri.cpp | |||
@@ -188,6 +188,55 @@ LLURI::LLURI(const std::string& escaped_str) | |||
188 | } | 188 | } |
189 | } | 189 | } |
190 | 190 | ||
191 | static BOOL isDefault(const std::string& scheme, U16 port) | ||
192 | { | ||
193 | if (scheme == "http") | ||
194 | return port == 80; | ||
195 | if (scheme == "https") | ||
196 | return port == 443; | ||
197 | if (scheme == "ftp") | ||
198 | return port == 21; | ||
199 | |||
200 | return FALSE; | ||
201 | } | ||
202 | |||
203 | LLURI::LLURI(const std::string& scheme, | ||
204 | const std::string& userName, | ||
205 | const std::string& password, | ||
206 | const std::string& hostName, | ||
207 | U16 port, | ||
208 | const std::string& escapedPath, | ||
209 | const std::string& escapedQuery) | ||
210 | : mScheme(scheme), | ||
211 | mEscapedPath(escapedPath), | ||
212 | mEscapedQuery(escapedQuery) | ||
213 | { | ||
214 | std::ostringstream auth; | ||
215 | std::ostringstream opaque; | ||
216 | |||
217 | opaque << "//"; | ||
218 | |||
219 | if (!userName.empty()) | ||
220 | { | ||
221 | auth << escape(userName); | ||
222 | if (!password.empty()) | ||
223 | { | ||
224 | auth << ':' << escape(password); | ||
225 | } | ||
226 | auth << '@'; | ||
227 | } | ||
228 | auth << hostName; | ||
229 | if (!isDefault(scheme, port)) | ||
230 | { | ||
231 | auth << ':' << port; | ||
232 | } | ||
233 | mEscapedAuthority = auth.str(); | ||
234 | |||
235 | opaque << mEscapedAuthority << escapedPath << escapedQuery; | ||
236 | |||
237 | mEscapedOpaque = opaque.str(); | ||
238 | } | ||
239 | |||
191 | LLURI::~LLURI() | 240 | LLURI::~LLURI() |
192 | { | 241 | { |
193 | } | 242 | } |
@@ -447,6 +496,35 @@ std::string LLURI::hostName() const | |||
447 | return unescape(host); | 496 | return unescape(host); |
448 | } | 497 | } |
449 | 498 | ||
499 | std::string LLURI::userName() const | ||
500 | { | ||
501 | std::string user, userPass, host, port; | ||
502 | findAuthorityParts(mEscapedAuthority, userPass, host, port); | ||
503 | std::string::size_type pos = userPass.find(':'); | ||
504 | if (pos != std::string::npos) | ||
505 | { | ||
506 | user = userPass.substr(0, pos); | ||
507 | } | ||
508 | return unescape(user); | ||
509 | } | ||
510 | |||
511 | std::string LLURI::password() const | ||
512 | { | ||
513 | std::string pass, userPass, host, port; | ||
514 | findAuthorityParts(mEscapedAuthority, userPass, host, port); | ||
515 | std::string::size_type pos = userPass.find(':'); | ||
516 | if (pos != std::string::npos) | ||
517 | { | ||
518 | pass = userPass.substr(pos + 1); | ||
519 | } | ||
520 | return unescape(pass); | ||
521 | } | ||
522 | |||
523 | BOOL LLURI::defaultPort() const | ||
524 | { | ||
525 | return isDefault(mScheme, hostPort()); | ||
526 | } | ||
527 | |||
450 | U16 LLURI::hostPort() const | 528 | U16 LLURI::hostPort() const |
451 | { | 529 | { |
452 | std::string user, host, port; | 530 | std::string user, host, port; |
diff --git a/linden/indra/llcommon/lluri.h b/linden/indra/llcommon/lluri.h index d1499b8..3f24799 100644 --- a/linden/indra/llcommon/lluri.h +++ b/linden/indra/llcommon/lluri.h | |||
@@ -48,6 +48,14 @@ class LLURI | |||
48 | public: | 48 | public: |
49 | LLURI(); | 49 | LLURI(); |
50 | LLURI(const std::string& escaped_str); | 50 | LLURI(const std::string& escaped_str); |
51 | LLURI(const std::string& scheme, | ||
52 | const std::string& userName, | ||
53 | const std::string& password, | ||
54 | const std::string& hostName, | ||
55 | U16 hostPort, | ||
56 | const std::string& escapedPath, | ||
57 | const std::string& escapedQuery); | ||
58 | |||
51 | // construct from escaped string, as would be transmitted on the net | 59 | // construct from escaped string, as would be transmitted on the net |
52 | 60 | ||
53 | ~LLURI(); | 61 | ~LLURI(); |
@@ -68,8 +76,6 @@ public: | |||
68 | const U32& port, | 76 | const U32& port, |
69 | const LLSD& path, | 77 | const LLSD& path, |
70 | const LLSD& query); | 78 | const LLSD& query); |
71 | |||
72 | |||
73 | std::string asString() const; | 79 | std::string asString() const; |
74 | // the whole URI, escaped as needed | 80 | // the whole URI, escaped as needed |
75 | 81 | ||
@@ -84,10 +90,15 @@ public: | |||
84 | // for schemes that follow path like syntax (http, https, ftp) | 90 | // for schemes that follow path like syntax (http, https, ftp) |
85 | std::string authority() const; // ex.: "host.com:80" | 91 | std::string authority() const; // ex.: "host.com:80" |
86 | std::string hostName() const; // ex.: "host.com" | 92 | std::string hostName() const; // ex.: "host.com" |
93 | std::string userName() const; | ||
94 | std::string password() const; | ||
87 | U16 hostPort() const; // ex.: 80, will include implicit port | 95 | U16 hostPort() const; // ex.: 80, will include implicit port |
96 | BOOL defaultPort() const; // true if port is default for scheme | ||
97 | const std::string& escapedPath() const { return mEscapedPath; } | ||
88 | std::string path() const; // ex.: "/abc/def", includes leading slash | 98 | std::string path() const; // ex.: "/abc/def", includes leading slash |
89 | // LLSD pathArray() const; // above decoded into an array of strings | 99 | // LLSD pathArray() const; // above decoded into an array of strings |
90 | std::string query() const; // ex.: "x=34", section after "?" | 100 | std::string query() const; // ex.: "x=34", section after "?" |
101 | const std::string& escapedQuery() const { return mEscapedQuery; } | ||
91 | LLSD queryMap() const; // above decoded into a map | 102 | LLSD queryMap() const; // above decoded into a map |
92 | static LLSD queryMap(std::string escaped_query_string); | 103 | static LLSD queryMap(std::string escaped_query_string); |
93 | static std::string mapToQueryString(const LLSD& queryMap); | 104 | static std::string mapToQueryString(const LLSD& queryMap); |
diff --git a/linden/indra/llcommon/llversion.h b/linden/indra/llcommon/llversion.h index 57b1512..2623c3a 100644 --- a/linden/indra/llcommon/llversion.h +++ b/linden/indra/llcommon/llversion.h | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | const S32 LL_VERSION_MAJOR = 1; | 32 | const S32 LL_VERSION_MAJOR = 1; |
33 | const S32 LL_VERSION_MINOR = 17; | 33 | const S32 LL_VERSION_MINOR = 17; |
34 | const S32 LL_VERSION_PATCH = 0; | 34 | const S32 LL_VERSION_PATCH = 1; |
35 | const S32 LL_VERSION_BUILD = 12; | 35 | const S32 LL_VERSION_BUILD = 0; |
36 | 36 | ||
37 | #endif | 37 | #endif |
diff --git a/linden/indra/llcommon/processor.h b/linden/indra/llcommon/processor.h index 367d540..34d970e 100644 --- a/linden/indra/llcommon/processor.h +++ b/linden/indra/llcommon/processor.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * @file processor.h | 2 | * @file processor.h |
3 | * @brief Legacy wrapper header. | 3 | * @brief Legacy wrapper header. |
4 | * | 4 | * |
5 | * Copyright (c) 2000-2007 Linden Research, Inc. | 5 | * Copyright (c) 2000-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | 7 | * Second Life Viewer Source Code |
8 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
diff --git a/linden/indra/llcommon/string_table.h b/linden/indra/llcommon/string_table.h index 790741d..3d30c9f 100644 --- a/linden/indra/llcommon/string_table.h +++ b/linden/indra/llcommon/string_table.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * @file string_table.h | 2 | * @file string_table.h |
3 | * @brief Legacy wrapper header. | 3 | * @brief Legacy wrapper header. |
4 | * | 4 | * |
5 | * Copyright (c) 2000-2007 Linden Research, Inc. | 5 | * Copyright (c) 2000-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | 7 | * Second Life Viewer Source Code |
8 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
diff --git a/linden/indra/llcommon/timer.h b/linden/indra/llcommon/timer.h index 31e6db6..3a098ec 100644 --- a/linden/indra/llcommon/timer.h +++ b/linden/indra/llcommon/timer.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * @file timer.h | 2 | * @file timer.h |
3 | * @brief Legacy wrapper header. | 3 | * @brief Legacy wrapper header. |
4 | * | 4 | * |
5 | * Copyright (c) 2000-2007 Linden Research, Inc. | 5 | * Copyright (c) 2000-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | 7 | * Second Life Viewer Source Code |
8 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
diff --git a/linden/indra/llcommon/timing.cpp b/linden/indra/llcommon/timing.cpp index 342bf19..0737beb 100644 --- a/linden/indra/llcommon/timing.cpp +++ b/linden/indra/llcommon/timing.cpp | |||
@@ -2,7 +2,7 @@ | |||
2 | * @file timing.cpp | 2 | * @file timing.cpp |
3 | * @brief This file will be deprecated in the future. | 3 | * @brief This file will be deprecated in the future. |
4 | * | 4 | * |
5 | * Copyright (c) 2000-2007 Linden Research, Inc. | 5 | * Copyright (c) 2000-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | 7 | * Second Life Viewer Source Code |
8 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |