diff options
Diffstat (limited to 'linden/indra/llmessage')
30 files changed, 3273 insertions, 2683 deletions
diff --git a/linden/indra/llmessage/llassetstorage.cpp b/linden/indra/llmessage/llassetstorage.cpp index 74b55d9..13b1525 100644 --- a/linden/indra/llmessage/llassetstorage.cpp +++ b/linden/indra/llmessage/llassetstorage.cpp | |||
@@ -53,7 +53,10 @@ | |||
53 | #include "lltransfersourceasset.h" | 53 | #include "lltransfersourceasset.h" |
54 | #include "lltransfertargetvfile.h" // For debugging | 54 | #include "lltransfertargetvfile.h" // For debugging |
55 | 55 | ||
56 | #include "llmetrics.h" | ||
57 | |||
56 | LLAssetStorage *gAssetStorage = NULL; | 58 | LLAssetStorage *gAssetStorage = NULL; |
59 | LLMetrics *LLAssetStorage::metric_recipient = NULL; | ||
57 | 60 | ||
58 | const LLUUID CATEGORIZE_LOST_AND_FOUND_ID("00000000-0000-0000-0000-000000000010"); | 61 | const LLUUID CATEGORIZE_LOST_AND_FOUND_ID("00000000-0000-0000-0000-000000000010"); |
59 | 62 | ||
@@ -1279,6 +1282,8 @@ void LLAssetStorage::storeAssetData( | |||
1279 | F64 timeout) | 1282 | F64 timeout) |
1280 | { | 1283 | { |
1281 | llwarns << "storeAssetData: wrong version called" << llendl; | 1284 | llwarns << "storeAssetData: wrong version called" << llendl; |
1285 | // LLAssetStorage metric: Virtual base call | ||
1286 | reportMetric( LLUUID::null, asset_type, NULL, LLUUID::null, 0, MR_BAD_FUNCTION, __FILE__, __LINE__, "Illegal call to base: LLAssetStorage::storeAssetData 1" ); | ||
1282 | } | 1287 | } |
1283 | 1288 | ||
1284 | // virtual | 1289 | // virtual |
@@ -1296,6 +1301,8 @@ void LLAssetStorage::storeAssetData( | |||
1296 | F64 timeout) | 1301 | F64 timeout) |
1297 | { | 1302 | { |
1298 | llwarns << "storeAssetData: wrong version called" << llendl; | 1303 | llwarns << "storeAssetData: wrong version called" << llendl; |
1304 | // LLAssetStorage metric: Virtual base call | ||
1305 | reportMetric( asset_id, asset_type, NULL, requesting_agent_id, 0, MR_BAD_FUNCTION, __FILE__, __LINE__, "Illegal call to base: LLAssetStorage::storeAssetData 2" ); | ||
1299 | } | 1306 | } |
1300 | 1307 | ||
1301 | // virtual | 1308 | // virtual |
@@ -1312,6 +1319,8 @@ void LLAssetStorage::storeAssetData( | |||
1312 | F64 timeout) | 1319 | F64 timeout) |
1313 | { | 1320 | { |
1314 | llwarns << "storeAssetData: wrong version called" << llendl; | 1321 | llwarns << "storeAssetData: wrong version called" << llendl; |
1322 | // LLAssetStorage metric: Virtual base call | ||
1323 | reportMetric( asset_id, asset_type, NULL, LLUUID::null, 0, MR_BAD_FUNCTION, __FILE__, __LINE__, "Illegal call to base: LLAssetStorage::storeAssetData 3" ); | ||
1315 | } | 1324 | } |
1316 | 1325 | ||
1317 | // virtual | 1326 | // virtual |
@@ -1328,6 +1337,8 @@ void LLAssetStorage::storeAssetData( | |||
1328 | F64 timeout) | 1337 | F64 timeout) |
1329 | { | 1338 | { |
1330 | llwarns << "storeAssetData: wrong version called" << llendl; | 1339 | llwarns << "storeAssetData: wrong version called" << llendl; |
1340 | // LLAssetStorage metric: Virtual base call | ||
1341 | reportMetric( LLUUID::null, asset_type, NULL, LLUUID::null, 0, MR_BAD_FUNCTION, __FILE__, __LINE__, "Illegal call to base: LLAssetStorage::storeAssetData 4" ); | ||
1331 | } | 1342 | } |
1332 | 1343 | ||
1333 | // static | 1344 | // static |
@@ -1372,3 +1383,51 @@ void LLAssetStorage::dumpTempAssetData(const LLUUID& avatar_id) const | |||
1372 | // virtual | 1383 | // virtual |
1373 | void LLAssetStorage::clearTempAssetData() | 1384 | void LLAssetStorage::clearTempAssetData() |
1374 | { } | 1385 | { } |
1386 | |||
1387 | // static | ||
1388 | void LLAssetStorage::reportMetric( const LLUUID& asset_id, const LLAssetType::EType asset_type, const char *filename, | ||
1389 | const LLUUID& agent_id, S32 asset_size, EMetricResult result, | ||
1390 | const char *file, const S32 line, const char *message ) | ||
1391 | { | ||
1392 | if( !metric_recipient ) | ||
1393 | { | ||
1394 | llinfos << "Couldn't store LLAssetStoreage::reportMetric - no metrics_recipient" << llendl; | ||
1395 | return; | ||
1396 | } | ||
1397 | |||
1398 | filename = filename ? filename : ""; | ||
1399 | file = file ? file : ""; | ||
1400 | |||
1401 | // Create revised message - message = "message :: file:line" | ||
1402 | std::string new_message; //( message ); | ||
1403 | new_message = message; // << " " << file << " " << line; | ||
1404 | new_message += " :: "; | ||
1405 | new_message += filename; | ||
1406 | char line_string[16]; | ||
1407 | sprintf( line_string, ":%d", line ); | ||
1408 | new_message += line_string; | ||
1409 | message = new_message.c_str(); | ||
1410 | |||
1411 | // Change always_report to true if debugging... do not check it in this way | ||
1412 | static bool always_report = false; | ||
1413 | const char *metric_name = "LLAssetStorage::Metrics"; | ||
1414 | |||
1415 | bool success = result == MR_OKAY; | ||
1416 | |||
1417 | if( (!success) || always_report ) | ||
1418 | { | ||
1419 | LLSD stats; | ||
1420 | stats["asset_id"] = asset_id; | ||
1421 | stats["asset_type"] = asset_type; | ||
1422 | stats["filename"] = filename? filename : ""; | ||
1423 | stats["agent_id"] = agent_id; | ||
1424 | stats["asset_size"] = (S32)asset_size; | ||
1425 | stats["result"] = (S32)result; | ||
1426 | |||
1427 | metric_recipient->recordEventDetails( metric_name, message, success, stats); | ||
1428 | } | ||
1429 | else | ||
1430 | { | ||
1431 | metric_recipient->recordEvent(metric_name, message, success); | ||
1432 | } | ||
1433 | } | ||
diff --git a/linden/indra/llmessage/llassetstorage.h b/linden/indra/llmessage/llassetstorage.h index b7da197..739242a 100644 --- a/linden/indra/llmessage/llassetstorage.h +++ b/linden/indra/llmessage/llassetstorage.h | |||
@@ -420,6 +420,32 @@ private: | |||
420 | LLXferManager *xfer, | 420 | LLXferManager *xfer, |
421 | LLVFS *vfs, | 421 | LLVFS *vfs, |
422 | const LLHost &upstream_host); | 422 | const LLHost &upstream_host); |
423 | |||
424 | protected: | ||
425 | enum EMetricResult | ||
426 | { | ||
427 | // Static valued enums for #dw readability - please copy this | ||
428 | // declaration to them on updates -- source in llassetstorage.h | ||
429 | MR_INVALID = -1, // Makes no sense | ||
430 | MR_OKAY = 0, // Success - no metric normally | ||
431 | MR_ZERO_SIZE = 1, // Zero size asset | ||
432 | MR_BAD_FUNCTION = 2, // Tried to use a virtual base (PROGRAMMER ERROR) | ||
433 | MR_FILE_NONEXIST = 3, // Old format store call - source file does not exist | ||
434 | MR_NO_FILENAME = 4, // Old format store call - source filename is NULL/0-length | ||
435 | MR_NO_UPSTREAM = 5, // Upstream provider is missing | ||
436 | MR_VFS_CORRUPTION = 6 // VFS is corrupt - too-large or mismatched stated/returned sizes | ||
437 | }; | ||
438 | |||
439 | static class LLMetrics *metric_recipient; | ||
440 | |||
441 | static void reportMetric( const LLUUID& asset_id, const LLAssetType::EType asset_type, const char *filename, | ||
442 | const LLUUID& agent_id, S32 asset_size, EMetricResult result, | ||
443 | const char *file, const S32 line, const char *message ); | ||
444 | public: | ||
445 | static void setMetricRecipient( LLMetrics *recip ) | ||
446 | { | ||
447 | metric_recipient = recip; | ||
448 | } | ||
423 | }; | 449 | }; |
424 | 450 | ||
425 | //////////////////////////////////////////////////////////////////////// | 451 | //////////////////////////////////////////////////////////////////////// |
diff --git a/linden/indra/llmessage/llbuffer.h b/linden/indra/llmessage/llbuffer.h index 4089a55..34d05ae 100644 --- a/linden/indra/llmessage/llbuffer.h +++ b/linden/indra/llmessage/llbuffer.h | |||
@@ -411,6 +411,18 @@ public: | |||
411 | S32 countAfter(S32 channel, U8* start) const; | 411 | S32 countAfter(S32 channel, U8* start) const; |
412 | 412 | ||
413 | /** | 413 | /** |
414 | * @brief Count all bytes on channel. | ||
415 | * | ||
416 | * Helper method which just calls countAfter(). | ||
417 | * @param channel The channel to count. | ||
418 | * @return Returns the number of bytes in the channel. | ||
419 | */ | ||
420 | S32 count(S32 channel) const | ||
421 | { | ||
422 | return countAfter(channel, NULL); | ||
423 | } | ||
424 | |||
425 | /** | ||
414 | * @brief Read bytes in the buffer array on the specified channel | 426 | * @brief Read bytes in the buffer array on the specified channel |
415 | * | 427 | * |
416 | * You should prefer iterating over segments is possible since | 428 | * You should prefer iterating over segments is possible since |
diff --git a/linden/indra/llmessage/llcachename.cpp b/linden/indra/llmessage/llcachename.cpp index fb6ca5b..6075958 100644 --- a/linden/indra/llmessage/llcachename.cpp +++ b/linden/indra/llmessage/llcachename.cpp | |||
@@ -34,19 +34,26 @@ | |||
34 | #include "llcachename.h" | 34 | #include "llcachename.h" |
35 | 35 | ||
36 | // linden library includes | 36 | // linden library includes |
37 | #include "message.h" | ||
38 | #include "llrand.h" | ||
39 | #include "lldbstrings.h" | 37 | #include "lldbstrings.h" |
40 | #include "llframetimer.h" | 38 | #include "llframetimer.h" |
41 | #include "llhost.h" | 39 | #include "llhost.h" |
40 | #include "llrand.h" | ||
41 | #include "llsdserialize.h" | ||
42 | #include "lluuid.h" | 42 | #include "lluuid.h" |
43 | #include "message.h" | ||
43 | 44 | ||
44 | // Constants | 45 | // Constants |
45 | const char* CN_WAITING = "(waiting)"; | 46 | const char* CN_WAITING = "(waiting)"; |
46 | const char* CN_NOBODY = "(nobody)"; | 47 | const char* CN_NOBODY = "(nobody)"; |
47 | const char* CN_NONE = "(none)"; | 48 | const char* CN_NONE = "(none)"; |
48 | const char* CN_HIPPOS = "(hippos)"; | 49 | |
49 | const F32 HIPPO_PROBABILITY = 0.01f; | 50 | // llsd serialization constants |
51 | static const std::string AGENTS("agents"); | ||
52 | static const std::string GROUPS("groups"); | ||
53 | static const std::string CTIME("ctime"); | ||
54 | static const std::string FIRST("first"); | ||
55 | static const std::string LAST("last"); | ||
56 | static const std::string NAME("name"); | ||
50 | 57 | ||
51 | // We track name requests in flight for up to this long. | 58 | // We track name requests in flight for up to this long. |
52 | // We won't re-request a name during this time | 59 | // We won't re-request a name during this time |
@@ -392,73 +399,123 @@ void LLCacheName::importFile(FILE* fp) | |||
392 | llinfos << "LLCacheName loaded " << count << " names" << llendl; | 399 | llinfos << "LLCacheName loaded " << count << " names" << llendl; |
393 | } | 400 | } |
394 | 401 | ||
395 | 402 | bool LLCacheName::importFile(std::istream& istr) | |
396 | void LLCacheName::exportFile(FILE* fp) | ||
397 | { | 403 | { |
398 | fprintf(fp, "version\t%d\n", CN_FILE_VERSION); | 404 | LLSD data; |
405 | if(LLSDSerialize::fromXML(data, istr) < 1) | ||
406 | return false; | ||
399 | 407 | ||
400 | for (Cache::iterator iter = impl.mCache.begin(), | 408 | // We'll expire entries more than a week old |
401 | end = impl.mCache.end(); | 409 | U32 now = (U32)time(NULL); |
402 | iter != end; iter++) | 410 | const U32 SECS_PER_DAY = 60 * 60 * 24; |
411 | U32 delete_before_time = now - (7 * SECS_PER_DAY); | ||
412 | |||
413 | // iterate over the agents | ||
414 | S32 count = 0; | ||
415 | LLSD agents = data[AGENTS]; | ||
416 | LLSD::map_iterator iter = agents.beginMap(); | ||
417 | LLSD::map_iterator end = agents.endMap(); | ||
418 | for( ; iter != end; ++iter) | ||
403 | { | 419 | { |
404 | LLCacheNameEntry* entry = iter->second; | 420 | LLUUID id((*iter).first); |
405 | // Only write entries for which we have valid data. | 421 | LLSD agent = (*iter).second; |
406 | // HACK: Only write agent names. This makes the reader easier. | 422 | U32 ctime = (U32)agent[CTIME].asInteger(); |
407 | if ( entry->mFirstName[0] | 423 | if(ctime < delete_before_time) continue; |
408 | && entry->mLastName[0]) | ||
409 | { | ||
410 | LLUUID id = iter->first; | ||
411 | 424 | ||
412 | // Trivial XOR encoding | 425 | LLCacheNameEntry* entry = new LLCacheNameEntry(); |
413 | S32 i; | 426 | entry->mIsGroup = false; |
414 | for (i = 0; i < UUID_BYTES; i++) | 427 | entry->mCreateTime = ctime; |
415 | { | 428 | std::string first = agent[FIRST].asString(); |
416 | id.mData[i] ^= 0x33; | 429 | first.copy(entry->mFirstName, DB_FIRST_NAME_BUF_SIZE, 0); |
417 | } | 430 | entry->mFirstName[llmin(first.size(),(std::string::size_type)DB_FIRST_NAME_BUF_SIZE-1)] = '\0'; |
431 | std::string last = agent[LAST].asString(); | ||
432 | last.copy(entry->mLastName, DB_LAST_NAME_BUF_SIZE, 0); | ||
433 | entry->mLastName[llmin(last.size(),(std::string::size_type)DB_LAST_NAME_BUF_SIZE-1)] = '\0'; | ||
434 | impl.mCache[id] = entry; | ||
435 | ++count; | ||
436 | } | ||
437 | llinfos << "LLCacheName loaded " << count << " agent names" << llendl; | ||
418 | 438 | ||
419 | char id_string[UUID_STR_SIZE]; /*Flawfinder:ignore*/ | 439 | count = 0; |
420 | id.toString(id_string); | 440 | LLSD groups = data[GROUPS]; |
441 | iter = groups.beginMap(); | ||
442 | end = groups.endMap(); | ||
443 | for( ; iter != end; ++iter) | ||
444 | { | ||
445 | LLUUID id((*iter).first); | ||
446 | LLSD group = (*iter).second; | ||
447 | U32 ctime = (U32)group[CTIME].asInteger(); | ||
448 | if(ctime < delete_before_time) continue; | ||
421 | 449 | ||
422 | // ...not a group name | 450 | LLCacheNameEntry* entry = new LLCacheNameEntry(); |
423 | fprintf(fp, "%s\t%u\t%s\t%s\n", | 451 | entry->mIsGroup = true; |
424 | id_string, | 452 | entry->mCreateTime = ctime; |
425 | entry->mCreateTime, | 453 | std::string name = group[NAME].asString(); |
426 | entry->mFirstName, | 454 | name.copy(entry->mGroupName, DB_GROUP_NAME_BUF_SIZE, 0); |
427 | entry->mLastName); | 455 | entry->mGroupName[llmin(name.size(), (std::string::size_type)DB_GROUP_NAME_BUF_SIZE-1)] = '\0'; |
456 | impl.mCache[id] = entry; | ||
457 | ++count; | ||
458 | } | ||
459 | llinfos << "LLCacheName loaded " << count << " group names" << llendl; | ||
460 | return true; | ||
461 | } | ||
462 | |||
463 | void LLCacheName::exportFile(std::ostream& ostr) | ||
464 | { | ||
465 | LLSD data; | ||
466 | Cache::iterator iter = impl.mCache.begin(); | ||
467 | Cache::iterator end = impl.mCache.end(); | ||
468 | for( ; iter != end; ++iter) | ||
469 | { | ||
470 | // Only write entries for which we have valid data. | ||
471 | LLCacheNameEntry* entry = iter->second; | ||
472 | if(!entry | ||
473 | || (NULL != strchr(entry->mFirstName, '?')) | ||
474 | || (NULL != strchr(entry->mGroupName, '?'))) | ||
475 | { | ||
476 | continue; | ||
477 | } | ||
478 | |||
479 | // store it | ||
480 | LLUUID id = iter->first; | ||
481 | std::string id_str = id.asString(); | ||
482 | if(entry->mFirstName[0] && entry->mLastName[0]) | ||
483 | { | ||
484 | data[AGENTS][id_str][FIRST] = entry->mFirstName; | ||
485 | data[AGENTS][id_str][LAST] = entry->mLastName; | ||
486 | data[AGENTS][id_str][CTIME] = (S32)entry->mCreateTime; | ||
487 | } | ||
488 | else if(entry->mIsGroup && entry->mGroupName[0]) | ||
489 | { | ||
490 | data[GROUPS][id_str][NAME] = entry->mGroupName; | ||
491 | data[GROUPS][id_str][CTIME] = (S32)entry->mCreateTime; | ||
428 | } | 492 | } |
429 | } | 493 | } |
494 | |||
495 | LLSDSerialize::toPrettyXML(data, ostr); | ||
430 | } | 496 | } |
431 | 497 | ||
432 | 498 | ||
433 | BOOL LLCacheName::getName(const LLUUID& id, char* first, char* last) | 499 | BOOL LLCacheName::getName(const LLUUID& id, std::string& first, std::string& last) |
434 | { | 500 | { |
435 | if(id.isNull()) | 501 | if(id.isNull()) |
436 | { | 502 | { |
437 | // The function signature needs to change to pass in the | 503 | first = CN_NOBODY; |
438 | // length of first and last. | 504 | last.clear(); |
439 | strcpy(first, CN_NOBODY); /*Flawfinder: ignore*/ | ||
440 | last[0] = '\0'; | ||
441 | return FALSE; | 505 | return FALSE; |
442 | } | 506 | } |
443 | 507 | ||
444 | LLCacheNameEntry* entry = get_ptr_in_map(impl.mCache, id ); | 508 | LLCacheNameEntry* entry = get_ptr_in_map(impl.mCache, id ); |
445 | if (entry) | 509 | if (entry) |
446 | { | 510 | { |
447 | // The function signature needs to change to pass in the | 511 | first = entry->mFirstName; |
448 | // length of first and last. | 512 | last = entry->mLastName; |
449 | strcpy(first, entry->mFirstName); /*Flawfinder: ignore*/ | ||
450 | strcpy(last, entry->mLastName); /*Flawfinder: ignore*/ | ||
451 | return TRUE; | 513 | return TRUE; |
452 | } | 514 | } |
453 | else | 515 | else |
454 | { | 516 | { |
455 | //The function signature needs to change to pass in the | 517 | first = CN_WAITING; |
456 | //length of first and last. | 518 | last.clear(); |
457 | strcpy(first,(ll_frand() < HIPPO_PROBABILITY) | ||
458 | ? CN_HIPPOS | ||
459 | : CN_WAITING); | ||
460 | strcpy(last, ""); /*Flawfinder: ignore*/ | ||
461 | |||
462 | if (!impl.isRequestPending(id)) | 519 | if (!impl.isRequestPending(id)) |
463 | { | 520 | { |
464 | impl.mAskNameQueue.insert(id); | 521 | impl.mAskNameQueue.insert(id); |
@@ -468,15 +525,29 @@ BOOL LLCacheName::getName(const LLUUID& id, char* first, char* last) | |||
468 | 525 | ||
469 | } | 526 | } |
470 | 527 | ||
528 | BOOL LLCacheName::getFullName(const LLUUID& id, std::string& fullname) | ||
529 | { | ||
530 | std::string first_name, last_name; | ||
531 | BOOL res = getName(id, first_name, last_name); | ||
532 | fullname = first_name + " " + last_name; | ||
533 | return res; | ||
534 | } | ||
471 | 535 | ||
536 | // *TODO: Deprecate | ||
537 | BOOL LLCacheName::getName(const LLUUID& id, char* first, char* last) | ||
538 | { | ||
539 | std::string first_name, last_name; | ||
540 | BOOL res = getName(id, first_name, last_name); | ||
541 | strcpy(first, first_name.c_str()); | ||
542 | strcpy(last, last_name.c_str()); | ||
543 | return res; | ||
544 | } | ||
472 | 545 | ||
473 | BOOL LLCacheName::getGroupName(const LLUUID& id, char* group) | 546 | BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group) |
474 | { | 547 | { |
475 | if(id.isNull()) | 548 | if(id.isNull()) |
476 | { | 549 | { |
477 | // The function signature needs to change to pass in the | 550 | group = CN_NONE; |
478 | // length of first and last. | ||
479 | strcpy(group, CN_NONE); /*Flawfinder: ignore*/ | ||
480 | return FALSE; | 551 | return FALSE; |
481 | } | 552 | } |
482 | 553 | ||
@@ -492,16 +563,12 @@ BOOL LLCacheName::getGroupName(const LLUUID& id, char* group) | |||
492 | 563 | ||
493 | if (entry) | 564 | if (entry) |
494 | { | 565 | { |
495 | // The function signature needs to change to pass in the length | 566 | group = entry->mGroupName; |
496 | // of group. | ||
497 | strcpy(group, entry->mGroupName); /*Flawfinder: ignore*/ | ||
498 | return TRUE; | 567 | return TRUE; |
499 | } | 568 | } |
500 | else | 569 | else |
501 | { | 570 | { |
502 | // The function signature needs to change to pass in the length | 571 | group = CN_WAITING; |
503 | // of first and last. | ||
504 | strcpy(group, CN_WAITING); /*Flawfinder: ignore*/ | ||
505 | if (!impl.isRequestPending(id)) | 572 | if (!impl.isRequestPending(id)) |
506 | { | 573 | { |
507 | impl.mAskGroupQueue.insert(id); | 574 | impl.mAskGroupQueue.insert(id); |
@@ -510,6 +577,16 @@ BOOL LLCacheName::getGroupName(const LLUUID& id, char* group) | |||
510 | } | 577 | } |
511 | } | 578 | } |
512 | 579 | ||
580 | // *TODO: Deprecate | ||
581 | BOOL LLCacheName::getGroupName(const LLUUID& id, char* group) | ||
582 | { | ||
583 | std::string group_name; | ||
584 | BOOL res = getGroupName(id, group_name); | ||
585 | strcpy(group, group_name.c_str()); | ||
586 | return res; | ||
587 | } | ||
588 | |||
589 | |||
513 | // TODO: Make the cache name callback take a SINGLE std::string, | 590 | // TODO: Make the cache name callback take a SINGLE std::string, |
514 | // not a separate first and last name. | 591 | // not a separate first and last name. |
515 | void LLCacheName::get(const LLUUID& id, BOOL is_group, LLCacheNameCallback callback, void* user_data) | 592 | void LLCacheName::get(const LLUUID& id, BOOL is_group, LLCacheNameCallback callback, void* user_data) |
@@ -884,6 +961,3 @@ void LLCacheName::Impl::handleUUIDGroupNameReply(LLMessageSystem* msg, void** us | |||
884 | ((LLCacheName::Impl*)userData)->processUUIDReply(msg, true); | 961 | ((LLCacheName::Impl*)userData)->processUUIDReply(msg, true); |
885 | } | 962 | } |
886 | 963 | ||
887 | |||
888 | |||
889 | |||
diff --git a/linden/indra/llmessage/llcachename.h b/linden/indra/llmessage/llcachename.h index 5a0a0d7..26a873f 100644 --- a/linden/indra/llmessage/llcachename.h +++ b/linden/indra/llmessage/llcachename.h | |||
@@ -63,9 +63,12 @@ public: | |||
63 | 63 | ||
64 | void cancelCallback(const LLUUID& id, LLCacheNameCallback callback, void* user_data = NULL); | 64 | void cancelCallback(const LLUUID& id, LLCacheNameCallback callback, void* user_data = NULL); |
65 | 65 | ||
66 | // storing cache on disk; for viewer, in name.cache | 66 | // janky old format. Remove after a while. Phoenix. 2008-01-30 |
67 | void importFile(FILE* fp); | 67 | void importFile(FILE* fp); |
68 | void exportFile(FILE* fp); | 68 | |
69 | // storing cache on disk; for viewer, in name.cache | ||
70 | bool importFile(std::istream& istr); | ||
71 | void exportFile(std::ostream& ostr); | ||
69 | 72 | ||
70 | // If available, copies the first and last name into the strings provided. | 73 | // If available, copies the first and last name into the strings provided. |
71 | // first must be at least DB_FIRST_NAME_BUF_SIZE characters. | 74 | // first must be at least DB_FIRST_NAME_BUF_SIZE characters. |
@@ -73,12 +76,15 @@ public: | |||
73 | // If not available, copies the string "waiting". | 76 | // If not available, copies the string "waiting". |
74 | // Returns TRUE iff available. | 77 | // Returns TRUE iff available. |
75 | BOOL getName(const LLUUID& id, char* first, char* last); | 78 | BOOL getName(const LLUUID& id, char* first, char* last); |
79 | BOOL getName(const LLUUID& id, std::string& first, std::string& last); | ||
80 | BOOL getFullName(const LLUUID& id, std::string& fullname); | ||
76 | 81 | ||
77 | // If available, this method copies the group name into the string | 82 | // If available, this method copies the group name into the string |
78 | // provided. The caller must allocate at least | 83 | // provided. The caller must allocate at least |
79 | // DB_GROUP_NAME_BUF_SIZE characters. If not available, this | 84 | // DB_GROUP_NAME_BUF_SIZE characters. If not available, this |
80 | // method copies the string "waiting". Returns TRUE iff available. | 85 | // method copies the string "waiting". Returns TRUE iff available. |
81 | BOOL getGroupName(const LLUUID& id, char* group); | 86 | BOOL getGroupName(const LLUUID& id, char* group); |
87 | BOOL getGroupName(const LLUUID& id, std::string& group); | ||
82 | 88 | ||
83 | // Call the callback with the group or avatar name. | 89 | // Call the callback with the group or avatar name. |
84 | // If the data is currently available, may call the callback immediatly | 90 | // If the data is currently available, may call the callback immediatly |
@@ -104,6 +110,7 @@ public: | |||
104 | static LLString getDefaultName(); | 110 | static LLString getDefaultName(); |
105 | 111 | ||
106 | private: | 112 | private: |
113 | |||
107 | class Impl; | 114 | class Impl; |
108 | Impl& impl; | 115 | Impl& impl; |
109 | }; | 116 | }; |
diff --git a/linden/indra/llmessage/llcallbacklisth.h b/linden/indra/llmessage/llcallbacklisth.h deleted file mode 100644 index 9b1e403..0000000 --- a/linden/indra/llmessage/llcallbacklisth.h +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | /** | ||
2 | * @file llcallbacklisth.h | ||
3 | * @brief Like LLCallbackList but uses handles instead of pointers for | ||
4 | * user data | ||
5 | * | ||
6 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | ||
7 | * | ||
8 | * Copyright (c) 2002-2008, Linden Research, Inc. | ||
9 | * | ||
10 | * Second Life Viewer Source Code | ||
11 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
12 | * to you under the terms of the GNU General Public License, version 2.0 | ||
13 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
14 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
15 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
16 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
17 | * | ||
18 | * There are special exceptions to the terms and conditions of the GPL as | ||
19 | * it is applied to this Source Code. View the full text of the exception | ||
20 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
21 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
22 | * | ||
23 | * By copying, modifying or distributing this software, you acknowledge | ||
24 | * that you have read and understood your obligations described above, | ||
25 | * and agree to abide by those obligations. | ||
26 | * | ||
27 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
28 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
29 | * COMPLETENESS OR PERFORMANCE. | ||
30 | * $/LicenseInfo$ | ||
31 | */ | ||
32 | |||
33 | #ifndef LL_LLCALLBACKLISTH_H | ||
34 | #define LL_LLCALLBACKLISTH_H | ||
35 | |||
36 | #include "doublelinkedlist.h" | ||
37 | |||
38 | typedef void(*LLHandleCallback)(void** handle ); | ||
39 | |||
40 | class LLCallbackNodeH; | ||
41 | |||
42 | class LLCallbackListH | ||
43 | { | ||
44 | protected: | ||
45 | class LLCallbackNodeH | ||
46 | { | ||
47 | public: | ||
48 | LLCallbackNodeH( LLHandleCallback cb, void** h ) : mCallback(cb), mHandle(h) {} | ||
49 | void call() { (*mCallback)(mHandle); } | ||
50 | |||
51 | public: | ||
52 | LLHandleCallback mCallback; | ||
53 | void** mHandle; | ||
54 | }; | ||
55 | |||
56 | public: | ||
57 | ~LLCallbackListH() | ||
58 | { mCallbackList.deleteAllData(); } | ||
59 | |||
60 | void addFunction( LLHandleCallback func, void** handle = NULL ) // register a callback, which will be called as func(data) | ||
61 | { mCallbackList.addDataAtEnd( new LLCallbackNodeH( func, handle ) ); } | ||
62 | |||
63 | BOOL containsFunction( LLHandleCallback func, void** handle = NULL ) // true if list already contains the function/data pair | ||
64 | { | ||
65 | for( LLCallbackNodeH *p = mCallbackList.getFirstData(); p; p = mCallbackList.getNextData() ) | ||
66 | { | ||
67 | if( p->mCallback == func && p->mHandle == handle) | ||
68 | { | ||
69 | return TRUE; | ||
70 | } | ||
71 | } | ||
72 | return FALSE; | ||
73 | } | ||
74 | |||
75 | BOOL deleteFunction( LLHandleCallback func, void** handle = NULL ) // removes the first instance of this function/data pair from the list, false if not found | ||
76 | { | ||
77 | for( LLCallbackNodeH *p = mCallbackList.getFirstData(); p; p = mCallbackList.getNextData() ) | ||
78 | { | ||
79 | if( p->mCallback == func && p->mHandle == handle) | ||
80 | { | ||
81 | mCallbackList.deleteCurrentData(); | ||
82 | return TRUE; | ||
83 | } | ||
84 | } | ||
85 | return FALSE; | ||
86 | } | ||
87 | |||
88 | void callFunctions() // calls all functions | ||
89 | { | ||
90 | for( LLCallbackNodeH *p = mCallbackList.getFirstData(); p; p = mCallbackList.getNextData() ) | ||
91 | { | ||
92 | p->call(); | ||
93 | } | ||
94 | } | ||
95 | |||
96 | void deleteAllFunctions() | ||
97 | { mCallbackList.deleteAllData(); } | ||
98 | |||
99 | protected: | ||
100 | LLDoubleLinkedList<LLCallbackNodeH> mCallbackList; | ||
101 | }; | ||
102 | |||
103 | #endif // LL_LLCALLBACKLISTH_H | ||
diff --git a/linden/indra/llmessage/llcircuit.h b/linden/indra/llmessage/llcircuit.h index 3f1a46a..552b50f 100644 --- a/linden/indra/llmessage/llcircuit.h +++ b/linden/indra/llmessage/llcircuit.h | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <vector> | 37 | #include <vector> |
38 | 38 | ||
39 | #include "llerror.h" | 39 | #include "llerror.h" |
40 | #include "linked_lists.h" | ||
41 | 40 | ||
42 | #include "lltimer.h" | 41 | #include "lltimer.h" |
43 | #include "timing.h" | 42 | #include "timing.h" |
diff --git a/linden/indra/llmessage/llcurl.cpp b/linden/indra/llmessage/llcurl.cpp index 3969d18..badda64 100644 --- a/linden/indra/llmessage/llcurl.cpp +++ b/linden/indra/llmessage/llcurl.cpp | |||
@@ -2,7 +2,7 @@ | |||
2 | * @file llcurl.h | 2 | * @file llcurl.h |
3 | * @author Zero / Donovan | 3 | * @author Zero / Donovan |
4 | * @date 2006-10-15 | 4 | * @date 2006-10-15 |
5 | * @brief Curl wrapper | 5 | * @brief Implementation of wrapper around libcurl. |
6 | * | 6 | * |
7 | * $LicenseInfo:firstyear=2006&license=viewergpl$ | 7 | * $LicenseInfo:firstyear=2006&license=viewergpl$ |
8 | * | 8 | * |
@@ -31,13 +31,29 @@ | |||
31 | * $/LicenseInfo$ | 31 | * $/LicenseInfo$ |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #if LL_WINDOWS | ||
35 | #define SAFE_SSL 1 | ||
36 | #elif LL_DARWIN | ||
37 | #define SAFE_SSL 1 | ||
38 | #else | ||
39 | #define SAFE_SSL 1 | ||
40 | #endif | ||
41 | |||
34 | #include "linden_common.h" | 42 | #include "linden_common.h" |
35 | 43 | ||
36 | #include "llcurl.h" | 44 | #include "llcurl.h" |
37 | 45 | ||
46 | #include <algorithm> | ||
38 | #include <iomanip> | 47 | #include <iomanip> |
48 | #include <curl/curl.h> | ||
49 | #if SAFE_SSL | ||
50 | #include <openssl/crypto.h> | ||
51 | #endif | ||
39 | 52 | ||
53 | #include "llbufferstream.h" | ||
54 | #include "llstl.h" | ||
40 | #include "llsdserialize.h" | 55 | #include "llsdserialize.h" |
56 | #include "llthread.h" | ||
41 | 57 | ||
42 | ////////////////////////////////////////////////////////////////////////////// | 58 | ////////////////////////////////////////////////////////////////////////////// |
43 | /* | 59 | /* |
@@ -55,40 +71,112 @@ | |||
55 | do this. | 71 | do this. |
56 | */ | 72 | */ |
57 | 73 | ||
58 | using namespace std; | 74 | ////////////////////////////////////////////////////////////////////////////// |
59 | 75 | ||
76 | static const S32 EASY_HANDLE_POOL_SIZE = 5; | ||
77 | static const S32 MULTI_PERFORM_CALL_REPEAT = 5; | ||
78 | static const S32 CURL_REQUEST_TIMEOUT = 30; // seconds | ||
79 | static const S32 MAX_ACTIVE_REQUEST_COUNT = 100; | ||
80 | |||
81 | // DEBUG // | ||
82 | S32 gCurlEasyCount = 0; | ||
83 | S32 gCurlMultiCount = 0; | ||
84 | |||
85 | ////////////////////////////////////////////////////////////////////////////// | ||
86 | |||
87 | //static | ||
88 | std::vector<LLMutex*> LLCurl::sSSLMutex; | ||
89 | std::string LLCurl::sCAPath; | ||
90 | std::string LLCurl::sCAFile; | ||
91 | |||
92 | //static | ||
93 | void LLCurl::setCAPath(const std::string& path) | ||
94 | { | ||
95 | sCAPath = path; | ||
96 | } | ||
97 | |||
98 | //static | ||
99 | void LLCurl::setCAFile(const std::string& file) | ||
100 | { | ||
101 | sCAFile = file; | ||
102 | } | ||
103 | |||
104 | ////////////////////////////////////////////////////////////////////////////// | ||
105 | |||
60 | LLCurl::Responder::Responder() | 106 | LLCurl::Responder::Responder() |
61 | : mReferenceCount(0) | 107 | : mReferenceCount(0) |
62 | { | 108 | { |
63 | } | 109 | } |
110 | |||
64 | LLCurl::Responder::~Responder() | 111 | LLCurl::Responder::~Responder() |
65 | { | 112 | { |
66 | } | 113 | } |
67 | 114 | ||
68 | // virtual | 115 | // virtual |
69 | void LLCurl::Responder::error(U32 status, const std::stringstream& content) | 116 | void LLCurl::Responder::error(U32 status, const std::string& reason) |
70 | { | 117 | { |
71 | llinfos << "LLCurl::Responder::error " << status << ": " << content.str() << llendl; | 118 | llinfos << status << ": " << reason << llendl; |
72 | } | 119 | } |
73 | 120 | ||
74 | // virtual | 121 | // virtual |
75 | void LLCurl::Responder::result(const std::stringstream& content) | 122 | void LLCurl::Responder::result(const LLSD& content) |
76 | { | 123 | { |
124 | llwarns << "Virtual Function not implemented" << llendl; | ||
77 | } | 125 | } |
78 | 126 | ||
79 | // virtual | 127 | // virtual |
80 | void LLCurl::Responder::completed(U32 status, const std::stringstream& content) | 128 | void LLCurl::Responder::completedRaw(U32 status, const std::string& reason, |
129 | const LLChannelDescriptors& channels, | ||
130 | const LLIOPipe::buffer_ptr_t& buffer) | ||
81 | { | 131 | { |
82 | if (200 <= status && status < 300) | 132 | if (isGoodStatus(status)) |
133 | { | ||
134 | LLSD content; | ||
135 | LLBufferStream istr(channels, buffer.get()); | ||
136 | LLSDSerialize::fromXML(content, istr); | ||
137 | /* | ||
138 | const S32 parseError = -1; | ||
139 | if(LLSDSerialize::fromXML(content, istr) == parseError) | ||
140 | { | ||
141 | mStatus = 498; | ||
142 | mReason = "Client Parse Error"; | ||
143 | } | ||
144 | */ | ||
145 | completed(status, reason, content); | ||
146 | } | ||
147 | else if (status == 400) | ||
148 | { | ||
149 | // Get reason from buffer | ||
150 | char tbuf[4096]; | ||
151 | S32 len = 4096; | ||
152 | buffer->readAfter(channels.in(), NULL, (U8*)tbuf, len); | ||
153 | tbuf[len] = 0; | ||
154 | completed(status, std::string(tbuf), LLSD()); | ||
155 | } | ||
156 | else | ||
157 | { | ||
158 | completed(status, reason, LLSD()); | ||
159 | } | ||
160 | } | ||
161 | |||
162 | // virtual | ||
163 | void LLCurl::Responder::completed(U32 status, const std::string& reason, const LLSD& content) | ||
164 | { | ||
165 | if (isGoodStatus(status)) | ||
83 | { | 166 | { |
84 | result(content); | 167 | result(content); |
85 | } | 168 | } |
86 | else | 169 | else |
87 | { | 170 | { |
88 | error(status, content); | 171 | error(status, reason); |
89 | } | 172 | } |
90 | } | 173 | } |
91 | 174 | ||
175 | //virtual | ||
176 | void LLCurl::Responder::completedHeader(U32 status, const std::string& reason, const LLSD& content) | ||
177 | { | ||
178 | |||
179 | } | ||
92 | 180 | ||
93 | namespace boost | 181 | namespace boost |
94 | { | 182 | { |
@@ -106,226 +194,456 @@ namespace boost | |||
106 | } | 194 | } |
107 | }; | 195 | }; |
108 | 196 | ||
197 | |||
109 | ////////////////////////////////////////////////////////////////////////////// | 198 | ////////////////////////////////////////////////////////////////////////////// |
110 | 199 | ||
111 | size_t | 200 | |
112 | curlOutputCallback(void* data, size_t size, size_t nmemb, void* user_data) | 201 | class LLCurl::Easy |
113 | { | 202 | { |
114 | stringstream& output = *(stringstream*)user_data; | 203 | LOG_CLASS(Easy); |
204 | |||
205 | private: | ||
206 | Easy(); | ||
115 | 207 | ||
116 | size_t n = size * nmemb; | 208 | public: |
117 | output.write((const char*)data, n); | 209 | static Easy* getEasy(); |
118 | if (!((istream&)output).good()) { | 210 | ~Easy(); |
119 | std::cerr << "WHAT!?!?!? istream side bad" << std::endl; | ||
120 | } | ||
121 | if (!((ostream&)output).good()) { | ||
122 | std::cerr << "WHAT!?!?!? ostream side bad" << std::endl; | ||
123 | } | ||
124 | 211 | ||
125 | return n; | 212 | CURL* getCurlHandle() const { return mCurlEasyHandle; } |
126 | } | ||
127 | 213 | ||
128 | // Only used if request contained a body (post or put), Not currently implemented. | 214 | void setErrorBuffer(); |
129 | // size_t | 215 | void setCA(); |
130 | // curlRequestCallback(void* data, size_t size, size_t nmemb, void* user_data) | ||
131 | // { | ||
132 | // stringstream& request = *(stringstream*)user_data; | ||
133 | 216 | ||
134 | // size_t n = size * nmemb; | 217 | void setopt(CURLoption option, S32 value); |
135 | // request.read((char*)data, n); | 218 | // These assume the setter does not free value! |
136 | // return request.gcount(); | 219 | void setopt(CURLoption option, void* value); |
137 | // } | 220 | void setopt(CURLoption option, char* value); |
138 | 221 | // Copies the string so that it is gauranteed to stick around | |
222 | void setoptString(CURLoption option, const std::string& value); | ||
223 | |||
224 | void slist_append(const char* str); | ||
225 | void setHeaders(); | ||
226 | |||
227 | U32 report(CURLcode); | ||
228 | void getTransferInfo(LLCurl::TransferInfo* info); | ||
139 | 229 | ||
230 | void prepRequest(const std::string& url, ResponderPtr, bool post = false); | ||
231 | |||
232 | const char* getErrorBuffer(); | ||
140 | 233 | ||
234 | std::stringstream& getInput() { return mInput; } | ||
235 | std::stringstream& getHeaderOutput() { return mHeaderOutput; } | ||
236 | LLIOPipe::buffer_ptr_t& getOutput() { return mOutput; } | ||
237 | const LLChannelDescriptors& getChannels() { return mChannels; } | ||
238 | |||
239 | void resetState(); | ||
141 | 240 | ||
241 | private: | ||
242 | CURL* mCurlEasyHandle; | ||
243 | struct curl_slist* mHeaders; | ||
244 | |||
245 | std::stringstream mRequest; | ||
246 | LLChannelDescriptors mChannels; | ||
247 | LLIOPipe::buffer_ptr_t mOutput; | ||
248 | std::stringstream mInput; | ||
249 | std::stringstream mHeaderOutput; | ||
250 | char mErrorBuffer[CURL_ERROR_SIZE]; | ||
251 | |||
252 | // Note: char*'s not strings since we pass pointers to curl | ||
253 | std::vector<char*> mStrings; | ||
254 | |||
255 | ResponderPtr mResponder; | ||
256 | }; | ||
142 | 257 | ||
143 | LLCurl::Easy::Easy() | 258 | LLCurl::Easy::Easy() |
259 | : mHeaders(NULL), | ||
260 | mCurlEasyHandle(NULL) | ||
144 | { | 261 | { |
145 | mHeaders = 0; | 262 | mErrorBuffer[0] = 0; |
146 | mHeaders = curl_slist_append(mHeaders, "Connection: keep-alive"); | 263 | } |
147 | mHeaders = curl_slist_append(mHeaders, "Keep-alive: 300"); | 264 | |
148 | mHeaders = curl_slist_append(mHeaders, "Content-Type: application/xml"); | 265 | LLCurl::Easy* LLCurl::Easy::getEasy() |
149 | // FIXME: shouldn't be there for GET/DELETE | 266 | { |
150 | // FIXME: should have ACCEPT headers | 267 | Easy* easy = new Easy(); |
151 | 268 | easy->mCurlEasyHandle = curl_easy_init(); | |
152 | mHandle = curl_easy_init(); | 269 | if (!easy->mCurlEasyHandle) |
270 | { | ||
271 | // this can happen if we have too many open files (fails in c-ares/ares_init.c) | ||
272 | llwarns << "curl_multi_init() returned NULL! Easy handles: " << gCurlEasyCount << " Multi handles: " << gCurlMultiCount << llendl; | ||
273 | delete easy; | ||
274 | return NULL; | ||
275 | } | ||
276 | ++gCurlEasyCount; | ||
277 | return easy; | ||
153 | } | 278 | } |
154 | 279 | ||
155 | LLCurl::Easy::~Easy() | 280 | LLCurl::Easy::~Easy() |
156 | { | 281 | { |
157 | curl_easy_cleanup(mHandle); | 282 | curl_easy_cleanup(mCurlEasyHandle); |
283 | --gCurlEasyCount; | ||
158 | curl_slist_free_all(mHeaders); | 284 | curl_slist_free_all(mHeaders); |
285 | for_each(mStrings.begin(), mStrings.end(), DeletePointer()); | ||
159 | } | 286 | } |
160 | 287 | ||
161 | void | 288 | void LLCurl::Easy::resetState() |
162 | LLCurl::Easy::get(const string& url, ResponderPtr responder) | ||
163 | { | 289 | { |
164 | prep(url, responder); | 290 | curl_easy_reset(mCurlEasyHandle); |
165 | curl_easy_setopt(mHandle, CURLOPT_HTTPGET, 1); | 291 | |
292 | if (mHeaders) | ||
293 | { | ||
294 | curl_slist_free_all(mHeaders); | ||
295 | mHeaders = NULL; | ||
296 | } | ||
297 | |||
298 | mRequest.str(""); | ||
299 | mRequest.clear(); | ||
300 | |||
301 | mOutput.reset(); | ||
302 | |||
303 | mInput.str(""); | ||
304 | mInput.clear(); | ||
305 | |||
306 | mErrorBuffer[0] = 0; | ||
307 | |||
308 | mHeaderOutput.str(""); | ||
309 | mHeaderOutput.clear(); | ||
166 | } | 310 | } |
167 | 311 | ||
168 | void | 312 | void LLCurl::Easy::setErrorBuffer() |
169 | LLCurl::Easy::getByteRange(const string& url, S32 offset, S32 length, ResponderPtr responder) | ||
170 | { | 313 | { |
171 | mRange = llformat("Range: bytes=%d-%d", offset,offset+length-1); | 314 | setopt(CURLOPT_ERRORBUFFER, &mErrorBuffer); |
172 | mHeaders = curl_slist_append(mHeaders, mRange.c_str()); | ||
173 | prep(url, responder); | ||
174 | curl_easy_setopt(mHandle, CURLOPT_HTTPGET, 1); | ||
175 | } | 315 | } |
176 | 316 | ||
177 | void | 317 | const char* LLCurl::Easy::getErrorBuffer() |
178 | LLCurl::Easy::perform() | ||
179 | { | 318 | { |
180 | report(curl_easy_perform(mHandle)); | 319 | return mErrorBuffer; |
181 | } | 320 | } |
182 | 321 | ||
183 | void | 322 | void LLCurl::Easy::setCA() |
184 | LLCurl::Easy::prep(const std::string& url, ResponderPtr responder) | ||
185 | { | 323 | { |
186 | #if !LL_DARWIN | 324 | if(!sCAPath.empty()) |
187 | curl_easy_reset(mHandle); // SJB: doesn't exisit on OSX 10.3.9 | 325 | { |
188 | #else | 326 | setoptString(CURLOPT_CAPATH, sCAPath); |
189 | // SJB: equivalent? fast? | ||
190 | curl_easy_cleanup(mHandle); | ||
191 | mHandle = curl_easy_init(); | ||
192 | #endif | ||
193 | |||
194 | curl_easy_setopt(mHandle, CURLOPT_PRIVATE, this); | ||
195 | |||
196 | // curl_easy_setopt(mHandle, CURLOPT_VERBOSE, 1); // usefull for debugging | ||
197 | curl_easy_setopt(mHandle, CURLOPT_NOSIGNAL, 1); | ||
198 | curl_easy_setopt(mHandle, CURLOPT_WRITEFUNCTION, &curlOutputCallback); | ||
199 | curl_easy_setopt(mHandle, CURLOPT_WRITEDATA, &mOutput); | ||
200 | #if 1 // For debug | ||
201 | curl_easy_setopt(mHandle, CURLOPT_HEADERFUNCTION, &curlOutputCallback); | ||
202 | curl_easy_setopt(mHandle, CURLOPT_HEADERDATA, &mHeaderOutput); | ||
203 | #endif | ||
204 | curl_easy_setopt(mHandle, CURLOPT_ERRORBUFFER, &mErrorBuffer); | ||
205 | curl_easy_setopt(mHandle, CURLOPT_ENCODING, ""); | ||
206 | curl_easy_setopt(mHandle, CURLOPT_SSL_VERIFYPEER, false); | ||
207 | curl_easy_setopt(mHandle, CURLOPT_HTTPHEADER, mHeaders); | ||
208 | |||
209 | mOutput.str(""); | ||
210 | if (!((istream&)mOutput).good()) { | ||
211 | std::cerr << "WHAT!?!?!? istream side bad" << std::endl; | ||
212 | } | 327 | } |
213 | if (!((ostream&)mOutput).good()) { | 328 | if(!sCAFile.empty()) |
214 | std::cerr << "WHAT!?!?!? ostream side bad" << std::endl; | 329 | { |
330 | setoptString(CURLOPT_CAINFO, sCAFile); | ||
215 | } | 331 | } |
332 | } | ||
216 | 333 | ||
217 | mURL = url; | 334 | void LLCurl::Easy::setHeaders() |
218 | curl_easy_setopt(mHandle, CURLOPT_URL, mURL.c_str()); | 335 | { |
336 | setopt(CURLOPT_HTTPHEADER, mHeaders); | ||
337 | } | ||
219 | 338 | ||
220 | mResponder = responder; | 339 | void LLCurl::Easy::getTransferInfo(LLCurl::TransferInfo* info) |
340 | { | ||
341 | curl_easy_getinfo(mCurlEasyHandle, CURLINFO_SIZE_DOWNLOAD, &info->mSizeDownload); | ||
342 | curl_easy_getinfo(mCurlEasyHandle, CURLINFO_TOTAL_TIME, &info->mTotalTime); | ||
343 | curl_easy_getinfo(mCurlEasyHandle, CURLINFO_SPEED_DOWNLOAD, &info->mSpeedDownload); | ||
221 | } | 344 | } |
222 | 345 | ||
223 | void | 346 | U32 LLCurl::Easy::report(CURLcode code) |
224 | LLCurl::Easy::report(CURLcode code) | ||
225 | { | 347 | { |
226 | if (!mResponder) return; | 348 | U32 responseCode = 0; |
227 | 349 | std::string responseReason; | |
228 | long responseCode; | ||
229 | 350 | ||
230 | if (code == CURLE_OK) | 351 | if (code == CURLE_OK) |
231 | { | 352 | { |
232 | curl_easy_getinfo(mHandle, CURLINFO_RESPONSE_CODE, &responseCode); | 353 | curl_easy_getinfo(mCurlEasyHandle, CURLINFO_RESPONSE_CODE, &responseCode); |
354 | //*TODO: get reason from first line of mHeaderOutput | ||
233 | } | 355 | } |
234 | else | 356 | else |
235 | { | 357 | { |
236 | responseCode = 499; | 358 | responseCode = 499; |
359 | responseReason = strerror(code) + " : " + mErrorBuffer; | ||
360 | } | ||
361 | |||
362 | if (mResponder) | ||
363 | { | ||
364 | mResponder->completedRaw(responseCode, responseReason, mChannels, mOutput); | ||
365 | mResponder = NULL; | ||
237 | } | 366 | } |
238 | 367 | ||
239 | mResponder->completed(responseCode, mOutput); | 368 | resetState(); |
240 | mResponder = NULL; | 369 | return responseCode; |
241 | } | 370 | } |
242 | 371 | ||
372 | // Note: these all assume the caller tracks the value (i.e. keeps it persistant) | ||
373 | void LLCurl::Easy::setopt(CURLoption option, S32 value) | ||
374 | { | ||
375 | curl_easy_setopt(mCurlEasyHandle, option, value); | ||
376 | } | ||
243 | 377 | ||
378 | void LLCurl::Easy::setopt(CURLoption option, void* value) | ||
379 | { | ||
380 | curl_easy_setopt(mCurlEasyHandle, option, value); | ||
381 | } | ||
244 | 382 | ||
383 | void LLCurl::Easy::setopt(CURLoption option, char* value) | ||
384 | { | ||
385 | curl_easy_setopt(mCurlEasyHandle, option, value); | ||
386 | } | ||
245 | 387 | ||
388 | // Note: this copies the string so that the caller does not have to keep it around | ||
389 | void LLCurl::Easy::setoptString(CURLoption option, const std::string& value) | ||
390 | { | ||
391 | char* tstring = new char[value.length()+1]; | ||
392 | strcpy(tstring, value.c_str()); | ||
393 | mStrings.push_back(tstring); | ||
394 | curl_easy_setopt(mCurlEasyHandle, option, tstring); | ||
395 | } | ||
246 | 396 | ||
397 | void LLCurl::Easy::slist_append(const char* str) | ||
398 | { | ||
399 | mHeaders = curl_slist_append(mHeaders, str); | ||
400 | } | ||
247 | 401 | ||
248 | LLCurl::Multi::Multi() | 402 | size_t curlReadCallback(char* data, size_t size, size_t nmemb, void* user_data) |
249 | { | 403 | { |
250 | mHandle = curl_multi_init(); | 404 | LLCurl::Easy* easy = (LLCurl::Easy*)user_data; |
405 | |||
406 | S32 n = size * nmemb; | ||
407 | S32 startpos = easy->getInput().tellg(); | ||
408 | easy->getInput().seekg(0, std::ios::end); | ||
409 | S32 endpos = easy->getInput().tellg(); | ||
410 | easy->getInput().seekg(startpos, std::ios::beg); | ||
411 | S32 maxn = endpos - startpos; | ||
412 | n = llmin(n, maxn); | ||
413 | easy->getInput().read((char*)data, n); | ||
414 | |||
415 | return n; | ||
251 | } | 416 | } |
252 | 417 | ||
253 | LLCurl::Multi::~Multi() | 418 | size_t curlWriteCallback(char* data, size_t size, size_t nmemb, void* user_data) |
254 | { | 419 | { |
255 | // FIXME: should clean up excess handles in mFreeEasy | 420 | LLCurl::Easy* easy = (LLCurl::Easy*)user_data; |
256 | curl_multi_cleanup(mHandle); | 421 | |
422 | S32 n = size * nmemb; | ||
423 | easy->getOutput()->append(easy->getChannels().in(), (const U8*)data, n); | ||
424 | |||
425 | return n; | ||
257 | } | 426 | } |
258 | 427 | ||
428 | size_t curlHeaderCallback(void* data, size_t size, size_t nmemb, void* user_data) | ||
429 | { | ||
430 | LLCurl::Easy* easy = (LLCurl::Easy*)user_data; | ||
431 | |||
432 | size_t n = size * nmemb; | ||
433 | easy->getHeaderOutput().write((const char*)data, n); | ||
259 | 434 | ||
260 | void | 435 | return n; |
261 | LLCurl::Multi::get(const std::string& url, ResponderPtr responder) | 436 | } |
437 | |||
438 | void LLCurl::Easy::prepRequest(const std::string& url, ResponderPtr responder, bool post) | ||
262 | { | 439 | { |
263 | LLCurl::Easy* easy = easyAlloc(); | 440 | resetState(); |
264 | easy->get(url, responder); | 441 | |
265 | curl_multi_add_handle(mHandle, easy->mHandle); | 442 | if (post) setoptString(CURLOPT_ENCODING, ""); |
443 | |||
444 | // setopt(CURLOPT_VERBOSE, 1); // usefull for debugging | ||
445 | setopt(CURLOPT_NOSIGNAL, 1); | ||
446 | |||
447 | mOutput.reset(new LLBufferArray); | ||
448 | setopt(CURLOPT_WRITEFUNCTION, (void*)&curlWriteCallback); | ||
449 | setopt(CURLOPT_WRITEDATA, (void*)this); | ||
450 | |||
451 | setopt(CURLOPT_READFUNCTION, (void*)&curlReadCallback); | ||
452 | setopt(CURLOPT_READDATA, (void*)this); | ||
453 | |||
454 | setopt(CURLOPT_HEADERFUNCTION, (void*)&curlHeaderCallback); | ||
455 | setopt(CURLOPT_HEADERDATA, (void*)this); | ||
456 | |||
457 | setErrorBuffer(); | ||
458 | setCA(); | ||
459 | |||
460 | setopt(CURLOPT_SSL_VERIFYPEER, true); | ||
461 | setopt(CURLOPT_TIMEOUT, CURL_REQUEST_TIMEOUT); | ||
462 | |||
463 | setoptString(CURLOPT_URL, url); | ||
464 | |||
465 | mResponder = responder; | ||
466 | |||
467 | if (!post) | ||
468 | { | ||
469 | slist_append("Connection: keep-alive"); | ||
470 | slist_append("Keep-alive: 300"); | ||
471 | } | ||
472 | // *FIX: should have ACCEPT headers | ||
266 | } | 473 | } |
474 | |||
475 | //////////////////////////////////////////////////////////////////////////// | ||
476 | |||
477 | class LLCurl::Multi | ||
478 | { | ||
479 | LOG_CLASS(Multi); | ||
480 | public: | ||
481 | |||
482 | Multi(); | ||
483 | ~Multi(); | ||
484 | |||
485 | Easy* allocEasy(); | ||
486 | bool addEasy(Easy* easy); | ||
267 | 487 | ||
268 | void | 488 | void removeEasy(Easy* easy); |
269 | LLCurl::Multi::getByteRange(const std::string& url, S32 offset, S32 length, ResponderPtr responder) | 489 | |
490 | S32 process(); | ||
491 | S32 perform(); | ||
492 | |||
493 | CURLMsg* info_read(S32* msgs_in_queue); | ||
494 | |||
495 | S32 mQueued; | ||
496 | S32 mErrorCount; | ||
497 | |||
498 | private: | ||
499 | void easyFree(Easy*); | ||
500 | |||
501 | CURLM* mCurlMultiHandle; | ||
502 | |||
503 | typedef std::set<Easy*> easy_active_list_t; | ||
504 | easy_active_list_t mEasyActiveList; | ||
505 | typedef std::map<CURL*, Easy*> easy_active_map_t; | ||
506 | easy_active_map_t mEasyActiveMap; | ||
507 | typedef std::set<Easy*> easy_free_list_t; | ||
508 | easy_free_list_t mEasyFreeList; | ||
509 | }; | ||
510 | |||
511 | LLCurl::Multi::Multi() | ||
512 | : mQueued(0), | ||
513 | mErrorCount(0) | ||
270 | { | 514 | { |
271 | LLCurl::Easy* easy = easyAlloc(); | 515 | mCurlMultiHandle = curl_multi_init(); |
272 | easy->getByteRange(url, offset, length, responder); | 516 | if (!mCurlMultiHandle) |
273 | curl_multi_add_handle(mHandle, easy->mHandle); | 517 | { |
518 | llwarns << "curl_multi_init() returned NULL! Easy handles: " << gCurlEasyCount << " Multi handles: " << gCurlMultiCount << llendl; | ||
519 | mCurlMultiHandle = curl_multi_init(); | ||
520 | } | ||
521 | llassert_always(mCurlMultiHandle); | ||
522 | ++gCurlMultiCount; | ||
274 | } | 523 | } |
524 | |||
525 | LLCurl::Multi::~Multi() | ||
526 | { | ||
527 | // Clean up active | ||
528 | for(easy_active_list_t::iterator iter = mEasyActiveList.begin(); | ||
529 | iter != mEasyActiveList.end(); ++iter) | ||
530 | { | ||
531 | Easy* easy = *iter; | ||
532 | curl_multi_remove_handle(mCurlMultiHandle, easy->getCurlHandle()); | ||
533 | delete easy; | ||
534 | } | ||
535 | mEasyActiveList.clear(); | ||
536 | mEasyActiveMap.clear(); | ||
275 | 537 | ||
276 | void | 538 | // Clean up freed |
277 | LLCurl::Multi::process() | 539 | for_each(mEasyFreeList.begin(), mEasyFreeList.end(), DeletePointer()); |
540 | mEasyFreeList.clear(); | ||
541 | |||
542 | curl_multi_cleanup(mCurlMultiHandle); | ||
543 | --gCurlMultiCount; | ||
544 | } | ||
545 | |||
546 | CURLMsg* LLCurl::Multi::info_read(S32* msgs_in_queue) | ||
278 | { | 547 | { |
279 | int count; | 548 | CURLMsg* curlmsg = curl_multi_info_read(mCurlMultiHandle, msgs_in_queue); |
280 | for (int call_count = 0; call_count < 5; call_count += 1) | 549 | return curlmsg; |
550 | } | ||
551 | |||
552 | |||
553 | S32 LLCurl::Multi::perform() | ||
554 | { | ||
555 | S32 q = 0; | ||
556 | for (S32 call_count = 0; | ||
557 | call_count < MULTI_PERFORM_CALL_REPEAT; | ||
558 | call_count += 1) | ||
281 | { | 559 | { |
282 | if (CURLM_CALL_MULTI_PERFORM != curl_multi_perform(mHandle, &count)) | 560 | CURLMcode code = curl_multi_perform(mCurlMultiHandle, &q); |
561 | if (CURLM_CALL_MULTI_PERFORM != code || q == 0) | ||
283 | { | 562 | { |
284 | break; | 563 | break; |
285 | } | 564 | } |
286 | } | 565 | } |
287 | 566 | mQueued = q; | |
567 | return q; | ||
568 | } | ||
569 | |||
570 | S32 LLCurl::Multi::process() | ||
571 | { | ||
572 | perform(); | ||
573 | |||
288 | CURLMsg* msg; | 574 | CURLMsg* msg; |
289 | int msgs_in_queue; | 575 | int msgs_in_queue; |
290 | while ((msg = curl_multi_info_read(mHandle, &msgs_in_queue))) | 576 | |
577 | S32 processed = 0; | ||
578 | while ((msg = info_read(&msgs_in_queue))) | ||
291 | { | 579 | { |
292 | if (msg->msg != CURLMSG_DONE) continue; | 580 | ++processed; |
293 | Easy* easy = 0; | 581 | if (msg->msg == CURLMSG_DONE) |
294 | curl_easy_getinfo(msg->easy_handle, CURLINFO_PRIVATE, &easy); | 582 | { |
295 | if (!easy) continue; | 583 | U32 response = 0; |
296 | easy->report(msg->data.result); | 584 | easy_active_map_t::iterator iter = mEasyActiveMap.find(msg->easy_handle); |
297 | 585 | if (iter != mEasyActiveMap.end()) | |
298 | curl_multi_remove_handle(mHandle, easy->mHandle); | 586 | { |
299 | easyFree(easy); | 587 | Easy* easy = iter->second; |
588 | response = easy->report(msg->data.result); | ||
589 | removeEasy(easy); | ||
590 | } | ||
591 | else | ||
592 | { | ||
593 | response = 499; | ||
594 | //*TODO: change to llwarns | ||
595 | llerrs << "cleaned up curl request completed!" << llendl; | ||
596 | } | ||
597 | if (response >= 400) | ||
598 | { | ||
599 | // failure of some sort, inc mErrorCount for debugging and flagging multi for destruction | ||
600 | ++mErrorCount; | ||
601 | } | ||
602 | } | ||
300 | } | 603 | } |
604 | return processed; | ||
301 | } | 605 | } |
302 | 606 | ||
303 | 607 | LLCurl::Easy* LLCurl::Multi::allocEasy() | |
304 | |||
305 | LLCurl::Easy* | ||
306 | LLCurl::Multi::easyAlloc() | ||
307 | { | 608 | { |
308 | Easy* easy = 0; | 609 | Easy* easy = 0; |
309 | 610 | ||
310 | if (mFreeEasy.empty()) | 611 | if (mEasyFreeList.empty()) |
311 | { | 612 | { |
312 | easy = new Easy(); | 613 | easy = Easy::getEasy(); |
313 | } | 614 | } |
314 | else | 615 | else |
315 | { | 616 | { |
316 | easy = mFreeEasy.back(); | 617 | easy = *(mEasyFreeList.begin()); |
317 | mFreeEasy.pop_back(); | 618 | mEasyFreeList.erase(easy); |
619 | } | ||
620 | if (easy) | ||
621 | { | ||
622 | mEasyActiveList.insert(easy); | ||
623 | mEasyActiveMap[easy->getCurlHandle()] = easy; | ||
318 | } | 624 | } |
319 | |||
320 | return easy; | 625 | return easy; |
321 | } | 626 | } |
322 | 627 | ||
323 | void | 628 | bool LLCurl::Multi::addEasy(Easy* easy) |
324 | LLCurl::Multi::easyFree(Easy* easy) | ||
325 | { | 629 | { |
326 | if (mFreeEasy.size() < 5) | 630 | CURLMcode mcode = curl_multi_add_handle(mCurlMultiHandle, easy->getCurlHandle()); |
631 | if (mcode != CURLM_OK) | ||
327 | { | 632 | { |
328 | mFreeEasy.push_back(easy); | 633 | llwarns << "Curl Error: " << curl_multi_strerror(mcode) << llendl; |
634 | return false; | ||
635 | } | ||
636 | return true; | ||
637 | } | ||
638 | |||
639 | void LLCurl::Multi::easyFree(Easy* easy) | ||
640 | { | ||
641 | mEasyActiveList.erase(easy); | ||
642 | mEasyActiveMap.erase(easy->getCurlHandle()); | ||
643 | if (mEasyFreeList.size() < EASY_HANDLE_POOL_SIZE) | ||
644 | { | ||
645 | easy->resetState(); | ||
646 | mEasyFreeList.insert(easy); | ||
329 | } | 647 | } |
330 | else | 648 | else |
331 | { | 649 | { |
@@ -333,53 +651,371 @@ LLCurl::Multi::easyFree(Easy* easy) | |||
333 | } | 651 | } |
334 | } | 652 | } |
335 | 653 | ||
654 | void LLCurl::Multi::removeEasy(Easy* easy) | ||
655 | { | ||
656 | curl_multi_remove_handle(mCurlMultiHandle, easy->getCurlHandle()); | ||
657 | easyFree(easy); | ||
658 | } | ||
659 | |||
660 | //static | ||
661 | std::string LLCurl::strerror(CURLcode errorcode) | ||
662 | { | ||
663 | #if LL_DARWIN | ||
664 | // curl_easy_strerror was added in libcurl 7.12.0. Unfortunately, the version in the Mac OS X 10.3.9 SDK is 7.10.2... | ||
665 | // There's a problem with the custom curl headers in our build that keeps me from #ifdefing this on the libcurl version number | ||
666 | // (the correct check would be #if LIBCURL_VERSION_NUM >= 0x070c00). We'll fix the header problem soon, but for now | ||
667 | // just punt and print the numeric error code on the Mac. | ||
668 | return llformat("%d", errorcode); | ||
669 | #else // LL_DARWIN | ||
670 | return std::string(curl_easy_strerror(errorcode)); | ||
671 | #endif // LL_DARWIN | ||
672 | } | ||
673 | |||
674 | //////////////////////////////////////////////////////////////////////////// | ||
675 | // For generating a simple request for data | ||
676 | // using one multi and one easy per request | ||
677 | |||
678 | LLCurlRequest::LLCurlRequest() | ||
679 | : mActiveMulti(NULL) | ||
680 | { | ||
681 | } | ||
682 | |||
683 | LLCurlRequest::~LLCurlRequest() | ||
684 | { | ||
685 | for_each(mMultiSet.begin(), mMultiSet.end(), DeletePointer()); | ||
686 | } | ||
687 | |||
688 | void LLCurlRequest::addMulti() | ||
689 | { | ||
690 | LLCurl::Multi* multi = new LLCurl::Multi(); | ||
691 | mMultiSet.insert(multi); | ||
692 | mActiveMulti = multi; | ||
693 | mActiveRequestCount = 0; | ||
694 | } | ||
695 | |||
696 | LLCurl::Easy* LLCurlRequest::allocEasy() | ||
697 | { | ||
698 | if (!mActiveMulti || | ||
699 | mActiveRequestCount >= MAX_ACTIVE_REQUEST_COUNT || | ||
700 | mActiveMulti->mErrorCount > 0) | ||
701 | { | ||
702 | addMulti(); | ||
703 | } | ||
704 | llassert_always(mActiveMulti); | ||
705 | ++mActiveRequestCount; | ||
706 | LLCurl::Easy* easy = mActiveMulti->allocEasy(); | ||
707 | return easy; | ||
708 | } | ||
709 | |||
710 | bool LLCurlRequest::addEasy(LLCurl::Easy* easy) | ||
711 | { | ||
712 | llassert_always(mActiveMulti); | ||
713 | bool res = mActiveMulti->addEasy(easy); | ||
714 | return res; | ||
715 | } | ||
336 | 716 | ||
717 | void LLCurlRequest::get(const std::string& url, LLCurl::ResponderPtr responder) | ||
718 | { | ||
719 | getByteRange(url, 0, -1, responder); | ||
720 | } | ||
721 | |||
722 | bool LLCurlRequest::getByteRange(const std::string& url, S32 offset, S32 length, LLCurl::ResponderPtr responder) | ||
723 | { | ||
724 | LLCurl::Easy* easy = allocEasy(); | ||
725 | if (!easy) | ||
726 | { | ||
727 | return false; | ||
728 | } | ||
729 | easy->prepRequest(url, responder); | ||
730 | easy->setopt(CURLOPT_HTTPGET, 1); | ||
731 | if (length > 0) | ||
732 | { | ||
733 | std::string range = llformat("Range: bytes=%d-%d", offset,offset+length-1); | ||
734 | easy->slist_append(range.c_str()); | ||
735 | } | ||
736 | easy->setHeaders(); | ||
737 | bool res = addEasy(easy); | ||
738 | return res; | ||
739 | } | ||
337 | 740 | ||
338 | namespace | 741 | bool LLCurlRequest::post(const std::string& url, const LLSD& data, LLCurl::ResponderPtr responder) |
339 | { | 742 | { |
340 | static LLCurl::Multi* sMainMulti = 0; | 743 | LLCurl::Easy* easy = allocEasy(); |
744 | if (!easy) | ||
745 | { | ||
746 | return false; | ||
747 | } | ||
748 | easy->prepRequest(url, responder); | ||
749 | |||
750 | LLSDSerialize::toXML(data, easy->getInput()); | ||
751 | S32 bytes = easy->getInput().str().length(); | ||
752 | |||
753 | easy->setopt(CURLOPT_POST, 1); | ||
754 | easy->setopt(CURLOPT_POSTFIELDS, (void*)NULL); | ||
755 | easy->setopt(CURLOPT_POSTFIELDSIZE, bytes); | ||
756 | |||
757 | easy->slist_append("Content-Type: application/xml"); | ||
758 | easy->setHeaders(); | ||
759 | |||
760 | lldebugs << "POSTING: " << bytes << " bytes." << llendl; | ||
761 | bool res = addEasy(easy); | ||
762 | return res; | ||
763 | } | ||
341 | 764 | ||
342 | LLCurl::Multi* | 765 | // Note: call once per frame |
343 | mainMulti() | 766 | S32 LLCurlRequest::process() |
767 | { | ||
768 | S32 res = 0; | ||
769 | for (curlmulti_set_t::iterator iter = mMultiSet.begin(); | ||
770 | iter != mMultiSet.end(); ) | ||
344 | { | 771 | { |
345 | if (!sMainMulti) { | 772 | curlmulti_set_t::iterator curiter = iter++; |
346 | sMainMulti = new LLCurl::Multi(); | 773 | LLCurl::Multi* multi = *curiter; |
774 | S32 tres = multi->process(); | ||
775 | res += tres; | ||
776 | if (multi != mActiveMulti && tres == 0 && multi->mQueued == 0) | ||
777 | { | ||
778 | mMultiSet.erase(curiter); | ||
779 | delete multi; | ||
347 | } | 780 | } |
348 | return sMainMulti; | ||
349 | } | 781 | } |
782 | return res; | ||
783 | } | ||
350 | 784 | ||
351 | void freeMulti() | 785 | S32 LLCurlRequest::getQueued() |
786 | { | ||
787 | S32 queued = 0; | ||
788 | for (curlmulti_set_t::iterator iter = mMultiSet.begin(); | ||
789 | iter != mMultiSet.end(); ) | ||
352 | { | 790 | { |
353 | delete sMainMulti; | 791 | curlmulti_set_t::iterator curiter = iter++; |
354 | sMainMulti = NULL; | 792 | LLCurl::Multi* multi = *curiter; |
793 | queued += multi->mQueued; | ||
355 | } | 794 | } |
795 | return queued; | ||
356 | } | 796 | } |
357 | 797 | ||
358 | void | 798 | //////////////////////////////////////////////////////////////////////////// |
359 | LLCurl::get(const std::string& url, ResponderPtr responder) | 799 | // For generating one easy request |
800 | // associated with a single multi request | ||
801 | |||
802 | LLCurlEasyRequest::LLCurlEasyRequest() | ||
803 | : mRequestSent(false), | ||
804 | mResultReturned(false) | ||
360 | { | 805 | { |
361 | mainMulti()->get(url, responder); | 806 | mMulti = new LLCurl::Multi(); |
807 | mEasy = mMulti->allocEasy(); | ||
808 | if (mEasy) | ||
809 | { | ||
810 | mEasy->setErrorBuffer(); | ||
811 | mEasy->setCA(); | ||
812 | } | ||
362 | } | 813 | } |
363 | 814 | ||
364 | void | 815 | LLCurlEasyRequest::~LLCurlEasyRequest() |
365 | LLCurl::getByteRange(const std::string& url, S32 offset, S32 length, ResponderPtr responder) | ||
366 | { | 816 | { |
367 | mainMulti()->getByteRange(url, offset, length, responder); | 817 | delete mMulti; |
368 | } | 818 | } |
369 | 819 | ||
370 | void LLCurl::initClass() | 820 | void LLCurlEasyRequest::setopt(CURLoption option, S32 value) |
371 | { | 821 | { |
372 | curl_global_init(CURL_GLOBAL_ALL); | 822 | if (mEasy) |
823 | { | ||
824 | mEasy->setopt(option, value); | ||
825 | } | ||
373 | } | 826 | } |
374 | 827 | ||
375 | void | 828 | void LLCurlEasyRequest::setoptString(CURLoption option, const std::string& value) |
376 | LLCurl::process() | ||
377 | { | 829 | { |
378 | mainMulti()->process(); | 830 | if (mEasy) |
831 | { | ||
832 | mEasy->setoptString(option, value); | ||
833 | } | ||
379 | } | 834 | } |
380 | 835 | ||
381 | void LLCurl::cleanup() | 836 | void LLCurlEasyRequest::setPost(char* postdata, S32 size) |
382 | { | 837 | { |
383 | freeMulti(); | 838 | if (mEasy) |
839 | { | ||
840 | mEasy->setopt(CURLOPT_POST, 1); | ||
841 | mEasy->setopt(CURLOPT_POSTFIELDS, postdata); | ||
842 | mEasy->setopt(CURLOPT_POSTFIELDSIZE, size); | ||
843 | } | ||
844 | } | ||
845 | |||
846 | void LLCurlEasyRequest::setHeaderCallback(curl_header_callback callback, void* userdata) | ||
847 | { | ||
848 | if (mEasy) | ||
849 | { | ||
850 | mEasy->setopt(CURLOPT_HEADERFUNCTION, (void*)callback); | ||
851 | mEasy->setopt(CURLOPT_HEADERDATA, userdata); // aka CURLOPT_WRITEHEADER | ||
852 | } | ||
853 | } | ||
854 | |||
855 | void LLCurlEasyRequest::setWriteCallback(curl_write_callback callback, void* userdata) | ||
856 | { | ||
857 | if (mEasy) | ||
858 | { | ||
859 | mEasy->setopt(CURLOPT_WRITEFUNCTION, (void*)callback); | ||
860 | mEasy->setopt(CURLOPT_WRITEDATA, userdata); | ||
861 | } | ||
862 | } | ||
863 | |||
864 | void LLCurlEasyRequest::setReadCallback(curl_read_callback callback, void* userdata) | ||
865 | { | ||
866 | if (mEasy) | ||
867 | { | ||
868 | mEasy->setopt(CURLOPT_READFUNCTION, (void*)callback); | ||
869 | mEasy->setopt(CURLOPT_READDATA, userdata); | ||
870 | } | ||
871 | } | ||
872 | |||
873 | void LLCurlEasyRequest::slist_append(const char* str) | ||
874 | { | ||
875 | if (mEasy) | ||
876 | { | ||
877 | mEasy->slist_append(str); | ||
878 | } | ||
879 | } | ||
880 | |||
881 | void LLCurlEasyRequest::sendRequest(const std::string& url) | ||
882 | { | ||
883 | llassert_always(!mRequestSent); | ||
884 | mRequestSent = true; | ||
885 | if (mEasy) | ||
886 | { | ||
887 | mEasy->setHeaders(); | ||
888 | mEasy->setoptString(CURLOPT_URL, url); | ||
889 | mMulti->addEasy(mEasy); | ||
890 | } | ||
891 | } | ||
892 | |||
893 | void LLCurlEasyRequest::requestComplete() | ||
894 | { | ||
895 | llassert_always(mRequestSent); | ||
896 | mRequestSent = false; | ||
897 | if (mEasy) | ||
898 | { | ||
899 | mMulti->removeEasy(mEasy); | ||
900 | } | ||
901 | } | ||
902 | |||
903 | S32 LLCurlEasyRequest::perform() | ||
904 | { | ||
905 | return mMulti->perform(); | ||
906 | } | ||
907 | |||
908 | // Usage: Call getRestult until it returns false (no more messages) | ||
909 | bool LLCurlEasyRequest::getResult(CURLcode* result, LLCurl::TransferInfo* info) | ||
910 | { | ||
911 | if (!mEasy) | ||
912 | { | ||
913 | // Special case - we failed to initialize a curl_easy (can happen if too many open files) | ||
914 | // Act as though the request failed to connect | ||
915 | if (mResultReturned) | ||
916 | { | ||
917 | return false; | ||
918 | } | ||
919 | else | ||
920 | { | ||
921 | *result = CURLE_FAILED_INIT; | ||
922 | mResultReturned = true; | ||
923 | return true; | ||
924 | } | ||
925 | } | ||
926 | // In theory, info_read might return a message with a status other than CURLMSG_DONE | ||
927 | // In practice for all messages returned, msg == CURLMSG_DONE | ||
928 | // Ignore other messages just in case | ||
929 | while(1) | ||
930 | { | ||
931 | S32 q; | ||
932 | CURLMsg* curlmsg = info_read(&q, info); | ||
933 | if (curlmsg) | ||
934 | { | ||
935 | if (curlmsg->msg == CURLMSG_DONE) | ||
936 | { | ||
937 | *result = curlmsg->data.result; | ||
938 | return true; | ||
939 | } | ||
940 | // else continue | ||
941 | } | ||
942 | else | ||
943 | { | ||
944 | return false; | ||
945 | } | ||
946 | } | ||
947 | } | ||
948 | |||
949 | // private | ||
950 | CURLMsg* LLCurlEasyRequest::info_read(S32* q, LLCurl::TransferInfo* info) | ||
951 | { | ||
952 | if (mEasy) | ||
953 | { | ||
954 | CURLMsg* curlmsg = mMulti->info_read(q); | ||
955 | if (curlmsg && curlmsg->msg == CURLMSG_DONE) | ||
956 | { | ||
957 | if (info) | ||
958 | { | ||
959 | mEasy->getTransferInfo(info); | ||
960 | } | ||
961 | } | ||
962 | return curlmsg; | ||
963 | } | ||
964 | return NULL; | ||
965 | } | ||
966 | |||
967 | std::string LLCurlEasyRequest::getErrorString() | ||
968 | { | ||
969 | return mEasy ? std::string(mEasy->getErrorBuffer()) : std::string(); | ||
970 | } | ||
971 | |||
972 | //////////////////////////////////////////////////////////////////////////// | ||
973 | |||
974 | #if SAFE_SSL | ||
975 | //static | ||
976 | void LLCurl::ssl_locking_callback(int mode, int type, const char *file, int line) | ||
977 | { | ||
978 | if (mode & CRYPTO_LOCK) | ||
979 | { | ||
980 | LLCurl::sSSLMutex[type]->lock(); | ||
981 | } | ||
982 | else | ||
983 | { | ||
984 | LLCurl::sSSLMutex[type]->unlock(); | ||
985 | } | ||
986 | } | ||
987 | |||
988 | //static | ||
989 | unsigned long LLCurl::ssl_thread_id(void) | ||
990 | { | ||
991 | return LLThread::currentID(); | ||
992 | } | ||
993 | #endif | ||
994 | |||
995 | void LLCurl::initClass() | ||
996 | { | ||
997 | // Do not change this "unless you are familiar with and mean to control | ||
998 | // internal operations of libcurl" | ||
999 | // - http://curl.haxx.se/libcurl/c/curl_global_init.html | ||
1000 | curl_global_init(CURL_GLOBAL_ALL); | ||
1001 | |||
1002 | #if SAFE_SSL | ||
1003 | S32 mutex_count = CRYPTO_num_locks(); | ||
1004 | for (S32 i=0; i<mutex_count; i++) | ||
1005 | { | ||
1006 | sSSLMutex.push_back(new LLMutex(gAPRPoolp)); | ||
1007 | } | ||
1008 | CRYPTO_set_id_callback(&LLCurl::ssl_thread_id); | ||
1009 | CRYPTO_set_locking_callback(&LLCurl::ssl_locking_callback); | ||
1010 | #endif | ||
1011 | } | ||
1012 | |||
1013 | void LLCurl::cleanupClass() | ||
1014 | { | ||
1015 | #if SAFE_SSL | ||
1016 | CRYPTO_set_locking_callback(NULL); | ||
1017 | for_each(sSSLMutex.begin(), sSSLMutex.end(), DeletePointer()); | ||
1018 | #endif | ||
384 | curl_global_cleanup(); | 1019 | curl_global_cleanup(); |
385 | } | 1020 | } |
1021 | |||
diff --git a/linden/indra/llmessage/llcurl.h b/linden/indra/llmessage/llcurl.h index 904bc64..3d9770b 100644 --- a/linden/indra/llmessage/llcurl.h +++ b/linden/indra/llmessage/llcurl.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /** | 1 | /** |
2 | * @file llcurl.h | 2 | * @file llcurl.h |
3 | * @author Zero / Donovan | 3 | * @author Zero / Donovan |
4 | * @date 2006-10-15 | 4 | * @date 2006-10-15 |
5 | * @brief Curl wrapper | 5 | * @brief A wrapper around libcurl. |
6 | * | 6 | * |
7 | * $LicenseInfo:firstyear=2006&license=viewergpl$ | 7 | * $LicenseInfo:firstyear=2006&license=viewergpl$ |
8 | * | 8 | * |
@@ -41,104 +41,183 @@ | |||
41 | #include <vector> | 41 | #include <vector> |
42 | 42 | ||
43 | #include <boost/intrusive_ptr.hpp> | 43 | #include <boost/intrusive_ptr.hpp> |
44 | #include <curl/curl.h> | 44 | #include <curl/curl.h> // TODO: remove dependency |
45 | 45 | ||
46 | // #include "llhttpclient.h" | 46 | #include "llbuffer.h" |
47 | #include "lliopipe.h" | ||
48 | #include "llsd.h" | ||
49 | |||
50 | class LLMutex; | ||
51 | |||
52 | // For whatever reason, this is not typedef'd in curl.h | ||
53 | typedef size_t (*curl_header_callback)(void *ptr, size_t size, size_t nmemb, void *stream); | ||
47 | 54 | ||
48 | class LLCurl | 55 | class LLCurl |
49 | { | 56 | { |
57 | LOG_CLASS(LLCurl); | ||
58 | |||
50 | public: | 59 | public: |
60 | class Easy; | ||
51 | class Multi; | 61 | class Multi; |
52 | 62 | ||
63 | struct TransferInfo | ||
64 | { | ||
65 | TransferInfo() : mSizeDownload(0.0), mTotalTime(0.0), mSpeedDownload(0.0) {} | ||
66 | F64 mSizeDownload; | ||
67 | F64 mTotalTime; | ||
68 | F64 mSpeedDownload; | ||
69 | }; | ||
70 | |||
53 | class Responder | 71 | class Responder |
54 | { | 72 | { |
73 | //LOG_CLASS(Responder); | ||
55 | public: | 74 | public: |
75 | |||
56 | Responder(); | 76 | Responder(); |
57 | virtual ~Responder(); | 77 | virtual ~Responder(); |
58 | 78 | ||
59 | virtual void error(U32 status, const std::stringstream& content); // called with bad status codes | 79 | /** |
80 | * @brief return true if the status code indicates success. | ||
81 | */ | ||
82 | static bool isGoodStatus(U32 status) | ||
83 | { | ||
84 | return((200 <= status) && (status < 300)); | ||
85 | } | ||
86 | |||
87 | virtual void error(U32 status, const std::string& reason); | ||
88 | // called with non-200 status codes | ||
60 | 89 | ||
61 | virtual void result(const std::stringstream& content); | 90 | virtual void result(const LLSD& content); |
62 | 91 | ||
63 | virtual void completed(U32 status, const std::stringstream& content); | 92 | // Override point for clients that may want to use this class when the response is some other format besides LLSD |
93 | virtual void completedRaw(U32 status, const std::string& reason, | ||
94 | const LLChannelDescriptors& channels, | ||
95 | const LLIOPipe::buffer_ptr_t& buffer); | ||
96 | |||
97 | virtual void completed(U32 status, const std::string& reason, const LLSD& content); | ||
64 | /**< The default implemetnation calls | 98 | /**< The default implemetnation calls |
65 | either: | 99 | either: |
66 | * result(), or | 100 | * result(), or |
67 | * error() | 101 | * error() |
68 | */ | 102 | */ |
69 | 103 | ||
104 | // Override to handle parsing of the header only. Note: this is the only place where the contents | ||
105 | // of the header can be parsed. In the ::completed call above only the body is contained in the LLSD. | ||
106 | virtual void completedHeader(U32 status, const std::string& reason, const LLSD& content); | ||
107 | |||
70 | public: /* but not really -- don't touch this */ | 108 | public: /* but not really -- don't touch this */ |
71 | U32 mReferenceCount; | 109 | U32 mReferenceCount; |
72 | }; | 110 | }; |
73 | typedef boost::intrusive_ptr<Responder> ResponderPtr; | 111 | typedef boost::intrusive_ptr<Responder> ResponderPtr; |
74 | |||
75 | class Easy | ||
76 | { | ||
77 | public: | ||
78 | Easy(); | ||
79 | ~Easy(); | ||
80 | |||
81 | void get(const std::string& url, ResponderPtr); | ||
82 | void getByteRange(const std::string& url, S32 offset, S32 length, ResponderPtr); | ||
83 | |||
84 | void perform(); | ||
85 | 112 | ||
86 | private: | ||
87 | void prep(const std::string& url, ResponderPtr); | ||
88 | void report(CURLcode); | ||
89 | |||
90 | CURL* mHandle; | ||
91 | struct curl_slist* mHeaders; | ||
92 | |||
93 | std::string mURL; | ||
94 | std::string mRange; | ||
95 | std::stringstream mRequest; | ||
96 | 113 | ||
97 | std::stringstream mOutput; | 114 | /** |
98 | char mErrorBuffer[CURL_ERROR_SIZE]; | 115 | * @ brief Set certificate authority file used to verify HTTPS certs. |
99 | 116 | */ | |
100 | std::stringstream mHeaderOutput; // Debug | 117 | static void setCAFile(const std::string& file); |
101 | |||
102 | ResponderPtr mResponder; | ||
103 | |||
104 | friend class Multi; | ||
105 | }; | ||
106 | 118 | ||
119 | /** | ||
120 | * @ brief Set certificate authority path used to verify HTTPS certs. | ||
121 | */ | ||
122 | static void setCAPath(const std::string& path); | ||
123 | |||
124 | /** | ||
125 | * @ brief Get certificate authority file used to verify HTTPS certs. | ||
126 | */ | ||
127 | static const std::string& getCAFile() { return sCAFile; } | ||
128 | |||
129 | /** | ||
130 | * @ brief Get certificate authority path used to verify HTTPS certs. | ||
131 | */ | ||
132 | static const std::string& getCAPath() { return sCAPath; } | ||
133 | |||
134 | /** | ||
135 | * @ brief Initialize LLCurl class | ||
136 | */ | ||
137 | static void initClass(); | ||
138 | |||
139 | /** | ||
140 | * @ brief Cleanup LLCurl class | ||
141 | */ | ||
142 | static void cleanupClass(); | ||
143 | |||
144 | /** | ||
145 | * @ brief curl error code -> string | ||
146 | */ | ||
147 | static std::string strerror(CURLcode errorcode); | ||
148 | |||
149 | // For OpenSSL callbacks | ||
150 | static std::vector<LLMutex*> sSSLMutex; | ||
107 | 151 | ||
108 | class Multi | 152 | // OpenSSL callbacks |
109 | { | 153 | static void LLCurl::ssl_locking_callback(int mode, int type, const char *file, int line); |
110 | public: | 154 | static unsigned long LLCurl::ssl_thread_id(void); |
111 | Multi(); | 155 | |
112 | ~Multi(); | 156 | |
157 | |||
158 | private: | ||
113 | 159 | ||
114 | void get(const std::string& url, ResponderPtr); | 160 | static std::string sCAPath; |
115 | void getByteRange(const std::string& url, S32 offset, S32 length, ResponderPtr); | 161 | static std::string sCAFile; |
162 | }; | ||
116 | 163 | ||
117 | void process(); | 164 | namespace boost |
118 | 165 | { | |
119 | private: | 166 | void intrusive_ptr_add_ref(LLCurl::Responder* p); |
120 | Easy* easyAlloc(); | 167 | void intrusive_ptr_release(LLCurl::Responder* p); |
121 | void easyFree(Easy*); | 168 | }; |
122 | |||
123 | CURLM* mHandle; | ||
124 | |||
125 | typedef std::vector<Easy*> EasyList; | ||
126 | EasyList mFreeEasy; | ||
127 | }; | ||
128 | 169 | ||
129 | 170 | ||
130 | static void get(const std::string& url, ResponderPtr); | 171 | class LLCurlRequest |
131 | static void getByteRange(const std::string& url, S32 offset, S32 length, ResponderPtr responder); | 172 | { |
173 | public: | ||
174 | LLCurlRequest(); | ||
175 | ~LLCurlRequest(); | ||
176 | |||
177 | void get(const std::string& url, LLCurl::ResponderPtr responder); | ||
178 | bool getByteRange(const std::string& url, S32 offset, S32 length, LLCurl::ResponderPtr responder); | ||
179 | bool post(const std::string& url, const LLSD& data, LLCurl::ResponderPtr responder); | ||
180 | S32 process(); | ||
181 | S32 getQueued(); | ||
182 | |||
183 | private: | ||
184 | void addMulti(); | ||
185 | LLCurl::Easy* allocEasy(); | ||
186 | bool addEasy(LLCurl::Easy* easy); | ||
132 | 187 | ||
133 | static void initClass(); // *NOTE:Mani - not thread safe! | 188 | private: |
134 | static void process(); | 189 | typedef std::set<LLCurl::Multi*> curlmulti_set_t; |
135 | static void cleanup(); // *NOTE:Mani - not thread safe! | 190 | curlmulti_set_t mMultiSet; |
191 | LLCurl::Multi* mActiveMulti; | ||
192 | S32 mActiveRequestCount; | ||
136 | }; | 193 | }; |
137 | 194 | ||
138 | namespace boost | 195 | class LLCurlEasyRequest |
139 | { | 196 | { |
140 | void intrusive_ptr_add_ref(LLCurl::Responder* p); | 197 | public: |
141 | void intrusive_ptr_release(LLCurl::Responder* p); | 198 | LLCurlEasyRequest(); |
199 | ~LLCurlEasyRequest(); | ||
200 | void setopt(CURLoption option, S32 value); | ||
201 | void setoptString(CURLoption option, const std::string& value); | ||
202 | void setPost(char* postdata, S32 size); | ||
203 | void setHeaderCallback(curl_header_callback callback, void* userdata); | ||
204 | void setWriteCallback(curl_write_callback callback, void* userdata); | ||
205 | void setReadCallback(curl_read_callback callback, void* userdata); | ||
206 | void slist_append(const char* str); | ||
207 | void sendRequest(const std::string& url); | ||
208 | void requestComplete(); | ||
209 | S32 perform(); | ||
210 | bool getResult(CURLcode* result, LLCurl::TransferInfo* info = NULL); | ||
211 | std::string getErrorString(); | ||
212 | |||
213 | private: | ||
214 | CURLMsg* info_read(S32* queue, LLCurl::TransferInfo* info); | ||
215 | |||
216 | private: | ||
217 | LLCurl::Multi* mMulti; | ||
218 | LLCurl::Easy* mEasy; | ||
219 | bool mRequestSent; | ||
220 | bool mResultReturned; | ||
142 | }; | 221 | }; |
143 | 222 | ||
144 | #endif // LL_LLCURL_H | 223 | #endif // LL_LLCURL_H |
diff --git a/linden/indra/llmessage/llfiltersd2xmlrpc.cpp b/linden/indra/llmessage/llfiltersd2xmlrpc.cpp index d9e0ad3..4e38924 100644 --- a/linden/indra/llmessage/llfiltersd2xmlrpc.cpp +++ b/linden/indra/llmessage/llfiltersd2xmlrpc.cpp | |||
@@ -336,7 +336,7 @@ LLIOPipe::EStatus LLFilterSD2XMLRPCResponse::process_impl( | |||
336 | LLBufferStream stream(channels, buffer.get()); | 336 | LLBufferStream stream(channels, buffer.get()); |
337 | stream << XML_HEADER << XMLRPC_METHOD_RESPONSE_HEADER; | 337 | stream << XML_HEADER << XMLRPC_METHOD_RESPONSE_HEADER; |
338 | LLSD sd; | 338 | LLSD sd; |
339 | LLSDSerialize::fromNotation(sd, stream); | 339 | LLSDSerialize::fromNotation(sd, stream, buffer->count(channels.in())); |
340 | 340 | ||
341 | PUMP_DEBUG; | 341 | PUMP_DEBUG; |
342 | LLIOPipe::EStatus rv = STATUS_ERROR; | 342 | LLIOPipe::EStatus rv = STATUS_ERROR; |
@@ -408,7 +408,7 @@ LLIOPipe::EStatus LLFilterSD2XMLRPCRequest::process_impl( | |||
408 | // See if we can parse it | 408 | // See if we can parse it |
409 | LLBufferStream stream(channels, buffer.get()); | 409 | LLBufferStream stream(channels, buffer.get()); |
410 | LLSD sd; | 410 | LLSD sd; |
411 | LLSDSerialize::fromNotation(sd, stream); | 411 | LLSDSerialize::fromNotation(sd, stream, buffer->count(channels.in())); |
412 | if(stream.fail()) | 412 | if(stream.fail()) |
413 | { | 413 | { |
414 | llinfos << "STREAM FAILURE reading structure data." << llendl; | 414 | llinfos << "STREAM FAILURE reading structure data." << llendl; |
diff --git a/linden/indra/llmessage/llhost.cpp b/linden/indra/llmessage/llhost.cpp index 57677b0..e139f6d 100644 --- a/linden/indra/llmessage/llhost.cpp +++ b/linden/indra/llmessage/llhost.cpp | |||
@@ -132,14 +132,13 @@ void LLHost::getHostName(char *buf, S32 len) const | |||
132 | } | 132 | } |
133 | } | 133 | } |
134 | 134 | ||
135 | LLString LLHost::getHostName() const | 135 | std::string LLHost::getHostName() const |
136 | { | 136 | { |
137 | hostent *he; | 137 | hostent* he; |
138 | |||
139 | if (INVALID_HOST_IP_ADDRESS == mIP) | 138 | if (INVALID_HOST_IP_ADDRESS == mIP) |
140 | { | 139 | { |
141 | llwarns << "LLHost::getHostName() : Invalid IP address" << llendl; | 140 | llwarns << "LLHost::getHostName() : Invalid IP address" << llendl; |
142 | return ""; | 141 | return std::string(); |
143 | } | 142 | } |
144 | he = gethostbyaddr((char *)&mIP, sizeof(mIP), AF_INET); | 143 | he = gethostbyaddr((char *)&mIP, sizeof(mIP), AF_INET); |
145 | if (!he) | 144 | if (!he) |
@@ -151,12 +150,11 @@ LLString LLHost::getHostName() const | |||
151 | llwarns << "LLHost::getHostName() : Couldn't find host name for address " << mIP << ", Error: " | 150 | llwarns << "LLHost::getHostName() : Couldn't find host name for address " << mIP << ", Error: " |
152 | << h_errno << llendl; | 151 | << h_errno << llendl; |
153 | #endif | 152 | #endif |
154 | return ""; | 153 | return std::string(); |
155 | } | 154 | } |
156 | else | 155 | else |
157 | { | 156 | { |
158 | LLString hostname = he->h_name; | 157 | return ll_safe_string(he->h_name); |
159 | return hostname; | ||
160 | } | 158 | } |
161 | } | 159 | } |
162 | 160 | ||
diff --git a/linden/indra/llmessage/llhost.h b/linden/indra/llmessage/llhost.h index c393aa6..0b3afe8 100644 --- a/linden/indra/llmessage/llhost.h +++ b/linden/indra/llmessage/llhost.h | |||
@@ -38,8 +38,6 @@ | |||
38 | 38 | ||
39 | #include "net.h" | 39 | #include "net.h" |
40 | 40 | ||
41 | #include "llstring.h" | ||
42 | |||
43 | const U32 INVALID_PORT = 0; | 41 | const U32 INVALID_PORT = 0; |
44 | const U32 INVALID_HOST_IP_ADDRESS = 0x0; | 42 | const U32 INVALID_HOST_IP_ADDRESS = 0x0; |
45 | 43 | ||
@@ -102,7 +100,7 @@ public: | |||
102 | void getIPString(char* buffer, S32 length) const; // writes IP into buffer | 100 | void getIPString(char* buffer, S32 length) const; // writes IP into buffer |
103 | std::string getIPString() const; | 101 | std::string getIPString() const; |
104 | void getHostName(char *buf, S32 len) const; | 102 | void getHostName(char *buf, S32 len) const; |
105 | LLString getHostName() const; | 103 | std::string getHostName() const; |
106 | std::string getIPandPort() const; | 104 | std::string getIPandPort() const; |
107 | 105 | ||
108 | friend std::ostream& operator<< (std::ostream& os, const LLHost &hh); | 106 | friend std::ostream& operator<< (std::ostream& os, const LLHost &hh); |
diff --git a/linden/indra/llmessage/llhttpassetstorage.cpp b/linden/indra/llmessage/llhttpassetstorage.cpp index 74f5271..80598c6 100644 --- a/linden/indra/llmessage/llhttpassetstorage.cpp +++ b/linden/indra/llmessage/llhttpassetstorage.cpp | |||
@@ -422,11 +422,8 @@ void LLHTTPAssetStorage::_init(const char *web_host, const char *local_web_host, | |||
422 | mLocalBaseURL = local_web_host; | 422 | mLocalBaseURL = local_web_host; |
423 | mHostName = host_name; | 423 | mHostName = host_name; |
424 | 424 | ||
425 | // Do not change this "unless you are familiar with and mean to control | 425 | // curl_global_init moved to LLCurl::initClass() |
426 | // internal operations of libcurl" | 426 | |
427 | // - http://curl.haxx.se/libcurl/c/curl_global_init.html | ||
428 | curl_global_init(CURL_GLOBAL_ALL); | ||
429 | |||
430 | mCurlMultiHandle = curl_multi_init(); | 427 | mCurlMultiHandle = curl_multi_init(); |
431 | } | 428 | } |
432 | 429 | ||
@@ -435,7 +432,7 @@ LLHTTPAssetStorage::~LLHTTPAssetStorage() | |||
435 | curl_multi_cleanup(mCurlMultiHandle); | 432 | curl_multi_cleanup(mCurlMultiHandle); |
436 | mCurlMultiHandle = NULL; | 433 | mCurlMultiHandle = NULL; |
437 | 434 | ||
438 | curl_global_cleanup(); | 435 | // curl_global_cleanup moved to LLCurl::initClass() |
439 | } | 436 | } |
440 | 437 | ||
441 | // storing data is simpler than getting it, so we just overload the whole method | 438 | // storing data is simpler than getting it, so we just overload the whole method |
@@ -451,7 +448,7 @@ void LLHTTPAssetStorage::storeAssetData( | |||
451 | bool user_waiting, | 448 | bool user_waiting, |
452 | F64 timeout) | 449 | F64 timeout) |
453 | { | 450 | { |
454 | if (mVFS->getExists(uuid, type)) | 451 | if (mVFS->getExists(uuid, type)) // VFS treats nonexistant and zero-length identically |
455 | { | 452 | { |
456 | LLAssetRequest *req = new LLAssetRequest(uuid, type); | 453 | LLAssetRequest *req = new LLAssetRequest(uuid, type); |
457 | req->mUpCallback = callback; | 454 | req->mUpCallback = callback; |
@@ -460,6 +457,19 @@ void LLHTTPAssetStorage::storeAssetData( | |||
460 | req->mIsUserWaiting = user_waiting; | 457 | req->mIsUserWaiting = user_waiting; |
461 | req->mTimeout = timeout; | 458 | req->mTimeout = timeout; |
462 | 459 | ||
460 | // LLAssetStorage metric: Successful Request | ||
461 | S32 size = mVFS->getSize(uuid, type); | ||
462 | const char *message; | ||
463 | if( store_local ) | ||
464 | { | ||
465 | message = "Added to local upload queue"; | ||
466 | } | ||
467 | else | ||
468 | { | ||
469 | message = "Added to upload queue"; | ||
470 | } | ||
471 | reportMetric( uuid, type, NULL, requesting_agent_id, size, MR_OKAY, __FILE__, __LINE__, message ); | ||
472 | |||
463 | // this will get picked up and transmitted in checkForTimeouts | 473 | // this will get picked up and transmitted in checkForTimeouts |
464 | if(store_local) | 474 | if(store_local) |
465 | { | 475 | { |
@@ -479,6 +489,8 @@ void LLHTTPAssetStorage::storeAssetData( | |||
479 | llwarns << "AssetStorage: attempt to upload non-existent vfile " << uuid << ":" << LLAssetType::lookup(type) << llendl; | 489 | llwarns << "AssetStorage: attempt to upload non-existent vfile " << uuid << ":" << LLAssetType::lookup(type) << llendl; |
480 | if (callback) | 490 | if (callback) |
481 | { | 491 | { |
492 | // LLAssetStorage metric: Zero size VFS | ||
493 | reportMetric( uuid, type, NULL, requesting_agent_id, 0, MR_ZERO_SIZE, __FILE__, __LINE__, "The file didn't exist or was zero length (VFS - can't tell which)" ); | ||
482 | callback(uuid, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE, LL_EXSTAT_NONEXISTENT_FILE); | 494 | callback(uuid, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE, LL_EXSTAT_NONEXISTENT_FILE); |
483 | } | 495 | } |
484 | } | 496 | } |
@@ -504,13 +516,17 @@ void LLHTTPAssetStorage::storeAssetData( | |||
504 | legacy->mUserData = user_data; | 516 | legacy->mUserData = user_data; |
505 | 517 | ||
506 | FILE *fp = LLFile::fopen(filename, "rb"); /*Flawfinder: ignore*/ | 518 | FILE *fp = LLFile::fopen(filename, "rb"); /*Flawfinder: ignore*/ |
519 | S32 size = 0; | ||
507 | if (fp) | 520 | if (fp) |
508 | { | 521 | { |
509 | LLVFile file(mVFS, asset_id, asset_type, LLVFile::WRITE); | ||
510 | |||
511 | fseek(fp, 0, SEEK_END); | 522 | fseek(fp, 0, SEEK_END); |
512 | S32 size = ftell(fp); | 523 | size = ftell(fp); |
513 | fseek(fp, 0, SEEK_SET); | 524 | fseek(fp, 0, SEEK_SET); |
525 | } | ||
526 | |||
527 | if( size ) | ||
528 | { | ||
529 | LLVFile file(mVFS, asset_id, asset_type, LLVFile::WRITE); | ||
514 | 530 | ||
515 | file.setMaxSize(size); | 531 | file.setMaxSize(size); |
516 | 532 | ||
@@ -528,6 +544,7 @@ void LLHTTPAssetStorage::storeAssetData( | |||
528 | LLFile::remove(filename); | 544 | LLFile::remove(filename); |
529 | } | 545 | } |
530 | 546 | ||
547 | // LLAssetStorage metric: Success not needed; handled in the overloaded method here: | ||
531 | storeAssetData( | 548 | storeAssetData( |
532 | asset_id, | 549 | asset_id, |
533 | asset_type, | 550 | asset_type, |
@@ -540,8 +557,19 @@ void LLHTTPAssetStorage::storeAssetData( | |||
540 | user_waiting, | 557 | user_waiting, |
541 | timeout); | 558 | timeout); |
542 | } | 559 | } |
543 | else | 560 | else // !size |
544 | { | 561 | { |
562 | if( fp ) | ||
563 | { | ||
564 | // LLAssetStorage metric: Zero size | ||
565 | reportMetric( asset_id, asset_type, filename, LLUUID::null, 0, MR_ZERO_SIZE, __FILE__, __LINE__, "The file was zero length" ); | ||
566 | fclose( fp ); | ||
567 | } | ||
568 | else | ||
569 | { | ||
570 | // LLAssetStorage metric: Missing File | ||
571 | reportMetric( asset_id, asset_type, filename, LLUUID::null, 0, MR_FILE_NONEXIST, __FILE__, __LINE__, "The file didn't exist" ); | ||
572 | } | ||
545 | if (callback) | 573 | if (callback) |
546 | { | 574 | { |
547 | callback(LLUUID::null, user_data, LL_ERR_CANNOT_OPEN_FILE, LL_EXSTAT_BLOCKED_FILE); | 575 | callback(LLUUID::null, user_data, LL_ERR_CANNOT_OPEN_FILE, LL_EXSTAT_BLOCKED_FILE); |
@@ -827,7 +855,16 @@ void LLHTTPAssetStorage::checkForTimeouts() | |||
827 | } | 855 | } |
828 | else | 856 | else |
829 | { | 857 | { |
830 | llinfos << "Requesting PUT " << new_req->mURLBuffer << llendl; | 858 | // Get the uncompressed file size. |
859 | LLVFile file(mVFS,new_req->getUUID(),new_req->getType()); | ||
860 | S32 size = file.getSize(); | ||
861 | llinfos << "Requesting PUT " << new_req->mURLBuffer << ", asset size: " << size << " bytes" << llendl; | ||
862 | if (size == 0) | ||
863 | { | ||
864 | llwarns << "Rejecting zero size PUT request!" << llendl; | ||
865 | new_req->cleanupCurlHandle(); | ||
866 | deletePendingRequest(RT_UPLOAD, new_req->getType(), new_req->getUUID()); | ||
867 | } | ||
831 | } | 868 | } |
832 | // Pending upload will have been flagged by the request | 869 | // Pending upload will have been flagged by the request |
833 | } | 870 | } |
@@ -867,8 +904,19 @@ void LLHTTPAssetStorage::checkForTimeouts() | |||
867 | } | 904 | } |
868 | else | 905 | else |
869 | { | 906 | { |
907 | // Get the uncompressed file size. | ||
908 | S32 size = file.getSize(); | ||
909 | |||
870 | llinfos << "TAT: LLHTTPAssetStorage::checkForTimeouts() : pending local!" | 910 | llinfos << "TAT: LLHTTPAssetStorage::checkForTimeouts() : pending local!" |
871 | << " Requesting PUT " << new_req->mURLBuffer << llendl; | 911 | << " Requesting PUT " << new_req->mURLBuffer << ", asset size: " << size << " bytes" << llendl; |
912 | if (size == 0) | ||
913 | { | ||
914 | |||
915 | llwarns << "Rejecting zero size PUT request!" << llendl; | ||
916 | new_req->cleanupCurlHandle(); | ||
917 | deletePendingRequest(RT_UPLOAD, new_req->getType(), new_req->getUUID()); | ||
918 | } | ||
919 | |||
872 | } | 920 | } |
873 | // Pending upload will have been flagged by the request | 921 | // Pending upload will have been flagged by the request |
874 | } | 922 | } |
@@ -1403,5 +1451,3 @@ void LLHTTPAssetStorage::clearTempAssetData() | |||
1403 | llinfos << "TAT: Clearing temp asset data map" << llendl; | 1451 | llinfos << "TAT: Clearing temp asset data map" << llendl; |
1404 | mTempAssets.clear(); | 1452 | mTempAssets.clear(); |
1405 | } | 1453 | } |
1406 | |||
1407 | |||
diff --git a/linden/indra/llmessage/llhttpclient.cpp b/linden/indra/llmessage/llhttpclient.cpp index 3ede02a..22c0c68 100644 --- a/linden/indra/llmessage/llhttpclient.cpp +++ b/linden/indra/llmessage/llhttpclient.cpp | |||
@@ -1,4 +1,4 @@ | |||
1 | /** | 1 | /** |
2 | * @file llhttpclient.cpp | 2 | * @file llhttpclient.cpp |
3 | * @brief Implementation of classes for making HTTP requests. | 3 | * @brief Implementation of classes for making HTTP requests. |
4 | * | 4 | * |
@@ -46,75 +46,18 @@ | |||
46 | #include <curl/curl.h> | 46 | #include <curl/curl.h> |
47 | 47 | ||
48 | const F32 HTTP_REQUEST_EXPIRY_SECS = 60.0f; | 48 | const F32 HTTP_REQUEST_EXPIRY_SECS = 60.0f; |
49 | static std::string gCABundle; | 49 | //////////////////////////////////////////////////////////////////////////// |
50 | |||
51 | |||
52 | LLHTTPClient::Responder::Responder() | ||
53 | : mReferenceCount(0) | ||
54 | { | ||
55 | } | ||
56 | |||
57 | LLHTTPClient::Responder::~Responder() | ||
58 | { | ||
59 | } | ||
60 | |||
61 | // virtual | ||
62 | void LLHTTPClient::Responder::error(U32 status, const std::string& reason) | ||
63 | { | ||
64 | llinfos << "LLHTTPClient::Responder::error " | ||
65 | << status << ": " << reason << llendl; | ||
66 | } | ||
67 | |||
68 | // virtual | ||
69 | void LLHTTPClient::Responder::result(const LLSD& content) | ||
70 | { | ||
71 | } | ||
72 | |||
73 | // virtual | ||
74 | void LLHTTPClient::Responder::completedRaw(U32 status, const std::string& reason, const LLChannelDescriptors& channels, | ||
75 | const LLIOPipe::buffer_ptr_t& buffer) | ||
76 | { | ||
77 | LLBufferStream istr(channels, buffer.get()); | ||
78 | LLSD content; | ||
79 | |||
80 | if (isGoodStatus(status)) | ||
81 | { | ||
82 | LLSDSerialize::fromXML(content, istr); | ||
83 | /* | ||
84 | const S32 parseError = -1; | ||
85 | if(LLSDSerialize::fromXML(content, istr) == parseError) | ||
86 | { | ||
87 | mStatus = 498; | ||
88 | mReason = "Client Parse Error"; | ||
89 | } | ||
90 | */ | ||
91 | } | ||
92 | |||
93 | completed(status, reason, content); | ||
94 | } | ||
95 | |||
96 | // virtual | ||
97 | void LLHTTPClient::Responder::completed(U32 status, const std::string& reason, const LLSD& content) | ||
98 | { | ||
99 | if(isGoodStatus(status)) | ||
100 | { | ||
101 | result(content); | ||
102 | } | ||
103 | else | ||
104 | { | ||
105 | error(status, reason); | ||
106 | } | ||
107 | } | ||
108 | 50 | ||
51 | // Responder class moved to LLCurl | ||
109 | 52 | ||
110 | namespace | 53 | namespace |
111 | { | 54 | { |
112 | class LLHTTPClientURLAdaptor : public LLURLRequestComplete | 55 | class LLHTTPClientURLAdaptor : public LLURLRequestComplete |
113 | { | 56 | { |
114 | public: | 57 | public: |
115 | LLHTTPClientURLAdaptor(LLHTTPClient::ResponderPtr responder) | 58 | LLHTTPClientURLAdaptor(LLCurl::ResponderPtr responder) |
116 | : mResponder(responder), | 59 | : mResponder(responder), mStatus(499), |
117 | mStatus(499), mReason("LLURLRequest complete w/no status") | 60 | mReason("LLURLRequest complete w/no status") |
118 | { | 61 | { |
119 | } | 62 | } |
120 | 63 | ||
@@ -129,18 +72,24 @@ namespace | |||
129 | } | 72 | } |
130 | 73 | ||
131 | virtual void complete(const LLChannelDescriptors& channels, | 74 | virtual void complete(const LLChannelDescriptors& channels, |
132 | const buffer_ptr_t& buffer) | 75 | const buffer_ptr_t& buffer) |
133 | { | 76 | { |
134 | if (mResponder.get()) | 77 | if (mResponder.get()) |
135 | { | 78 | { |
136 | mResponder->completedRaw(mStatus, mReason, channels, buffer); | 79 | mResponder->completedRaw(mStatus, mReason, channels, buffer); |
80 | mResponder->completedHeader(mStatus, mReason, mHeaderOutput); | ||
137 | } | 81 | } |
138 | } | 82 | } |
83 | virtual void header(const std::string& header, const std::string& value) | ||
84 | { | ||
85 | mHeaderOutput[header] = value; | ||
86 | } | ||
139 | 87 | ||
140 | private: | 88 | private: |
141 | LLHTTPClient::ResponderPtr mResponder; | 89 | LLCurl::ResponderPtr mResponder; |
142 | U32 mStatus; | 90 | U32 mStatus; |
143 | std::string mReason; | 91 | std::string mReason; |
92 | LLSD mHeaderOutput; | ||
144 | }; | 93 | }; |
145 | 94 | ||
146 | class Injector : public LLIOPipe | 95 | class Injector : public LLIOPipe |
@@ -250,13 +199,14 @@ namespace | |||
250 | LLPumpIO* theClientPump = NULL; | 199 | LLPumpIO* theClientPump = NULL; |
251 | } | 200 | } |
252 | 201 | ||
253 | static void request( | 202 | static void request(const std::string& url, |
254 | const std::string& url, | 203 | LLURLRequest::ERequestAction method, |
255 | LLURLRequest::ERequestAction method, | 204 | Injector* body_injector, |
256 | Injector* body_injector, | 205 | LLCurl::ResponderPtr responder, |
257 | LLHTTPClient::ResponderPtr responder, | 206 | const LLSD& headers = LLSD(), |
258 | const LLSD& headers, | 207 | const F32 timeout = HTTP_REQUEST_EXPIRY_SECS, |
259 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS) | 208 | S32 offset = 0, |
209 | S32 bytes = 0) | ||
260 | { | 210 | { |
261 | if (!LLHTTPClient::hasPump()) | 211 | if (!LLHTTPClient::hasPump()) |
262 | { | 212 | { |
@@ -266,7 +216,7 @@ static void request( | |||
266 | LLPumpIO::chain_t chain; | 216 | LLPumpIO::chain_t chain; |
267 | 217 | ||
268 | LLURLRequest *req = new LLURLRequest(method, url); | 218 | LLURLRequest *req = new LLURLRequest(method, url); |
269 | req->requestEncoding(""); | 219 | req->checkRootCertificate(true); |
270 | 220 | ||
271 | // Insert custom headers is the caller sent any | 221 | // Insert custom headers is the caller sent any |
272 | if (headers.isMap()) | 222 | if (headers.isMap()) |
@@ -291,10 +241,6 @@ static void request( | |||
291 | req->addHeader(header.str().c_str()); | 241 | req->addHeader(header.str().c_str()); |
292 | } | 242 | } |
293 | } | 243 | } |
294 | if (!gCABundle.empty()) | ||
295 | { | ||
296 | req->checkRootCertificate(true, gCABundle.c_str()); | ||
297 | } | ||
298 | req->setCallback(new LLHTTPClientURLAdaptor(responder)); | 244 | req->setCallback(new LLHTTPClientURLAdaptor(responder)); |
299 | 245 | ||
300 | if (method == LLURLRequest::HTTP_POST && gMessageSystem) | 246 | if (method == LLURLRequest::HTTP_POST && gMessageSystem) |
@@ -310,19 +256,26 @@ static void request( | |||
310 | 256 | ||
311 | chain.push_back(LLIOPipe::ptr_t(body_injector)); | 257 | chain.push_back(LLIOPipe::ptr_t(body_injector)); |
312 | } | 258 | } |
259 | |||
260 | if (method == LLURLRequest::HTTP_GET && (offset > 0 || bytes > 0)) | ||
261 | { | ||
262 | std::string range = llformat("Range: bytes=%d-%d", offset,offset+bytes-1); | ||
263 | req->addHeader(range.c_str()); | ||
264 | } | ||
265 | |||
313 | chain.push_back(LLIOPipe::ptr_t(req)); | 266 | chain.push_back(LLIOPipe::ptr_t(req)); |
314 | 267 | ||
315 | theClientPump->addChain(chain, timeout); | 268 | theClientPump->addChain(chain, timeout); |
316 | } | 269 | } |
317 | 270 | ||
318 | static void request( | 271 | |
319 | const std::string& url, | 272 | void LLHTTPClient::getByteRange(const std::string& url, |
320 | LLURLRequest::ERequestAction method, | 273 | S32 offset, S32 bytes, |
321 | Injector* body_injector, | 274 | ResponderPtr responder, |
322 | LLHTTPClient::ResponderPtr responder, | 275 | const LLSD& headers, |
323 | const F32 timeout=HTTP_REQUEST_EXPIRY_SECS) | 276 | const F32 timeout) |
324 | { | 277 | { |
325 | request(url, method, body_injector, responder, LLSD(), timeout); | 278 | request(url, LLURLRequest::HTTP_GET, NULL, responder, LLSD(), timeout, offset, bytes); |
326 | } | 279 | } |
327 | 280 | ||
328 | void LLHTTPClient::head(const std::string& url, ResponderPtr responder, const F32 timeout) | 281 | void LLHTTPClient::head(const std::string& url, ResponderPtr responder, const F32 timeout) |
@@ -334,10 +287,13 @@ void LLHTTPClient::get(const std::string& url, ResponderPtr responder, const LLS | |||
334 | { | 287 | { |
335 | request(url, LLURLRequest::HTTP_GET, NULL, responder, headers, timeout); | 288 | request(url, LLURLRequest::HTTP_GET, NULL, responder, headers, timeout); |
336 | } | 289 | } |
337 | 290 | void LLHTTPClient::getHeaderOnly(const std::string& url, ResponderPtr responder, const LLSD& headers, const F32 timeout) | |
338 | void LLHTTPClient::get(const std::string& url, ResponderPtr responder, const F32 timeout) | ||
339 | { | 291 | { |
340 | get(url, responder, LLSD(), timeout); | 292 | request(url, LLURLRequest::HTTP_HEAD, NULL, responder, headers, timeout); |
293 | } | ||
294 | void LLHTTPClient::getHeaderOnly(const std::string& url, ResponderPtr responder, const F32 timeout) | ||
295 | { | ||
296 | getHeaderOnly(url, responder, LLSD(), timeout); | ||
341 | } | 297 | } |
342 | 298 | ||
343 | void LLHTTPClient::get(const std::string& url, const LLSD& query, ResponderPtr responder, const LLSD& headers, const F32 timeout) | 299 | void LLHTTPClient::get(const std::string& url, const LLSD& query, ResponderPtr responder, const LLSD& headers, const F32 timeout) |
@@ -348,11 +304,6 @@ void LLHTTPClient::get(const std::string& url, const LLSD& query, ResponderPtr r | |||
348 | get(uri.asString(), responder, headers, timeout); | 304 | get(uri.asString(), responder, headers, timeout); |
349 | } | 305 | } |
350 | 306 | ||
351 | void LLHTTPClient::get(const std::string& url, const LLSD& query, ResponderPtr responder, const F32 timeout) | ||
352 | { | ||
353 | get(url, query, responder, LLSD(), timeout); | ||
354 | } | ||
355 | |||
356 | // A simple class for managing data returned from a curl http request. | 307 | // A simple class for managing data returned from a curl http request. |
357 | class LLHTTPBuffer | 308 | class LLHTTPBuffer |
358 | { | 309 | { |
@@ -388,6 +339,7 @@ private: | |||
388 | std::string mBuffer; | 339 | std::string mBuffer; |
389 | }; | 340 | }; |
390 | 341 | ||
342 | // *TODO: Deprecate (only used by dataserver) | ||
391 | // This call is blocking! This is probably usually bad. :( | 343 | // This call is blocking! This is probably usually bad. :( |
392 | LLSD LLHTTPClient::blockingGet(const std::string& url) | 344 | LLSD LLHTTPClient::blockingGet(const std::string& url) |
393 | { | 345 | { |
@@ -481,24 +433,3 @@ bool LLHTTPClient::hasPump() | |||
481 | { | 433 | { |
482 | return theClientPump != NULL; | 434 | return theClientPump != NULL; |
483 | } | 435 | } |
484 | |||
485 | void LLHTTPClient::setCABundle(const std::string& caBundle) | ||
486 | { | ||
487 | gCABundle = caBundle; | ||
488 | } | ||
489 | |||
490 | namespace boost | ||
491 | { | ||
492 | void intrusive_ptr_add_ref(LLHTTPClient::Responder* p) | ||
493 | { | ||
494 | ++p->mReferenceCount; | ||
495 | } | ||
496 | |||
497 | void intrusive_ptr_release(LLHTTPClient::Responder* p) | ||
498 | { | ||
499 | if(p && 0 == --p->mReferenceCount) | ||
500 | { | ||
501 | delete p; | ||
502 | } | ||
503 | } | ||
504 | }; | ||
diff --git a/linden/indra/llmessage/llhttpclient.h b/linden/indra/llmessage/llhttpclient.h index 703ee61..1587268 100644 --- a/linden/indra/llmessage/llhttpclient.h +++ b/linden/indra/llmessage/llhttpclient.h | |||
@@ -41,7 +41,7 @@ | |||
41 | #include <boost/intrusive_ptr.hpp> | 41 | #include <boost/intrusive_ptr.hpp> |
42 | 42 | ||
43 | #include "llassettype.h" | 43 | #include "llassettype.h" |
44 | #include "llbuffer.h" | 44 | #include "llcurl.h" |
45 | #include "lliopipe.h" | 45 | #include "lliopipe.h" |
46 | 46 | ||
47 | extern const F32 HTTP_REQUEST_EXPIRY_SECS; | 47 | extern const F32 HTTP_REQUEST_EXPIRY_SECS; |
@@ -54,48 +54,23 @@ class LLSD; | |||
54 | class LLHTTPClient | 54 | class LLHTTPClient |
55 | { | 55 | { |
56 | public: | 56 | public: |
57 | class Responder | 57 | // class Responder moved to LLCurl |
58 | { | 58 | |
59 | public: | 59 | // For convenience |
60 | Responder(); | 60 | typedef LLCurl::Responder Responder; |
61 | virtual ~Responder(); | 61 | typedef LLCurl::ResponderPtr ResponderPtr; |
62 | 62 | ||
63 | /** | 63 | // non-blocking |
64 | * @brief return true if the status code indicates success. | ||
65 | */ | ||
66 | static bool isGoodStatus(U32 status) | ||
67 | { | ||
68 | return((200 <= status) && (status < 300)); | ||
69 | } | ||
70 | |||
71 | virtual void error(U32 status, const std::string& reason); // called with bad status codes | ||
72 | |||
73 | virtual void result(const LLSD& content); | ||
74 | |||
75 | // Override point for clients that may want to use this class when the response is some other format besides LLSD | ||
76 | virtual void completedRaw(U32 status, const std::string& reason, const LLChannelDescriptors& channels, | ||
77 | const LLIOPipe::buffer_ptr_t& buffer); | ||
78 | |||
79 | virtual void completed(U32 status, const std::string& reason, const LLSD& content); | ||
80 | /**< The default implemetnation calls | ||
81 | either: | ||
82 | * result(), or | ||
83 | * error() | ||
84 | */ | ||
85 | |||
86 | public: /* but not really -- don't touch this */ | ||
87 | U32 mReferenceCount; | ||
88 | }; | ||
89 | |||
90 | typedef boost::intrusive_ptr<Responder> ResponderPtr; | ||
91 | |||
92 | static void head(const std::string& url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 64 | static void head(const std::string& url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
93 | static void get(const std::string& url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 65 | static void getByteRange(const std::string& url, S32 offset, S32 bytes, ResponderPtr, const LLSD& headers=LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
94 | static void get(const std::string& url, ResponderPtr, const LLSD& headers, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 66 | static void get(const std::string& url, ResponderPtr, const LLSD& headers = LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
95 | static void get(const std::string& url, const LLSD& query, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 67 | static void get(const std::string& url, const LLSD& query, ResponderPtr, const LLSD& headers = LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
96 | static void get(const std::string& url, const LLSD& query, ResponderPtr, const LLSD& headers, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 68 | |
97 | static void put(const std::string& url, const LLSD& body, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 69 | static void put(const std::string& url, const LLSD& body, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
98 | ///< non-blocking | 70 | static void getHeaderOnly(const std::string& url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
71 | static void getHeaderOnly(const std::string& url, ResponderPtr, const LLSD& headers, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | ||
72 | |||
73 | ///< non-blocking | ||
99 | static void post(const std::string& url, const LLSD& body, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 74 | static void post(const std::string& url, const LLSD& body, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
100 | static void post(const std::string& url, const U8* data, S32 size, ResponderPtr responder, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 75 | static void post(const std::string& url, const U8* data, S32 size, ResponderPtr responder, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
101 | static void postFile(const std::string& url, const std::string& filename, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); | 76 | static void postFile(const std::string& url, const std::string& filename, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS); |
@@ -113,20 +88,6 @@ public: | |||
113 | ///< must be called before any of the above calls are made | 88 | ///< must be called before any of the above calls are made |
114 | static bool hasPump(); | 89 | static bool hasPump(); |
115 | ///< for testing | 90 | ///< for testing |
116 | |||
117 | static void setCABundle(const std::string& caBundle); | ||
118 | ///< use this root CA bundle when checking SSL connections | ||
119 | ///< defaults to the standard system root CA bundle | ||
120 | ///< @see LLURLRequest::checkRootCertificate() | ||
121 | }; | 91 | }; |
122 | 92 | ||
123 | |||
124 | |||
125 | namespace boost | ||
126 | { | ||
127 | void intrusive_ptr_add_ref(LLHTTPClient::Responder* p); | ||
128 | void intrusive_ptr_release(LLHTTPClient::Responder* p); | ||
129 | }; | ||
130 | |||
131 | |||
132 | #endif // LL_LLHTTPCLIENT_H | 93 | #endif // LL_LLHTTPCLIENT_H |
diff --git a/linden/indra/llmessage/llhttpnode.h b/linden/indra/llmessage/llhttpnode.h index 9317e9c..b4d4aed 100644 --- a/linden/indra/llmessage/llhttpnode.h +++ b/linden/indra/llmessage/llhttpnode.h | |||
@@ -176,7 +176,7 @@ public: | |||
176 | 176 | ||
177 | /* @name Description system | 177 | /* @name Description system |
178 | The Description object contains information about a service. | 178 | The Description object contains information about a service. |
179 | All subclasses of LLHTTPNode should override description() and use | 179 | All subclasses of LLHTTPNode should override describe() and use |
180 | the methods of the Description class to set the various properties. | 180 | the methods of the Description class to set the various properties. |
181 | */ | 181 | */ |
182 | //@{ | 182 | //@{ |
diff --git a/linden/indra/llmessage/lliohttpserver.cpp b/linden/indra/llmessage/lliohttpserver.cpp index 40f70c3..6e94ec6 100644 --- a/linden/indra/llmessage/lliohttpserver.cpp +++ b/linden/indra/llmessage/lliohttpserver.cpp | |||
@@ -156,7 +156,9 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( | |||
156 | // assume deferred unless mResponse does otherwise | 156 | // assume deferred unless mResponse does otherwise |
157 | mResponse = Response::create(this); | 157 | mResponse = Response::create(this); |
158 | 158 | ||
159 | // TODO: Babbage: Parameterize parser? | 159 | // *TODO: Babbage: Parameterize parser? |
160 | // *TODO: We should look at content-type and do the right | ||
161 | // thing. Phoenix 2007-12-31 | ||
160 | LLBufferStream istr(channels, buffer.get()); | 162 | LLBufferStream istr(channels, buffer.get()); |
161 | 163 | ||
162 | static LLTimer timer; | 164 | static LLTimer timer; |
@@ -171,14 +173,12 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( | |||
171 | { | 173 | { |
172 | LLSD input; | 174 | LLSD input; |
173 | LLSDSerialize::fromXML(input, istr); | 175 | LLSDSerialize::fromXML(input, istr); |
174 | |||
175 | mNode.put(LLHTTPNode::ResponsePtr(mResponse), context, input); | 176 | mNode.put(LLHTTPNode::ResponsePtr(mResponse), context, input); |
176 | } | 177 | } |
177 | else if(verb == HTTP_VERB_POST) | 178 | else if(verb == HTTP_VERB_POST) |
178 | { | 179 | { |
179 | LLSD input; | 180 | LLSD input; |
180 | LLSDSerialize::fromXML(input, istr); | 181 | LLSDSerialize::fromXML(input, istr); |
181 | |||
182 | mNode.post(LLHTTPNode::ResponsePtr(mResponse), context, input); | 182 | mNode.post(LLHTTPNode::ResponsePtr(mResponse), context, input); |
183 | } | 183 | } |
184 | else if(verb == HTTP_VERB_DELETE) | 184 | else if(verb == HTTP_VERB_DELETE) |
diff --git a/linden/indra/llmessage/llmessage.vcproj b/linden/indra/llmessage/llmessage.vcproj index 56b7d30..b011c24 100644 --- a/linden/indra/llmessage/llmessage.vcproj +++ b/linden/indra/llmessage/llmessage.vcproj | |||
@@ -394,9 +394,6 @@ | |||
394 | RelativePath=".\llcachename.h"> | 394 | RelativePath=".\llcachename.h"> |
395 | </File> | 395 | </File> |
396 | <File | 396 | <File |
397 | RelativePath=".\llcallbacklisth.h"> | ||
398 | </File> | ||
399 | <File | ||
400 | RelativePath=".\llcamera.h"> | 397 | RelativePath=".\llcamera.h"> |
401 | </File> | 398 | </File> |
402 | <File | 399 | <File |
diff --git a/linden/indra/llmessage/llmessage_vc8.vcproj b/linden/indra/llmessage/llmessage_vc8.vcproj index 045cd04..96f81f7 100644 --- a/linden/indra/llmessage/llmessage_vc8.vcproj +++ b/linden/indra/llmessage/llmessage_vc8.vcproj | |||
@@ -1,925 +1,921 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | 1 | <?xml version="1.0" encoding="Windows-1252"?> |
2 | <VisualStudioProject | 2 | <VisualStudioProject |
3 | ProjectType="Visual C++" | 3 | ProjectType="Visual C++" |
4 | Version="8.00" | 4 | Version="8.00" |
5 | Name="llmessage" | 5 | Name="llmessage" |
6 | ProjectGUID="{E5D94794-5671-4BD6-A16D-26EC18F3DB34}" | 6 | ProjectGUID="{E5D94794-5671-4BD6-A16D-26EC18F3DB34}" |
7 | RootNamespace="llmessage" | 7 | RootNamespace="llmessage" |
8 | Keyword="Win32Proj" | 8 | Keyword="Win32Proj" |
9 | > | 9 | > |
10 | <Platforms> | 10 | <Platforms> |
11 | <Platform | 11 | <Platform |
12 | Name="Win32" | 12 | Name="Win32" |
13 | /> | 13 | /> |
14 | </Platforms> | 14 | </Platforms> |
15 | <ToolFiles> | 15 | <ToolFiles> |
16 | </ToolFiles> | 16 | </ToolFiles> |
17 | <Configurations> | 17 | <Configurations> |
18 | <Configuration | 18 | <Configuration |
19 | Name="Debug|Win32" | 19 | Name="Debug|Win32" |
20 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | 20 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" |
21 | IntermediateDirectory="Debug" | 21 | IntermediateDirectory="Debug" |
22 | ConfigurationType="4" | 22 | ConfigurationType="4" |
23 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 23 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
24 | CharacterSet="1" | 24 | CharacterSet="1" |
25 | > | 25 | > |
26 | <Tool | 26 | <Tool |
27 | Name="VCPreBuildEventTool" | 27 | Name="VCPreBuildEventTool" |
28 | /> | 28 | /> |
29 | <Tool | 29 | <Tool |
30 | Name="VCCustomBuildTool" | 30 | Name="VCCustomBuildTool" |
31 | /> | 31 | /> |
32 | <Tool | 32 | <Tool |
33 | Name="VCXMLDataGeneratorTool" | 33 | Name="VCXMLDataGeneratorTool" |
34 | /> | 34 | /> |
35 | <Tool | 35 | <Tool |
36 | Name="VCWebServiceProxyGeneratorTool" | 36 | Name="VCWebServiceProxyGeneratorTool" |
37 | /> | 37 | /> |
38 | <Tool | 38 | <Tool |
39 | Name="VCMIDLTool" | 39 | Name="VCMIDLTool" |
40 | /> | 40 | /> |
41 | <Tool | 41 | <Tool |
42 | Name="VCCLCompilerTool" | 42 | Name="VCCLCompilerTool" |
43 | Optimization="0" | 43 | Optimization="0" |
44 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\..\libraries\i686-win32\include;..\..\libraries\include\" | 44 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\..\libraries\i686-win32\include;..\..\libraries\include\" |
45 | PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG" | 45 | PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG" |
46 | MinimalRebuild="true" | 46 | MinimalRebuild="true" |
47 | BasicRuntimeChecks="3" | 47 | BasicRuntimeChecks="3" |
48 | RuntimeLibrary="1" | 48 | RuntimeLibrary="1" |
49 | StructMemberAlignment="4" | 49 | StructMemberAlignment="4" |
50 | TreatWChar_tAsBuiltInType="false" | 50 | TreatWChar_tAsBuiltInType="false" |
51 | ForceConformanceInForLoopScope="true" | 51 | ForceConformanceInForLoopScope="true" |
52 | UsePrecompiledHeader="0" | 52 | UsePrecompiledHeader="0" |
53 | WarningLevel="3" | 53 | WarningLevel="3" |
54 | WarnAsError="true" | 54 | WarnAsError="true" |
55 | Detect64BitPortabilityProblems="false" | 55 | Detect64BitPortabilityProblems="false" |
56 | DebugInformationFormat="4" | 56 | DebugInformationFormat="4" |
57 | /> | 57 | /> |
58 | <Tool | 58 | <Tool |
59 | Name="VCManagedResourceCompilerTool" | 59 | Name="VCManagedResourceCompilerTool" |
60 | /> | 60 | /> |
61 | <Tool | 61 | <Tool |
62 | Name="VCResourceCompilerTool" | 62 | Name="VCResourceCompilerTool" |
63 | /> | 63 | /> |
64 | <Tool | 64 | <Tool |
65 | Name="VCPreLinkEventTool" | 65 | Name="VCPreLinkEventTool" |
66 | /> | 66 | /> |
67 | <Tool | 67 | <Tool |
68 | Name="VCLibrarianTool" | 68 | Name="VCLibrarianTool" |
69 | OutputFile="$(OutDir)/llmessage.lib" | 69 | OutputFile="$(OutDir)/llmessage.lib" |
70 | /> | 70 | /> |
71 | <Tool | 71 | <Tool |
72 | Name="VCALinkTool" | 72 | Name="VCALinkTool" |
73 | /> | 73 | /> |
74 | <Tool | 74 | <Tool |
75 | Name="VCXDCMakeTool" | 75 | Name="VCXDCMakeTool" |
76 | /> | 76 | /> |
77 | <Tool | 77 | <Tool |
78 | Name="VCBscMakeTool" | 78 | Name="VCBscMakeTool" |
79 | /> | 79 | /> |
80 | <Tool | 80 | <Tool |
81 | Name="VCFxCopTool" | 81 | Name="VCFxCopTool" |
82 | /> | 82 | /> |
83 | <Tool | 83 | <Tool |
84 | Name="VCPostBuildEventTool" | 84 | Name="VCPostBuildEventTool" |
85 | /> | 85 | /> |
86 | </Configuration> | 86 | </Configuration> |
87 | <Configuration | 87 | <Configuration |
88 | Name="Release|Win32" | 88 | Name="Release|Win32" |
89 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | 89 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" |
90 | IntermediateDirectory="Release" | 90 | IntermediateDirectory="Release" |
91 | ConfigurationType="4" | 91 | ConfigurationType="4" |
92 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 92 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
93 | CharacterSet="1" | 93 | CharacterSet="1" |
94 | > | 94 | > |
95 | <Tool | 95 | <Tool |
96 | Name="VCPreBuildEventTool" | 96 | Name="VCPreBuildEventTool" |
97 | /> | 97 | /> |
98 | <Tool | 98 | <Tool |
99 | Name="VCCustomBuildTool" | 99 | Name="VCCustomBuildTool" |
100 | /> | 100 | /> |
101 | <Tool | 101 | <Tool |
102 | Name="VCXMLDataGeneratorTool" | 102 | Name="VCXMLDataGeneratorTool" |
103 | /> | 103 | /> |
104 | <Tool | 104 | <Tool |
105 | Name="VCWebServiceProxyGeneratorTool" | 105 | Name="VCWebServiceProxyGeneratorTool" |
106 | /> | 106 | /> |
107 | <Tool | 107 | <Tool |
108 | Name="VCMIDLTool" | 108 | Name="VCMIDLTool" |
109 | /> | 109 | /> |
110 | <Tool | 110 | <Tool |
111 | Name="VCCLCompilerTool" | 111 | Name="VCCLCompilerTool" |
112 | AdditionalOptions="/Oy-" | 112 | AdditionalOptions="/Oy-" |
113 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\..\libraries\i686-win32\include;..\..\libraries\include\" | 113 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\..\libraries\i686-win32\include;..\..\libraries\include\" |
114 | PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" | 114 | PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" |
115 | RuntimeLibrary="0" | 115 | RuntimeLibrary="0" |
116 | StructMemberAlignment="0" | 116 | StructMemberAlignment="0" |
117 | TreatWChar_tAsBuiltInType="false" | 117 | TreatWChar_tAsBuiltInType="false" |
118 | ForceConformanceInForLoopScope="true" | 118 | ForceConformanceInForLoopScope="true" |
119 | UsePrecompiledHeader="0" | 119 | UsePrecompiledHeader="0" |
120 | WarningLevel="3" | 120 | WarningLevel="3" |
121 | WarnAsError="true" | 121 | WarnAsError="true" |
122 | Detect64BitPortabilityProblems="false" | 122 | Detect64BitPortabilityProblems="false" |
123 | DebugInformationFormat="3" | 123 | DebugInformationFormat="3" |
124 | /> | 124 | /> |
125 | <Tool | 125 | <Tool |
126 | Name="VCManagedResourceCompilerTool" | 126 | Name="VCManagedResourceCompilerTool" |
127 | /> | 127 | /> |
128 | <Tool | 128 | <Tool |
129 | Name="VCResourceCompilerTool" | 129 | Name="VCResourceCompilerTool" |
130 | /> | 130 | /> |
131 | <Tool | 131 | <Tool |
132 | Name="VCPreLinkEventTool" | 132 | Name="VCPreLinkEventTool" |
133 | /> | 133 | /> |
134 | <Tool | 134 | <Tool |
135 | Name="VCLibrarianTool" | 135 | Name="VCLibrarianTool" |
136 | OutputFile="$(OutDir)/llmessage.lib" | 136 | OutputFile="$(OutDir)/llmessage.lib" |
137 | /> | 137 | /> |
138 | <Tool | 138 | <Tool |
139 | Name="VCALinkTool" | 139 | Name="VCALinkTool" |
140 | /> | 140 | /> |
141 | <Tool | 141 | <Tool |
142 | Name="VCXDCMakeTool" | 142 | Name="VCXDCMakeTool" |
143 | /> | 143 | /> |
144 | <Tool | 144 | <Tool |
145 | Name="VCBscMakeTool" | 145 | Name="VCBscMakeTool" |
146 | /> | 146 | /> |
147 | <Tool | 147 | <Tool |
148 | Name="VCFxCopTool" | 148 | Name="VCFxCopTool" |
149 | /> | 149 | /> |
150 | <Tool | 150 | <Tool |
151 | Name="VCPostBuildEventTool" | 151 | Name="VCPostBuildEventTool" |
152 | /> | 152 | /> |
153 | </Configuration> | 153 | </Configuration> |
154 | <Configuration | 154 | <Configuration |
155 | Name="ReleaseNoOpt|Win32" | 155 | Name="ReleaseNoOpt|Win32" |
156 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | 156 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" |
157 | IntermediateDirectory="$(ConfigurationName)" | 157 | IntermediateDirectory="$(ConfigurationName)" |
158 | ConfigurationType="4" | 158 | ConfigurationType="4" |
159 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 159 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
160 | CharacterSet="1" | 160 | CharacterSet="1" |
161 | > | 161 | > |
162 | <Tool | 162 | <Tool |
163 | Name="VCPreBuildEventTool" | 163 | Name="VCPreBuildEventTool" |
164 | /> | 164 | /> |
165 | <Tool | 165 | <Tool |
166 | Name="VCCustomBuildTool" | 166 | Name="VCCustomBuildTool" |
167 | /> | 167 | /> |
168 | <Tool | 168 | <Tool |
169 | Name="VCXMLDataGeneratorTool" | 169 | Name="VCXMLDataGeneratorTool" |
170 | /> | 170 | /> |
171 | <Tool | 171 | <Tool |
172 | Name="VCWebServiceProxyGeneratorTool" | 172 | Name="VCWebServiceProxyGeneratorTool" |
173 | /> | 173 | /> |
174 | <Tool | 174 | <Tool |
175 | Name="VCMIDLTool" | 175 | Name="VCMIDLTool" |
176 | /> | 176 | /> |
177 | <Tool | 177 | <Tool |
178 | Name="VCCLCompilerTool" | 178 | Name="VCCLCompilerTool" |
179 | AdditionalOptions="/Oy-" | 179 | AdditionalOptions="/Oy-" |
180 | Optimization="0" | 180 | Optimization="0" |
181 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\..\libraries\i686-win32\include;..\..\libraries\include\" | 181 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\..\libraries\i686-win32\include;..\..\libraries\include\" |
182 | PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" | 182 | PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" |
183 | RuntimeLibrary="0" | 183 | RuntimeLibrary="0" |
184 | StructMemberAlignment="0" | 184 | StructMemberAlignment="0" |
185 | TreatWChar_tAsBuiltInType="false" | 185 | TreatWChar_tAsBuiltInType="false" |
186 | ForceConformanceInForLoopScope="true" | 186 | ForceConformanceInForLoopScope="true" |
187 | UsePrecompiledHeader="0" | 187 | UsePrecompiledHeader="0" |
188 | WarningLevel="3" | 188 | WarningLevel="3" |
189 | WarnAsError="true" | 189 | WarnAsError="true" |
190 | Detect64BitPortabilityProblems="false" | 190 | Detect64BitPortabilityProblems="false" |
191 | DebugInformationFormat="3" | 191 | DebugInformationFormat="3" |
192 | /> | 192 | /> |
193 | <Tool | 193 | <Tool |
194 | Name="VCManagedResourceCompilerTool" | 194 | Name="VCManagedResourceCompilerTool" |
195 | /> | 195 | /> |
196 | <Tool | 196 | <Tool |
197 | Name="VCResourceCompilerTool" | 197 | Name="VCResourceCompilerTool" |
198 | /> | 198 | /> |
199 | <Tool | 199 | <Tool |
200 | Name="VCPreLinkEventTool" | 200 | Name="VCPreLinkEventTool" |
201 | /> | 201 | /> |
202 | <Tool | 202 | <Tool |
203 | Name="VCLibrarianTool" | 203 | Name="VCLibrarianTool" |
204 | OutputFile="$(OutDir)/llmessage.lib" | 204 | OutputFile="$(OutDir)/llmessage.lib" |
205 | /> | 205 | /> |
206 | <Tool | 206 | <Tool |
207 | Name="VCALinkTool" | 207 | Name="VCALinkTool" |
208 | /> | 208 | /> |
209 | <Tool | 209 | <Tool |
210 | Name="VCXDCMakeTool" | 210 | Name="VCXDCMakeTool" |
211 | /> | 211 | /> |
212 | <Tool | 212 | <Tool |
213 | Name="VCBscMakeTool" | 213 | Name="VCBscMakeTool" |
214 | /> | 214 | /> |
215 | <Tool | 215 | <Tool |
216 | Name="VCFxCopTool" | 216 | Name="VCFxCopTool" |
217 | /> | 217 | /> |
218 | <Tool | 218 | <Tool |
219 | Name="VCPostBuildEventTool" | 219 | Name="VCPostBuildEventTool" |
220 | /> | 220 | /> |
221 | </Configuration> | 221 | </Configuration> |
222 | </Configurations> | 222 | </Configurations> |
223 | <References> | 223 | <References> |
224 | </References> | 224 | </References> |
225 | <Files> | 225 | <Files> |
226 | <Filter | 226 | <Filter |
227 | Name="Source Files" | 227 | Name="Source Files" |
228 | Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" | 228 | Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" |
229 | UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" | 229 | UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" |
230 | > | 230 | > |
231 | <File | 231 | <File |
232 | RelativePath=".\llassetstorage.cpp" | 232 | RelativePath=".\llassetstorage.cpp" |
233 | > | 233 | > |
234 | </File> | 234 | </File> |
235 | <File | 235 | <File |
236 | RelativePath=".\llblowfishcipher.cpp" | 236 | RelativePath=".\llblowfishcipher.cpp" |
237 | > | 237 | > |
238 | </File> | 238 | </File> |
239 | <File | 239 | <File |
240 | RelativePath=".\llbuffer.cpp" | 240 | RelativePath=".\llbuffer.cpp" |
241 | > | 241 | > |
242 | </File> | 242 | </File> |
243 | <File | 243 | <File |
244 | RelativePath=".\llbufferstream.cpp" | 244 | RelativePath=".\llbufferstream.cpp" |
245 | > | 245 | > |
246 | </File> | 246 | </File> |
247 | <File | 247 | <File |
248 | RelativePath=".\llcachename.cpp" | 248 | RelativePath=".\llcachename.cpp" |
249 | > | 249 | > |
250 | </File> | 250 | </File> |
251 | <File | 251 | <File |
252 | RelativePath=".\llchainio.cpp" | 252 | RelativePath=".\llchainio.cpp" |
253 | > | 253 | > |
254 | </File> | 254 | </File> |
255 | <File | 255 | <File |
256 | RelativePath=".\llcircuit.cpp" | 256 | RelativePath=".\llcircuit.cpp" |
257 | > | 257 | > |
258 | </File> | 258 | </File> |
259 | <File | 259 | <File |
260 | RelativePath=".\llclassifiedflags.cpp" | 260 | RelativePath=".\llclassifiedflags.cpp" |
261 | > | 261 | > |
262 | </File> | 262 | </File> |
263 | <File | 263 | <File |
264 | RelativePath=".\llcurl.cpp" | 264 | RelativePath=".\llcurl.cpp" |
265 | > | 265 | > |
266 | </File> | 266 | </File> |
267 | <File | 267 | <File |
268 | RelativePath=".\lldatapacker.cpp" | 268 | RelativePath=".\lldatapacker.cpp" |
269 | > | 269 | > |
270 | </File> | 270 | </File> |
271 | <File | 271 | <File |
272 | RelativePath=".\lldispatcher.cpp" | 272 | RelativePath=".\lldispatcher.cpp" |
273 | > | 273 | > |
274 | </File> | 274 | </File> |
275 | <File | 275 | <File |
276 | RelativePath=".\llfiltersd2xmlrpc.cpp" | 276 | RelativePath=".\llfiltersd2xmlrpc.cpp" |
277 | > | 277 | > |
278 | </File> | 278 | </File> |
279 | <File | 279 | <File |
280 | RelativePath=".\llhost.cpp" | 280 | RelativePath=".\llhost.cpp" |
281 | > | 281 | > |
282 | </File> | 282 | </File> |
283 | <File | 283 | <File |
284 | RelativePath=".\llhttpassetstorage.cpp" | 284 | RelativePath=".\llhttpassetstorage.cpp" |
285 | > | 285 | > |
286 | </File> | 286 | </File> |
287 | <File | 287 | <File |
288 | RelativePath=".\llhttpassetstorage.h" | 288 | RelativePath=".\llhttpassetstorage.h" |
289 | > | 289 | > |
290 | </File> | 290 | </File> |
291 | <File | 291 | <File |
292 | RelativePath=".\llhttpclient.cpp" | 292 | RelativePath=".\llhttpclient.cpp" |
293 | > | 293 | > |
294 | </File> | 294 | </File> |
295 | <File | 295 | <File |
296 | RelativePath=".\llhttpnode.cpp" | 296 | RelativePath=".\llhttpnode.cpp" |
297 | > | 297 | > |
298 | </File> | 298 | </File> |
299 | <File | 299 | <File |
300 | RelativePath=".\llhttpsender.cpp" | 300 | RelativePath=".\llhttpsender.cpp" |
301 | > | 301 | > |
302 | </File> | 302 | </File> |
303 | <File | 303 | <File |
304 | RelativePath=".\llinstantmessage.cpp" | 304 | RelativePath=".\llinstantmessage.cpp" |
305 | > | 305 | > |
306 | </File> | 306 | </File> |
307 | <File | 307 | <File |
308 | RelativePath=".\lliobuffer.cpp" | 308 | RelativePath=".\lliobuffer.cpp" |
309 | > | 309 | > |
310 | </File> | 310 | </File> |
311 | <File | 311 | <File |
312 | RelativePath=".\lliohttpserver.cpp" | 312 | RelativePath=".\lliohttpserver.cpp" |
313 | > | 313 | > |
314 | </File> | 314 | </File> |
315 | <File | 315 | <File |
316 | RelativePath=".\lliopipe.cpp" | 316 | RelativePath=".\lliopipe.cpp" |
317 | > | 317 | > |
318 | </File> | 318 | </File> |
319 | <File | 319 | <File |
320 | RelativePath=".\lliosocket.cpp" | 320 | RelativePath=".\lliosocket.cpp" |
321 | > | 321 | > |
322 | </File> | 322 | </File> |
323 | <File | 323 | <File |
324 | RelativePath=".\llioutil.cpp" | 324 | RelativePath=".\llioutil.cpp" |
325 | > | 325 | > |
326 | </File> | 326 | </File> |
327 | <File | 327 | <File |
328 | RelativePath=".\llmail.cpp" | 328 | RelativePath=".\llmail.cpp" |
329 | > | 329 | > |
330 | </File> | 330 | </File> |
331 | <File | 331 | <File |
332 | RelativePath=".\llmessagebuilder.cpp" | 332 | RelativePath=".\llmessagebuilder.cpp" |
333 | > | 333 | > |
334 | </File> | 334 | </File> |
335 | <File | 335 | <File |
336 | RelativePath=".\llmessageconfig.cpp" | 336 | RelativePath=".\llmessageconfig.cpp" |
337 | > | 337 | > |
338 | </File> | 338 | </File> |
339 | <File | 339 | <File |
340 | RelativePath=".\llmessagereader.cpp" | 340 | RelativePath=".\llmessagereader.cpp" |
341 | > | 341 | > |
342 | </File> | 342 | </File> |
343 | <File | 343 | <File |
344 | RelativePath=".\llmessagetemplate.cpp" | 344 | RelativePath=".\llmessagetemplate.cpp" |
345 | > | 345 | > |
346 | </File> | 346 | </File> |
347 | <File | 347 | <File |
348 | RelativePath=".\llmessagetemplateparser.cpp" | 348 | RelativePath=".\llmessagetemplateparser.cpp" |
349 | > | 349 | > |
350 | </File> | 350 | </File> |
351 | <File | 351 | <File |
352 | RelativePath=".\llmessagethrottle.cpp" | 352 | RelativePath=".\llmessagethrottle.cpp" |
353 | > | 353 | > |
354 | </File> | 354 | </File> |
355 | <File | 355 | <File |
356 | RelativePath=".\llmime.cpp" | 356 | RelativePath=".\llmime.cpp" |
357 | > | 357 | > |
358 | </File> | 358 | </File> |
359 | <File | 359 | <File |
360 | RelativePath=".\llnamevalue.cpp" | 360 | RelativePath=".\llnamevalue.cpp" |
361 | > | 361 | > |
362 | </File> | 362 | </File> |
363 | <File | 363 | <File |
364 | RelativePath=".\llnullcipher.cpp" | 364 | RelativePath=".\llnullcipher.cpp" |
365 | > | 365 | > |
366 | </File> | 366 | </File> |
367 | <File | 367 | <File |
368 | RelativePath=".\llpacketack.cpp" | 368 | RelativePath=".\llpacketack.cpp" |
369 | > | 369 | > |
370 | </File> | 370 | </File> |
371 | <File | 371 | <File |
372 | RelativePath=".\llpacketbuffer.cpp" | 372 | RelativePath=".\llpacketbuffer.cpp" |
373 | > | 373 | > |
374 | </File> | 374 | </File> |
375 | <File | 375 | <File |
376 | RelativePath=".\llpacketring.cpp" | 376 | RelativePath=".\llpacketring.cpp" |
377 | > | 377 | > |
378 | </File> | 378 | </File> |
379 | <File | 379 | <File |
380 | RelativePath=".\llpartdata.cpp" | 380 | RelativePath=".\llpartdata.cpp" |
381 | > | 381 | > |
382 | </File> | 382 | </File> |
383 | <File | 383 | <File |
384 | RelativePath=".\llpumpio.cpp" | 384 | RelativePath=".\llpumpio.cpp" |
385 | > | 385 | > |
386 | </File> | 386 | </File> |
387 | <File | 387 | <File |
388 | RelativePath=".\llsdappservices.cpp" | 388 | RelativePath=".\llsdappservices.cpp" |
389 | > | 389 | > |
390 | </File> | 390 | </File> |
391 | <File | 391 | <File |
392 | RelativePath=".\llsdhttpserver.cpp" | 392 | RelativePath=".\llsdhttpserver.cpp" |
393 | > | 393 | > |
394 | </File> | 394 | </File> |
395 | <File | 395 | <File |
396 | RelativePath=".\llsdmessagebuilder.cpp" | 396 | RelativePath=".\llsdmessagebuilder.cpp" |
397 | > | 397 | > |
398 | </File> | 398 | </File> |
399 | <File | 399 | <File |
400 | RelativePath=".\llsdmessagereader.cpp" | 400 | RelativePath=".\llsdmessagereader.cpp" |
401 | > | 401 | > |
402 | </File> | 402 | </File> |
403 | <File | 403 | <File |
404 | RelativePath=".\llsdrpcclient.cpp" | 404 | RelativePath=".\llsdrpcclient.cpp" |
405 | > | 405 | > |
406 | </File> | 406 | </File> |
407 | <File | 407 | <File |
408 | RelativePath=".\llsdrpcserver.cpp" | 408 | RelativePath=".\llsdrpcserver.cpp" |
409 | > | 409 | > |
410 | </File> | 410 | </File> |
411 | <File | 411 | <File |
412 | RelativePath=".\llservice.cpp" | 412 | RelativePath=".\llservice.cpp" |
413 | > | 413 | > |
414 | </File> | 414 | </File> |
415 | <File | 415 | <File |
416 | RelativePath=".\llservicebuilder.cpp" | 416 | RelativePath=".\llservicebuilder.cpp" |
417 | > | 417 | > |
418 | </File> | 418 | </File> |
419 | <File | 419 | <File |
420 | RelativePath=".\lltemplatemessagebuilder.cpp" | 420 | RelativePath=".\lltemplatemessagebuilder.cpp" |
421 | > | 421 | > |
422 | </File> | 422 | </File> |
423 | <File | 423 | <File |
424 | RelativePath=".\lltemplatemessagereader.cpp" | 424 | RelativePath=".\lltemplatemessagereader.cpp" |
425 | > | 425 | > |
426 | </File> | 426 | </File> |
427 | <File | 427 | <File |
428 | RelativePath=".\llthrottle.cpp" | 428 | RelativePath=".\llthrottle.cpp" |
429 | > | 429 | > |
430 | </File> | 430 | </File> |
431 | <File | 431 | <File |
432 | RelativePath=".\lltransfermanager.cpp" | 432 | RelativePath=".\lltransfermanager.cpp" |
433 | > | 433 | > |
434 | </File> | 434 | </File> |
435 | <File | 435 | <File |
436 | RelativePath=".\lltransfersourceasset.cpp" | 436 | RelativePath=".\lltransfersourceasset.cpp" |
437 | > | 437 | > |
438 | </File> | 438 | </File> |
439 | <File | 439 | <File |
440 | RelativePath=".\lltransfersourcefile.cpp" | 440 | RelativePath=".\lltransfersourcefile.cpp" |
441 | > | 441 | > |
442 | </File> | 442 | </File> |
443 | <File | 443 | <File |
444 | RelativePath=".\lltransfertargetfile.cpp" | 444 | RelativePath=".\lltransfertargetfile.cpp" |
445 | > | 445 | > |
446 | </File> | 446 | </File> |
447 | <File | 447 | <File |
448 | RelativePath=".\lltransfertargetvfile.cpp" | 448 | RelativePath=".\lltransfertargetvfile.cpp" |
449 | > | 449 | > |
450 | </File> | 450 | </File> |
451 | <File | 451 | <File |
452 | RelativePath=".\llurlrequest.cpp" | 452 | RelativePath=".\llurlrequest.cpp" |
453 | > | 453 | > |
454 | </File> | 454 | </File> |
455 | <File | 455 | <File |
456 | RelativePath=".\lluseroperation.cpp" | 456 | RelativePath=".\lluseroperation.cpp" |
457 | > | 457 | > |
458 | </File> | 458 | </File> |
459 | <File | 459 | <File |
460 | RelativePath=".\llxfer.cpp" | 460 | RelativePath=".\llxfer.cpp" |
461 | > | 461 | > |
462 | </File> | 462 | </File> |
463 | <File | 463 | <File |
464 | RelativePath=".\llxfer_file.cpp" | 464 | RelativePath=".\llxfer_file.cpp" |
465 | > | 465 | > |
466 | </File> | 466 | </File> |
467 | <File | 467 | <File |
468 | RelativePath=".\llxfer_mem.cpp" | 468 | RelativePath=".\llxfer_mem.cpp" |
469 | > | 469 | > |
470 | </File> | 470 | </File> |
471 | <File | 471 | <File |
472 | RelativePath=".\llxfer_vfile.cpp" | 472 | RelativePath=".\llxfer_vfile.cpp" |
473 | > | 473 | > |
474 | </File> | 474 | </File> |
475 | <File | 475 | <File |
476 | RelativePath=".\llxfermanager.cpp" | 476 | RelativePath=".\llxfermanager.cpp" |
477 | > | 477 | > |
478 | </File> | 478 | </File> |
479 | <File | 479 | <File |
480 | RelativePath=".\llxorcipher.cpp" | 480 | RelativePath=".\llxorcipher.cpp" |
481 | > | 481 | > |
482 | </File> | 482 | </File> |
483 | <File | 483 | <File |
484 | RelativePath=".\message.cpp" | 484 | RelativePath=".\message.cpp" |
485 | > | 485 | > |
486 | </File> | 486 | </File> |
487 | <File | 487 | <File |
488 | RelativePath=".\message_prehash.cpp" | 488 | RelativePath=".\message_prehash.cpp" |
489 | > | 489 | > |
490 | </File> | 490 | </File> |
491 | <File | 491 | <File |
492 | RelativePath=".\message_string_table.cpp" | 492 | RelativePath=".\message_string_table.cpp" |
493 | > | 493 | > |
494 | </File> | 494 | </File> |
495 | <File | 495 | <File |
496 | RelativePath=".\net.cpp" | 496 | RelativePath=".\net.cpp" |
497 | > | 497 | > |
498 | </File> | 498 | </File> |
499 | <File | 499 | <File |
500 | RelativePath=".\network.cpp" | 500 | RelativePath=".\network.cpp" |
501 | > | 501 | > |
502 | </File> | 502 | </File> |
503 | <File | 503 | <File |
504 | RelativePath=".\partsyspacket.cpp" | 504 | RelativePath=".\partsyspacket.cpp" |
505 | > | 505 | > |
506 | </File> | 506 | </File> |
507 | <File | 507 | <File |
508 | RelativePath=".\patch_code.cpp" | 508 | RelativePath=".\patch_code.cpp" |
509 | > | 509 | > |
510 | </File> | 510 | </File> |
511 | <File | 511 | <File |
512 | RelativePath=".\patch_dct.cpp" | 512 | RelativePath=".\patch_dct.cpp" |
513 | > | 513 | > |
514 | </File> | 514 | </File> |
515 | <File | 515 | <File |
516 | RelativePath=".\patch_idct.cpp" | 516 | RelativePath=".\patch_idct.cpp" |
517 | > | 517 | > |
518 | </File> | 518 | </File> |
519 | </Filter> | 519 | </Filter> |
520 | <Filter | 520 | <Filter |
521 | Name="Header Files" | 521 | Name="Header Files" |
522 | Filter="h;hpp;hxx;hm;inl;inc;xsd" | 522 | Filter="h;hpp;hxx;hm;inl;inc;xsd" |
523 | UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" | 523 | UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" |
524 | > | 524 | > |
525 | <File | 525 | <File |
526 | RelativePath=".\camera.h" | 526 | RelativePath=".\camera.h" |
527 | > | 527 | > |
528 | </File> | 528 | </File> |
529 | <File | 529 | <File |
530 | RelativePath=".\coordframe.h" | 530 | RelativePath=".\coordframe.h" |
531 | > | 531 | > |
532 | </File> | 532 | </File> |
533 | <File | 533 | <File |
534 | RelativePath=".\llassetstorage.h" | 534 | RelativePath=".\llassetstorage.h" |
535 | > | 535 | > |
536 | </File> | 536 | </File> |
537 | <File | 537 | <File |
538 | RelativePath=".\llblowfishcipher.h" | 538 | RelativePath=".\llblowfishcipher.h" |
539 | > | 539 | > |
540 | </File> | 540 | </File> |
541 | <File | 541 | <File |
542 | RelativePath=".\llbuffer.h" | 542 | RelativePath=".\llbuffer.h" |
543 | > | 543 | > |
544 | </File> | 544 | </File> |
545 | <File | 545 | <File |
546 | RelativePath=".\llbufferstream.h" | 546 | RelativePath=".\llbufferstream.h" |
547 | > | 547 | > |
548 | </File> | 548 | </File> |
549 | <File | 549 | <File |
550 | RelativePath=".\llcachename.h" | 550 | RelativePath=".\llcachename.h" |
551 | > | 551 | > |
552 | </File> | 552 | </File> |
553 | <File | 553 | <File |
554 | RelativePath=".\llcallbacklisth.h" | 554 | RelativePath=".\llcamera.h" |
555 | > | 555 | > |
556 | </File> | 556 | </File> |
557 | <File | 557 | <File |
558 | RelativePath=".\llcamera.h" | 558 | RelativePath=".\llchainio.h" |
559 | > | 559 | > |
560 | </File> | 560 | </File> |
561 | <File | 561 | <File |
562 | RelativePath=".\llchainio.h" | 562 | RelativePath=".\llcipher.h" |
563 | > | 563 | > |
564 | </File> | 564 | </File> |
565 | <File | 565 | <File |
566 | RelativePath=".\llcipher.h" | 566 | RelativePath=".\llcircuit.h" |
567 | > | 567 | > |
568 | </File> | 568 | </File> |
569 | <File | 569 | <File |
570 | RelativePath=".\llcircuit.h" | 570 | RelativePath=".\llclassifiedflags.h" |
571 | > | 571 | > |
572 | </File> | 572 | </File> |
573 | <File | 573 | <File |
574 | RelativePath=".\llclassifiedflags.h" | 574 | RelativePath=".\llcoordframe.h" |
575 | > | 575 | > |
576 | </File> | 576 | </File> |
577 | <File | 577 | <File |
578 | RelativePath=".\llcoordframe.h" | 578 | RelativePath=".\llcurl.h" |
579 | > | 579 | > |
580 | </File> | 580 | </File> |
581 | <File | 581 | <File |
582 | RelativePath=".\llcurl.h" | 582 | RelativePath=".\lldatapacker.h" |
583 | > | 583 | > |
584 | </File> | 584 | </File> |
585 | <File | 585 | <File |
586 | RelativePath=".\lldatapacker.h" | 586 | RelativePath=".\lldbstrings.h" |
587 | > | 587 | > |
588 | </File> | 588 | </File> |
589 | <File | 589 | <File |
590 | RelativePath=".\lldbstrings.h" | 590 | RelativePath=".\lldispatcher.h" |
591 | > | 591 | > |
592 | </File> | 592 | </File> |
593 | <File | 593 | <File |
594 | RelativePath=".\lldispatcher.h" | 594 | RelativePath=".\lleventflags.h" |
595 | > | 595 | > |
596 | </File> | 596 | </File> |
597 | <File | 597 | <File |
598 | RelativePath=".\lleventflags.h" | 598 | RelativePath=".\llfiltersd2xmlrpc.h" |
599 | > | 599 | > |
600 | </File> | 600 | </File> |
601 | <File | 601 | <File |
602 | RelativePath=".\llfiltersd2xmlrpc.h" | 602 | RelativePath=".\llfollowcamparams.h" |
603 | > | 603 | > |
604 | </File> | 604 | </File> |
605 | <File | 605 | <File |
606 | RelativePath=".\llfollowcamparams.h" | 606 | RelativePath=".\llhost.h" |
607 | > | 607 | > |
608 | </File> | 608 | </File> |
609 | <File | 609 | <File |
610 | RelativePath=".\llhost.h" | 610 | RelativePath=".\llhttpclient.h" |
611 | > | 611 | > |
612 | </File> | 612 | </File> |
613 | <File | 613 | <File |
614 | RelativePath=".\llhttpclient.h" | 614 | RelativePath=".\llhttpnode.h" |
615 | > | 615 | > |
616 | </File> | 616 | </File> |
617 | <File | 617 | <File |
618 | RelativePath=".\llhttpnode.h" | 618 | RelativePath=".\llhttpsender.h" |
619 | > | 619 | > |
620 | </File> | 620 | </File> |
621 | <File | 621 | <File |
622 | RelativePath=".\llhttpsender.h" | 622 | RelativePath=".\llinstantmessage.h" |
623 | > | 623 | > |
624 | </File> | 624 | </File> |
625 | <File | 625 | <File |
626 | RelativePath=".\llinstantmessage.h" | 626 | RelativePath=".\llinvite.h" |
627 | > | 627 | > |
628 | </File> | 628 | </File> |
629 | <File | 629 | <File |
630 | RelativePath=".\llinvite.h" | 630 | RelativePath=".\lliobuffer.h" |
631 | > | 631 | > |
632 | </File> | 632 | </File> |
633 | <File | 633 | <File |
634 | RelativePath=".\lliobuffer.h" | 634 | RelativePath=".\lliohttpserver.h" |
635 | > | 635 | > |
636 | </File> | 636 | </File> |
637 | <File | 637 | <File |
638 | RelativePath=".\lliohttpserver.h" | 638 | RelativePath=".\lliopipe.h" |
639 | > | 639 | > |
640 | </File> | 640 | </File> |
641 | <File | 641 | <File |
642 | RelativePath=".\lliopipe.h" | 642 | RelativePath=".\lliosocket.h" |
643 | > | 643 | > |
644 | </File> | 644 | </File> |
645 | <File | 645 | <File |
646 | RelativePath=".\lliosocket.h" | 646 | RelativePath=".\llioutil.h" |
647 | > | 647 | > |
648 | </File> | 648 | </File> |
649 | <File | 649 | <File |
650 | RelativePath=".\llioutil.h" | 650 | RelativePath=".\llloginflags.h" |
651 | > | 651 | > |
652 | </File> | 652 | </File> |
653 | <File | 653 | <File |
654 | RelativePath=".\llloginflags.h" | 654 | RelativePath=".\lllsltransmit.h" |
655 | > | 655 | > |
656 | </File> | 656 | </File> |
657 | <File | 657 | <File |
658 | RelativePath=".\lllsltransmit.h" | 658 | RelativePath=".\llmail.h" |
659 | > | 659 | > |
660 | </File> | 660 | </File> |
661 | <File | 661 | <File |
662 | RelativePath=".\llmail.h" | 662 | RelativePath=".\llmessagebuilder.h" |
663 | > | 663 | > |
664 | </File> | 664 | </File> |
665 | <File | 665 | <File |
666 | RelativePath=".\llmessagebuilder.h" | 666 | RelativePath=".\llmessageconfig.h" |
667 | > | 667 | > |
668 | </File> | 668 | </File> |
669 | <File | 669 | <File |
670 | RelativePath=".\llmessageconfig.h" | 670 | RelativePath=".\llmessagereader.h" |
671 | > | 671 | > |
672 | </File> | 672 | </File> |
673 | <File | 673 | <File |
674 | RelativePath=".\llmessagereader.h" | 674 | RelativePath=".\llmessagetemplate.h" |
675 | > | 675 | > |
676 | </File> | 676 | </File> |
677 | <File | 677 | <File |
678 | RelativePath=".\llmessagetemplate.h" | 678 | RelativePath=".\llmessagetemplateparser.h" |
679 | > | 679 | > |
680 | </File> | 680 | </File> |
681 | <File | 681 | <File |
682 | RelativePath=".\llmessagetemplateparser.h" | 682 | RelativePath=".\llmessagethrottle.h" |
683 | > | 683 | > |
684 | </File> | 684 | </File> |
685 | <File | 685 | <File |
686 | RelativePath=".\llmessagethrottle.h" | 686 | RelativePath=".\llmime.h" |
687 | > | 687 | > |
688 | </File> | 688 | </File> |
689 | <File | 689 | <File |
690 | RelativePath=".\llmime.h" | 690 | RelativePath=".\llnamevalue.h" |
691 | > | 691 | > |
692 | </File> | 692 | </File> |
693 | <File | 693 | <File |
694 | RelativePath=".\llnamevalue.h" | 694 | RelativePath=".\llnullcipher.h" |
695 | > | 695 | > |
696 | </File> | 696 | </File> |
697 | <File | 697 | <File |
698 | RelativePath=".\llnullcipher.h" | 698 | RelativePath=".\llpacketack.h" |
699 | > | 699 | > |
700 | </File> | 700 | </File> |
701 | <File | 701 | <File |
702 | RelativePath=".\llpacketack.h" | 702 | RelativePath=".\llpacketbuffer.h" |
703 | > | 703 | > |
704 | </File> | 704 | </File> |
705 | <File | 705 | <File |
706 | RelativePath=".\llpacketbuffer.h" | 706 | RelativePath=".\llpacketring.h" |
707 | > | 707 | > |
708 | </File> | 708 | </File> |
709 | <File | 709 | <File |
710 | RelativePath=".\llpacketring.h" | 710 | RelativePath=".\llpartdata.h" |
711 | > | 711 | > |
712 | </File> | 712 | </File> |
713 | <File | 713 | <File |
714 | RelativePath=".\llpartdata.h" | 714 | RelativePath=".\llpumpio.h" |
715 | > | 715 | > |
716 | </File> | 716 | </File> |
717 | <File | 717 | <File |
718 | RelativePath=".\llpumpio.h" | 718 | RelativePath=".\llqueryflags.h" |
719 | > | 719 | > |
720 | </File> | 720 | </File> |
721 | <File | 721 | <File |
722 | RelativePath=".\llqueryflags.h" | 722 | RelativePath=".\llregionflags.h" |
723 | > | 723 | > |
724 | </File> | 724 | </File> |
725 | <File | 725 | <File |
726 | RelativePath=".\llregionflags.h" | 726 | RelativePath=".\llregionhandle.h" |
727 | > | 727 | > |
728 | </File> | 728 | </File> |
729 | <File | 729 | <File |
730 | RelativePath=".\llregionhandle.h" | 730 | RelativePath=".\llsdappservices.h" |
731 | > | 731 | > |
732 | </File> | 732 | </File> |
733 | <File | 733 | <File |
734 | RelativePath=".\llsdappservices.h" | 734 | RelativePath=".\llsdhttpserver.h" |
735 | > | 735 | > |
736 | </File> | 736 | </File> |
737 | <File | 737 | <File |
738 | RelativePath=".\llsdhttpserver.h" | 738 | RelativePath=".\llsdmessagebuilder.h" |
739 | > | 739 | > |
740 | </File> | 740 | </File> |
741 | <File | 741 | <File |
742 | RelativePath=".\llsdmessagebuilder.h" | 742 | RelativePath=".\llsdmessagereader.h" |
743 | > | 743 | > |
744 | </File> | 744 | </File> |
745 | <File | 745 | <File |
746 | RelativePath=".\llsdmessagereader.h" | 746 | RelativePath=".\llsdrpcclient.h" |
747 | > | 747 | > |
748 | </File> | 748 | </File> |
749 | <File | 749 | <File |
750 | RelativePath=".\llsdrpcclient.h" | 750 | RelativePath=".\llsdrpcserver.h" |
751 | > | 751 | > |
752 | </File> | 752 | </File> |
753 | <File | 753 | <File |
754 | RelativePath=".\llsdrpcserver.h" | 754 | RelativePath=".\llservice.h" |
755 | > | 755 | > |
756 | </File> | 756 | </File> |
757 | <File | 757 | <File |
758 | RelativePath=".\llservice.h" | 758 | RelativePath=".\llservicebuilder.h" |
759 | > | 759 | > |
760 | </File> | 760 | </File> |
761 | <File | 761 | <File |
762 | RelativePath=".\llservicebuilder.h" | 762 | RelativePath=".\lltaskname.h" |
763 | > | 763 | > |
764 | </File> | 764 | </File> |
765 | <File | 765 | <File |
766 | RelativePath=".\lltaskname.h" | 766 | RelativePath=".\llteleportflags.h" |
767 | > | 767 | > |
768 | </File> | 768 | </File> |
769 | <File | 769 | <File |
770 | RelativePath=".\llteleportflags.h" | 770 | RelativePath=".\lltemplatemessagebuilder.h" |
771 | > | 771 | > |
772 | </File> | 772 | </File> |
773 | <File | 773 | <File |
774 | RelativePath=".\lltemplatemessagebuilder.h" | 774 | RelativePath=".\lltemplatemessagereader.h" |
775 | > | 775 | > |
776 | </File> | 776 | </File> |
777 | <File | 777 | <File |
778 | RelativePath=".\lltemplatemessagereader.h" | 778 | RelativePath=".\llthrottle.h" |
779 | > | 779 | > |
780 | </File> | 780 | </File> |
781 | <File | 781 | <File |
782 | RelativePath=".\llthrottle.h" | 782 | RelativePath=".\lltransfermanager.h" |
783 | > | 783 | > |
784 | </File> | 784 | </File> |
785 | <File | 785 | <File |
786 | RelativePath=".\lltransfermanager.h" | 786 | RelativePath=".\lltransfersourceasset.h" |
787 | > | 787 | > |
788 | </File> | 788 | </File> |
789 | <File | 789 | <File |
790 | RelativePath=".\lltransfersourceasset.h" | 790 | RelativePath=".\lltransfersourcefile.h" |
791 | > | 791 | > |
792 | </File> | 792 | </File> |
793 | <File | 793 | <File |
794 | RelativePath=".\lltransfersourcefile.h" | 794 | RelativePath=".\lltransfertargetfile.h" |
795 | > | 795 | > |
796 | </File> | 796 | </File> |
797 | <File | 797 | <File |
798 | RelativePath=".\lltransfertargetfile.h" | 798 | RelativePath=".\lltransfertargetvfile.h" |
799 | > | 799 | > |
800 | </File> | 800 | </File> |
801 | <File | 801 | <File |
802 | RelativePath=".\lltransfertargetvfile.h" | 802 | RelativePath=".\llurlrequest.h" |
803 | > | 803 | > |
804 | </File> | 804 | </File> |
805 | <File | 805 | <File |
806 | RelativePath=".\llurlrequest.h" | 806 | RelativePath=".\lluseroperation.h" |
807 | > | 807 | > |
808 | </File> | 808 | </File> |
809 | <File | 809 | <File |
810 | RelativePath=".\lluseroperation.h" | 810 | RelativePath=".\llvehicleparams.h" |
811 | > | 811 | > |
812 | </File> | 812 | </File> |
813 | <File | 813 | <File |
814 | RelativePath=".\llvehicleparams.h" | 814 | RelativePath=".\llxfer.h" |
815 | > | 815 | > |
816 | </File> | 816 | </File> |
817 | <File | 817 | <File |
818 | RelativePath=".\llxfer.h" | 818 | RelativePath=".\llxfer_file.h" |
819 | > | 819 | > |
820 | </File> | 820 | </File> |
821 | <File | 821 | <File |
822 | RelativePath=".\llxfer_file.h" | 822 | RelativePath=".\llxfer_mem.h" |
823 | > | 823 | > |
824 | </File> | 824 | </File> |
825 | <File | 825 | <File |
826 | RelativePath=".\llxfer_mem.h" | 826 | RelativePath=".\llxfer_vfile.h" |
827 | > | 827 | > |
828 | </File> | 828 | </File> |
829 | <File | 829 | <File |
830 | RelativePath=".\llxfer_vfile.h" | 830 | RelativePath=".\llxfermanager.h" |
831 | > | 831 | > |
832 | </File> | 832 | </File> |
833 | <File | 833 | <File |
834 | RelativePath=".\llxfermanager.h" | 834 | RelativePath=".\llxorcipher.h" |
835 | > | 835 | > |
836 | </File> | 836 | </File> |
837 | <File | 837 | <File |
838 | RelativePath=".\llxorcipher.h" | 838 | RelativePath=".\machine.h" |
839 | > | 839 | > |
840 | </File> | 840 | </File> |
841 | <File | 841 | <File |
842 | RelativePath=".\machine.h" | 842 | RelativePath=".\mean_collision_data.h" |
843 | > | 843 | > |
844 | </File> | 844 | </File> |
845 | <File | 845 | <File |
846 | RelativePath=".\mean_collision_data.h" | 846 | RelativePath=".\message.h" |
847 | > | 847 | > |
848 | </File> | 848 | </File> |
849 | <File | 849 | <File |
850 | RelativePath=".\message.h" | 850 | RelativePath=".\message_prehash.h" |
851 | > | 851 | > |
852 | </File> | 852 | </File> |
853 | <File | 853 | <File |
854 | RelativePath=".\message_prehash.h" | 854 | RelativePath=".\net.h" |
855 | > | 855 | > |
856 | </File> | 856 | </File> |
857 | <File | 857 | <File |
858 | RelativePath=".\net.h" | 858 | RelativePath=".\network.h" |
859 | > | 859 | > |
860 | </File> | 860 | </File> |
861 | <File | 861 | <File |
862 | RelativePath=".\network.h" | 862 | RelativePath=".\partsyspacket.h" |
863 | > | 863 | > |
864 | </File> | 864 | </File> |
865 | <File | 865 | <File |
866 | RelativePath=".\partsyspacket.h" | 866 | RelativePath=".\patch_code.h" |
867 | > | 867 | > |
868 | </File> | 868 | </File> |
869 | <File | 869 | <File |
870 | RelativePath=".\patch_code.h" | 870 | RelativePath=".\patch_dct.h" |
871 | > | 871 | > |
872 | </File> | 872 | </File> |
873 | <File | 873 | <File |
874 | RelativePath=".\patch_dct.h" | 874 | RelativePath=".\sound_ids.h" |
875 | > | 875 | > |
876 | </File> | 876 | </File> |
877 | <File | 877 | </Filter> |
878 | RelativePath=".\sound_ids.h" | 878 | <Filter |
879 | > | 879 | Name="Resource Files" |
880 | </File> | 880 | Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" |
881 | </Filter> | 881 | UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" |
882 | <Filter | 882 | > |
883 | Name="Resource Files" | 883 | </Filter> |
884 | Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" | 884 | <File |
885 | UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" | 885 | RelativePath="..\..\scripts\messages\message_template.msg" |
886 | > | 886 | > |
887 | </Filter> | 887 | <FileConfiguration |
888 | <File | 888 | Name="Debug|Win32" |
889 | RelativePath="..\..\scripts\messages\message_template.msg" | 889 | > |
890 | > | 890 | <Tool |
891 | <FileConfiguration | 891 | Name="VCCustomBuildTool" |
892 | Name="Debug|Win32" | 892 | Description="" |
893 | > | 893 | CommandLine="" |
894 | <Tool | 894 | Outputs="" |
895 | Name="VCCustomBuildTool" | 895 | /> |
896 | Description="" | 896 | </FileConfiguration> |
897 | CommandLine="" | 897 | <FileConfiguration |
898 | Outputs="" | 898 | Name="Release|Win32" |
899 | /> | 899 | > |
900 | </FileConfiguration> | 900 | <Tool |
901 | <FileConfiguration | 901 | Name="VCCustomBuildTool" |
902 | Name="Release|Win32" | 902 | Description="" |
903 | > | 903 | CommandLine="" |
904 | <Tool | 904 | Outputs="" |
905 | Name="VCCustomBuildTool" | 905 | /> |
906 | Description="" | 906 | </FileConfiguration> |
907 | CommandLine="" | 907 | <FileConfiguration |
908 | Outputs="" | 908 | Name="ReleaseNoOpt|Win32" |
909 | /> | 909 | > |
910 | </FileConfiguration> | 910 | <Tool |
911 | <FileConfiguration | 911 | Name="VCCustomBuildTool" |
912 | Name="ReleaseNoOpt|Win32" | 912 | Description="" |
913 | > | 913 | CommandLine="" |
914 | <Tool | 914 | Outputs="" |
915 | Name="VCCustomBuildTool" | 915 | /> |
916 | Description="" | 916 | </FileConfiguration> |
917 | CommandLine="" | 917 | </File> |
918 | Outputs="" | 918 | </Files> |
919 | /> | 919 | <Globals> |
920 | </FileConfiguration> | 920 | </Globals> |
921 | </File> | 921 | </VisualStudioProject> |
922 | </Files> | ||
923 | <Globals> | ||
924 | </Globals> | ||
925 | </VisualStudioProject> | ||
diff --git a/linden/indra/llmessage/llmessage_vc9.vcproj b/linden/indra/llmessage/llmessage_vc9.vcproj index f197feb..e9f4889 100644 --- a/linden/indra/llmessage/llmessage_vc9.vcproj +++ b/linden/indra/llmessage/llmessage_vc9.vcproj | |||
@@ -1,926 +1,922 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | 1 | <?xml version="1.0" encoding="Windows-1252"?> |
2 | <VisualStudioProject | 2 | <VisualStudioProject |
3 | ProjectType="Visual C++" | 3 | ProjectType="Visual C++" |
4 | Version="9.00" | 4 | Version="9.00" |
5 | Name="llmessage" | 5 | Name="llmessage" |
6 | ProjectGUID="{E5D94794-5671-4BD6-A16D-26EC18F3DB34}" | 6 | ProjectGUID="{E5D94794-5671-4BD6-A16D-26EC18F3DB34}" |
7 | RootNamespace="llmessage" | 7 | RootNamespace="llmessage" |
8 | Keyword="Win32Proj" | 8 | Keyword="Win32Proj" |
9 | TargetFrameworkVersion="131072" | 9 | TargetFrameworkVersion="131072" |
10 | > | 10 | > |
11 | <Platforms> | 11 | <Platforms> |
12 | <Platform | 12 | <Platform |
13 | Name="Win32" | 13 | Name="Win32" |
14 | /> | 14 | /> |
15 | </Platforms> | 15 | </Platforms> |
16 | <ToolFiles> | 16 | <ToolFiles> |
17 | </ToolFiles> | 17 | </ToolFiles> |
18 | <Configurations> | 18 | <Configurations> |
19 | <Configuration | 19 | <Configuration |
20 | Name="Debug|Win32" | 20 | Name="Debug|Win32" |
21 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | 21 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" |
22 | IntermediateDirectory="Debug" | 22 | IntermediateDirectory="Debug" |
23 | ConfigurationType="4" | 23 | ConfigurationType="4" |
24 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 24 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
25 | CharacterSet="1" | 25 | CharacterSet="1" |
26 | > | 26 | > |
27 | <Tool | 27 | <Tool |
28 | Name="VCPreBuildEventTool" | 28 | Name="VCPreBuildEventTool" |
29 | /> | 29 | /> |
30 | <Tool | 30 | <Tool |
31 | Name="VCCustomBuildTool" | 31 | Name="VCCustomBuildTool" |
32 | /> | 32 | /> |
33 | <Tool | 33 | <Tool |
34 | Name="VCXMLDataGeneratorTool" | 34 | Name="VCXMLDataGeneratorTool" |
35 | /> | 35 | /> |
36 | <Tool | 36 | <Tool |
37 | Name="VCWebServiceProxyGeneratorTool" | 37 | Name="VCWebServiceProxyGeneratorTool" |
38 | /> | 38 | /> |
39 | <Tool | 39 | <Tool |
40 | Name="VCMIDLTool" | 40 | Name="VCMIDLTool" |
41 | /> | 41 | /> |
42 | <Tool | 42 | <Tool |
43 | Name="VCCLCompilerTool" | 43 | Name="VCCLCompilerTool" |
44 | Optimization="0" | 44 | Optimization="0" |
45 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\..\libraries\i686-win32\include;..\..\libraries\include\" | 45 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\..\libraries\i686-win32\include;..\..\libraries\include\" |
46 | PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG" | 46 | PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG" |
47 | MinimalRebuild="true" | 47 | MinimalRebuild="true" |
48 | BasicRuntimeChecks="3" | 48 | BasicRuntimeChecks="3" |
49 | RuntimeLibrary="1" | 49 | RuntimeLibrary="1" |
50 | StructMemberAlignment="4" | 50 | StructMemberAlignment="4" |
51 | TreatWChar_tAsBuiltInType="false" | 51 | TreatWChar_tAsBuiltInType="false" |
52 | ForceConformanceInForLoopScope="true" | 52 | ForceConformanceInForLoopScope="true" |
53 | UsePrecompiledHeader="0" | 53 | UsePrecompiledHeader="0" |
54 | WarningLevel="3" | 54 | WarningLevel="3" |
55 | WarnAsError="true" | 55 | WarnAsError="true" |
56 | Detect64BitPortabilityProblems="false" | 56 | Detect64BitPortabilityProblems="false" |
57 | DebugInformationFormat="4" | 57 | DebugInformationFormat="4" |
58 | /> | 58 | /> |
59 | <Tool | 59 | <Tool |
60 | Name="VCManagedResourceCompilerTool" | 60 | Name="VCManagedResourceCompilerTool" |
61 | /> | 61 | /> |
62 | <Tool | 62 | <Tool |
63 | Name="VCResourceCompilerTool" | 63 | Name="VCResourceCompilerTool" |
64 | /> | 64 | /> |
65 | <Tool | 65 | <Tool |
66 | Name="VCPreLinkEventTool" | 66 | Name="VCPreLinkEventTool" |
67 | /> | 67 | /> |
68 | <Tool | 68 | <Tool |
69 | Name="VCLibrarianTool" | 69 | Name="VCLibrarianTool" |
70 | OutputFile="$(OutDir)/llmessage.lib" | 70 | OutputFile="$(OutDir)/llmessage.lib" |
71 | /> | 71 | /> |
72 | <Tool | 72 | <Tool |
73 | Name="VCALinkTool" | 73 | Name="VCALinkTool" |
74 | /> | 74 | /> |
75 | <Tool | 75 | <Tool |
76 | Name="VCXDCMakeTool" | 76 | Name="VCXDCMakeTool" |
77 | /> | 77 | /> |
78 | <Tool | 78 | <Tool |
79 | Name="VCBscMakeTool" | 79 | Name="VCBscMakeTool" |
80 | /> | 80 | /> |
81 | <Tool | 81 | <Tool |
82 | Name="VCFxCopTool" | 82 | Name="VCFxCopTool" |
83 | /> | 83 | /> |
84 | <Tool | 84 | <Tool |
85 | Name="VCPostBuildEventTool" | 85 | Name="VCPostBuildEventTool" |
86 | /> | 86 | /> |
87 | </Configuration> | 87 | </Configuration> |
88 | <Configuration | 88 | <Configuration |
89 | Name="Release|Win32" | 89 | Name="Release|Win32" |
90 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | 90 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" |
91 | IntermediateDirectory="Release" | 91 | IntermediateDirectory="Release" |
92 | ConfigurationType="4" | 92 | ConfigurationType="4" |
93 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 93 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
94 | CharacterSet="1" | 94 | CharacterSet="1" |
95 | > | 95 | > |
96 | <Tool | 96 | <Tool |
97 | Name="VCPreBuildEventTool" | 97 | Name="VCPreBuildEventTool" |
98 | /> | 98 | /> |
99 | <Tool | 99 | <Tool |
100 | Name="VCCustomBuildTool" | 100 | Name="VCCustomBuildTool" |
101 | /> | 101 | /> |
102 | <Tool | 102 | <Tool |
103 | Name="VCXMLDataGeneratorTool" | 103 | Name="VCXMLDataGeneratorTool" |
104 | /> | 104 | /> |
105 | <Tool | 105 | <Tool |
106 | Name="VCWebServiceProxyGeneratorTool" | 106 | Name="VCWebServiceProxyGeneratorTool" |
107 | /> | 107 | /> |
108 | <Tool | 108 | <Tool |
109 | Name="VCMIDLTool" | 109 | Name="VCMIDLTool" |
110 | /> | 110 | /> |
111 | <Tool | 111 | <Tool |
112 | Name="VCCLCompilerTool" | 112 | Name="VCCLCompilerTool" |
113 | AdditionalOptions="/Oy-" | 113 | AdditionalOptions="/Oy-" |
114 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\..\libraries\i686-win32\include;..\..\libraries\include\" | 114 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\..\libraries\i686-win32\include;..\..\libraries\include\" |
115 | PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" | 115 | PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" |
116 | RuntimeLibrary="0" | 116 | RuntimeLibrary="0" |
117 | StructMemberAlignment="0" | 117 | StructMemberAlignment="0" |
118 | TreatWChar_tAsBuiltInType="false" | 118 | TreatWChar_tAsBuiltInType="false" |
119 | ForceConformanceInForLoopScope="true" | 119 | ForceConformanceInForLoopScope="true" |
120 | UsePrecompiledHeader="0" | 120 | UsePrecompiledHeader="0" |
121 | WarningLevel="3" | 121 | WarningLevel="3" |
122 | WarnAsError="true" | 122 | WarnAsError="true" |
123 | Detect64BitPortabilityProblems="false" | 123 | Detect64BitPortabilityProblems="false" |
124 | DebugInformationFormat="3" | 124 | DebugInformationFormat="3" |
125 | /> | 125 | /> |
126 | <Tool | 126 | <Tool |
127 | Name="VCManagedResourceCompilerTool" | 127 | Name="VCManagedResourceCompilerTool" |
128 | /> | 128 | /> |
129 | <Tool | 129 | <Tool |
130 | Name="VCResourceCompilerTool" | 130 | Name="VCResourceCompilerTool" |
131 | /> | 131 | /> |
132 | <Tool | 132 | <Tool |
133 | Name="VCPreLinkEventTool" | 133 | Name="VCPreLinkEventTool" |
134 | /> | 134 | /> |
135 | <Tool | 135 | <Tool |
136 | Name="VCLibrarianTool" | 136 | Name="VCLibrarianTool" |
137 | OutputFile="$(OutDir)/llmessage.lib" | 137 | OutputFile="$(OutDir)/llmessage.lib" |
138 | /> | 138 | /> |
139 | <Tool | 139 | <Tool |
140 | Name="VCALinkTool" | 140 | Name="VCALinkTool" |
141 | /> | 141 | /> |
142 | <Tool | 142 | <Tool |
143 | Name="VCXDCMakeTool" | 143 | Name="VCXDCMakeTool" |
144 | /> | 144 | /> |
145 | <Tool | 145 | <Tool |
146 | Name="VCBscMakeTool" | 146 | Name="VCBscMakeTool" |
147 | /> | 147 | /> |
148 | <Tool | 148 | <Tool |
149 | Name="VCFxCopTool" | 149 | Name="VCFxCopTool" |
150 | /> | 150 | /> |
151 | <Tool | 151 | <Tool |
152 | Name="VCPostBuildEventTool" | 152 | Name="VCPostBuildEventTool" |
153 | /> | 153 | /> |
154 | </Configuration> | 154 | </Configuration> |
155 | <Configuration | 155 | <Configuration |
156 | Name="ReleaseNoOpt|Win32" | 156 | Name="ReleaseNoOpt|Win32" |
157 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" | 157 | OutputDirectory="../lib_$(ConfigurationName)/i686-win32" |
158 | IntermediateDirectory="$(ConfigurationName)" | 158 | IntermediateDirectory="$(ConfigurationName)" |
159 | ConfigurationType="4" | 159 | ConfigurationType="4" |
160 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 160 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
161 | CharacterSet="1" | 161 | CharacterSet="1" |
162 | > | 162 | > |
163 | <Tool | 163 | <Tool |
164 | Name="VCPreBuildEventTool" | 164 | Name="VCPreBuildEventTool" |
165 | /> | 165 | /> |
166 | <Tool | 166 | <Tool |
167 | Name="VCCustomBuildTool" | 167 | Name="VCCustomBuildTool" |
168 | /> | 168 | /> |
169 | <Tool | 169 | <Tool |
170 | Name="VCXMLDataGeneratorTool" | 170 | Name="VCXMLDataGeneratorTool" |
171 | /> | 171 | /> |
172 | <Tool | 172 | <Tool |
173 | Name="VCWebServiceProxyGeneratorTool" | 173 | Name="VCWebServiceProxyGeneratorTool" |
174 | /> | 174 | /> |
175 | <Tool | 175 | <Tool |
176 | Name="VCMIDLTool" | 176 | Name="VCMIDLTool" |
177 | /> | 177 | /> |
178 | <Tool | 178 | <Tool |
179 | Name="VCCLCompilerTool" | 179 | Name="VCCLCompilerTool" |
180 | AdditionalOptions="/Oy-" | 180 | AdditionalOptions="/Oy-" |
181 | Optimization="0" | 181 | Optimization="0" |
182 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\..\libraries\i686-win32\include;..\..\libraries\include\" | 182 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\..\libraries\i686-win32\include;..\..\libraries\include\" |
183 | PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" | 183 | PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" |
184 | RuntimeLibrary="0" | 184 | RuntimeLibrary="0" |
185 | StructMemberAlignment="0" | 185 | StructMemberAlignment="0" |
186 | TreatWChar_tAsBuiltInType="false" | 186 | TreatWChar_tAsBuiltInType="false" |
187 | ForceConformanceInForLoopScope="true" | 187 | ForceConformanceInForLoopScope="true" |
188 | UsePrecompiledHeader="0" | 188 | UsePrecompiledHeader="0" |
189 | WarningLevel="3" | 189 | WarningLevel="3" |
190 | WarnAsError="true" | 190 | WarnAsError="true" |
191 | Detect64BitPortabilityProblems="false" | 191 | Detect64BitPortabilityProblems="false" |
192 | DebugInformationFormat="3" | 192 | DebugInformationFormat="3" |
193 | /> | 193 | /> |
194 | <Tool | 194 | <Tool |
195 | Name="VCManagedResourceCompilerTool" | 195 | Name="VCManagedResourceCompilerTool" |
196 | /> | 196 | /> |
197 | <Tool | 197 | <Tool |
198 | Name="VCResourceCompilerTool" | 198 | Name="VCResourceCompilerTool" |
199 | /> | 199 | /> |
200 | <Tool | 200 | <Tool |
201 | Name="VCPreLinkEventTool" | 201 | Name="VCPreLinkEventTool" |
202 | /> | 202 | /> |
203 | <Tool | 203 | <Tool |
204 | Name="VCLibrarianTool" | 204 | Name="VCLibrarianTool" |
205 | OutputFile="$(OutDir)/llmessage.lib" | 205 | OutputFile="$(OutDir)/llmessage.lib" |
206 | /> | 206 | /> |
207 | <Tool | 207 | <Tool |
208 | Name="VCALinkTool" | 208 | Name="VCALinkTool" |
209 | /> | 209 | /> |
210 | <Tool | 210 | <Tool |
211 | Name="VCXDCMakeTool" | 211 | Name="VCXDCMakeTool" |
212 | /> | 212 | /> |
213 | <Tool | 213 | <Tool |
214 | Name="VCBscMakeTool" | 214 | Name="VCBscMakeTool" |
215 | /> | 215 | /> |
216 | <Tool | 216 | <Tool |
217 | Name="VCFxCopTool" | 217 | Name="VCFxCopTool" |
218 | /> | 218 | /> |
219 | <Tool | 219 | <Tool |
220 | Name="VCPostBuildEventTool" | 220 | Name="VCPostBuildEventTool" |
221 | /> | 221 | /> |
222 | </Configuration> | 222 | </Configuration> |
223 | </Configurations> | 223 | </Configurations> |
224 | <References> | 224 | <References> |
225 | </References> | 225 | </References> |
226 | <Files> | 226 | <Files> |
227 | <Filter | 227 | <Filter |
228 | Name="Source Files" | 228 | Name="Source Files" |
229 | Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" | 229 | Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" |
230 | UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" | 230 | UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" |
231 | > | 231 | > |
232 | <File | 232 | <File |
233 | RelativePath=".\llassetstorage.cpp" | 233 | RelativePath=".\llassetstorage.cpp" |
234 | > | 234 | > |
235 | </File> | 235 | </File> |
236 | <File | 236 | <File |
237 | RelativePath=".\llblowfishcipher.cpp" | 237 | RelativePath=".\llblowfishcipher.cpp" |
238 | > | 238 | > |
239 | </File> | 239 | </File> |
240 | <File | 240 | <File |
241 | RelativePath=".\llbuffer.cpp" | 241 | RelativePath=".\llbuffer.cpp" |
242 | > | 242 | > |
243 | </File> | 243 | </File> |
244 | <File | 244 | <File |
245 | RelativePath=".\llbufferstream.cpp" | 245 | RelativePath=".\llbufferstream.cpp" |
246 | > | 246 | > |
247 | </File> | 247 | </File> |
248 | <File | 248 | <File |
249 | RelativePath=".\llcachename.cpp" | 249 | RelativePath=".\llcachename.cpp" |
250 | > | 250 | > |
251 | </File> | 251 | </File> |
252 | <File | 252 | <File |
253 | RelativePath=".\llchainio.cpp" | 253 | RelativePath=".\llchainio.cpp" |
254 | > | 254 | > |
255 | </File> | 255 | </File> |
256 | <File | 256 | <File |
257 | RelativePath=".\llcircuit.cpp" | 257 | RelativePath=".\llcircuit.cpp" |
258 | > | 258 | > |
259 | </File> | 259 | </File> |
260 | <File | 260 | <File |
261 | RelativePath=".\llclassifiedflags.cpp" | 261 | RelativePath=".\llclassifiedflags.cpp" |
262 | > | 262 | > |
263 | </File> | 263 | </File> |
264 | <File | 264 | <File |
265 | RelativePath=".\llcurl.cpp" | 265 | RelativePath=".\llcurl.cpp" |
266 | > | 266 | > |
267 | </File> | 267 | </File> |
268 | <File | 268 | <File |
269 | RelativePath=".\lldatapacker.cpp" | 269 | RelativePath=".\lldatapacker.cpp" |
270 | > | 270 | > |
271 | </File> | 271 | </File> |
272 | <File | 272 | <File |
273 | RelativePath=".\lldispatcher.cpp" | 273 | RelativePath=".\lldispatcher.cpp" |
274 | > | 274 | > |
275 | </File> | 275 | </File> |
276 | <File | 276 | <File |
277 | RelativePath=".\llfiltersd2xmlrpc.cpp" | 277 | RelativePath=".\llfiltersd2xmlrpc.cpp" |
278 | > | 278 | > |
279 | </File> | 279 | </File> |
280 | <File | 280 | <File |
281 | RelativePath=".\llhost.cpp" | 281 | RelativePath=".\llhost.cpp" |
282 | > | 282 | > |
283 | </File> | 283 | </File> |
284 | <File | 284 | <File |
285 | RelativePath=".\llhttpassetstorage.cpp" | 285 | RelativePath=".\llhttpassetstorage.cpp" |
286 | > | 286 | > |
287 | </File> | 287 | </File> |
288 | <File | 288 | <File |
289 | RelativePath=".\llhttpassetstorage.h" | 289 | RelativePath=".\llhttpassetstorage.h" |
290 | > | 290 | > |
291 | </File> | 291 | </File> |
292 | <File | 292 | <File |
293 | RelativePath=".\llhttpclient.cpp" | 293 | RelativePath=".\llhttpclient.cpp" |
294 | > | 294 | > |
295 | </File> | 295 | </File> |
296 | <File | 296 | <File |
297 | RelativePath=".\llhttpnode.cpp" | 297 | RelativePath=".\llhttpnode.cpp" |
298 | > | 298 | > |
299 | </File> | 299 | </File> |
300 | <File | 300 | <File |
301 | RelativePath=".\llhttpsender.cpp" | 301 | RelativePath=".\llhttpsender.cpp" |
302 | > | 302 | > |
303 | </File> | 303 | </File> |
304 | <File | 304 | <File |
305 | RelativePath=".\llinstantmessage.cpp" | 305 | RelativePath=".\llinstantmessage.cpp" |
306 | > | 306 | > |
307 | </File> | 307 | </File> |
308 | <File | 308 | <File |
309 | RelativePath=".\lliobuffer.cpp" | 309 | RelativePath=".\lliobuffer.cpp" |
310 | > | 310 | > |
311 | </File> | 311 | </File> |
312 | <File | 312 | <File |
313 | RelativePath=".\lliohttpserver.cpp" | 313 | RelativePath=".\lliohttpserver.cpp" |
314 | > | 314 | > |
315 | </File> | 315 | </File> |
316 | <File | 316 | <File |
317 | RelativePath=".\lliopipe.cpp" | 317 | RelativePath=".\lliopipe.cpp" |
318 | > | 318 | > |
319 | </File> | 319 | </File> |
320 | <File | 320 | <File |
321 | RelativePath=".\lliosocket.cpp" | 321 | RelativePath=".\lliosocket.cpp" |
322 | > | 322 | > |
323 | </File> | 323 | </File> |
324 | <File | 324 | <File |
325 | RelativePath=".\llioutil.cpp" | 325 | RelativePath=".\llioutil.cpp" |
326 | > | 326 | > |
327 | </File> | 327 | </File> |
328 | <File | 328 | <File |
329 | RelativePath=".\llmail.cpp" | 329 | RelativePath=".\llmail.cpp" |
330 | > | 330 | > |
331 | </File> | 331 | </File> |
332 | <File | 332 | <File |
333 | RelativePath=".\llmessagebuilder.cpp" | 333 | RelativePath=".\llmessagebuilder.cpp" |
334 | > | 334 | > |
335 | </File> | 335 | </File> |
336 | <File | 336 | <File |
337 | RelativePath=".\llmessageconfig.cpp" | 337 | RelativePath=".\llmessageconfig.cpp" |
338 | > | 338 | > |
339 | </File> | 339 | </File> |
340 | <File | 340 | <File |
341 | RelativePath=".\llmessagereader.cpp" | 341 | RelativePath=".\llmessagereader.cpp" |
342 | > | 342 | > |
343 | </File> | 343 | </File> |
344 | <File | 344 | <File |
345 | RelativePath=".\llmessagetemplate.cpp" | 345 | RelativePath=".\llmessagetemplate.cpp" |
346 | > | 346 | > |
347 | </File> | 347 | </File> |
348 | <File | 348 | <File |
349 | RelativePath=".\llmessagetemplateparser.cpp" | 349 | RelativePath=".\llmessagetemplateparser.cpp" |
350 | > | 350 | > |
351 | </File> | 351 | </File> |
352 | <File | 352 | <File |
353 | RelativePath=".\llmessagethrottle.cpp" | 353 | RelativePath=".\llmessagethrottle.cpp" |
354 | > | 354 | > |
355 | </File> | 355 | </File> |
356 | <File | 356 | <File |
357 | RelativePath=".\llmime.cpp" | 357 | RelativePath=".\llmime.cpp" |
358 | > | 358 | > |
359 | </File> | 359 | </File> |
360 | <File | 360 | <File |
361 | RelativePath=".\llnamevalue.cpp" | 361 | RelativePath=".\llnamevalue.cpp" |
362 | > | 362 | > |
363 | </File> | 363 | </File> |
364 | <File | 364 | <File |
365 | RelativePath=".\llnullcipher.cpp" | 365 | RelativePath=".\llnullcipher.cpp" |
366 | > | 366 | > |
367 | </File> | 367 | </File> |
368 | <File | 368 | <File |
369 | RelativePath=".\llpacketack.cpp" | 369 | RelativePath=".\llpacketack.cpp" |
370 | > | 370 | > |
371 | </File> | 371 | </File> |
372 | <File | 372 | <File |
373 | RelativePath=".\llpacketbuffer.cpp" | 373 | RelativePath=".\llpacketbuffer.cpp" |
374 | > | 374 | > |
375 | </File> | 375 | </File> |
376 | <File | 376 | <File |
377 | RelativePath=".\llpacketring.cpp" | 377 | RelativePath=".\llpacketring.cpp" |
378 | > | 378 | > |
379 | </File> | 379 | </File> |
380 | <File | 380 | <File |
381 | RelativePath=".\llpartdata.cpp" | 381 | RelativePath=".\llpartdata.cpp" |
382 | > | 382 | > |
383 | </File> | 383 | </File> |
384 | <File | 384 | <File |
385 | RelativePath=".\llpumpio.cpp" | 385 | RelativePath=".\llpumpio.cpp" |
386 | > | 386 | > |
387 | </File> | 387 | </File> |
388 | <File | 388 | <File |
389 | RelativePath=".\llsdappservices.cpp" | 389 | RelativePath=".\llsdappservices.cpp" |
390 | > | 390 | > |
391 | </File> | 391 | </File> |
392 | <File | 392 | <File |
393 | RelativePath=".\llsdhttpserver.cpp" | 393 | RelativePath=".\llsdhttpserver.cpp" |
394 | > | 394 | > |
395 | </File> | 395 | </File> |
396 | <File | 396 | <File |
397 | RelativePath=".\llsdmessagebuilder.cpp" | 397 | RelativePath=".\llsdmessagebuilder.cpp" |
398 | > | 398 | > |
399 | </File> | 399 | </File> |
400 | <File | 400 | <File |
401 | RelativePath=".\llsdmessagereader.cpp" | 401 | RelativePath=".\llsdmessagereader.cpp" |
402 | > | 402 | > |
403 | </File> | 403 | </File> |
404 | <File | 404 | <File |
405 | RelativePath=".\llsdrpcclient.cpp" | 405 | RelativePath=".\llsdrpcclient.cpp" |
406 | > | 406 | > |
407 | </File> | 407 | </File> |
408 | <File | 408 | <File |
409 | RelativePath=".\llsdrpcserver.cpp" | 409 | RelativePath=".\llsdrpcserver.cpp" |
410 | > | 410 | > |
411 | </File> | 411 | </File> |
412 | <File | 412 | <File |
413 | RelativePath=".\llservice.cpp" | 413 | RelativePath=".\llservice.cpp" |
414 | > | 414 | > |
415 | </File> | 415 | </File> |
416 | <File | 416 | <File |
417 | RelativePath=".\llservicebuilder.cpp" | 417 | RelativePath=".\llservicebuilder.cpp" |
418 | > | 418 | > |
419 | </File> | 419 | </File> |
420 | <File | 420 | <File |
421 | RelativePath=".\lltemplatemessagebuilder.cpp" | 421 | RelativePath=".\lltemplatemessagebuilder.cpp" |
422 | > | 422 | > |
423 | </File> | 423 | </File> |
424 | <File | 424 | <File |
425 | RelativePath=".\lltemplatemessagereader.cpp" | 425 | RelativePath=".\lltemplatemessagereader.cpp" |
426 | > | 426 | > |
427 | </File> | 427 | </File> |
428 | <File | 428 | <File |
429 | RelativePath=".\llthrottle.cpp" | 429 | RelativePath=".\llthrottle.cpp" |
430 | > | 430 | > |
431 | </File> | 431 | </File> |
432 | <File | 432 | <File |
433 | RelativePath=".\lltransfermanager.cpp" | 433 | RelativePath=".\lltransfermanager.cpp" |
434 | > | 434 | > |
435 | </File> | 435 | </File> |
436 | <File | 436 | <File |
437 | RelativePath=".\lltransfersourceasset.cpp" | 437 | RelativePath=".\lltransfersourceasset.cpp" |
438 | > | 438 | > |
439 | </File> | 439 | </File> |
440 | <File | 440 | <File |
441 | RelativePath=".\lltransfersourcefile.cpp" | 441 | RelativePath=".\lltransfersourcefile.cpp" |
442 | > | 442 | > |
443 | </File> | 443 | </File> |
444 | <File | 444 | <File |
445 | RelativePath=".\lltransfertargetfile.cpp" | 445 | RelativePath=".\lltransfertargetfile.cpp" |
446 | > | 446 | > |
447 | </File> | 447 | </File> |
448 | <File | 448 | <File |
449 | RelativePath=".\lltransfertargetvfile.cpp" | 449 | RelativePath=".\lltransfertargetvfile.cpp" |
450 | > | 450 | > |
451 | </File> | 451 | </File> |
452 | <File | 452 | <File |
453 | RelativePath=".\llurlrequest.cpp" | 453 | RelativePath=".\llurlrequest.cpp" |
454 | > | 454 | > |
455 | </File> | 455 | </File> |
456 | <File | 456 | <File |
457 | RelativePath=".\lluseroperation.cpp" | 457 | RelativePath=".\lluseroperation.cpp" |
458 | > | 458 | > |
459 | </File> | 459 | </File> |
460 | <File | 460 | <File |
461 | RelativePath=".\llxfer.cpp" | 461 | RelativePath=".\llxfer.cpp" |
462 | > | 462 | > |
463 | </File> | 463 | </File> |
464 | <File | 464 | <File |
465 | RelativePath=".\llxfer_file.cpp" | 465 | RelativePath=".\llxfer_file.cpp" |
466 | > | 466 | > |
467 | </File> | 467 | </File> |
468 | <File | 468 | <File |
469 | RelativePath=".\llxfer_mem.cpp" | 469 | RelativePath=".\llxfer_mem.cpp" |
470 | > | 470 | > |
471 | </File> | 471 | </File> |
472 | <File | 472 | <File |
473 | RelativePath=".\llxfer_vfile.cpp" | 473 | RelativePath=".\llxfer_vfile.cpp" |
474 | > | 474 | > |
475 | </File> | 475 | </File> |
476 | <File | 476 | <File |
477 | RelativePath=".\llxfermanager.cpp" | 477 | RelativePath=".\llxfermanager.cpp" |
478 | > | 478 | > |
479 | </File> | 479 | </File> |
480 | <File | 480 | <File |
481 | RelativePath=".\llxorcipher.cpp" | 481 | RelativePath=".\llxorcipher.cpp" |
482 | > | 482 | > |
483 | </File> | 483 | </File> |
484 | <File | 484 | <File |
485 | RelativePath=".\message.cpp" | 485 | RelativePath=".\message.cpp" |
486 | > | 486 | > |
487 | </File> | 487 | </File> |
488 | <File | 488 | <File |
489 | RelativePath=".\message_prehash.cpp" | 489 | RelativePath=".\message_prehash.cpp" |
490 | > | 490 | > |
491 | </File> | 491 | </File> |
492 | <File | 492 | <File |
493 | RelativePath=".\message_string_table.cpp" | 493 | RelativePath=".\message_string_table.cpp" |
494 | > | 494 | > |
495 | </File> | 495 | </File> |
496 | <File | 496 | <File |
497 | RelativePath=".\net.cpp" | 497 | RelativePath=".\net.cpp" |
498 | > | 498 | > |
499 | </File> | 499 | </File> |
500 | <File | 500 | <File |
501 | RelativePath=".\network.cpp" | 501 | RelativePath=".\network.cpp" |
502 | > | 502 | > |
503 | </File> | 503 | </File> |
504 | <File | 504 | <File |
505 | RelativePath=".\partsyspacket.cpp" | 505 | RelativePath=".\partsyspacket.cpp" |
506 | > | 506 | > |
507 | </File> | 507 | </File> |
508 | <File | 508 | <File |
509 | RelativePath=".\patch_code.cpp" | 509 | RelativePath=".\patch_code.cpp" |
510 | > | 510 | > |
511 | </File> | 511 | </File> |
512 | <File | 512 | <File |
513 | RelativePath=".\patch_dct.cpp" | 513 | RelativePath=".\patch_dct.cpp" |
514 | > | 514 | > |
515 | </File> | 515 | </File> |
516 | <File | 516 | <File |
517 | RelativePath=".\patch_idct.cpp" | 517 | RelativePath=".\patch_idct.cpp" |
518 | > | 518 | > |
519 | </File> | 519 | </File> |
520 | </Filter> | 520 | </Filter> |
521 | <Filter | 521 | <Filter |
522 | Name="Header Files" | 522 | Name="Header Files" |
523 | Filter="h;hpp;hxx;hm;inl;inc;xsd" | 523 | Filter="h;hpp;hxx;hm;inl;inc;xsd" |
524 | UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" | 524 | UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" |
525 | > | 525 | > |
526 | <File | 526 | <File |
527 | RelativePath=".\camera.h" | 527 | RelativePath=".\camera.h" |
528 | > | 528 | > |
529 | </File> | 529 | </File> |
530 | <File | 530 | <File |
531 | RelativePath=".\coordframe.h" | 531 | RelativePath=".\coordframe.h" |
532 | > | 532 | > |
533 | </File> | 533 | </File> |
534 | <File | 534 | <File |
535 | RelativePath=".\llassetstorage.h" | 535 | RelativePath=".\llassetstorage.h" |
536 | > | 536 | > |
537 | </File> | 537 | </File> |
538 | <File | 538 | <File |
539 | RelativePath=".\llblowfishcipher.h" | 539 | RelativePath=".\llblowfishcipher.h" |
540 | > | 540 | > |
541 | </File> | 541 | </File> |
542 | <File | 542 | <File |
543 | RelativePath=".\llbuffer.h" | 543 | RelativePath=".\llbuffer.h" |
544 | > | 544 | > |
545 | </File> | 545 | </File> |
546 | <File | 546 | <File |
547 | RelativePath=".\llbufferstream.h" | 547 | RelativePath=".\llbufferstream.h" |
548 | > | 548 | > |
549 | </File> | 549 | </File> |
550 | <File | 550 | <File |
551 | RelativePath=".\llcachename.h" | 551 | RelativePath=".\llcachename.h" |
552 | > | 552 | > |
553 | </File> | 553 | </File> |
554 | <File | 554 | <File |
555 | RelativePath=".\llcallbacklisth.h" | 555 | RelativePath=".\llcamera.h" |
556 | > | 556 | > |
557 | </File> | 557 | </File> |
558 | <File | 558 | <File |
559 | RelativePath=".\llcamera.h" | 559 | RelativePath=".\llchainio.h" |
560 | > | 560 | > |
561 | </File> | 561 | </File> |
562 | <File | 562 | <File |
563 | RelativePath=".\llchainio.h" | 563 | RelativePath=".\llcipher.h" |
564 | > | 564 | > |
565 | </File> | 565 | </File> |
566 | <File | 566 | <File |
567 | RelativePath=".\llcipher.h" | 567 | RelativePath=".\llcircuit.h" |
568 | > | 568 | > |
569 | </File> | 569 | </File> |
570 | <File | 570 | <File |
571 | RelativePath=".\llcircuit.h" | 571 | RelativePath=".\llclassifiedflags.h" |
572 | > | 572 | > |
573 | </File> | 573 | </File> |
574 | <File | 574 | <File |
575 | RelativePath=".\llclassifiedflags.h" | 575 | RelativePath=".\llcoordframe.h" |
576 | > | 576 | > |
577 | </File> | 577 | </File> |
578 | <File | 578 | <File |
579 | RelativePath=".\llcoordframe.h" | 579 | RelativePath=".\llcurl.h" |
580 | > | 580 | > |
581 | </File> | 581 | </File> |
582 | <File | 582 | <File |
583 | RelativePath=".\llcurl.h" | 583 | RelativePath=".\lldatapacker.h" |
584 | > | 584 | > |
585 | </File> | 585 | </File> |
586 | <File | 586 | <File |
587 | RelativePath=".\lldatapacker.h" | 587 | RelativePath=".\lldbstrings.h" |
588 | > | 588 | > |
589 | </File> | 589 | </File> |
590 | <File | 590 | <File |
591 | RelativePath=".\lldbstrings.h" | 591 | RelativePath=".\lldispatcher.h" |
592 | > | 592 | > |
593 | </File> | 593 | </File> |
594 | <File | 594 | <File |
595 | RelativePath=".\lldispatcher.h" | 595 | RelativePath=".\lleventflags.h" |
596 | > | 596 | > |
597 | </File> | 597 | </File> |
598 | <File | 598 | <File |
599 | RelativePath=".\lleventflags.h" | 599 | RelativePath=".\llfiltersd2xmlrpc.h" |
600 | > | 600 | > |
601 | </File> | 601 | </File> |
602 | <File | 602 | <File |
603 | RelativePath=".\llfiltersd2xmlrpc.h" | 603 | RelativePath=".\llfollowcamparams.h" |
604 | > | 604 | > |
605 | </File> | 605 | </File> |
606 | <File | 606 | <File |
607 | RelativePath=".\llfollowcamparams.h" | 607 | RelativePath=".\llhost.h" |
608 | > | 608 | > |
609 | </File> | 609 | </File> |
610 | <File | 610 | <File |
611 | RelativePath=".\llhost.h" | 611 | RelativePath=".\llhttpclient.h" |
612 | > | 612 | > |
613 | </File> | 613 | </File> |
614 | <File | 614 | <File |
615 | RelativePath=".\llhttpclient.h" | 615 | RelativePath=".\llhttpnode.h" |
616 | > | 616 | > |
617 | </File> | 617 | </File> |
618 | <File | 618 | <File |
619 | RelativePath=".\llhttpnode.h" | 619 | RelativePath=".\llhttpsender.h" |
620 | > | 620 | > |
621 | </File> | 621 | </File> |
622 | <File | 622 | <File |
623 | RelativePath=".\llhttpsender.h" | 623 | RelativePath=".\llinstantmessage.h" |
624 | > | 624 | > |
625 | </File> | 625 | </File> |
626 | <File | 626 | <File |
627 | RelativePath=".\llinstantmessage.h" | 627 | RelativePath=".\llinvite.h" |
628 | > | 628 | > |
629 | </File> | 629 | </File> |
630 | <File | 630 | <File |
631 | RelativePath=".\llinvite.h" | 631 | RelativePath=".\lliobuffer.h" |
632 | > | 632 | > |
633 | </File> | 633 | </File> |
634 | <File | 634 | <File |
635 | RelativePath=".\lliobuffer.h" | 635 | RelativePath=".\lliohttpserver.h" |
636 | > | 636 | > |
637 | </File> | 637 | </File> |
638 | <File | 638 | <File |
639 | RelativePath=".\lliohttpserver.h" | 639 | RelativePath=".\lliopipe.h" |
640 | > | 640 | > |
641 | </File> | 641 | </File> |
642 | <File | 642 | <File |
643 | RelativePath=".\lliopipe.h" | 643 | RelativePath=".\lliosocket.h" |
644 | > | 644 | > |
645 | </File> | 645 | </File> |
646 | <File | 646 | <File |
647 | RelativePath=".\lliosocket.h" | 647 | RelativePath=".\llioutil.h" |
648 | > | 648 | > |
649 | </File> | 649 | </File> |
650 | <File | 650 | <File |
651 | RelativePath=".\llioutil.h" | 651 | RelativePath=".\llloginflags.h" |
652 | > | 652 | > |
653 | </File> | 653 | </File> |
654 | <File | 654 | <File |
655 | RelativePath=".\llloginflags.h" | 655 | RelativePath=".\lllsltransmit.h" |
656 | > | 656 | > |
657 | </File> | 657 | </File> |
658 | <File | 658 | <File |
659 | RelativePath=".\lllsltransmit.h" | 659 | RelativePath=".\llmail.h" |
660 | > | 660 | > |
661 | </File> | 661 | </File> |
662 | <File | 662 | <File |
663 | RelativePath=".\llmail.h" | 663 | RelativePath=".\llmessagebuilder.h" |
664 | > | 664 | > |
665 | </File> | 665 | </File> |
666 | <File | 666 | <File |
667 | RelativePath=".\llmessagebuilder.h" | 667 | RelativePath=".\llmessageconfig.h" |
668 | > | 668 | > |
669 | </File> | 669 | </File> |
670 | <File | 670 | <File |
671 | RelativePath=".\llmessageconfig.h" | 671 | RelativePath=".\llmessagereader.h" |
672 | > | 672 | > |
673 | </File> | 673 | </File> |
674 | <File | 674 | <File |
675 | RelativePath=".\llmessagereader.h" | 675 | RelativePath=".\llmessagetemplate.h" |
676 | > | 676 | > |
677 | </File> | 677 | </File> |
678 | <File | 678 | <File |
679 | RelativePath=".\llmessagetemplate.h" | 679 | RelativePath=".\llmessagetemplateparser.h" |
680 | > | 680 | > |
681 | </File> | 681 | </File> |
682 | <File | 682 | <File |
683 | RelativePath=".\llmessagetemplateparser.h" | 683 | RelativePath=".\llmessagethrottle.h" |
684 | > | 684 | > |
685 | </File> | 685 | </File> |
686 | <File | 686 | <File |
687 | RelativePath=".\llmessagethrottle.h" | 687 | RelativePath=".\llmime.h" |
688 | > | 688 | > |
689 | </File> | 689 | </File> |
690 | <File | 690 | <File |
691 | RelativePath=".\llmime.h" | 691 | RelativePath=".\llnamevalue.h" |
692 | > | 692 | > |
693 | </File> | 693 | </File> |
694 | <File | 694 | <File |
695 | RelativePath=".\llnamevalue.h" | 695 | RelativePath=".\llnullcipher.h" |
696 | > | 696 | > |
697 | </File> | 697 | </File> |
698 | <File | 698 | <File |
699 | RelativePath=".\llnullcipher.h" | 699 | RelativePath=".\llpacketack.h" |
700 | > | 700 | > |
701 | </File> | 701 | </File> |
702 | <File | 702 | <File |
703 | RelativePath=".\llpacketack.h" | 703 | RelativePath=".\llpacketbuffer.h" |
704 | > | 704 | > |
705 | </File> | 705 | </File> |
706 | <File | 706 | <File |
707 | RelativePath=".\llpacketbuffer.h" | 707 | RelativePath=".\llpacketring.h" |
708 | > | 708 | > |
709 | </File> | 709 | </File> |
710 | <File | 710 | <File |
711 | RelativePath=".\llpacketring.h" | 711 | RelativePath=".\llpartdata.h" |
712 | > | 712 | > |
713 | </File> | 713 | </File> |
714 | <File | 714 | <File |
715 | RelativePath=".\llpartdata.h" | 715 | RelativePath=".\llpumpio.h" |
716 | > | 716 | > |
717 | </File> | 717 | </File> |
718 | <File | 718 | <File |
719 | RelativePath=".\llpumpio.h" | 719 | RelativePath=".\llqueryflags.h" |
720 | > | 720 | > |
721 | </File> | 721 | </File> |
722 | <File | 722 | <File |
723 | RelativePath=".\llqueryflags.h" | 723 | RelativePath=".\llregionflags.h" |
724 | > | 724 | > |
725 | </File> | 725 | </File> |
726 | <File | 726 | <File |
727 | RelativePath=".\llregionflags.h" | 727 | RelativePath=".\llregionhandle.h" |
728 | > | 728 | > |
729 | </File> | 729 | </File> |
730 | <File | 730 | <File |
731 | RelativePath=".\llregionhandle.h" | 731 | RelativePath=".\llsdappservices.h" |
732 | > | 732 | > |
733 | </File> | 733 | </File> |
734 | <File | 734 | <File |
735 | RelativePath=".\llsdappservices.h" | 735 | RelativePath=".\llsdhttpserver.h" |
736 | > | 736 | > |
737 | </File> | 737 | </File> |
738 | <File | 738 | <File |
739 | RelativePath=".\llsdhttpserver.h" | 739 | RelativePath=".\llsdmessagebuilder.h" |
740 | > | 740 | > |
741 | </File> | 741 | </File> |
742 | <File | 742 | <File |
743 | RelativePath=".\llsdmessagebuilder.h" | 743 | RelativePath=".\llsdmessagereader.h" |
744 | > | 744 | > |
745 | </File> | 745 | </File> |
746 | <File | 746 | <File |
747 | RelativePath=".\llsdmessagereader.h" | 747 | RelativePath=".\llsdrpcclient.h" |
748 | > | 748 | > |
749 | </File> | 749 | </File> |
750 | <File | 750 | <File |
751 | RelativePath=".\llsdrpcclient.h" | 751 | RelativePath=".\llsdrpcserver.h" |
752 | > | 752 | > |
753 | </File> | 753 | </File> |
754 | <File | 754 | <File |
755 | RelativePath=".\llsdrpcserver.h" | 755 | RelativePath=".\llservice.h" |
756 | > | 756 | > |
757 | </File> | 757 | </File> |
758 | <File | 758 | <File |
759 | RelativePath=".\llservice.h" | 759 | RelativePath=".\llservicebuilder.h" |
760 | > | 760 | > |
761 | </File> | 761 | </File> |
762 | <File | 762 | <File |
763 | RelativePath=".\llservicebuilder.h" | 763 | RelativePath=".\lltaskname.h" |
764 | > | 764 | > |
765 | </File> | 765 | </File> |
766 | <File | 766 | <File |
767 | RelativePath=".\lltaskname.h" | 767 | RelativePath=".\llteleportflags.h" |
768 | > | 768 | > |
769 | </File> | 769 | </File> |
770 | <File | 770 | <File |
771 | RelativePath=".\llteleportflags.h" | 771 | RelativePath=".\lltemplatemessagebuilder.h" |
772 | > | 772 | > |
773 | </File> | 773 | </File> |
774 | <File | 774 | <File |
775 | RelativePath=".\lltemplatemessagebuilder.h" | 775 | RelativePath=".\lltemplatemessagereader.h" |
776 | > | 776 | > |
777 | </File> | 777 | </File> |
778 | <File | 778 | <File |
779 | RelativePath=".\lltemplatemessagereader.h" | 779 | RelativePath=".\llthrottle.h" |
780 | > | 780 | > |
781 | </File> | 781 | </File> |
782 | <File | 782 | <File |
783 | RelativePath=".\llthrottle.h" | 783 | RelativePath=".\lltransfermanager.h" |
784 | > | 784 | > |
785 | </File> | 785 | </File> |
786 | <File | 786 | <File |
787 | RelativePath=".\lltransfermanager.h" | 787 | RelativePath=".\lltransfersourceasset.h" |
788 | > | 788 | > |
789 | </File> | 789 | </File> |
790 | <File | 790 | <File |
791 | RelativePath=".\lltransfersourceasset.h" | 791 | RelativePath=".\lltransfersourcefile.h" |
792 | > | 792 | > |
793 | </File> | 793 | </File> |
794 | <File | 794 | <File |
795 | RelativePath=".\lltransfersourcefile.h" | 795 | RelativePath=".\lltransfertargetfile.h" |
796 | > | 796 | > |
797 | </File> | 797 | </File> |
798 | <File | 798 | <File |
799 | RelativePath=".\lltransfertargetfile.h" | 799 | RelativePath=".\lltransfertargetvfile.h" |
800 | > | 800 | > |
801 | </File> | 801 | </File> |
802 | <File | 802 | <File |
803 | RelativePath=".\lltransfertargetvfile.h" | 803 | RelativePath=".\llurlrequest.h" |
804 | > | 804 | > |
805 | </File> | 805 | </File> |
806 | <File | 806 | <File |
807 | RelativePath=".\llurlrequest.h" | 807 | RelativePath=".\lluseroperation.h" |
808 | > | 808 | > |
809 | </File> | 809 | </File> |
810 | <File | 810 | <File |
811 | RelativePath=".\lluseroperation.h" | 811 | RelativePath=".\llvehicleparams.h" |
812 | > | 812 | > |
813 | </File> | 813 | </File> |
814 | <File | 814 | <File |
815 | RelativePath=".\llvehicleparams.h" | 815 | RelativePath=".\llxfer.h" |
816 | > | 816 | > |
817 | </File> | 817 | </File> |
818 | <File | 818 | <File |
819 | RelativePath=".\llxfer.h" | 819 | RelativePath=".\llxfer_file.h" |
820 | > | 820 | > |
821 | </File> | 821 | </File> |
822 | <File | 822 | <File |
823 | RelativePath=".\llxfer_file.h" | 823 | RelativePath=".\llxfer_mem.h" |
824 | > | 824 | > |
825 | </File> | 825 | </File> |
826 | <File | 826 | <File |
827 | RelativePath=".\llxfer_mem.h" | 827 | RelativePath=".\llxfer_vfile.h" |
828 | > | 828 | > |
829 | </File> | 829 | </File> |
830 | <File | 830 | <File |
831 | RelativePath=".\llxfer_vfile.h" | 831 | RelativePath=".\llxfermanager.h" |
832 | > | 832 | > |
833 | </File> | 833 | </File> |
834 | <File | 834 | <File |
835 | RelativePath=".\llxfermanager.h" | 835 | RelativePath=".\llxorcipher.h" |
836 | > | 836 | > |
837 | </File> | 837 | </File> |
838 | <File | 838 | <File |
839 | RelativePath=".\llxorcipher.h" | 839 | RelativePath=".\machine.h" |
840 | > | 840 | > |
841 | </File> | 841 | </File> |
842 | <File | 842 | <File |
843 | RelativePath=".\machine.h" | 843 | RelativePath=".\mean_collision_data.h" |
844 | > | 844 | > |
845 | </File> | 845 | </File> |
846 | <File | 846 | <File |
847 | RelativePath=".\mean_collision_data.h" | 847 | RelativePath=".\message.h" |
848 | > | 848 | > |
849 | </File> | 849 | </File> |
850 | <File | 850 | <File |
851 | RelativePath=".\message.h" | 851 | RelativePath=".\message_prehash.h" |
852 | > | 852 | > |
853 | </File> | 853 | </File> |
854 | <File | 854 | <File |
855 | RelativePath=".\message_prehash.h" | 855 | RelativePath=".\net.h" |
856 | > | 856 | > |
857 | </File> | 857 | </File> |
858 | <File | 858 | <File |
859 | RelativePath=".\net.h" | 859 | RelativePath=".\network.h" |
860 | > | 860 | > |
861 | </File> | 861 | </File> |
862 | <File | 862 | <File |
863 | RelativePath=".\network.h" | 863 | RelativePath=".\partsyspacket.h" |
864 | > | 864 | > |
865 | </File> | 865 | </File> |
866 | <File | 866 | <File |
867 | RelativePath=".\partsyspacket.h" | 867 | RelativePath=".\patch_code.h" |
868 | > | 868 | > |
869 | </File> | 869 | </File> |
870 | <File | 870 | <File |
871 | RelativePath=".\patch_code.h" | 871 | RelativePath=".\patch_dct.h" |
872 | > | 872 | > |
873 | </File> | 873 | </File> |
874 | <File | 874 | <File |
875 | RelativePath=".\patch_dct.h" | 875 | RelativePath=".\sound_ids.h" |
876 | > | 876 | > |
877 | </File> | 877 | </File> |
878 | <File | 878 | </Filter> |
879 | RelativePath=".\sound_ids.h" | 879 | <Filter |
880 | > | 880 | Name="Resource Files" |
881 | </File> | 881 | Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" |
882 | </Filter> | 882 | UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" |
883 | <Filter | 883 | > |
884 | Name="Resource Files" | 884 | </Filter> |
885 | Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" | 885 | <File |
886 | UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" | 886 | RelativePath="..\..\scripts\messages\message_template.msg" |
887 | > | 887 | > |
888 | </Filter> | 888 | <FileConfiguration |
889 | <File | 889 | Name="Debug|Win32" |
890 | RelativePath="..\..\scripts\messages\message_template.msg" | 890 | > |
891 | > | 891 | <Tool |
892 | <FileConfiguration | 892 | Name="VCCustomBuildTool" |
893 | Name="Debug|Win32" | 893 | Description="" |
894 | > | 894 | CommandLine="" |
895 | <Tool | 895 | Outputs="" |
896 | Name="VCCustomBuildTool" | 896 | /> |
897 | Description="" | 897 | </FileConfiguration> |
898 | CommandLine="" | 898 | <FileConfiguration |
899 | Outputs="" | 899 | Name="Release|Win32" |
900 | /> | 900 | > |
901 | </FileConfiguration> | 901 | <Tool |
902 | <FileConfiguration | 902 | Name="VCCustomBuildTool" |
903 | Name="Release|Win32" | 903 | Description="" |
904 | > | 904 | CommandLine="" |
905 | <Tool | 905 | Outputs="" |
906 | Name="VCCustomBuildTool" | 906 | /> |
907 | Description="" | 907 | </FileConfiguration> |
908 | CommandLine="" | 908 | <FileConfiguration |
909 | Outputs="" | 909 | Name="ReleaseNoOpt|Win32" |
910 | /> | 910 | > |
911 | </FileConfiguration> | 911 | <Tool |
912 | <FileConfiguration | 912 | Name="VCCustomBuildTool" |
913 | Name="ReleaseNoOpt|Win32" | 913 | Description="" |
914 | > | 914 | CommandLine="" |
915 | <Tool | 915 | Outputs="" |
916 | Name="VCCustomBuildTool" | 916 | /> |
917 | Description="" | 917 | </FileConfiguration> |
918 | CommandLine="" | 918 | </File> |
919 | Outputs="" | 919 | </Files> |
920 | /> | 920 | <Globals> |
921 | </FileConfiguration> | 921 | </Globals> |
922 | </File> | 922 | </VisualStudioProject> |
923 | </Files> | ||
924 | <Globals> | ||
925 | </Globals> | ||
926 | </VisualStudioProject> | ||
diff --git a/linden/indra/llmessage/llnamevalue.h b/linden/indra/llmessage/llnamevalue.h index 123836b..c58172a 100644 --- a/linden/indra/llmessage/llnamevalue.h +++ b/linden/indra/llmessage/llnamevalue.h | |||
@@ -33,7 +33,6 @@ | |||
33 | #define LL_LLNAMEVALUE_H | 33 | #define LL_LLNAMEVALUE_H |
34 | 34 | ||
35 | #include "string_table.h" | 35 | #include "string_table.h" |
36 | #include "llskipmap.h" | ||
37 | #include "llmath.h" | 36 | #include "llmath.h" |
38 | #include "v3math.h" | 37 | #include "v3math.h" |
39 | #include "lldbstrings.h" | 38 | #include "lldbstrings.h" |
diff --git a/linden/indra/llmessage/llpacketring.h b/linden/indra/llmessage/llpacketring.h index 2153e96..dac52e6 100644 --- a/linden/indra/llmessage/llpacketring.h +++ b/linden/indra/llmessage/llpacketring.h | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <queue> | 36 | #include <queue> |
37 | 37 | ||
38 | #include "llpacketbuffer.h" | 38 | #include "llpacketbuffer.h" |
39 | #include "linked_lists.h" | ||
40 | #include "llhost.h" | 39 | #include "llhost.h" |
41 | #include "net.h" | 40 | #include "net.h" |
42 | #include "llthrottle.h" | 41 | #include "llthrottle.h" |
diff --git a/linden/indra/llmessage/llsdrpcclient.cpp b/linden/indra/llmessage/llsdrpcclient.cpp index c67992d..7c4b8e3 100644 --- a/linden/indra/llmessage/llsdrpcclient.cpp +++ b/linden/indra/llmessage/llsdrpcclient.cpp | |||
@@ -221,7 +221,7 @@ LLIOPipe::EStatus LLSDRPCClient::process_impl( | |||
221 | // << llendl; | 221 | // << llendl; |
222 | LLBufferStream resp(channels, buffer.get()); | 222 | LLBufferStream resp(channels, buffer.get()); |
223 | LLSD sd; | 223 | LLSD sd; |
224 | LLSDSerialize::fromNotation(sd, resp); | 224 | LLSDSerialize::fromNotation(sd, resp, buffer->count(channels.in())); |
225 | LLSDRPCResponse* response = (LLSDRPCResponse*)mResponse.get(); | 225 | LLSDRPCResponse* response = (LLSDRPCResponse*)mResponse.get(); |
226 | if (!response) | 226 | if (!response) |
227 | { | 227 | { |
diff --git a/linden/indra/llmessage/llsdrpcserver.cpp b/linden/indra/llmessage/llsdrpcserver.cpp index 5406e02..c77ac5c 100644 --- a/linden/indra/llmessage/llsdrpcserver.cpp +++ b/linden/indra/llmessage/llsdrpcserver.cpp | |||
@@ -182,7 +182,10 @@ LLIOPipe::EStatus LLSDRPCServer::process_impl( | |||
182 | PUMP_DEBUG; | 182 | PUMP_DEBUG; |
183 | LLBufferStream istr(channels, buffer.get()); | 183 | LLBufferStream istr(channels, buffer.get()); |
184 | mRequest.clear(); | 184 | mRequest.clear(); |
185 | LLSDSerialize::fromNotation(mRequest, istr); | 185 | LLSDSerialize::fromNotation( |
186 | mRequest, | ||
187 | istr, | ||
188 | buffer->count(channels.in())); | ||
186 | 189 | ||
187 | // { 'method':'...', 'parameter': ... } | 190 | // { 'method':'...', 'parameter': ... } |
188 | method_name = mRequest[LLSDRPC_METHOD_SD_NAME].asString(); | 191 | method_name = mRequest[LLSDRPC_METHOD_SD_NAME].asString(); |
diff --git a/linden/indra/llmessage/llservicebuilder.cpp b/linden/indra/llmessage/llservicebuilder.cpp index 6ffd480..195e24b 100644 --- a/linden/indra/llmessage/llservicebuilder.cpp +++ b/linden/indra/llmessage/llservicebuilder.cpp | |||
@@ -1,33 +1,33 @@ | |||
1 | /** | 1 | /** |
2 | * @file llservicebuilder.cpp | 2 | * @file llservicebuilder.cpp |
3 | * @brief Implementation of the LLServiceBuilder class. | 3 | * @brief Implementation of the LLServiceBuilder class. |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2007&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2007&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2007-2008, Linden Research, Inc. | 7 | * Copyright (c) 2007-2008, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
11 | * to you under the terms of the GNU General Public License, version 2.0 | 11 | * to you under the terms of the GNU General Public License, version 2.0 |
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
24 | * and agree to abide by those obligations. | 24 | * and agree to abide by those obligations. |
25 | * | 25 | * |
26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
28 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | 29 | * $/LicenseInfo$ |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include "linden_common.h" | 32 | #include "linden_common.h" |
33 | #include "llapp.h" | 33 | #include "llapp.h" |
diff --git a/linden/indra/llmessage/llurlrequest.cpp b/linden/indra/llmessage/llurlrequest.cpp index 6c826cd..eabd951 100644 --- a/linden/indra/llmessage/llurlrequest.cpp +++ b/linden/indra/llmessage/llurlrequest.cpp | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <curl/curl.h> | 37 | #include <curl/curl.h> |
38 | #include <algorithm> | 38 | #include <algorithm> |
39 | 39 | ||
40 | #include "llcurl.h" | ||
40 | #include "llioutil.h" | 41 | #include "llioutil.h" |
41 | #include "llmemtype.h" | 42 | #include "llmemtype.h" |
42 | #include "llpumpio.h" | 43 | #include "llpumpio.h" |
@@ -52,8 +53,7 @@ static const U32 HTTP_STATUS_PIPE_ERROR = 499; | |||
52 | const std::string CONTEXT_DEST_URI_SD_LABEL("dest_uri"); | 53 | const std::string CONTEXT_DEST_URI_SD_LABEL("dest_uri"); |
53 | 54 | ||
54 | 55 | ||
55 | static | 56 | static size_t headerCallback(void* data, size_t size, size_t nmemb, void* user); |
56 | size_t headerCallback(void* data, size_t size, size_t nmemb, void* user); | ||
57 | 57 | ||
58 | /** | 58 | /** |
59 | * class LLURLRequestDetail | 59 | * class LLURLRequestDetail |
@@ -63,12 +63,8 @@ class LLURLRequestDetail | |||
63 | public: | 63 | public: |
64 | LLURLRequestDetail(); | 64 | LLURLRequestDetail(); |
65 | ~LLURLRequestDetail(); | 65 | ~LLURLRequestDetail(); |
66 | CURLM* mCurlMulti; | 66 | std::string mURL; |
67 | CURL* mCurl; | 67 | LLCurlEasyRequest* mCurlRequest; |
68 | struct curl_slist* mHeaders; | ||
69 | char* mURL; | ||
70 | char mCurlErrorBuf[CURL_ERROR_SIZE + 1]; /* Flawfinder: ignore */ | ||
71 | bool mNeedToRemoveEasyHandle; | ||
72 | LLBufferArray* mResponseBuffer; | 68 | LLBufferArray* mResponseBuffer; |
73 | LLChannelDescriptors mChannels; | 69 | LLChannelDescriptors mChannels; |
74 | U8* mLastRead; | 70 | U8* mLastRead; |
@@ -77,11 +73,7 @@ public: | |||
77 | }; | 73 | }; |
78 | 74 | ||
79 | LLURLRequestDetail::LLURLRequestDetail() : | 75 | LLURLRequestDetail::LLURLRequestDetail() : |
80 | mCurlMulti(NULL), | 76 | mCurlRequest(NULL), |
81 | mCurl(NULL), | ||
82 | mHeaders(NULL), | ||
83 | mURL(NULL), | ||
84 | mNeedToRemoveEasyHandle(false), | ||
85 | mResponseBuffer(NULL), | 77 | mResponseBuffer(NULL), |
86 | mLastRead(NULL), | 78 | mLastRead(NULL), |
87 | mBodyLimit(0), | 79 | mBodyLimit(0), |
@@ -89,34 +81,13 @@ LLURLRequestDetail::LLURLRequestDetail() : | |||
89 | 81 | ||
90 | { | 82 | { |
91 | LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); | 83 | LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); |
92 | mCurlErrorBuf[0] = '\0'; | 84 | mCurlRequest = new LLCurlEasyRequest(); |
93 | } | 85 | } |
94 | 86 | ||
95 | LLURLRequestDetail::~LLURLRequestDetail() | 87 | LLURLRequestDetail::~LLURLRequestDetail() |
96 | { | 88 | { |
97 | LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); | 89 | LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); |
98 | if(mCurl) | 90 | delete mCurlRequest; |
99 | { | ||
100 | if(mNeedToRemoveEasyHandle && mCurlMulti) | ||
101 | { | ||
102 | curl_multi_remove_handle(mCurlMulti, mCurl); | ||
103 | mNeedToRemoveEasyHandle = false; | ||
104 | } | ||
105 | curl_easy_cleanup(mCurl); | ||
106 | mCurl = NULL; | ||
107 | } | ||
108 | if(mCurlMulti) | ||
109 | { | ||
110 | curl_multi_cleanup(mCurlMulti); | ||
111 | mCurlMulti = NULL; | ||
112 | } | ||
113 | if(mHeaders) | ||
114 | { | ||
115 | curl_slist_free_all(mHeaders); | ||
116 | mHeaders = NULL; | ||
117 | } | ||
118 | delete[] mURL; | ||
119 | mURL = NULL; | ||
120 | mResponseBuffer = NULL; | 91 | mResponseBuffer = NULL; |
121 | mLastRead = NULL; | 92 | mLastRead = NULL; |
122 | } | 93 | } |
@@ -126,9 +97,6 @@ LLURLRequestDetail::~LLURLRequestDetail() | |||
126 | * class LLURLRequest | 97 | * class LLURLRequest |
127 | */ | 98 | */ |
128 | 99 | ||
129 | static std::string sCAFile(""); | ||
130 | static std::string sCAPath(""); | ||
131 | |||
132 | LLURLRequest::LLURLRequest(LLURLRequest::ERequestAction action) : | 100 | LLURLRequest::LLURLRequest(LLURLRequest::ERequestAction action) : |
133 | mAction(action) | 101 | mAction(action) |
134 | { | 102 | { |
@@ -155,31 +123,13 @@ LLURLRequest::~LLURLRequest() | |||
155 | void LLURLRequest::setURL(const std::string& url) | 123 | void LLURLRequest::setURL(const std::string& url) |
156 | { | 124 | { |
157 | LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); | 125 | LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); |
158 | if(mDetail->mURL) | 126 | mDetail->mURL = url; |
159 | { | ||
160 | // *NOTE: if any calls to set the url have been made to curl, | ||
161 | // this will probably lead to a crash. | ||
162 | delete[] mDetail->mURL; | ||
163 | mDetail->mURL = NULL; | ||
164 | } | ||
165 | if(!url.empty()) | ||
166 | { | ||
167 | mDetail->mURL = new char[url.size() + 1]; | ||
168 | url.copy(mDetail->mURL, url.size()); | ||
169 | mDetail->mURL[url.size()] = '\0'; | ||
170 | } | ||
171 | } | 127 | } |
172 | 128 | ||
173 | void LLURLRequest::addHeader(const char* header) | 129 | void LLURLRequest::addHeader(const char* header) |
174 | { | 130 | { |
175 | LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); | 131 | LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); |
176 | mDetail->mHeaders = curl_slist_append(mDetail->mHeaders, header); | 132 | mDetail->mCurlRequest->slist_append(header); |
177 | } | ||
178 | |||
179 | void LLURLRequest::requestEncoding(const char* encoding) | ||
180 | { | ||
181 | LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); | ||
182 | curl_easy_setopt(mDetail->mCurl, CURLOPT_ENCODING, encoding); | ||
183 | } | 133 | } |
184 | 134 | ||
185 | void LLURLRequest::setBodyLimit(U32 size) | 135 | void LLURLRequest::setBodyLimit(U32 size) |
@@ -188,22 +138,17 @@ void LLURLRequest::setBodyLimit(U32 size) | |||
188 | mDetail->mIsBodyLimitSet = true; | 138 | mDetail->mIsBodyLimitSet = true; |
189 | } | 139 | } |
190 | 140 | ||
191 | void LLURLRequest::checkRootCertificate(bool check, const char* caBundle) | 141 | void LLURLRequest::checkRootCertificate(bool check) |
192 | { | 142 | { |
193 | curl_easy_setopt(mDetail->mCurl, CURLOPT_SSL_VERIFYPEER, (check? TRUE : FALSE)); | 143 | mDetail->mCurlRequest->setopt(CURLOPT_SSL_VERIFYPEER, (check? TRUE : FALSE)); |
194 | if (caBundle) | 144 | mDetail->mCurlRequest->setoptString(CURLOPT_ENCODING, ""); |
195 | { | ||
196 | curl_easy_setopt(mDetail->mCurl, CURLOPT_CAINFO, caBundle); | ||
197 | } | ||
198 | } | 145 | } |
199 | 146 | ||
200 | void LLURLRequest::setCallback(LLURLRequestComplete* callback) | 147 | void LLURLRequest::setCallback(LLURLRequestComplete* callback) |
201 | { | 148 | { |
202 | LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); | 149 | LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); |
203 | mCompletionCallback = callback; | 150 | mCompletionCallback = callback; |
204 | 151 | mDetail->mCurlRequest->setHeaderCallback(&headerCallback, (void*)callback); | |
205 | curl_easy_setopt(mDetail->mCurl, CURLOPT_HEADERFUNCTION, &headerCallback); | ||
206 | curl_easy_setopt(mDetail->mCurl, CURLOPT_WRITEHEADER, callback); | ||
207 | } | 152 | } |
208 | 153 | ||
209 | // Added to mitigate the effect of libcurl looking | 154 | // Added to mitigate the effect of libcurl looking |
@@ -235,15 +180,15 @@ void LLURLRequest::useProxy(bool use_proxy) | |||
235 | } | 180 | } |
236 | 181 | ||
237 | 182 | ||
238 | lldebugs << "use_proxy = " << (use_proxy?'Y':'N') << ", env_proxy = " << env_proxy << llendl; | 183 | lldebugs << "use_proxy = " << (use_proxy?'Y':'N') << ", env_proxy = " << (env_proxy ? env_proxy : "(null)") << llendl; |
239 | 184 | ||
240 | if (env_proxy && use_proxy) | 185 | if (env_proxy && use_proxy) |
241 | { | 186 | { |
242 | curl_easy_setopt(mDetail->mCurl, CURLOPT_PROXY, env_proxy); | 187 | mDetail->mCurlRequest->setoptString(CURLOPT_PROXY, env_proxy); |
243 | } | 188 | } |
244 | else | 189 | else |
245 | { | 190 | { |
246 | curl_easy_setopt(mDetail->mCurl, CURLOPT_PROXY, ""); | 191 | mDetail->mCurlRequest->setoptString(CURLOPT_PROXY, ""); |
247 | } | 192 | } |
248 | } | 193 | } |
249 | 194 | ||
@@ -309,27 +254,20 @@ LLIOPipe::EStatus LLURLRequest::process_impl( | |||
309 | case STATE_PROCESSING_RESPONSE: | 254 | case STATE_PROCESSING_RESPONSE: |
310 | { | 255 | { |
311 | PUMP_DEBUG; | 256 | PUMP_DEBUG; |
312 | const S32 MAX_CALLS = 5; | ||
313 | S32 count = MAX_CALLS; | ||
314 | CURLMcode code; | ||
315 | LLIOPipe::EStatus status = STATUS_BREAK; | 257 | LLIOPipe::EStatus status = STATUS_BREAK; |
316 | S32 queue; | 258 | mDetail->mCurlRequest->perform(); |
317 | do | 259 | while(1) |
318 | { | ||
319 | LLFastTimer t2(LLFastTimer::FTM_CURL); | ||
320 | code = curl_multi_perform(mDetail->mCurlMulti, &queue); | ||
321 | }while((CURLM_CALL_MULTI_PERFORM == code) && (queue > 0) && count--); | ||
322 | CURLMsg* curl_msg; | ||
323 | do | ||
324 | { | 260 | { |
325 | curl_msg = curl_multi_info_read(mDetail->mCurlMulti, &queue); | 261 | CURLcode result; |
326 | if(curl_msg && (curl_msg->msg == CURLMSG_DONE)) | 262 | bool newmsg = mDetail->mCurlRequest->getResult(&result); |
263 | if (!newmsg) | ||
327 | { | 264 | { |
328 | mState = STATE_HAVE_RESPONSE; | 265 | break; |
266 | } | ||
329 | 267 | ||
330 | CURLcode result = curl_msg->data.result; | 268 | mState = STATE_HAVE_RESPONSE; |
331 | switch(result) | 269 | switch(result) |
332 | { | 270 | { |
333 | case CURLE_OK: | 271 | case CURLE_OK: |
334 | case CURLE_WRITE_ERROR: | 272 | case CURLE_WRITE_ERROR: |
335 | // NB: The error indication means that we stopped the | 273 | // NB: The error indication means that we stopped the |
@@ -352,31 +290,21 @@ LLIOPipe::EStatus LLURLRequest::process_impl( | |||
352 | mCompletionCallback = NULL; | 290 | mCompletionCallback = NULL; |
353 | } | 291 | } |
354 | break; | 292 | break; |
293 | case CURLE_FAILED_INIT: | ||
355 | case CURLE_COULDNT_CONNECT: | 294 | case CURLE_COULDNT_CONNECT: |
356 | status = STATUS_NO_CONNECTION; | 295 | status = STATUS_NO_CONNECTION; |
357 | break; | 296 | break; |
358 | default: | 297 | default: |
359 | llwarns << "URLRequest Error: " << curl_msg->data.result | 298 | llwarns << "URLRequest Error: " << result |
360 | << ", " | 299 | << ", " |
361 | #if LL_DARWIN | 300 | << LLCurl::strerror(result) |
362 | // curl_easy_strerror was added in libcurl 7.12.0. Unfortunately, the version in the Mac OS X 10.3.9 SDK is 7.10.2... | ||
363 | // There's a problem with the custom curl headers in our build that keeps me from #ifdefing this on the libcurl version number | ||
364 | // (the correct check would be #if LIBCURL_VERSION_NUM >= 0x070c00). We'll fix the header problem soon, but for now | ||
365 | // just punt and print the numeric error code on the Mac. | ||
366 | << curl_msg->data.result | ||
367 | #else // LL_DARWIN | ||
368 | << curl_easy_strerror(curl_msg->data.result) | ||
369 | #endif // LL_DARWIN | ||
370 | << ", " | 301 | << ", " |
371 | << (mDetail->mURL ? mDetail->mURL : "<EMPTY URL>") | 302 | << (mDetail->mURL.empty() ? "<EMPTY URL>" : mDetail->mURL) |
372 | << llendl; | 303 | << llendl; |
373 | status = STATUS_ERROR; | 304 | status = STATUS_ERROR; |
374 | break; | 305 | break; |
375 | } | ||
376 | curl_multi_remove_handle(mDetail->mCurlMulti, mDetail->mCurl); | ||
377 | mDetail->mNeedToRemoveEasyHandle = false; | ||
378 | } | 306 | } |
379 | }while(curl_msg && (queue > 0)); | 307 | } |
380 | return status; | 308 | return status; |
381 | } | 309 | } |
382 | case STATE_HAVE_RESPONSE: | 310 | case STATE_HAVE_RESPONSE: |
@@ -397,26 +325,9 @@ void LLURLRequest::initialize() | |||
397 | LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); | 325 | LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); |
398 | mState = STATE_INITIALIZED; | 326 | mState = STATE_INITIALIZED; |
399 | mDetail = new LLURLRequestDetail; | 327 | mDetail = new LLURLRequestDetail; |
400 | mDetail->mCurl = curl_easy_init(); | 328 | mDetail->mCurlRequest->setopt(CURLOPT_NOSIGNAL, 1); |
401 | mDetail->mCurlMulti = curl_multi_init(); | 329 | mDetail->mCurlRequest->setWriteCallback(&downCallback, (void*)this); |
402 | curl_easy_setopt(mDetail->mCurl, CURLOPT_NOSIGNAL, 1); | 330 | mDetail->mCurlRequest->setReadCallback(&upCallback, (void*)this); |
403 | curl_easy_setopt(mDetail->mCurl, CURLOPT_WRITEFUNCTION, &downCallback); | ||
404 | curl_easy_setopt(mDetail->mCurl, CURLOPT_WRITEDATA, this); | ||
405 | curl_easy_setopt(mDetail->mCurl, CURLOPT_READFUNCTION, &upCallback); | ||
406 | curl_easy_setopt(mDetail->mCurl, CURLOPT_READDATA, this); | ||
407 | curl_easy_setopt( | ||
408 | mDetail->mCurl, | ||
409 | CURLOPT_ERRORBUFFER, | ||
410 | mDetail->mCurlErrorBuf); | ||
411 | |||
412 | if(sCAPath != std::string("")) | ||
413 | { | ||
414 | curl_easy_setopt(mDetail->mCurl, CURLOPT_CAPATH, sCAPath.c_str()); | ||
415 | } | ||
416 | if(sCAFile != std::string("")) | ||
417 | { | ||
418 | curl_easy_setopt(mDetail->mCurl, CURLOPT_CAINFO, sCAFile.c_str()); | ||
419 | } | ||
420 | } | 331 | } |
421 | 332 | ||
422 | bool LLURLRequest::configure() | 333 | bool LLURLRequest::configure() |
@@ -429,15 +340,14 @@ bool LLURLRequest::configure() | |||
429 | switch(mAction) | 340 | switch(mAction) |
430 | { | 341 | { |
431 | case HTTP_HEAD: | 342 | case HTTP_HEAD: |
432 | curl_easy_setopt(mDetail->mCurl, CURLOPT_HEADER, 1); | 343 | mDetail->mCurlRequest->setopt(CURLOPT_HEADER, 1); |
433 | curl_easy_setopt(mDetail->mCurl, CURLOPT_NOBODY, 1); | 344 | mDetail->mCurlRequest->setopt(CURLOPT_NOBODY, 1); |
434 | curl_easy_setopt(mDetail->mCurl, CURLOPT_FOLLOWLOCATION, 1); | 345 | mDetail->mCurlRequest->setopt(CURLOPT_FOLLOWLOCATION, 1); |
435 | rv = true; | 346 | rv = true; |
436 | break; | 347 | break; |
437 | |||
438 | case HTTP_GET: | 348 | case HTTP_GET: |
439 | curl_easy_setopt(mDetail->mCurl, CURLOPT_HTTPGET, 1); | 349 | mDetail->mCurlRequest->setopt(CURLOPT_HTTPGET, 1); |
440 | curl_easy_setopt(mDetail->mCurl, CURLOPT_FOLLOWLOCATION, 1); | 350 | mDetail->mCurlRequest->setopt(CURLOPT_FOLLOWLOCATION, 1); |
441 | rv = true; | 351 | rv = true; |
442 | break; | 352 | break; |
443 | 353 | ||
@@ -446,8 +356,8 @@ bool LLURLRequest::configure() | |||
446 | // to turning this on, and I am not too sure what it means. | 356 | // to turning this on, and I am not too sure what it means. |
447 | addHeader("Expect:"); | 357 | addHeader("Expect:"); |
448 | 358 | ||
449 | curl_easy_setopt(mDetail->mCurl, CURLOPT_UPLOAD, 1); | 359 | mDetail->mCurlRequest->setopt(CURLOPT_UPLOAD, 1); |
450 | curl_easy_setopt(mDetail->mCurl, CURLOPT_INFILESIZE, bytes); | 360 | mDetail->mCurlRequest->setopt(CURLOPT_INFILESIZE, bytes); |
451 | rv = true; | 361 | rv = true; |
452 | break; | 362 | break; |
453 | 363 | ||
@@ -461,15 +371,13 @@ bool LLURLRequest::configure() | |||
461 | addHeader("Content-Type:"); | 371 | addHeader("Content-Type:"); |
462 | 372 | ||
463 | // Set the handle for an http post | 373 | // Set the handle for an http post |
464 | curl_easy_setopt(mDetail->mCurl, CURLOPT_POST, 1); | 374 | mDetail->mCurlRequest->setPost(NULL, bytes); |
465 | curl_easy_setopt(mDetail->mCurl, CURLOPT_POSTFIELDS, NULL); | ||
466 | curl_easy_setopt(mDetail->mCurl, CURLOPT_POSTFIELDSIZE, bytes); | ||
467 | rv = true; | 375 | rv = true; |
468 | break; | 376 | break; |
469 | 377 | ||
470 | case HTTP_DELETE: | 378 | case HTTP_DELETE: |
471 | // Set the handle for an http post | 379 | // Set the handle for an http post |
472 | curl_easy_setopt(mDetail->mCurl, CURLOPT_CUSTOMREQUEST, "DELETE"); | 380 | mDetail->mCurlRequest->setoptString(CURLOPT_CUSTOMREQUEST, "DELETE"); |
473 | rv = true; | 381 | rv = true; |
474 | break; | 382 | break; |
475 | 383 | ||
@@ -479,24 +387,14 @@ bool LLURLRequest::configure() | |||
479 | } | 387 | } |
480 | if(rv) | 388 | if(rv) |
481 | { | 389 | { |
482 | if(mDetail->mHeaders) | 390 | mDetail->mCurlRequest->sendRequest(mDetail->mURL); |
483 | { | ||
484 | curl_easy_setopt( | ||
485 | mDetail->mCurl, | ||
486 | CURLOPT_HTTPHEADER, | ||
487 | mDetail->mHeaders); | ||
488 | } | ||
489 | curl_easy_setopt(mDetail->mCurl, CURLOPT_URL, mDetail->mURL); | ||
490 | lldebugs << "URL: " << mDetail->mURL << llendl; | ||
491 | curl_multi_add_handle(mDetail->mCurlMulti, mDetail->mCurl); | ||
492 | mDetail->mNeedToRemoveEasyHandle = true; | ||
493 | } | 391 | } |
494 | return rv; | 392 | return rv; |
495 | } | 393 | } |
496 | 394 | ||
497 | // static | 395 | // static |
498 | size_t LLURLRequest::downCallback( | 396 | size_t LLURLRequest::downCallback( |
499 | void* data, | 397 | char* data, |
500 | size_t size, | 398 | size_t size, |
501 | size_t nmemb, | 399 | size_t nmemb, |
502 | void* user) | 400 | void* user) |
@@ -530,7 +428,7 @@ size_t LLURLRequest::downCallback( | |||
530 | 428 | ||
531 | // static | 429 | // static |
532 | size_t LLURLRequest::upCallback( | 430 | size_t LLURLRequest::upCallback( |
533 | void* data, | 431 | char* data, |
534 | size_t size, | 432 | size_t size, |
535 | size_t nmemb, | 433 | size_t nmemb, |
536 | void* user) | 434 | void* user) |
@@ -550,8 +448,7 @@ size_t LLURLRequest::upCallback( | |||
550 | return bytes; | 448 | return bytes; |
551 | } | 449 | } |
552 | 450 | ||
553 | static | 451 | static size_t headerCallback(void* data, size_t size, size_t nmemb, void* user) |
554 | size_t headerCallback(void* data, size_t size, size_t nmemb, void* user) | ||
555 | { | 452 | { |
556 | const char* headerLine = (const char*)data; | 453 | const char* headerLine = (const char*)data; |
557 | size_t headerLen = size * nmemb; | 454 | size_t headerLen = size * nmemb; |
@@ -607,18 +504,6 @@ size_t headerCallback(void* data, size_t size, size_t nmemb, void* user) | |||
607 | return headerLen; | 504 | return headerLen; |
608 | } | 505 | } |
609 | 506 | ||
610 | //static | ||
611 | void LLURLRequest::setCertificateAuthorityFile(const std::string& file_name) | ||
612 | { | ||
613 | sCAFile = file_name; | ||
614 | } | ||
615 | |||
616 | //static | ||
617 | void LLURLRequest::setCertificateAuthorityPath(const std::string& path) | ||
618 | { | ||
619 | sCAPath = path; | ||
620 | } | ||
621 | |||
622 | /** | 507 | /** |
623 | * LLContextURLExtractor | 508 | * LLContextURLExtractor |
624 | */ | 509 | */ |
diff --git a/linden/indra/llmessage/llurlrequest.h b/linden/indra/llmessage/llurlrequest.h index 3b91a1d..dd82a9f 100644 --- a/linden/indra/llmessage/llurlrequest.h +++ b/linden/indra/llmessage/llurlrequest.h | |||
@@ -129,18 +129,8 @@ public: | |||
129 | * | 129 | * |
130 | * Set whether request will check that remote server | 130 | * Set whether request will check that remote server |
131 | * certificates are signed by a known root CA when using HTTPS. | 131 | * certificates are signed by a known root CA when using HTTPS. |
132 | * Use the supplied root certificate bundle if supplied, else use | ||
133 | * the standard bundle as found by libcurl and openssl. | ||
134 | */ | 132 | */ |
135 | void checkRootCertificate(bool check, const char* caBundle = NULL); | 133 | void checkRootCertificate(bool check); |
136 | |||
137 | /** | ||
138 | * @brief Request a particular response encoding if available. | ||
139 | * | ||
140 | * This call is a shortcut for requesting a particular encoding | ||
141 | * from the server, eg, 'gzip'. | ||
142 | */ | ||
143 | void requestEncoding(const char* encoding); | ||
144 | 134 | ||
145 | /** | 135 | /** |
146 | * @brief Return at most size bytes of body. | 136 | * @brief Return at most size bytes of body. |
@@ -168,16 +158,6 @@ public: | |||
168 | void setCallback(LLURLRequestComplete* callback); | 158 | void setCallback(LLURLRequestComplete* callback); |
169 | //@} | 159 | //@} |
170 | 160 | ||
171 | /** | ||
172 | * @ brief Set certificate authority file used to verify HTTPS certs. | ||
173 | */ | ||
174 | static void setCertificateAuthorityFile(const std::string& file_name); | ||
175 | |||
176 | /** | ||
177 | * @ brief Set certificate authority path used to verify HTTPS certs. | ||
178 | */ | ||
179 | static void setCertificateAuthorityPath(const std::string& path); | ||
180 | |||
181 | /* @name LLIOPipe virtual implementations | 161 | /* @name LLIOPipe virtual implementations |
182 | */ | 162 | */ |
183 | 163 | ||
@@ -234,7 +214,7 @@ private: | |||
234 | * @brief Download callback method. | 214 | * @brief Download callback method. |
235 | */ | 215 | */ |
236 | static size_t downCallback( | 216 | static size_t downCallback( |
237 | void* data, | 217 | char* data, |
238 | size_t size, | 218 | size_t size, |
239 | size_t nmemb, | 219 | size_t nmemb, |
240 | void* user); | 220 | void* user); |
@@ -243,7 +223,7 @@ private: | |||
243 | * @brief Upload callback method. | 223 | * @brief Upload callback method. |
244 | */ | 224 | */ |
245 | static size_t upCallback( | 225 | static size_t upCallback( |
246 | void* data, | 226 | char* data, |
247 | size_t size, | 227 | size_t size, |
248 | size_t nmemb, | 228 | size_t nmemb, |
249 | void* user); | 229 | void* user); |
diff --git a/linden/indra/llmessage/llxfermanager.cpp b/linden/indra/llmessage/llxfermanager.cpp index e08acd9..47c950b 100644 --- a/linden/indra/llmessage/llxfermanager.cpp +++ b/linden/indra/llmessage/llxfermanager.cpp | |||
@@ -90,8 +90,9 @@ void LLXferManager::free () | |||
90 | { | 90 | { |
91 | LLXfer *xferp; | 91 | LLXfer *xferp; |
92 | LLXfer *delp; | 92 | LLXfer *delp; |
93 | 93 | ||
94 | mOutgoingHosts.deleteAllData(); | 94 | for_each(mOutgoingHosts.begin(), mOutgoingHosts.end(), DeletePointer()); |
95 | mOutgoingHosts.clear(); | ||
95 | 96 | ||
96 | delp = mSendList; | 97 | delp = mSendList; |
97 | while (delp) | 98 | while (delp) |
@@ -155,12 +156,15 @@ void LLXferManager::updateHostStatus() | |||
155 | LLXfer *xferp; | 156 | LLXfer *xferp; |
156 | LLHostStatus *host_statusp = NULL; | 157 | LLHostStatus *host_statusp = NULL; |
157 | 158 | ||
158 | mOutgoingHosts.deleteAllData(); | 159 | for_each(mOutgoingHosts.begin(), mOutgoingHosts.end(), DeletePointer()); |
160 | mOutgoingHosts.clear(); | ||
159 | 161 | ||
160 | for (xferp = mSendList; xferp; xferp = xferp->mNext) | 162 | for (xferp = mSendList; xferp; xferp = xferp->mNext) |
161 | { | 163 | { |
162 | for (host_statusp = mOutgoingHosts.getFirstData(); host_statusp; host_statusp = mOutgoingHosts.getNextData()) | 164 | for (status_list_t::iterator iter = mOutgoingHosts.begin(); |
165 | iter != mOutgoingHosts.end(); ++iter) | ||
163 | { | 166 | { |
167 | host_statusp = *iter; | ||
164 | if (host_statusp->mHost == xferp->mRemoteHost) | 168 | if (host_statusp->mHost == xferp->mRemoteHost) |
165 | { | 169 | { |
166 | break; | 170 | break; |
@@ -172,7 +176,7 @@ void LLXferManager::updateHostStatus() | |||
172 | if (host_statusp) | 176 | if (host_statusp) |
173 | { | 177 | { |
174 | host_statusp->mHost = xferp->mRemoteHost; | 178 | host_statusp->mHost = xferp->mRemoteHost; |
175 | mOutgoingHosts.addData(host_statusp); | 179 | mOutgoingHosts.push_front(host_statusp); |
176 | } | 180 | } |
177 | } | 181 | } |
178 | if (host_statusp) | 182 | if (host_statusp) |
@@ -195,12 +199,14 @@ void LLXferManager::updateHostStatus() | |||
195 | void LLXferManager::printHostStatus() | 199 | void LLXferManager::printHostStatus() |
196 | { | 200 | { |
197 | LLHostStatus *host_statusp = NULL; | 201 | LLHostStatus *host_statusp = NULL; |
198 | if (mOutgoingHosts.getFirstData()) | 202 | if (!mOutgoingHosts.empty()) |
199 | { | 203 | { |
200 | llinfos << "Outgoing Xfers:" << llendl; | 204 | llinfos << "Outgoing Xfers:" << llendl; |
201 | 205 | ||
202 | for (host_statusp = mOutgoingHosts.getFirstData(); host_statusp; host_statusp = mOutgoingHosts.getNextData()) | 206 | for (status_list_t::iterator iter = mOutgoingHosts.begin(); |
207 | iter != mOutgoingHosts.end(); ++iter) | ||
203 | { | 208 | { |
209 | host_statusp = *iter; | ||
204 | llinfos << " " << host_statusp->mHost << " active: " << host_statusp->mNumActive << " pending: " << host_statusp->mNumPending << llendl; | 210 | llinfos << " " << host_statusp->mHost << " active: " << host_statusp->mNumActive << " pending: " << host_statusp->mNumPending << llendl; |
205 | } | 211 | } |
206 | } | 212 | } |
@@ -275,8 +281,10 @@ S32 LLXferManager::numPendingXfers(const LLHost &host) | |||
275 | { | 281 | { |
276 | LLHostStatus *host_statusp = NULL; | 282 | LLHostStatus *host_statusp = NULL; |
277 | 283 | ||
278 | for (host_statusp = mOutgoingHosts.getFirstData(); host_statusp; host_statusp = mOutgoingHosts.getNextData()) | 284 | for (status_list_t::iterator iter = mOutgoingHosts.begin(); |
285 | iter != mOutgoingHosts.end(); ++iter) | ||
279 | { | 286 | { |
287 | host_statusp = *iter; | ||
280 | if (host_statusp->mHost == host) | 288 | if (host_statusp->mHost == host) |
281 | { | 289 | { |
282 | return (host_statusp->mNumPending); | 290 | return (host_statusp->mNumPending); |
@@ -291,8 +299,10 @@ S32 LLXferManager::numActiveXfers(const LLHost &host) | |||
291 | { | 299 | { |
292 | LLHostStatus *host_statusp = NULL; | 300 | LLHostStatus *host_statusp = NULL; |
293 | 301 | ||
294 | for (host_statusp = mOutgoingHosts.getFirstData(); host_statusp; host_statusp = mOutgoingHosts.getNextData()) | 302 | for (status_list_t::iterator iter = mOutgoingHosts.begin(); |
303 | iter != mOutgoingHosts.end(); ++iter) | ||
295 | { | 304 | { |
305 | host_statusp = *iter; | ||
296 | if (host_statusp->mHost == host) | 306 | if (host_statusp->mHost == host) |
297 | { | 307 | { |
298 | return (host_statusp->mNumActive); | 308 | return (host_statusp->mNumActive); |
@@ -307,8 +317,10 @@ void LLXferManager::changeNumActiveXfers(const LLHost &host, S32 delta) | |||
307 | { | 317 | { |
308 | LLHostStatus *host_statusp = NULL; | 318 | LLHostStatus *host_statusp = NULL; |
309 | 319 | ||
310 | for (host_statusp = mOutgoingHosts.getFirstData(); host_statusp; host_statusp = mOutgoingHosts.getNextData()) | 320 | for (status_list_t::iterator iter = mOutgoingHosts.begin(); |
321 | iter != mOutgoingHosts.end(); ++iter) | ||
311 | { | 322 | { |
323 | host_statusp = *iter; | ||
312 | if (host_statusp->mHost == host) | 324 | if (host_statusp->mHost == host) |
313 | { | 325 | { |
314 | host_statusp->mNumActive += delta; | 326 | host_statusp->mNumActive += delta; |
@@ -1010,15 +1022,15 @@ void LLXferManager::startPendingDownloads() | |||
1010 | // stateful iteration, it would be possible for old requests to | 1022 | // stateful iteration, it would be possible for old requests to |
1011 | // never start. | 1023 | // never start. |
1012 | LLXfer* xferp = mReceiveList; | 1024 | LLXfer* xferp = mReceiveList; |
1013 | LLLinkedList<LLXfer> pending_downloads; | 1025 | std::list<LLXfer*> pending_downloads; |
1014 | S32 download_count = 0; | 1026 | S32 download_count = 0; |
1015 | S32 pending_count = 0; | 1027 | S32 pending_count = 0; |
1016 | while(xferp) | 1028 | while(xferp) |
1017 | { | 1029 | { |
1018 | if(xferp->mStatus == e_LL_XFER_PENDING) | 1030 | if(xferp->mStatus == e_LL_XFER_PENDING) |
1019 | { | 1031 | { |
1020 | ++pending_count; // getLength() is O(N), so track it here. | 1032 | ++pending_count; |
1021 | pending_downloads.addData(xferp); | 1033 | pending_downloads.push_front(xferp); |
1022 | } | 1034 | } |
1023 | else if(xferp->mStatus == e_LL_XFER_IN_PROGRESS) | 1035 | else if(xferp->mStatus == e_LL_XFER_IN_PROGRESS) |
1024 | { | 1036 | { |
@@ -1036,16 +1048,18 @@ void LLXferManager::startPendingDownloads() | |||
1036 | if((start_count > 0) && (pending_count > 0)) | 1048 | if((start_count > 0) && (pending_count > 0)) |
1037 | { | 1049 | { |
1038 | S32 result; | 1050 | S32 result; |
1039 | xferp = pending_downloads.getFirstData(); | 1051 | for (std::list<LLXfer*>::iterator iter = pending_downloads.begin(); |
1040 | while(start_count-- && xferp) | 1052 | iter != pending_downloads.end(); ++iter) |
1041 | { | 1053 | { |
1054 | xferp = *iter; | ||
1055 | if (start_count-- <= 0) | ||
1056 | break; | ||
1042 | result = xferp->startDownload(); | 1057 | result = xferp->startDownload(); |
1043 | if(result) | 1058 | if(result) |
1044 | { | 1059 | { |
1045 | xferp->abort(result); | 1060 | xferp->abort(result); |
1046 | ++start_count; | 1061 | ++start_count; |
1047 | } | 1062 | } |
1048 | xferp = pending_downloads.getNextData(); | ||
1049 | } | 1063 | } |
1050 | } | 1064 | } |
1051 | } | 1065 | } |
diff --git a/linden/indra/llmessage/llxfermanager.h b/linden/indra/llmessage/llxfermanager.h index 7b3a888..82cd8e9 100644 --- a/linden/indra/llmessage/llxfermanager.h +++ b/linden/indra/llmessage/llxfermanager.h | |||
@@ -45,7 +45,6 @@ class LLVFS; | |||
45 | #include "llxfer.h" | 45 | #include "llxfer.h" |
46 | #include "message.h" | 46 | #include "message.h" |
47 | #include "llassetstorage.h" | 47 | #include "llassetstorage.h" |
48 | #include "linked_lists.h" | ||
49 | #include "lldir.h" | 48 | #include "lldir.h" |
50 | #include "lllinkedqueue.h" | 49 | #include "lllinkedqueue.h" |
51 | #include "llthrottle.h" | 50 | #include "llthrottle.h" |
@@ -101,7 +100,8 @@ class LLXferManager | |||
101 | LLXfer *mSendList; | 100 | LLXfer *mSendList; |
102 | LLXfer *mReceiveList; | 101 | LLXfer *mReceiveList; |
103 | 102 | ||
104 | LLLinkedList <LLHostStatus> mOutgoingHosts; | 103 | typedef std::list<LLHostStatus*> status_list_t; |
104 | status_list_t mOutgoingHosts; | ||
105 | 105 | ||
106 | private: | 106 | private: |
107 | protected: | 107 | protected: |
diff --git a/linden/indra/llmessage/message.h b/linden/indra/llmessage/message.h index 424674d..05aa592 100644 --- a/linden/indra/llmessage/message.h +++ b/linden/indra/llmessage/message.h | |||
@@ -216,8 +216,6 @@ class LLMessageSystem | |||
216 | LLPacketRing mPacketRing; | 216 | LLPacketRing mPacketRing; |
217 | LLReliablePacketParams mReliablePacketParams; | 217 | LLReliablePacketParams mReliablePacketParams; |
218 | 218 | ||
219 | //LLLinkedList<LLPacketAck> mAckList; | ||
220 | |||
221 | // Set this flag to TRUE when you want *very* verbose logs. | 219 | // Set this flag to TRUE when you want *very* verbose logs. |
222 | BOOL mVerboseLog; | 220 | BOOL mVerboseLog; |
223 | 221 | ||