ChangeLog 363 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069
  1. 2008-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2. Added --bt-request-peer-speed-limit option, which was a constant
  3. SLOW_SPEED_THRESHOLD.
  4. * src/ActivePeerConnectionCommand.cc
  5. * src/ActivePeerConnectionCommand.h
  6. * src/BtConstants.h
  7. * src/HelpItemFactory.cc
  8. * src/OptionHandlerFactory.cc
  9. * src/PeerReceiveHandshakeCommand.cc
  10. * src/option_processing.cc
  11. * src/prefs.cc
  12. * src/prefs.h
  13. * src/usage_text.h
  14. 2008-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  15. Removed repeated call of getTopDirPath(). Instead, call it once and
  16. cache the result.
  17. * src/MultiDiskAdaptor.cc
  18. * src/MultiDiskAdaptor.h
  19. (mkdir, openFile, initAndOpenFile, openExistingFile)
  20. 2008-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  21. Fixed compile error on debian etch.
  22. The libc6 shipped with debian etch doesn't define ULLONG_MAX properly
  23. even if _GNU_SOURCE is defined. So define ULLONG_MAX in case when
  24. it is undefined.
  25. * src/Util.cc (ULLONG_MAX)
  26. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  27. Added epoll support. Use epoll if it is available. If not, use select.
  28. When async dns is enabled in compile time, epoll support is enabled
  29. only when aria2 is built with c-ares. This condition statement is
  30. defined in a2io.h.
  31. Currently aria2 supports both c-ares and ares, but ares is maintained
  32. for quite a while and debian already has c-ares package, ares support
  33. will be dropped in the future version.
  34. * configure.ac
  35. * src/AbstractCommand.cc
  36. * src/AsyncNameResolver.cc
  37. * src/AsyncNameResolver.h
  38. * src/Command.cc
  39. * src/Command.h
  40. * src/DownloadEngine.cc
  41. * src/DownloadEngine.h
  42. * src/PeerAbstractCommand.cc
  43. * src/SocketCore.cc
  44. * src/SocketCore.h
  45. * src/a2io.h
  46. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  47. * test/MetalinkEntryTest.cc: Added missing `defined' keyword to #if
  48. directive.
  49. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  50. Do not do write operation to /dev/null file.
  51. * src/LogFactory.cc
  52. * src/SimpleLogger.cc
  53. Replaced vasprintf with vsnprintf
  54. * src/SimpleLogger.cc (SimpleLogger::writeLog)
  55. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  56. * src/BtRequestMessage.cc
  57. (BtRequestMessage::onQueue): Given piece to RequestSlot. This is a fix
  58. for segmentation fault caused by previous commit.
  59. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  60. Reduced the usage of gettimeofday().
  61. * src/DefaultBtMessageDispatcher.cc
  62. (DefaultBtMessageDispatcher::checkRequestSlotAndDoNecessaryThing)
  63. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  64. * src/RequestSlot.cc
  65. * src/RequestSlot.h
  66. (RequestSlot::isTimeout)
  67. Made RequestSlot have a reference to Piece object to avoid find
  68. Piece repeatedly.
  69. * src/DefaultBtMessageDispatcher.cc
  70. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  71. * src/RequestSlot.cc
  72. * src/RequestSlot.h
  73. (RequestSlot::getPiece)
  74. * test/DefaultBtMessageDispatcherTest.cc
  75. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  76. * src/TimeA2.cc
  77. * src/TimeA2.h
  78. (Time::difference): New function.
  79. (Time::elapsed): Done optimization.
  80. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  81. * src/HelpItemFactory.cc: Added missing `defined' keyword to #if
  82. directive.
  83. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  84. * src/option_processing.cc: Added missing `defined' keyword to #if
  85. directive.
  86. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  87. Bump up version number to 0.13.2+1
  88. * src/configure.ac
  89. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  90. Refactored broken outstanding piece handling.
  91. * src/DefaultPieceStorage.cc
  92. * src/DefaultPieceStorage.h
  93. * src/Piece.cc
  94. * src/Piece.h
  95. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  96. Fixed compile error on Mac OS X 10.3.9. This error was caused by the
  97. name collision of static variable and predefined macro.
  98. * src/BtContext.cc
  99. * src/BtContext.h
  100. * src/CookieBoxFactory.cc
  101. * src/CookieBoxFactory.h
  102. * src/CookieParser.cc
  103. * src/CookieParser.h
  104. * src/DefaultBtContext.cc
  105. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  106. * src/RequestGroup.cc
  107. (RequestGroup::createInitialCommand): Use empty() instead of size().
  108. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  109. * Release 0.13.2
  110. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  111. Updated fr.po(thanks to Sebastien) and ja.po. ThanksDone make update-po
  112. * po/fr.po
  113. * po/ja.po
  114. * po/aria2c.pot
  115. * po/*.po
  116. * po/*.gmo
  117. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  118. Bump up version number to 0.13.2
  119. * src/configure.ac
  120. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  121. Refactord.
  122. * src/RequestGroupMan.cc
  123. (removeStoppedGroup)
  124. (fillRequestGroupFromReserver)
  125. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  126. Fixed compile error on Ubuntu.
  127. * src/BtPieceMessage.cc
  128. * src/MessageDigestHelper.cc
  129. * src/Util.cc
  130. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  131. Fixed compile error when configured with --disable-bittorrent
  132. * test/DownloadHandlerFactoryTest.cc
  133. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  134. Done make update-po
  135. * po/aria2c.pot
  136. * po/*.po
  137. * po/*.gmo
  138. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  139. Bump up version number to 0.13.2rc.
  140. * src/configure.ac
  141. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  142. Made option name bold. Updated SYNOPSIS to make it more readable.
  143. * doc/aria2c.1.txt
  144. * doc/aria2c.1
  145. * doc/aria2c.1.html
  146. * src/version_usage.cc
  147. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  148. Refactored. Use std::string instead of size and char*.
  149. * Data.cc
  150. * Data.h
  151. * test/Data.cc
  152. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  153. Added trimSelf(). Rewritten trim() to use trimSelf().
  154. * Util.cc
  155. * Util.h
  156. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  157. * src/ChunkChecksum.h (getChecksum): Return const reference.
  158. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  159. Fixed compile error when configured with --disable-metalink.
  160. Also moved test/DownloadHandlerFactoryTest.cc to SRC in Makefile.am.
  161. * test/FeatureConfigTest.cc
  162. * test/DownloadHandlerFactoryTest.cc
  163. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  164. Fixed compile error when configured with --without-gnutls
  165. --without-openssl
  166. * src/main.cc
  167. * test/DefaultBtProgressInfoFileTest.cc
  168. * test/SegmentManTest.cc
  169. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  170. Fixed compile error with OpenSSL.
  171. * src/IteratableChunkChecksumValidator.cc
  172. * src/LibsslDHKeyExchange.h
  173. * src/MessageDigestHelper.cc
  174. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  175. Revert the default value of --max-concurrent-downloads to 5.
  176. Revert the default value of --metalink-servers to 5.
  177. Man pages was also updated.
  178. * src/option_processing.cc
  179. * doc/aria2c.1.txt
  180. * doc/aria2c.1.html
  181. * doc/aria2c.1
  182. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  183. Returns const reference:
  184. DownloadContext::getPieceHash, DownloadContext::getName,
  185. DownloadContext::getPieceHashAlgo, DownloadContext::getDir,
  186. BtContext::getInfoHashAsString,
  187. * src/BtContext.h
  188. * src/DefaultBtContext.cc
  189. * src/DefaultBtContext.h
  190. * src/DownloadContext.h
  191. * src/SingleFileDownloadContext.h
  192. * test/MockBtContext.h
  193. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  194. * src/RequestGroup.h (getDir): Removed.
  195. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  196. Returns const reference. The internal urlencode function was optimized
  197. a little bit.
  198. * src/Request.cc
  199. * src/Request.h
  200. * src/HttpRequest.cc
  201. * src/HttpRequest.h
  202. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  203. Defined option name and possible values as std::string to reduce
  204. temporary string object creation in runtime.
  205. * src/HelpItemFactory.cc
  206. * src/LogFactory.cc
  207. * src/Option.cc
  208. * src/OptionHandlerFactory.cc
  209. * src/option_processing.cc
  210. * src/prefs.cc
  211. * src/prefs.h
  212. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  213. Return const reference.
  214. * src/DownloadHandlerConstants.cc
  215. * src/DownloadHandlerConstants.h
  216. (getMetalinkExtensions)
  217. (getMetalinkContentTypes)
  218. (getBtExtensions)
  219. (getBtContentTypes)
  220. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  221. * src/HttpHeader.cc (get): Rewritten.
  222. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  223. Make HttpHeader::getFirst(...) return const reference.
  224. * src/HttpHeader.cc
  225. * src/HttpHeader.h
  226. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  227. Use Option::getAsBool(...) instead of Option::get(...) and compare
  228. it with V_TRUE.
  229. * src/DefaultPieceStorage.cc
  230. * src/DownloadCommand.cc
  231. * src/FtpNegotiationCommand.cc
  232. * src/HttpRequest.cc
  233. * src/InitiateConnectionCommand.cc
  234. * src/RequestGroup.cc
  235. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  236. Made Option::get(...) return const reference of std::string.
  237. * src/Option.cc
  238. * src/Option.h
  239. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  240. Replaced std:copy with insert.
  241. * src/DefaultBtMessageDispatcher.cc
  242. * src/DefaultPieceStorage.cc
  243. * src/DownloadEngineFactory.cc
  244. * src/RequestGroup.cc
  245. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  246. Included SocketCore.h to fix compiler warning.
  247. * src/InitiateConnectionCommand.cc
  248. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  249. Put piece selection strategy algorithm to RarestPieceSelector class,
  250. Added a switch to choose whether randomized selection so that unit
  251. tests emit same results in, possibly, win32.
  252. * src/DefaultPieceStorage.cc
  253. * src/DefaultPieceStorage.h
  254. * src/RarestPieceSelector.cc
  255. * src/RarestPieceSelector.h
  256. * test/DefaultPieceStorageTest.cc
  257. * test/RarestPieceSelectorTest.cc
  258. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  259. Don't pool connection if HTTP proxy is enabled.
  260. * src/FtpFinishDownloadCommand.cc
  261. * src/FtpNegotiationCommand.cc
  262. * src/HttpSkipResponseCommand.cc
  263. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  264. Don't add closed socket to DownloadEngine::addSocketForReadCheck()
  265. * src/AbstractCommand.cc
  266. * src/AbstractCommand.h
  267. * src/ActivePeerConnectionCommand.cc
  268. * src/FtpInitiateConnectionCommand.cc
  269. * src/HttpInitiateConnectionCommand.cc
  270. * src/InitiateConnectionCommandFactory.cc
  271. * src/PeerAbstractCommand.cc
  272. * src/PeerAbstractCommand.h
  273. * src/PeerInitiateConnectionCommand.cc
  274. * src/TrackerWatcherCommand.cc
  275. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  276. Sort RequestSlot in ascending order and manipulate them using
  277. lower_bound.
  278. * src/DefaultBtMessageDispatcher.cc
  279. * src/DefaultBtMessageDispatcher.h
  280. (getMessageQueue): Added const qualifier.
  281. (getRequestSlots): Added const qualifier.
  282. (sendMessages): Use empty() instead of size().
  283. (doCancelSendingPieceAction): Use HandleEvent object.
  284. (doAbortOutstandingRequestAction): Rewritten.
  285. (doChokedAction): Rewritten.
  286. (checkRequestSlotAndDoNecessaryThing): Rewritten.
  287. (isOutstandingRequest): Rewritten.
  288. (getOutstandingRequest): Rewritten.
  289. (removeOutstandingRequest): Rewritten.
  290. (addOutstandingRequest): Rewritten.
  291. * src/RequestSlot.cc
  292. * src/RequestSlot.h
  293. (operator=): Rewritten.
  294. (operator!=): New function.
  295. (operator<): New function.
  296. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  297. * src/DefaultBtRequestFactory.cc
  298. (doChokedAction): Rewritten.
  299. (removeCompletedPiece): Rewritten.
  300. (removeTargetPiece): Rewritten.
  301. (createRequestMessages): Added the debug log.
  302. (createRequestMessagesOnEndGame: Added the debug log.
  303. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  304. Added the debug log message.
  305. * src/BtPieceMessage.cc (doReceivedAction)
  306. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  307. Sorted DHTPeerAnnounceEntry in a ascending order of info hash and
  308. used lower_bound to process them rather than linear search.
  309. * src/DHTPeerAnnounceStorage.cc
  310. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  311. Call subtractPieceStats from ~PeerInteractionCommand only when the
  312. peer has at least one completed piece.
  313. * src/Peer.cc
  314. * src/Peer.h
  315. * src/PeerInteractionCommand.cc
  316. * src/PeerSessionResource.cc
  317. * src/PeerSessionResource.h
  318. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  319. Removed unnecessary sorting
  320. * src/DefaultPieceStorage (DefaultPieceStorage)
  321. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  322. Rewritten the portion of the code that mangaes allowed fast indexes.
  323. * src/PeerSessionResource.cc
  324. * src/PeerSessionResource.h
  325. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  326. Removed the invalid string including '\r' from ru.po and
  327. did make update-po.
  328. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  329. Added --log-level and --summary-interval to man page.
  330. * doc/aria2c.1.txt
  331. * doc/aria2c.1.html
  332. * doc/aria2c.1
  333. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  334. Added --log-level option to specify log level. Log messages under
  335. the specified level are not output. Default value is `debug'.
  336. * src/HelpItemFactory.cc
  337. * src/LogFactory.cc
  338. * src/LogFactory.h
  339. * src/Logger.h
  340. * src/OptionHandlerFactory.cc
  341. * src/SimpleLogger.cc
  342. * src/SimpleLogger.h
  343. * src/main.cc
  344. * src/option_processing.cc
  345. * src/prefs.h
  346. * src/usage_text.h
  347. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  348. Print download progress summary of all parallel downloads in specified
  349. interval, default 60 secs. While aria2 could download several files
  350. in parallel (see -j option), it displayed just first download progress,
  351. and the other downloads are hidden from the users. This new feature
  352. prints all downloads currently in-progress to the console so that you
  353. can check the status of all downloads. The interval can be adjusted
  354. by --summary-interval option.
  355. The progress readout is now cut so that all fits in the one line of
  356. console.
  357. * src/ConsoleStatCalc.cc
  358. * src/ConsoleStatCalc.h
  359. * src/HelpItemFactory.cc
  360. * src/OptionHandlerFactory.cc
  361. * src/RequestGroupMan.cc
  362. * src/RequestGroupMan.h
  363. * src/main.cc
  364. * src/option_processing.cc
  365. * src/prefs.h
  366. * src/usage_text.h
  367. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  368. Call updateFdSet() to initialize rfdset, wfdset fdmax.
  369. * src/DownloadEngine.cc (DownloadEngine)
  370. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  371. Use free() to deallocate memory for _buffer if HAVE_POSIX_MEMALIGN is
  372. defined.
  373. * src/SingleFileAllocationIterator.cc (~SingleFileAllocationIterator)
  374. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  375. Use erase+lower_bound+insert instead of sort.
  376. * src/DefaultPieceStorage.cc (addPieceStats)
  377. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  378. Use A2STR::SHARP_C and A2STR::EQUAL_C.
  379. * src/A2STR.cc
  380. * src/A2STR.h
  381. * src/OptionParser.cc (parse)
  382. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  383. Defined fake filename `[tracker.announce]' as static const std::string.
  384. * src/TrackerWatcherCommand.cc (createRequestGroup)
  385. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  386. Defined default filename `index.html' as static const std::string
  387. * src/SingleFileDownloadContext.cc
  388. * src/SingleFileDownloadContext.h
  389. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  390. Defined "[MEMORY]" as static const std::string.
  391. * src/MemoryBufferPreDownloadHandler.cc (execute)
  392. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  393. Defined control file's version number as static const std::string.
  394. * src/DefaultBtProgressInfoFile.cc
  395. * src/DefaultBtProgressInfoFile.h
  396. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  397. Use Request::METHOD_GET
  398. * src/RequestGroup.cc (createNextCommandWithAdj)
  399. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  400. Defined "OK", "ERR", "INPR" as static const std::string
  401. * src/RequestGroupMan.cc (showDownloadResults)
  402. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  403. Defined default client used in extended handshake as static const
  404. std::string
  405. * src/DefaultBtInteractive.cc (addHandshakeExtendedMessageToQueue)
  406. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  407. Defined AUTH_HEADER, PROXY_AUTH_HEADER as static const std::string
  408. * src/HttpConnection.cc (eraseConfidentialInfo)
  409. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  410. Defined default ftp user and password as static const std::string
  411. * src/AuthConfigFactory.cc
  412. * src/AuthConfigFactory.h
  413. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  414. Defined strings used in netrc as static const std::string
  415. * src/Netrc.cc
  416. * src/Netrc.h
  417. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  418. Defined HTTP status as static const std::string
  419. * src/AbstractProxyResponseCommand.cc
  420. * src/HttpHeader.cc
  421. * src/HttpHeader.h
  422. * src/HttpResponse.cc
  423. * src/HttpResponseCommand.cc
  424. * src/HttpSkipResponseCommand.cc
  425. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  426. Defined "\r\n", "A", "I" as static const std::string
  427. * src/A2STR.cc
  428. * src/A2STR.h
  429. * src/FtpConnection.cc
  430. * src/FtpConnection.h
  431. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  432. Added COLON_C(".") and used it in Request::parseUrl()
  433. * src/A2STR.cc
  434. * src/A2STR.h
  435. * src/Request.cc (parseUrl)
  436. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  437. Changed the type of padName from `const std::string&' to `const char*'.
  438. * src/MSEHandshake.cc (verifyPadLength)
  439. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  440. Defined "sha1" as static const std::string.
  441. * src/MetalinkParserController.cc
  442. * src/MetalinkParserController.h
  443. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  444. Defined message digest algorithm name as static const std::string
  445. * src/DHTTokenTracker.cc
  446. * src/DHTUtil.cc
  447. * src/DefaultBtContext.cc
  448. * src/MSEHandshake.cc
  449. * src/MessageDigestHelper.cc
  450. * src/Peer.cc
  451. * src/messageDigest.cc
  452. * src/messageDigest.h
  453. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  454. Made string literals used in SAX parser static const std::string.
  455. * src/FileMetalinkParserState.cc
  456. * src/FileMetalinkParserState.h
  457. * src/FilesMetalinkParserState.cc
  458. * src/FilesMetalinkParserState.h
  459. * src/InitialMetalinkParserState.cc
  460. * src/InitialMetalinkParserState.h
  461. * src/MetalinkMetalinkParserState.cc
  462. * src/MetalinkMetalinkParserState.h
  463. * src/PiecesMetalinkParserState.cc
  464. * src/PiecesMetalinkParserState.h
  465. * src/ResourcesMetalinkParserState.cc
  466. * src/ResourcesMetalinkParserState.h
  467. * src/VerificationMetalinkParserState.cc
  468. * src/VerificationMetalinkParserState.h
  469. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  470. Use A2STR::SLASH_C, A2STR::DOT_C instead of "/", "." respectively.
  471. * src/A2STR.cc
  472. * src/A2STR.h
  473. * src/File.cc
  474. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  475. Defined static const std::string IP("ip"), PORT("port") and use them
  476. instead of string literals.
  477. * src/DefaultPeerListProcessor.cc
  478. * src/DefaultPeerListProcessor.h
  479. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  480. Made string literals for torrent file processing static const
  481. std::string.
  482. * src/BtContext.cc
  483. * src/BtContext.h
  484. * src/DefaultBtContext.cc
  485. * src/DefaultBtContext.h
  486. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  487. Made string literal for tracker response static const std::string
  488. * src/BtAnnounce.cc
  489. * src/BtAnnounce.h
  490. * src/DefaultBtAnnounce.cc
  491. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  492. Use DHTMessage::T instead of "t".
  493. * src/DHTMessageTracker.cc (messageArrived)
  494. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  495. Made keyName static const. Made trimmed charset static const
  496. std::string.
  497. * src/Util.cc (getContentDispositionFilename)
  498. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  499. Made USER_AGENT const. Made "/" static const std::string.
  500. * src/A2STR.cc
  501. * src/A2STR.h
  502. * src/HttpRequest.cc
  503. * src/HttpRequest.h
  504. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  505. Made string listeral to static const std::string:
  506. "Content-Range", "Content-Length"
  507. * src/HttpHeader.cc
  508. * src/HttpHeader.h
  509. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  510. Made string listeral to static const std::string.
  511. * src/HttpConnection.cc
  512. * src/HttpHeader.cc
  513. * src/HttpHeader.h
  514. * src/HttpResponse.cc
  515. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  516. Made string listeral to static const std::string.
  517. * src/A2STR.cc
  518. * src/A2STR.h
  519. * src/SimpleLogger.cc
  520. * src/SimpleLogger.h
  521. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  522. Made string literal to static const std::string.
  523. Rewritten CookieParser::setField.
  524. * src/A2STR.cc
  525. * src/A2STR.h
  526. * src/CookieBoxFactory.cc
  527. * src/CookieBoxFactory.h
  528. * src/CookieParser.cc
  529. * src/CookieParser.h
  530. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  531. Made string literal to static const std::string
  532. * src/DHTAbstractMessage.cc
  533. * src/DHTAnnouncePeerMessage.cc
  534. * src/DHTAnnouncePeerMessage.h
  535. * src/DHTAnnouncePeerReplyMessage.cc
  536. * src/DHTAnnouncePeerReplyMessage.h
  537. * src/DHTFindNodeMessage.cc
  538. * src/DHTFindNodeMessage.h
  539. * src/DHTFindNodeReplyMessage.cc
  540. * src/DHTFindNodeReplyMessage.h
  541. * src/DHTGetPeersMessage.cc
  542. * src/DHTGetPeersMessage.h
  543. * src/DHTGetPeersReplyMessage.cc
  544. * src/DHTGetPeersReplyMessage.h
  545. * src/DHTMessage.cc
  546. * src/DHTMessage.h
  547. * src/DHTMessageFactoryImpl.cc
  548. * src/DHTMessageReceiver.cc
  549. * src/DHTPingMessage.cc
  550. * src/DHTPingMessage.h
  551. * src/DHTPingReplyMessage.cc
  552. * src/DHTPingReplyMessage.h
  553. * src/DHTQueryMessage.cc
  554. * src/DHTQueryMessage.h
  555. * src/DHTResponseMessage.cc
  556. * src/DHTResponseMessage.h
  557. * src/DHTUnknownMessage.cc
  558. * src/DHTUnknownMessage.h
  559. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  560. Made string literal to static const std::string
  561. * src/BtChokeMessage.cc (toString)
  562. * src/BtHaveAllMessage.cc (toString)
  563. * src/BtHaveNoneMessage.cc (toString)
  564. * src/BtInterestedMessage.cc (toString)
  565. * src/BtNotInterestedMessage.cc (toString)
  566. * src/BtUnchokeMessage.cc (toString)
  567. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  568. Replaced "" with static const variable A2STR::NIL.
  569. Replaced string comparison against "" with std::string::empty().
  570. Added PROTO_* to Request class and use them as a protocol string
  571. constant.
  572. Made "started", "stopped", "completed" static const variable in
  573. AnnounceList class.
  574. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  575. Updated translations. Great thanks to translators.
  576. * po/ca.po
  577. * po/de.po
  578. * po/fr.po
  579. * po/it.po
  580. * po/ja.po
  581. * po/ru.po
  582. * po/zh_CN.po
  583. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  584. Updated man page; categorized options and fixed typo.
  585. * doc/aria2c.1.txt
  586. * doc/aria2c.1.html
  587. * doc/aria2c.1
  588. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  589. Removed const ref
  590. * src/MetalinkEntry.cc (AddProtocolPreference)
  591. * src/RequestGroup.cc (FindServerHostByHostname)
  592. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  593. Rewritten Accept-Features handling.
  594. * src/HttpRequestCommand.cc (createHttpRequest)
  595. * src/a2functional.h
  596. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  597. Changed method signature:
  598. DHTAbstractNodeLookupTask::toEntries
  599. * src/DHTAbstractNodeLookupTask.cc
  600. * src/DHTAbstractNodeLookupTask.h
  601. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  602. Changed method signature:
  603. BtContext::computeFastSet, DefaultBtContext::extractUrlList
  604. * src/BtContext.h
  605. * src/DefaultBtContext.cc
  606. * src/DefaultBtContext.h
  607. * src/DefaultBtInteractive.cc
  608. * test/DefaultBtContextTest.cc
  609. * test/MockBtContext.h
  610. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  611. Changed method signature:
  612. MultiFileAllocationIterator::makeDiskWriterEntries
  613. * src/MultiFileAllocationIterator.cc
  614. * src/MultiFileAllocationIterator.h
  615. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  616. Changed method sinature:
  617. MetalinkEntry::toFileEntry,
  618. MetalinkHelper::query, MetalinkHelper::parseAndQuery,
  619. Metalinker::queryEntry
  620. * src/Metalink2RequestGroup.cc
  621. * src/MetalinkEntry.cc
  622. * src/MetalinkEntry.h
  623. * src/MetalinkHelper.cc
  624. * src/MetalinkHelper.h
  625. * src/Metalinker.cc
  626. * src/Metalinker.h
  627. * src/main.cc
  628. * test/MetalinkHelperTest.cc
  629. * test/MetalinkerTest.cc
  630. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  631. Changed method sinature:
  632. RequestGroup::getURIs
  633. * src/RequestGroup.cc
  634. * src/RequestGroup.h
  635. * test/Metalink2RequestGroupTest.cc
  636. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  637. Changed method signature:
  638. PeerListProcessor::extractPeer
  639. * src/CompactPeerListProcessor.cc
  640. * src/CompactPeerListProcessor.h
  641. * src/DefaultBtAnnounce.cc
  642. * src/DefaultPeerListProcessor.cc
  643. * src/DefaultPeerListProcessor.h
  644. * src/DelegatingPeerListProcessor.cc
  645. * src/DelegatingPeerListProcessor.h
  646. * src/PeerListProcessor.h
  647. * src/UTPexExtensionMessage.cc
  648. * test/DefaultPeerListProcessorTest.cc
  649. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  650. Changed method signature:
  651. BtRequestFactory::createRequestMessages,
  652. BtRequestFactory::createRequestMessagesOnEndGame
  653. * src/BtRequestFactory.h
  654. * src/DefaultBtInteractive.cc
  655. * src/DefaultBtRequestFactory.cc
  656. * src/DefaultBtRequestFactory.h
  657. * test/DefaultBtRequestFactoryTest.cc
  658. * test/MockBtRequestFactory.h
  659. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  660. Changed method signature:
  661. PieceStorage::getInFlightPieces
  662. * src/DefaultBtProgressInfoFile.cc
  663. * src/DefaultPieceStorage.cc
  664. * src/DefaultPieceStorage.h
  665. * src/PieceStorage.h
  666. * src/UnknownLengthPieceStorage.cc
  667. * src/UnknownLengthPieceStorage.h
  668. * test/DefaultBtProgressInfoFileTest.cc
  669. * test/MockPieceStorage.h
  670. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  671. Changed method signature:
  672. PostDownloadHandler::getNextRequestGroups
  673. Metalink2RequestGroup::generate
  674. RequestGroup::postDownloadProcessing
  675. * src/BtPostDownloadHandler.cc
  676. * src/BtPostDownloadHandler.h
  677. * src/Metalink2RequestGroup.cc
  678. * src/Metalink2RequestGroup.h
  679. * src/MetalinkPostDownloadHandler.cc
  680. * src/MetalinkPostDownloadHandler.h
  681. * src/PostDownloadHandler.h
  682. * src/RequestGroup.cc
  683. * src/RequestGroup.h
  684. * src/RequestGroupMan.cc
  685. * src/main.cc
  686. * test/BtPostDownloadHandlerTest.cc
  687. * test/Metalink2RequestGroupTest.cc
  688. * test/MetalinkPostDownloadHandlerTest.cc
  689. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  690. Rewritten AccRequestGroup
  691. * src/main.cc
  692. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  693. Rewritten.
  694. * src/TaggedItem.cc (toTagString)
  695. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  696. Rewritten Accept-Features handling.
  697. * src/HttpRequestCommand.cc (createHttpRequest)
  698. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  699. Rewritten accept types handling.
  700. * HttpRequest.cc (createRequest)
  701. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  702. Rewritten
  703. * src/FeatureConfig.cc (featureSummary)
  704. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  705. Changed method signature:
  706. PeerStorage::getActivePeers
  707. * src/DHTPeerAnnounceEntry.cc
  708. * src/DefaultPeerStorage.cc
  709. * src/DefaultPeerStorage.h
  710. * src/PeerStorage.h
  711. * test/DefaultPeerStorageTest.cc
  712. * test/MockPeerStorage.h
  713. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  714. Changed method signature:
  715. DHTPeerAnnounceStorage::getPeers,
  716. DHTPeerAnnounceEntry::getPeers
  717. * src/DHTGetPeersMessage.cc
  718. * src/DHTPeerAnnounceEntry.cc
  719. * src/DHTPeerAnnounceEntry.h
  720. * src/DHTPeerAnnounceStorage.cc
  721. * src/DHTPeerAnnounceStorage.h
  722. * test/DHTAnnouncePeerMessageTest.cc
  723. * test/DHTPeerAnnounceEntryTest.cc
  724. * test/DHTPeerAnnounceStorageTest.cc
  725. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  726. Changed method signature:
  727. NameResolver::resolve
  728. * src/DHTEntryPointNameResolveCommand.cc
  729. * src/InitiateConnectionCommand.cc
  730. * src/NameResolver.cc
  731. * src/NameResolver.h
  732. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  733. Changed method signature:
  734. PieceStorage::getAdvertisedPieceIndexes
  735. * src/DefaultBtInteractive.cc
  736. * src/DefaultPieceStorage.cc
  737. * src/DefaultPieceStorage.h
  738. * src/PieceStorage.h
  739. * src/UnknownLengthPieceStorage.h
  740. * test/MockPieceStorage.h
  741. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  742. Changed method signature:
  743. SegmentMan::getInFlightSegment
  744. * src/AbstractCommand.cc
  745. * src/SegmentMan.cc
  746. * src/SegmentMan.h
  747. * test/SegmentManTest.cc
  748. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  749. Changed method signature:
  750. DHTAbstractNodeLookupTask::getNodesFromMessage
  751. * src/DHTAbstractNodeLookupTask.cc
  752. * src/DHTAbstractNodeLookupTask.h
  753. * src/DHTNodeLookupTask.cc
  754. * src/DHTNodeLookupTask.h
  755. * src/DHTPeerLookupTask.cc
  756. * src/DHTPeerLookupTask.h
  757. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  758. Pass std::deque<Command*> by reference to avoid unnecessary coping.
  759. * src/AbstractCommand.cc
  760. * src/BtCheckIntegrityEntry.cc
  761. * src/BtCheckIntegrityEntry.h
  762. * src/BtFileAllocationEntry.cc
  763. * src/BtFileAllocationEntry.h
  764. * src/BtSetup.cc
  765. * src/BtSetup.h
  766. * src/CheckIntegrityCommand.cc
  767. * src/CheckIntegrityEntry.h
  768. * src/ChecksumCheckIntegrityEntry.cc
  769. * src/ChecksumCheckIntegrityEntry.h
  770. * src/DHTSetup.cc
  771. * src/DHTSetup.h
  772. * src/DownloadEngine.cc
  773. * src/FileAllocationCommand.cc
  774. * src/FileAllocationEntry.h
  775. * src/RequestGroup.cc
  776. * src/RequestGroup.h
  777. * src/RequestGroupMan.cc
  778. * src/RequestGroupMan.h
  779. * src/StreamCheckIntegrityEntry.cc
  780. * src/StreamCheckIntegrityEntry.h
  781. * src/StreamFileAllocationEntry.cc
  782. * src/StreamFileAllocationEntry.h
  783. * src/TrackerWatcherCommand.cc
  784. * src/a2functional.h
  785. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  786. Changed method signature:
  787. BNode::findClosestKNodes, BNode:: enumerateBucket,
  788. DHTBucket::getGoodNodes,
  789. DHTRoutingTable::getClosestKNodes, DHTRoutingTable::getBuckets
  790. * src/BNode.cc
  791. * src/BNode.h
  792. * src/DHTAbstractNodeLookupTask.cc
  793. * src/DHTAutoSaveCommand.cc
  794. * src/DHTBucket.cc
  795. * src/DHTBucket.h
  796. * src/DHTBucketRefreshTask.cc
  797. * src/DHTFindNodeMessage.cc
  798. * src/DHTGetPeersMessage.cc
  799. * src/DHTRoutingTable.cc
  800. * src/DHTRoutingTable.h
  801. * test/BNodeTest.cc
  802. * test/DHTBucketTest.cc
  803. * test/DHTRoutingTableTest.cc
  804. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  805. In piece selection functions, Pass std::deque<...> by reference rather
  806. than returning it.
  807. * src/BitfieldMan.cc
  808. * src/BitfieldMan.h
  809. * src/DefaultBtRequestFactory.cc
  810. * src/DefaultPieceStorage.cc
  811. * src/Piece.cc
  812. * src/Piece.h
  813. * test/BitfieldManTest.cc
  814. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  815. Implemented rarest piece first piece selection strategy.
  816. * src/AbstractBtMessage.cc
  817. * src/AbstractBtMessage.h
  818. * src/BitfieldMan.cc
  819. * src/BitfieldMan.h
  820. * src/BtBitfieldMessage.cc
  821. * src/BtHaveAllMessage.cc
  822. * src/BtHaveMessage.cc
  823. * src/DefaultPieceStorage.cc
  824. * src/DefaultPieceStorage.h
  825. * src/PeerInteractionCommand.cc
  826. * src/PieceStorage.h
  827. * src/UnknownLengthPieceStorage.h
  828. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  829. Rewritten readData and writeData.
  830. * src/MultiDiskAdaptor.cc
  831. * src/MultiDiskAdaptor.h
  832. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  833. Move \n out of the message "Usage: ...".
  834. * src/version_usage.cc
  835. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  836. Bump up version number to 0.13.2b.
  837. * configure.ac
  838. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  839. Added const qualifier to argument Exception& e.
  840. * src/Logger.h
  841. * src/SimpleLogger.cc
  842. * src/SimpleLogger.h
  843. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  844. Pool connection when CWD, SIZE command fails.
  845. * src/FtpNegotiationCommand.cc
  846. * src/FtpNegotiationCommand.h
  847. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  848. Renamed HttpNullDownloadCommand as HttpSkipResponseCommand
  849. * src/HttpResponseCommand.cc
  850. * src/HttpSkipResponseCommand.cc
  851. * src/HttpSkipResponseCommand.h
  852. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  853. Pool connection when a server returns 4xx, 5xx responses.
  854. * src/HttpNullDownloadCommand.cc
  855. * src/HttpNullDownloadCommand.h
  856. * src/HttpResponse.cc
  857. * src/HttpResponse.h
  858. * src/HttpResponseCommand.cc
  859. * src/HttpResponseCommand.h
  860. * test/HttpResponseTest.cc
  861. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  862. Print usage when no URL is specifed or bad command-line option is
  863. specified.
  864. * src/HelpItemFactory.cc
  865. * src/help_tags.h
  866. * src/option_processing.cc
  867. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  868. Removed duplicate log message.
  869. * src/AbstractCommand.cc (asyncResolveHostname)
  870. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  871. Updated man page: --async-dns and --ftp-reuse-connection were added.
  872. Changed -j option's default value from 5 to 1.
  873. Added new examples using protocol auto detection feature.
  874. Removed -T, -M usage where it can be omitted.
  875. * doc/aria2c.1.txt
  876. * doc/aria2c.1.html
  877. * doc/aria2c.1.txt
  878. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  879. Updated command-line usage text, so that it tells users that they
  880. can specify any number of torrent files and metalink files in
  881. command-line.
  882. * src/version_usage.cc
  883. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  884. Changed the default value of -j option to 1.
  885. * src/HelpItemFactory.cc
  886. * src/option_processing.cc
  887. * src/usage_text.h
  888. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  889. Added the ability to reuse connection in FTP and it is enabled by
  890. default. It can be disabled by --ftp-reuse-connection=false option.
  891. * src/Command.cc
  892. * src/DownloadCommand.cc
  893. * src/FtpDownloadCommand.cc
  894. * src/FtpDownloadCommand.h
  895. * src/FtpFinishDownloadCommand.cc
  896. * src/FtpFinishDownloadCommand.h
  897. * src/FtpInitiateConnectionCommand.cc
  898. * src/FtpNegotiationCommand.cc
  899. * src/FtpNegotiationCommand.h
  900. * src/HelpItemFactory.cc
  901. * src/Makefile.am
  902. * src/Makefile.in
  903. * src/OptionHandlerFactory.cc
  904. * src/option_processing.cc
  905. * src/prefs.h
  906. * src/usage_text.h
  907. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  908. Call Command::transitStatus() before calling Command::execute(),
  909. so that the status change made in execute() is not cleared.
  910. * src/DownloadEngine.cc
  911. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  912. Removed forward declaration of SocketCore class.
  913. * src/HttpDownloadCommand.h
  914. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  915. Set Request::setKeepAliveHint() and Request::setPipeliningHint()
  916. in InitiateConnectionCommandFactory. They should be set only when
  917. the protocol is HTTP or HTTPS.
  918. * src/InitiateConnectionCommandFactory.cc
  919. * src/RequestGroup.cc
  920. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  921. Fixed infinite loop in checksum checking.
  922. * src/IteratableChecksumValidator.cc
  923. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  924. Set _supportsPersistentConnection to true by default.
  925. * src/Request.cc
  926. * src/RequestGroup.cc
  927. * test/HttpRequestTest.cc
  928. * test/RequestTest.cc
  929. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  930. Added timeout to socket pool. The default timeout is 15 seconds,
  931. which is the same value Apache uses.
  932. * src/DownloadEngine.cc
  933. * src/DownloadEngine.h
  934. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  935. Fixed misuse of multimap::find()
  936. * src/HttpHeader.cc
  937. * test/HttpHeaderTest.cc
  938. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  939. Rewritten name resolver. Now async DNS can be disabled by --async-dns
  940. option.
  941. The asynchronous DNS is not capable of IPv6 yet.
  942. By disabling asynchronous DNS, aria2 is IPv6 enabled application, at
  943. least for HTTP download.
  944. * src/AbstractCommand.cc
  945. * src/AbstractCommand.h
  946. * src/AsyncNameResolver.cc
  947. * src/AsyncNameResolver.h
  948. * src/DHTEntryPointNameResolveCommand.cc
  949. * src/DHTEntryPointNameResolveCommand.h
  950. * src/DownloadEngine.cc
  951. * src/DownloadEngine.h
  952. * src/FtpInitiateConnectionCommand.cc
  953. * src/FtpInitiateConnectionCommand.h
  954. * src/HelpItemFactory.cc
  955. * src/HttpInitiateConnectionCommand.cc
  956. * src/HttpInitiateConnectionCommand.h
  957. * src/InitiateConnectionCommand.cc
  958. * src/InitiateConnectionCommand.h
  959. * src/Makefile.am
  960. * src/Makefile.in
  961. * src/NameResolver.cc
  962. * src/NameResolver.h
  963. * src/OptionHandlerFactory.cc
  964. * src/SocketCore.cc
  965. * src/SocketCore.h
  966. * src/Util.cc
  967. * src/Util.h
  968. * src/option_processing.cc
  969. * src/prefs.h
  970. * src/usage_text.h
  971. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  972. Updated man page: --quiet, --header were added.
  973. --metalink-servers and --enable-http-keep-alive option were updated.
  974. * doc/aria2c.1
  975. * doc/aria2c.1.html
  976. * doc/aria2c.1.txt
  977. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  978. Enable HTTP keep-alive by default.
  979. * src/HelpItemFactory.cc
  980. * src/option_processing.cc
  981. * src/usage_text.h
  982. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  983. Disable http keep-alive if the remote server is not HTTP/1.1.
  984. * src/HttpConnection.cc
  985. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  986. Receive content body of 302 response so that the connection can be
  987. reused later when http keep-alive is enabled.
  988. * src/HttpNullDownloadCommand.cc
  989. * src/HttpNullDownloadCommand.h
  990. * src/HttpResponseCommand.cc
  991. * src/HttpResponseCommand.h
  992. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  993. const SharedHandle<Request> -> const SharedHandle<Request>&
  994. * src/FtpDowndloadCommand.cc
  995. * src/FtpDowndloadCommand.h
  996. * src/HttpDownloadCommand.cc
  997. * src/HttpDownloadCommand.h
  998. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  999. Fixed the bug that the control file(.aria2 file) is not renamed
  1000. according to tryAutoFileRenaming().
  1001. tryAutoFileRenaming() was rewritten so that if both renamed file and
  1002. its control file exist, use them and continue download.
  1003. The old implementation didn't take into account of control file's
  1004. existence, so basically you couldn't continue download of renamed file.
  1005. * src/BtProgressInfoFile.h
  1006. * src/DefaultBtProgressInfoFile.cc
  1007. * src/DefaultBtProgressInfoFile.h
  1008. * src/NullProgressInfoFile.h
  1009. * src/RequestGroup.cc
  1010. * test/DefaultBtProgressInfoFileTest.cc
  1011. * test/MockBtProgressInfoFile.h
  1012. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1013. Change the default value of --metalink-servers option from `5' to `1'.
  1014. * src/HelpItemFactory.cc
  1015. * src/option_processing.cc
  1016. * src/usage_text.h
  1017. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1018. Reimplemented transparent metalink using Accept request header.
  1019. * src/HttpRequest.cc
  1020. * src/HttpRequest.h
  1021. * src/HttpRequestCommand.cc
  1022. * src/Metalink2RequestGroup.cc
  1023. * src/RequestGroup.cc
  1024. * src/RequestGroup.h
  1025. * test/HttpRequestTest.cc
  1026. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1027. Bump up version number to 0.13.2a
  1028. * configure.ac
  1029. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1030. Updated configure.ac using the result of autoscan.
  1031. * configure.ac
  1032. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1033. Fixed compilation error without gcrypt/openssl.
  1034. * src/DownloadCommand.cc
  1035. * src/DownloadCommand.h
  1036. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1037. Reorganized version information so that it can be displayed in a
  1038. standard terminal screen without scrolling.
  1039. Removed http, ftp from Configuration section, because they are always
  1040. enabled.
  1041. * src/FeatureConfig.cc
  1042. * src/FeatureConfig.h
  1043. * src/main.cc
  1044. * src/messageDigest.cc
  1045. * src/messageDigest.h
  1046. * src/version_usage.cc
  1047. * test/FeatureConfigTest.cc
  1048. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1049. Masked user ID in log.
  1050. * src/FtpConnection.cc (sendUser)
  1051. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1052. Removed query part from filename in HTTP download. The query part means
  1053. the substring after "?" in URL. Firefox seems do the same thing.
  1054. A query part is sometimes very long and not suitable to filename,
  1055. so I think it is better to remove it from filename.
  1056. * src/HttpRequest.cc
  1057. * src/HttpRequest.h
  1058. * src/Request.cc
  1059. * src/Request.h
  1060. * test/HttpRequestTest.cc
  1061. * test/RequestTest.cc
  1062. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1063. Rewritten Exception class. Throw exception object, not its pointer and
  1064. catch by reference, so that remove problematic delete operator for
  1065. catched exception.
  1066. * src/Exception.cc
  1067. * src/Exception.h
  1068. * test/ExceptionTest.cc
  1069. * src/*: All files throwing/catching exception.
  1070. * test/*: All files throwing/catching exception.
  1071. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1072. Now auto protocol detection is enabled without -Z option.
  1073. But there is a important difference between with/without -Z optoin.
  1074. For example, if you type:
  1075. aria2c http://host/file file1.torrent file2.metalink http://mirror/file
  1076. then, aria2 interprets there are 3 request groups:
  1077. (1) http://host/file, http://mirror/file <-- multi-source download
  1078. (2) file1.torrent
  1079. (3) file2.metalink
  1080. On the other hand, if you invoke above command with -Z option, it is
  1081. interpreted as 4 request groups:
  1082. (1) http://host/file
  1083. (2) file1.torrent
  1084. (3) file2.metalink
  1085. (4) http://mirror/file
  1086. I think usually user don't mix multi-source URLs and torrent files, so
  1087. there is no big problem here.
  1088. * src/main.cc
  1089. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1090. Fixed the bug that causes segmentaion fault when reading XML containing
  1091. unescapsed character like '&'.
  1092. Also a modification was made which avoids adding unnecessary
  1093. characters stack and appending unused string.
  1094. * src/ExpatMetalinkProcessor.cc
  1095. * src/FileMetalinkParserState.h
  1096. * src/FilesMetalinkParserState.h
  1097. * src/FinMetalinkParserState.h
  1098. * src/HashMetalinkParserState.h
  1099. * src/InitialMetalinkParserState.h
  1100. * src/LanguageMetalinkParserState.h
  1101. * src/MetalinkMetalinkParserState.h
  1102. * src/MetalinkParserState.h
  1103. * src/MetalinkParserStateMachine.cc
  1104. * src/MetalinkParserStateMachine.h
  1105. * src/OSMetalinkParserState.h
  1106. * src/PieceHashMetalinkParserState.h
  1107. * src/PiecesMetalinkParserState.h
  1108. * src/ResourcesMetalinkParserState.h
  1109. * src/SizeMetalinkParserState.h
  1110. * src/SkipTagMetalinkParserState.h
  1111. * src/URLMetalinkParserState.h
  1112. * src/VerificationMetalinkParserState.h
  1113. * src/VersionMetalinkParserState.h
  1114. * src/XML2SAXMetalinkProcessor.cc
  1115. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1116. Added StringFormat class, which internally calls vasprintf.
  1117. operator<< is defined for this class, so it can be used with iostream
  1118. classes nicely. SimpleLogger and following functions are rewritten
  1119. using StringFormat class.
  1120. Besides, now Logger class's methods are non-const, many classes
  1121. that has a const Logger* as a member variable are modified to remove
  1122. const qualifier from the variable declaration.
  1123. * src/HelpItemFactory.cc
  1124. * src/Request.cc
  1125. * src/SimpleLogger.cc
  1126. * src/StringFormat.cc
  1127. * src/StringFormat.h
  1128. * src/Util.cc
  1129. * src/option_processing.cc
  1130. * src/version_usage.cc
  1131. * test/StringFormatTest.cc
  1132. * src/*.h: The classes that has const Logger* as a member variable.
  1133. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1134. Log error in AccRequestGroup when reading BitTorrent/Metalink file is
  1135. failed. Also fixed memory link when exception is thrown there.
  1136. * src/main.cc (AccRequestGroup)
  1137. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1138. Added build-in "Accept-Features" support. For now only "metalink" is
  1139. used in this header field.
  1140. This "metalink" value is removed from the list when connecting URLs
  1141. fed by metalink file to avoid loop in "transparent" metlaink.
  1142. * src/HttpRequest.cc
  1143. * src/HttpRequest.h: Renamed _userHeaders as _headers. Accept-Features
  1144. header is also held in this variable. Also renamed setUserHeaders as
  1145. addHeader and it was rewritten to add header not just to clear the old
  1146. value.
  1147. * src/HttpRequestCommand.cc
  1148. * src/Metalink2RequestGroup.cc: Added the code to remove "metalink"
  1149. from "Accept-Features" list.
  1150. * src/RequestGroup.cc: Added "metalink" to "Accept-Features" by
  1151. default.
  1152. * src/RequestGroup.h
  1153. * src/TaggedItem.cc: Moved Concat class to a2functional.h.
  1154. * src/a2functional.h: Included <string> because Concat class depends on
  1155. it.
  1156. * test/HttpRequestTest.cc
  1157. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1158. Added comment
  1159. * src/RequestGroup.cc (createNextCommand)
  1160. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1161. Capitalized METHOD_GET and METHOD_HEAD
  1162. * src/Request.cc
  1163. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1164. Added getDownloadResults() method
  1165. * src/RequestGroupMan.cc
  1166. * src/RequestGroupMan.h
  1167. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1168. Fixed the bug that aria2 exits when commands is empty() but
  1169. _routineCommands are not.
  1170. * src/DownloadEngine.cc
  1171. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1172. Use the default value pulled from Option object in HelpItemFactory.
  1173. except options whose defualt value is embedded in a usage text.
  1174. * src/HelpItemFactory.cc
  1175. * src/HelpItemFactory.h
  1176. * src/option_processing.cc
  1177. * src/version_usage.cc
  1178. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1179. Added --quiet option to make aria2 quiet (no console output).
  1180. --quiet option is tagged with ADVANCED.
  1181. * src/HelpItemFactory.cc
  1182. * src/LogFactory.cc
  1183. * src/LogFactory.h
  1184. * src/MultiUrlRequestInfo.cc
  1185. * src/MultiUrlRequestInfo.h
  1186. * src/NullStatCalc.h: New class. This class prints nothing.
  1187. * src/OptionHandlerFactory.cc
  1188. * src/main.cc
  1189. * src/option_processing.cc
  1190. * src/prefs.h
  1191. * src/usage_text.h
  1192. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1193. Add HTTP tag to --header option. Removed ADVANCED tag instead.
  1194. * src/HelpItemFactory.cc (createHelpItems):
  1195. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1196. Fixed compilation error in ExpatMetalinkProcessor.cc
  1197. * src/ExpatMetalinkProcessor.cc
  1198. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1199. Reuse socket if the origin server supports HTTP keep-alive and
  1200. --enable-http-keep-alive or --enable-http-pipelining is given.
  1201. The current implementation doesn't reuse the connections established
  1202. against proxy server.
  1203. * src/AbstractCommand.cc
  1204. * src/DownloadEngine.cc
  1205. * src/DownloadEngine.h
  1206. * src/HttpDownloadCommand.cc
  1207. * src/HttpInitiateConnectionCommand.cc
  1208. * src/HttpResponseCommand.cc
  1209. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1210. Rewritten HTTP keep-alive and pipelining routine.
  1211. * src/AbstractCommand.cc
  1212. * src/HttpConnection.cc
  1213. * src/HttpDownloadCommand.cc
  1214. * src/HttpRequest.cc
  1215. * src/HttpRequestCommand.cc
  1216. * src/HttpResponseCommand.cc
  1217. * src/Request.cc
  1218. * src/Request.h
  1219. * src/RequestGroup.cc
  1220. * test/HttpRequestTest.cc
  1221. * test/HttpResponseTest.cc
  1222. * test/RequestTest.cc
  1223. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1224. Added missing setUserHeaders call
  1225. * src/HttpRequestCommand.cc
  1226. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1227. Call FileAllocationMan::nextFileAllocationEntryExists() first.
  1228. Calling FileAllocationMan::isFileAllocationBeingExecuted() is somwhat
  1229. waste of time because it is more likey false.
  1230. * src/FileAllocationDispatcherCommand.cc (execute)
  1231. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1232. Now HTTP status and version are a member variable of HttpHeader.
  1233. HTTP status is processed as a string, not integer.
  1234. * src/AbstractProxyResponseCommand.cc
  1235. * src/HttpConnection.cc
  1236. * src/HttpHeader.cc
  1237. * src/HttpHeader.h
  1238. * src/HttpHeaderProcessor.cc
  1239. * src/HttpHeaderProcessor.h
  1240. * src/HttpResponse.cc
  1241. * src/HttpResponse.h
  1242. * test/HttpHeaderProcessorTest.cc
  1243. * test/HttpResponseTest.cc
  1244. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1245. Added --header option. You can specify any number of additional HTTP headers
  1246. like:
  1247. aria2 --header="X-A: 300" --header="X-B: 900" http://host/file
  1248. Unlike other commad-line option, you can use --header option multiple times.
  1249. * src/HelpItemFactory.cc
  1250. * src/HttpRequest.{cc, h}
  1251. * src/HttpRequestCommand.cc
  1252. * src/OptionHandlerFactory.cc
  1253. * src/OptionHandlerImpl.h
  1254. * src/option_processing.cc
  1255. * src/prefs.h
  1256. * src/usage_text.h
  1257. * test/HttpRequestTest.cc (testUserHeaders)
  1258. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1259. Eliminates the time lag between sequential downloads and commands in
  1260. the same RequestGroup.
  1261. In old implementation, aria2 occasionally waits 1 seconds before
  1262. executing next command or RequestGroup.
  1263. This is really a waste of time, and new implementation eliminates
  1264. this unnecessary time lag.
  1265. * src/AbstractCommand.cc
  1266. * src/AutoSaveCommand.cc
  1267. * src/CheckIntegrityCommand.cc
  1268. * src/Command.{cc, h}
  1269. * src/DownloadEngine.{cc, h}
  1270. * src/DownloadEngineFactory.cc
  1271. * src/FileAllocationCommand.cc
  1272. * src/FileAllocationDispatcherCommand.cc
  1273. * src/FillRequestGroupCommand.cc
  1274. * src/FtpInitiateConnectionCommand.cc
  1275. * src/HaveEraseCommand.cc
  1276. * src/HttpInitiateConnectionCommand.cc
  1277. * src/HttpResponseCommand.cc
  1278. * src/RealtimeCommand.cc
  1279. * src/RequestGroup.cc
  1280. * src/RequestGroupMan.cc
  1281. * src/StreamFileAllocationEntry.cc
  1282. * src/TimeBasedCommand.{cc, h}
  1283. * src/TimedHaltCommand.cc
  1284. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1285. Rewritten SharedHandle. Now copy constructor taking raw pointer has
  1286. keyword explicit and SharedHandle's default constructor initializes
  1287. its internal obj to null, old implementation initializes it using
  1288. obj's default constructor.
  1289. To assign null, write SharedHandle<T> x(...); x.reset();
  1290. TODO: test/SharedHandleTest.cc needs more tests.
  1291. * src/SharedHandle.h
  1292. 2008-04-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1293. Fixed type in man page.
  1294. * doc/aria2c.1.txt
  1295. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1296. Merged Ross's 0.13.1+1 Cygwin compile fix patch.
  1297. * src/SimpleLogger.{cc, h}
  1298. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1299. Implemented auto protocol detection.
  1300. Now you can do:
  1301. aria2c -Z http://host/file file1.torrent file2.metalink
  1302. (Note: -Z option is required for auto protcol detection.)
  1303. Then aria2c downloads 3 files simultaneously:
  1304. 1. http://host/file
  1305. 2. file1.torrent <-- read local torrent file
  1306. 3. file2.metalink <-- read local Metalink file.
  1307. Same thing goes with -i option. Assume your uris.txt contans:
  1308. http://host/file
  1309. file1.torrent
  1310. file2.metalink
  1311. Then you can do: aria2c -i uris.txt
  1312. (Note: -Z option is not needed if -i option is given.)
  1313. * src/main.cc
  1314. * src/ProtocolDetector.{cc, h}
  1315. * test/ProtocolDetectorTest.cc
  1316. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1317. Fixed compile error without gnutls/libgcrypt/libgpg-error and openSSL
  1318. installed
  1319. * src/ARC4Encryptor.h
  1320. * src/ARC4Decryptor.h
  1321. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1322. Renamed argument from 'errno' to 'err', since errno is confused with
  1323. errno defined in errno.h.
  1324. * src/LibgcryptARC4Decryptor.h
  1325. * src/LibgcryptARC4Context.h
  1326. * src/LibgcryptDHKeyExchange.h
  1327. * src/LibgcryptARC4Encryptor.h
  1328. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1329. Rewritten choking algorithm.
  1330. * src/PeerChokeCommand.{cc, h}
  1331. * src/BtInterestedMessage.cc
  1332. * src/PeerSessionResource.{cc, h}
  1333. * src/DefaultPeerStorage.{cc, h}
  1334. * src/BtNotInterestedMessage.cc
  1335. * src/DefaultBtMessageDispatcher.{cc, h}
  1336. * src/BtMessageDispatcher.h
  1337. * src/Peer.{cc, h}
  1338. * src/BtLeecherStateChoke.{cc, h}
  1339. * src/BtSetup.cc
  1340. * src/BtSeederStateChoke.{cc, h}
  1341. * src/PeerStorage.h
  1342. * test/MockPeerStorage.h
  1343. * test/MockBtMessageDispatcher.h
  1344. 2008-04-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1345. Fixed compilation error on x84-64 platform.
  1346. * src/AuthConfig.cc: Included ostream.
  1347. 2008-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1348. Rewritten getBasename() and getDirname(), without standard library
  1349. basename(), dirname().
  1350. * src/File.cc
  1351. * test/FileTest.cc
  1352. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1353. Added Simplified Chinese translation. Also updated the following
  1354. translations: Polish, Dutch, German. Great thanks to all translators.
  1355. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1356. Suppress content-range error when 'Content-Range' response header
  1357. doesn't contains bytes-unit specifier 'bytes'
  1358. * src/HttpHeader.cc (getRange)
  1359. * test/HttpHeaderTest.cc
  1360. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1361. Fixed compilation error with g++-4.3
  1362. 2008-03-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1363. Added missing include files for MinGW
  1364. * test/HttpHeaderProcessorTest.cc
  1365. * test/DHTRoutingTableSerializerTest.cc
  1366. * test/DHTRoutingTableDeserializerTest.cc
  1367. * test/UriListParserTest.cc
  1368. 2008-03-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1369. Now download line is printed nicely with no garbage at the end of
  1370. line. I use ioctl to get the columns of terminal.
  1371. If stdout is redirected to another device, instead of carriage return,
  1372. end of line '\n' character is used. This is feature request#1909659
  1373. * src/ConsoleStatCalc.cc (calculateStat)
  1374. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1375. Included a2time.h
  1376. * src/DHTMessageDispatcher.h
  1377. * src/DHTMessageEntry.h
  1378. * src/DHTReplaceNodeTask.h
  1379. * src/DHTMessageTracker.h
  1380. * src/Util.h
  1381. * src/CookieBox.h
  1382. * src/SocketCore.h
  1383. * src/DefaultBtMessageDispatcher.h
  1384. * src/SocketCore.cc
  1385. * src/Util.cc
  1386. * src/DHTPingTask.h
  1387. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1388. Fixed high memory footprint when DHT is enabled.
  1389. This is not a memory leak, but DHTReplaceNodeTask is more frequently
  1390. queued than it is processed and the queue is getting longer. As a
  1391. consequence, momory usage is increased.
  1392. As for a fix, instead of issuing DHTReplaceNodeTask, I've implemented
  1393. replacement cache in DHTBucket which is described in Kademlia paper.
  1394. * src/DHTRoutingTable.cc (addNode): Removed the issuing of
  1395. DHTReplaceNodeTask.
  1396. * src/DHTBucket.{h, cc}
  1397. (cacheNode): New function.
  1398. (getCachedNodes): New function.
  1399. (dropNode): Push back cached node to _nodes.
  1400. * test/DHTBucketTest.cc
  1401. (testCacheNode): New test
  1402. (testDropNode): New test
  1403. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1404. Allocate memory for peekBuf in initiateSecureConnection() to avoid
  1405. the unused 4KB memory when ssl is not used.
  1406. * src/SocketCore.cc
  1407. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1408. Added summary log for peer announce storage.
  1409. * src/DHTPeerAnnounceStorage.cc (handleTimeout)
  1410. Removed cast
  1411. * src/DefaultPeerStorage.cc (addPeer)
  1412. Log exception message
  1413. * src/DHTMessageTracker.cc (handleTimeout)
  1414. Fixed casting
  1415. * test/HttpRequestTest.cc
  1416. * test/MetalinkProcessorTest.cc
  1417. * test/PieceTest.cc
  1418. * test/MetalinkEntryTest.cc
  1419. * test/SequenceTest.cc
  1420. 2008-03-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1421. * src/ParameterizedStringParser.cc (createLoop):
  1422. Removed unused variable sstep.
  1423. * src/AlphaNumberDecorator.h (decode): Rewritten.
  1424. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1425. * src/Util.{h, cc}
  1426. (parseUInt): New function.
  1427. (alphaToNum): Now returns unsigned int and 0 when overflow detected.
  1428. The actual range is uint32_t.
  1429. * test/UtilTest.cc
  1430. * src/ParameterizedStringParser.cc:
  1431. Use Util::parseUInt() for loop variables.
  1432. * test/ParameterizedStringParserTest.cc
  1433. * src/PStringNumLoop.h: Make _startValue and _endValue unsigned int.
  1434. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1435. Rewritten the functions for binding port.
  1436. * src/DHTConnectionImpl.{h, cc}
  1437. * src/PeerListenCommand.{h, cc}
  1438. * src/DHTSetup.cc
  1439. * src/BtSetup.cc
  1440. * test/DHTConnectionImplTest.cc
  1441. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1442. type cleanup for allmost all remaining files.
  1443. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1444. Type clarification
  1445. * src/PeerSessionResource.{h, cc}
  1446. * src/DefaultPieceStorage.{h, cc}
  1447. * src/Peer.{h, cc}
  1448. * test/PeerSessionResourceTest.cc
  1449. Use div function
  1450. * src/BtPieceMessage.cc (erasePieceOnDisk)
  1451. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1452. Type clarification
  1453. * src/DefaultPeerStorage.{h, cc}
  1454. * test/DefaultPeerStorageTest.cc
  1455. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1456. Type clarification: size_t for length or size, uint64_t for file
  1457. length, off_t for file offset.
  1458. * src/DefaultBtProgressInfoFile.cc
  1459. * src/DefaultBtContext.{h, cc}
  1460. * src/DefaultBtInteractive.cc
  1461. * src/DownloadCommand.{h, cc}
  1462. * src/IteratableChunkChecksumValidator.{h, cc}
  1463. * src/SegmentMan.{h, cc}
  1464. * src/SingleFileDownloadContext.{h, cc}
  1465. * src/IteratableChecksumValidator.{h, cc}
  1466. * src/BtContext.h
  1467. * src/IteratableValidator.h
  1468. * src/DownloadContext.h
  1469. * test/SingleFileDownloadContextTest.cc
  1470. * test/DefaultBtContextTest.cc
  1471. * test/MockBtContext.h
  1472. * test/Metalink2RequestGroupTest.cc
  1473. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1474. Type clarification: size_t for length or size, uint64_t for file
  1475. length, off_t for file offset.
  1476. * src/PiecedSegment.cc
  1477. * src/GrowSegment.h
  1478. * src/DefaultBtRequestFactory.h
  1479. * src/DefaultBtProgressInfoFile.cc
  1480. * src/UnknownLengthPieceStorage.h
  1481. * src/DefaultPieceStorage.cc
  1482. * src/UnknownLengthPieceStorage.cc
  1483. * src/DefaultBtInteractive.cc
  1484. * src/GrowSegment.cc
  1485. * src/BitfieldMan.h
  1486. * src/DownloadCommand.cc
  1487. * src/BtRequestFactory.h
  1488. * src/PiecedSegment.h
  1489. * src/DefaultPieceStorage.h
  1490. * src/Piece.cc
  1491. * src/DefaultBtRequestFactory.cc
  1492. * src/PieceStorage.h
  1493. * src/Segment.h
  1494. * src/Piece.h
  1495. * src/BitfieldMan.cc
  1496. * src/Util.cc
  1497. * test/DefaultBtProgressInfoFileTest.cc
  1498. * test/DefaultPieceStorageTest.cc
  1499. * test/MockPieceStorage.h
  1500. * test/BtRequestMessageTest.cc
  1501. * test/DefaultBtMessageDispatcherTest.cc
  1502. * test/BitfieldManTest.cc
  1503. * test/GrowSegmentTest.cc
  1504. * test/PieceTest.cc
  1505. * test/SegmentTest.cc
  1506. * test/SegmentManTest.cc
  1507. * test/DefaultBtRequestFactoryTest.cc
  1508. * test/MockBtRequestFactory.h
  1509. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1510. Fixed compilation error with --disable-nls
  1511. It seems that defining gettext(Msgid) to ((const char *) (Msgid))
  1512. in gettext.h causes the problem.
  1513. * src/common.h
  1514. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1515. Removed subPiece related functions.
  1516. * src/Piece.{h, cc} : Also rewritten getCompletedLength().
  1517. * src/DefaultPieceStorage.{h, cc}
  1518. * test/PieceTest.cc
  1519. * test/DefaultPieceStorageTest.cc
  1520. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1521. Use unsigned char for data store.
  1522. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1523. Bump up version number to 0.13.0+1
  1524. * configure.ac
  1525. * Release 0.13.0+1
  1526. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1527. Changed inactive connection timeout to 120.
  1528. To accept more mulually interested peers, disconnect peer when there
  1529. is no interest between us after certain time passed.
  1530. * src/DefaultBtInteractive.cc (checkActiveInteraction)
  1531. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1532. Fixed the bug that aria2 only uses first dns server in resolv.conf
  1533. when compiled with async DNS support.
  1534. * src/DownloadEngine.cc
  1535. * src/option_processing.cc: Lengthened DNS timeout to 30. I think old
  1536. value '10' will be a little bit short when some DNS servers are
  1537. offline and several DNS servers are tried. It should be configured
  1538. by command-line option.
  1539. 2008-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1540. Merged Ross's mingw patch.
  1541. * src/DHTRoutingTableDeserializer.cc
  1542. * src/DHTRoutingTableSerializer.cc
  1543. * src/Platform.{h, cc}
  1544. * src/timegm.h
  1545. * src/gettimeofday.h
  1546. * src/getaddrinfo.h
  1547. * src/SocketCore.h
  1548. * src/common.h
  1549. * src/inet_aton.h
  1550. * src/DownloadEngine.h
  1551. * src/gai_strerror.h
  1552. * src/a2netcompat.h
  1553. * configure.ac
  1554. * configure
  1555. * aclocal.m4
  1556. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1557. Included missing iostream.
  1558. * test/AllTest.cc
  1559. * test/BtDependencyTest.cc
  1560. * test/BtExtendedMessageTest.cc
  1561. * test/DHTConnectionImplTest.cc
  1562. * test/DHTMessageFactoryImplTest.cc
  1563. * test/DHTMessageTrackerEntryTest.cc
  1564. * test/DHTNodeTest.cc
  1565. * test/DHTRoutingTableSerializerTest.cc
  1566. * test/DefaultBtAnnounceTest.cc
  1567. * test/DefaultBtContextTest.cc
  1568. * test/DefaultBtMessageFactoryTest.cc
  1569. * test/DefaultExtensionMessageFactoryTest.cc
  1570. * test/HandshakeExtensionMessageTest.cc
  1571. * test/HttpResponseTest.cc
  1572. * test/MetalinkProcessorTest.cc
  1573. * test/MultiFileAllocationIteratorTest.cc
  1574. * test/SocketCoreTest.cc
  1575. * test/UTPexExtensionMessageTest.cc
  1576. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1577. Reorganized includes.
  1578. * src/NameResolver.cc
  1579. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1580. Fixed compilation error without ares/c-ares
  1581. * src/NameResolver.h:
  1582. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1583. Added a test for large file.
  1584. * test/MetalinkProcessorTest.cc (testLargeFileSize):
  1585. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1586. Fixed the bug that file size is ignored if size > INT32_MAX
  1587. * src/SizeMetalinkParserState.cc (endElement):
  1588. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1589. Bump up version number to 0.13.0
  1590. * configure.ac
  1591. * Release 0.13.0
  1592. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1593. Updated Makfefile.am to make 'make dist' work.
  1594. Now packaged filename is aria2c-VERSION.tar.bz2.
  1595. Added README, README.html, and aria2c.1.html to dist_doc_DATA.
  1596. Added LICENSE.OpenSSL to dist_noinst_DATA.
  1597. Large file support is now configured by configure script.
  1598. * configure.ac
  1599. Removed unsused source files
  1600. * src/
  1601. * test/
  1602. Removed PeerDecl.h and BtContextDecl.h. typedefs are removed to
  1603. Peer.h and BtContext.h respectively.
  1604. * src/Peer.h
  1605. * src/BtContext.h
  1606. Updated translations.
  1607. Added Polish, Thai, Indonesian, Norwegian Nynorsk, Hungarian
  1608. translations. Great thanks to all translators!;)
  1609. * po/*.{po, gmo}
  1610. 2008-02-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1611. Create MessageDigestHelper::staticSHA1DigestInit() which uses
  1612. statically declared sha1 MessageDigestContext.
  1613. * src/BtPieceMessage.cc: Use staticSHA1DigestInit() to avoid
  1614. initialization of short-lived MessageDigestContext.
  1615. * src/MessageDigestHelper.{h, cc}
  1616. * src/main.cc
  1617. Now DownloadCommand has a reference to MessageDigestContext to avoid
  1618. the initialization of MessageDigestContext every time in validating
  1619. chunk checksum.
  1620. * src/DownloadCommand.{h, cc}
  1621. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1622. Add a file descriptor which connected to fast peer(latency<1500) to
  1623. select(). This change reduced CPU load.
  1624. * src/PeerInteractionCommand.cc
  1625. * src/DefaultBtInteractive.{h, cc}
  1626. * src/BtInteractive.h
  1627. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1628. Fixed the previous insufficient fix for possible busy loop.
  1629. * src/MSEHandshake.cc (identifyHandshakeType)
  1630. Removed unused functions.
  1631. * src/MSEHandshake.{h, cc} (readDataAndDecrypt)
  1632. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1633. Fixed possible busy loop if first 20 bytes are not received for a few
  1634. minutes.
  1635. * src/MSEHandshake.{h, cc} (identifyHandshakeType)
  1636. * src/ReceiverMSEHandshakeCommand.cc
  1637. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1638. Fixed compilation error
  1639. * src/ExpatMetalinkProcessor.cc
  1640. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1641. Fixed compile error on Mac OS X, on 64Bit OS maybe.
  1642. * src/DHTBucket.cc
  1643. Removed unnecessary cast.
  1644. * src/HandshakeExtensionMessage.cc
  1645. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1646. Fixed the bug that option handler for PREF_METALINK_ENABLE_UNIQUE_PROTOCOL.
  1647. is missing.
  1648. * src/OptionHandlerFactory.cc
  1649. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1650. Fixed the bug that HAVE message is not sent for a piece they are
  1651. downloaded fom http/ftp server before any BitTorrent handshake is done
  1652. with peers.
  1653. * src/DefaultBtInteractive.cc
  1654. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1655. Removed RequestInfo.h and FileAllocator.h since they have been removed.
  1656. * src/Makefile.am
  1657. * src/Makefile.in
  1658. 2008-02-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1659. Updated README. Added html version of README and man page.
  1660. * README
  1661. * README.html
  1662. * readme2html: Shell script to generate README.html from README using
  1663. asciidoc.
  1664. * doc/aria2c.1.html
  1665. * doc/makeman: Added the line to generate aria2c.1.html
  1666. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1667. Fixed offset calculation.
  1668. * src/LibgcryptDHKeyExchange.h (computeSecret)
  1669. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1670. Rewritten itos and uitos using template. llitos and ullitos are
  1671. replaced with itos and uitos respectively.
  1672. * src/Util.{h, cc}
  1673. * test/UtilTest.cc
  1674. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1675. Fixed the bug that DH key exchange sometimes fails due to bad handling
  1676. of the number of bytes required for storing public key and shared
  1677. secret.
  1678. * src/LibgcryptDHKeyExchange.h
  1679. * src/LibsslDHKeyExchange.h: Also added function name to handleError.
  1680. * src/MSEHandshake.cc
  1681. * test/DHKeyExchangeTest.cc
  1682. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1683. Removed since they are not used.
  1684. * src/Xml2MetalinkProcessor.{h, cc}
  1685. * src/Socket.cc
  1686. * src/SegmentSplitter.{h, cc}
  1687. * test/Xml2MetalinkProcessorTest.cc
  1688. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1689. Fixed the bug that prevents aria2 from stopping other than by pressing
  1690. Ctrl-C in BitTorrent download. It is reproducible using --seed-time
  1691. option. aria2 doesn't stop even after --seed-time is satisfied and
  1692. continues to output blank lines in the console.
  1693. * src/ReceiverMSEHandshakeCommand.cc
  1694. * src/PeerReceiveHandshakeCommand.cc
  1695. * src/PeerListenCommand.cc
  1696. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1697. Bump up version number to 0.13.0rc
  1698. * configure.ac
  1699. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1700. Updated man page and some usage text.
  1701. * doc/aria2c.1.txt
  1702. * src/usage_text.h
  1703. * po/*.{po, gmo}
  1704. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1705. Updated translations. Added Finnish and Hebrew translations.
  1706. Great thanks to all translators!
  1707. * po/*.{po, gmo}
  1708. * po/LINGUAS
  1709. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1710. Log more detailed information about each message.
  1711. * src/DHTQueryMessage.{h, cc}
  1712. * src/DHTGetPeersMessage.{h, cc}
  1713. * src/DHTFindNodeReplyMessage.{h, cc}
  1714. * src/DHTGetPeersReplyMessage.{h, cc}
  1715. * src/DHTAnnouncePeerMessage.{h, cc}
  1716. * src/DHTResponseMessage.{h, cc}
  1717. * src/DHTFindNodeMessage.{h, cc}
  1718. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1719. Use constants defined in prefs.h
  1720. * src/option_processing.cc
  1721. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1722. * test/AllTest.cc: Added OpenSSL, GNUTLS initialization code.
  1723. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1724. Make room for future enchancements for IPv6 addresses.
  1725. Bump up version number of dht.dat file format to 2.
  1726. Not compatible with previous version.
  1727. * src/DHTRoutingTableSerializer.cc
  1728. * src/DHTRoutingTableDeserializer.cc
  1729. * test/DHTRoutingTableSerializerTest.cc
  1730. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1731. Added handling for the return values from
  1732. PeerMessageUtil::createcompact().
  1733. * src/DefaultBtContext.cc (computeFastSet):
  1734. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1735. Fixed abort when peer's ip address is IPv4-mapped address.
  1736. * src/DefaultBtContext.cc (computeFastSet)
  1737. Removed number-and-dots criteria, since Util::isNumberAndDotsNotation()
  1738. cannot handle IPv4-mapped addresses.
  1739. * src/DefaultBtInteractive.cc (addPeerExchangeMessage)
  1740. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1741. Proper return value handling for OpenSSL functions.
  1742. * src/LibsslDHKeyExchange.h
  1743. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1744. Random bytes generation using libgcrypt and OpenSSL.
  1745. * src/DHTUtil.{h, cc}
  1746. * test/DHTUtilTest.cc
  1747. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1748. Fixed segmentation fault when a DHT message which doesn't have 'y' key
  1749. received.
  1750. * src/DHTMessageReceiver.cc (receiveMessage)
  1751. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1752. Fixed the bug that a return code is always 0. BUG#1897704
  1753. If error occurred during the download or there exist unfinished
  1754. downloads, aria2 returns with code 1.
  1755. * src/RequestGroupMan.{h, cc}
  1756. * src/MultiUrlRequestInfo.{h, cc}
  1757. * src/main.cc
  1758. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1759. IPv6 support for SocketCore class.
  1760. TODO: In SocketCore::establishConnection(), this is insufficient to
  1761. determin the failure of connect() here because the socket is
  1762. non-blocking state. The next addresses should be tried after select().
  1763. TODO: NameResolver still uses c-ares(<= 1.4) ares_gethostbyname().
  1764. If c-ares 1.5 or newer is installed, ares_getaddrinfo() should be used
  1765. instead which address family independent.
  1766. TODO: DHTRoutingTable{Deserializer,Serializer} currently saves peer
  1767. information in a compact peer format which is for IPv4 only.
  1768. Some BitTorrent functions in PeerMessageUtil still depends on IPv4 but
  1769. this is a spec of BitTorrent protocol.
  1770. * src/SocketCore.{h, cc}
  1771. * src/PeerMessageUtil.cc
  1772. * test/SocketCoreTest.cc
  1773. * test/PeerMessageUtilTest.cc
  1774. * test/DHTConnectionImplTest.cc
  1775. Handle IPv4-mapped addresses.
  1776. * src/DHTNode.cc: Now identity is determined by node id.
  1777. * src/DHTMessageTrackerEntry.cc
  1778. Because now PeerMessageUtil::unpackcompact() could fail, the caller
  1779. should handle it.
  1780. * src/DHTRoutingTableDeserializer.cc
  1781. * src/DHTMessageFactoryImpl.cc
  1782. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1783. Change the unit of --stop option from a minute to a second.
  1784. * src/usage_text.h
  1785. * src/DownloadEngineFactory.cc
  1786. * src/OptionHandlerFactory.cc
  1787. * src/message.h
  1788. * src/TimedHaltCommand.cc
  1789. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1790. Make listening socket non-block mode.
  1791. * src/FtpConnection.cc
  1792. * src/FtpNegotiationCommand.{h, cc}
  1793. * src/PeerListenCommand.cc
  1794. Fixed the bug that cause slow ftp negotiation.
  1795. * src/FtpNegotiationCommand.{h, cc}
  1796. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1797. Added basic tag to --enable-dht, --dht-listen-port option.
  1798. * src/HelpItemFactory.cc (createHelpItems)
  1799. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1800. Updated text.
  1801. * src/usage_text.h
  1802. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1803. * src/MSEHandshake.cc (encryptAndSendData): Use std::min().
  1804. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1805. Determin _threadtholdSpeed in each constructor for
  1806. ActivePeerConnectionCommand and PeerReceiveHandshakeCommand.
  1807. * src/ActivePeerConnectionCommand.{h, cc}
  1808. * src/PeerReceiveHandshakeCommand.{h, cc}
  1809. * src/BtSetup.cc
  1810. * src/BtConstants.h
  1811. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1812. Added --bt-min-crypto-level and --bt-require-crypto options.
  1813. * src/OptionHandlerFactory.cc
  1814. * src/MSEHandshake.cc
  1815. * src/HelpItemFactory.cc
  1816. * src/option_processing.cc
  1817. * src/ReceiverMSEHandshakeCommand.cc
  1818. * src/prefs.h
  1819. * src/DefaultBtAnnounce.cc
  1820. * src/InitiatorMSEHandshakeCommand.cc
  1821. * src/usage_text.h
  1822. * test/MSEHandshakeTest.cc
  1823. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1824. Bump version number to 0.13.0b
  1825. * configure.ac
  1826. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1827. Updated doc.
  1828. * src/MessageDigestHelper.h:
  1829. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1830. Use raw message digest as a token instead of its hexadecimal
  1831. representation.
  1832. * src/DHTTokenTracker.cc (generateToken)
  1833. 2008-02-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1834. Added Message Stream Encryption(MSE) support.
  1835. Currently, aria2 accepts incoming connections with Obfuscation Header
  1836. and legacy BitTorrent Header and establishes connections with
  1837. Obfuscation Header first and if failed then retry with legacy
  1838. BitTorrent header. If plain text and ARC4 is provided, aria2 always
  1839. choose ARC4. The new option to change the default behavior is planned.
  1840. For tracker extension, "supportcrypto=1" is added statically.
  1841. * src/PeerInitiateConnectionCommand.{h, cc}
  1842. * src/PeerConnection.{h, cc}
  1843. * src/HandleRegistry.h
  1844. * src/SocketCore.h
  1845. * src/PeerReceiveHandshakeCommand.{h, cc}
  1846. * src/BtRegistry.{h, cc}
  1847. * src/PeerListenCommand.cc
  1848. * src/InitiatorMSEHandshakeCommand.{h, cc}
  1849. * src/ReceiverMSEHandshakeCommand.{h, cc}
  1850. * src/MSEHandshake.{h, cc}
  1851. * src/ARC4Encryptor.h
  1852. * src/ARC4Decryptor.h
  1853. * src/LibgcryptARC4Encryptor.h
  1854. * src/LibgcryptARC4Decryptor.h
  1855. * src/LibgcryptARC4Context.h
  1856. * src/LibsslARC4Encryptor.h
  1857. * src/LibsslARC4Decryptor.h
  1858. * src/LibsslARC4Context.h
  1859. * src/DHKeyExchange.h
  1860. * src/LibgcryptDHKeyExchange.h
  1861. * src/LibsslDHKeyExchange.h
  1862. * src/DefaultBtAnnounce.cc: Just added "supportcrypto=1" parameter.
  1863. * test/DefaultBtAnnounceTest.cc
  1864. * test/ARC4Test.cc
  1865. * test/DHKeyExchangeTest.cc
  1866. Removed prepareForRetry() because it is not used.
  1867. * src/PeerAbstractCommand.{h, cc}
  1868. * src/PeerInteractionCommand.{h, cc}
  1869. * src/PeerInitiateConnectionCommand.{h, cc}
  1870. 2008-02-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1871. Added the ability to load nodes from torrent file. These nodes are
  1872. added to the routing table when downloading that torrent.
  1873. * src/BtContext.h
  1874. * src/DefaultBtContext.{h, cc}
  1875. * src/DHTSetup.cc
  1876. * src/DHTEntryPointNameResolveCommand.{h, cc}: Now accepts list of
  1877. hostname and port pair, and resolves all of them.
  1878. * src/NameResolver.{h, cc}: Added reset().
  1879. * src/RequestGroup.cc
  1880. * test/DefaultBtContextTest.cc
  1881. * test/MockBtContext.h
  1882. Removed assert() from DefaultBtContext and throw exception instead.
  1883. * src/DefaultBtContext.cc
  1884. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1885. Fixed segmentation fault bug when exiting if dht is disabled.
  1886. * src/RequestGroup.cc
  1887. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1888. Fixed typo in log message and define the message in message.h
  1889. * src/TimedHaltCommand.cc
  1890. * src/message.h
  1891. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1892. Included RecoverableException.h to fix compilation error.
  1893. * test/DHTMessageFactoryImplTest.cc
  1894. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1895. Added test 'testDoReceivedAction' for DHTQueryMessage subclasses.
  1896. * test/DHTPingMessageTest.cc
  1897. * test/DHTGetPeersMessageTest.cc
  1898. * test/DHTFindNodeMessageTest.cc
  1899. * test/DHTAnnouncePeerMessageTest.cc
  1900. * test/MockDHTMessage.h
  1901. * test/MockDHTMessageFactory.h
  1902. * test/MockDHTMessageDispatcher.h: New class.
  1903. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1904. Added DHTMessageDispatcherImpl. Now DHTMessageDispatcher is pure
  1905. virtual.
  1906. * src/DHTMessageDispatcher.h
  1907. * src/DHTMessageDispatcherImpl.{h, cc}
  1908. * src/DHTSetup.cc
  1909. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1910. Adding handling of DHT error message. Just log error message and
  1911. throw exception.
  1912. * src/DHTMessageFactoryImpl.cc
  1913. * test/DHTMessageFactoryImplTest.cc
  1914. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1915. Added handling of dynamic cast failure.
  1916. * src/DHTNodeLookupTask.cc
  1917. * src/DHTPeerLookupTask.cc
  1918. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1919. Added the ability to stop aria2 itself when given time has passed
  1920. from start. Use --stop option to specify time in minutes.
  1921. When 0 is given, this feature is disabled.
  1922. * src/OptionHandlerFactory.cc
  1923. * src/TimeBasedCommand.h: Make _interval protected scope.
  1924. * src/HelpItemFactory.cc
  1925. * src/option_processing.cc
  1926. * src/prefs.h
  1927. * src/FillRequestGroupCommand.cc: Evaluate _e->isHaltRequested()
  1928. before calling RequestGroupMan::fillRequestGroupFromReserver().
  1929. Without this modification, the result list shows "ERR" when aria2 is
  1930. stopped by --stop option. It should be "INPR".
  1931. * src/DownloadEngine.{h, cc}
  1932. * src/DownloadEngineFactory.cc
  1933. * src/usage_text.h
  1934. * src/TimedHaltCommand.{h, cc}: New class.
  1935. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1936. Bootstrap through node added by port message.
  1937. Currently bootstrap is executed if the number of buckets in routing
  1938. table is 1.
  1939. * src/BtPortMessage.{h, cc}
  1940. * src/DefaultBtMessageFactory.{h, cc}
  1941. * src/PeerInteractionCommand.cc
  1942. * test/BtPortMessageTest.cc
  1943. * test/MockDHTTask.h
  1944. 2008-02-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1945. Extract the Peer class's member variables, which are only needed after
  1946. PeerInteractionCommand, into PeerSessionResource class.
  1947. This class is instantiated in PeerInteractionCommand class's ctor and
  1948. released in its dtor.
  1949. This will make Peer class lightweight and uses less memory for peers
  1950. which are not connected and wait in the queue.
  1951. * src/PeerChokeCommand.cc
  1952. * src/PeerSessionResource.{h, cc}
  1953. * src/PeerInteractionCommand.cc
  1954. * src/PeerAbstractCommand.cc: Note: 0 is given to onAbort() function.
  1955. * src/DefaultBtInteractive.cc
  1956. * src/BtPieceMessage.cc
  1957. * src/BtInterestedMessage.cc
  1958. * src/BtUnchokeMessage.cc
  1959. * src/DefaultPeerStorage.{h, cc}
  1960. * src/PeerInitiateConnectionCommand.cc
  1961. * src/ActivePeerConnectionCommand.cc
  1962. * src/BtNotInterestedMessage.cc
  1963. * src/DefaultBtMessageDispatcher.cc
  1964. * src/BtChokeMessage.cc
  1965. * src/BtRequestMessage.cc
  1966. * src/Peer.{h, cc}
  1967. * src/BtRegistry.h
  1968. * src/TrackerWatcherCommand.cc
  1969. * src/PeerReceiveHandshakeCommand.cc
  1970. * test/BtExtendedMessageTest.cc
  1971. * test/BtAllowedFastMessageTest.cc
  1972. * test/BtCancelMessageTest.cc
  1973. * test/DefaultPieceStorageTest.cc
  1974. * test/BtBitfieldMessageTest.cc
  1975. * test/BtHaveMessageTest.cc
  1976. * test/BtNotInterestedMessageTest.cc
  1977. * test/BtRequestMessageTest.cc
  1978. * test/PeerSessionResourceTest.cc
  1979. * test/DefaultBtMessageDispatcherTest.cc
  1980. * test/PeerTest.cc
  1981. * test/BtInterestedMessageTest.cc
  1982. * test/BtRejectMessageTest.cc
  1983. * test/BtChokeMessageTest.cc
  1984. * test/DefaultPeerStorageTest.cc
  1985. * test/BtHaveNoneMessageTest.cc
  1986. * test/BtHaveAllMessageTest.cc
  1987. * test/DefaultExtensionMessageFactoryTest.cc
  1988. * test/BtUnchokeMessageTest.cc
  1989. * test/DefaultBtMessageFactoryTest.cc
  1990. * test/HandshakeExtensionMessageTest.cc
  1991. * test/UTPexExtensionMessageTest.cc
  1992. * test/DefaultBtRequestFactoryTest.cc
  1993. * test/BtPieceMessageTest.cc
  1994. Removed typedef PeerStats.
  1995. * src/PeerStat.h
  1996. * src/SegmentMan.cc
  1997. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1998. Added std namespace to copy, remove_copy, back_inserter,
  1999. front_inserter.
  2000. * src/RequestGroupMan.cc
  2001. * src/DefaultPieceStorage.cc
  2002. * src/StreamFileAllocationEntry.cc
  2003. * src/BtFileAllocationEntry.cc
  2004. * src/RequestGroup.cc
  2005. * src/MetalinkEntry.cc
  2006. * src/DelegatingPeerListProcessor.cc
  2007. * src/DefaultBtRequestFactory.cc
  2008. * src/DefaultBtMessageDispatcher.cc
  2009. * src/version_usage.cc: Included <algorithm>
  2010. * src/main.cc
  2011. * src/MetalinkParserController.cc
  2012. * src/DefaultBtContext.cc
  2013. * src/DownloadEngineFactory.cc
  2014. * src/a2algo.h
  2015. Removed.
  2016. * test/StreamUriListParserTest.cc
  2017. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2018. Use PREF_MAX_DOWNLOAD_LIMIT as a threshold for
  2019. ActivePeerConnectionCommand when it is given and
  2020. PREF_MAX_DOWNLOAD_LIMIT < default threshold.
  2021. * src/ActivePeerConnectionCommand.{h, cc}
  2022. * src/BtSetup.cc
  2023. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2024. Only add socket to DownloadEngine's select routine when peer or
  2025. localhost is unchoked and interested. This lowers CPU usage a
  2026. little bit.
  2027. * src/PeerInteractionCommand.cc
  2028. * src/PeerAbstractCommand.{h, cc}
  2029. * src/BtInteractive.h
  2030. * src/DefaultBtInteractive.{h, cc}
  2031. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2032. Revert previous change because get_peers message is needed for
  2033. announce_peer anyway.
  2034. * src/DHTGetPeersCommand.cc
  2035. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2036. Request peers thought DHT only when download hasn't finished.
  2037. * src/DHTGetPeersCommand.cc
  2038. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2039. Force refresh bucket when startup if certain time has passed(currently 15 minutes).
  2040. * src/DHTBucketRefreshTask.{h, cc}
  2041. * src/DHTSetup.cc
  2042. 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2043. Removed "using namespace std;" from all sources. Appended std:: prefix to c++
  2044. standard classes.
  2045. Included string.h where mem* function are used.
  2046. Added namespace aria2.
  2047. 2008-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2048. Create directory before saving DHT routing table.
  2049. Now ios::failure is now handled properly.
  2050. * src/DHTAutoSaveCommand.cc
  2051. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2052. Removed unnecessary cerr.
  2053. * src/DownloadEngine.cc
  2054. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2055. Catch exception inside DHTMessageReceiver::receiveMessage().
  2056. Log unknown message.
  2057. * src/DHTMessageReceiver.{h, cc}
  2058. * src/DHTMessageFactory.h
  2059. * src/DHTMessageFactoryImpl.{h, cc}
  2060. * src/DHTMessageTracker.cc (handleTimeout): Catch and handle exception.
  2061. * src/DHTInteractionCommand.cc
  2062. * src/DHTUnknownMessage.{h, cc}
  2063. * test/DHTUnknownMessageTest.cc
  2064. * test/MockDHTMessageFactory.h
  2065. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2066. Commented out ip address comparison because a host can have multiple
  2067. ip addresses and it is hard to predict the hostname is resolved into
  2068. which one.
  2069. * test/SocketCoreTest.cc (testWriteAndReadDatagram)
  2070. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2071. * po/Makefile.in: Removed since this is generated by configure.
  2072. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2073. Fixed compiler warning about redefinition of SIZE_MAX.
  2074. Use common.h instead of config.h directly here.
  2075. * src/Platform.{h, cc}
  2076. The check of ENABLE_NLS is made in gettext.h, so it is not required
  2077. here.
  2078. * common.h
  2079. 2008-02-02 gettextize <bug-gnu-gettext@gnu.org>
  2080. Updated gettext related files.
  2081. * configure.ac (AC_CONFIG_FILES): Add intl/Makefile.
  2082. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17.
  2083. 2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2084. Added DHT functionality, compatible with mainline.
  2085. DHT is disabled by default. To enable it, give --enable-dht to aria2c.
  2086. You may need to specify entry point to DHT network using
  2087. --dht-entry-point. DHT uses UDP port to listen incoming message.
  2088. Use --dht-listen-port to specify port number. Make sure that your
  2089. firewall configuration can pass through UDP traffic to the port.
  2090. The routing table is saved in $HOME/.aria2/dht.dat.
  2091. * src/DHT*
  2092. * src/BNode.{h, cc}
  2093. * src/PeerInteractionCommand.cc: enable DHT functionality for a
  2094. particular torrent.
  2095. * src/Data.cc: Rewritten ctor.
  2096. * src/OptionHandlerFactory.cc: Added --enable-dht, --dht-listen-port,
  2097. --dht-entry-point.
  2098. * src/DefaultBtInteractive.cc: Send port message if dht is enabled.
  2099. * src/RequestGroup.cc: Initialize DHT functionality. When download
  2100. ends, remove BtContext from DHTPeerAnnounceStorage.
  2101. * src/BtPortMessage.{h, cc}: Rewritten.
  2102. * src/message.h
  2103. * src/OptionHandlerImpl.cc
  2104. * src/option_processing.cc: Added --enable-dht, --dht-listen-port,
  2105. --dht-entry-point.
  2106. * src/Dictionary.{h, cc} (remove): New function.
  2107. * src/prefs.h
  2108. * src/DefaultBtMessageFactory.h
  2109. * src/BtHandshakeMessage.cc
  2110. * src/ActivePeerConnectionCommand.cc
  2111. * src/SocketCore.{h, cc}: Added datagram socket support.
  2112. * src/DefaultBtMessageFactory.cc
  2113. * src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
  2114. Create DHT commands.
  2115. * src/BtMessageFactory.h
  2116. * src/PeerMessageUtil.{h, cc}
  2117. 2008-01-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2118. Fixed the bug that log file is not written when configuration file doesn't exist.
  2119. This is caused by using Logger class before LogFactory is not configured.
  2120. BUG #1875079
  2121. * src/option_processing.cc
  2122. Warning message "configuration doesn't exist" is only printed when --conf is
  2123. given.
  2124. * src/option_processing.cc
  2125. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2126. Use BencodeVisitor and MessageDigestHelper instead of ShaVisitor.
  2127. ShaVisitor is now deprecated and slated to be removed.
  2128. * src/DefaultBtContext.cc
  2129. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2130. Externalize message to message.h
  2131. * src/Platform.cc
  2132. * src/message.h
  2133. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2134. Set default domain and default path to cookie.
  2135. * src/HttpResponse.cc
  2136. * src/CookieBox.{h, cc}
  2137. * src/CookieParser.{h, cc}
  2138. * test/CookieParserTest.cc
  2139. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2140. Added --no-conf and --conf-path command-line option.
  2141. --no-conf option disables loading aria2.conf file.
  2142. --conf-path option changes the configuration file path. The default
  2143. file path is $HOME/.aria2/aria2.conf
  2144. Added a warning message when the configuration file is not found.
  2145. * src/HelpItemFactory.cc
  2146. * src/option_processing.cc
  2147. * src/prefs.h
  2148. * src/usage_text.h
  2149. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2150. Added the message to inform users that other help categories are
  2151. available in -h option.
  2152. * src/version_usage.cc
  2153. * src/TagContainer.{h, cc}
  2154. * test/TagContainerTest.cc
  2155. * src/TaggedItem.{h, cc}
  2156. * test/TaggedItemTest.cc
  2157. * src/HelpItem.h
  2158. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2159. Added Piece::getFirstMissingBlockIndexWithoutLock() and it is called
  2160. from PiecedSegment's ctor.
  2161. Previously Piece::getAllMissingBlockIndexes() is called from
  2162. PiecedSegment() but it is rather expensive since only first element is
  2163. used.
  2164. * src/PiecedSegment.cc
  2165. * src/Piece.{h, cc}
  2166. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2167. Rewritten get*Missing*Index functions. Now no need to allocate memory
  2168. each time these functions are called.
  2169. * src/BitfieldMan.{h, cc}
  2170. * test/BitfieldManTest.cc
  2171. * src/array_fun.h
  2172. * test/array_funTest.cc
  2173. Now BitfieldMan::countBlock() returns BitfieldMan::blocks.
  2174. Added new BitfieldMan::countFilteredBlock() to get the number of blocks
  2175. filtered. Removed unnecessary cast to int32_t.
  2176. * src/BitfieldMan.{h, cc}
  2177. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2178. Fixed the bug that EX_TOO_LONG_PAYLOAD exception is thrown if just
  2179. payload length(4bytes) are received. This happens because lenbufLength
  2180. is not updated in this particular case and successive call of
  2181. receiveMessage() overwrites payload length with bytes recieved which
  2182. are payload body.
  2183. * src/PeerConnection.{h, cc}
  2184. * src/message.h
  2185. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2186. Fixed the bug that DefaultPeerStorage::returnPeer() may delete wrong
  2187. peer if there are peers that have same ipaddr and port.
  2188. I've experiened segmentation fault and "pure virtual function was
  2189. called" error.
  2190. * src/Peer.h
  2191. * test/PeerTest.cc
  2192. * src/DefaultPeerStorage.cc
  2193. * test/DefaultPeerStorageTest.cc
  2194. 2008-01-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2195. Removed a call to isPowerOf() because it is no longer necessary here
  2196. and a request block is not always power of 2.
  2197. BUG#1866924
  2198. * src/PeerMessageUtil.cc (checkLength)
  2199. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2200. Fixed the bug that always first found Segment is removed from
  2201. usedSegmentEntries. Removed unused functions.
  2202. * src/SegmentMan.{h, cc}
  2203. * test/SegmentManTest.cc
  2204. Fixed the bug that ServerHost is not removed.
  2205. * src/RequestGroup.cc
  2206. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2207. Fixed the bug that SegmentMan::completeSegment() is not called
  2208. even if Segment is complete when --lowest-speed-limit is enabled.
  2209. BUG#1864525
  2210. * src/DownloadCommand.{h, cc}
  2211. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2212. Fixed: hash algorithm 'sha1' is always used.
  2213. * src/DownloadCommand.cc (validatePieceHash)
  2214. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2215. Added --enable-peer-exchange command-line option.
  2216. * src/OptionHandlerFactory.cc
  2217. * src/HelpItemFactory.cc
  2218. * src/option_processing.cc
  2219. * src/usage_text.h
  2220. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2221. Move extension from BtRuntime to ExtensionMessageFactory, because
  2222. extension can be specified per peer, not per torrent.
  2223. * src/DefaultBtInteractive.cc
  2224. * src/BtRuntime.h
  2225. * src/ExtendedMessagingAware.h
  2226. * src/ExtensionMessageFactory.h
  2227. * src/DefaultExtensionMessageFactory.cc
  2228. * test/DefaultExtensionMessageFactoryTest.cc
  2229. 2008-01-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2230. Added categorized option help. Specify category using --help option.
  2231. Also added the ability to search options in forward match.
  2232. * src/HelpItem.{h, cc}
  2233. * test/HelpItemTest.cc
  2234. * src/HelpItemFactory.{h, cc}
  2235. * src/TagContainer.{h, cc}
  2236. * test/TagContainerTest.cc
  2237. * src/option_processing.cc
  2238. * src/prefs.h
  2239. * src/TaggedItem.{h, cc}
  2240. * test/TaggedItemTest.cc
  2241. * src/version_usage.cc
  2242. * src/help_tags.h
  2243. * src/usage_text.h
  2244. 2008-01-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2245. Fixed segmentation fault when bad torrent metainfo is parsed.
  2246. Added dynamic_cast properly to detect the misconfiguration of metainfo
  2247. and then throw exception or skip it.
  2248. * src/DefaultBtContext.{h, cc}
  2249. * test/DefaultBtContextTest.cc
  2250. * src/AnnounceList.cc
  2251. * src/CompactPeerListProcessor.cc
  2252. * src/message.h
  2253. * src/DefaultBtAnnounce.{h, cc}
  2254. * test/DefaultBtAnnounceTest.cc
  2255. * src/BencodeVisitor.cc
  2256. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2257. Added missing "B"(=Byte). So now the message looks like this:
  2258. Your share ratio was 1.0, uploaded/downloaded=12MiB/12MiB
  2259. * src/message.h (MSG_SHARE_RATIO_REPORT)
  2260. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2261. Show the seed ratio after torrent downloads.
  2262. For example, after torrent download completed and --seed-time and
  2263. --seed-ratio conditions are fulfilled, following message is printed
  2264. right after "Download complete: .....":
  2265. Your share ratio was 1.0, uploaded/downloaded=12M/12M
  2266. * src/RequestGroupMan.cc
  2267. * src/RequestGroup.{h, cc}
  2268. * src/message.h
  2269. 2007-12-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2270. Remove a defunct control file. A defunct control file means that while
  2271. it exists, but the corresponding download file is missing.
  2272. After its removal, a download restarts from the beginning.
  2273. * src/RequestGroup.cc
  2274. * src/message.h
  2275. 2007-12-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2276. Allocate bitfield in Peer when it is really used. More specifically,
  2277. bitfield in Peer is allocated after the connection is established and
  2278. deallocated when the connection is dropped.
  2279. Since 2 parameters(piece length and total length) was removed from the
  2280. constructor of Peer class, many test classes were modified accordingly.
  2281. See svn log for more detailed information.
  2282. * src/PeerInteractionCommand.cc
  2283. * src/CompactPeerListProcessor.cc
  2284. * src/Peer.cc
  2285. * src/DefaultPeerListProcessor.cc
  2286. * src/PeerListenCommand.cc
  2287. * src/PeerReceiveHandshakeCommand.cc
  2288. Fixed memory leak
  2289. * src/Piece.cc
  2290. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2291. Changed the default value of PREF_PEER_CONNECTION_TIMEOUT and
  2292. lowestSpeedLimit in ActivePeerConnectionCommand. TODO: Make them
  2293. command-line options.
  2294. * src/option_processing.cc
  2295. * src/ActivePeerConnectionCommand.cc
  2296. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2297. Send have message to peer if it already has the piece.
  2298. * src/BtHaveMessage.{h, cc}
  2299. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2300. Removed incomingPeer. Set 0 to peer's port if it is not a listening
  2301. port.
  2302. * src/DefaultPeerStorage.{h, cc}
  2303. * test/DefaultPeerStorageTest.cc
  2304. * src/HandshakeExtensionMessage.cc
  2305. * test/HandshakeExtensionMessageTest.cc
  2306. * src/Peer.{h, cc}: Added ipaddr and port to identity comparison.
  2307. * src/PeerStorage.h
  2308. * test/MockPeerStorage.h
  2309. * src/PeerListenCommand.cc
  2310. * src/PeerReceiveHandshakeCommand.cc
  2311. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2312. Added --metalink-enable-unique-protocol option.
  2313. * src/Metalink2RequestGroup.cc
  2314. * src/option_processing.cc
  2315. * src/prefs.h
  2316. * src/version_usage.cc
  2317. * doc/aria2c.1.txt
  2318. * doc/aria2c.1
  2319. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2320. Allow a peer in incomingPeer to be added peers.
  2321. * src/DefaultPeerStorage.cc
  2322. * test/DefaultPeerStorageTest.cc
  2323. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2324. Fixed the bug that causes aria2 not to finish download. BUG#1855875.
  2325. I could reproduce this bug in following procedure:
  2326. 1. Stop the download at the very beginning(1% or 100KB downloaded).
  2327. 2. Restart aria2.
  2328. 3. You see the download stopped around 99%.
  2329. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  2330. * src/StreamFileAllocationEntry.cc: Removed the timeout handling.
  2331. If timeout is reached, then _nextCommand is unused and it may contains
  2332. segments and they won't be canceled. Actually, timeout is not needed
  2333. here because if the server dropped connection, then retry is made.
  2334. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2335. Added uTorrent compatible Peer Exchange.
  2336. * src/BencodeVisitor.{h, cc}
  2337. * test/BencodeVisitorTest.cc
  2338. * src/BtConstants.h
  2339. * src/BtContext.h: Added 'private' flag.
  2340. * src/BtExtendedMessage.{h, cc}
  2341. * test/BtExtendedMessageTest.cc
  2342. * src/BtHandshakeMessage.{h, cc}: Set extended messaging bit in
  2343. reserved field.
  2344. * test/BtHandshakeMessageTest.cc
  2345. * src/BtMessageFactory.h
  2346. * src/BtRegistry.h
  2347. * src/BtRuntime.h: This class holds default extension message IDs for
  2348. aria2. By default, aria2 uses ID 8 for ut_pex.
  2349. * src/DefaultBtContext.cc
  2350. * src/DefaultBtInteractive.{h, cc}: This class holds _utPexEnabled.
  2351. When it is true, aria2 enables ut_pex. This value is set by
  2352. PeerInteractionCommand.
  2353. * src/DefaultBtMessageFactory.{h, cc}
  2354. * test/DefaultBtMessageFactoryTest.cc
  2355. * src/DefaultBtMessageReceiver.cc: Moved the code of fast extension
  2356. handling to DefaultBtInteractive class.
  2357. * src/DefaultExtensionMessageFactory.{h, cc}
  2358. * test/DefaultExtensionMessageFactoryTest.cc
  2359. * src/DefaultPeerStorage.cc: Returns false if a peer is already in
  2360. the container(peers and incomingPeers. The equality is determined by
  2361. Peer::id).
  2362. * test/DefaultPeerStorageTest.cc
  2363. * src/ExtensionMessage.h
  2364. * test/MockExtensionMessage.h
  2365. * src/ExtensionMessageFactory.h
  2366. * test/MockExtensionMessageFactory.h
  2367. * src/HandshakeExtensionMessage.{h, cc}
  2368. * test/HandshakeExtensionMessageTest.cc
  2369. * src/MetaEntry.h
  2370. * src/Peer.{h, cc}
  2371. * src/PeerInteractionCommand.cc
  2372. * src/PeerReceiveHandshakeCommand.cc: Evaluate the return value of
  2373. addIncomingPeer.
  2374. * src/PeerMessageUtil.{h, cc}
  2375. * src/PeerObject.h
  2376. * src/UTPexExtensionMessage.{h, cc}
  2377. * test/UTPexExtensionMessageTest.cc
  2378. * src/message.h
  2379. * src/prefs.h
  2380. Fixed the bug that returns incomplete data when it contains null
  2381. character. A convenient constructor was also added.
  2382. * src/Data.{h, cc}
  2383. Rewritten.
  2384. * src/CompactPeerListProcessor.cc
  2385. Fixed typos.
  2386. * src/message.h
  2387. * src/MetaFileUtil.cc
  2388. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2389. Added "Status Legend" label to the explanation text of 'stat' in
  2390. download result and moved it to the last. BUG#1848214
  2391. * src/RequestGroupMan.cc
  2392. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2393. Fixed the bug that -lexpat is always added to aria2c_LDADD.
  2394. * src/Makefie.am
  2395. * test/Makefile.am
  2396. 2007-12-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2397. Fixed the bug that prevents aria2 from loading cookie file when expire
  2398. value is greater than 2^31-1. BUG#1851066
  2399. * src/CookieBoxFactory.cc
  2400. * test/CookieBoxFactoryTest.cc
  2401. 2007-12-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2402. Fixed possible memory leak when an exception is thrown.
  2403. * src/XML2SAXMetalinkProcessor.cc
  2404. Added Expat support. If both libxml2 and Expat are installed, then
  2405. libxml2 is used by default.
  2406. MetalinkProcessorFactory chooses from XML2SAXMetalinkProcessor and
  2407. ExpatMetalinkProcessor according to the configuration.
  2408. * src/ExpatMetalinkProcessor.{h, cc}
  2409. * src/main.cc: Removed libxml2 specific header and init/free function.
  2410. * src/MetalinkProcessorFactory.{h, cc}
  2411. * src/MetalinkHelper.cc
  2412. * src/Metalinker.h: Removed unnecessary libxml2 header.
  2413. * src/MetalinkProcessor.h
  2414. * test/XML2SAXMetalinkProcessorTest.cc: Removed because
  2415. MetalinkProcessorTest is used instead.
  2416. * test/MetalinkProcessorTest.cc: Added. It is actually the same with
  2417. XML2SAXMetalinkProcessor, replaced XML2SAXMetalinkProcessor with
  2418. MetalinkProcessorFactory::newInstance().
  2419. * m4/libexpat.m4
  2420. * configure.ac: Added configuration options for libexpat.
  2421. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2422. Disabled -s option in metalink download.
  2423. * src/Metalink2RequestGroup.cc
  2424. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2425. If several protocols are available for a mirror in metalink file,
  2426. aria2 now use one of them. --metalink-preferred-protocol option was
  2427. added to specify the preference of protocol.
  2428. * src/AbstractCommand.cc
  2429. * src/OptionHandlerFactory.cc
  2430. * src/ServerHost.{h, cc}
  2431. * src/Metalink2RequestGroup.cc
  2432. * src/RequestGroup.{h, cc}
  2433. * test/RequestGroupTest.cc
  2434. * src/option_processing.cc
  2435. * src/prefs.h
  2436. * src/HttpResponseCommand.cc
  2437. * src/MetalinkResource.{h, cc}
  2438. * src/FtpNegotiationCommand.cc
  2439. * src/MetalinkEntry.{h, cc}
  2440. * src/MetalinkEntryTest.cc
  2441. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2442. Code cleanup and added debug log.
  2443. * src/PeerConnection.cc
  2444. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2445. Compiler error fix: applied the patch by Tiziano Mueller
  2446. * src/RequestGroup.cc
  2447. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2448. Fixed the bug: only first announce URL is tried in AnnounceTier,
  2449. in stopped and completed event.
  2450. * src/AnnounceList.{h, cc}
  2451. * test/AnnounceListTest.cc
  2452. * src/DefaultBtAnnounce.cc
  2453. * test/DefaultBtAnnounceTest.cc
  2454. Sorted URLs.
  2455. * test/Metalink2RequestGroupTest.cc
  2456. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2457. Removed unnecessary string copy. Updated doc and corrected indentation.
  2458. * src/Base64.cc
  2459. Fixed compilation warnings
  2460. * test/DataTest.cc
  2461. * test/HttpRequestTest.cc
  2462. * test/MetaFileUtilTest.cc
  2463. * test/RequestTest.cc
  2464. * Release 0.12.0
  2465. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2466. Updated translations
  2467. * po/{de,fr,ja,nl,ru}.po
  2468. Added Brazilian Portuguese, Catalan, Italian, Spanish, Swedish
  2469. translations. Many thanks to translators.
  2470. * po/{ca,es,it,pt_BR,sv}.po
  2471. * po/LINGUAS
  2472. 2007-12-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2473. Added a notice about URL
  2474. * src/version_usage.cc
  2475. 2007-12-07 Tatsuhiro Tsujikawa <tujikawa at rednoah com>
  2476. Fixed the bug#1845750; CTRL+C does not stop torrent.
  2477. aria2 repeatedly sends stopped request when tracker returns error code.
  2478. * src/AnnounceList.cc
  2479. * test/AnnounceListTest.cc
  2480. * src/AnnounceTier.h
  2481. Added a message when ctrl-c is hit.
  2482. Now second ctrl-c is also handled in signal handler.
  2483. * src/RequestGroupMan.{h, cc}
  2484. * src/RequestGroup.{h, cc}
  2485. * src/MultiUrlRequestInfo.cc
  2486. * src/DownloadEngine.cc
  2487. * src/TrackerWatcherCommand.cc
  2488. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2489. Code cleanup
  2490. * src/Base64.cc (encode)
  2491. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2492. Changed Direct/IO enable/disable procesure in file allocation routine.
  2493. * src/SingleFileAllocationIterator.cc
  2494. (SingleFileAllocationIterator):
  2495. Disable directIO if offset is not multiple of 512.
  2496. (~SingleFileAllocationIterator): Removed a call to disableDirectIO.
  2497. * src/MultiFileAllocationIterator.cc (allocateChunk):
  2498. Enable created SingleFileAllocationIterator's directIO.
  2499. * src/FileAllocationEntry.cc
  2500. (FileAllocationEntry): Enable directIO here.
  2501. (~FileAllocationEntry): Disable directIO here.
  2502. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2503. Fixed the bug: aria2 doesn't utilize fast set index offered by peer.
  2504. * src/Peer.{h, cc}
  2505. * src/DefaultPieceStorage.cc
  2506. * test/DefaultPieceStorageTest.cc
  2507. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2508. Rewritten direct I/O support routine
  2509. * src/SingleFileAllocationIterator.cc
  2510. * src/MultiDiskAdaptor.{h, cc}
  2511. * src/ByteArrayDiskWriter.h
  2512. * src/AbstractSingleDiskAdaptor.h
  2513. * src/AbstractDiskWriter.cc
  2514. * src/DefaultPieceStorage.cc
  2515. * src/DiskWriter.h
  2516. * src/BinaryStream.h
  2517. * src/IteratableChunkChecksumValidator.cc
  2518. * src/IteratableChecksumValidator.cc
  2519. * src/CheckIntegrityEntry.cc
  2520. * src/FileAllocationEntry.cc
  2521. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2522. Fixed typo
  2523. * src/version_usage.cc
  2524. Updated doc
  2525. * doc/aria2c.1.txt
  2526. * doc/aria2c.1
  2527. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2528. Fixed compile error without message digest support.
  2529. * src/FileMetalinkParserState.cc
  2530. * src/MetalinkParserController.{h, cc}
  2531. * test/XML2SAXMetalinkProcessorTest.cc
  2532. * test/MetalinkParserControllerTest.cc
  2533. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2534. Enable direct I/O support in checksum checking.
  2535. * src/IteratableChunkChecksumValidator.{h, cc}
  2536. * test/IteratableChunkChecksumValidatorTest.cc
  2537. * src/CheckIntegrityEntry.cc
  2538. * src/PieceHashCheckIntegrityEntry.cc
  2539. * src/IteratableChecksumValidator.{h, cc}
  2540. * src/BtCheckIntegrityEntry.cc: Added doc.
  2541. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2542. Added --allow-piece-length-change option.
  2543. * src/DefaultBtProgressInfoFile.cc
  2544. * test/DefaultBtProgressInfoFileTest.cc
  2545. * src/OptionHandlerFactory.cc
  2546. * src/option_processing.cc
  2547. * src/prefs.h
  2548. * src/version_usage.cc
  2549. * doc/aria2c.1.txt
  2550. * doc/aria2c.1
  2551. Fixed: duplicated result entry appears when exception is thrown in
  2552. RequestGroup::createInitiateConnectionCommand().
  2553. * src/RequestGroupMan.cc (fillRequestGroupFromReserver):
  2554. Add RequestGroup to _requestGroup after RequetGroup::
  2555. createInitiateConnectionCommand() succeeds.
  2556. Externalized message
  2557. * src/XML2SAXMetalinkProcessor.cc
  2558. * src/message.h
  2559. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2560. Forced download abort when received negative response from http/ftp
  2561. server.
  2562. * src/HttpResponseCommand.cc
  2563. * src/FtpNegotiationCommand.cc
  2564. * src/HttpResponse.cc
  2565. * src/FtpConnection.cc
  2566. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2567. Added XML2SAXMetalinkProcessor class, which is a lot faster than
  2568. the predecessor, Xml2MetalinkParser class.
  2569. I tested them against 94KB metalink file with 1234 chunk checksums.
  2570. The new one parsed it in 22msec, while it took 6000msec with old one.
  2571. * src/XML2SAXMetalinkProcessor.{h, cc}
  2572. * test/XML2SAXMetalinkProcessorTest.cc
  2573. * src/MetalinkParserController.{h, cc}
  2574. * test/MetalinkParserControllerTest.cc
  2575. * src/MetalinkParserState.h: Also added 16 subclasses.
  2576. * src/main.cc
  2577. * src/Metalink2RequestGroup.cc
  2578. * src/MetalinkHelper.cc
  2579. * src/MetalinkEntry.cc
  2580. * src/ChunkChecksum.h
  2581. Rewritten Base64 class for better performance.
  2582. * src/Base64.{h, cc}
  2583. * test/Base64Test.cc
  2584. * src/HttpRequest.cc
  2585. 2007-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2586. Fixed the bug#1841757: aria2 will connect to server to only get
  2587. file size.
  2588. * src/StreamFileAllocationEntry.cc
  2589. * src/option_processing.cc
  2590. * src/HttpResponseCommand.cc: Now reuse connection in segmented
  2591. downloads.
  2592. * src/FtpNegotiationCommand.cc
  2593. Suppressed wrong message when finding PreDownloadHandler
  2594. * src/RequestGroup.cc
  2595. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2596. Updated usage
  2597. * src/version_usage.cc
  2598. Updated man page
  2599. * doc/aria2c.1.txt
  2600. * doc/aria2c.1
  2601. Updated po files
  2602. * po/aria2c.pot
  2603. * po/*.po
  2604. * po/*.gmo
  2605. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2606. Eliminated g++-4.2 warning
  2607. * src/DownloadHandlerConstants.{h, cc}
  2608. * src/Util.cc
  2609. * test/MetaFileUtilTest.cc
  2610. * test/PStringBuildVisitorTest.cc
  2611. Fixed bug: --check-integrity doesn't work for multi file torrent.
  2612. * src/RequestGroup.cc
  2613. * src/BtCheckIntegrityEntry.cc
  2614. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2615. Fixed a2io.h
  2616. * src/a2io.h
  2617. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2618. Added direct I/O support. The current implementation uses O_DIRECT,
  2619. which is not posix standard and is tested on linux 2.6.21.
  2620. Currently only file allocation uses direct I/O.
  2621. * src/SingleFileAllocationIterator.{h, cc}
  2622. * test/SingleFileAllocationIteratorTest.cc
  2623. * src/MultiFileAllocationIterator.{h, cc}
  2624. * test/MultiFileAllocationIteratorTest.cc
  2625. * src/BinaryStream.h
  2626. * src/DiskWriter.h
  2627. * src/AbstractDiskWriter.{h, cc}
  2628. * src/ByteArrayDiskWriter.h
  2629. * src/DiskAdaptor.h
  2630. * src/AbstractSingleDiskAdaptor.{h, cc}
  2631. * src/MultiDiskAdaptor.{h, cc}
  2632. * src/FileAllocationEntry.cc
  2633. * src/Util.{h, cc}
  2634. * src/OptionHandlerFactory.cc
  2635. * src/prefs.h
  2636. * src/version_usage.cc
  2637. * src/option_processing.cc
  2638. Moved FileAllocationMan::markCurrentFileAllocationEntryDone() to
  2639. handleException.
  2640. * src/MultiFileAllocationIterator.cc
  2641. Added EINTR handling
  2642. * src/SocketCore.cc
  2643. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2644. Updated usage
  2645. * src/version_usage.cc
  2646. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2647. Applied Ross's patch for MinGW port.
  2648. * src/DownloadEngine.h
  2649. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2650. Set Content-Type to SingleFileDownloadContext when http response is
  2651. received.
  2652. * src/HttpResponseCommand.cc
  2653. * src/HttpResponse.{h, cc}
  2654. * test/HttpResponseTest.cc
  2655. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2656. Rewritten to add content-type support.
  2657. * src/DownloadHandler.{h, cc}
  2658. * src/BtPostDownloadHandler.{h, cc}
  2659. * test/BtPostDownloadHandlerTest.cc
  2660. * src/MetalinkPostDownloadHandler.{h, cc}
  2661. * test/MetalinkPostDownloadHandlerTest.cc
  2662. * src/PostDownloadHandler.{h, cc}
  2663. * src/DownloadHandlerConstants.{h, cc}
  2664. * src/RequestGroup.cc
  2665. * src/HttpResponseCommand.cc
  2666. * src/FtpNegotiationCommand.cc
  2667. * src/SingleFileDownloadContext.{h, cc}
  2668. * src/RequestGroup.h
  2669. * src/RequestGroupCriteria.h
  2670. * src/ContentTypeRequestGroupCriteria.h
  2671. Added 'mem' option value for --follow-metalink, --follow-torrent.
  2672. If it is give, metalink/torrent file is not written to the disk, but
  2673. just is kept in memory. Parsing is occurred on memory.
  2674. * src/MetalinkHelper.{h, cc}
  2675. * src/MetalinkProcessor.h
  2676. * src/Xml2MetalinkProcessor.{h, cc}
  2677. * test/Xml2MetalinkProcessorTest.cc
  2678. * src/DownloadHandlerFactory.{h, cc}
  2679. * test/DownloadHandlerFactoryTest.cc
  2680. * src/PreDownloadHandler.{h, cc}
  2681. * src/OptionHandlerFactory.cc
  2682. * src/DefaultBtContext.{h, cc}
  2683. * test/DefaultBtContextTest.cc
  2684. * src/version_usage.cc
  2685. * src/Metalink2RequestGroup.{h, cc}
  2686. * src/RequestGroup.{h, cc}
  2687. * src/a2functional.h
  2688. * test/a2functionalTest.cc
  2689. * src/MemoryBufferPreDownloadHandler.{h, cc}
  2690. * src/OptionHandlerImpl.h
  2691. * src/prefs.h
  2692. * src/Util.{h, cc}
  2693. * test/UtilTest.cc
  2694. Keep DownloadResult rather than RequestGroup after downloads to reduce
  2695. memory usage.
  2696. * src/RequestGroupMan.{h, cc}
  2697. * src/DownloadEngine.cc
  2698. * src/BtDependency.{h, cc}: Changed the type of dependee from
  2699. WeakHandle to SharedHandle because WeakHandle could be null.
  2700. * src/RequestGroup.{h, cc}
  2701. * src/DownloadEngineFactory.cc
  2702. * src/DownloadResult.h
  2703. Set totalLength after download finished
  2704. * src/UnknownLengthPieceStorage.{h, cc}
  2705. Keep torrent file specified in metalink in memory.
  2706. * src/Metalink2RequestGroup.cc
  2707. * src/BtDependency.cc
  2708. * src/TrueRequestGroupCriteria.h
  2709. Fixed the bug: seekg is used where seekp should be used.
  2710. * src/ByteArrayDiskWriter.cc
  2711. * test/ByteArraydiskWriterTest.cc
  2712. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2713. Fixed syntax error
  2714. * test/SequenceTest.cc
  2715. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2716. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  2717. * src/RequestGroupMan.cc (isSameFileBeingDownloaded)
  2718. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  2719. * src/RequestGroup.cc (downloadFinishedByFileLength)
  2720. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2721. Added the check to see whether ares_host_callback accepts timeouts
  2722. with c-ares; only c-ares 1.5.0 or newer accepts it.
  2723. * src/NameResolver.{h, cc}
  2724. * m4/libcares.m4
  2725. * configure.ac: Set C++ for language choice.
  2726. 2007-11-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2727. Fixed: compilation fails without c-ares/ares
  2728. * src/DownloadEngine.cc (addCommand): Moved outside #ifdef
  2729. Generate http/ftp commands only when download is incomplete.
  2730. * src/BtFileAllocationEntry.cc (prepareForNextAction)
  2731. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2732. Corrected typo. Examples are removed since they are available in man
  2733. page.
  2734. * src/version_usage.cc
  2735. Updated man page.
  2736. * doc/aria2c.1
  2737. * doc/aria2c.1.txt
  2738. * doc/makeman: Commented out sed command.
  2739. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2740. Throw DlAbortEx when a remote file is not found.
  2741. * src/HttpResponse.cc
  2742. * src/FtpNegotiationCommand.cc
  2743. * src/message.h
  2744. Overwrite an existing file if --allow-overwrite=true is given.
  2745. * src/RequestGroup.cc
  2746. Removed unused functions
  2747. * src/AbstractCommand.h
  2748. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2749. Removed 'extern' from 'extern typedef ...' in src/*.h
  2750. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2751. Updated usage
  2752. * src/version_usage.cc
  2753. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2754. Trim announce URL
  2755. * src/DefaultBtContext.cc
  2756. * test/ShaVisitorTest.cc
  2757. Trim argument s. Give trimed s to exception constructor.
  2758. * src/Util.cc (parseInt)(parseLLInt)
  2759. * test/UtilTest.cc
  2760. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2761. Set precision back to 1.
  2762. * src/ConsoleStatCalc.cc (calculateStat)
  2763. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2764. Replaced strtol with Util::parseInt
  2765. * src/ChunkedEncoding.cc
  2766. * src/HttpConnection.cc
  2767. * src/CookieBoxFactory.cc
  2768. * src/ParameterizedStringParser.cc
  2769. * src/Util.cc
  2770. * test/UtilTest.cc
  2771. * test/OptionHandlerTest.cc
  2772. * src/Request.cc
  2773. Throw exception when empty string is given. The message for exception
  2774. changed.
  2775. * src/Util.cc (parseInt)(parseLLInt)
  2776. * src/message.h
  2777. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2778. Set precision to 2 because share ratio is rounded into 1.0 if precision
  2779. set to 1.
  2780. * src/ConsoleStatCalc.cc (calculateStat)
  2781. 2007-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2782. Preallocate non-requested file which is adjacent forward to requested
  2783. file('requested' files means the files given in --select-file option)
  2784. if they share a same piece.
  2785. This fixes long pause in the file system which doesn't support sparse
  2786. files like FAT32 while downloading.
  2787. * src/MultiFileAllocationIterator.{h, cc}
  2788. * test/MultiFileAllocationIteratorTest.cc
  2789. * src/FileEntry.{h, cc}
  2790. Removed unused _option.
  2791. * src/MultiDiskAdaptor.h
  2792. * test/MultiDiskAdaptorTest.cc
  2793. * src/DefaultPieceStorage.cc
  2794. Set the default value of --seed-ratio to 1.0.
  2795. If 0.0 is given, then seeding continues regardless of share ratio.
  2796. * src/version_usage.cc
  2797. * src/option_processing.cc
  2798. * src/BtSetup.cc
  2799. * doc/aria2c.1.txt
  2800. * doc/aria2c.1
  2801. Fixed: Selective download is not working in BitTorrent
  2802. * src/RequestGroup.cc
  2803. Introduced Sequence class. Use this instead of Util::unfoldRange()
  2804. * src/PieceStorage.h
  2805. * test/MockPieceStorage.h
  2806. * src/UnknownLengthPieceStorage.h
  2807. * src/DefaultPieceStorage.{h, cc}
  2808. * src/Metalink2RequestGroup.cc
  2809. * src/RequestGroup.cc
  2810. * src/Sequence.h
  2811. * test/SequenceTest.cc
  2812. * src/IntSequence.h
  2813. * src/message.h
  2814. * src/Util.{h, cc}
  2815. * test/UtilTest.cc
  2816. Added new function 'parse' to catch exception thrown by subclass's
  2817. parseArg
  2818. * src/OptionHandler.h
  2819. * src/OptionParser.cc
  2820. * src/NameMatchOptionHandler.h
  2821. * src/OptionHandlerImpl.h
  2822. * test/OptionHandlerTest.cc
  2823. Added IntegerRangeOptionHandler. Used for --listen-port and
  2824. --select-file. Now --listen-port accepts range of port.
  2825. * src/OptionHandlerFactory.cc
  2826. * src/version_usage.cc
  2827. * src/OptionHandlerImpl.h
  2828. * src/option_processing.cc
  2829. * src/BtSetup.cc
  2830. * src/PeerListenCommand.{h, cc}
  2831. * doc/aria2c.1.txt
  2832. * doc/aria2c.1
  2833. Implemented operator< for Exception class to provide easy way to print
  2834. exception stack trace.
  2835. * src/Exception.{h, cc}
  2836. * src/main.cc
  2837. * src/option_processing.cc
  2838. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2839. * src/version_usage.cc
  2840. (showVersion): Reworked.
  2841. (showUsage): Added examples.
  2842. Removed Hint for total length and file name.
  2843. * src/Metalink2RequestGroup.cc
  2844. * src/RequestGroup.{h, cc}
  2845. * src/HttpResponseCommand.cc
  2846. * src/FtpNegotiationCommand.cc
  2847. Now --follow-torrent and --follow-metalink option work properly.
  2848. * src/RequestGroup.cc
  2849. Updated man page
  2850. * doc/aria2c.1.txt
  2851. * doc/aria2c.1
  2852. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2853. Removed.
  2854. * src/PiecedSegment.{h, cc} (operator==)(operator!=)
  2855. Use Segment::operator==()
  2856. * src/HttpConnection.cc
  2857. * src/Segment.h
  2858. Updated usage
  2859. * src/version_usage.cc
  2860. Added EINTR treatment.
  2861. * src/SocketCore.cc
  2862. * src/AbstractDiskWriter.cc
  2863. Rewritten.
  2864. * src/Util.cc (rangedFileCopy)
  2865. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2866. Fixed typo.
  2867. * src/version_usage.cc
  2868. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2869. Implemented. Now -c option works fine.
  2870. * src/DefaultPieceStorage.cc (markPiecesDone)
  2871. * test/DefaultPieceStorageTest.cc
  2872. Removed.
  2873. * src/SegmentMan.{h, cc}
  2874. (markAllPiecesDone)
  2875. (markPieceDone)
  2876. Synchronized po files with
  2877. https://translations.launchpad.net/aria2/trunk/+pots/aria2c
  2878. * src/fr.po
  2879. * src/ru.po
  2880. * src/de.po
  2881. * src/ja.po
  2882. 2007-11-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2883. Added ifdef and some modifications to compile without BitTorrent,
  2884. Metalink, MessageDigest
  2885. support.
  2886. * src/PieceHashCheckIntegrityEntry.cc
  2887. * src/MetalinkEntry.h
  2888. * src/version_usage.cc
  2889. * src/main.cc
  2890. * src/DownloadEngine.{h, cc}
  2891. * src/Metalink2RequestGroup.cc
  2892. * src/Peer.cc
  2893. * src/RequestGroup.cc
  2894. * src/MetalinkHelper.cc
  2895. * test/DefaultPieceStorageTest.cc
  2896. * test/MetalinkPostDownloadHandlerTest.cc
  2897. * test/Metalink2RequestGroupTest.cc
  2898. Hide TOTAL SPD when all downloads complete.
  2899. * src/ConsoleStatCalc.cc
  2900. Log target system information.
  2901. * src/main.cc
  2902. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2903. Now --metalink-location accepts a comma-deliminated list of locations.
  2904. * src/MetalinkEntry.{h, cc}
  2905. * test/MetalinkEntryTest.cc
  2906. * src/version_usage.cc
  2907. * src/Metalink2RequestGroup.cc
  2908. * src/Xml2MetalinkProcessor.cc
  2909. * test/Xml2MetalinkProcessorTest.cc
  2910. * doc/aria2c.1.txt
  2911. * doc/aria2c.1
  2912. * src/Util.cc (toUpper)(toLower): Rewritten.
  2913. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2914. Added the ability to detect duplicate download entry which is about to
  2915. download the same file other RequestGroup is downloading.
  2916. * src/RequestGroup.cc
  2917. * src/HttpResponseCommand.cc
  2918. * src/FtpNegotiationCommand.cc
  2919. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2920. Recalculates download progress when loading a control file,
  2921. if the piece length of DownloadContext is different from the one saved
  2922. in the control file. Currently in-flight pieces are ignored.
  2923. * src/DefaultBtProgressInfoFile.cc
  2924. * test/DefaultBtProgressInfoFileTest.cc
  2925. * src/Util.{h, cc}
  2926. * test/UtilTest.cc
  2927. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2928. Do not rotate tiers in announce-list.
  2929. * src/DefaultBtAnnounce.{h, cc}: Removed trackerNumTry.
  2930. AnnounceList::allTiersFailed() used instead to detect whether all
  2931. tiers are tried and failed.
  2932. * test/DefaultBtAnnounceTest.cc
  2933. * src/AnnounceList.{h, cc}: If all tiers are tried and failed then
  2934. allTiersFailed() returns true. To reset tier pointer, call resetTier();
  2935. * test/AnnounceListTest.cc
  2936. * src/TrackerWatcherCommand.cc (execute): Removed DlAbortEx catch
  2937. clause. Catch RecoverableException instead of DlRetryEx instead.
  2938. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2939. Implemented checksum validation feature(1 checksum for each file)
  2940. The validation takes place after the download.
  2941. * src/PieceHashCheckIntegrityEntry.{h, cc}: New class.
  2942. * src/IteratableChecksumValidator.{h, cc}: Rewritten.
  2943. * src/CheckIntegrityCommand.cc: Changed log message.
  2944. * src/Metalink2RequestGroup.cc: Set checksum to
  2945. SingleFileDownloadContext.
  2946. * src/StreamCheckIntegrityEntry.{h, cc}: Now derived from
  2947. PieceHashCheckIntegrity class.
  2948. * src/BtCheckIntegrityEntry.{h, cc}: Now derived from
  2949. PieceHashCheckIntegrity class.
  2950. * src/ChecksumCheckIntegrityEntry.{h, cc}: New class.
  2951. * src/IteratableValidator.h: New class.
  2952. * src/message.h
  2953. * src/CheckIntegrityEntry.{h, cc}
  2954. * src/IteratableChunkChecksumValidator.{h, cc}
  2955. * src/SingleFileDownloadContext.h
  2956. * src/DownloadCommand.cc
  2957. --allow-overwrite=true is no longer needed to check file integrity
  2958. before download in BitTorrent download.
  2959. * src/RequestGroup.cc (getInitialCommand)
  2960. Removed RequestGroup from queue when RequestGroup::getInitialCommand()
  2961. throws exception.
  2962. * src/RequestGroupMan.cc (getInitialCommands)
  2963. 2007-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2964. urlencode the given url inside Request::parseUrl(...)
  2965. * src/Request.{h, cc}
  2966. * src/Util.{h, cc}
  2967. * test/RequestTest.cc
  2968. Removed #!metalink3! notation support because it is deleted from
  2969. the metalink specification.
  2970. * src/Request.{h, cc}
  2971. * test/RequestTest.cc
  2972. 2007-11-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2973. Don't connect server before checking file integrity at startup, if
  2974. filesize and output file path are known.
  2975. * src/AbstractCommand.cc
  2976. * src/StreamFileAllocationEntry.cc
  2977. * src/Metalink2RequestGroup.cc
  2978. * src/RequestGroup.{h, cc}
  2979. * src/HttpResponseCommand.cc
  2980. * src/FtpNegotiationCommand.cc
  2981. Added DownloadFailureException. If it is thrown, RequestGroup should
  2982. halt.
  2983. * src/AbstractCommand.cc
  2984. * src/DownloadFailureException.h
  2985. * src/RequestGroup.cc
  2986. Catch RecoverableException, instead of DlAbortEx.
  2987. * src/RequestGroupMan.cc
  2988. * src/FillRequestGroupCommand.cc
  2989. * src/MetaFileUtil.cc
  2990. * src/IteratableChunkChecksumValidator.cc
  2991. Now first parameter of MSG_DOWNLOAD_ABORTED is gid(RequestGroup::
  2992. getGID())
  2993. * src/CheckIntegrityCommand.cc
  2994. * src/message.h
  2995. Print gid instead of idx.
  2996. * src/RequestGroupMan.cc
  2997. Removed exception throwers declaration.
  2998. * src/DirectDiskAdaptor.{h, cc}
  2999. * src/SocketCore.{h, cc}
  3000. * src/MultiDiskAdaptor.{h, cc}
  3001. * src/HttpConnection.{h, cc}
  3002. * src/HttpResponse.{h, cc}
  3003. * src/DiskAdaptor.{h, cc}
  3004. * src/CopyDiskAdaptor.{h, cc}
  3005. * src/MultiDiskAdaptor.{h, cc}
  3006. * src/HttpHeaderProcessor.{h, cc}
  3007. * src/AbstractSingleDiskAdaptor.{h, cc}
  3008. * src/Util.{h, cc}
  3009. * test/UtilTest.cc
  3010. * src/DefaultDiskWriter.{h, cc}
  3011. * src/FtpConnection.{h, cc}
  3012. * src/AbstractDiskWriter.{h, cc}
  3013. Removed duplicate code.
  3014. * src/StreamCheckIntegrityEntry.cc
  3015. Removed unnecessary include.
  3016. * src/DiskWriter.h
  3017. Included Exception.h
  3018. * src/option_processing.cc
  3019. Included 2 files and added doc
  3020. * src/TrackerWatcherCommand.cc
  3021. * src/SocketCore.cc (writeData): Fixed send error with GnuTLS.
  3022. 2007-11-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3023. Changed CheckIntegrityEntry interface so that it can define
  3024. the action when all the chunk checksums are valid.
  3025. * src/CheckIntegrityEntry.h
  3026. * src/StreamCheckIntegrityEntry.{h, cc}
  3027. * src/BtCheckIntegrityEntry.{h, cc}: Currently,when all the checksums
  3028. are valid, then aira2 goes to seeding mode. Sometimes it is better
  3029. to exit rather than doing seeding. So, it would be good to toggle this
  3030. behavior.
  3031. * src/CheckIntegrityCommand.cc
  3032. * src/AbstractCommand.cc
  3033. * src/RequestGroup.cc
  3034. 2007-11-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3035. Reflect the download length of in-flight pieces.
  3036. It makes the download length readout more precise.
  3037. * src/DefaultPieceStorage.{h, cc}
  3038. * test/DefaultPieceStorageTest.cc
  3039. * src/a2functional.h
  3040. * test/a2functionalTest.cc
  3041. Lower CPU load when --max-download-limit is used.
  3042. There is up and down in speed indicator when enabling
  3043. http-pipelining but a download goes well. I think the problem is that
  3044. because http-pipelining is enabled, DownloadCommand is created for
  3045. each segment and in its constructor, PeerStat::downloadStart() is
  3046. called. In PeerStat::downloadStart(), speed calculation object is
  3047. reseted, which makes download speed zero.
  3048. * src/DownloadCommand.cc
  3049. Rewritten using accumulate.
  3050. * src/RequestGroupMan.cc (calculateStat)
  3051. Code clearnup.
  3052. * src/FtpNegotiationCommand.cc
  3053. * src/HttpResponseCommand.cc
  3054. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3055. Fixed: Can not resume: aria2 reports download already finished.
  3056. * src/AbstractCommand.{h, cc}
  3057. * src/HttpResponseCommand.cc
  3058. * src/FtpNegotiateCommand.cc
  3059. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3060. Now a file is stored in the directory specified in .metalnk file
  3061. (file[@name]).
  3062. * src/Metalink2RequestGroup.cc
  3063. Create the directory structure when opening the file if it doesn't
  3064. exist.
  3065. * src/AbstractDiskWriter.cc
  3066. * src/Util.{h, cc}
  3067. * src/File.h
  3068. * test/UtilTest.cc
  3069. Removed file name comparison
  3070. * src/Metalink2RequestGroup.cc
  3071. * src/HttpResponseCommand.cc
  3072. Rewritten using Util::mkdirs()
  3073. * src/FileEntry.cc (setupDir)
  3074. * test/FileEntryTest.cc
  3075. Updated doc
  3076. * src/SingleFileDownloadContext.h
  3077. 2007-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3078. Now SleepCommand dispatches nextCommand when halt is requested.
  3079. It avoids a possible long wait after hitting CTRL-C.
  3080. * src/SleepCommand.{h, cc}
  3081. * src/RequestGroupAware.{h, cc}
  3082. 2007-11-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3083. Fixed: the listen port sent to the tracker is wrong. If aria2 fails
  3084. to open listen port, then remove the port number from the tracker
  3085. request.
  3086. * src/DefaultBtAnnounce.cc
  3087. * test/DefaultBtAnnounceTest.cc
  3088. * test/MockPieceStorage.h
  3089. Inject randomizer to DefaultBtAnnounce and DefaultBtContext to make
  3090. them more testable.
  3091. * src/DefaultBtAnnounce.{h, cc}
  3092. * src/DefaultBtContext.{h, cc}
  3093. * src/Util.{h, cc}
  3094. * test/DefaultBtAnnounceTest.cc
  3095. * test/DefaultBtContextTest.cc
  3096. * test/UtilTest.cc
  3097. Added 'B' to upload bytes readout.
  3098. * src/ConsoleStatCalc.cc
  3099. Now the listen port for BitTorrent download is opened when it is
  3100. needed.
  3101. * src/DownloadEngineFactory.cc
  3102. * src/BtSetup.{h, cc}
  3103. * src/PeerListenCommand.{h, cc}
  3104. Now an exception thrown while parsing tracker response is now logged.
  3105. If DlAbortEx is catched, then btAnnounce->resetAnnounce() immediately
  3106. called, which means no retry is made in this case, assuming a tracker
  3107. has a problem.
  3108. * src/TrackerWatcherCommand.cc
  3109. Fixed: downloading a file whose length is unkown fails.
  3110. * src/DownloadCommand.cc
  3111. Simplified prepareForNextSegment()
  3112. * src/DownloadCommand.cc
  3113. Updated
  3114. * po/POTFILES.in
  3115. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3116. Re-implemented a file listing for Metalink, which was dropped while
  3117. http/ftp/torrent integration was being implemented.
  3118. * src/MetalinkHelper.{h, cc}: New class.
  3119. * test/MetalinkHelperTest.cc
  3120. * src/main.cc
  3121. * src/Metalink2RequestGroup.cc
  3122. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3123. Added the ability to display the detailed torrent file information.
  3124. Now -S option gives not only a file listing, but also total download
  3125. length, info hash, announce URI, piece length, the number of pieces,
  3126. and mode(single or multi-torrent).
  3127. * src/DefaultBtContext.{h, cc} (operator<<): New function.
  3128. * src/Util.cc (toStream): Show file length in a abbreviated form(like
  3129. KiB)
  3130. * test/UtilTest.cc
  3131. * src/main.cc
  3132. 2007-10-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3133. Added ftp://USER:PASSWD@Servername automatic parsing.
  3134. * src/Request.{h, cc}: Removed AuthResolvers. Added _username and
  3135. _password. Recognize username and password in URI.
  3136. * src/main.cc: Use AuthConfigFactory instead of RequestFactory.
  3137. * src/RequestGroup.cc: Use AuthConfigFactory instead of RequestFactory.
  3138. * src/RequestFactory.{h, cc}: Removed.
  3139. * src/AuthConfigFactory.{h, cc}: New class.
  3140. * src/FtpConnection.cc: Use AuthConfigFactory.
  3141. * src/HttpRequest.cc: Use AuthConfigFactory.
  3142. * test/HttpRequestTest.cc: Updated.
  3143. * test/RequestTest.cc: Updated.
  3144. * test/AuthConfigFactoryTest.cc: New class.
  3145. * test/RequestFactoryTest.cc: Removed.
  3146. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3147. Use RequestGroup::allDownloadFinished() to decide whether the control
  3148. file should be removed or saved.
  3149. * src/RequestGroup.{h, cc} (allDownloadFinished): New function.
  3150. * src/RequestGroupMan.cc (removeStoppedGroup) (save)
  3151. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3152. Use File::renameTo()
  3153. * src/DefaultBtProgressInfoFile.cc
  3154. Added --no-file-allocation-limit command-line option.
  3155. * src/version_usage.cc
  3156. * src/option_processing.cc
  3157. * src/OptionHandlerFactory.cc
  3158. * src/RequestGroup.{h, cc}
  3159. * src/BtCheckIntegrityEntry.cc
  3160. * src/StreamCheckIntegrityEntry.cc
  3161. * src/prefs.h
  3162. * doc/aria2c.1.txt
  3163. * doc/aria2c.1
  3164. Now prealloc is the default value for --file-allocation option.
  3165. * src/version_usage.cc
  3166. * src/option_processing.cc
  3167. * doc/aria2c.1.txt
  3168. * doc/aria2c.1
  3169. Don't URL-encode user-agent.
  3170. * src/HttpRequest.cc
  3171. Updated translations
  3172. * po/LINGUAS: Added nl for Dutch translation.
  3173. * po/nl.po: Added Dutch translation, thanks to A. Bram Neijt.
  3174. * po/de.po: Updated German translation, thanks to Patrick Ruckstuhl.
  3175. * po/POTFILES.in: Updated.
  3176. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3177. Added the ability to recognize url-list in a torrent file.
  3178. The retrieved URLs are attached to the corresponding FileEntry.
  3179. * src/DefaultBtContext.{h, cc}
  3180. * src/FileEntry.{h, cc}
  3181. * test/DefaultBtContextTest.cc
  3182. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3183. * src/ConsoleStatCalc.cc: Let the user know that aria2 is now seeding
  3184. after the download finishes.
  3185. 2007-10-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3186. * src/Piece.{h, cc}: Added SubPiece infrastructure to track down
  3187. the data smaller than block length.
  3188. A block length can be specified by constructor's argument.
  3189. * src/DefaultPieceStorage.{h, cc} (getMissingPiece):
  3190. Get a missing piece in the range of given FileEntry. This function is
  3191. not used in the program yet.
  3192. * src/Util.h: Added some macros.
  3193. 2007-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3194. Added HTTP/1.1 keep alive and pipelining support.
  3195. See --enable-http-keep-alive and --enable-http-pipelining option.
  3196. * src/AbstractCommand.{h, cc}: Now it has one-to-many relation to
  3197. Segment.
  3198. * src/HttpDownloadCommand.{h, cc}
  3199. * src/OptionHandlerFactory.cc
  3200. * src/HttpConnection.{h, cc}
  3201. * src/version_usage.cc
  3202. * src/HttpInitiateConnectionCommand.cc
  3203. * src/FtpInitiateConnectionCommand.cc
  3204. * src/Segment.h
  3205. * src/HttpRequestCommand.{h, cc}
  3206. * src/option_processing.cc
  3207. * src/prefs.h
  3208. * src/HttpResponseCommand.cc
  3209. * src/SegmentMan.{h, cc}
  3210. * src/FtpNegotiateCommand.cc
  3211. * src/HttpProxyResponseCommand.cc
  3212. * src/Request.cc
  3213. * src/HttpRequest.cc
  3214. * src/DownloadCommand.cc
  3215. * test/HttpRequestTest.cc
  3216. * test/RequestTest.cc
  3217. 2007-10-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3218. * src/ConsoleCalc.cc (calculateStat): Hide SPD after the download
  3219. finished.
  3220. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3221. * src/Metalink2RequestGroup.cc (generate): Throw exception instead of
  3222. catching it inside the method.
  3223. When no file entry is found in a metalink without querying user
  3224. preferences, throw the exception with the error message that suggests
  3225. metalink file is probably broken.
  3226. * src/RequestGroup.cc (postDownloadProcessing): Catch exception here.
  3227. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3228. Fixed the bug that prevents remote Metalink/Torrent file from begin
  3229. processed.
  3230. * src/RequestGroupMan.cc (removeStoppedGroup)
  3231. Added debug message.
  3232. * src/BtPostDownloadHandler.cc
  3233. * src/MetalinkPostDownloadHandler.cc
  3234. * src/PostDownloadHandler.{h, cc}
  3235. * src/RequestGroup.cc
  3236. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3237. * src/Request.cc (parseUrl): Removed unnecessary slashes around dir.
  3238. 2007-10-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3239. * src/MultiUrlRequestInfo.h: Updated the message shown when program
  3240. stops and there are any unfinished or in-progress downloads.
  3241. Added the legend of "stat".
  3242. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3243. Throw exception when chunck checksum verification fails.
  3244. * src/DownloadCommand.cc (validatePieceHash): New function.
  3245. * src/PiecedSegment.{h, cc} (clear): New function.
  3246. * src/GrowSegment.{h, cc} (clear): New function.
  3247. * src/Segment.h (clear): New function.
  3248. * src/SegmentMan.{h, cc} (validatePieceHash): Removed.
  3249. * test/SegmentTest.cc
  3250. * test/GrowSegmentTest.cc
  3251. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3252. Do not send referer when redirected.
  3253. * src/Request.cc (redirectUrl)
  3254. * test/RequestTest.cc
  3255. * test/HttpRequestTest.cc
  3256. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3257. Implemented BitTorrent/http/ftp integrated download.
  3258. I've rewritten lots of files and now some headers have forward
  3259. class declarations to reduce compile time.
  3260. The implementation is extremely alpha stage, I recommend to use this
  3261. for testing purpose only.
  3262. 2007-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3263. Fixed the compilation error on 64bit platform.
  3264. * test/HttpHeaderProcessorTest.cc
  3265. 2007-09-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3266. Merged Ross's patch that fixes compilation problem in MinGW
  3267. * test/DefaultBtProgressInfoFileTest.cc
  3268. 2007-09-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3269. Updated fr.po by sebone
  3270. * po/fr.po
  3271. Updated man page.
  3272. * doc/aria2c.1.txt
  3273. * Release 0.11.3
  3274. 2007-09-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3275. * src/MetalinkRequestInfo.cc (execute): Fixed BitTorrent download
  3276. failure in Metalink.
  3277. 2007-09-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3278. Automatically save *.aria2 control file of http/ftp download in every
  3279. 60 seconds.
  3280. * src/AutoSaveCommand.{h, cc}: New class.
  3281. * src/TimeBasedCommand.{h, cc}: New class.
  3282. * src/DownloadEngineFactory.cc (newConsoleEngine)
  3283. Disable parameterized URI support by default. Added -P option to
  3284. enable the feature.
  3285. * src/prefs.h: Added PREF_PARAMETERIZED_URI
  3286. * src/OptionHandlerFactory.cc
  3287. * src/main.cc: Also updated usages for -Z and --auto-file-renaming
  3288. Updated Japanese translation.
  3289. * po/ja.po
  3290. Updated man page.
  3291. * doc/aria2c.1.txt
  3292. * Release 0.11.3-rc
  3293. 2007-09-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3294. Now *.aria2 contorol file is first saved to *.aria2__temp and if
  3295. it is successful, then renamed to *.aria2.
  3296. This prevents *.aria2 file from being truncated or corrupted when
  3297. file system becomes out of space.
  3298. * src/DefaultBtProgressInfoFile.cc (save)
  3299. * src/SegmentMan.cc (save)
  3300. * test/DefaultBtProgressInfoFileTest.cc (testSave): Implemented.
  3301. 2007-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3302. Reduced the fragmentation of bitfield in http/ftp download.
  3303. * src/BitfieldMan.cc (getSparseMissingUnusedIndex)
  3304. * test/BitfieldManTest.cc
  3305. 2007-08-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3306. Added the ability to disable segmented download in .metalink.
  3307. aria2 can now recognize 'maxconnections' attribute in 'resources' and
  3308. 'url' tag.
  3309. * src/MetalinkEntry.{h, cc}
  3310. * src/RequestResource.{h, cc}
  3311. * src/MetalinkRequestInfo.cc
  3312. * src/Xml2MetalinkProcessor.cc
  3313. * test/Xml2MetalinkProcessorTest.cc
  3314. 2007-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3315. Added parameterized URI support.
  3316. * src/main.cc: -Z option added.
  3317. * src/OptionHandlerFactory.cc
  3318. * src/prefs.h: Added PREF_FORCE_SEQUENTIAL.
  3319. * src/PStringDatum.h: New class.
  3320. * src/PStringSegment.{h,cc}: New class.
  3321. * src/PStringNumLoop.h: New class.
  3322. * src/PStringSelect.h: New class.
  3323. * src/NumberDecorator.h: New class.
  3324. * src/FixedWidthNumberDecorator.h: New class.
  3325. * src/AlphaNumberDecorator.h: New class.
  3326. * src/PStringVisitor.h: New class.
  3327. * src/PStringBuildVisitor.{h,cc}: New class.
  3328. * src/ParameterizedStringParser.{h,cc}: New class.
  3329. * src/Util.{h,cc}
  3330. (isNumber): New function.
  3331. (isLowercase): New function.
  3332. (isUppercase): New function.
  3333. (alphaToNum): New function.
  3334. * test/ParameterizedStringParserTest.cc: New class.
  3335. * test/AlphaNumberDecoratorTest.cc: New class.
  3336. * test/PStringBuildVisitorTest.cc: New class.
  3337. * test/UtilTest.cc
  3338. (testIsNumber): New function.
  3339. (testIsLowercase): New function.
  3340. (testIsUppercase): New function.
  3341. (testAlphaToNum): New function.
  3342. Added '\n' after the error message
  3343. * src/RequestInfo.h (printDownloadAbortMessage)
  3344. Added auto file renaming feature in http(s)/ftp download.
  3345. * src/main.cc: Added --auto-file-renaming command-line option.
  3346. * src/OptionHandlerFactory.cc
  3347. * src/prefs.h: Added PREF_AUTO_FILE_RENAMING
  3348. * src/RequestGroup.{h, cc}
  3349. (shouldCancelDownloadForSafety): Rewritten
  3350. (tryAutoFileRenaming): New function.
  3351. * src/SegmentMan.{h, cc} (shouldCancelDownloadForSafety): Removed.
  3352. * src/HttpResponseCommand.cc
  3353. (executeInternal): Removed the call to RequestGroupMan::
  3354. isSameFileBeingDownloaded()
  3355. * src/FtpNegotiateCommand.cc
  3356. (recvSize): Removed the call to RequestGroupMan::
  3357. isSameFileBeingDownloaded()
  3358. * test/RequestGroupTest.cc: New class.
  3359. 2007-08-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3360. Merged Ross's patch: Removed setmode(). Use _CRT_fmode to enable binary
  3361. IO.
  3362. * src/DefaultBtProgressInfoFile.cc
  3363. * src/MetaFileUtil.cc
  3364. * src/SimpleLogger.cc
  3365. * src/SegmentMan.cc
  3366. * src/Util.cc
  3367. * src/Platform.cc
  3368. 2007-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3369. * src/Xml2MetalinkProcessor.cc (getPieceHash): Added missing .c_str().
  3370. 2007-08-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3371. Avoid sparse files if possible, because VFAT32 doesn't support it.
  3372. * src/DefaultDiskWriter.cc (initAndOpenFile)
  3373. Fixed the bug that prevents file allocation is not done when
  3374. dowloading multi-torrent file.
  3375. * src/AbstractDiskWriter.cc (openFile)
  3376. Increase the maximum number of -j option from 15 to 45.
  3377. * src/OptionHandlerFactory.cc (createOptionHandlers)
  3378. Added fr.po, thanks to Charles Landemaine.
  3379. * po/fr.po
  3380. * po/LINGUAS
  3381. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  3382. gcc 3.4.4 support:
  3383. * src/DefaultBtContext.cc: int32_t -> int
  3384. * src/main.cc: int -> int32_t, int32_t -> int
  3385. * src/messageDigest.h: uint32_t -> unsigned int
  3386. * src/NameResolver.h: int32_t -> int
  3387. * src/PeerConnection.cc: int -> int32_t
  3388. * src/SpeedCalc.cc: int32_t -> int
  3389. * src/TrackerUpdateCommand.h: int -> int32_t
  3390. * src/Util.cc: int32_t -> int
  3391. * src/Util.h: int32_t -> int
  3392. * src/Xml2MetalinkProcessor.cc: int -> uint32_t, int64_t -> uint64_t
  3393. * test/AnnounceListTest.cc: int -> int32_t
  3394. * test/ChunkedEncodingTest.cc: int -> int32_t
  3395. * test/DataTest.cc: int -> int32_t
  3396. * test/DefaultBtRequestFactoryTest.cc: int -> int32_t
  3397. * test/DefaultPeerListProcessorTest.cc: int -> int32_t
  3398. * test/DefaultPieceStorageTest.cc: int -> int32_t
  3399. * test/FeatureConfigTest.cc: int -> int32_t
  3400. * test/MetalinkEntryTest.cc: int -> int32_t
  3401. * test/MockBtRequestFactory.h: int -> int32_t
  3402. * test/MockPieceStorage.h: int -> int32_t
  3403. * test/OptionTest.cc: int -> int32_t
  3404. * test/RequestTest.cc: int -> int32_t
  3405. * test/SegmentManTest.cc: int -> int32_t
  3406. * test/Xml2MetalinkProcessorTest.cc: int -> int32_t
  3407. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  3408. Move sleep functions to Util class:
  3409. * src/Util.cc
  3410. (sleep): New function.
  3411. (usleep): New function.
  3412. * src/DownloadCommand.cc: sleep -> Util::sleep
  3413. * test/TimeSeedCriteriaTest.cc: sleep -> Util::sleep
  3414. MinGW build enhancements. The following files are added:
  3415. * src/timegm.{c,h}
  3416. Changes to support the above new files:
  3417. * configure.ac
  3418. * src/Makefile.am
  3419. * src/a2time.h
  3420. * src/Util.cc:
  3421. * src/strptime.c: Added support for %Z option.
  3422. Fixed MinGW non-blocking bug.
  3423. * src/SocketCore.cc
  3424. * src/HttpRequestCommand.cc
  3425. Miscellenous build fixes/enhancements.
  3426. * configure.ac: Added summary report.
  3427. * src/Platform.h: Tweaked #include's.
  3428. * src/a2netcompat.h: Tweaked #include's.
  3429. * src/strptime.h: Tweaked #include's.
  3430. * src/gai_strerror.c: Tweaked #include's.
  3431. * src/gai_strerror.h: _D_GETADDRINFO_H -> _D_GAI_STRERROR_H
  3432. * src/getaddrinfo.h: Moved #ifndef __MINGW32__
  3433. * src/gettimeofday.h: Added HAVE_CONFIG_H
  3434. 2007-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3435. Increased the initial connection size in BitTorrent download to 40.
  3436. * src/BtRuntime.h
  3437. Added the usage message of --peer-id-prefix option.
  3438. * src/main.cc
  3439. * Release 0.11.2
  3440. 2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3441. MessageDigestHelper is introduced in order to simplify the use
  3442. of message digest. Removed repeated code.
  3443. The message digest algorithm is now specified by string, like "sha1",
  3444. "md5".
  3445. * src/messageDigest.{h, cc}
  3446. * src/MessageDigestHelper.{h, cc}: New class.
  3447. * src/DefaultPieceStorage.cc
  3448. * src/DefaultBtContext.{h, cc}
  3449. (computeFastSet): New function.
  3450. (setInfoHash): Added for unit testing.
  3451. (setNumPieces): Added for unit testing.
  3452. * src/DefaultBtInteractive.cc
  3453. * src/BtPieceMessage.cc
  3454. * src/Peer.cc
  3455. * src/Checksum.h
  3456. * src/message.h
  3457. * src/IteratableChecksumValidator.h
  3458. * src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator
  3459. inside it.
  3460. * src/SegmentMan.{h, cc}
  3461. (checkIntegrity): Removed.
  3462. * src/IteratableChunkChecksumValidator.{h, cc}
  3463. * src/Util.h
  3464. (sha1Sum): Removed.
  3465. (simpleMessageDigest): Removed.
  3466. (fileChecksum): Removed.
  3467. (computeFastSet): Removed.
  3468. * src/ShaVisitor.cc
  3469. * src/ChunkChecksum.h
  3470. * src/DownloadCommand.cc
  3471. Removed messageDigest virtual functions.
  3472. * src/MultiDiskAdaptor.{h, cc}
  3473. * src/DiskAdaptor.h
  3474. * src/ByteArrayDiskWriter.h
  3475. * src/DiskWriter.h
  3476. * src/DiskAdaptorWriter.h
  3477. * src/AbstractSingleDiskAdaptor.{h, cc}
  3478. * src/AbstractDiskWriter.{h, cc}
  3479. Fixed comilation error when message digest is disabled.
  3480. * src/MetalinkEntry.{h, cc}
  3481. * src/MetalinkRequestInfo.cc
  3482. Removed srandom and random.
  3483. * src/SimpleRandomizer.h
  3484. Added size() virtual function to DiskAdaptor
  3485. * src/MultiDiskAdaptor.h
  3486. Fixed the bug that causes that files are not opened correctly in
  3487. multi-file torrent.
  3488. * src/TorrentRequestInfo.cc
  3489. * src/MultiDiskAdaptor.cc
  3490. Added SHA256 support
  3491. * src/messageDigest.cc
  3492. * src/Xml2MetalinkProcessor.cc
  3493. Show supported message digest algorithms
  3494. * src/main.cc
  3495. Updated contact info.
  3496. * src/main.cc
  3497. Applied Ross's patch
  3498. * src/a2netcompat.h
  3499. * src/main.cc
  3500. Fixed the bug that prevents a remote metalink from not being processed
  3501. even if '-o foo.metalink' is specified.
  3502. * src/MetalinkRequestInfo.cc
  3503. 2007-08-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3504. Merged Dan's patch:
  3505. * src/ByteArrayDiskWriter.cc: ios_base -> ios
  3506. Use va_copy to avoid core dump on amd64:
  3507. * src/SimpleLogger.cc
  3508. Updated contact info.
  3509. * src/main.cc
  3510. Added #ifdef ENABLE_MESSAGE_DIGEST to fix test errors when message
  3511. digest is not available.
  3512. * src/MetalinkEntry.h
  3513. 2007-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3514. Make a2netcompat.h include a2io.h to fix compilation error:
  3515. * src/a2netcompat.h
  3516. * src/SocketCore.cc: Removed include of a2io.h
  3517. * src/Util.cc: Removed include of a2io.h
  3518. Gather time related functions to a2time.h:
  3519. * src/a2time.h: New file.
  3520. * src/DefaultPeerStorage.cc
  3521. * src/SimpleLogger.cc
  3522. * src/Util.{h, cc}
  3523. * src/SimpleRandomizer.h
  3524. * src/TimeA2.{h,cc}
  3525. * src/DownloadCommand.cc
  3526. * src/main.cc
  3527. Removed #ifdef __MINGW32__ since gai_strerror is included in
  3528. a2netcompat.h:
  3529. * src/NameResolver.cc
  3530. Fixed compilation error without openssl:
  3531. * src/SocketCore.{h,cc}: Moved include of openssl/err.h to SocketCore.h
  3532. Added default block to suppress compiler warnings:
  3533. * src/MetalinkRequestInfo.cc (AccumulateNonP2PUrl::operator())
  3534. 2007-07-26 Ross Smith II <aria2spam at smithii dot com>
  3535. MinGW build enhancements. The following files are added:
  3536. * src/gai_strerror.{c,h}
  3537. * src/gettimeofday.{c,h}
  3538. Changes to support the above new files:
  3539. * configure.ac
  3540. * src/Makefile.am
  3541. * src/a2netcompat.h
  3542. * src/TimeA2.cc
  3543. * src/DefaultPeerStorage.cc
  3544. * src/NameResolver.cc: removed mingw_strerror() function.
  3545. * src/SocketCore.cc: removed mingw_strerror() function.
  3546. Miscellaneous MinGW build fixes.
  3547. * src/a2io.h: Use _lseeki64() instead of lseek()
  3548. * src/common.h
  3549. * src/DefaultFileAllocator.cc
  3550. * src/GlowFileAllocator.cc
  3551. * src/main.cc: Moved #include "prefs.h" to quiet compile error.
  3552. * src/NameResolver.cc
  3553. (callback): Changed int32_t to int.
  3554. (resolve): Changed int32_t to int.
  3555. * src/Platform.cc
  3556. * src/Platform.h
  3557. * test/MultiDiskWriterTest.cc
  3558. * test/PeerMessageUtilTest.cc
  3559. * src/localtime_r.c: Add DeleteCriticalSection() and at exit().
  3560. Other enhancements and fixes.
  3561. * src/HttpRequestCommand.cc
  3562. (executeInternal) Use non-blocking socket for HTTPS (MinGW only).
  3563. * src/SocketCore.cc:
  3564. (error): New function to abstract errno/WSAGetLastError().
  3565. (errorMsg): New function to abstract errno/WSAGetLastError().
  3566. (initiateSecureConnection): Added more detailed error reporting.
  3567. * src/SocketCore.h: Added private variable blocking, to allow
  3568. proper handling of OpenSSL psuedo-errors.
  3569. * src/message.h
  3570. (EX_SSL_INIT_FAILURE)
  3571. (EX_SSL_IO_ERROR)
  3572. (EX_SSL_PROTOCOL_ERROR)
  3573. (EX_SSL_UNKNOWN_ERROR)
  3574. (EX_SSL_CONNECT_ERROR)
  3575. (EX_SOCKET_BLOCKING)
  3576. (EX_SOCKET_NONBLOCKING)
  3577. (EX_SOCKET_UNKNOWN_ERROR)
  3578. * src/Util.cc
  3579. (setGlobalSignalHandler): Renamed signal to sig as signal is a
  3580. reserved name.
  3581. (httpGMT): Fixed typo.
  3582. 2007-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3583. Merged Ross's win32 patch(manually)
  3584. In the course of merging, following files are added.
  3585. * src/strptime.{h,c}
  3586. * src/libgen.{h,c}
  3587. * src/inet_aton.{h,c}
  3588. * src/Platform.{h,cc}
  3589. * src/localtime_r.{h,c}
  3590. * src/getaddrinfo.{h,c}
  3591. I've gethered network related things, and put them to following file:
  3592. * src/a2netcompat.h
  3593. Also io related things are put to following file:
  3594. * src/a2io.h
  3595. Changed %lld to %s because mingw32 doesn't recognize %lld.
  3596. * src/message.h
  3597. (MSG_ALLOCATION_COMPLETED)
  3598. (EX_TOO_LARGE_FILE)
  3599. (EX_SIZE_MISMATCH)
  3600. (EX_FILE_OFFSET_OUT_OF_RANGE)
  3601. (EX_INVALID_CHUNK_CHECKSUM)
  3602. (EX_INVALID_RANGE_HEADER)
  3603. * src/FileAllocationCommand.cc
  3604. * src/HttpResponse.cc
  3605. * src/RequestGroup.cc
  3606. * src/MultiDiskAdaptor.cc
  3607. * src/OptionHandlerImpl.h
  3608. * src/HttpResponseCommand.cc
  3609. * src/FtpNegotiateCommand.cc
  3610. * src/IteratableChecksumValidator.cc
  3611. * src/SegmentMan.cc
  3612. * src/ChunkChecksumValidator.cc
  3613. Added Randomizer::getRandomNumber(long int)
  3614. * src/Randomizer.h (getRandomNumber)
  3615. * src/SimpleRandomizer.h (getRandomNumber)
  3616. * src/BitfieldMan.cc (getMissingIndexRandomly): Use this new function.
  3617. * src/Util.cc (randomAlpha): Use this new function.
  3618. 2007-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3619. Converted int's to in32_t. long long int's are also converted to
  3620. int64_t
  3621. 2007-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3622. Fixed the bug that prevents cookies from being sent to the server
  3623. if the domain of cookie is FQDN and starts with ".".
  3624. * src/Cookie.cc (match)
  3625. To add the ability to change peer id.
  3626. * src/DefaultBtContext.h
  3627. (_peerIdPrefix): New variable
  3628. (setPeerIdPrefix): New function.
  3629. * src/torrentRequestInfo.cc
  3630. (execute): Set the option value of PREF_PEER_ID_PREFIX to
  3631. DefaultBtContext.
  3632. * src/main.cc (main): Added peer-id-prefix command-line option.
  3633. The usage message is not added yet.
  3634. * src/DefaultBtContext.cc
  3635. (generatePeerId): Use _peerIdPrefix.
  3636. * src/prefs.h (PREF_PEER_ID_PREFIX): New definition.
  3637. 2007-07-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3638. Fixed the bug that prevents filename in content-disposition from
  3639. being retrieved when filename is not quoted.
  3640. * src/Util.cc (getContentDispositionFilename)
  3641. Fixed the bug that causes infinate loop and memory leak when file open
  3642. operation failed.
  3643. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  3644. 2007-07-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3645. Fixed the bug that causes segfault when all URIs specified are
  3646. unsupported.
  3647. * src/RequestGroupMan.cc (getInitialCommands)
  3648. Check if RequestGroup::createNextCommand() returns empty list of
  3649. commands.
  3650. * src/RequestGroup.cc (createNextCommand)
  3651. Change log level from info to error so that users can notice that
  3652. an error occurred.
  3653. Fixed the bug that causes segfault when a zero-sized file is
  3654. downloaded.
  3655. * src/BitfieldMan.cc (isAllBitSet)
  3656. Return true if bitfieldLength is 0.
  3657. 2007-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3658. * src/main.cc
  3659. (showUsage): Added 3 usage examples for metalink download.
  3660. Replace MetalinkChunkChecksum with ChunkChecksum.
  3661. * src/MetalinkChunkChecksum.h: Removed.
  3662. * src/MetalinkEntry.h: MetalinkChunkChecksum -> ChunkChecksum.
  3663. * src/Xml2MetalinkProcessor.h: MetalinkChunkChecksum -> ChunkChecksum.
  3664. * src/Xml2MetalinkProcessor.cc
  3665. (getPieceHash): Use ChunkChecksum instead of MetalinkChunkChecksum.
  3666. * src/MetalinkRequestInfo.cc (execute)
  3667. * Release 0.11.1
  3668. 2007-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3669. Reads URIs from stdin when "-i -" is specified.
  3670. * src/UriFileListParser.h, src/UriFileListParser.cc: Removed.
  3671. * src/UriListParser.h, src/UriListParser.cc: New class.
  3672. * src/StreamUriListParser.h: New class.
  3673. * src/FileUriListParser.h: New class.
  3674. * src/main.cc (main): Use StreamUriListParser and FileUriListParser
  3675. instead of UriFileListParser.
  3676. 2007-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3677. Made console readout more readable.
  3678. * src/ConsoleDownloadEngine.cc (sendStatistics)
  3679. 2007-07-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3680. Fix the bug that causes -s option not to work.
  3681. * src/main.cc (main)
  3682. * src/a2algo.h: New file.
  3683. 2007-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3684. Create directory structure specified in metalink file.
  3685. * src/RequestGroup.h, src/RequestGroup.cc
  3686. (initAndOpenFile): Create a directory to store files if it does not
  3687. exist.
  3688. (getDir): New function.
  3689. Added ETA and download speed for an individual file to readout.
  3690. * src/ConsoleDownloadEngine.cc (sendStatistics)
  3691. * src/RequestGroup.h
  3692. (calculateDownloadSpeed): New function.
  3693. 2007-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3694. Made -S option work with metalink file and provided selective download
  3695. to metalink.
  3696. * src/MetalinkEntry.h, src/MetalinkEntry.cc
  3697. (filename): Removed.
  3698. (file): New variable.
  3699. (size): Removed.
  3700. (operator=): Updated.
  3701. (getPath): New function.
  3702. (getLength): New function.
  3703. (toFileEntry): New function.
  3704. * src/TorrentRequestInfo.h, src/TorrentRequestInfo.cc
  3705. (execute): Use toStream.
  3706. (showFileEntry): Removed.
  3707. * src/MetalinkRequestInfo.h
  3708. (targetFiles): New variable.
  3709. (setTargetFiles): New variable.
  3710. * src/MetalinkRequestInfo.cc
  3711. (execute): Added the ability to print file information included in
  3712. a metalink file.
  3713. Added selective download mode to metalink.
  3714. * src/main.cc
  3715. (showUsage): Updated to denote that -S and --select-file options are
  3716. applicable to metalink.
  3717. * src/FileEntry.h
  3718. (operator=): New function.
  3719. (getBasename): New function.
  3720. (getDirname): New function.
  3721. * src/Util.h, src/Util.cc
  3722. (toStream): New function.
  3723. * src/Xml2MetalinkProcessor.cc: Updated.
  3724. Made aria2 work with metalink with directory structure.
  3725. * src/File.h, src/File.cc
  3726. (getBasename): New function.
  3727. (getDirname): New function.
  3728. * src/RequestGroup.h, src/RequestGroup.cc
  3729. (_topDir): New variable.
  3730. (setTopDir): New function.
  3731. (initSegmentMan): A directory structure is added to _segmentMan->dir.
  3732. Rewrote HTTP header parsing with stringstream.
  3733. * src/HttpConnection.h, src/HttpConnection.cc
  3734. (HttpRequestEntry): New class.
  3735. (headerBuf): Removed.
  3736. (headerBufLength): Removed.
  3737. (outstandingHttpRequests): Now its element type is
  3738. HttpRequestEntryHandle.
  3739. (findEndOfHeader): Removed.
  3740. (receiveResponse): Rewritten.
  3741. * src/HttpHeaderProcessor.h, src/HttpHeaderProcessor.cc: New class.
  3742. Updated doc for -j option to notice that it should be used with -i
  3743. option.
  3744. * src/main.cc (showUsage)
  3745. Removed unused classes.
  3746. * src/RequestInfo.h
  3747. (FileInfo): Removed.
  3748. (checksum): Removed.
  3749. (fileInfo): Removed.
  3750. (setChecksum): Removed.
  3751. (getChecksum): Removed.
  3752. (getFileInfo): Removed.
  3753. Use ISO units.
  3754. * src/ConsoleDownloadEngine.cc
  3755. * src/TorrentConsoleDownloadEngine.cc
  3756. * src/Util.cc (abbrevSize)
  3757. 2007-06-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3758. Added the default listening ports to the help message.
  3759. * src/main.cc (showUsage)
  3760. 2007-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3761. Reduce the number of calls to gettimeofday to lower CPU load.
  3762. * src/TimeA2.h, src/TimeA2.cc (differenceInMillis): New function.
  3763. * src/SpeedCalc.h, src/SpeedCalc.cc (calculateSpeed): New function.
  3764. * src/Peer.h (calculateUploadSpeed): New function.
  3765. (calculateDownloadSpeed): New function.
  3766. * src/DefaultPeerStorage.cc
  3767. (CalculateStat): Added _now variable.
  3768. In operator(), call Peer::calculateDownloadSpeed(const struct timeval&)
  3769. and Peer::calculateUploadSpeed(const struct timeval&)
  3770. Drop connection if no request or piece message is exchanged in
  3771. a certain interval.
  3772. * src/DefaultBtInteractive.h
  3773. (btRuntime): New variable.
  3774. (inactiveCheckPoint): New variable.
  3775. (checkActiveInteraction): New function.
  3776. * src/DefaultBtInteractive.cc (receiveMessages): Reset timer when
  3777. request or piece message is received.
  3778. (checkActiveInteraction): New function.
  3779. (doInteractionProcessing): Call checkActiveInteraction.
  3780. Fixed the bug that causes remote Metalink and Torrent files are not
  3781. processed.
  3782. * src/MultiUrlRequestInfo.cc (createNextRequestInfo): Fixed the bug.
  3783. 2007-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3784. Changed format of log file.
  3785. * src/SimpleLogger.cc
  3786. * Release 0.11.0
  3787. 2007-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3788. * src/AbstractCommand.cc
  3789. (execute): Changed log level of MSG_RESTARTING_DOWNLOAD and
  3790. MSG_MAX_TRY from error to info.
  3791. Added MSG_DOWNLOAD_ABORTED after MSG_MAX_TRY.
  3792. * src/message.h
  3793. (MSG_TORRENT_DOWNLOAD_ABORTED): New definition.
  3794. (MSG_DOWNLOAD_ABORTED): Added %s.
  3795. (MSG_RESTARTING_DOWNLOAD): Added %s.
  3796. (MSG_DOWNLOAD_ALREADY_COMPLETED): Updated.
  3797. * src/PeerAbstractCommand.cc
  3798. (execute): MSG_DOWNLOAD_ABORTED -> MSG_TORRENT_DOWNLOAD_ABORTED
  3799. * src/Request.h
  3800. (cookieBox): Made ShardHandle.
  3801. * src/RequestGroup.h, src/RequestGroup.cc
  3802. (createNextCommandWithAdj): New function.
  3803. * src/FileAllocationCommand.cc
  3804. (executeInternal): Use createNextCommandWithAdj().
  3805. * src/CheckIntegrityCommand.cc
  3806. (executeInternal): Use createNextCommandWithAdj().
  3807. Added --load-cookies command-option.
  3808. * src/OptionHandlerFactory.cc
  3809. (createOptionHandlers): Added PREF_LOAD_COOKIES.
  3810. * src/CookieBox.h, src/CookieBox.cc: Rwritten using CookieParser.
  3811. Now aria2 can handle cookie's expiration date.
  3812. * src/Cookie.h (expires): Changed its type to time_t.
  3813. * src/main.cc: Added --load-cookies command-line option.
  3814. * src/prefs.h (PREF_LOAD_COOKIES): New definition.
  3815. * src/Util.h, src/Util.cc (httpGMT): New function.
  3816. * src/Request.cc (Request): Initialize cookieBox using
  3817. CookieBoxFactory.
  3818. * src/CookieBoxFactory.h, src/CookieBoxFactory.cc: New class.
  3819. * src/CookieParser.h, src/CookieParser.cc: New class.
  3820. * src/main.cc: Chagned the default value of --metalink-servers to 5.
  3821. * src/HttpResponseCommand.cc
  3822. (handleOtherEncoding): Call RequestGroup::shouldCancelDownloadForSafety
  3823. * src/MetalinkRequestInfo.cc: Now -s option is ignored in Metalink
  3824. download.
  3825. 2007-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3826. Added -j command-line option.
  3827. * src/OptionHandlerFactory.cc (createOptionHandlers)
  3828. * src/main.cc
  3829. * src/ByteArrayDiskWriter.h, src/ByteArrayDiskWriter.cc
  3830. Rewritten using stringstream.
  3831. * src/TrackerUpdateCommand.h, src/TrackerUpdateCommand.cc
  3832. Rewritten using stringstream.
  3833. 2007-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3834. Make download size shown in MB, KB.
  3835. * src/ConsoleDownloadEngine.h (sendStatistics)
  3836. * src/Util.h, srcUtil.cc (abbrevSize): New function.
  3837. 2007-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3838. Accept incoming connections if download rate is low.
  3839. * src/PeerListenCommand.h, src/PeerListenCommand.cc:
  3840. (_lowestSpeedLimit): New variable.
  3841. (setLowestSpeedLimit): New function.
  3842. (execute): Accept incoming connections if download rate is low.
  3843. MAX_PEERS is ignored in this case.
  3844. Disable PREF_OUT in multiple concurrent download:
  3845. * src/RequestGroup.h, src/RequestGroup.cc
  3846. (setUserDefinedFilename): New function.
  3847. * src/DownloadEngineFactory.cc
  3848. (newConsoleEngine): Do not set PREF_OUT to requestGroup in multiple
  3849. concurrent download.
  3850. * src/DefaultSegmentManFactory.cc
  3851. (createNewInstance): Comment out the line: segmentMan->ufilename = ...
  3852. 2007-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3853. RequestGroup::getNextCommand() was renamed to createNextCommand().
  3854. Added its overloaded method.
  3855. * src/RequestGroup.h
  3856. (_numConcurrentCommand): New variable.
  3857. (setNumConcurrentCommand): New function.
  3858. * src/RequestGroup.cc
  3859. Abort download if same file is being downloaded concurrently.
  3860. * src/RequestGroup.h, src/RequestGroupMan.cc
  3861. (isSameFileBeingDownloaded): New function.
  3862. * src/HttpResponseCommand.cc (executeInternal)
  3863. * src/FtpNegotiateCommand.cc (recvSize)
  3864. * src/message.h (EX_DUPLICATE_FILE_DOWNLOAD): New definition.
  3865. * main.cc: Added help message for -i option.
  3866. 2007-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3867. * src/FileAllocationCommand.cc: Derived from RealtimeCommand.
  3868. * src/CheckIntegrityCommand.cc: Derived from RealtimeCommand.
  3869. * src/MetalinkEntry.h
  3870. (checksum): Changed to ChecksumHandle
  3871. * src/MetalinkRequestInfo.cc
  3872. (checksum): Changed to ChecksumHandle
  3873. * src/File.cc
  3874. (mkdirs): OPEN_MODE -> DIR_OPEN_MODE
  3875. * src/common.h
  3876. (DIR_OPEN_MODE): New definition
  3877. * src/RequestGroup.cc
  3878. (prepareForNextAction): Added an argument.
  3879. * src/message.h
  3880. (MSG_GOOD_CHECKSUM): New definition
  3881. (MSG_BAD_CHECKSUM): New definition
  3882. * src/HttpResponseCommand.cc
  3883. (handleDefaultEncoding): Continue download sequence in new
  3884. non-segmented download.
  3885. * src/FileAllocationEntry.h
  3886. (_nextDownloadCommand): New variable.
  3887. * src/DownloadCommand.cc
  3888. (prepareForNextSegment): Create ChecksumCommand if checksum is
  3889. available.
  3890. * src/RealtimeCommand.h, src/RealtimeCommand.cc: New class.
  3891. * src/IteratableChecksumValidator.h,
  3892. src/IteratableChecksumValidator.cc: New class.
  3893. * src/ChecksumCommand.h, src/ChecksumCommand.cc: New class.
  3894. 2007-05-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3895. Change file mode to 666:
  3896. * src/common.h (OPEN_MODE): New definition.
  3897. * src/File.cc
  3898. * src/Util.cc
  3899. * src/Directry.cc
  3900. * src/AbstractDiskWriter.cc
  3901. Change the level of log message "download aborted" to debug:
  3902. * src/PeerAbstractCommand.cc (execute)
  3903. * src/RequestGroup.h (RequestGroup): Initialized _hintTotalLength to 0.
  3904. * src/TrackerWatcherCommand.cc
  3905. (createCommand): Sleep some seconds after request failed.
  3906. If tracker request fails more than value of PREF_TRACKER_MAX_TRIES,
  3907. then abort tracker request.
  3908. 2007-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3909. * Added the simultaneous download feature.
  3910. * src/main.cc: Print "Exception caught: " when exception is caught.
  3911. Use CUIDCounter instead of BtRuntime::getNewCuid():
  3912. * src/ActivePeerConnectionCommand.cc
  3913. * src/PeerInteractionCommand.cc
  3914. * src/BtRuntime.h
  3915. (cuidCounter): Removed.
  3916. (getNewCuid): Removed.
  3917. * src/DownloadEngineFactory.cc
  3918. * src/PeerListenCommand.cc
  3919. * src/TrackerUpdateCommand.cc
  3920. * src/PeerInitiateConnectionCommand.cc
  3921. 2007-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3922. * src/PeerAbstractCommand.cc
  3923. (onAbort): Call PeerStorage::returnPeer()
  3924. * src/DefaultPeerStorage.h, src/DefaultPeerStorage.cc
  3925. (incomingPeers): New variable.
  3926. (addIncomingPeer): New function.
  3927. (returnPeer): New function.
  3928. (onErasingPeer): New function.
  3929. (addPeer): push_back -> push_front
  3930. (getActivePeers): Rewritten.
  3931. (calculateStat): Rewritten.
  3932. * src/PeerStorage.h
  3933. (TransferStat::copy): New function.
  3934. (TransferStat::TransferStat): New function.
  3935. (TransferStat::operator=): New function.
  3936. (addIncomingPeer): New function.
  3937. (returnPeer): New function.
  3938. * src/PeerListenCommand.cc
  3939. (execute): Use PeerStorage::addIncomingPeer() instead of
  3940. Peer::addPeer().
  3941. 2007-04-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3942. Connect to a peer actively when download speed is lower than specified
  3943. speed in torrent download:
  3944. * src/ActivePeerConnectionCommand.h: New class.
  3945. 2007-03-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3946. * src/HttpRequest.cc (createRequest): url-encode user-agent
  3947. * src/main.cc: Fixed the bug that prevents download if .netrc
  3948. doesn't exist.
  3949. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3950. To cache resolved hostname:
  3951. * src/AbstractCommand.h, src/AbstractCommand.cc
  3952. (resolveHostname): Put outside #ifdef ENABLE_ASYNC_DNS clause.
  3953. Added dns cache.
  3954. * src/FtpInitiateConnectionCommand.cc
  3955. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS.
  3956. * src/NameResolver.h, src/NameResolver.cc: Added synchronized
  3957. NameResolver working without ares.
  3958. * src/TorrentRequestInfo.cc
  3959. (execute): Don't cache dns in torrent download.
  3960. * src/HttpInitiateConnectionCommand.cc
  3961. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS
  3962. * src/DNSCache.h: New class.
  3963. * src/UrlRequestInfo.cc
  3964. (execute): Use dns cache.
  3965. In http request, suppress port number in http request header if port
  3966. is 80 or 443:
  3967. * src/HttpRequest.cc (getHostText): Suppress port number in http
  3968. request header if port is 80 or 443.
  3969. (createProxyRequest): Allways send port number.
  3970. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3971. To add the command-line option which disables netrc support:
  3972. * src/OptionHandlerFactory.cc
  3973. (createOptionHandlers): Added PREF_NO_NETRC.
  3974. * src/main.cc: Added -n option.
  3975. * src/prefs.h (PREF_NO_NETRC): New definition.
  3976. * src/RequestFactory.cc: Do not use netrc in ftp if PREF_NO_NETRC is
  3977. V_TRUE.
  3978. Note that netrc is not used in http, http proxy even if PREF_NO_NETRC
  3979. is V_FALSE. This may get configurable in the future release.
  3980. To clear peer's error status by time basis:
  3981. * src/PeerAbstractCommand.cc
  3982. (onAbort): Call Peer::startBadCondition().
  3983. * src/Peer.h, src/Peer.cc
  3984. (error): Removed.
  3985. (_badConditionStartTime): New variable.
  3986. (_badConditionInterval): New variable. Initialized to 10 seconds.
  3987. (startBadCondition): New function.
  3988. (isGood): New function.
  3989. * src/DefaultPeerStorage.cc
  3990. (addPeer): Use Peer::isGood().
  3991. (FindFinePeer): Use Peer::isGood().
  3992. Always include port number in http request header:
  3993. * src/HttpRequest.cc (getHostText): Always include port number in
  3994. http request header.
  3995. 2007-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3996. To the ability to read options from a config file:
  3997. * src/main.cc: Command-line parameter validation is delegated to
  3998. OptionHandler class.
  3999. * src/OptionHandlerFactory.h, src/OptionHandlerFactory.cc: New class.
  4000. * src/Option.h, src/Option.cc (clear): New function.
  4001. * src/OptionParser.h, src/OptionParser.cc: New class.
  4002. * src/OptionHandler.h: New class.
  4003. * src/NameMatchOptionHandler.h: New class.
  4004. * src/OptionHandlerImpl.h: New classes.
  4005. * src/prefs.h: '_' -> '-'
  4006. (FTP_PASV_ENABLED): Renamed to FTP_PASV.
  4007. (FTP_PASV): New definition.
  4008. * src/Util.h, src/Util.cc (getRealSize): New function.
  4009. To disable netrc support if .netrc file does not have correct
  4010. permissions:
  4011. * src/File.h, src/File.cc (mode): New function.
  4012. To prevent confidential information to be logged:
  4013. * src/HttpConnection.h, src/HttpConnection.cc
  4014. (eraseConfidentialInfo): New function.
  4015. (sendRequest): Call eraseConfidentialInfo().
  4016. (sendProxyRequest): Call eraseConfidentialInfo().
  4017. * src/main.cc: Validate permissions of .netrc file.
  4018. To add --user-agent command-line option:
  4019. * src/main.cc: Added new command line option: --user-agent
  4020. * src/prefs.h (PREF_USER_AGENT): New definition.
  4021. * src/HttpRequestCommand.cc (executeInternal): Set user-agent option
  4022. parameter to HttpRequest object.
  4023. * src/AbstractProxyRequestCommand.cc
  4024. (executeInternal): Set user-agent option parameter to HttpRequest
  4025. object.
  4026. Marged the patches from Dan Fandrich.
  4027. 2007-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4028. Use filename and size from Metalink file instead of sending HEAD
  4029. request:
  4030. * src/UrlRequestInfo.h
  4031. (_filename): New variable.
  4032. (_totalLength): New variable.
  4033. (setTotalLength): New variable.
  4034. (setFilename): New variable.
  4035. * src/MetalinkRequestInfo.cc
  4036. (execute): Set filename and size to UrlRequestInfo
  4037. * src/UrlRequestInfo.cc
  4038. (execute): Use filename and size from Metalink instead of seding
  4039. HEAD request to servers.
  4040. 2007-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4041. To add the ability to resume downloading a partially downloaded file
  4042. which is downloaded from the beginning:
  4043. * src/FileAllocator.h: Made abstract class. New DefaultFileAllocator
  4044. takes this role.
  4045. * src/main.cc: Added -c option.
  4046. * src/BitfieldMan.h, src/BitfieldMan.cc (setBitRange): New function.
  4047. * src/DiskWriter.h (openExistingFile): Added totalLength argument.
  4048. * src/prefs.h (PREF_CONTINUE): New definition.
  4049. * src/SegmentMan.h, src/SegmentMan.cc (markPieceDone): New function.
  4050. * src/DefaultDiskWriter.cc
  4051. (createNewDiskWriter): Add GlowFileAllocator to the new object.
  4052. * src/AbstractDiskWriter.h
  4053. (glowFileAllocator): New variable.
  4054. * src/AbstractDiskWriter.cc
  4055. (openExistingFile): Now preallocate file space from the end of the
  4056. existing file if totalLength argument is specified and grater than 0.
  4057. * src/UrlRequestInfo.cc: If -c option is specified and the file
  4058. to download exists in local, continue the download of the file.
  4059. --allow-overwrite=true is assumed in this context.
  4060. * src/DefaultFileAllocator.h, src/DefaultFileAllocator.cc: New class.
  4061. * src/GlowFileAllocator.h, src/GlowFileAllocator.cc: New class.
  4062. Throw exception if --check-integrity=true is specified but chunk
  4063. checksums are not provided:
  4064. * src/UrlRequestInfo.cc
  4065. Do not print URLs to stdout:
  4066. * src/UrlRequestInfo.cc
  4067. 2007-03-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4068. * src/Request.h: Use AuthResolver to get authentication information.
  4069. * src/main.cc: Made RequestFactory a singleton object. Netrc is now
  4070. set to RequestFactory object.
  4071. * src/AuthConfigItem.h, src/AuthConfigItem.cc: Removed.
  4072. * src/AuthConfig.h, src/AuthConfig.cc: Rewritten.
  4073. * src/TrackerWatcherComand.cc: Use RequestFactorySingletonHolder to
  4074. create Request object.
  4075. 2007-03-19 Tatsuhiro Tsujikawa <tujikawa at valkyrie dot rednoah com>
  4076. To integrate Netrc into exsiting classes:
  4077. * src/Request.h
  4078. (_userDefinedAuthConfig): New variable.
  4079. (findNetrcAuthenticator): New function.
  4080. (segment): Removed.
  4081. (setUserDefinedAuthConfig): New function.
  4082. (resolveHttpAuthConfigItem): New function.
  4083. (resolveFtpAuthConfigItem): New function.
  4084. (resolveHttpProxyAuthConfigItem): New function.
  4085. * src/HttpRequest.h
  4086. (authConfig): Removed.
  4087. (proxyAuthConfig): Removed.
  4088. (setAuthConfig): Removed.
  4089. (setProxyAuthConfig): Removed.
  4090. * src/UrlRequest.h
  4091. (getHeadResult): Added a parameter: authConfigHandle
  4092. * src/common.h
  4093. (SingletonHolder.h): New include.
  4094. * src/main.cc
  4095. (Netrc.h): New include.
  4096. (main): Removed initial values of PREF_FTP_USER, PREF_FTP_PASSWD.
  4097. Added initial value of PREF_NETRC_PATH.
  4098. Added the initialization of netrc.
  4099. * src/AuthConfig.h: New class.
  4100. * src/prefs.h
  4101. (PREF_NETRC_PATH): New definition.
  4102. * src/HttpAuthConfig.h: Removed.
  4103. * src/Netrc.cc
  4104. (getRequiredNextToken): New function.
  4105. (skipMacdef): New function.
  4106. (parse): Rewritten.
  4107. * src/Netrc.h
  4108. (getRequiredNextToken): New function.
  4109. (skipMacdef): New function.
  4110. * src/Util.h, src/Util.cc
  4111. (getHomeDir): New function.
  4112. * src/TrackerWatcherComand.cc
  4113. (createRequestCommand): Use AuthConfig.
  4114. * src/FtpConnection.cc
  4115. (sendUser): Use Request::resolveFtpAuthConfigItem().
  4116. (sendPass): Use Request::resolveFtpAuthConfigItem().
  4117. * src/Request.cc
  4118. (findNetrcAuthenticator): New function.
  4119. (resolveHttpAuthConfigItem): New function.
  4120. (resolveFtpAuthConfigItem): New function.
  4121. (resolveHttpProxyAuthConfigItem): New function.
  4122. * src/UrlRequestInfo.cc: Use AuthConfig.
  4123. * src/HttpRequest.cc
  4124. (createRequest): Use authConfig.
  4125. (getProxyAuthString): Use authConfig.
  4126. (configure): Removed PREF_HTTP_USER, PREF_HTTP_PASSWD,
  4127. PREF_HTTP_PROXY_USER, PREF_HTTP_PROXY_PASSWD.
  4128. 2007-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4129. To reduce overhead to find commands whose socket is either
  4130. readable or writable in the download engine loop:
  4131. * src/Command.h, src/Command.cc
  4132. (STATUS): New enum.
  4133. (status): New variable.
  4134. (statusMatch): New function.
  4135. (setStatusActive): New function.
  4136. (setStatusInactive): New function.
  4137. * src/DownloadEngine.h, src/DownloadEngine.cc
  4138. (executeCommand): New function.
  4139. (run): Simplified.
  4140. (waitData): Call Command::setStatusActive() when command's socket is
  4141. readable or writable.
  4142. 2007-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4143. To handle Segment as SegmentHandle:
  4144. * src/AbstractCommand.cc (execute): Rewritten.
  4145. * src/SegmentMan.h: Segment -> SegmentHandle
  4146. Introducded HttpResponse class, HttpRequest class to improve code
  4147. extensiveness and make it clear:
  4148. * src/HttpDownloadCommand.cc: transfer encoders are now managed by
  4149. HttpResponse class.
  4150. * src/HttpRequest.h, src/HttpRequest.cc: New class.
  4151. * src/HttpResponse.h, src/HttpResponse.cc: New class.
  4152. * src/HttpConnection.cc: Contruction of http request were moved to
  4153. HttpRequest class.
  4154. * src/HttpResponseCommand.h, src/HttpResponseCommand.cc: Refactored.
  4155. * src/HttpRequestCommand.cc (executeInternal): Rewritten.
  4156. * src/HttpAuthConfig.h: New class.
  4157. * src/Range.h: New class.
  4158. To make FtpTunnel{Request, Response}Command and
  4159. HttpProxy{Request, Response}Command derived from
  4160. AbstractProxy{Request, Response}Command:
  4161. * src/FtpTunnelResponseCommand.h, src/FtpTunnelResponseCommand.cc:
  4162. Derived from AbstractProxyRequestCommand class.
  4163. * src/FtpTunnelRequestCommand.h, src/FtpTunnelRequestCommand.cc:
  4164. Derived from AbstractProxyResponseCommand class.
  4165. * src/HttpProxyRequestCommand.h, src/HttpProxyRequestCommand.cc:
  4166. Derived from AbstractProxyRequestCommand class.
  4167. * src/HttpProxyResponseCommand.h, src/HttpProxyResponseCommand.cc:
  4168. Derived from AbstractProxyResponseCommand class.
  4169. * src/AbstractProxyRequestCommand.h, src/AbstractProxyRequestCommand.cc
  4170. : New class.
  4171. * src/AbstractProxyResponseCommand.h,
  4172. src/AbstractProxyResponseCommand.cc: New class.
  4173. To add netrc support:
  4174. * src/Netrc.h, src/Netrc.cc: New class.
  4175. * src/Util.h, src/Util.cc (split): New function.
  4176. * src/HttpHeader.cc (getRange): Fixed so that it inspects
  4177. "Content-Range" header instead of "Range" header.
  4178. * src/HttpHeader.h
  4179. (getStatus): Removed.
  4180. (setStatus): Removed.
  4181. * src/Segment.h
  4182. (getPositionToWrite): New function.
  4183. 2007-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4184. * src/HttpHeader.h
  4185. (Range.h): New include.
  4186. (status): New variable.
  4187. (HttpHeader): Initialized status with 0.
  4188. (getStatus): New function.
  4189. (setStatus): New function.
  4190. (getRange): New function.
  4191. (HttpHeaderHandle): New function.
  4192. * src/HttpHeader.cc
  4193. (getRange): New function.
  4194. * src/Request.h
  4195. (RequestWeakHandle): New definition.
  4196. * src/HttpConnection.h
  4197. (HttpConnectionHandle): New type definition.
  4198. * src/HttpConnection.cc
  4199. (receiveResponse): Set HTTP status to headers.
  4200. * src/main.cc
  4201. (showUsage): Fixed typo.
  4202. * src/Segment.h
  4203. (SegmentHandle): New type definition.
  4204. * src/BitfieldMan.h
  4205. (getMissingUnusedLength): New function.
  4206. * src/BitfieldMan.cc
  4207. (getMissingUnusedLength): New function.
  4208. 2007-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4209. To fix static initialization order problem:
  4210. * src/BitfieldManFactory.h
  4211. (defaultRandomizer): Removed.
  4212. (factory): New variable.
  4213. (getNewFactory): Removed.
  4214. (getFactoryInstance): New function.
  4215. (setDefaultRandomizer): Rewritten.
  4216. (getDefaultRandomizer): Rewritten.
  4217. * src/BitfieldManFactory.cc
  4218. (defaultRandomizer): Removed.
  4219. (factory): Initialized to 0.
  4220. (BitfieldManFactory): Initialized randomizer to 0.
  4221. * src/DefaultPieceStorage.cc
  4222. (DefaultPieceStorage): getNewFactory() -> getFactoryInstance()
  4223. * src/Peer.cc
  4224. (Peer): getNewFactory() -> getFactoryInstance()
  4225. * src/SegmentMan.cc
  4226. (initBitfield): getNewFactory() -> getFactoryInstance()
  4227. * src/Piece.cc
  4228. (Piece): getNewFactory() -> getFactoryInstance()
  4229. 2007-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4230. To fix the bug that causes crash on Max OS X:
  4231. * src/SimpleRandomizer.h
  4232. (getInstance): Create new instance if the static variable is null.
  4233. * src/SimpleRandomizer.cc
  4234. (randomizer): Initialized to 0.
  4235. * src/BitfieldManFactory.h
  4236. (getNewFactory): Removed the call to setRandomizer().
  4237. To fix the miscalculation of the range of checksum:
  4238. * src/BitfieldMan.h
  4239. (isBitSetOffsetRange): New function.
  4240. * src/BitfieldMan.cc
  4241. (isBitSetOffsetRange): New function.
  4242. * src/SegmentMan.cc
  4243. (tryChunkChecksumValidation): Use BitfieldMan::isBitSetOffsetRange().
  4244. Use bitfield->getBlockLength() instead of segment.segmentLength.
  4245. * Release 0.10.1
  4246. 2007-02-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4247. To lower CPU usage in BitTorrent download when --max-upload-limit
  4248. command-line option specified:
  4249. * src/DefaultBtMessageDispatcher.cc
  4250. (sendMessages): Calculate uploading speed only when current message
  4251. is uploading data and is not sent yet.
  4252. * src/DefaultPeerStorage.h
  4253. (MAX_PEER_LIST_SIZE): 100 -> 60, because 60 is well enough.
  4254. * src/HttpResponseCommand.cc
  4255. (handleDefaultEncoding): Added the cast to int32_t to itos.
  4256. This fixes compile error in Soralis 10.
  4257. 2007-01-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4258. To fix segfault in Metalink download:
  4259. * src/UrlRequestInfo.h
  4260. (filename): Removed.
  4261. (totalLength): Removed.
  4262. (setTotalLength): Removed.
  4263. (setFilename): Removed.
  4264. * src/MetalinkRequestInfo.cc
  4265. (execute): Do not set filename and totalLength to reqInfo.
  4266. Set chunk checksum to reqInfo if it is not null.
  4267. * src/HttpResponseCommand.cc
  4268. (executeInternal): Fixed filename in log.
  4269. (handleDefaultEncoding): Removed the call to initBitfield() and
  4270. markAllPiecesDone().
  4271. (handleOtherEncoding): Added HEAD method handling.
  4272. * src/FtpNegotiateCommand.cc
  4273. (executeInternal): Added SEQ_HEAD_OK handling.
  4274. (recvSize): In HEAD handling, set sequence to SEQ_HEAD_OK and
  4275. return false.
  4276. * src/FtpNegotiateCommand.h
  4277. (SEQ_HEAD_OK): New definition.
  4278. * src/SegmentMan.cc
  4279. (initBitfield): Delete bitfield.
  4280. (isChunkChecksumValidationReady): Fixed the condition.
  4281. * src/UrlRequestInfo.cc: Fixed so that Metalink and Torrent download
  4282. works fine.
  4283. 2007-01-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4284. * src/Xml2MetalinkProcessor.h
  4285. (xpathExists): New function.
  4286. * src/Xml2MetalinkProcessor.cc
  4287. (xpathExists): New function.
  4288. Not to send HEAD request if filename and size are available in Metalink
  4289. file:
  4290. * src/UrlRequestInfo.h
  4291. (filename): New variable.
  4292. (totalLength): New variable.
  4293. (setTotalLength): New function.
  4294. (setFilename): New function.
  4295. * src/MetalinkRequestInfo.cc
  4296. (execute): Set filename and size to UrlRequestInfo.
  4297. * src/MetalinkEntry.cc
  4298. (MetalinkEntry): Initialize size with 0.
  4299. * src/UrlRequestInfo.cc
  4300. (execute): Set filename and size to SegmentMan.
  4301. Not to download rest of the files after selected files are downloaded
  4302. in BitTorrent:
  4303. * src/PieceStorage.h
  4304. (allDownloadFinished): New function.
  4305. * src/DefaultBtAnnounce.cc
  4306. (isCompleteAnnounceReady): Use allDownloadFinished instead of
  4307. downloadFinished.
  4308. (getAnnounceUrl): Use allDownloadFinished instead of downloadFinished.
  4309. * src/DefaultPieceStorage.cc
  4310. (completePiece): Use allDownloadFinished instead of downloadFinished.
  4311. Commented out the call to finishSelectiveDownloadingMode().
  4312. (downloadFinished): Call isFilteredAllBitSet() instead of
  4313. isAllBitSet().
  4314. (allDownloadFinished): New function.
  4315. * src/DefaultBtInteractive.cc
  4316. (addBitfieldMessageToQueue): Call allDownloadFinished() instead of
  4317. downloadFinished().
  4318. (checkHave): Call allDownloadFinished() instead of downloadFinished().
  4319. * src/TorrentDownloadEngine.cc
  4320. (onEndOfRun): Call allDownloadFinished() instead of downloadFinished().
  4321. * src/BitfieldMan.h
  4322. (isFilteredAllBitSet): New function.
  4323. * src/ShareRatioSeedCriteria.h
  4324. (PieceStorage.h): New include.
  4325. (pieceStorage): New variable.
  4326. (evaluate):
  4327. btContext->getTotalLength() -> pieceStorage->getCompletedLength()
  4328. * src/BitfieldMan.cc
  4329. (isFilteredAllBitSet): New function.
  4330. (isAllBitSet): Filter is not took into account.
  4331. Rename --force-truncate as --allow-overwrite:
  4332. * src/TorrentRequestInfo.cc
  4333. (execute): PREF_FORCE_TRUNCATE -> PREF_ALLOW_OVERWRITE
  4334. * src/main.cc
  4335. (showUsage): --force-truncate -> --allow-overwrite
  4336. * src/message.h
  4337. (EX_FILE_ALREADY_EXISTS): --force-truncate -> --allow-overwrite
  4338. * src/prefs.h
  4339. (PREF_FORCE_TRUNCATE): Removed.
  4340. (PREF_ALLOW_OVERWRITE): New definition.
  4341. * src/SegmentMan.cc
  4342. (shouldCancelDownloadForSafety): --force-truncate -> --allow-overwrite
  4343. * src/MetalinkRequestInfo.cc
  4344. (execute): Queueing message are now logged in info level.
  4345. * src/common.h
  4346. (LONG_LONG_MAX): Removed.
  4347. (LONG_LONG_MIN): Removed.
  4348. * src/HttpResponseCommand.cc
  4349. (handleDefaultEncoding): LONG_LONG_MAX -> INT64_MAX
  4350. * src/FtpNegotiateCommand.cc
  4351. (recvSize): LONG_LONG_MAX -> INT64_MAX
  4352. * src/main.cc
  4353. (showUsage): Added --check-integriy and --realtime-chunk-checksum
  4354. command-line option.
  4355. (main): Added --check-integriy and --realtime-chunk-checksum
  4356. command-line option.
  4357. --force-truncate -> --allow-overwrite
  4358. Set initial value of --check-integrity option to false.
  4359. Don't show usage when error occurs while persing command-line options.
  4360. Removed deprecated --upload-limit option.
  4361. 2007-01-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4362. * src/message.h: Added EX_INVALID_PAYLOAD_SIZE and
  4363. EX_INVALID_BT_MESSAGE_ID. Following source files affected.
  4364. * src/BtAllowedFastMessage.cc:
  4365. * src/BtBitfieldMessage.cc
  4366. * src/BtCancelMessage.cc
  4367. * src/BtChokeMessage.cc
  4368. * src/BtHaveAllMessage.cc
  4369. * src/BtHaveMessage.cc
  4370. * src/BtHaveNoneMessage.cc
  4371. * src/BtInterestedMessage.cc
  4372. * src/BtNotInterestedMessage.cc
  4373. * src/BtPieceMessage.cc
  4374. * src/BtPortMessage.cc
  4375. * src/BtRejectMessage.cc
  4376. * src/BtRequestMessage.cc
  4377. * src/BtSuggestPieceMessage.cc
  4378. * src/BtUnchokeMessage.cc
  4379. * src/message.h: Added EX_INVALID_CHUNK_CHECKSUM. Following source
  4380. files are affected.
  4381. * src/ChunkChecksumValidator.cc
  4382. * src/SegmentMan.cc
  4383. 2007-01-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4384. To add chunk checksum validation:
  4385. * src/MetalinkEntry.h
  4386. (MetalinkChunkChecksum.h): New include.
  4387. (chunkChecksum): New variable.
  4388. * src/Request.h
  4389. (method): New variable.
  4390. (setMethod): New function.
  4391. (getMethod): New function.
  4392. (METHOD_GET): New static constant.
  4393. (METHOD_HEAD): New static constant.
  4394. * src/Xml2MetalinkProcessor.h
  4395. (getPieceHash): New function.
  4396. * src/PieceStorage.h
  4397. (markAllPiecesDone): New function.
  4398. (checkIntegrity): New function.
  4399. * src/FileAllocator.h
  4400. (NullFileAllocationMonitor.h): New include.
  4401. (FileAllocator): Initialize fileAllocationMonitor with new
  4402. NullFileAllocationMonitor().
  4403. * src/MultiDiskAdaptor.h
  4404. (messageDigest.h): Remove include.
  4405. (ctx): Removed.
  4406. (hashUpdate): Added ctx.
  4407. (MultiDiskAdaptor): Removed ctx.
  4408. (sha1Sum): Renamed as messageDigest.
  4409. (messageDigest): New function.
  4410. * src/UrlRequestInfo.h
  4411. (HeadResult): New class.
  4412. (digestAlgo): New variable.
  4413. (chunkChecksumLength): New variable.
  4414. (chunkChecksums): New variable.
  4415. (getHeadResult): New function.
  4416. (UrlRequestInfo): Added digestAlgo, chunkChecksumLength.
  4417. (setDigestAlgo): New function.
  4418. (setChunkChecksumLength): New function.
  4419. (setChunkChecksums): New function.
  4420. * src/DefaultPieceStorage.cc
  4421. (DiskAdaptorWriter.h): New include.
  4422. (ChunkChecksumValidator.h): New include.
  4423. (markAllPiecesDone): New function.
  4424. (checkIntegrity): New function.
  4425. * src/DefaultBtContext.h
  4426. (getPieceHashes): New function.
  4427. * src/TorrentRequestInfo.cc
  4428. (execute): Try to validate chunk checksum if file already exists and
  4429. .aria2 file doesn't there and user allows aria2 to overwrite it.
  4430. * src/messageDigest.h
  4431. (~MessageDigestContext): Added digestFree().
  4432. * src/MetalinkRequestInfo.cc
  4433. (execute): Set digestAlgo, chunkChecksum, chunkChecksums to reqInfo.
  4434. * src/DiskAdaptor.h
  4435. (messageDigest.h): New include.
  4436. (sha1Sum): Renamed as messageDigest.
  4437. (messageDigest): New function.
  4438. * src/DownloadCommand.h
  4439. (PeerStat.h): New include.
  4440. (maxDownloadSpeedLimit): New variable.
  4441. (startupIdleTime): New variable.
  4442. (lowestDownloadSpeedLimit): New variable.
  4443. (peerStat): New variable.
  4444. (setMaxDownloadSpeedLimit): New function.
  4445. (setStartupIdleTime): New function.
  4446. (setLowestDownloadSPeedLimit): New function.
  4447. * src/BtContext.h
  4448. (getPieceHashes): New function.
  4449. * src/main.cc
  4450. (main): Set PREF_REALTIME_CHUNK_CHECKSUM and PREF_CHECK_INTEGRITY
  4451. option to true for testing purpose.
  4452. * src/BtPieceMessage.cc
  4453. (checkPieceHash): Use messageDigest
  4454. * src/DownloadEngine.cc
  4455. (SetDescriptor): Removed.
  4456. (AccumulateActiveCommand): Removed.
  4457. (waitData): Rewritten.
  4458. (updateFdSet): Rewritten.
  4459. * src/MultiDiskAdaptor.cc
  4460. (hashUpdate): Added ctx.
  4461. (sha1Sum): Renamed as messageDigest.
  4462. (messageDigest): New function.
  4463. * src/BitfieldMan.h
  4464. (isBitRangeSet): New function.
  4465. (unsetBitRange): New function.
  4466. * src/ByteArrayDiskWriter.h
  4467. (sha1Sum): Renamed as messageDigest.
  4468. (messageDigest): New function.
  4469. * src/ConsoleDownloadEngine.cc
  4470. (calculateStatistics): If nspeed < 0 then set nspeed to 0.
  4471. * src/DiskWriter.h
  4472. (messageDigest.h): New include.
  4473. (sha1Sum): Renamed as messageDigest.
  4474. (messageDigest): New function.
  4475. * src/ChunkChecksumValidator.h: New class.
  4476. * src/DiskAdaptorWriter.h: New class.
  4477. * src/prefs.h
  4478. (PREF_REALTIME_CHUNK_CHECKSUM): New definition.
  4479. (PREF_CHECK_INTEGRITY): New definition.
  4480. * src/HttpResponseCommand.cc
  4481. (handleDefaultEncoding): Added method "HEAD" handling.
  4482. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  4483. (handleOtherEncoding):
  4484. Added the call to e->segmentMan->shouldCancelDownloadForSafety().
  4485. (createHttpDownloadCommand): Set maxDownloadSpeedLimit,
  4486. startupIdleTime, lowestDownloadSpeedLimit to command.
  4487. * src/SegmentMan.h
  4488. (getSegmentEntryByIndex): New function.
  4489. (getSegmentEntryByCuid): New function.
  4490. (getSegmentEntryIteratorByCuid): New function.
  4491. (diskWriter): DiskWriter -> DiskWriterHandle
  4492. (pieceHashes): New variable.
  4493. (chunkHashLength): New variable.
  4494. (digestAlgo): New variable.
  4495. (FindPeerStat): Removed.
  4496. (getPeerStat): Rewritten.
  4497. (markAllPiecesDone): New function.
  4498. (checkIntegrity): New function.
  4499. (tryChunkChecksumValidation): New function.
  4500. (isChunkChecksumValidationReady): New function.
  4501. * src/BitfieldMan.cc
  4502. (BitfieldMan): Initialized bitfieldLength, blocks to 0.
  4503. (BitfieldMan): Initialized blockLength, totalLength, bitfieldLength,
  4504. blocks to 0.
  4505. (isBitRangeSet): New function.
  4506. (unsetBitRange): New function.
  4507. * src/FtpNegotiateCommand.cc
  4508. (executeInternal): Set maxDownloadSpeedLimit,
  4509. startupIdleTime, lowestDownloadSpeedLimit to command.
  4510. (recvSize): Added method "HEAD" handling.
  4511. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  4512. * src/AbstractSingleDiskAdaptor.cc
  4513. (sha1Sum): Renamed as messageDigest.
  4514. (messageDigest): New function.
  4515. * src/AbstractSingleDiskAdaptor.h
  4516. (sha1Sum): Renamed as messageDigest.
  4517. (messageDigest): New function.
  4518. * src/Util.h
  4519. (indexRange): New function.
  4520. * src/MetalinkEntry.cc
  4521. (MetalinkEntry): Initialized chunkChecksum to 0.
  4522. * src/ShaVisitor.cc
  4523. (~ShaVisitor): Removed the call to ctx.digestFree().
  4524. * src/SegmentMan.cc
  4525. (ChunkChecksumValidator.h): New include.
  4526. (SegmentMan): Initialized chunkHashLength to 0. Initialized digestAlgo
  4527. to DIGEST_ALGO_SHA1.
  4528. (~SegmentMan): Removed diskWriter.
  4529. (FindSegmentEntryByIndex): Removed.
  4530. (FindSegmentEntryByCuid): Removed.
  4531. (checkoutSegment): Rewritten.
  4532. (findSlowerSegmentEntry): Rewritten.
  4533. (getSegment): Rewritten.
  4534. (updateSegment): Rewritten.
  4535. (completeSegment): Rewritten.
  4536. (markAllPiecesDone): New function.
  4537. (checkIntegrity): New function.
  4538. (isChunkChecksumValidationReady): New function.
  4539. (tryChunkChecksumValidation): New function.
  4540. * src/Xml2MetalinkProcessor.cc
  4541. (getEntry): Get size and set it to entry.
  4542. Get chunk checksum and set it to entry.
  4543. (getPieceHash): New function.
  4544. * src/Util.cc
  4545. (sha1Sum): Removed ctx.digestFree()
  4546. (fileChecksum): Removed ctx.digestFree()
  4547. (indexRange): New function.
  4548. * src/Request.cc
  4549. (METHOD_GET): New variable.
  4550. (METHOD_HEAD): New variable.
  4551. (Request): Added method.
  4552. * src/UrlRequestInfo.cc
  4553. (FatalException.h): New include.
  4554. (message.h): New include.
  4555. (operator<<): Added operator<< for class HeadResult.
  4556. (getHeadResult): New function.
  4557. (execute): Get filename and size in separate download engine.
  4558. * src/ChunkChecksumValidator.cc: New class.
  4559. * src/DownloadCommand.cc:
  4560. (DownloadCommand): Added peerStat.
  4561. (executeInternal): Use maxDownloadSpeedLimit member instead of getting
  4562. the value from Option.
  4563. The buffer size is now 16KB.
  4564. Use peerStat member instead of getting it from SegmentMan.
  4565. Use startupIdleTime member instead of gettingit from Option.
  4566. Added chunk checksum validation.
  4567. * src/AbstractDiskWriter.cc
  4568. (AbstractDiskWriter): Removed ctx.
  4569. (~AbstractDiskWriter): Removed ctx.digestFree()
  4570. (writeDataInternal): Returns the return value of write.
  4571. (readDataInternal): Returns the return value of read.
  4572. (sha1Sum): Renamed as messageDigest
  4573. (messageDigest): New function.
  4574. * src/AbstractDiwkWriter.h
  4575. (messageDigest.h): Removed include.
  4576. (ctx): Removed.
  4577. (sha1Sum): Renamed as messageDigest
  4578. (messageDigest): New function.
  4579. * src/DefaultPieceStorage.h
  4580. (markAllPiecesDone): New function.
  4581. (checkIntegrity): New function.
  4582. * src/NullFileAllocationMonitor.h: New class.
  4583. * src/MetalinkChunkChecksum.h: New class.
  4584. 2007-01-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4585. To decrease CPU usage in bittorrent download, calculation results in
  4586. BitfieldMan were cached and realtime fetching PeerObject was removed
  4587. with WeakHandle introduced. Option values are set to the objects
  4588. by setter before download begins.
  4589. * src/DefaultBtRequestFactory.cc: Use messageFactory member.
  4590. * src/DefaultBtRequestFactory.h
  4591. (dispatcher): BtMessageDispatcherHandle ->
  4592. BtMessageDispatcherWeakHandle.
  4593. (messageFactory): New variable.
  4594. (setBtMessageDispatcher): BtMessageDispatcherHandle ->
  4595. BtMessageDispatcherWeakHandle.
  4596. (setBtMessageFactory): New function.
  4597. * src/DefaultBtMessageDispatcher.cc:
  4598. (sendMessages): Use maxUploadSpeedLimit instead of fetching the value
  4599. from Option.
  4600. (checkRequestSlotAndDoNecessaryThing): Use requestTimeout instead of
  4601. feating the value from Option.
  4602. Use messageFactory member.
  4603. * src/PeerInteractionCommand.cc
  4604. (PeerInteractionCommand): Added maxDownloadSpeedLimit.
  4605. Add reverse dependencies to factory object.
  4606. Set maxUploadSpeedLimit and requestTimeout and messageFactory to
  4607. dispatcher.
  4608. Set messageFactory to receiver.
  4609. Set keepAliveInterval and maxDownloadSpeedLimit and messageFactory to
  4610. btInteractive.
  4611. Set receiver to peerObject.
  4612. Set maxDownloadSpeedLimit to this.
  4613. (executeInternal): Use maxDownloadSpeedLimit member.
  4614. * src/BtChokeMessage.cc
  4615. (doReceivedAction): Use dispatcher, requestFactory member.
  4616. (onSendComplete): Use dispatcher member.
  4617. * src/PeerInteractionCommand.h
  4618. (maxDownloadSpeedLimit): New variable.
  4619. * src/DefaultBtMessageReceiver.h
  4620. (peerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  4621. (dispatcher):
  4622. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  4623. (messageFactory): New variable.
  4624. (setPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  4625. (getPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  4626. (setDispatcher):
  4627. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  4628. (setBtMessageFactory): New function.
  4629. * src/DefaultBtInteractive.cc
  4630. (initiateHandshake): Use messageFactory member.
  4631. (addBitfieldMessageToQueue): Use messageFactory member.
  4632. (addAllowedFastMessageToQueue): Use messageFactory member.
  4633. (decideChoking): Use messageFactory member.
  4634. (checkHave): Use messageFactory member.
  4635. (sendKeepAlive): Use keepAliveInterval, messageFactory member.
  4636. (receiveMessages): Use maxDownloadSpeedLimit member.
  4637. (decideInterest): Use messageFactory member.
  4638. * src/BtRequestMessage.cc
  4639. (doReceivedAction): Use messageFactory, dispatcher member.
  4640. (onQueued): Use dispatcher member.
  4641. * src/BtPieceMessage.cc
  4642. (doReceivedAction): Use dispatcher member.
  4643. (send): Use peerConnection member.
  4644. (onWrongPiece): Use requestFactory member.
  4645. (handleChokingEvent): Use messageFactory, dispatcher member.
  4646. (handleCancelSendingPieceEvent): Use messageFactory, dispatcher member.
  4647. * src/BtMessageDispatcher.h
  4648. (BtMessageDispatcherWeakHandle): New type definition.
  4649. * src/SimpleBtMessage.cc
  4650. (send): Use peerConnection member.
  4651. * src/BtRejectMessage.cc
  4652. (doReceivedAction): Use dispatcher member.
  4653. * src/DefaultBtMessageDispatcher.h
  4654. (Option.h): Removed include.
  4655. (messageFactory): New variable.
  4656. (option): Removed.
  4657. (maxUploadSpeedLimit): New variable.
  4658. (requestTimeout): New variable.
  4659. (DefaultBtMessageDispatcher): Removed option.
  4660. Added maxUploadSpeedLimit, requestTimeout.
  4661. (setOption): Removed.
  4662. (getOption): Removed.
  4663. (setMaxUploadSpeedLimit): New function.
  4664. (setRequestTimeout): New function.
  4665. (setBtMessageFactory): New function.
  4666. * src/DefaultBtInteractive.h
  4667. (btMessageReceiver):
  4668. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  4669. (dispatcher):
  4670. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  4671. (btRequestFactory):
  4672. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  4673. (peerConnection):
  4674. PeerConnectionHandle -> PeerConnectionWeakHandle
  4675. (messageFactory): New variable.
  4676. (option): Removed.
  4677. (keepAliveInterval): New variable.
  4678. (maxDownloadSpeedLimit): New variable.
  4679. (DefaultBtInteractive): Added keepAliveInterval, maxDownloadSpeedLimit.
  4680. (setBtMessageReceiver):
  4681. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  4682. (setDispatcher):
  4683. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  4684. (setBtRequestFactory):
  4685. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  4686. (setPeerConnection):
  4687. PeerConnectionHandle -> PeerConnectionWeakHandle
  4688. (setOption): Removed.
  4689. (setKeepAliveInterval): New function.
  4690. (setMaxDownloadSpeedLimit): New function.
  4691. (setBtMessageFactory): New function.
  4692. * src/BitfieldMan.h
  4693. (cachedNumMissingBlock): New variable.
  4694. (cachedNumFilteredBlock): New variable.
  4695. (cachedCompletedLength): New variable.
  4696. (cachedFilteredComletedLength): New variable.
  4697. (cachedFilteredTotalLength): New variable.
  4698. (countMissingBlockNow): New function.
  4699. (countFilteredBlockNow): New function.
  4700. (getFilteredTotalLengthNow): New function.
  4701. (getCompletedLengthNow): New function.
  4702. (getFilteredCompletedLengthNow): New function.
  4703. (updateCache): New function.
  4704. * src/AbstractBtMessage.h
  4705. (BtMessageDispatcher.h): New include.
  4706. (PeerConnection.h): New include.
  4707. (BtRequestFactory.h): New include
  4708. (BtMessageFactory.h): New include.
  4709. (dispatcher): New variable.
  4710. (messageFactory): New variable.
  4711. (peerConnection: New variable.
  4712. (setBtMessageDispatcher): New function.
  4713. (setPeerConnection): New function.
  4714. (setBtMessageFactory): New function.
  4715. (setBtRequestFactory): New function.
  4716. * src/DefaultBtMessageFactory.cc
  4717. (setCommonProperty): Set dispatcher, requestFactory, this,
  4718. peerConnection to msg.
  4719. * src/BtRegistry.h
  4720. (BT_MESSAGE_RECEIVER): New macro.
  4721. * src/PeerConnection.h
  4722. (PeerConnectionWeakHandle): New type definition.
  4723. * src/BtMessageFactory.h
  4724. (BtMessageFactoryWeakHandle): New type definition.
  4725. * src/BitfieldMan.cc
  4726. (BitfieldMan): Added cachedNumMissingBlock, cachedNumFilteredBlock,
  4727. cachedCompletedLength, cachedFilteredComletedLength,
  4728. cachedFilteredTotalLength.
  4729. Call updateCache().
  4730. (countMissingBlock): Return cachedNumMissingBlock.
  4731. (countMissingBlockNow): New function.
  4732. (countBlock): Return cachedNumFilteredBlock if filterEnabled is true.
  4733. (countFilteredBlockNow): New function.
  4734. (setBit): Call updateCache().
  4735. (unsetBit): Call updateCache().
  4736. (setBitfield): Call updateCache().
  4737. (clearAllBit): Call updateCache().
  4738. (setAllBit): Use setBitInternal instead of setBit.
  4739. Call updateCache().
  4740. (addFilter): Call updateCache().
  4741. (enableFilter): Call updateCache().
  4742. (disableFilter): Call updateCache().
  4743. (clearFilter): Call updateCache().
  4744. (getFilteredTotalLength): Return cachedFilteredTotalLength.
  4745. (getFilteredTotalLengthNow): New function.
  4746. (getCompletedLength): Return cachedCompletedLength.
  4747. (getCompletedLengthNow): New function.
  4748. (getFilteredCompletedLength): Return cachedFilteredComletedLength.
  4749. (getFilteredCompletedLengthNow): New function.
  4750. (updateCache): New function.
  4751. * src/BtMessageReceiver.h
  4752. (BtMessageReceiverWeakHandle): New type definition.
  4753. * src/DefaultBtMessageReceiver.cc
  4754. (receiveHandshake): Use messageFactory member.
  4755. (sendHandshake): Use messageFactory member.
  4756. (receiveMessage): Use messageFactory member.
  4757. * src/DefaultBtMessageFactory.h
  4758. (dispatcher): New variable.
  4759. (requestFactory): New variable.
  4760. (peerConnection): New variablle.
  4761. (setBtMessageDispatcher): New function.
  4762. (setBtRequestFactory): New function.
  4763. (setPeerConnection): New function.
  4764. * src/SharedHandle.h
  4765. (RefCount): New class.
  4766. (WeakHandle): New class.
  4767. * src/PeerObject.h
  4768. (BtMessageReceiver.h): New include.
  4769. (PeerObject): Added btMessageReceiver.
  4770. (btMessageReceiver): New variable.
  4771. * src/Util.cc
  4772. (countBit): Simplified.
  4773. * src/BtCancelMessage.cc
  4774. (doReceivedAction): Use dispatcher member.
  4775. * src/BtRequestFactory.h
  4776. (BtRequestFactoryWeakHandle): New type definition.
  4777. * src/PeerStorage.h
  4778. (downloadSpeed): int -> uint32_t
  4779. (uploadSpeed): int -> uint32_t
  4780. (sessionDownloadLength): long long int -> uint64_t
  4781. (sessionUploadLength): long long int -> uint64_t
  4782. 2007-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4783. To add RecoverableException, FatalException:
  4784. * src/AbstractCommand.cc
  4785. (onAbort): Exception -> RecoverableException
  4786. * src/PeerAbstractCommand.h
  4787. (RecoverableException.h): New include.
  4788. (onAbort): Exception -> RecoverableException.
  4789. * src/PeerInteractionCommand.cc
  4790. (onAbort): Exception -> RecoverableException.
  4791. * src/PeerAbstractCommand.cc
  4792. (execute): Exception -> RecoverableException.
  4793. (onAbort): Exception -> RecoverableException.
  4794. * src/TorrentRequestInfo.cc
  4795. (execute): Exception -> RecoverableException.
  4796. * src/MetalinkRequestInfo.cc
  4797. (execute): Exception -> RecoverableException.
  4798. * src/MetaFileUtil.cc: RecoverableException.
  4799. * src/AbstractCommand.h
  4800. (onAbort): Exception -> RecoverableException.
  4801. * src/DlRetryEx.h: Exception -> RecoverableException.
  4802. * src/DlAbortEx.h: Exception -> RecoverableException.
  4803. * src/PeerListenCommand.cc: Exception -> RecoverableException.
  4804. * src/Util.cc: Exception -> RecoverableException.
  4805. * src/DefauldDiskWriter.cc: Exception -> RecoverableException.
  4806. * src/TrackerUpdateCommand.cc: Exception -> RecoverableException.
  4807. * src/UrlRequestInfo.cc: Exception -> RecoverableException.
  4808. To make ID static const int
  4809. * src/BtInterestedMessage.h
  4810. (ID_t): Removed.
  4811. (ID): New variable.
  4812. (getId): Made non-const.
  4813. * src/BtPieceMessage.h
  4814. (ID_t): Removed.
  4815. (ID): New variable.
  4816. (getId): Made non-const.
  4817. * src/BtChokeMessage.h
  4818. (ID_t): Removed.
  4819. (ID): New variable.
  4820. (getId): Made non-const.
  4821. * src/BtHaveAllMessage.h
  4822. (ID_t): Removed.
  4823. (ID): New variable.
  4824. (getId): Made non-const.
  4825. * src/BtKeepAliveMessage.h
  4826. (ID_t): Removed.
  4827. (ID): New variable.
  4828. (getId): Made non-const.
  4829. * src/BtHandshakeMessage.h
  4830. (ID): New variable.
  4831. (getId): Made non-const.
  4832. * src/BtSuggestPieceMessage.h
  4833. (ID_t): Removed.
  4834. (ID): New variable.
  4835. (getId): Made non-const.
  4836. * src/BtPortMessage.h
  4837. (ID_t): Removed.
  4838. (ID): New variable.
  4839. (getId): Made non-const.
  4840. * src/AbstractBtMessage.h
  4841. (id): Removed.
  4842. (AbstractBtMessage): Removed id.
  4843. (getId): Removed.
  4844. * src/BtHaveMessage.h
  4845. (ID_t): Removed.
  4846. (ID): New variable.
  4847. (getId): Made non-const.
  4848. * src/BtAllowedFastMessage.h
  4849. (ID_t): Removed.
  4850. (ID): New variable.
  4851. (getId): Made non-const.
  4852. * src/BtCancelMessage.h
  4853. (ID_t): Removed.
  4854. (ID): New variable.
  4855. (getId): Made non-const.
  4856. * src/BtNotInterestedMessage.h
  4857. (ID_t): Removed.
  4858. (ID): New variable.
  4859. (getId): Made non-const.
  4860. * src/BtChokeMessage.h
  4861. (ID_t): Removed.
  4862. (ID): New variable.
  4863. (getId): Made non-const.
  4864. * src/BtRejectMessage.h
  4865. (ID_t): Removed.
  4866. (ID): New variable.
  4867. (getId): Made non-const.
  4868. * src/BtBitfieldMessage.h
  4869. (ID_t): Removed.
  4870. (ID): New variable.
  4871. (getId): Made non-const.
  4872. * src/BtUnchokeMessage.h
  4873. (ID_t): Removed.
  4874. (ID): New variable.
  4875. (getId): Made non-const.
  4876. * src/BtRequestMessage.h
  4877. (ID_t): Removed.
  4878. (ID): New variable.
  4879. (getId): Made non-const.
  4880. * src/BtHaveMessage.h
  4881. (ID_t): Removed.
  4882. (ID): New variable.
  4883. (getId): Made non-const.
  4884. To add --force-truncate command-line option and a check whether
  4885. the file already exists:
  4886. * src/DirectDiskAdaptor.h
  4887. (getFilePath): Made virtual public.
  4888. * src/MultiDiskAdaptor.h
  4889. (File.h): New include.
  4890. (DiskWriterEntry::fileEntry): Made private.
  4891. (DiskWriterEntry::fileExists): New function.
  4892. (DiskWriterEntry::getFileEntry): New function.
  4893. (fileExists): New function.
  4894. (getFilePath): New function.
  4895. * src/TorrentRequestInfo.cc
  4896. (FatalException.h): New include.
  4897. (message.h): New include.
  4898. (RecoverableException.h): New include.
  4899. (execute): Added a check whether file is already exists or not.
  4900. * src/DiskAdaptor.h
  4901. (fileExists): New function.
  4902. (getFilePath): New function.
  4903. * src/main.cc
  4904. (showUsage): Added an explanation of --force-truncate command-line
  4905. option.
  4906. (main): Added --force-truncate command-line option.
  4907. * src/Exception.h
  4908. (setMsg): buf[256] -> buf[1024]
  4909. * src/CopyDiskWriter.h
  4910. (getFilePath): Made public virtual.
  4911. * src/MultiDiskAdaptor.cc: fileEntry -> getFileEntry()
  4912. (fileExists): New function.
  4913. * src/DownloadEngineFactory.cc
  4914. (newTorrentConsoleEngine): Don't open file here.
  4915. * src/message.h
  4916. (EX_FILE_ALREADY_EXISTS): New definition.
  4917. * src/prefs.h
  4918. (PREF_FOECE_TRUNCATE): New definition.
  4919. * src/HttpResponseCommand.cc
  4920. (handleDefaultEncoding): Added a check whether the file already exists.
  4921. * src/SegmentMan.h
  4922. (fileExists): New function.
  4923. (shouldCancelDownloadForSafety): New function.
  4924. * src/FtpNegotiateCommand.cc
  4925. (recvSize): Added a check whether the file already exists.
  4926. * src/AbstractSingleDiskAdaptor.cc
  4927. (File.h): New include.
  4928. (fileExists): New function.
  4929. * src/AbstractSingleDiskAdaptor.h
  4930. (getFilePath): Removed.
  4931. (fileExists): New function.
  4932. * src/SegmentMan.cc
  4933. (fileExists): New function.
  4934. (shouldCancelDownloadForSafety): New function.
  4935. To fix regression bug in torrent downloading:
  4936. * src/DefaultBtRequestFactory.cc
  4937. (doChokedAction): New function.
  4938. * src/DefaultBtRequestFactory.h
  4939. (doChokedAction): New function.
  4940. * src/DefaultBtMessageDispatcher.cc
  4941. (doChokedAction): Do not delete request if its target is in allowed
  4942. fast set.
  4943. * src/DefaultBtInteractive.cc
  4944. (doPostHandshakeProcessing): Added a call to sendPendingMessage().
  4945. (sendKeepAlive): Send keep alive message even if the outgoing message
  4946. queue is not empty.
  4947. (decideInterest): Simplified the code.
  4948. (fillPiece): Remove a call to dispatcher->doChokedAction() because
  4949. it is already called when BtChokeMessage is received from a peer.
  4950. * src/BtRequestFactory.h
  4951. (doChokedAction): New function.
  4952. To clean up code:
  4953. * src/PeerInteractionCommand.h
  4954. (executeInternal): Added virtual keyword explicitly.
  4955. (prepareForRetry): Added virtual keyword explicitly.
  4956. (prepareForNextPeer): Added virtual keyword explicitly.
  4957. (onAbort): Added virtual keyword explicitly.
  4958. * src/RequestSlot.cc
  4959. (isTimeout): Use Time::elapsed() instead of differenceInMillis().
  4960. * src/BtPieceMessage.cc
  4961. (doReceivedAction): Added a debug log of piece's bitfield.
  4962. * src/Piece.h
  4963. (getBitfieldLength): New function.
  4964. * src/ByteArrayDiskWriter.cc
  4965. (clear): Added buf = 0 to avoid double free corruption.
  4966. * src/FileAllocator.cc
  4967. (allocate): Fixed an assignment of fileAllocationMonitor->currentValue.
  4968. Added cp.reset().
  4969. * src/BitfieldMan.h
  4970. (operator=): Rewritten.
  4971. * src/BitfieldMan.cc
  4972. (BitfieldMan): Initialized bitfield, useBitfield.
  4973. * src/PeerConnection.cc
  4974. (receiveMessage): Added a call to socket->readable() after getting
  4975. message length to avoid possible EOF.
  4976. * src/Util.cc
  4977. (torrentUrlencode): Fixed an encodeing bug. BUG#1629912
  4978. 2007-01-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4979. To add an ability to pre-allocate file space:
  4980. * src/DirectDiskAdaptor.h: Rewritten.
  4981. * src/PieceStorage.h: DiskAdaptor -> DiskAdaptorHandle
  4982. * src/MultiDiskAdaptor.h: Rewritten.
  4983. * src/DefaultPieceStorage.cc
  4984. (MultiDiskWriter.h): Removed include.
  4985. (PreAllocationDiskWriter.h): Removed include.
  4986. (FileAllocationMonitor.h): New include.
  4987. (~DefaultPieceStorage): Removed deletion of diskAdaptor.
  4988. (initStorage): Rewritten.
  4989. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  4990. * src/FileAllocator.h: New class.
  4991. * src/FileAllocator.cc: New class.
  4992. * src/FileAllocationMonitor.h: New class.
  4993. * src/FileAllocationMonitor.cc: New class.
  4994. * src/ConsoleFileAllocationMonitor.h: New class.
  4995. * src/ConsoleFileAllocationMonitor.cc: New class.
  4996. * src/AbstractSingleDiskAdaptor.h: New class.
  4997. * src/AbstractSingleDiskAdaptor.cc: New class.
  4998. * src/DiskAdaptor.h
  4999. (Directory.h): Removed include.
  5000. (DiskWriter.h): Removed include.
  5001. (FileEntry.h): Removed include.
  5002. (diskWriter): Removed.
  5003. (DiskAdaptor): Removed diskWriter.
  5004. (openFile): Made pure virtual.
  5005. (closeFile): Made pure virtual.
  5006. (openExistingFile): Made pure virtual.
  5007. (initAndOpenFile): Made pure virtual.
  5008. (writeData): Made pure virtual.
  5009. (readData): Made pure virtual.
  5010. (sha1Sum): Made pure virtual.
  5011. (getStoreDir): Returns const reference of storeDir.
  5012. (DiskAdaptorHandle): New type definition.
  5013. * src/main.cc
  5014. (ConsoleFileAllocationMonitor.h): New include.
  5015. (showUsage): Added default value description of -s option.
  5016. Added the description of --file-allocation option.
  5017. (main): Set default value of --file-allocation option to 'none'.
  5018. Added --file-allocation command-line option.
  5019. Setup FileAllocationMonitorFactory.
  5020. * src/FtpInitiateConnectionCommand.cc
  5021. (executeInternal): Removed diskWriter related processing, which was
  5022. moved to FtpNegotiationCommand.cc.
  5023. * src/DirectDiskAdaptor.cc
  5024. (getFilePath): Made non-const.
  5025. * src/CopyDiskAdaptor.h
  5026. (DiskAdaptor.h): Removed include.
  5027. (DiskWriter.h): Removed include.
  5028. (AbstractSingleDiskAdaptor.h): New include.
  5029. (getFilePath): Made non-const. Added virtual keyword.
  5030. (CopyDiskAdaptor): Removed diskWriter.
  5031. (getTempFile): Returns const reference.
  5032. (CopyDiskAdaptorHandle): New type definition.
  5033. * src/ByteArrayDiskWriter.cc
  5034. (clear): Simplified.
  5035. (initAndOpenFile): Rewritten.
  5036. (openFile): Call initAndOpenFile()
  5037. * src/MultiDiskAdaptor.cc: Rewritten.
  5038. * src/DownloadEngineFactory.cc
  5039. (FileAllocator.h): New include.
  5040. (FileAllocationMonitor.h): New include.
  5041. (newConsoleEngine): Call DefaultDiskWriter::createNewDiskWriter() to
  5042. create DefaultDiskWriter with file allocator.
  5043. * src/DiskWriter.h
  5044. (initAndOpenFile): Added totalLength argument.
  5045. (openFile): Added totalLength argument.
  5046. * src/prefs.h
  5047. (PREF_FILE_ALLOCATION): New definition.
  5048. (V_PREALLOC): New definition.
  5049. (V_NONE): New definition.
  5050. * src/HttpResponseCommand.cc
  5051. (handleDefaultEncoding): Call DefaultDiskWriter::initAndOpenFile with
  5052. size.
  5053. * src/FtpNegotiateCommand.cc
  5054. (Util.h): New include.
  5055. (recvSize): Open file here.
  5056. * src/Util.h
  5057. (ullitos): New function.
  5058. * src/CopyDiskWriter.h
  5059. (getFilePath): Made non-const.
  5060. * src/DefaultDiskWriter.h
  5061. (Option.h): New include.
  5062. (totalLength): Removed.
  5063. (DefaultDiskWriter): Removed totalLength.
  5064. (initAndOpenFile): Added totalLength argument.
  5065. (DefaultDiskWriterHandle): New type definition.
  5066. (createNewDiskWriter): New function.
  5067. * src/Util.cc
  5068. (ullitos): New function.
  5069. * src/DefaultDiskWriter.cc
  5070. (message.h): New include.
  5071. (FileAllocator.h): New include.
  5072. (prefs.h): New include.
  5073. (Util.h): New include.
  5074. (DefaultDiskWriter): Removed totalLength.
  5075. (initAndOpenFile): Added file allocation.
  5076. (createNewDiskWriter): New function. Just for temporary solution.
  5077. It will be rewritten later.
  5078. * src/DiskAdaptor.cc
  5079. (DiskAdaptor): Removed diskWriter.
  5080. * src/AbstractDiskWriter.cc
  5081. (LogFactory.h): New include.
  5082. (AbstractDiskWriter): Added fileAllocator, logger.
  5083. (openFile): Added totalLength argument.
  5084. * src/AbstractDiskWriter.h
  5085. (FileAllocator.h): New include.
  5086. (Logger.h): New include.
  5087. (fileAllocator): New variable.
  5088. (logger): New variable.
  5089. (openFile): Added totalLength argument. Added virtual keyword
  5090. explicitly.
  5091. (openExistingFile): Added totalLength argument. Added virtual keyword
  5092. explicitly.
  5093. (closeFile): Added virtual keyword explicitly.
  5094. (sha1Sum): Added virtual keyword explicitly.
  5095. (writeData): Added virtual keyword explicitly.
  5096. (readData): Added virtual keyword explicitly.
  5097. (setFileAllocator): New function.
  5098. * src/DefaultPieceStorage.h
  5099. (FileAllocator.h): New include.
  5100. (diskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5101. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5102. * src/FileProgressMonitor.h: New class.
  5103. To compile aria2 on PC-BSD:
  5104. * src/DefaultBtContext.cc
  5105. (libgen.h): New include.
  5106. To fix memory leak:
  5107. * src/Exception.h
  5108. (~Exception): Delete cause. Fixed memory leak.
  5109. 2006-12-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5110. Rewritten a portion of bittorrent implementation:
  5111. * src/BtMessageValidator.h: New class.
  5112. * src/BtBitfieldMessageValidator.h: New class.
  5113. * src/BtHandshakeMessageValidator.h: New class.
  5114. * src/BtRequestMessageValidator.h: New class.
  5115. * src/BtSuggestPieceMessageValidator.h: New class.
  5116. * src/BtAllowedFastMessageValidator.h: New class.
  5117. * src/BtRejectMessageValidator.h: New class.
  5118. * src/BtCancelMessageValidator.h: New class.
  5119. * src/BtPieceMessageValidator.h: New class.
  5120. * src/BtHaveMessageValidator.h: New class.
  5121. * src/BtEventListener.h: New class.
  5122. * src/AbstractBtEventListener.h: New class.
  5123. * src/BtEvent.h: New class.
  5124. * src/BtChokingEvent.h: New class.
  5125. * src/BtChokedEvent.h: New class.
  5126. * src/BtCancelSendingPieceEvent.h: New class.
  5127. * src/BtAbortOutstandingRequestEvent.h: New class.
  5128. * src/Randomizer.h: New class.
  5129. * src/SimpleRandomizer.h: New class.
  5130. * src/BtMessage.h: New class.
  5131. * src/AbstractBtMessage.h: New class.
  5132. * src/SimpleBtMessage.h: New class.
  5133. * src/BtHaveMessage.h: New class.
  5134. * src/BtInterestedMessage.h: New class.
  5135. * src/BtAllowedFastMessage.h: New class.
  5136. * src/BtUnchokeMessage.h: New class.
  5137. * src/BtCancelMessage.h: New class.
  5138. * src/BtNotInterestedMessage.h: New class.
  5139. * src/BtChokeMessage.h: New class.
  5140. * src/BtHaveNoneMessage.h: New class.
  5141. * src/BtHandshakeMessage.h: New class.
  5142. * src/BtSuggestPieceMessage.h: New class.
  5143. * src/BtHaveMessage.h: New class.
  5144. * src/BtPieceMessage.h: New class.
  5145. * src/BtHaveAllMessage.h: New class.
  5146. * src/BtKeepAliveMessage.h: New class.
  5147. * src/BtPortMessage.h: New class.
  5148. * src/BtRejectMessage.h: New class.
  5149. * src/BtBitfieldMessage.h: New class.
  5150. * src/BtRequestMessage.h: New class.
  5151. * src/DefaultBtRequestFactory.h: New class.
  5152. * src/DefaultBtMessageReceiver.h: New class.
  5153. * src/BtInteractive.h: New class.
  5154. * src/BtMessageDispatcher.h: New class.
  5155. * src/DefaultBtMessageDispatcher.h: New class.
  5156. * src/DefaultBtInteractive.h: New class.
  5157. * src/BitfieldManFactory.h: New class.
  5158. * src/HandleRegistry.h: New class.
  5159. * src/BtMessageFactory.h: New class.
  5160. * src/BtMessageReceiver.h: New class.
  5161. * src/DefaultBtMessageFactory.h: New class.
  5162. * src/PeerObject.h: New class.
  5163. * src/BtRequestFactory.h: New class.
  5164. * src/SuggestPieceMessage.h: Removed.
  5165. * src/PortMessage.h: Removed.
  5166. * src/SuggestPieceMessage.h: Removed.
  5167. * src/KeepAliveMessage.h: Removed.
  5168. * src/HandshakeMessage.h: Removed.
  5169. * src/PeerInteraction.h: Removed.
  5170. * src/UnchokeMessage.h: Removed.
  5171. * src/PieceMessage.h: Removed.
  5172. * src/RequestMessage.h: Removed.
  5173. * src/InterestedMessage.h: Removed.
  5174. * src/HaveMessage.h: Removed.
  5175. * src/CancelMessage.h: Removed.
  5176. * src/RejectMessage.h: Removed.
  5177. * src/AllowedFastMessage.h: Removed.
  5178. * src/HaveNoneMessage.h: Removed.
  5179. * src/SimplePeerMessage.h: Removed.
  5180. * src/HaveAllMessage.h: Removed.
  5181. * src/BitfieldMessage.h: Removed.
  5182. * src/PeerMessageFactory.h: Removed.
  5183. * src/NotInterestedMessage.h: Removed.
  5184. * src/ChokeMessage.h: Removed.
  5185. * src/PeerMessage.h: Removed.
  5186. 2006-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5187. To know root cause of exception:
  5188. * src/Exception.h
  5189. (cause): New variable.
  5190. (Exception): Added a parameter.
  5191. (getMsg): Return const reference to msg.
  5192. (getCause): New function.
  5193. * src/DlRetryEx.h
  5194. (DlRetryEx): Added a parameter 'cause'.
  5195. Added an overloaded constructor.
  5196. (DlAbortEx): Added a parameter 'cause'.
  5197. Added an overloaded constructor.
  5198. * src/SimpleLogger.cc
  5199. (writeLog): Log nested exception messages recursively.
  5200. 2006-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5201. * src/DefaultBtProgressInfoFile.cc
  5202. (load): Fixed memory leak when the infohash doesn't match.
  5203. 2006-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5204. * src/DefaultPeerStorage.cc
  5205. (calculateStat): Simplified the code by combining 2 loops into 1.
  5206. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5207. Introduce new preference PREF_BT_TIMEOUT. This is the timeout value
  5208. for BitTorrent download:
  5209. * src/PeerAbstractCommand.cc
  5210. (PeerAbstractCommand): PREF_TIMEOUT -> PREF_BT_TIMEOUT
  5211. * src/main.cc:
  5212. (timeoutSpecified): Removed.
  5213. (main): Set the initial value of PREF_BT_TIMEOUT to 180.
  5214. Removed timeoutSpecified. TODO: Add --bt-timeout command line option.
  5215. * src/TorrentRequestInfo.cc
  5216. (timeoutSpecified): Removed.
  5217. (torrentHandler): Removed timeoutSpecified and the adjustment of
  5218. timeout value.
  5219. * src/prefs.h
  5220. (PREF_BT_TIMEOUT): New definition.
  5221. Delete unused variables:
  5222. * src/TorrentRequestInfo.cc
  5223. (requestInfo): Removed.
  5224. Move setSignalHander to Util::setGlobalSignalHandler:
  5225. * src/TorrentRequestInfo.cc:
  5226. setSignalHander -> Util::setGlobalSignalHandler
  5227. * src/main.cc
  5228. (setSignalHander): Removed.
  5229. (main): setSignalHander -> Util::setGlobalSignalHandler
  5230. * src/Util.h
  5231. (setGlobalSignalHandler): New function.
  5232. * src/Util.cc
  5233. (setGlobalSignalHandler): New function.
  5234. * src/UrlRequestInfo.cc:
  5235. setSignalHander -> Util::setGlobalSignalHandler
  5236. Reset peer status in order to exit gracefully:
  5237. * src/PeerAbstractCommand.cc
  5238. (execute): Call peer->resetStatus() when btRuntime->isHalt() is true.
  5239. To fix the bug that causes the number of bytes uploaded is not saved
  5240. to .aria2 file:
  5241. * src/DefaultPeerStorage.h
  5242. (removedPeerSessionDownloadLength): New variable.
  5243. (removedPeerSessionUploadLength): New variable.
  5244. * src/DefaultPeerStorage.cc
  5245. (DefaultPieceStorage): Added removedPeerSessionDownloadLength(0),
  5246. removedPeerSessionUploadLength(0).
  5247. (calculateStat): Calculate the number of bytes downloaded(uploaded)
  5248. through all peers, and then add removedPeerSessionDownloadLength(
  5249. removedPeerSessionUploadLength) to it.
  5250. (deleteUnusedPeer): Add the number of bytes downloaded(uploaded) from
  5251. (to) the peer to removedPeerSessionDownloadLength
  5252. (removedPeerSessionUploadLength).
  5253. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5254. To add Metalink location option:
  5255. * src/MetalinkRequestInfo.cc
  5256. (execute): Call MetalinkEntry::setLocationPreference()
  5257. * src/main.cc
  5258. (showUsage): Added the help message for --metalink-location option.
  5259. (main): Added --metalink-location option.
  5260. * src/prefs.h
  5261. (PREF_METALINK_LOCATION): New definition.
  5262. * src/MetalinkEntry.cc
  5263. (AddLocationPreference): New function object.
  5264. (setLocationPreference): New function.
  5265. * src/Xml2MetalinkProcessor.cc
  5266. (getResource): Set location attribute to MetalinkResource
  5267. To show URLs to download
  5268. * src/UrlRequestInfo.h
  5269. (printUrls): New function.
  5270. To add multiple <file> Metalink support:
  5271. * src/MetalinkEntry.h
  5272. (MetalinkResources): Removed.
  5273. (setLocationPreference): New function.
  5274. (MetalinkEntryHandle): New type definition.
  5275. (MetalinkEntries): New type definition.
  5276. * src/Xml2MetalinkProcessor.h
  5277. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  5278. (getResource): MetalinkResource* -> MetalinkResourceHandle
  5279. (parseFile): Metalinker* -> MetalinkerHandle
  5280. * src/UrlRequestInfo.h
  5281. (execute): RequestInfo* -> RequestInfos
  5282. * src/MetalinkRequestInfo.cc
  5283. (AccumulateNonP2PUrl): MetalinkResource* -> MetalinkResourceHandle
  5284. (FindBitTorrentUrl): MetalinkResource* -> MetalinkResourceHandle
  5285. (execute): RequestInfo* -> RequestInfos
  5286. Added multiple <file> support. Print filename when it is queued.
  5287. * src/MetalinkRequestInfo.h
  5288. (execute): RequestInfo* -> RequestInfos
  5289. (getDownloadEngine): Removed.
  5290. * src/RequestInfo.h
  5291. (RequestInfoHandle): New type definition.
  5292. (RequestInfos): New type definition.
  5293. (execute): RequestInfo* -> RequestInfos
  5294. (getDownloadEngine): Removed.
  5295. * src/MetalinkResource.h
  5296. (MetalinkResourceHandle): New type definition.
  5297. (MetalinkResources): New type definition.
  5298. * src/MetalinkEntry.cc
  5299. (~MetalinkEntry): Removed the deletion of the elements of resources,
  5300. because the element is now of type MetalinkResourceHandle.
  5301. (PrefOrder): MetalinkResource* -> MetalinkResourceHandle
  5302. (Supported): MetalinkResource* -> MetalinkResourceHandle
  5303. (dropUnsupportedResource): Removed the deletion of the elements of
  5304. resources because the element is now of type MetalinkResourceHandle.
  5305. * src/Xml2MetalinkProcessor.cc
  5306. (parseFile): Metalinker* -> MetalinkerHandle
  5307. MetalinkEntry* -> MetalinkEntryHandle
  5308. Removed try-catch block.
  5309. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  5310. MetalinkResource* -> MetalinkResourceHandle
  5311. Removed try-catch block.
  5312. (getResource): MetalinkResource* -> MetalinkResourceHandle
  5313. Free result by using xmlXPathFreeObject()
  5314. * src/Metalinker.cc
  5315. (~Metalinker): Removed the deletion of entries.
  5316. MetalinkEntry* -> MetalinkEntryHandle
  5317. (queryEntry): Add multiple <file> Metalink support.
  5318. * src/Metalinker.h
  5319. (MetalinkEntries): Removed.
  5320. (queryEntry): MetalinkEntry* -> MetalinkEntries
  5321. * src/MetalinkProcessor.h
  5322. (parseFile): Metalinker* -> MetalinkerHandle
  5323. Bug fixes:
  5324. * src/PeerChokeCommand.cc
  5325. (execute): cat01->cat02
  5326. * src/DefaultPieceStorage.cc
  5327. (DefaultPieceStorage): Added diskAdaptor(0)
  5328. * src/TrackerWatcherComand.cc:
  5329. (execute): Use btAnnounce->noMoreAnnounce()
  5330. to determin whether the function returns true or not.
  5331. * src/TrackerUpdateCommand.cc:
  5332. (execute): Use btAnnounce->noMoreAnnounce()
  5333. to determin whether the function returns true or not.
  5334. * src/FtpConnection.cc
  5335. (bulkReceiveResponse): Throw DlRetryEx if EOF got.
  5336. This is the fix of the busy loop bug.
  5337. * src/DownloadCommand.cc
  5338. (DownloadCommand): Reuse PeerStat. segmentMan->getPeerStat() returns
  5339. cached PeerStat.
  5340. The value of "name" entry in torrent file is now set by
  5341. *DiskAdaptor::setTopDir(...) methods.
  5342. * src/MultiDiskAdaptor.h
  5343. (topDir): New variable.
  5344. (setTopDir): New function.
  5345. (getTopDir): New function.
  5346. * src/MultiDiskAdaptor.cc
  5347. (getFilePath): Concat storDir, "/" and topDir.
  5348. (mkdir): Use getFilePath() to get the directory path for output.
  5349. * src/DefaultPieceStorage.cc
  5350. (initStorage): Set the value of "name" entry to MultiDiskAdaptor,
  5351. CopyDiskAdaptor.
  5352. * src/CopyDiskAdaptor.h
  5353. (topDir): New variable.
  5354. (setTopDir): New function.
  5355. (getTopDir): New function.
  5356. * src/CopyDiskAdaptor.cc
  5357. (fixFilename): Updated.
  5358. Misc
  5359. * src/UrlRequestInfo.h
  5360. (e): Removed.
  5361. (UrlRequestInfo): Removed e.
  5362. (getDownloadEngine): Removed.
  5363. * src/UrlRequestInfo.cc
  5364. (handler): Rewritten.
  5365. (printUrls): New function.
  5366. (execute): Call printUrls().
  5367. * src/HandshakeMessage.cc
  5368. (check): peerinteraction->getBtContext() -> btContext
  5369. * src/PeerInteraction.h
  5370. (getBtContext): Removed.
  5371. * src/TorrentRequestInfo.h
  5372. (execute): RequestInfo* -> RequestInfos
  5373. (getDownloadEngine): Removed.
  5374. * src/TorrentRequestInfo.cc
  5375. (haltRequested): Removed.
  5376. (btHaltRequested): New variable.
  5377. (torrentHandler): haltRequested -> btHaltRequested
  5378. (execute): RequestInfo* -> RequestInfos
  5379. * src/TorrentConsoleDownloadEngine.cc
  5380. (afterEachIteration): haltRequested -> btHaltRequested.
  5381. * src/ConsoleDownloadEngine.h
  5382. (initStatistics): Added virtual.
  5383. (calculateStatistics): Added virtual.
  5384. (onEndOfRun): Added virtual.
  5385. (afterEachIteration): Added virtual.
  5386. * src/ConsoleDownloadEngine.cc
  5387. (haltRequested): New variable.
  5388. (afterEachIteration): New function.
  5389. * src/main.cc
  5390. (requestInfo): Removed.
  5391. * src/SegmentMan.cc
  5392. (findSlowerSegmentEntry): Refactored.
  5393. * Release 0.9.0
  5394. 2006-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5395. To divide TorrentMan into 6 classes: BtContext, BtRuntime,
  5396. PeerStorage, PieceStorage, BtAnnounce and BtProgressInfoFile
  5397. * src/TorrentMan.h: Removed.
  5398. * src/TorrentMan.cc: Removed.
  5399. * src/TrackerWatcherComand.h: Made subclass of BtContextAwareCommand.
  5400. * src/SeedCheckCommand.cc: Use pieceStorage, btRuntime
  5401. * src/PeerAbstractCommand.h: Made subclass of BtContextAwareCommand.
  5402. * src/PeerAbstractCommand.cc: Use btRuntime.
  5403. * src/BtContextAwareCommand.h: New class.
  5404. * src/FileEntry.h: Added accessor methods for following variables.
  5405. (path): Made private.
  5406. (length): Made private.
  5407. (offset): Made private.
  5408. (extracted): Made private.
  5409. (requested): Made private.
  5410. (FileEntries): New definition.
  5411. (FileEntryHandle): New definition.
  5412. * src/FileEntry.cc: New file.
  5413. * src/HaveEraseCommand.h: Made subclass of BtContextAwareCommand.
  5414. * src/HaveEraseCommand.cc: Use btRuntime, pieceStorage.
  5415. * src/PeerChokeCommand.h: Made subclass of BtContextAwareCommand.
  5416. * src/PeerChokeCommand.cc: Use btRuntime, peerStorage, pieceStorage.
  5417. * src/PieceStorage.h: New file.
  5418. * src/PeerInteractionCommand.h: Use btContext.
  5419. * src/PeerInteractionCommand.cc: Use pieceStorage, peerStorage,
  5420. btRuntime.
  5421. * src/DefaultBtProgressInfoFile.h: New file.
  5422. * src/DefaultBtProgressInfoFile.cc: New file.
  5423. * src/File.cc
  5424. (Util.h): New include.
  5425. (mkdirs): New function.
  5426. * src/MultiDiskAdaptor.h
  5427. (mkdir): New function.
  5428. * src/PeerListProcessor.h
  5429. (Peers): Removed.
  5430. * src/PeerInteraction.h
  5431. (torrentMan): Removed.
  5432. (btContext): New variable.
  5433. (peerStorage): New variable.
  5434. (pieceStorage): New variable.
  5435. (btAnnounce): New variable.
  5436. (getTorrentMan): Removed.
  5437. (getBtContext): New function.
  5438. * src/PeerInteraction.cc: Use btContext, peerStorage, pieceStorage,
  5439. btAnnounce.
  5440. * src/HandshakeMessage.h
  5441. (TorrentMan.h): Removed.
  5442. * src/HandshakeMessage.cc: Use btContext.
  5443. * src/DefaultBtAnnounce.cc: New file.
  5444. * src/MultiDiskWriter.cc: Use the accessor methods of FileEntry.
  5445. * src/DefaultPieceStorage.cc: New file.
  5446. * src/DefaultBtContext.h: New file.
  5447. * src/TorrentRequestInfo.cc: Use btContext, pieceStorage.
  5448. Use the accessor methods of FileEntry.
  5449. * src/CookieBox.cc: Updated to use Util::slice().
  5450. * src/PieceMessage.cc: Use btContext, pieceStorage.
  5451. * src/common.h (SharedHandle.h): New include.
  5452. * src/PeerMessage.cc (PeerMessage): Added btContext, peerStorage,
  5453. pieceStorage.
  5454. * src/TorrentAutoSaveCommand.h: Made subclass of BtContextAwareCommand.
  5455. * src/DiskAdaptor.h
  5456. (topDir): Removed.
  5457. (getFileEntryFromPath): Changed the return type to FileEntryHandle.
  5458. (setTopDir): Removed.
  5459. (getTopDir): Removed.
  5460. * src/BtContext.h: New file.
  5461. * src/DefaultPeerStorage.h: New file.
  5462. * src/PieceMessage.h (TorrentMan.h): Removed.
  5463. * src/RequestMessage.h (TorrentMan.h): Removed.
  5464. * src/TorrentDownloadEngine.h
  5465. (uploadLength): New variable.
  5466. (btContext): New variable.
  5467. (btRuntime): New variable.
  5468. (pieceStorage): New variable.
  5469. (peerStorage): New variable.
  5470. (btAnnounce): New variable.
  5471. (btProgressInfoFile): New variable.
  5472. (torrentMan): Removed.
  5473. (setBtContext): New function.
  5474. * src/TorrentDownloadEngine.cc: Use BtContext, BtRuntime, pieceStorage,
  5475. peerStorage, btAnnounce, btProgressInfoFile.
  5476. * src/Piece.h
  5477. (toString): New function.
  5478. (Pieces): New type definition.
  5479. * src/Peer.h
  5480. (active): New variable.
  5481. (Peer): Added active.
  5482. (activate): Set active to true.
  5483. (deactivate): Set active to false.
  5484. (isActive): New function.
  5485. (Peers): New type definition.
  5486. * src/DirectDiskAdaptor.cc
  5487. (getFilePath): Use the accessor methods of FileEntry.
  5488. * src/TorrentConsoleDownloadEngine.h
  5489. (afterEachIteration): New function.
  5490. * src/TorrentConsoleDownloadEngine.cc
  5491. (haltRequested): New variable.
  5492. (sendStatistics): Use pieceStorage, btRuntime.
  5493. (afterEachIteration): New function.
  5494. * src/AnnounceList: AnnounceTier->AnnounceTierHandle.
  5495. * src/Directry.h
  5496. (Directory): New function.
  5497. (DirectoryHandle): New type definition.
  5498. * src/BtProgressInfoFile.h: New file.
  5499. * src/RequestMessage.cc: Use pieceStorage.
  5500. * src/BtRuntime.h: New file.
  5501. * src/DefaultBtContext.cc: New file.
  5502. * src/BitfieldMan.h
  5503. (getCompletedLength): New function(private).
  5504. (getCompletedLength): New function.
  5505. (getFilteredCompletedLength): New function.
  5506. * src/BitfieldMan.h
  5507. (getCompletedLength): New function(private).
  5508. (getCompletedLength): New function.
  5509. (getFilteredCompletedLength): New function.
  5510. * src/MultiDiskAdaptor.cc
  5511. (mkdir): New function.
  5512. (openFile): Call mkdir().
  5513. (initAndOpenFile): Call mkdir().
  5514. * src/CancelMessage.h
  5515. (TorrentMan.h): Removed.
  5516. * src/RejectMessage.h
  5517. (TorrentMan.h): Removed.
  5518. * src/DownloadEngineFactory.cc
  5519. (DefaultPieceStorage.h): New include.
  5520. (DefaultPeerStorage.h): New include.
  5521. (DefaultBtAnnounce.h): New include.
  5522. (DefaultBtProgressInfoFile.h): New include.
  5523. (newTorrentConsoleEngine): Rewritten.
  5524. * src/ShareRatioSeedCriteria.h
  5525. (torrentMan): Removed.
  5526. (btContext): New variable.
  5527. (peerStorage): New variable.
  5528. (btRuntime): New variable.
  5529. (evaluate): Use btContext, btRuntime, peerStorage.
  5530. * src/AnnounceTier.h: New file.
  5531. * src/BtAnnounce.h: New file.
  5532. * src/BtRegistry.h: New file.
  5533. * src/PeerInitiateConnectionCommand.h: Added btContext.
  5534. * src/PeerConnection.h (TorrentMan.h): Removed.
  5535. * src/PeerMessageFactory.cc: Use btContext, pieceStorage.
  5536. * src/Util.h
  5537. (slice): Added an argument.
  5538. * src/Util.cc
  5539. (slice): Added an argument to control whether trim is made or not.
  5540. * src/PeerStorage.h: New file.
  5541. * src/BtRegistry.cc: New file.
  5542. * src/TrackerUpdateCommand.h: Made subclass of BtContextAwareCommand.
  5543. * src/CopyDiskAdaptor.cc: Use the accessor methods of FileEntry.
  5544. * src/MultiDiskWriter.h: FileEntry -> FileEntryHandle
  5545. * src/PeerListenCommand.cc: Use btRuntime, peerStorage, btContext.
  5546. * src/TorrentRequestInfo.h
  5547. (e): Removed.
  5548. (showFileEntry): Added an argument.
  5549. (getDownloadEngine): Return 0.
  5550. * src/DefaultBtAnnounce.h: New file.
  5551. * src/TorrentAutoSaveCommand.cc: Use btRuntime, btProgressInfoFile.
  5552. * src/TrackerWatcherComand.cc: Use btRuntime, btAnnounce,
  5553. * src/PeerMessageFactory.h
  5554. (btContext): New variable.
  5555. (pieceStorage): New variable.
  5556. * src/TrackerUpdateCommand.cc: Use btRuntime, peerStorage, btContext,
  5557. btAnnounce.
  5558. * src/DiskAdaptor.cc
  5559. (DiskAdaptor): Removed topDir.
  5560. (~DiskAdaptor): Removed topDir.
  5561. * src/PeerListenCommand.h: Made subclass of BtContextAwareCommand.
  5562. * src/SeedCheckCommand.h: Made subclass of BtContextAwareCommand.
  5563. * src/File.h (mkdirs): New function.
  5564. * src/DefaultPeerStorage): New file.
  5565. * src/DownloadEngineFactory.h
  5566. (newTorrentConsoleEngine): Use btContext.
  5567. * src/BtContextAwareCommand.cc: New file.
  5568. * src/PeerInitiateConnectionCommand.cc: Use btRuntime, peerStorage.
  5569. * src/PeerMessage.h
  5570. (btContext): New variable.
  5571. (peerStorage): New variable.
  5572. (pieceStorage): New variable.
  5573. (setBtContext): New function.
  5574. * src/Directry.cc
  5575. (Directory): New function.
  5576. (createDir): Do nothing if name.size() == 0.
  5577. * src/AnnounceList.h
  5578. (AnnounceTier): Removed.
  5579. (AnnounceTiers): Removed.
  5580. * src/DefaultPieceStorage.h: New file.
  5581. * src/Piece.cc (toString): New function.
  5582. To fix typo:
  5583. * src/main.cc (showVersion): Fixed typo.
  5584. To fix compile warning:
  5585. * src/DelegatingPeerListProcessor.cc
  5586. (canHandle): Added "return false".
  5587. 2006-10-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5588. To simplify TrackerWatherCommand, TrackerUpdateCommand and
  5589. make the process of announce request testable.
  5590. * src/TrackerWatcherCommand.h
  5591. (TimeA2.h): Removed.
  5592. (interval): Removed.
  5593. (checkPoint): Removed.
  5594. (createRequestCommand): Added an argument 'url'.
  5595. (TrackerWatherCommand): Removed interval.
  5596. (createCommand): New function.
  5597. * src/DownloadEngineFactory.cc
  5598. (newTorrentConsoleEngine): Updated according to the changes in
  5599. TrackerWatherCommand.
  5600. * src/TorrentMan.cc
  5601. (DelegatingPeerListProcessor.h): New includes.
  5602. (TorrentMan): Added the initialization of announceInterval.
  5603. (isStoppedAnnounceReady): New function.
  5604. (isCompletedAnnounceReady): New function.
  5605. (isDefaultAnnounceReady): New function.
  5606. (isAnnounceReady): New function.
  5607. (getAnnounceUrl): New function.
  5608. (announceStart): New function.
  5609. (announceFailure): New function.
  5610. (announceSuccess): New function.
  5611. (isAllAnnounceFailed): New function.
  5612. (resetAnnounce): New function.
  5613. (processAnnounceResponse): New function.
  5614. (needMorePeerConnection): New function.
  5615. (noMoreAnnounce): New function.
  5616. * src/TrackerUpdateCommand.h
  5617. (getTrackerResponse): int->size_t
  5618. * src/TorrentMan.h
  5619. (isStoppedAnnounceReady): New function.
  5620. (isCompletedAnnounceReady): New function.
  5621. (isDefaultAnnounceReady): New function.
  5622. (announceInterval): New variable.
  5623. (isAnnounceReady): New function.
  5624. (getAnnounceUrl): New function.
  5625. (announceStart): New function.
  5626. (announceFailure): New function.
  5627. (announceSuccess): New function.
  5628. (isAllAnnounceFailed): New function.
  5629. (resetAnnounce): New function.
  5630. (processAnnounceResponse): New function.
  5631. (needMorePeerConnection): New function.
  5632. (noMoreAnnounce): New function.
  5633. * src/TrackerWatcherCommand.cc
  5634. (TrackerWatherCommand): Removed interval and checkPoint.
  5635. (execute): Rewritten.
  5636. (createCommand): New function.
  5637. (createRequestCommand): Rewritten.
  5638. * src/TrackerUpdateCommand.cc
  5639. (MetaFileUtil.h): Removed.
  5640. (DelegatingPeerListProcessor.h): Removed.
  5641. (getTrackerResponse): int->size_t. Use torrentMan's new functions.
  5642. 2006-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5643. Request -> RequestHandle:
  5644. * src/HttpResponseCommand.h: Request->RequestHandle
  5645. * src/AbstractCommand.cc: Request->RequestHandle
  5646. * src/HttpDownloadCommand.cc: Request->RequestHandle
  5647. * src/HttpRequestCommand.cc: Request->RequestHandle
  5648. * src/FtpInitiateConnectionCommand.h: Request->RequestHandle
  5649. * src/AbstractCommand.h: Request->RequestHandle
  5650. * src/HttpProxyRequestCommand.h: Request->RequestHandle
  5651. * src/HttpResponseCommand.cc: Request->RequestHandle
  5652. * src/HttpInitiateConnectionCommand.h: Request->RequestHandle
  5653. * src/FtpNegotiateCommand.cc: Request->RequestHandle
  5654. * src/FtpTunnelResponseCommand.h: Request->RequestHandle
  5655. * src/HttpConnection.h: Request->RequestHandle
  5656. * src/HttpProxyResponseCommand.cc: Request->RequestHandle
  5657. * src/InitiateConnectionCommandFactory.h: Request->RequestHandle
  5658. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  5659. * src/DownloadCommand.h: Request->RequestHandle
  5660. * src/FtpDowndloadCommand.cc: Request->RequestHandle
  5661. * src/HttpInitiateConnectionCommand.cc: Request->RequestHandle
  5662. * src/HttpRequestCommand.h: Request->RequestHandle
  5663. * src/FtpNegotiateCommand.h: Request->RequestHandle
  5664. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  5665. * src/FtpInitiateConnectionCommand.cc: Request->RequestHandle
  5666. * src/HttpDownloadCommand.h: Request->RequestHandle
  5667. * src/FtpConnection.cc: Request->RequestHandle
  5668. * src/InitiateConnectionCommandFactory.cc: Request->RequestHandle
  5669. * src/UrlRequestInfo.cc: Request->RequestHandle
  5670. * src/HttpProxyResponseCommand.h: Request->RequestHandle
  5671. * src/HttpConnection.h: Request->RequestHandle
  5672. * src/DownloadCommand.cc: Request->RequestHandle
  5673. * src/FtpConnection.h: Request->RequestHandle
  5674. * src/FtpDowndloadCommand.h: Request->RequestHandle
  5675. * src/HttpProxyRequestCommand.cc: Request->RequestHandle
  5676. * src/FtpTunnelRequestCommand.h: Request->RequestHandle
  5677. * src/Request.h
  5678. (SharedHandle.h): New include.
  5679. (RequestHandle): New type definition.
  5680. (Requests): Redefined.
  5681. To add MULTITRACKER support:
  5682. * src/TrackerWatcherCommand.h
  5683. (createRequestCommand): New function.
  5684. * src/DownloadEngineFactory.cc
  5685. (newTorrentConsoleEngine): Removed req.
  5686. * src/prefs.h
  5687. (PREF_TRACKER_MAX_TRIES): New definition.
  5688. * src/TorrentMan.cc
  5689. (TorrentMan): Removed req. Added trackerNumTry.
  5690. (~TorrentMan): Removed req.
  5691. (setupInternal1): Added announceList.
  5692. * src/TorrentRequestInfo.cc
  5693. (execute): Set PREF_MAX_TIRES to 1. The max number of tries for
  5694. announces is now specified by PREF_TRACKER_MAX_TRIES.
  5695. * src/main.cc
  5696. (main): Added PREF_TRACKER_MAX_TRIES.
  5697. * src/TorrentMan.h
  5698. (Request.h): Removed.
  5699. (AnnounceList.h): New include.
  5700. (trackerNumTry): New variable.
  5701. (req): Removed.
  5702. (announceList): New variable.
  5703. * src/TrackerWatcherCommand.cc
  5704. (execute): Rewritten.
  5705. (createRequestCommand): New function.
  5706. * src/TrackerUpdateCommand.cc
  5707. (execute): Updated with the use of AnnounceList.
  5708. * src/AnnounceList.cc: New class.
  5709. * src/AnnounceList.h: New class.
  5710. To fix typo:
  5711. * src/prefs.h
  5712. (PREF_MAX_TRIES): max_try->max_tries
  5713. To not to decode "+" as space in URL decode:
  5714. * src/Util.cc
  5715. (urldecode): Removed "+"->space decoding rule. Test case was updated.
  5716. 2006-10-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5717. To add timeout to async name resolution:
  5718. * src/AbstractCommand.h
  5719. (nameResolveFinished): New function. This is not elegant way. It needs
  5720. to be more refined.
  5721. (nameResolverCheck): New variable.
  5722. * src/AbstractCommand.cc
  5723. (AbstractCommand): Added nameResolverCheck.
  5724. (execute): Added the check whether the name resolution has finished.
  5725. (setNameResolverCheck): Set nameResolverCheck to true.
  5726. (disableNameResolverCheck): Set nameResolverCheck to false.
  5727. (nameResolverFinished): New function.
  5728. * src/FtpInitiateConnectionCommand.h
  5729. (nameResolverFinished): New function.
  5730. * src/FtpInitiateConnectionCommand.cc
  5731. (FtpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  5732. * src/HttpInitiateConnectionCommand.h
  5733. (nameResolverFinished): New function.
  5734. * src/HttpInitiateConnectionCommand.cc
  5735. (HttpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  5736. * src/prefs.h
  5737. (PREF_DNS_TIMEOUT): New definition.
  5738. * src/main.cc
  5739. (main): Added PREF_DNS_TIMEOUT.
  5740. To add the support for a non-compact response from a tracker:
  5741. * src/PeerListProcessor.h: New class.
  5742. * src/DefaultPeerListProcessor.h: New class.
  5743. * src/DefaultPeerListProcessor.cc: New class.
  5744. * src/CompactPeerListProcessor.h: New class.
  5745. * src/CompactPeerListProcessor.cc: New class.
  5746. * src/DelegatingPeerListProcessor.h: New class.
  5747. * src/DelegatingPeerListProcessor.cc: New class.
  5748. * src/TorrentMan.cc
  5749. (addPeer): New function(overload).
  5750. (addPeer): Delete unused peers only when new peer is added.
  5751. * src/TorrentMan.h
  5752. (PeerListProcessor.h): Included.
  5753. (Peers): Removed.
  5754. (addPeer): New function(overload).
  5755. * src/TrackerUpdateCommand.cc
  5756. (netinet/in.h): Removed.
  5757. (DelegatingPeerListProcessor.h): Included.
  5758. (execute): Updated to use DelegatingPeerListProcessor.
  5759. To fix the memory leak in TorrentMan::peers:
  5760. * src/PeerAbstractCommand.cc
  5761. (onAbort): Added peer->resetStatus().
  5762. * src/Peer.h
  5763. (resetStatus): Made public.
  5764. To improve the precision of the speed calculation:
  5765. * src/SpeedCalc.h
  5766. (nextInterval): New variable.
  5767. * src/SpeedCalc.cc
  5768. (reset): Added nextInterval.
  5769. (isIntervalOver): Use nextInterval instead of CHANGE_INTERVAL_SEC.
  5770. (changeSw): Set nextInterval to 15 seconds relative to the current
  5771. instant time.
  5772. * src/main.cc
  5773. (showVersion): Updated.
  5774. (showUsage): Updated.
  5775. * Release 0.8.1
  5776. 2006-09-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5777. * src/main.cc
  5778. (showUsage): Commented out --min-segment-size option.
  5779. (main): Commented out --min-segment-size option.
  5780. * Release 0.8.0
  5781. 2006-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5782. * src/*.{h,cc}:
  5783. Added an exception to the license which allows linking with OpenSSL.
  5784. 2006-09-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5785. * src/AbstractCommand.cc
  5786. (execute): Check whether the download has finished before checking
  5787. socket status.
  5788. Return true if peerStat->getStatus() == REQUEST_IDLE.
  5789. Do not exit even if no segment is available.
  5790. * src/prefs.h
  5791. (PREF_STARTUP_IDLE_TIME): New definition.
  5792. * src/PeerInteractionCommand.cc
  5793. (executeInternal): Removed max speed limit. Because it performs bad.
  5794. (receiveMessages): Added max speed limit. This was better than above,
  5795. but still a little bit to be desired. Sometimes the download speed
  5796. became much faster than I specified.
  5797. * src/SpeedCalc.h
  5798. (start): New variable.
  5799. (accumulatedLength): New variable.
  5800. (getAvgSpeed): New function.
  5801. * src/SpeedCalc.cc
  5802. (reset): Added start, accumulatedLength.
  5803. (update): Added calculation of an average speed.
  5804. (getAvgSpeed): New function.
  5805. * src/DownloadCommand.h
  5806. (sw): Removed.
  5807. * src/main.cc
  5808. (main): Added PREF_STARTUP_IDLE_TIME.
  5809. * src/PeerStat.h
  5810. (STATUS): Added REQUEST_IDLE.
  5811. (getMaxSpeed): Renamed as getMaxDownloadSpeed().
  5812. (getAvgDownloadSpeed): New function
  5813. (requestIdle): New function.
  5814. * src/SegmentMan.h
  5815. (SegmentEntryHandle): New type definition.
  5816. (SegmentEntries): Now holds SegmentEntryHandle.
  5817. (findSlowerSegmentEntry): New funtion.
  5818. * src/SegmentMan.cc
  5819. (save): Updated according to the changes in SegmentEntries.
  5820. (read): Updated according to the changes in SegmentEntries.
  5821. (FindSegmentEntryByIndex): Updated according to the changes in
  5822. SegmentEntries.
  5823. (FindSegmentEntryByCuid): Updated according to the changes in
  5824. SegmentEntries.
  5825. (checkoutSegment): Updated according to the changes in SegmentEntries.
  5826. (onNullBitfield): Updated according to the changes in SegmentEntries.
  5827. Renamed uitr as itr.
  5828. (findSlowerSegmentEntry): New function.
  5829. (getSegment): Updated according to the changes in SegmentEntries.
  5830. Added the feature that cancels the segment with slow server and fast
  5831. one takes it over.
  5832. (cancelSegment): Updated according to the changes in SegmentEntries.
  5833. (getDownloadLength): Updated according to the changes in
  5834. SegmentEntries.
  5835. (init): Assigned 0 to bitfield after deleting it.
  5836. * src/DownloadCommand.cc
  5837. (STARTUP_IDLE_TIME): Removed.
  5838. (executeInternal): Use PREF_STARTUP_IDLE_TIME.
  5839. * src/PeerChokeCommand.cc
  5840. (optUnchokingPeer): Updated according to the changes in Peer.
  5841. (ResetDelta): Removed.
  5842. (UploadFaster): Updated according to the changes in Peer.
  5843. (DownloadFaster): Updated according to the changes in Peer.
  5844. (execute): I clarify the meaning of "upload" and "download" here.
  5845. "upload" means the transfer from localhost to remote host.
  5846. "download" means the transfer from remote host to localhost.
  5847. Based on this rule, I swapped orderByUploadRate and
  5848. orderByDownloadRate.
  5849. * src/PeerInteractionCommand.cc
  5850. (PeerInteraction): Removed peerInteraction->setUploadLImit().
  5851. (executeInternal): Removed the argument of
  5852. peerInteraction->sendMessages().
  5853. (receiveMessages): Rewritten download speed limit.
  5854. (sendKeepAlive): Removed peerInteraction->sendMessages().
  5855. * src/HttpResponseCommand.cc
  5856. (handleDefaultEncoding): If file size is unknown in torrent request,
  5857. do not call segmentMan->initBitfield() here.
  5858. Disabled persistent connection feature in torrent request.
  5859. * src/UrlRequestInfo.h
  5860. (UrlRequestInfo): Removed const qualifier from option.
  5861. * src/TorrentMan.h
  5862. (TransferStat): New class.
  5863. (deltaDownloadLength): Removed.
  5864. (deltaUploadLength): Removed.
  5865. (addDeltaDownloadLength): Removed.
  5866. (getDeltaDownloadLength): Removed.
  5867. (resetDeltaDownloadLength): Removed.
  5868. (addDeltaUploadLength): Removed.
  5869. (getDeltaUploadLength): Removed.
  5870. (resetDeltaUploadLength): Removed.
  5871. (addActivePeer): Added peer->activate().
  5872. (deleteActivePeer): Added peer->deactivate().
  5873. (calculateStat): New function.
  5874. * src/TorrentMan.cc
  5875. (TorrentMan): Removed deltaDownloadLength and deltaUploadLength.
  5876. (calculateStat): New function.
  5877. * src/PeerInteraction.h
  5878. (uploadLimit): Removed.
  5879. (option): New variable.
  5880. (setUploadLimit): Removed.
  5881. (getUploadSpeed): Removed.
  5882. (sendMessages): Removed the argument "currentUploadSpeed".
  5883. * src/PeerInteraction.cc
  5884. (prefs.h): Included.
  5885. (PeerInteraction): Removed uploadLimit. Added option.
  5886. (sendMessages): Rewritten upload speed limit.
  5887. (sendHandshake): Removed the argument from sendMessages().
  5888. (sendBitfield): Removed the argument from sendMessages().
  5889. * src/PeerAbstractCommand.cc
  5890. (execute): Commented out the portion of upload limit.
  5891. (onAbort): Removed peer->resetStatus().
  5892. * src/TorrentRequestInfo.cc
  5893. (timeoutSpecified): Declared extern.
  5894. (execute): Set timeout to 180 if timeout is not specified by.
  5895. command-line.
  5896. * src/PieceMessage.cc
  5897. (receivedAction): Added peer->updateDownloadLength().
  5898. Removed peer->addPeerUpload().
  5899. Removed torrentMan->addDeltaDownloadLength().
  5900. (send): Added peer->updateUploadLength().
  5901. Removed peer->addPeerDownload().
  5902. Removed torrentMan->addDeltaUploadLength().
  5903. * src/main.cc
  5904. (timeoutSpecified): New variable.
  5905. (main): Set timeoutSpecified to false.
  5906. If the command-line option "--upload-limit" is specified, then
  5907. timeoutSpecified is set to true. This option will remain in the next
  5908. release, but be deprecated in the future release.
  5909. * src/TorrentRequestInfo.h
  5910. (TorrentRequestInfo): Removed const qualifier from op.
  5911. * src/PeerStat.h
  5912. (uploadSpeed): New variable.
  5913. (PeerStat): Added default value to cuid.
  5914. (calculateUploadSpeed): New function.
  5915. (updateUploadLength): New function.
  5916. (getMaxUploadSpeed): New function.
  5917. (getAvgUploadSpeed): New function.
  5918. (reset): Added uploadSpeed. Set status to IDLE.
  5919. * src/TorrentDownloadEngine.h
  5920. (cp): Declared as Time.
  5921. (sessionDownloadLengthArray): Removed.
  5922. (sessionUploadLengthArray): Removed.
  5923. (currentCp): Removed.
  5924. (lastCalcStat): New variable
  5925. (lastElapsed): Removed.
  5926. (sessionDownloadLength): Removed.
  5927. (calculateStat): New function.
  5928. * src/TorrentDownloadEngine.cc
  5929. (initStatistics): Removed lastElapsed, cp[],
  5930. sessionDownloadLengthArray[], sessionUploadLengthArray[],
  5931. currentCp, sessionDownloadLength.
  5932. Added cp.reset() and lastCalcStat.reset().
  5933. (calculateSpeed): Changed the name of the argument.
  5934. (calculateStatistics): Rewritten.
  5935. (calculateStat): New function.
  5936. * src/Peer.h
  5937. (PeerStat.h): Included.
  5938. (peerUpload): Removed.
  5939. (peerDownload): Removed.
  5940. (peerStat): New variable.
  5941. (sessionUploadLength): New variable.
  5942. (sessionDownloadLength): New variable.
  5943. (deltaUpload): Removed.
  5944. (deltaDownload): Removed.
  5945. (resetStatus): Made private.
  5946. (Peer): Added sessionUploadLength, sessionDownloadLength.
  5947. Removed peerUpload, peerDownload.
  5948. (updateUploadLength): New function.
  5949. (addDeltaUpload): Removed.
  5950. (updateDownloadLength): New function.
  5951. (resetDeltaUpload): Removed.
  5952. (getDeltaUpload): Removed.
  5953. (addDeltaDownload): Removed.
  5954. (calculateUploadSpeed): New function.
  5955. (resetDeltaDownload): Removed.
  5956. (getDeltaDownload): Removed.
  5957. (calculateDownloadSpeed): New function.
  5958. (getSessionUploadLength): New function.
  5959. (getSessionDownloadLength): New function.
  5960. (activate): New function.
  5961. (deactivate): New function.
  5962. (addPeerUpload): Removed.
  5963. (setPeerUpload): Removed.
  5964. (getPeerUpload): Removed.
  5965. (addPeerDownload): Removed.
  5966. (setPeerDownload): Removed.
  5967. (getPeerDownload): Removed.
  5968. * src/Peer.cc
  5969. (resetStatus): Removed resetDeltaUpload() and resetDeltaDownload().
  5970. * src/MetalinkRequestInfo.h
  5971. (MetalinkRequestInfo): Removed const qualifier from op.
  5972. * src/RequestInfo.h
  5973. (op): Removed const qualifier.
  5974. (RequestInfo): Removed const qualifier from op.
  5975. * src/prefs.h
  5976. (PREF_MAX_SPEED_LIMIT): Renamed as PREF_MAX_DOWNLOAD_LIMIT.
  5977. (PREF_UPLOAD_LIMIT): Renamed as PREF_MAX_UPLOAD_LIMIT.
  5978. * src/PeerInteractionCommand.cc
  5979. (PeerInteractionCommand): Use PREF_MAX_UPLOAD_LIMIT.
  5980. (receiveMessages): Use PREF_MAX_DOWNLOAD_LIMIT.
  5981. * src/PeerInteraction.cc
  5982. (sendMessages): Use PREF_MAX_UPLOAD_LIMIT.
  5983. * src/main.cc
  5984. (showUsage): Updated the description of "--lowest-speed-limit" option.
  5985. Added the description of "--max-download-limit" option.
  5986. Removed the description of "--upload-limit" option.
  5987. Added the description of "--max-upload-limit" option.
  5988. (main): Use PREF_MAX_UPLOAD_LIMIT, PREF_MAX_DOWNLOAD_LIMIT.
  5989. Added "--max-download-limit" option and "--max-upload-limit" option.
  5990. Added the warning message if "--upload-limit" option is used.
  5991. * src/DownloadCommand.cc
  5992. (executeInternal): Use PREF_MAX_DOWNLOAD_LIMIT.
  5993. 2006-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5994. To rewrite segment download mechanism for HTTP/FTP download.
  5995. Use BitfieldMan to manage segment download.
  5996. * src/HttpResponseCommand.h
  5997. (executeInternal): Pass the reference of segment.
  5998. * src/AbstractCommand.cc
  5999. (prepareForRetry): Call segmentMan->cancelSegment here.
  6000. (onAbort): Call segmentMan->cancelSegment here.
  6001. * src/HttpDownloadCommand.cc
  6002. (prepareForNextSegment): New function.
  6003. * src/DownloadEngineFactory.cc
  6004. (newConsoleEngine): Removed splitter.
  6005. (newTorrentConsoleEngine): Removed splitter.
  6006. * src/Request.h
  6007. (segment): Renamed from seg.
  6008. * src/FtpInitiateConnectionCommand.h
  6009. (executeInternal): Pass the reference of segment.
  6010. * src/AbstractCommand.h
  6011. (executeInternal): Pass the reference of segment.
  6012. * src/pref.h
  6013. (PREF_SEGMENT_SIZE): New definition.
  6014. * src/HttpProxyRequestCommand.h
  6015. (executeInternal): Pass the reference of segment.
  6016. * src/HttpResponseCommand.cc
  6017. (checkResponse): Allowed status 206 when a request range starts 0.
  6018. (handleDefaultEncoding): Rewritten the code related to Segment.
  6019. (handleOtherEncoding): Rewritten the code related to Segment.
  6020. * src/SegmentMan.h
  6021. (SegmentEntry): New class.
  6022. (SegmentEntries): New type definition.
  6023. (bitfield): New variable.
  6024. (usedSegmentEntries): New variable.
  6025. (onNullBitfield): New function.
  6026. (checkoutSegment): New function.
  6027. (segments): Removed.
  6028. (splitter): Removed.
  6029. (unregisterId): Removed.
  6030. (getSegment): New function(overload)
  6031. (getDownloadedSize): Removed.
  6032. (cancelSegment): New function.
  6033. (completeSegment): New function.
  6034. (initBitfield): New function.
  6035. (hasSegment): New function.
  6036. (getDownloadLength): New function.
  6037. * src/BitfieldMan.h
  6038. (getStartIndex): New function.
  6039. (getEndIndex): New function.
  6040. (getMissingUnusedIndex): New function(overload).
  6041. (getSparseMissingUnusedIndex): New function.
  6042. * src/BitfieldMan.cc
  6043. (getMissingIndexRandomly): Handle the last byte of bitfield properly.
  6044. (getMissingUnusedIndex): New function(overload).
  6045. (Range): New class.
  6046. (getStartIndex): New function.
  6047. (getEndIndex): New function.
  6048. (getSparseMissingUnusedIndex): New function.
  6049. (isBitSetInternal): Return false if the given index is less than 0.
  6050. * src/HttpInitiateConnectionCommand.h
  6051. (executeInternal): Pass the reference of segment.
  6052. * src/FtpNegotiateCommand.h
  6053. (executeInternal): Pass the reference of segment.
  6054. * src/FtpNegotiateCommand.cc
  6055. (recvSize): Initialize bitfield here.
  6056. * src/FtpTunnelResponseCommand.h
  6057. (executeInternal): Pass the reference of segment.
  6058. * src/HttpConnection.cc
  6059. (createRequest): Rewritten range header processing.
  6060. * src/DownloadCommand.h
  6061. (executeInternal): Pass the reference of segment.
  6062. (prepareForRetry): Removed.
  6063. (prepareForNextSegment): Added an argument segment. Made it a virtual
  6064. function.
  6065. * src/main.cc
  6066. (main): Set the initial value of PREF_SEGMENT_SIZE to 1MB.
  6067. * src/SegmentMan.cc
  6068. (SegmentMan): Added bitfield. Removed splitter.
  6069. (~SegmentMan): Added bitfield. Removed splitter.
  6070. (unregisterId): Removed.
  6071. (getSegment): Rewritten.
  6072. (updateSegment): Rewritten.
  6073. (save): Rewritten.
  6074. (read): Rewritten.
  6075. (finished): Rewritten.
  6076. (getDownloadedSize): Removed.
  6077. (initBitfield): New function.
  6078. (FindSegmentEntryByIndex): New function object.
  6079. (FindSegmentEntryByCuid): New function object.
  6080. (checkoutSegment): New function.
  6081. (onNullBitfield): New function.
  6082. (getSegment): New function(overload).
  6083. (CancelSegment): New function object.
  6084. (cancelSegment): New function.
  6085. (completeSegment): New function.
  6086. (hasSegment): New function.
  6087. (getDownloadLength): New function.
  6088. * src/FtpInitiateConnectionCommand.cc
  6089. (executeInternal): Load .aria2 file after hostname resolution finishes.
  6090. * src/Segment.h: Rewritten.
  6091. * src/Segment.cc (operator<<): New function.
  6092. * src/HttpDownloadCommand.h
  6093. (prepareForNextSegment): New function.
  6094. * src/Request.cc
  6095. (resetUrl): Made segment null.
  6096. * src/DownloadEngine.cc
  6097. (~DownloadEngine): Call cleanQueue before deleting segmentMan.
  6098. * src/HttpProxyRequestCommand.h
  6099. (executeInternal): Pass the reference of segment.
  6100. * src/DownloadCommand.cc
  6101. (executeInternal): Rewritten the code related to Segment.
  6102. (prepareForRetry): Removed.
  6103. (prepareForNextSegment): Rewritten.
  6104. * src/FtpTunnelResponseCommand.h
  6105. (executeInternal): Pass the reference of segment.
  6106. To add HTTP 1.1 persistent connection support(experimental)
  6107. * src/HttpRequestCommand.cc
  6108. (executeInternal): Disable keep alive if it is disabled by
  6109. configuration.
  6110. * src/Request.h
  6111. (keepAlive): New variable.
  6112. (isKeepAlive): New function.
  6113. (setKeepAlive): New function.
  6114. * src/pref.h
  6115. (PREF_HTTP_KEEP_ALIVE): New definition.
  6116. * src/HttpResponseCommand.cc
  6117. (executeInternal): Check the remote server supports keep alive.
  6118. * src/HttpConnection.cc
  6119. (createRequest): Send "Connection: close" only if keep alive is
  6120. disabled.
  6121. * src/main.cc
  6122. (main):
  6123. Set the initial value(false) of PREF_KEEP_ALIVE to false.
  6124. To add max download speed limit:
  6125. * src/pref.h
  6126. (PREF_MAX_SPEED_LIMIT): New definition.
  6127. * src/PeerInteractionCommand.cc
  6128. (executeInternal): Added max download speed limit. Not tested yet.
  6129. * src/SegmentMan.h
  6130. (PeerStats): New type definition.
  6131. (peerStats): New variable.
  6132. (registerPeerStat): New function.
  6133. (FindPeerStat): New function object.
  6134. (getPeerStat): New function.
  6135. (calculateDownloadSpeed): New function.
  6136. * src/SpeedCalc.h: New class.
  6137. * src/SpeedCalc.cc: New class.
  6138. * src/main.cc
  6139. (main):
  6140. Set the initial value of PREF_MAX_SPEED_LIMIT to 0(which means the
  6141. download speed is not restricted).
  6142. * src/PeerStat.h: New class.
  6143. * src/SegmentMan.cc
  6144. (registerPeerStat): New function.
  6145. (calculateDownloadSpeed): New function.
  6146. * src/DownloadCommand.cc
  6147. (STARTUP_IDLE_TIME): New definition.
  6148. (DownloadCommand): Register peerStat to segmentMan. Call peerStat->
  6149. downloadStart.
  6150. (~DownloadCommand): Call peerStat->downloadStop.
  6151. (executeInternal): Added download speed limitter. Rewritten lowest
  6152. speed limitter.
  6153. * src/HttpConnection.cc
  6154. (receiveResponse): Fixed: eohIndex[headerBuf] -> headerBuf[eohIndex].
  6155. * src/AbstractCommand.cc
  6156. (resolveHostname): Throw DlAbortEx if a name resolution failes.
  6157. Added hostname to the error message.
  6158. * src/ConsoleDownloadEngine.cc
  6159. (calculateStatistics): Initialize psize with dlSize.
  6160. * src/PieceMessage.cc
  6161. (receivedAction): Do not call peerInteraction->abortPiece here.
  6162. (onGotWrongPiece): Call peerInteraction->abortPiece here.
  6163. * src/BitfieldMan.h
  6164. (clearAllUseBit): New function.
  6165. (setAllUseBit): New function.
  6166. * src/BitfieldMan.cc
  6167. (clearAllBit): Do not clear useBitfield here.
  6168. (clearAllUseBit): New function.
  6169. (setAllUseBit): New function.
  6170. * src/Piece.cc
  6171. (clearAllBlock): Call bitfield->clearAllUseBit().
  6172. 2006-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6173. To make filename URL-decoded:
  6174. * src/HttpResponseCommand.h: Updated doc.
  6175. * src/HttpResponseCommand.cc
  6176. (determinFilename): Made filename URL-decoded.
  6177. * src/FtpInitiateConnectionCommand.cc
  6178. (executeInternal): Made filename URL-decoded.
  6179. * src/Util.h (urldecode): New function.
  6180. * src/Util.cc (urldecode): New function.
  6181. To fix a bug that caused assertion failure in ares_strerror:
  6182. * src/NameResolver.cc (callback): Fixed the bug.
  6183. * Release 0.7.3
  6184. 2006-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6185. To add --seed-time and --seed-ratio command-line option:
  6186. * src/Option.h (getAsDouble): New function.
  6187. * src/Option.cc (getAsDouble): New function.
  6188. * src/SeedCheckCommand.h: New class.
  6189. * src/SeedCheckCommand.cc: New class.
  6190. * src/DownloadEngineFactory.cc
  6191. (SeedCheckCommand.h): Included.
  6192. (UnionSeedCriteria.h): Included.
  6193. (TimeSeedCriteria.h): Included.
  6194. (ShareRatioSeedCriteria.h): Included.
  6195. (newTorrentConsoleEngine): Added the processing of seed option.
  6196. * src/SeedCriteria.h: New class.
  6197. * src/ShareRatioSeedCriteria.h: New class.
  6198. * src/TimeSeedCriteria.h: New class.
  6199. * src/UnionSeedCriteria.h: New class.
  6200. * src/prefs.h
  6201. (PREF_SEED_TIME): New definition.
  6202. (PREF_SEED_RATIO): New definition.
  6203. * src/main.cc
  6204. (showUsage): Added --seed-time and --seed-ratio option.
  6205. (main): Added --seed-time and --seed-ratio option.
  6206. Made default log file name "/dev/null".
  6207. * src/SharedHandle.h
  6208. (SharedHandle): Copy constructor. Made it assignable from the
  6209. SharedHandle of the subclasses.
  6210. (operator=): Made it assignable from the SharedHandle of the
  6211. subclasses.
  6212. (getRefCount): New function.
  6213. To add notice log level and the switch to write log to stdout. This
  6214. switch is configurable per log level.
  6215. * src/Logger.h
  6216. (notice): New function.
  6217. (LEVEL): Added NOTICE. Assigned an explicit value to each log level
  6218. constant.
  6219. * src/LogFactory.cc
  6220. (getInstance): The use of NullLogger was removed. A log message with
  6221. notice log level was made written to stdout along with log file.
  6222. * src/NullLogger.h
  6223. (notice): New function.
  6224. * src/SimpleLogger.h
  6225. (writeHeader): Added the 'file' argument.
  6226. (writeLog): Added the 'file' argument.
  6227. (writeFile): New function.
  6228. (stdoutField): New variable.
  6229. (SimpleLogger): Removed the default constructor.
  6230. (SimpleLogger): Made the default value of logfile 0.
  6231. (debug): Added 'virtual' keyword.
  6232. (info): Added 'virtual' keyword.
  6233. (warn): Added 'virtual' keyword.
  6234. (error): Added 'virtual' keyword.
  6235. (notice): New function.
  6236. (setStdout): New function.
  6237. * src/SimpleLogger.cc
  6238. (WRITE_LOG): Replaced writeLog with writeFile.
  6239. (WRITE_LOG_EX): Replaced writeLog with writeFile.
  6240. (SimpleLogger): Removed the default constructor.
  6241. (setStdout): New function.
  6242. (writeLog): Added the handling of NOTICE log level.
  6243. (writeFile): New function.
  6244. (notice): New function.
  6245. * src/TorrentMan.h: Updated doc.
  6246. * src/BitfieldMan.h: Updated doc.
  6247. * src/TrackerWatcherCommand.cc
  6248. (execute): Return true if error occurred in the request to the tracker
  6249. and halt is requested.
  6250. * src/TrackerUpdateCommand.cc
  6251. (execute): Return true if error occurred in the request to the tracker
  6252. and halt is requested.
  6253. To call onDownloadComplete from TorrentMan::completePiece(), not from
  6254. DownloadEngine:
  6255. * src/TorrentConsoleDownloadEngine.h
  6256. (onSelectiveDownloadingCompletes): Removed.
  6257. * src/TorrentConsoleDownloadEngine.cc
  6258. (onSelectiveDownloadingCompletes): Removed.
  6259. * src/TorrentDownloadEngine.h
  6260. (onEndOfRun): Added 'virtual' keyword.
  6261. (afterEachIteration): Removed.
  6262. (onSelectiveDownloadingCompletes): Removed.
  6263. * src/TorrentDownloadEngine.cc
  6264. (onEndOfRun): Removed filenameFixed.
  6265. (afterEachIteration): Removed.
  6266. * src/TorrentMan.cc
  6267. (completePiece): Call onDownloadComplete here.
  6268. (onDownloadComplete): Added 2 log messages.
  6269. 2006-08-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6270. To fix compilation problem on gcc4.1.1(patch#1542283 by tizianomueller)
  6271. * src/NameResolver.h: Added the prototype declaration of callback().
  6272. To support c-ares library:
  6273. * src/AbstractCommand.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6274. * src/FeatureConfig.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6275. * src/FtpInitiateConnectionCommand.h:
  6276. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6277. * src/AbstractCommand.h: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6278. * src/HttpInitiateConnectionCommand.h:
  6279. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6280. * src/NameResolver.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS.
  6281. Added thes upport of c-ares's ares_strerror(the idea came from patch
  6282. #1542285 by tizianomueller)
  6283. * src/HttpInitiateConnectionCommand.cc:
  6284. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6285. * src/FtpInitiateConnectionCommand.cc:
  6286. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6287. * src/DownloadEngine.h:
  6288. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6289. * src/DownloadEngine.cc:
  6290. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6291. To fix the bug that causes compilation failure with metalink-support
  6292. disabled(bug#1543587):
  6293. * src/main.cc: Fixed with the patch by tizianomueller.
  6294. * Release 0.7.2
  6295. 2006-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6296. * src/main.cc
  6297. (main): Added a message to inform users that aria2 is starting to
  6298. verify checksum.
  6299. * src/RequestInfo.cc
  6300. (printDownloadAbortMessage): Added a message to inform users that
  6301. transfer can be resumed.
  6302. * src/FeatureConfig.cc
  6303. (FEATURE_ASYNC_DNS): New definition.
  6304. (FeatureConfig): Added aysnc DNS entry.
  6305. To replace CommandUuid with Command* in SocketEntry and
  6306. NameResolverEntry:
  6307. * src/DownloadEngine.h
  6308. (CommandUuids): Removed.
  6309. (SocketEntry::commandUuid): Removed.
  6310. (SocketEntry::command): New variable.
  6311. (SocketEntry::SocketEntry): Updated.
  6312. (SocketEntry::operator==): Updated.
  6313. (NameResolverEntry::commandUuid): Removed.
  6314. (NameResolverEntry::command): New variable.
  6315. (NameResolverEntry::NameResolverEntry): Updated.
  6316. (NameResolverEntry::operator==): Updated.
  6317. (waitData): Changed the argument type.
  6318. (addSocketForReadCheck): Changed the argument type.
  6319. (deleteSocketForReadCheck): Changed the argument type.
  6320. (addSocketForWriteCheck): Changed the argument type.
  6321. (deleteSocketForWriteCheck): Changed the argument type.
  6322. (addNameResolverCheck): Changed the argument type.
  6323. (deleteNameResolverCheck): Changed the argument type.
  6324. * src/DownloadEngine.cc
  6325. (FindCommand): Removed.
  6326. (run): Removed activeUuid. Added activeCommands instead.
  6327. (AccumulateActiveUuid): Renamed as AccumulateActiveCommand.
  6328. (AccumulateActiveCommand): New function object.
  6329. (waitData): Use AccumulateActiveCommand.
  6330. (addSocketForReadCheck): Use Command instead of CommandUuid.
  6331. (deleteSocketForReadCheck): Use Command instead of CommandUuid.
  6332. (addSocketForWriteCheck): Use Command instead of CommandUuid.
  6333. (deleteSocketForWriteCheck): Use Command instead of CommandUuid.
  6334. (addNameResolverCheck): Use Command instead of CommandUuid.
  6335. (deleteNameResolverCheck): Use Command instead of CommandUuid.
  6336. * src/AbstractCommand.cc
  6337. (disableReadCheckSocket): Updated according to the changes in
  6338. DownloadEngine.
  6339. (setReadCheckSocket): Updated according to the changes in
  6340. DownloadEngine.
  6341. (disableWriteCheckSocket): Updated according to the changes in
  6342. DownloadEngine.
  6343. (setWriteCheckSocket): Updated according to the changes in
  6344. DownloadEngine.
  6345. (setNameResolverCheck): Updated according to the changes in
  6346. DownloadEngine.
  6347. (disableNameResolverCheck): Updated according to the changes in
  6348. DownloadEngine.
  6349. * src/AbstractCommand.cc
  6350. (disableReadCheckSocket): Updated according to the changes in
  6351. DownloadEngine.
  6352. (setReadCheckSocket): Updated according to the changes in
  6353. DownloadEngine.
  6354. (disableWriteCheckSocket): Updated according to the changes in
  6355. DownloadEngine.
  6356. (setWriteCheckSocket): Updated according to the changes in
  6357. DownloadEngine.
  6358. * release 0.7.1
  6359. 2006-08-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6360. To handle the case where some BitTorrent tracker requires all letters
  6361. except for [A-Za-z0-9] is URL encoded.
  6362. * src/Util.h
  6363. (torrentUrlencode): New function.
  6364. * src/Util.cc
  6365. (ctype.h): Included.
  6366. (torrentUrlencode): New function.
  6367. * src/TrackerWatcherCommand.cc
  6368. (execute): Use Util::torrentUrlencode() instead of Util::urlencode().
  6369. 2006-08-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6370. To add asynchronous DNS support(libares):
  6371. * src/AbstractCommand.h
  6372. (setNameResolverCheck): New function.
  6373. (disableNameResolverCheck): New function
  6374. (resolveHostname): New function.
  6375. * src/AbstractCommand.cc
  6376. (setNameResolverCheck): New function.
  6377. (disableNameResolverCheck): New function
  6378. (resolveHostname): New function.
  6379. * src/FtpInitiateConnectionCommand.h
  6380. (nameResolver): New function.
  6381. * src/FtpInitiateConnectionCommand.cc
  6382. (Util.h): Included.
  6383. (FtpInitiateConnectionCommand): Call disableReadCheckSocket,
  6384. disableWriteCheckSocket.
  6385. (~FtpInitiateConnectionCommand): Call disableNameResolverCheck.
  6386. (executeInternal): Added async DNS support.
  6387. * src/HttpInitiateConnectionCommand.h
  6388. (nameResolver): New function.
  6389. * src/HttpInitiateConnectionCommand.cc
  6390. (DlRetryEx.h): Included.
  6391. (HttpInitiateConnectionCommand): Call disableReadCheckSocket,
  6392. disableWriteCheckSocket.
  6393. (~HttpInitiateConnectionCommand): Call disableNameResolverCheck.
  6394. (executeInternal): Added async DNS support.
  6395. * src/NameResolver.h: New class. Note: #include <ares.h> is surrounded
  6396. by extern "C" declaration.
  6397. * src/NameResolver.cc: New class.
  6398. * src/Util.h:
  6399. (isNumberAndDotsNotation): New function
  6400. * src/Util.cc
  6401. (isNumberAndDotsNotation): New function.
  6402. * src/DownloadEngine.h
  6403. (NameResolver.h): Included.
  6404. (NameResolverEntry): New class.
  6405. (NameResolverEntries): New type definition.
  6406. (addNameResolverCheck): New function.
  6407. (deleteNameResolverCheck): New function.
  6408. * src/DownloadEngine.cc
  6409. (run): Initialize cp with 0.
  6410. (SetDescriptor::operator()): Added for NameResolverEntry.
  6411. (AccumulateActiveUuid::operator()): Added for NameResolverEntry.
  6412. (waitData): Check nameResolver entries.
  6413. (updateFdSet): Update fds in nameResolver entries.
  6414. (addNameResolverCheck): New function.
  6415. (deleteNameResolverCheck): new function.
  6416. * src/PeerInteractionCommand.cc
  6417. (executeInternal): Fixed wrong socket handling.
  6418. * src/main.cc
  6419. (main): Fixed the initial value of PREF_LOWEST_SPEED_LIMIT option to 0.
  6420. * src/Util.cc
  6421. (fileChecksum): Removed the call to ctx.digestReset().
  6422. 2006-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6423. * po/ru.po: Azamat sent me Russian translation.
  6424. * src/FtpNegotiateCommand.cc
  6425. (recvGreeting): Call disableWriteCheckSocket just after
  6426. socket->setBlockingMode(). This avoids unnecessary CPU-hog loop.
  6427. (recvRetr): Recognized status code 125 as a acceptable response code.
  6428. Rename Time.h to TimeA2.h to avoid compilation ploblem on
  6429. case-insesitive filesystem(BUG#1531057).
  6430. * src/Time.h: Renamed as TimeA2.h.
  6431. * src/Time.cc: Renamed as TimeA2.cc.
  6432. * src/TimeA2.h: New class.
  6433. * src/TimeA2.cc: New class.
  6434. * src/PeerChokeCommand.h: Replaced Time.h with TimeA2.h.
  6435. * src/TrackerWatcherCommand.h: Replaced Time.h with TimeA2.h.
  6436. * src/PeerAbstractCommand.h: Replaced Time.h with TimeA2.h.
  6437. * src/AbstractCommand.h: Replaced Time.h with TimeA2.h.
  6438. * src/PeerInteractionCommand.h: Replaced Time.h with TimeA2.h.
  6439. * src/ConsoleDownloadEngine.h: Replaced Time.h with TimeA2.h.
  6440. * src/TorrentAutoSaveCommand.h: Replaced Time.h with TimeA2.h.
  6441. * src/DownloadCommand.h: Replaced Time.h with TimeA2.h.
  6442. * src/TorrentMan.h: Replaced Time.h with TimeA2.h.
  6443. * src/TorrentDownloadEngine.h: Replaced Time.h with TimeA2.h.
  6444. * src/RequestSlot.h: Replaced Time.h with TimeA2.h.
  6445. * src/SleepCommand.h: Replaced Time.h with TimeA2.h.
  6446. * src/DownloadEngine.cc: Replaced Time.h with TimeA2.h.
  6447. * release 0.7.0
  6448. 2006-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6449. * src/PeerChokeCommand.h
  6450. (PeerChokeCommand): Rearranged the arguments.
  6451. * src/PeerChokeCommand.cc
  6452. (PeerChokeCommand): Rearranged the arguments.
  6453. * src/MetalinkEntry.h
  6454. (Checksum.h): Included.
  6455. (md5): Removed.
  6456. (sha1): Removed.
  6457. (checksum): New variable.
  6458. (operator=): Updated.
  6459. (check): Removed.
  6460. * src/prefs.h
  6461. (PREF_LOWEST_SPEED_LIMIT): New definition.
  6462. (PREF_FOLLOW_TORRENT): New definition.
  6463. (PREF_SELECT_FILE): New definition.
  6464. (PREF_FOLLOW_METALINK): New definition.
  6465. * src/MetalinkResource.h
  6466. (TYPE_HTTPS): Added to enum TYPE.
  6467. * src/TorrentMan.cc
  6468. (~TorrentMan): Rewritten.
  6469. * src/MultiDiskWriter.cc
  6470. (MultiDiskAdaptor): Updated according to the changes in
  6471. MessageDigestContext.
  6472. (~MultiDiskAdaptor): Updated according to the changes in
  6473. MessageDigestContext.
  6474. (hashUpdate): Updated according to the changes in MessageDigestContext.
  6475. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6476. * src/Util.h
  6477. (fileChecksum): Updated according to the changes in
  6478. MessageDigestContext.
  6479. * src/Util.cc
  6480. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6481. (fileChecksum): Updated according to the changes in
  6482. MessageDigestContext.
  6483. * src/messageDigest.h: Rewritten.
  6484. * src/MetalinkEntry.cc
  6485. (check): Removed.
  6486. (Supported): Updated.
  6487. (dropUnsupportedResource): Fixed a memory leak.
  6488. * src/ShaVisitor.cc
  6489. (ShaVisitor): Updated according to the changes in MessageDigestContext.
  6490. (~ShaVisitor): Updated according to the changes in
  6491. MessageDigestContext.
  6492. (visit): Updated according to the changes in MessageDigestContext.
  6493. * src/main.cc
  6494. (main): Rewritten the portion of download loop. --lowest-speed-limit
  6495. command-line option added.
  6496. * src/DownloadEngine.h
  6497. (SocketEntry): New class.
  6498. (SocketEntries): New definition.
  6499. (PairFind): Removed.
  6500. (SockCmdMap): Removed.
  6501. * src/DownloadEngine.cc
  6502. (DownloadEngine): Rewritten.
  6503. (~DownloadEngine): Rewritten.
  6504. (run): Renamed activeCommandUuids as activeUuids.
  6505. (SetDescriptor): Rewritten.
  6506. (AccumulateActiveCommandUuid): Removed.
  6507. (AccumulateActiveUuid): New function object.
  6508. (waitData): Rewritten.
  6509. (updateFdSet): Rewritten.
  6510. (addSocket): Rewritten.
  6511. (deleteSocket): Rewritten.
  6512. (addSocketForReadCheck): Rewritten.
  6513. (deleteSocketForReadCheck): Rewritten.
  6514. (addSocketForWriteCheck): Rewritten.
  6515. (deleteSocketForWriteCheck): Rewritten.
  6516. * src/Xml2MetalinkProcessor.cc
  6517. (getEntry): Rewritten the portion of MetalinkEntry creation.
  6518. * src/DownloadCommand.cc
  6519. (executeInternal): Added the check routine for lowest speed limit.
  6520. * src/AbstractDiskWriter.cc
  6521. (AbstractDiskWriter): Updated according to the changes in
  6522. MessageDigestContext.
  6523. (~AbstractDiskWriter): Updated according to the changes in
  6524. MessageDigestContext.
  6525. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6526. * src/RequestInfo.h: New class.
  6527. * src/UrlRequestInfo.h: New class.
  6528. * src/UrlRequestInfo.cc: New class.
  6529. * src/TorrentRequestInfo.h: New class.
  6530. * src/TorrentRequestInfo.cc: New class.
  6531. * src/MetalinkRequestInfo.h: New class.
  6532. * src/MetalinkRequestInfo.cc: New class.
  6533. * src/Checksum.h: New class.
  6534. * src/DownloadEngineFactory.h: New class.
  6535. * src/DownloadEngineFactory.cc: New class.
  6536. 2006-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6537. * src/Option.h
  6538. (getAsBool): New function.
  6539. * src/Option.cc
  6540. (prefs.h): Included.
  6541. (defined): 0-length value is now recognized as undefined.
  6542. (getAsInt): Rewritten.
  6543. (getAsLLInt): Rewritten.
  6544. (getAsBool): New function.
  6545. * src/FeatureConfig.h: Rewritten.
  6546. * src/FeatureConfig.cc: Rewritten.
  6547. * src/prefs.h
  6548. (PREF_STDOUT_LOG): New definition.
  6549. (PREF_LOG): New definition.
  6550. (PREF_DIR): New definition.
  6551. (PREF_OUT): New definition.
  6552. (PREF_SPLIT): New definition.
  6553. (PREF_DAEMON): New definition.
  6554. (PREF_REFERER): New definition.
  6555. (PREF_TORRENT_FILE): New definition.
  6556. (PREF_LISTEN_PORT): New definition.
  6557. (PREF_METALINK_FILE): New definition.
  6558. (PREF_METALINK_VERSION): New definition.
  6559. (PREF_METALINK_LANGUAGE): New definition.
  6560. (PREF_METALINK_OS): New definition.
  6561. (PREF_METALINK_SERVERS): New definition.
  6562. * src/main.cc
  6563. (main): Following command-line parameters are now put into Option
  6564. class: stdoutLog, logfile, dir, ufilename, split, daemonMode,
  6565. referer, torrentFile, metalinkFile, listenPort, metalinkVersion,
  6566. metalinkLanguage, metalinkOs, metalinkServers
  6567. To fix the bug that aria2 can not handle http response header properly.
  6568. * src/HttpHeader.cc
  6569. (put): Made name lowercased.
  6570. (defined): Made name lowercased.
  6571. (getFirst): Made name lowercased.
  6572. (get): Made name lowercased.
  6573. (getFirstAsInt): Rewritten.
  6574. (getFirstAsLLInt): Rewritten.
  6575. 2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6576. * src/TorrentMan.h:
  6577. (advertisePiece): Updated doc.
  6578. (getAdvertisedPieceIndexes): Updated doc.
  6579. (removeAdvertisedPiece); New function.
  6580. * src/TorrentMan.cc
  6581. (FindElapsedHave): New function object.
  6582. (removeAdvertisedPiece): New function.
  6583. * src/HaveEraseCommand.h: New class.
  6584. * src/HaveEraseCommand.cc: New class.
  6585. * src/FeatureConfig.h: New class.
  6586. * src/FeatureConfig.cc: New class.
  6587. * src/Request.h
  6588. (defaultPorts): Removed.
  6589. * src/Request.cc
  6590. (FeatureConfig.h): Included.
  6591. (Request): Removed the statements related to defaultPorts.
  6592. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead.
  6593. A default port number is now retrieved from FeatureConfig.
  6594. * src/main.cc
  6595. (HaveEraseCommand.h): Included.
  6596. (showVersion): Added the output of feature list.
  6597. (main): Added HaveEraseCommand to command queue in BitTorrent
  6598. downloading.
  6599. * src/PeerInteractionCommand.h
  6600. (chokeCheckPoint): Commented out.
  6601. (periodicExecPoint): New variable.
  6602. * src/PeerInteractionCommand.cc
  6603. (executeInternal): Following methods are now called in at least every
  6604. 0.5 seconds to reduce CPU usage:
  6605. detectMessageFlooding(), peerInteraction->checkRequestSlot(),
  6606. checkHave(), sendKeepAlive().
  6607. (checkLongTimePeerChoking): Commented out.
  6608. * src/BitfieldMan.h
  6609. (getNthBitIndex): Changed the method signature.
  6610. (getMissingIndexRandomly): Changed the method signature.
  6611. * src/BitfieldMan.cc
  6612. (getNthBitIndex): Rewritten
  6613. (getMissingIndexRandomly): Rewritten.
  6614. (hasMissingPiece): Rewritten.
  6615. (getMissingIndex): Refactored.
  6616. (getMissingUnusedIndex); Refactored.
  6617. (getMissingIndex): Refactored.
  6618. 2006-07-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6619. * src/PeerMessage.h
  6620. (Piece.h): Included.
  6621. (SharedHandle.h): Included.
  6622. (invalidate): New variable.
  6623. (uploading): New variable.
  6624. (isInvalidate): New function.
  6625. (isUploading): New function.
  6626. (onPush): New function.
  6627. (onChoked): New function.
  6628. (onCanceled): New function.
  6629. (onAbortPiece): New function.
  6630. (PeerMessageHandle): New type definition.
  6631. * src/PeerMessage.cc
  6632. (PeerMessage): Added the initialization for invalidate and uploading.
  6633. * src/CancelMessage.h
  6634. (CancelMessage): Rewritten.
  6635. * src/RejectMessage.h
  6636. (RejectMessage): Rewritten.
  6637. * src/Metalinker.h
  6638. (operator=): Defined.
  6639. * src/MetaEntry.h
  6640. (operator=): Defined.
  6641. * src/MetalinkResource.h
  6642. (operator=): Defined.
  6643. * src/AllowedFastMessage.h
  6644. (AllowedFastMessage): Rewritten.
  6645. * src/HandshakeMessage.h
  6646. (HandshakeMessage): New function(overload).
  6647. * src/HandshakeMessage.cc
  6648. (HandshakeMessage): Rewritten.
  6649. (init): New function.
  6650. * src/HaveMessage.h
  6651. (HaveMessage): Rewritten.
  6652. * src/Time.h
  6653. (operator=): Defined the function body here.
  6654. * src/Time.cc
  6655. (operator=): Removed.
  6656. * src/SocketCore.h
  6657. (operator==): Defined here.
  6658. (operator!=): Defined here.
  6659. (operator<): Defined here.
  6660. * src/SocketCore.cc
  6661. (operator==): Removed.
  6662. (operator<): Removed.
  6663. * src/BitfieldMan.h
  6664. (operator=): Defined the function body here.
  6665. * src/BitfieldMan.cc
  6666. (operator=): Removed.
  6667. * src/TorrentMan.h
  6668. (deleteErrorPeer): Removed.
  6669. (deleteUnusedPeer); New function.
  6670. * src/TorrentMan.cc
  6671. (addPeer): Call deleteUnusedPeer.
  6672. (deleteErrorPeer): Removed.
  6673. (deleteUnusedPeer): New function.
  6674. * src/PeerAbstractCommand.h
  6675. (setNoCheck): New function.
  6676. (noCheck): New variable.
  6677. * src/PeerAbstractCommand.cc
  6678. (PeerAbstractCommand): Added the initialization of noCheck.
  6679. (execute): Added a check for noCheck.
  6680. (setNoCheck): New function.
  6681. * src/Util.h
  6682. (stdio.h): Included.
  6683. * src/Util.cc
  6684. (unistd.h): Included.
  6685. * src/DefaultDiskWriter.cc
  6686. (unistd.h): Included.
  6687. * src/Peer.h
  6688. (operator==): Defined the function body here.
  6689. (operator!=): Defined the function body here.
  6690. * src/Peer.cc
  6691. (operator==): Removed.
  6692. (operator!=): Removed.
  6693. * src/Piece.h
  6694. (Piece): Defined the function body here(copy constructor).
  6695. (operator=): Defined the function body here.
  6696. (operator==): Defined the function body here.
  6697. * src/Piece.cc
  6698. (Piece): Removed(copy constructor).
  6699. (operator=): Removed.
  6700. (operator==): Removed.
  6701. * src/PeerMessageUtil.h
  6702. (ChokeMessage.h): Removed.
  6703. (UnchokeMessage.h): Removed.
  6704. (InterestedMessage.h): Removed.
  6705. (NotInterestedMessage.h): Removed.
  6706. (HaveMessage.h): Removed.
  6707. (BitfieldMessage.h): Removed.
  6708. (RequestMessage.h): Removed.
  6709. (CancelMessage.h): Removed.
  6710. (PieceMessage.h): Removed.
  6711. (HandshakeMessage.h): Removed.
  6712. (KeepAliveMessage.h): Removed.
  6713. (PortMessage.h): Removed.
  6714. (HaveAllMessage.h): Removed.
  6715. (HaveNoneMessage.h): Removed.
  6716. (PeerConnection.h): Removed.
  6717. (HandshakeMessage.h): Included.
  6718. * src/BitfieldMessage.h
  6719. (init): New function.
  6720. (BitfieldMessage): Rewritten.
  6721. (BitfieldMessage): New function(overload).
  6722. * src/RequestSlot.h
  6723. (operator=): Defined the function body here.
  6724. (operator==): Defined the function body here.
  6725. * src/RequestSlot.cc
  6726. (operator=): Removed.
  6727. (operator==): Removed.
  6728. To remove the dependency on the PeerMessage subclass from
  6729. PeerInteraction:
  6730. * src/PeerMessageFactory.h: New class.
  6731. * src/PeerMessageFactory.cc: New class.
  6732. * src/SimplePeerMessage.cc
  6733. (send): If invalidate is true then do nothing.
  6734. * src/PeerInteractionCommand.cc
  6735. (HandshakeMessage.h): Included.
  6736. (KeepAliveMessage.h): Included.
  6737. (ChokeMessage.h): Included.
  6738. (UnchokeMessage.h): Included.
  6739. (HaveMessage.h): Included.
  6740. (executeInternal): Call setNoCheck().
  6741. Removed setWriteCheckSocket(socket).
  6742. * src/PeerInteraction.h
  6743. (ChokeMessage.h): Removed.
  6744. (UnchokeMessage.h): Removed.
  6745. (InterestedMessage.h): Removed.
  6746. (NotInterestedMessage.h): Removed.
  6747. (HaveMessage.h): Removed.
  6748. (BitfieldMessage.h): Removed.
  6749. (RequestMessage.h): Removed.
  6750. (CancelMessage.h): Removed.
  6751. (PieceMessage.h): Removed.
  6752. (HandshakeMessage.h): Removed.
  6753. (KeepAliveMessage.h): Removed.
  6754. (PortMessage.h): Removed.
  6755. (HaveAllMessage.h): Removed.
  6756. (HaveNoneMessage.h): Removed.
  6757. (RejectMessage.h): Removed.
  6758. (AllowedFastMessage.h): Removed.
  6759. (SuggestPieceMessage.h): Removed.
  6760. (PeerMessageFactory.h): Included.
  6761. (PeerMessageHandle): Removed typedef of PeerMessageHandle.
  6762. (HandshakeMessageHandle): Removed typedef of HandshakeMessageHandle.
  6763. (PeerMessageFactory): New variable.
  6764. (createPeerMessage): Removed.
  6765. (createHandshakeMessage): Removed.
  6766. (setPeerMessageCommonProperty): Removed.
  6767. (addRequestSlot): New function.
  6768. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  6769. (getPeerMessageFactory): New function.
  6770. (createRequestMessage): Removed.
  6771. (createCancelMessage): Removed.
  6772. (createPieceMessage): Removed.
  6773. (createHaveMessage): Removed.
  6774. (createChokeMessage): Removed.
  6775. (createUnchokeMessage): Removed.
  6776. (createInterestedMessage): Removed.
  6777. (createNotInterestedMessage): Removed.
  6778. (createBitfieldMessage): Removed.
  6779. (createKeepAliveMessage): Removed.
  6780. (createHaveAllMessage): Removed.
  6781. (createHaveNoneMessage): Removed.
  6782. (createRejectMessage): Removed.
  6783. (createAllowedFastMessage): Removed.
  6784. * src/PeerInteraction.cc
  6785. (PeerInteraction): Allocate PeerMessageFactory here.
  6786. (~PeerInteraction): Deallocate PeerMessageFactory here.
  6787. (sendMessages): Use msg->isUploading() instead of msg->getId() ==
  6788. PieceMessage::ID.
  6789. (addMessage): Simplified by using PeerMessage::onPush().
  6790. (addRequestSlot): New function.
  6791. (rejectAllPieceMessageInQueue): Simplified by using
  6792. PeerMessage::onChoked().
  6793. (rejectPieceMessageInQueue): Simplified by using
  6794. PeerMessage::onCanceled().
  6795. (abortPiece): Simplified by using PeerMessage::abortPiece().
  6796. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  6797. (createHandshakeMessage): Removed.
  6798. (createPeerMessage): Removed.
  6799. (sendHandshake): Call PeerMessageFactory::createHandshakeMessage().
  6800. (setPeerMessageCommonProperty): Removed.
  6801. (createRequestMessage): Removed.
  6802. (createCancelMessage): Removed.
  6803. (createPieceMessage): Removed.
  6804. (createHaveMessage): Removed.
  6805. (createChokeMessage): Removed.
  6806. (createUnchokeMessage): Removed.
  6807. (createInterestedMessage): Removed.
  6808. (createNotInterestedMessage): Removed.
  6809. (createBitfieldMessage): Removed.
  6810. (createKeepAliveMessage): Removed.
  6811. (createHaveAllMessage): Removed.
  6812. (createHaveNoneMessage): Removed.
  6813. (createRejectMessage): Removed.
  6814. (createAllowedFastMessage): Removed.
  6815. * src/PieceMessage.h
  6816. (createRejectMessage): New function.
  6817. (PieceMessage): Rewritten.
  6818. (onChoked): New function.
  6819. (onCanceled): New function.
  6820. * src/PieceMessage.cc
  6821. (send): If invalidate is true then do nothing, just return.
  6822. (createRejectMessage): New function.
  6823. (onChoked): New function.
  6824. (onCanceled): New function.
  6825. * src/RequestMessage.h
  6826. (RequestMessage): Rewritten.
  6827. (onPush): New function.
  6828. (onAbortPiece): New function.
  6829. * src/RequestMessage.cc
  6830. (onPush): New function.
  6831. (onAbortPiece): New function.
  6832. Update fd_set when a socket is added or deleted in order to improve
  6833. performance:
  6834. * src/DownloadEngine.h
  6835. (rfdset): New variable.
  6836. (wfdset): New variable.
  6837. (updateFdSet): New function.
  6838. * src/DownloadEngine.cc
  6839. (SetDescriptor::operator()): Use SockCmdMap::value_type.
  6840. (AccumulateActiveCommandUuid::operator()): Use SockCmdMap::value_type.
  6841. (waitData): Copy rfdset and wfdset.
  6842. (updateFdSet): New function.
  6843. (addSocket): Call updateFdSet.
  6844. (deleteSocket): Call updateFdSet.
  6845. 2006-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6846. To add the support for Metalink3.0 backward compatible links:
  6847. * src/Request.h
  6848. (SAFE_CHARS): Added '#'.
  6849. (METALINK_MARK): New definition.
  6850. * src/Request.cc
  6851. (parseUrl): Added the support for Metalink3.0 backward compatible
  6852. links.
  6853. etc
  6854. * src/PeerInteraction.cc
  6855. (MsgPushBack): Removed.
  6856. (sendMessages): Use STL copy and back_inserter.
  6857. (rejectAllPieceMessageInQueue): Use STL copy and back_inserter.
  6858. (rejectPieceMessageInQueue): Use STL copy and back_inserter.
  6859. * src/TorrentMan.h
  6860. (MAX_PEER_LIST_SIZE): Changed to 100 from 250.
  6861. 2006-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6862. * src/SharedHandle.h: New class.
  6863. To wrap Socket, Command, PeerMessage and Peer with SharedHandle:
  6864. * src/HttpResponseCommand.h
  6865. (HttpResponseCommand): Wrapped Socket.
  6866. * src/SocketCore.h
  6867. (operator==): New function.
  6868. (operator!=): New function.
  6869. (operator<): New function.
  6870. (getSockfd): New function.
  6871. (isOpen): New function.
  6872. (writeData): New function.
  6873. * src/SocketCore.cc
  6874. (operator==): New function.
  6875. (operator!=): New function.
  6876. (operator<): New function.
  6877. * src/AbstractCommand.h
  6878. (socket): Changed its type to SocketHandle.
  6879. (setReadCheckSocket): Replaced Socket with SocketHandle.
  6880. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  6881. (disableReadCheckSocket): New function.
  6882. (disableWriteCheckSocket): New function.
  6883. (readCheckTarget): Changed its type to SocketHandle.
  6884. (writeCheckTarget): Changed its type to SocketHandle.
  6885. (AbstractCommand): Replaced Socket with SocketHandle.
  6886. * src/AbstractCommand.cc
  6887. (AbstractCommand): Replaced Socket with SocketHandle.
  6888. (~AbstractCommand): Removed the deallocation for Socket object.
  6889. (disableReadCheckSocket): New function.
  6890. (setReadCheckSocket): Replaced Socket with SocketHandle.
  6891. (disableWriteCheckSocket): New function.
  6892. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  6893. * src/HttpDownloadCommand.cc
  6894. (DownloadCommand): Replaced Socket with SocketHandle.
  6895. * src/PeerAbstractCommand.h
  6896. (socket): Changed its type to SocketHandle.
  6897. (peer): Changed its type to PeerHandle.
  6898. (setReadCheckSocket): Replaced Socket with SocketHandle.
  6899. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  6900. (disableReadCheckSocket): New function.
  6901. (disableWriteCheckSocket): New function.
  6902. (readCheckTarget): Changed its type to SocketHandle.
  6903. (writeCheckTarget): Changed its type to SocketHandle.
  6904. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  6905. Replaced Peer with PeerHandle.
  6906. * src/HttpRequestCommand.cc
  6907. (HttpRequestCommand): Replaced Socket with SocketHandle.
  6908. Use disableReadCheckSocket.
  6909. * src/PeerInitiateConnectionCommand.h
  6910. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  6911. * src/PeerChokeCommand.cc
  6912. (UploadFaster::operator()): Replaced Peer with PeerHandle.
  6913. (DownloadFaster::operator()): Replaced Peer with PeerHandle.
  6914. (execute): Use PeerHandle.
  6915. * src/PeerConnection.h
  6916. (HandshakeMessage.h): Removed include of HandshakeMessage.h.
  6917. (socket): Changed its type to SocketHandle.
  6918. (PeerConnection): Replaced Socket with SocketHandle.
  6919. * src/PeerConnection.cc
  6920. (PeerConnection): Replaced Socket with SocketHandle.
  6921. * src/PeerInteractionCommand.h
  6922. (PeerInteractionCommand): Replaced socket with SocketHandle.
  6923. Replaced Peer with PeerHandle.
  6924. * src/PeerInteractionCommand.cc
  6925. (PeerInteractionCommand): Replaced Socket with SocketHandle.
  6926. Replaced Peer with PeerHandle.
  6927. (executeInternal): Use disableWriteCheckSocket.
  6928. Use HandshakeMessageHandle.
  6929. (receiveMessages): Use PeerMessageHandle.
  6930. (prepareForNextPeer): Use PeerHandle.
  6931. * src/HttpProxyRequestCommand.h
  6932. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  6933. * src/HttpResponseCommand.cc
  6934. (HttpResponseCommand): Replaced Socket with SocketHandle.
  6935. * src/TorrentMan.cc
  6936. (nullPeer): Added external reference.
  6937. (~TorrentMan): Removed the deallocation of the elements of peers.
  6938. (addPeer): Rewritten.
  6939. (isPeerAvailable): Use nullPeer.
  6940. (deleteOldpeers): Replaced with deleteErrorPeer.
  6941. (deleteErrorPeer): New function.
  6942. (getPeer): Use PeerHandle and nullPeer.
  6943. (hasMissingPiece): Replaced Peer with PeerHandle.
  6944. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  6945. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  6946. (getMissingFastPiece): Replaced Peer with PeerHandle.
  6947. (getMissingPiece): Replaced Peer with PeerHandle.
  6948. * src/FtpNegotiateCommand.cc
  6949. (FtpNegotiationCommand): Replaced Peer with PeerHandle.
  6950. (~FtpNegotiationCommand): Removed the deallocation of Sockets.
  6951. (recvGreeting): Use disableWriteCheckSocket.
  6952. (recvPasv): Removed the allocation of Socket.
  6953. Use disableReadCheckSocket.
  6954. (sendRestPasv): Use disableWriteCheckSocket.
  6955. (recvRetr): Changed assertion.
  6956. * src/PeerInteraction.h
  6957. (SharedHandle.h): Included SharedHandle.h.
  6958. (PeerMessageHandle): New type definition.
  6959. (HandshakeMessageHandle): New type definition.
  6960. (MessageQueue): Changed. Now its element is of type PeerMessageHandle.
  6961. (peer): Changed its type to PeerHandle.
  6962. (createHandshakeMessage): Replaced HandshakeMessage with
  6963. HandshakeMessageHandle.
  6964. (createPeerMessage): Replaced PeerMessageHandle with PeerMessage.
  6965. (PeerInteraction): Replaced Peer with PeerHandle.
  6966. Replaced Socket with SocketHandle.
  6967. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  6968. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  6969. (receiveHandshake): Replaced HandshakeMessage with
  6970. HandshakeMessageHandle.
  6971. * src/PeerInteraction.cc
  6972. (PeerInteraction): Replaced Peer with PeerHandle.
  6973. Replaced Socket with SocketHandle.
  6974. (~PeerInteraction): Removed the deallocation of the elements of
  6975. messageQueue.
  6976. (MsgPushBack::operator()): Replaced PeerMessage with PeerMessageHandle.
  6977. (isSendingMessageInProgress): Replaced PeerMessage with
  6978. PeerMessageHandle.
  6979. (sendMessages): Use PeerMessageHandle. Removed try-catch block.
  6980. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  6981. (rejectAllPieceMessageInQueue): Use PeerMessageHandle.
  6982. (rejectPieceMessageInQueue): Use PeerMessageHandle.
  6983. (abortPiece): Use PeerMessageHandle.
  6984. (receiveHandshake): Replaced HandshakeMessage with
  6985. HandshakeMessageHandle. Removed try-catch block.
  6986. (createHandshakeMessage): Replaced HandshakeMessage with
  6987. HandshakeMessageHandle.
  6988. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  6989. Removed try-catch block.
  6990. (createPeerMessage): Replaced PeerMessage with PeerMessageHandle.
  6991. * src/HttpProxyResponseCommand.cc
  6992. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  6993. * src/FtpTunnelResponseCommand.h
  6994. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  6995. * src/HttpConnection.cc
  6996. (HttpConnection): Replaced Socket with SocketHandle.
  6997. * src/PeerAbstractCommand.cc
  6998. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  6999. (~PeerAbstractCommand): Removed the deallocation of socket.
  7000. Use disableReadCheckSocket, disableWriteCheckSocket.
  7001. (disableReadCheckSocket): New function.
  7002. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7003. (disableWriteCheckSocket): New function.
  7004. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7005. * src/InitiateConnectionCommandFactory.h: Corrected indentation.
  7006. * src/FtpTunnelRequestCommand.cc
  7007. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7008. (~FtpTunnelRequestCommand): Corrected indentation.
  7009. * src/DownloadCommand.h
  7010. (DownloadCommand): Replaced Socket with SocketHandle.
  7011. * src/PeerListenCommand.cc
  7012. (PeerListenCommand): Removed the initialization of socket.
  7013. (~PeerListenCommand): Removed the deallocation of socket.
  7014. (bindPort): Use SocketHandle.
  7015. (execute): Use SocketHandle and PeerHandle.
  7016. * src/FtpDowndloadCommand.cc
  7017. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7018. (~FtpDownloadCommand): Removed the deallocation of ctrlSocket.
  7019. * src/main.cc
  7020. (main): Corrected indentation.
  7021. * src/HttpInitiateConnectionCommand.cc
  7022. (HttpInitiateConnectionCommand): Replaced Socket with SocketHandle.
  7023. (executeInternal): Removed the allocation of socket.
  7024. * src/HttpRequestCommand.h
  7025. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7026. * src/FtpNegotiationCommand.h
  7027. (dataSocket): Changed its type to SocketHandle.
  7028. (serverSocket): Changed its type to SocketHandle.
  7029. (FtpNegotiationCommand): Replaced Socket with SocketHandle.
  7030. * src/TorrentMan.h
  7031. (MAX_PEER_UPDATE): Removed.
  7032. (MAX_PEERS): New definition.
  7033. (Peers): The element is now of type PeerHandle.
  7034. (addPeer): Replaced Peer with PeerHandle. Removed 'duplicate' argument.
  7035. (getPeer): Replaced Peer with PeerHandle.
  7036. (deleteOldErrorPeers): Removed.
  7037. (deleteErrorPeer): New function.
  7038. (hasMissingPiece): Replaced Peer with PeerHandle.
  7039. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7040. (getMissingPiece): Replaced Peer with PeerHandle.
  7041. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7042. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7043. (addActivePeer): Replaced Peer with PeerHandle.
  7044. (deleteActivePeer): Replaced Peer with PeerHandle.
  7045. Added a check for the return value of find.
  7046. * src/FtpTunnelResponseCommand.cc
  7047. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7048. * src/FtpInitiateConnectionCommand.cc
  7049. (executeInternal): Removed the allocation of socket.
  7050. * src/DownloadEngine.h
  7051. (Sockets): An element is now of type SocketHandle.
  7052. (SockCmdMap): A key is of type SocketHandle, a value is of type int.
  7053. (CommandUuids): New type definition.
  7054. (rsockets): Changed its type to SockCmdMap.
  7055. (wsockets): Changed its type to SockCmdMap.
  7056. (addSocket): Rewritten.
  7057. (deleteSocket): Rewritten.
  7058. (addSocketForReadCheck): Rewritten.
  7059. (deleteSocketForReadCheck): Rewritten.
  7060. (addSocketForWriteCheck): Rewritten.
  7061. (deleteSocketForWriteCheck): Rewritten.
  7062. (PairFind): New template class.
  7063. * src/HttpDownloadCommand.h
  7064. (HttpDownloadCommand): Replaced Socket with SocketHandle.
  7065. * src/FtpConnection.cc
  7066. (FtpConnection): Replaced Socket with SocketHandle.
  7067. (sendPort): Removed the allocation of serverSocket. Removed try-catch
  7068. block.
  7069. * src/InitiateConnectionCommandFactory.cc
  7070. (DlAbortEx.h): Included DlAbortEx.h.
  7071. (createInitiateConnectionCommand): Throw exception if the protocol of
  7072. requested URI is not supported.
  7073. * src/Peer.cc
  7074. (nullPeer): Changed its type to PeerHandle.
  7075. (operator==): New function.
  7076. (operator!=): New function.
  7077. * src/Peer.h
  7078. (SharedHandle.h): Included SharedHandle.h.
  7079. (operator==): New function.
  7080. (operator!=): New function.
  7081. (Peer): Added the default constructor.
  7082. Use resetStatus() to initialize member variables.
  7083. (nullPeer): Removed.
  7084. * src/TrackerUpdateCommand.cc
  7085. (execute): Brushed up using SharedHandle. Replaced MAX_PEER_UPDATE
  7086. with MIN_PEERS.
  7087. * src/PeerListenCommand.h
  7088. (socket): Changed its type to SocketHandle.
  7089. * src/Command.h
  7090. (CommandUuid): New type definition.
  7091. (uuid): New variable.
  7092. (uuidGen): New variable.
  7093. (Command): Added the initialization of uuid.
  7094. (getUuid): New function.
  7095. * src/Socket.h
  7096. (Socket): Removed.
  7097. (SocketHandle): New type definition.
  7098. * src/DownloadEngine.h
  7099. (FindCommand): New function object.
  7100. (run): The portion of socket check was rewritten.
  7101. (SetDescriptor): New function object.
  7102. (AccumulateActiveCommandUuid): New function object.
  7103. (waitData): Rewritten.
  7104. (addSocket): Rewritten.
  7105. (deleteSocket): Rewritten.
  7106. (addSocketForReadCheck): Rewritten.
  7107. (addSocketForWriteCheck): Rewritten.
  7108. (deleteSocketForReadCheck): Rewritten.
  7109. (deleteSocketForWriteCheck): Rewritten.
  7110. * src/HttpProxyResponseCommand.h
  7111. (HttpProxyResponseCommand): Replaced Socket with SocketHandle.
  7112. * src/HttpConnection.h
  7113. (socket): Changed its type to SocketHandle.
  7114. (HttpConnection): Replaced Socket with SocketHandle.
  7115. * src/PeerInitiateConnectionCommand.cc
  7116. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7117. (executeInternal): Removed the allocation of socket.
  7118. (prepareForNextPeer): Use PeerHandle.
  7119. * src/PeerMessage.h
  7120. (peer): Changed its type to PeerHandle.
  7121. (getPeer): Replaced Peer with PeerHandle.
  7122. (setPeer): Replaced Peer with PeerHandle.
  7123. * src/DownloadCommand.cc
  7124. (DownloadCommand): Replaced Socket with SocketHandle.
  7125. * src/FtpConnection.h
  7126. (socket): Changed its type to SocketHandle.
  7127. (FtpConnection): Replaced Socket with SocketHandle.
  7128. (sendPort); Replaced Socket with SocketHandle.
  7129. * src/FtpDowndloadCommand.h
  7130. (ctrlSocket): Changed its type to SocketHandle.
  7131. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7132. * src/HttpProxyRequestCommand.cc
  7133. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7134. * src/FtpTunnelRequestCommand.h
  7135. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7136. etc
  7137. * src/PeerChokeCommand.h
  7138. (setAllPeerChoked): Removed.
  7139. (setAllPeerResetDelta): Removed.
  7140. * src/PeerChokeCommand.cc
  7141. (setAllPeerChoked): Removed.
  7142. (ChokePeer): New function object.
  7143. (setAllPeerResetDelta): Removed.
  7144. (ResetDelta): New function object.
  7145. (orderByDownloadRate): Fixed a bug: use DowloadFaster, not UploadFaster
  7146. (execute): Show download speed when the local node is a seeder.
  7147. setAllPeerChoked and setAllPeerResetDelta were rewritten
  7148. using STL.
  7149. * src/TrackerWatcherCommand.h
  7150. (MIN_PEERS): Removed.
  7151. * src/TorrentMan.cc
  7152. (getPeer): Replaced MAX_PEER_UPDATE with MIN_PEERS.
  7153. 2006-07-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7154. To fix the bug that .aria2 file is not saved if downloading is stopped
  7155. by the errors:it results that aria2 can not resume downloading:
  7156. * src/main.cc
  7157. (normalDownload): Added the call to save().
  7158. (main): Added the deletion of the elements in 'reserved'.
  7159. To fix log:
  7160. * src/PeerInteraction.cc
  7161. (receiveHandshake): Fixed log.
  7162. 2006-07-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7163. To improve download performance in BitTorrent:
  7164. * src/TorrentMan.cc
  7165. (getPeer): Check the number of connections. Return nullPeer if
  7166. it is greater than MAX_PEER_UPDATE.
  7167. This code was originally here, but was removed in 0.5.1.
  7168. 2006-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7169. To improve the conditional compilation:
  7170. * src/MultiDiskWriter.h:
  7171. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7172. * src/MultiDiskWriter.cc:
  7173. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7174. * src/Util.h:
  7175. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7176. Added ENABLE_BITTORRENT around computeFastSet().
  7177. * src/Util.cc:
  7178. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7179. Added ENABLE_BITTORRENT around computeFastSet().
  7180. * src/messageDigest.h:
  7181. Replaced ENABLE_BITTORRENT with ENABLE_SSL.
  7182. * src/ShaVisitor.h:
  7183. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7184. * src/ShaVisitor.cc:
  7185. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7186. * src/main.cc:
  7187. Added ENABLE_BITTORRENT around includes and blocks related to
  7188. BitTorrent.
  7189. Added ENABLE_MESSAGE_DIGEST to skip checksum checking when the message
  7190. digest support is not available.
  7191. * src/AbstractDiskWriter.h:
  7192. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7193. * src/AbstractDiskWriter.cc:
  7194. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7195. * src/MetalinkEntry.cc
  7196. (check): Added ENABLE_MESSAGE_DIGEST. Return true if the message digest
  7197. support is not available.
  7198. To add command-line options for Metalink:
  7199. * src/main.cc:
  7200. Added metalink-version, metalink-language, metalink-os,
  7201. follow-metalink.
  7202. To use EXIT_SUCCESS and EXIT_FAILURE with exit():
  7203. * src/main.cc: Use these definition.
  7204. * Release 0.6.0
  7205. 2006-07-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7206. To add Metalink support(http/ftp only):
  7207. * src/AbstractCommand.h
  7208. (tryReserved): New function.
  7209. * src/AbstractCommand.cc
  7210. (execute): Call tryReserved().
  7211. (tryReserved): New function.
  7212. * src/Request.h
  7213. (Requests): New type definition.
  7214. * src/SegmentMan.h
  7215. (reserved): New variable.
  7216. * src/Util.h
  7217. (fileChecksum): New function.
  7218. (toUpper): New function.
  7219. (toLower): New function.
  7220. * src/Util.cc
  7221. (messageDigest.h): Included.
  7222. (trim): Trim \r\n\t.
  7223. (fileChecksum): New function.
  7224. (toUpper): New function.
  7225. (toLower): New function.
  7226. * src/main.cc
  7227. (normalDownload): New function.
  7228. (main): Added 2 command-line options: metalink-file,
  7229. metalink-connection. Their usage has not been written yet.
  7230. * src/MetalinkProcessor.h: New class.
  7231. * src/Xml2MetalinkProcessor.h: New class.
  7232. * src/Xml2MetalinkProcessor.cc: New class.
  7233. * src/MetalinkEntry.h: New class.
  7234. * src/MetalinkEntry.cc: New class.
  7235. * src/MetalinkResource.h: New class.
  7236. * src/MetalinkResource.cc: New class.
  7237. To add md5 message digest checking:
  7238. * src/messageDigest.h: Rewritten.
  7239. * src/MultiDiskWriter.cc: Updated according to the changes in
  7240. messageDigest.h.
  7241. * src/ShaVisitor.cc: Updated according to the changes in
  7242. messageDigest.h.
  7243. * src/Util.cc: Updated according to the changes in messageDigest.h.
  7244. * src/AbstractDiskWriter.cc: Updated according to the changes in
  7245. messageDigest.h.
  7246. To fix a bug that causes segfault when the payload length in peer
  7247. message is less than 0:
  7248. * src/PeerConnection.cc:
  7249. (receiveMessage): Fixed the bug.
  7250. * src/PeerMessageUtil.cc
  7251. (checkLength): Throw an exception if length is less than or equals to
  7252. 0.
  7253. To add new interfaces to Base64 encoding/decoding:
  7254. * src/Base64.h
  7255. (part_encode): Changed the method signature.
  7256. (encode): New function(overload).
  7257. (decode): New function(overload).
  7258. * src/Base64.cc
  7259. (part_encode): Rewritten.
  7260. (encode): Rewritten.
  7261. (encode): New function(overload).
  7262. To prevent a peer to download same piece if there is an error in
  7263. checksum:
  7264. * src/PieceMessage.cc
  7265. (receivedAction): Call peerInteraction->abortPiece().
  7266. 2006-06-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7267. To fix the bug that causes same have message is sent many times to
  7268. a single peer.
  7269. * src/Time.cc
  7270. (isNewer): Use Util::difftv().
  7271. * src/Util.cc
  7272. (difftv): Added a cast to (long long int).
  7273. * src/TorrentMan.cc
  7274. (advertisePiece): Use push_front.
  7275. (getAdvertisedPieceIndexes): A performance improvement was made.
  7276. To fix the bug that sends tracker requests without a sleep interval
  7277. when the number of connections is less than 15.
  7278. * src/TrackerWatcherCommand.cc
  7279. (execute): Now the number of connections is not a factor to decide
  7280. whether or not a tracker request should be sent or not.
  7281. * src/Time.h
  7282. (setTimeInSec): New function.
  7283. * src/Time.cc
  7284. (setTimeInSec): New function.
  7285. etc.
  7286. * src/ChokeMessage.cc
  7287. (receivedAction): Removed peer->snubbing = false
  7288. * src/PeerConnection.h
  7289. (receiveHandshake): Updated doc.
  7290. * src/TorrentMan.h
  7291. (getAdvertisedPieceIndexes): Updated the method signature.
  7292. * src/TorrentMan.cc
  7293. (getAdvertisedPieceIndexes): Updated the method signature.
  7294. * src/Time.h
  7295. (getTimeInMicros): Added a cast to (long long int).
  7296. (getTimeInMillis): Added a cast to (long long int).
  7297. * Release 0.5.2
  7298. 2006-06-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7299. To make a listening socket non-block:
  7300. * src/SocketCore.h
  7301. (setNonBlockingMode): New function.
  7302. * src/SocketCore.cc
  7303. (setNonBlockingMode): New function.
  7304. (beginListen): Added a call to setNonBlockingMode().
  7305. (acceptConnection): Call setNonBlockingMode().
  7306. (setBlockingMode): Updated.
  7307. To handle tracker's NAT-checking:
  7308. * src/PeerConnection.cc
  7309. (receiveHandshake): 'msg' param is filled with received data and
  7310. its length is assigned to 'length' param, even if all handshake
  7311. message is not yet received.
  7312. * src/PeerInteractionCommand.cc
  7313. (executeInternal): Use peerInteraction->receiveHandshake(true) when
  7314. a new peer connects to localhost.
  7315. A call to peerInteraction->sendHandshake() was removed because
  7316. it is called from peerInteraction->receiveHandshake(true).
  7317. * src/PeerInteraction.h
  7318. (quickReplied): New variable.
  7319. (receiveHandshake): Added an argument.
  7320. * src/PeerInteraction.cc
  7321. (PeerInteraction): Added the initialization of quickReplied.
  7322. (receiveHandshake): Send handshake message as soon as the info hash
  7323. in a handshake message from a peer is correct.
  7324. To change the random part of peer id and key parameter:
  7325. * src/TorrentMan.h
  7326. (key): New variable.
  7327. * src/TorrentMan.cc
  7328. (setupInternal1): Use Util::randomAlpha() to generate random part
  7329. of peer id, which is now "-aria2-"+13 alphabet characters([A-Za-z]).
  7330. key is also generated by Util::randomAlpha() and it is now 8 character
  7331. long.
  7332. * src/Util.h
  7333. (randomAlpha): New function.
  7334. * src/Util.cc
  7335. (randomAlpha): New function.
  7336. * src/TrackerWatcherCommand.cc
  7337. (execute): In a tracker request: Use torrentMan->key as key parameter.
  7338. Added no_peer_id=1.
  7339. Set snubbing flag to false when a choke message is received from a
  7340. snubbed peer.
  7341. * src/ChokeMessage.cc
  7342. (receivedAction): Set snubbing flag to false.
  7343. 2006-06-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7344. * src/TorrentMan.cc (setupInternal1): Fixed peerId generation bug.
  7345. * src/SimpleLogger.h (writeHeader): New function.
  7346. * src/SimpleLogger.cc (writeHeader): New function.
  7347. (writeLog): Fixed the bug that causes segfaults if exception message
  7348. contains an unescaped "%" character.
  7349. * src/TrackerWatcherCommand.cc (execute): Added a short sleep
  7350. when a tracker request fails.
  7351. * src/Request.cc (parseUrl): Query string is now handled properly.
  7352. * Release 0.5.1
  7353. 2006-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7354. To add Time class which represents a specific instant in time and
  7355. its precision is microseconds. Time checking procedures were rewritten
  7356. using this object.
  7357. * src/Time.h: New class.
  7358. * src/Time.cc: New class.
  7359. * src/AbstractCommand.h
  7360. (updateCheckPoint): Removed.
  7361. (isTimeoutDetected): Removed.
  7362. (checkPoint): Changed the type to Time.
  7363. (timeout): New variable.
  7364. (setTimeout): New function.
  7365. * src/AbstractCommand.cc
  7366. (AbstractCommand): Removed the initialization of checkPoint.
  7367. Added the initialization of timeout.
  7368. (updateCheckPoint): Removed.
  7369. (isTimeoutDetected): Removed.
  7370. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  7371. * src/PeerChokeCommand.h
  7372. (checkPoint): Changed the type to Time.
  7373. * src/PeerChokeCommand.cc
  7374. (PeerChokeCommand): Removed the initialization of checkPoint.
  7375. (execute): Rewritten using Time object.
  7376. * src/TrackerWatcherCommand.h
  7377. (checkPoint): Changed the type to Time.
  7378. * src/TrackerWatcherCommand.cc
  7379. (TrackerWatcherCommand): Removed the initialization of checkPoint.
  7380. (execute): Rewritten.
  7381. * src/ConsoleDownloadEngine.h
  7382. (cp): Changed the type to Time.
  7383. (startup): Changed the type to Time.
  7384. * src/ConsoleDownloadEngine.cc
  7385. (initStatistics): Use cp.reset(), startup.reset().
  7386. (calculateStatistics): Rewritten using Time object.
  7387. * src/PeerAbstractCommand.h
  7388. (updateCheckPoint): Removed.
  7389. (isTimeoutDetected): Removed.
  7390. (checkPoint): Changed the type to Time.
  7391. * src/PeerAbstractCommand.cc
  7392. (PeerAbstractCommand): Removed the initialization of checkPoint.
  7393. (updateCheckPoint): Removed.
  7394. (isTimeoutDetected): Removed.
  7395. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  7396. * src/PeerInteractionCommand.cc
  7397. (PeerInteractionCommand): Removed the initializations of struct
  7398. timeval variables.
  7399. * src/PeerInteractionCommand.h
  7400. (keepAliveCheckPoint): Changed the type to Time.
  7401. (chokeCheckPoint): Changed the type to Time.
  7402. (freqCheckPoint): Changed the type to Time.
  7403. (haveCheckTime): Changed the type to Time.
  7404. * src/PeerInteractionCommand.cc
  7405. (executeInternal): Rewritten using Time object.
  7406. (detectMessageFlooding): Rewritten using Time object.
  7407. (checkLongTimePeerChoking): Rewritten using Time object.
  7408. (sendKeepAlive): Rewritten using Time object.
  7409. (checkHave): Rewritten using Time object.
  7410. * src/SleepCommand.h
  7411. (checkPoint): Changed the type to Time.
  7412. * src/SleepCommand.cc
  7413. (SleepCommand): Removed the initialization of checkPoint.
  7414. (execute): Rewritten using Time object.
  7415. * src/TorrentAutoSaveCommand.h
  7416. (checkPoint): Changed the type to Time.
  7417. * src/TorrentAutoSaveCommand.cc
  7418. (TorrentAutoSaveCommand): Removed the initialization of checkPoint.
  7419. (execute): Rewritten.
  7420. * src/DownloadCommand.h
  7421. (sw): Changed the type to Time.
  7422. * src/DownloadCommand.cc
  7423. (DownloadCommand): Removed the initialization of sw.
  7424. (executeInternal): Rewritten.
  7425. * src/RequestSlot.h
  7426. (dispatchedTime): Changed the type to Time.
  7427. * src/RequestSlot.cc
  7428. (RequestSlot): Removed the call to setDispatchedTime().
  7429. (setDispatchedTime): Rewirtten.
  7430. (isTimeout): Rewritten.
  7431. (getLatencyInMillis): Rewritten.
  7432. * src/TorrentDownloadEngine.h
  7433. (cp): Changed the type to Time[2].
  7434. (startup): Changed the type to Time.
  7435. * src/TorrentDownloadEngine.cc
  7436. (initStatistics): Rewritten.
  7437. (calculateStatistics): Rewritten.
  7438. * src/DownloadEngine.cc
  7439. (run): Rewritten.
  7440. To detect all attempts to connect to the tracker are failed:
  7441. * src/AbstractCommand.cc
  7442. (execute): Increment e->segmentMan->errors if a command aborted.
  7443. * src/SegmentMan.h
  7444. (errors): New variable.
  7445. * src/SegmentMan.cc
  7446. (SegmentMan): Added the initialization of errors.
  7447. (init): Added the initialization of errors.
  7448. * src/TrackerWatcherCommand.cc
  7449. (execute): If e->segmentMan->errors > 0 then assume that the tracker
  7450. request was failed.
  7451. To handle snubbed peers:
  7452. * src/PeerChokeCommand.cc
  7453. (optUnchokingPeer): Snubbed peers don't get unchoked.
  7454. (execute): Snubbed peers don't get unchoked.
  7455. * src/PeerInteraction.h
  7456. (REQUEST_TIME_OUT): Changed the value from 120 to 60.
  7457. * src/PeerInteraction.cc
  7458. (checkRequestSlot): A peer get marked as "snubbed" if it doesn't send
  7459. back the requested 16k block in 60 seconds.
  7460. * src/PieceMessage.cc
  7461. (receivedAction): A peer's snubbed state is cleard if it sends
  7462. the requested 16k block in 60 seconds.
  7463. * src/Peer.h
  7464. (snubbing): New variable.
  7465. * src/Peer.cc
  7466. (resetStatus): Added snubbed = false.
  7467. To fix the bug that causes have message is not sent:
  7468. * src/PeerInteractionCommand.cc
  7469. (~PeerInteractionCommand): Removed e->torrentMan->unadvertisePiece().
  7470. (FLOODING_CHECK_INTERVAL): New definition(temporal).
  7471. (detectMessageFlooding): Use FLOODING_CHECK_INTERVAL.
  7472. * src/TorrentMan.h
  7473. (HaveEntry): New class.
  7474. (advertisePiece): Rewritten.
  7475. (getAdvertisedPieceIndexes): Rewritten.
  7476. (Haves): Changed the type.
  7477. (getAdvertisedPieceIndexes): Added an argument.
  7478. Others:
  7479. * src/TorrentMan.h
  7480. (DEFAULT_ANNOUNCE_INTERVAL): Changed the value to 1800.
  7481. (DEFAULT_ANNOUNCE_MIN_INTERVAL): Changed the value to 1800.
  7482. * src/TorrentMan.cc
  7483. (getPeer): Don't check the number of connections here.
  7484. (setupInternal1): Changed peerId.
  7485. * src/PeerInteractionCommand.h
  7486. (KEEP_ALIVE_INTERVAL): New definition.
  7487. (sendKeepAlive): Use KEEP_ALIVE_INTERVAL.
  7488. * src/main.cc
  7489. (main): SA_ONESHOT was replaced with SA_RESETHAND.
  7490. * src/DownloadEngine.h: Removed unnecessary header includes.
  7491. 2006-05-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7492. To fix the bug that causes segfaults if a tracker returns a zero-length
  7493. list as "peers":
  7494. * src/TrackerUpdateCommand.cc
  7495. (execute): Added a check to see wether the type of peers is Data*.
  7496. 2006-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7497. * Release 0.5.0
  7498. To fix compile issue with gcc3:
  7499. * src/CancelMessage.h
  7500. (ID): Renamed as ID_t
  7501. (ID_t): New enum.
  7502. * src/RejectMessage.h
  7503. (ID): Renamed as ID_t
  7504. (ID_t): New enum.
  7505. * src/SuggestPieceMessage.h
  7506. (ID): Renamed as ID_t
  7507. (ID_t): New enum.
  7508. * src/AllowedFastMessage.h
  7509. (ID): Renamed as ID_t
  7510. (ID_t): New enum.
  7511. * src/PortMessage.h
  7512. (ID): Renamed as ID_t
  7513. (ID_t): New enum.
  7514. * src/HaveNoneMessage.h
  7515. (ID): Renamed as ID_t
  7516. (ID_t): New enum.
  7517. * src/KeepAliveMessage.h
  7518. (ID): Renamed as ID_t
  7519. (ID_t): New enum.
  7520. * src/HaveAllMessage.h
  7521. (ID): Renamed as ID_t
  7522. (ID_t): New enum.
  7523. * src/UnchokeMessage.h
  7524. (ID): Renamed as ID_t
  7525. (ID_t): New enum.
  7526. * src/BitfieldMessage.h
  7527. (ID): Renamed as ID_t
  7528. (ID_t): New enum.
  7529. * src/PieceMessage.h
  7530. (ID): Renamed as ID_t
  7531. (ID_t): New enum.
  7532. * src/RequestMessage.h
  7533. (ID): Renamed as ID_t
  7534. (ID_t): New enum.
  7535. * src/NotInterestedMessage.h
  7536. (ID): Renamed as ID_t
  7537. (ID_t): New enum.
  7538. * src/ChokeMessage.h
  7539. (ID): Renamed as ID_t
  7540. (ID_t): New enum.
  7541. * src/InterestedMessage.h
  7542. (ID): Renamed as ID_t
  7543. (ID_t): New enum.
  7544. * src/HaveMessage.h
  7545. (ID): Renamed as ID_t
  7546. (ID_t): New enum.
  7547. 2006-05-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7548. * src/PeerAbstractCommand.h
  7549. (beforeSocketCheck): Removed.
  7550. * src/PeerAbstractCommand.cc
  7551. Modified in order to call executeInternal() even if socket check
  7552. and upload limit check fail.
  7553. * src/PeerInteractionCommand.h
  7554. (keepAlive): Removed.
  7555. (sendKeepAlive): New function.
  7556. (checkHave): New function.
  7557. (beforeSocketCheck): Removed.
  7558. * src/PeerInteractionCommand.cc
  7559. (executeInternal): Use peerInteraction->checkRequestSlot(). Added
  7560. calls to checkHave() and sendKeepAlive().
  7561. (keepAlive): Renamed to sendKeepAlive().
  7562. (sendKeepAlive): New function.
  7563. (beforeSocketCheck): Removed.
  7564. (checkHave): New function.
  7565. * src/BitfieldMan.cc
  7566. (getMissingIndex): Don't call getMissingIndexRandomly() if max is 0.
  7567. (getMissingUnusedIndex): Don't call getMissingIndexRandomly() if max is
  7568. 0.
  7569. (getMissingIndex): Dont't call getMissingIndexRandomly() if max is 0.
  7570. * src/TorrentMan.h
  7571. (UsedPieces): Removed.
  7572. (Pieces): New type definition.
  7573. * src/Piece.h: Updated doc.
  7574. * src/Peer.h
  7575. (totalLength): Removed.
  7576. * src/Peer.cc
  7577. (updateLatency): Fixed the latency calculation.
  7578. * src/TorrentMan.cc
  7579. (addPeer): Call deleteOldErrorPeers() only if peers.size() is higher
  7580. than or equal to MAX_PEER_LIST_SIZE.
  7581. If duplicate is false and peer.size() >= MAX_PEER_LIST_SIZE,
  7582. then return false.
  7583. (deleteOldErrorPeers): Rewritten.
  7584. (deleteUsedPiece): Fixed the miss use of STL remove.
  7585. * src/PeerInteraction.h
  7586. (Pieces): Removed.
  7587. (deleteTimeoutRequestSlot): Removed.
  7588. (deleteCompletedRequestSlot): Removed.
  7589. (checkRequestSlot): New function.
  7590. * src/PeerInteraction.cc
  7591. (deleteTimeoutRequestSlot): Merged to checkRequestSlot().
  7592. (deleteCompletedRequestSlot): Merged to checkRequestSlot().
  7593. (checkRequestSlot): New function.
  7594. * src/DownloadEngine.cc
  7595. (run): Clear activeSockets before calling waitData().
  7596. (waitData): Removed a call to activeSockets.clear().
  7597. 2006-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7598. To attempt to handle EINTR:
  7599. * src/SocketCore.cc
  7600. (isReadable): Added EINTR handling.
  7601. (isWritable): Added EINTR handling.
  7602. To improve the performance:
  7603. * src/AbstractCommand.cc
  7604. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  7605. * src/PeerInteractionCommand.h
  7606. (receiveMessage): Renamed as receiveMessages().
  7607. (receiveMessages): New function.
  7608. * src/PeerInteractionCommand.cc
  7609. (executeInternal): receiveMessage loop is moved to new receiveMessages
  7610. () function. detectMessageFlooding() is moved here.
  7611. (detectMessageFlooding): Use Util::difftvsec() instead of Util::difftv
  7612. (). The flooding detection for have message is comment out.
  7613. (checkLongTimePeerChoking): Use Util::difftvsec() instead of
  7614. Util::difftv().
  7615. (receiveMessage): Renamed as receiveMessages().
  7616. (receiveMessages): New function.
  7617. (keepAlive): Use Util::difftvsec() instead of Util::difftv().
  7618. (beforeSocketCheck): Commented out checkLongTimePeerChoking().
  7619. * src/SleepCommand.cc
  7620. (execute): Use Util::difftvsec() instead of Util::difftv().
  7621. * src/BitfieldMan.h
  7622. (getNthBitIndex): New function.
  7623. (hasMissingPiece): New function.
  7624. (getAllMissingIndexes): New function.
  7625. * src/BitfieldMan.cc
  7626. (countSetBit): Rewritten.
  7627. (getNthBitIndex): New function.
  7628. (getMissingIndexRandomly): Rewritten.
  7629. (hasMissingPiece): New function.
  7630. (getAllMissingIndexes): New function.
  7631. * src/TorrentMan.cc
  7632. (hasMissingPiece): New function.
  7633. (deleteUsedPiece): Rewritten using STL.
  7634. * src/PeerInteraction.cc
  7635. (getNewPieceAndSendInterest): Use TorrentMan::hasMissingPiece(), which
  7636. is a little bit faster then TorrentMan::getMissingPieceIndex().
  7637. (addRequests): Updated the number of pending requests.
  7638. * src/PeerAbstractCommand.cc
  7639. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  7640. (execute): Returns true if TorrentMan::isHalt() is true.
  7641. Corrected the condition of upload limit checking.
  7642. * src/Util.h
  7643. (countBit): New function.
  7644. * src/Util.cc
  7645. (nbits): New variable.
  7646. (countBit): New function.
  7647. * src/DownloadEngine.h
  7648. (SockCmdMap): New type definition.
  7649. (waitData): Added an argument.
  7650. (addSocket): Added an argument.
  7651. (addSocketForReadCheck): Added an argument.
  7652. (addSocketForWriteCheck): Added an argument.
  7653. * src/DownloadEngine.cc
  7654. (run): Executes only commands whose sockets are ready to read or write.
  7655. All commands are executed in every 1 second.
  7656. (waitData): Calls select() again if it returned
  7657. EINTR.
  7658. (addSocket): Saves socket and command object pair to the map.
  7659. (deleteSocket): Deletes socket and command object pair from the map.
  7660. (addSocketForReadCheck): Added an argument.
  7661. (addSocketForWriteCheck): Added an argument.
  7662. * src/DownloadCommand.cc
  7663. (executeInternal): Use Util::difftvsec() instead of Util::difftv().
  7664. To send "event=stopped" to the tracker when the application finishes:
  7665. * src/PeerChokeCommand.h
  7666. (checkPoint): New variable.
  7667. * src/PeerChokeCommand.cc
  7668. (PeerChokeCommand): Added the initialization of checkPoint.
  7669. (execute): The interval check is now done by checkPoint, not
  7670. SleepCommand. Return true if TorrentMan::isHalt() is true.
  7671. * src/TorrentMan.h
  7672. (halt): New function.
  7673. (hasMissingPiece): New function.
  7674. (isHalt): New function.
  7675. (setHalt): New function.
  7676. * src/TorrentMan.cc
  7677. (TorrentMan): Added the initialization of halt.
  7678. * src/TorrentAutoSaveCommand.h
  7679. (checkPoint): New variable.
  7680. * src/PeerListenCommand.cc
  7681. (execute): Returns true if TorrentMan::isHalt() is true.
  7682. * src/main.cc
  7683. (setSignalHander): Added flags argument.
  7684. (torrentHandler): Just calls TorrentMan::setHalt(true) and returns.
  7685. (main): Set SA_ONESHOT flag of the signal hander of SIGINT and SIGTERM.
  7686. Removed printDownloadAbortMessage() after torrent downloading loop.
  7687. * src/TorrentAutoSaveCommand.cc
  7688. (TorrentAutoSaveCommand): Added the initialization of checkPoint.
  7689. (execute): Returns true if TorrentMan::isHalt() is true.
  7690. The interval check is now done by checkPoint, not SleepCommand.
  7691. * src/TrackerWatcherCommand.cc
  7692. (execute): If TorrentMan::isHalt(), then create a tracker request with
  7693. event=stopped.
  7694. * src/TrackerUpdateCommand.cc
  7695. (prepareForRetry): Do not use SleepCommand here.
  7696. (execute): Returns true if TorrentMan::isHalt() is true.
  7697. Others:
  7698. * src/TorrentMan.cc
  7699. (getMissingPieceIndex): Updated log message.
  7700. * src/PeerInteraction.cc
  7701. (createPeerMessag): Updated log message.
  7702. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7703. To add the ability to download several pieces in mix in a command and
  7704. increase the number of request slots according to request-cancel
  7705. latency:
  7706. * src/PeerInteractionCommand.cc
  7707. (executeInternal): The number of messages to be received at a time
  7708. is increased from 10 to 50.
  7709. * src/LogFactory
  7710. (getInstance): Added NullLogger.
  7711. * src/NullLogger.h: New class.
  7712. * src/BitfieldMan.h
  7713. (getMissingIndex): New function.
  7714. * src/BitfieldMan.cc
  7715. (getMissingIndex): New function.
  7716. * src/TorrentMan.h
  7717. (checkOutPiece): New function.
  7718. (getMissingPieceIndex): New function.
  7719. (getMissingFastPieceIndex): New function.
  7720. (getMissingFastPiece): New function.
  7721. * src/TorrentMan.cc
  7722. (updatePiece): Rewritten using STL.
  7723. (syncPiece): Rewritten using STL.
  7724. (getMissingPiece): Rewritten using getMissingPieceIndex() and
  7725. checkOutPiece().
  7726. (getMissingPieceIndex): New function.
  7727. (getMissingFastPieceIndex): New function.
  7728. (getMissingFastPiece): New function.
  7729. (checkOutPiece): New function.
  7730. * src/PeerInteraction.h
  7731. (Pieces): New type definition.
  7732. (piece): Removed.
  7733. (pieces): New variable.
  7734. (getNewPieceAndSendInterest): Added the "piece" argument.
  7735. (abortPiece): Added the "piece" argument.
  7736. (abortAllPieces): New function.
  7737. (isInRequestSlot): New function.
  7738. (hasDownloadPiece): Added the "index" argument.
  7739. (setDownloadPiece): Removed.
  7740. (getDownloadPiece): Added the "index" argument.
  7741. (updatePiece): New function.
  7742. (createRequestMessage): Added the "index" argument.
  7743. * src/PeerInteraction.cc
  7744. (onChoked): Rewritten.
  7745. (abortPiece): Rewirtten.
  7746. (abortAllPieces): New function.
  7747. (deleteTimeoutRequestSlot): Rewritten.
  7748. Clarified code a little bit.
  7749. (deleteCompletedRequestSlot): Rewritten.
  7750. (isInRequestSlot): New function.
  7751. (syncPiece): Rewritten.
  7752. (updatePiece): New function.
  7753. (getNewPieceAndSendInterest): Rewritten.
  7754. (addRequests): Rewritten.
  7755. (getDownloadPiece): Rewritten.
  7756. (hasDownloadPiece): Rewritten.
  7757. (createRequestMessage): Added the "index" argument.
  7758. * src/common.h
  7759. (BITFIELD_LEN_FROM_PIECES): Enclosed the variable in parentheses.
  7760. (DIV_FLOOR): New definition.
  7761. * src/PieceMessage.cc
  7762. (receivedAction): Update request-piece latency here.
  7763. * src/RequestSlot.h
  7764. (getLatencyInMillis): New function.
  7765. * src/RequestSlot.cc
  7766. (isTimeout): Rewritten using getLatencyInMillis.
  7767. (getLatencyInMillis): New function.
  7768. * src/Piece.h
  7769. (operator==): New function.
  7770. (getMissingBlockIndex): New function.
  7771. * src/Piece.cc
  7772. (operator==): New function.
  7773. (getMissingBlockIndex): New function.
  7774. * src/Peer.h
  7775. (DEFAULT_LATENCY): New definition.
  7776. (latency): New variable.
  7777. (updateLatency): New function.
  7778. (getLatency): New function.
  7779. * src/Peer.cc
  7780. (resetStatus): Reset latecy.
  7781. (updateLatency): New function.
  7782. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7783. * src/SocketCore.cc
  7784. (isReadable): Added secure to the condition.
  7785. * src/HttpConnection.cc
  7786. (receiveResponse): Fixed a bug that causes no response header
  7787. exception.
  7788. * src/Peer.h
  7789. (getFastSet): Fixed the return value type.
  7790. 2006-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7791. To remove a wait from download loop:
  7792. * src/DownloadEngine.cc
  7793. (run): Comment out shortSleep.
  7794. To rewrite the message handling:
  7795. * src/SimplePeerMessage.h: New class.
  7796. * src/SimplePeerMessage.cc: New class.
  7797. * src/CancelMessage.h: Derived from SimplePeerMessage.
  7798. (msg): New variable.
  7799. (create): New function.
  7800. (send): Removed.
  7801. (getMessage): New function.
  7802. (getMessageLength): New function.
  7803. * src/CancelMessage.cc
  7804. (create): New function.
  7805. (receivedAction): Replaced deleteRequestMessageInQueue with
  7806. rejectPieceMessageInQueue.
  7807. (send): Removed.
  7808. (getMessage): New function.
  7809. (getMessageLength): New function.
  7810. * src/BitfieldMessage.h: Derived from SimplePeerMessage.
  7811. (msg): New variable.
  7812. (msgLength): New variable.
  7813. (~BitfieldMessage): Deleted msg.
  7814. (send): Removed.
  7815. (getMessage): New function.
  7816. (getMessageLength): New function.
  7817. * src/BitfieldMessage.cc
  7818. (create): New function.
  7819. (send): Removed.
  7820. (getMessage): New function.
  7821. (getMessageLength): New function.
  7822. * src/ChokeMessage.h: Derived from SimplePeerMessage.
  7823. (msg): New variable.
  7824. (sendPredicate): New function.
  7825. (onSendComplete): New function.
  7826. (send): Removed.
  7827. (getMessage): New function.
  7828. (getMessageLength): New function.
  7829. (create): New function.
  7830. * src/ChokeMessage.cc
  7831. (create): New function.
  7832. (send): Removed.
  7833. (sendPredicate): New function.
  7834. (getMessage): New function.
  7835. (getMessageLength): New function.
  7836. (onSendComplete): New function.
  7837. * src/KeepAliveMessage.h: Derived from SimplePeerMessage.
  7838. (msg): New variable.
  7839. (send): Removed.
  7840. (getMessage): New function.
  7841. (getMessageLength): New function.
  7842. * src/KeepAliveMessage.cc
  7843. (send): Removed.
  7844. (getMessage): New function.
  7845. (getMessageLength): New function.
  7846. * src/PortMessage.h
  7847. (create): New function.
  7848. (receivedAction): Updated log message.
  7849. * src/PortMessage.cc: New file.
  7850. * src/UnchokeMessage.h: Derived from SimplePeerMessage.
  7851. (msg): New variable.
  7852. (sendPredicate): New function.
  7853. (onSendComplete): New function.
  7854. (create): New function.
  7855. (send): Removed.
  7856. (getMessage): New function.
  7857. (getMessageLength): New function.
  7858. * src/UnchokeMessage.cc
  7859. (create): New function.
  7860. (send): Removed.
  7861. (sendPredicate): New function.
  7862. (getMessage): New function.
  7863. (getMessageLength): New function.
  7864. (onSendComplete): New function.
  7865. * src/PieceMessage.h
  7866. (leftPieceDataLength): Removed.
  7867. (leftDataLength): New variable.
  7868. (headerSend): New variable.
  7869. (pendingCount): New variable.
  7870. (msgHeader): New variable.
  7871. (sendPieceData): New function.
  7872. (incrementPendingCount): New function.
  7873. (isPendingCountMax): New function.
  7874. (create): New function.
  7875. (getMessageHeader): New function.
  7876. (getMessageHeaderLength): New function.
  7877. * src/PieceMessage.cc
  7878. (create): New function.
  7879. (getMessageHeader): New function.
  7880. (getMessageHeaderLength): New function.
  7881. (send): Rewritten.
  7882. (sendPieceData): New function.
  7883. * src/HaveMessage.h: Derived from SimplePeerMessage.
  7884. (msg): New variable.
  7885. (create): New function.
  7886. (getMessage): New function.
  7887. (getMessageLength): New function.
  7888. * src/HaveMessage.cc
  7889. (create): New function.
  7890. (send): Removed.
  7891. (sendPieceData): New function.
  7892. (getMessage): New function.
  7893. (getMessageLength): New function.
  7894. * src/RequestMessage.h: Derived from SimplePeerMessage.
  7895. (msg): New variable.
  7896. (create): New function.
  7897. (send): Removed.
  7898. (getMessage): New function.
  7899. (getMessageLength): New function.
  7900. * src/RequestMessage.cc
  7901. (create): New function.
  7902. (receivedAction): Added the handling of fast extension.
  7903. Deleted torrentMan->addUploadLength, torrentMan->addDeltaUploadLength.
  7904. (send): Removed.
  7905. (getMessage): New function.
  7906. (getMessageLength): New function.
  7907. * src/InterestedMessage.h: Derived from SimplePeerMessage.
  7908. (msg): New variable.
  7909. (sendPredicate): New function.
  7910. (onSendComplete): New function.
  7911. (create): New function.
  7912. (getMessage): New function.
  7913. (getMessageLength): New function.
  7914. * src/InterestedMessage.cc
  7915. (create): New function.
  7916. (send): Removed.
  7917. (sendPieceData): New function.
  7918. (getMessage): New function.
  7919. (getMessageLength): New function.
  7920. (onSendComplete): New function.
  7921. * src/NotInterestedMessage.h: Derived from SimplePeerMessage.
  7922. (msg): New variable.
  7923. (sendPieceData): New function.
  7924. (onSendComplete): New function.
  7925. (create): New function.
  7926. (send): Removed.
  7927. (getMessage): New function.
  7928. (getMessageLength): New function.
  7929. * src/NotInterestedMessage.cc
  7930. (create): New function.
  7931. (send): Removed.
  7932. (sendPredicate): New function.
  7933. (getMessage): New function.
  7934. (getMessageLength): New function.
  7935. (onSendComplete): New function.
  7936. * src/AllowedFastMessage.h: New class.
  7937. * src/AllowedFastMessage.cc: New class.
  7938. * src/RejectMessage.h: New class.
  7939. * src/RejectMessage.cc: New class.
  7940. * src/SuggestPieceMessage.h: New class.
  7941. * src/SuggestPieceMessage.cc: New class.
  7942. * src/HaveAllMessage.h: New class.
  7943. * src/HaveAllMessage.cc: New class.
  7944. * src/HaveNoneMessage.h: New class.
  7945. * src/HaveNoneMessage.cc: New class.
  7946. * src/HandshakeMessage.h: Derived from SimplePeerMessage.
  7947. (msg): New variable.
  7948. (reserved): New variable.
  7949. (create): New function.
  7950. (getId): New function.
  7951. (receivedAction): New function.
  7952. (getMessage): New function.
  7953. (getMessageLength): New function.
  7954. (isFastExtensionSupported): New function.
  7955. * src/HandshakeMessage.cc
  7956. (HandshakeMessage): Moved here from HandshakeMessage.h.
  7957. (create): New function.
  7958. (getMessage): New function.
  7959. (getMessageLength): New function.
  7960. (toString): Added the output of reserved field.
  7961. (check): Added const qualifier.
  7962. (isFastExtensionSupported): New function.
  7963. * src/PeerMessageUtil.h
  7964. (createChokeMessage): Removed.
  7965. (createUnchokeMessage): Removed.
  7966. (createInterestedMessage): Removed.
  7967. (createNotInterestedMessage): Removed.
  7968. (createHaveMessage): Removed.
  7969. (createBitfieldMessage): Removed.
  7970. (createRequestMessage): Removed.
  7971. (createCancelMessage): Removed.
  7972. (createPieceMessage): Removed.
  7973. (createPortMessage): Removed.
  7974. (createChokeMessage): Removed.
  7975. (createUnchokeMessage): Removed.
  7976. (createInterestedMessage): Removed.
  7977. (createNotInterestedMessage): Removed.
  7978. (createHaveMessage): Removed.
  7979. (createBitfieldMessage): Removed.
  7980. (createRequestMessage): Removed.
  7981. (createCancelMessage): Removed.
  7982. (createPieceMessage): Removed.
  7983. (createKeepAliveMessage): Removed.
  7984. (createHandshakeMessage): Removed.
  7985. (setIntParam): New function.
  7986. (createPeerMessageString): New function.
  7987. * src/PeerMessageUtil.cc
  7988. (createChokeMessage): Removed.
  7989. (createUnchokeMessage): Removed.
  7990. (createInterestedMessage): Removed.
  7991. (createNotInterestedMessage): Removed.
  7992. (createHaveMessage): Removed.
  7993. (createBitfieldMessage): Removed.
  7994. (createRequestMessage): Removed.
  7995. (createCancelMessage): Removed.
  7996. (createPieceMessage): Removed.
  7997. (createPortMessage): Removed.
  7998. (createRequestMessage): Removed.
  7999. (createCancelMessage): Removed.
  8000. (createPieceMessage): Removed.
  8001. (createHaveMessage): Removed.
  8002. (createChokeMessage): Removed.
  8003. (createUnchokeMessage): Removed.
  8004. (createInterestedMessage): Removed.
  8005. (createNotInterestedMessage): Removed.
  8006. (createBitfieldMessage): Removed.
  8007. (createKeepAliveMessage): Removed.
  8008. (createHandshakeMessage): Removed.
  8009. (setIntParam): New function.
  8010. (createPeerMessageString): New function.
  8011. * src/PeerConnection.h
  8012. (peer): Removed.
  8013. (torrentMan): Removed.
  8014. (createNLengthMessage): Removed.
  8015. (setIntParam): Removed.
  8016. (writeOutgoingMessageLog): Removed all overloaded functions.
  8017. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8018. (sendMessage): New function.
  8019. (sendHandshake): Removed.
  8020. (sendKeepAlive): Removed.
  8021. (sendChoke): Removed.
  8022. (sendUnchoke): Removed.
  8023. (sendInterested): Removed.
  8024. (sendNotInterested): Removed.
  8025. (sendHave): Removed.
  8026. (sendBitfield): Removed.
  8027. (sendRequest): Removed.
  8028. (sendPiece): Removed.
  8029. (sendPieceHeader): Removed.
  8030. (sendPieceData): Removed.
  8031. (sendCancel): Removed.
  8032. (getPeer): Removed.
  8033. * src/PeerConnection.cc
  8034. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8035. (sendHandshake): Removed.
  8036. (sendKeepAlive): Removed.
  8037. (createNLengthMessage): Removed.
  8038. (setIntParam): Removed.
  8039. (writeOutgoingMessageLog): Removed all overloaded functions.
  8040. (sendChoke): Removed.
  8041. (sendUnchoke): Removed.
  8042. (sendInterested): Removed.
  8043. (sendNotInterested): Removed.
  8044. (sendHave): Removed.
  8045. (sendBitfield): Removed.
  8046. (sendRequest): Removed.
  8047. (sendPiece): Removed.
  8048. (sendPieceHeader): Removed.
  8049. (sendPieceData): Removed.
  8050. (sendMessage): New function.
  8051. (sendCancel): Removed.
  8052. * src/PeerInteractionCommand.cc
  8053. (PeerInteractionCommand): Call setUploadLimit.
  8054. (executeInternal): Call setUploadLimit.
  8055. Added the handling of "inProgress" state of handshake message.
  8056. Call sendBitfield() or sendAllowdFast() instead of deprecated
  8057. sendNow().
  8058. (keepAlive): Call addMessage and sendMessage instead of deprecated
  8059. sendNow().
  8060. (beforeSocketCheck): Call addMessage instead of deprecated trySendNow()
  8061. * src/TorrentMan.h
  8062. (PEER_ID_LENGTH): New definition.
  8063. (hasAllPieces): New function.
  8064. * src/TorrentMan.cc
  8065. (getMissingPiece): Added the handling of fast extension.
  8066. (cancelPiece): Call updatePiece().
  8067. (hasAllPieces): New function.
  8068. * src/PeerInteraction.h
  8069. (fastSet): New variable.
  8070. (getNewPieceAndSendInterest): Changed the return type to void.
  8071. (send): Renamed as sendMessages.
  8072. (deleteAllRequestSlot): Removed.
  8073. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8074. (cancelAllRequest): Removed all overloaded functions.
  8075. (deleteAllRequestSlot): Removed.
  8076. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8077. (rejectPieceMessageInQueue): New function.
  8078. (rejectAllPieceMessageInQueue): New function.
  8079. (onChoked): New function.
  8080. (isSendingMessageInProgress): New function.
  8081. (getCorrespondingRequestSlot): Changed its arguments.
  8082. (isInFastSet): New function.
  8083. (addFastSetIndex): New function.
  8084. (addRequests): New function.
  8085. (sendNow): Removed.
  8086. (trySendNow): Removed.
  8087. (sendBitfield): New function.
  8088. (sendAllowdFast): New function.
  8089. (createHaveAllMessage): New function.
  8090. (createHaveNoneMessage): New function.
  8091. (createRejectMessage): New function.
  8092. (createAllowedFastMessage): New function.
  8093. * src/PeerInteraction.cc
  8094. (send): Renamed as sendMessages.
  8095. (sendMessages): New function.
  8096. (MsgPushBack): New class.
  8097. (isSendingMessageInProgress): New function.
  8098. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8099. (rejectAllPieceMessageInQueue): New function.
  8100. Added the handling of fast extension.
  8101. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8102. (rejectPieceMessageInQueue): New function.
  8103. Added the handling of fast extension.
  8104. (deleteRequestSlot): Replaced for loop with std::find.
  8105. (onChoked): New function.
  8106. (deleteAllRequestSlot): Removed.
  8107. (abortPiece): Rewirtten.
  8108. (deleteTimeoutRequestSlot): Updated log messages.
  8109. (getCorrespondingRequestSlot): Changed its arguments.
  8110. (cancelAllRequest): Removed all overloaded functions.
  8111. (receiveHandshake): Added the check to see whether an incoming peer
  8112. supports fast extension.
  8113. (createHandshakeMessage): Use HandshakeMessage::create instead of
  8114. PeerMessageUtil.
  8115. (createPeerMessage): Use create() of each message class instead of
  8116. PeerMessageUtil.
  8117. HaveAllMessage, HaveNoneMessage, RejectMessage, SuggestPieceMessage,
  8118. AllowedFastMessage were added.
  8119. (getNewPieceAndSendInterest): Changed its return value type to void.
  8120. Added the handling of fast extension.
  8121. (addRequests): New function.
  8122. (sendNow): Removed.
  8123. (sendHandshake): Rewritten.
  8124. (trySendNow): Removed.
  8125. (sendBitfield): New function.
  8126. (sendAllowdFast): New function.
  8127. (isInFastSet): New function.
  8128. (addFastSetIndex): New function.
  8129. (createRequestMessage): Use RequestMessage::create instead of
  8130. PeerMessageUtil.
  8131. (createCancelMessage): Use CancelMessage::create instead of
  8132. PeerMessageUtil.
  8133. (createPieceMessage): Use PieceMessage::create instead of
  8134. PeerMessageUtil.
  8135. (createHaveMessage): Use HaveMessage::create instead of
  8136. PeerMessageUtil.
  8137. (createChokeMessage): Use ChokeMessage::create instead of
  8138. PeerMessageUtil.
  8139. (createUnchokeMessage): Use UnchokeMessage::create instead of
  8140. PeerMessageUtil.
  8141. (createInterestedMessage): Use InterestedMessage::create instead of
  8142. PeerMessageUtil.
  8143. (createNotInterestedMessage): Use NotInterestedMessage::create instead
  8144. of PeerMessageUtil.
  8145. (createBitfieldMessage): Use BitfieldMessage::create instead of
  8146. PeerMessageUtil.
  8147. (createKeepAliveMessage): Use KeepAliveMessage::create instead of
  8148. PeerMessageUtil.
  8149. (createHaveAllMessage): New function.
  8150. (createHaveNoneMessage): New function.
  8151. (createRejectMessage): New function.
  8152. (createAllowedFastMessage: New function.
  8153. * src/Util.h
  8154. (sha1Sum): New function.
  8155. (computeFastSet): New function.
  8156. * src/Util.cc
  8157. (sha1Sum): New function.
  8158. (computeFastSet): New function.
  8159. * src/Peer.h
  8160. (fastExtensionEnabled): New variable.
  8161. (fastSet): New variable.
  8162. (setAllBitfield): New function.
  8163. (setFastExtensionEnabled): New function.
  8164. (isFastExtensionEnabled): New function.
  8165. (addFastSetIndex): New function.
  8166. (getFastSet): New function.
  8167. (isInFastSet): New function.
  8168. (countFastSet): New function.
  8169. * src/Peer.cc
  8170. (isInFastSet): New function.
  8171. (addFastSetIndex): New function.
  8172. (setAllBitfield): New function.
  8173. * src/AbstractCommand.cc (execute): Changed the procedure of checking
  8174. sockets.
  8175. * src/PeerAbstractCommand.cc
  8176. (PeerAbstractCommand): Added the initialization for uploadLimitCheck
  8177. and uploadLimit.
  8178. (execute): Changed the procedure of checking sockets. The upload speed
  8179. checking were added.
  8180. (setUploadLimit): New function.
  8181. (setUploadLimitCheck): New function.
  8182. * src/PeerAbstractCommand.h
  8183. (setUploadLimit): New function.
  8184. (setUploadLimitCheck): New function.
  8185. (uploadLimit): New variable.
  8186. (uploadLimitCheck): New variable.
  8187. To contact a tracker regularly:
  8188. * src/TrackerWatcherCommand.h (interval): New variable.
  8189. (checkPoint): New variable.
  8190. (TrackerWatcherCommand): Added interval argument.
  8191. * src/TrackerWatcherCommand.cc
  8192. (TrackerWatcherCommand): Initialized checkPoint.
  8193. (execute): Now a tracker is contacted in every specified period.
  8194. If peer list is not needed, send request with numwant=0.
  8195. * src/TrackerUpdateCommand.cc
  8196. (execute): Updated log messages.
  8197. * src/DownloadEngine.cc
  8198. (~DownloadEngine): Removed two asserts.
  8199. (waitData): Uncommented wfds. May be a bug fix.
  8200. 2006-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8201. * src/PeerInteractionCommand.h
  8202. (checkInactiveConnection): Removed.
  8203. * src/PeerInteractionCommand.cc
  8204. (executeInternal): Removed following function calls:
  8205. detectMessageFlooding(), checkLongTimePeerChoking and
  8206. checkInactiveConnection().
  8207. (checkInactiveConnection): Removed.
  8208. (detectMessageFlooding): Removed function call to
  8209. checkInactiveConnection().
  8210. * src/PeerMessageUtil.h
  8211. (createChokeMessage): New function. Overload.
  8212. (createUnchokeMessage): New function. Overload.
  8213. (createInterestedMessage): New function. Overload.
  8214. (createNotInterestedMessage): New function. Overload.
  8215. (createHaveMessage): New function. Overload.
  8216. (createBitfieldMessage): New function. Overload.
  8217. (createRequestMessage): New function. Overload.
  8218. (createCancelMessage): New function. Overload.
  8219. (createPieceMessage): New function. Overload.
  8220. (createKeepAliveMessage): New function. Overload.
  8221. * src/PeerMessageUtil.cc
  8222. (createChokeMessage): New function. Overload.
  8223. (createUnchokeMessage): New function. Overload.
  8224. (createInterestedMessage): New function. Overload.
  8225. (createNotInterestedMessage): New function. Overload.
  8226. (createHaveMessage): New function. Overload.
  8227. (createBitfieldMessage): New function. Overload.
  8228. (createRequestMessage): New function. Overload.
  8229. (createCancelMessage): New function. Overload.
  8230. (createPieceMessage): New function. Overload.
  8231. (createKeepAliveMessage): New function. Overload.
  8232. * src/SendMessageQueue.cc
  8233. (createRequestMessage): Use PeerMessageUtil.
  8234. (createCancelMessage): Use PeerMessageUtil.
  8235. (createPieceMessage): Use PeerMessageUtil.
  8236. (createHaveMessage): Use PeerMessageUtil.
  8237. (createChokeMessage): Use PeerMessageUtil.
  8238. (createUnchokeMessage): Use PeerMessageUtil.
  8239. (createInterestedMessage): Use PeerMessageUtil.
  8240. (createNotInterestedMessage): Use PeerMessageUtil.
  8241. (createBitfieldMessage): Use PeerMessageUtil.
  8242. (createKeepAliveMessage): Use PeerMessageUtil.
  8243. * src/SendMessageQueue.h: Renamed to PeerInteraction.h
  8244. * src/SendMessageQueue.cc: Renamed to PeerInteraction.cc
  8245. * src/PeerInteraction.h: New class.
  8246. * src/PeerInteraction.cc: New class.
  8247. 2006-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8248. Each peer message has its own class.
  8249. * src/PendingMessages.h: Removed.
  8250. * src/PendingMessages.cc: Removed. The sending process was moved to
  8251. each message class.
  8252. * src/RequestSlotMan.h: Removed.
  8253. * src/RequestSlotMan.cc: Removed. All functionarities were moved to
  8254. SendMessageQueue.
  8255. * src/RequestMessage.h: New class.
  8256. * src/RequestMessage.cc: New class.
  8257. * src/CancelMessage.h: New class.
  8258. * src/CancelMessage.cc: New class.
  8259. * src/BitfieldMessage.h: New class.
  8260. * src/BitfieldMessage.cc: New class.
  8261. * src/ChokeMessage.h: New class.
  8262. * src/ChokeMessage.cc: New class.
  8263. * src/KeepAliveMessage.h: New class.
  8264. * src/KeepAliveMessage.cc: New class.
  8265. * src/PortMessage.h: New class.
  8266. * src/UnchokeMessage.h: New class.
  8267. * src/UnchokeMessage.cc: New class.
  8268. * src/PieceMessage.h: New class.
  8269. * src/PieceMessage.cc: New class.
  8270. * src/HaveMessage.h: New class.
  8271. * src/HaveMessage.cc: New class.
  8272. * src/BitfieldMessage.h: New class.
  8273. * src/BitfieldMessage.cc: New class.
  8274. * src/NotInterestedMessage.h: New class.
  8275. * src/NotInterestedMessage.cc: New class.
  8276. * src/InterestedMessage.h: New class.
  8277. * src/InterestedMessage.cc: New class.
  8278. * src/HandshakeMessage.h (sendMessageQueue): New variable.
  8279. (getSendMessageQueue): New function.
  8280. (setSendMessageQueue): New function.
  8281. * src/HandshakeMessage.cc: New class.
  8282. * src/PeerConnection.h (receiveMessage): Changed return value and
  8283. arguments.
  8284. (receiveHandshake): Changed return value and arguments.
  8285. * src/PeerConnection.cc (receiveMessage): Do not create message class
  8286. here.
  8287. (receiveHandshake): Do not create handshake class here.
  8288. * src/PeerInteractionCommand.h (peerConnection): Removed.
  8289. (piece): Removed.
  8290. (syncPiece): Removed.
  8291. (sendInterest): Removed.
  8292. (sendMessages): Removed.
  8293. (createRequestPendingMessage): Removed.
  8294. (checkPieceHash): Removed.
  8295. (erasePieceOnDisk): Removed.
  8296. (getNewPieceAndSendInterest): Removed.
  8297. (onGotNewPice): Removed.
  8298. (onGotWrongPiece): Removed.
  8299. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  8300. Removed peerConnection, piece.
  8301. (~PeerInteractionCommand): Removed peerConnection.
  8302. (executeInternal): Use sendMessageQueue instead of peerConnection.
  8303. (syncPiece): Moved to SendMessageQueue.
  8304. (decideChoking): Removed PendingMessage.
  8305. (receiveMessage): Use sendMessageQueue instead of peerConnection.
  8306. The action after receiving peer message was moved to each message
  8307. class.
  8308. (onGotNewPice): Moved to SendMessageQueue.
  8309. (onGotWrongPiece): Moved to SendMessageQueue.
  8310. (getNewPieceAndSendInterest): Moved to SendMessageQueue.
  8311. (sendInterest): Moved to SendMessageQueue.
  8312. (createRequestPendingMessage): Removed.
  8313. (sendMessages): Moved to SendMessageQueue.
  8314. (onAbort): Use SendMessageQueue::abortPiece()
  8315. (keepAlive): Use sendMessageQueue instead of peerConnection.
  8316. (beforeSocketCheck): Use sendMessageQueue instead of peerConnection.
  8317. (checkPieceHash): Moved to SendMessageQueue.
  8318. (erasePieceOnDisk): Moved to SendMessageQueue.
  8319. * src/PeerMessageUtil.h
  8320. (createBitfieldMessage): Removed.
  8321. (createHaveMessage): Changed return value and arguments.
  8322. (createBitfieldMessage): Changed return value and arguments.
  8323. (createRequestCancelMessage): Removed.
  8324. (createPieceMessage): Changed return value and arguments.
  8325. (getShortIntParam): New function.
  8326. (checkIndex): Changed arguments.
  8327. (checkBegin): Changed arguments.
  8328. (checkLength): Changed arguments.
  8329. (checkPieceOffset): Removed.
  8330. (checkRange): New function.
  8331. (checkBitfield): Changed arguments.
  8332. (createPeerMessage): Removed.
  8333. (checkIntegrity): Removed.
  8334. (createHandshakeMessage): Changed arguments.
  8335. (createChokeMessage): New function.
  8336. (createUnchokeMessage): New function.
  8337. (createInterestedMessage): New function.
  8338. (createNotInterestedMessage): New function.
  8339. (createRequestMessage): New function.
  8340. (createCancelMessage): New function.
  8341. (createPortMessage): New function.
  8342. * src/PeerMessageUtil.cc
  8343. (createBitfieldMessage): Removed.
  8344. (createHaveMessage): Changed return value and arguments.
  8345. (createBitfieldMessage): Changed return value and arguments.
  8346. (createRequestCancelMessage): Removed.
  8347. (createPieceMessage): Changed return value and arguments.
  8348. (getShortIntParam): New function.
  8349. (checkIndex): Changed arguments.
  8350. (checkBegin): Changed arguments.
  8351. (checkLength): Changed arguments.
  8352. (checkPieceOffset): Removed.
  8353. (checkRange): New function.
  8354. (checkBitfield): Changed arguments.
  8355. (createPeerMessage): Removed.
  8356. (checkIntegrity): Removed.
  8357. (createHandshakeMessage): Changed arguments.
  8358. (createChokeMessage): New function.
  8359. (createUnchokeMessage): New function.
  8360. (createInterestedMessage): New function.
  8361. (createNotInterestedMessage): New function.
  8362. (createRequestMessage): New function.
  8363. (createCancelMessage): New function.
  8364. (createPortMessage): New function.
  8365. * src/PeerMessage.h
  8366. (id): Removed.
  8367. (index): Removed.
  8368. (begin): Removed.
  8369. (length): Removed.
  8370. (bitfield): Removed.
  8371. (bitfieldLength): Removed.
  8372. (block): Removed.
  8373. (blockLength): Removed.
  8374. (inProgress): New variable.
  8375. (cuid): New variable.
  8376. (peer): New variable.
  8377. (sendMessageQueue): New variable.
  8378. (logger): New variable.
  8379. (setBitfield): Removed.
  8380. (getBitfield): Removed.
  8381. (setBlock): Removed.
  8382. (getBlock): Removed.
  8383. (getBitfieldLength): Removed.
  8384. (getBlockLength): Removed.
  8385. (isInProgress): New function.
  8386. (toString): Made pure virtual.
  8387. (check): New function.
  8388. (send): New function.
  8389. (receivedAction): New function.
  8390. (getId): Made pure virtual.
  8391. (setId): Removed.
  8392. (getIndex): Removed.
  8393. (setIndex): Removed.
  8394. (getBegin): Removed.
  8395. (setBegin): Removed.
  8396. (getLength): Removed.
  8397. (setLength): Removed.
  8398. (getCuid): New function.
  8399. (setCuid): New function.
  8400. (getPeer): New function.
  8401. (setPeer): New function.
  8402. (getSendMessageQueue): New function.
  8403. (setSendMessageQueue): New function.
  8404. (ID): Removed.
  8405. * src/PeerMessage.cc
  8406. (setBitfield): Removed.
  8407. (setBlock): Removed.
  8408. (toString): Removed.
  8409. * src/TorrentMan.h
  8410. (getPieceLength): New function.
  8411. (getPieceLength): New function.
  8412. * src/SendMessageQueue.h
  8413. (REQUEST_TIME_OUT): New definition.
  8414. (RequestSlots): New definition.
  8415. (MessageQueue): New definition.
  8416. (requestSlotMan): Removed.
  8417. (pendingMessages): Removed.
  8418. (requestSlots): New variable.
  8419. (messageQueue): New variable.
  8420. (torrentMan): New variable.
  8421. (peerConnection): New variable.
  8422. (peer): New variable.
  8423. (piece): New variable.
  8424. (getNewPieceAndSendInterest): New function.
  8425. (createPeerMessage): New function.
  8426. (createHandshakeMessage): New function.
  8427. (send): Made private.
  8428. (setPeerMessageCommonProperty): New function.
  8429. (deleteAllRequestSlot): New function.
  8430. (deleteRequestMessageInQueue): New function.
  8431. (cancelAllRequest): Made private.
  8432. (cancelAllRequest): Made private.
  8433. (countRequestSlot): Made private.
  8434. (addPendingMessage): Removed.
  8435. (deletePendingPieceMessage): Removed.
  8436. (deletePendingRequestMessage): Removed.
  8437. (addMessage): New function.
  8438. (deletePieceMessageInQueue): New function.
  8439. (deleteTimeoutRequestSlot): Changed argument.
  8440. (deleteCompletedRequestSlot): Changed argument.
  8441. (getCorrespoindingRequestSlot): Renamed to getCorrespondingRequestSlot.
  8442. (getCorrespondingRequestSlot): New function.
  8443. (countPendingMessage): Removed.
  8444. (countMessageInQueue): New function.
  8445. (getTorrentMan): New function.
  8446. (getPeerConnection): New function.
  8447. (hasDownloadPiece): New function.
  8448. (getDownloadPiece): New function.
  8449. (setDownloadPiece): New function.
  8450. (syncPiece): New function.
  8451. (sendMessages): New function.
  8452. (sendNow): New function.
  8453. (trySendNow): New function.
  8454. (abortPiece): New function.
  8455. (sendHandshake): New function.
  8456. (receiveMessage): New function.
  8457. (receiveHandshake): New function.
  8458. (createRequestMessage): New function.
  8459. (createCancelMessage): New function.
  8460. (createPieceMessage): New function.
  8461. (createHaveMessage): New function.
  8462. (createChokeMessage): New function.
  8463. (createUnchokeMessage): New function.
  8464. (createInterestedMessage): New function.
  8465. (createNotInterestedMessage): New function.
  8466. (createBitfieldMessage): New function.
  8467. (createKeepAliveMessage): New function.
  8468. * src/SendMessageQueue.cc
  8469. (SendMessageQueue): Removed requestSlotMan.
  8470. Instantiated peerConnection here.
  8471. (~SendMessageQueue): Removed requestSlotMan.
  8472. Added deletion of peerConnection and the contents of messageQueue.
  8473. (send): Updated according to the change of messageQueue.
  8474. (addPendingMessage): Renamed to addMessage.
  8475. (addMessage): New function.
  8476. (deletePendingPieceMessage): Renamed to deletePieceMessageInQueue.
  8477. (deletePieceMessageInQueue): New function.
  8478. (deletePendingRequestMessage): Renamed to deleteRequestMessageInQueue.
  8479. (deleteRequestMessageInQueue): New function.
  8480. (deleteRequestSlot): RequestSlotMan::deleteRequestSlot(...) was moved
  8481. here.
  8482. (deleteTimeoutRequestSlot): RequestSlotMan::deleteTimeoutRequestSlot
  8483. (...) was moved here.
  8484. (deleteAllRequestSlot): RequestSlotMan::deleteAllRequestSlot(...) was
  8485. moved here.
  8486. (deleteCompletedRequestSlot):
  8487. RequestSlotMan::deleteCompletedRequestSlot(...) was moved here.
  8488. (getCorrespondingRequestSlot):
  8489. RequestSlotMan::getCorrespoindingRequestSlot(...) was moved here.
  8490. And renamed to getCorrespondingRequestSlot, correcting a typo.
  8491. (countPendingMessage): Renamed to countMessageInQueue.
  8492. (countMessageInQueue): New function.
  8493. (countRequestSlot): RequestSlotMan::countRequestSlot() was moved here.
  8494. (receiveHandshake): New function.
  8495. (createHandshakeMessage): New function.
  8496. (receiveMessage): New function.
  8497. (createPeerMessage): New function.
  8498. (syncPiece): New function.
  8499. (getNewPieceAndSendInterest): New function.
  8500. (sendMessages): New function.
  8501. (sendNow): New function.
  8502. (trySendNow): New function.
  8503. (sendHandshake): New function.
  8504. (abortPiece): New function.
  8505. (getDownloadPiece): New function.
  8506. (getPeerMessageCommonProperty): New function.
  8507. (createRequestMessage): New function.
  8508. (createCancelMessage): New function.
  8509. (createPieceMessage): New function.
  8510. (createHaveMessage): New function.
  8511. (createChokeMessage): New function.
  8512. (createUnchokeMessage): New function.
  8513. (createInterestedMessage): New function.
  8514. (createNotInterestedMessage): New function.
  8515. (createBitfieldMessage): New function.
  8516. (createKeepAliveMessage): New function.
  8517. To add simple Content-Disposition support:
  8518. * src/HttpResponseCommand.h (determinFilename): New function.
  8519. * src/HttpResponseCommand.cc (executeInternal):
  8520. Use determinFilename(headers) instead of req->getFile() when comparing
  8521. filename.
  8522. (determinFilename): New function.
  8523. (handleDefaultEncoding): Use determinFilename(headers) instead of
  8524. req->getFile().
  8525. (handleOtherEncoding): Use determinFilename(headers) instead of
  8526. req->getFile().
  8527. * src/Util.h (getContentDispositionFilename): New function.
  8528. * src/Util.cc (getContentDispositionFilename): New function.
  8529. * src/LogFactory.h (release): New function.
  8530. * src/LogFactory.cc (release): New function.
  8531. To fix a bug that causes out-of-bound exception when HTTP status
  8532. line is wrong:
  8533. * src/HttpConnection.cc (receiveResponse): Added a check for header
  8534. size.
  8535. * src/common.h (Deleter): New class.
  8536. * src/SegmentMan.cc
  8537. (~SegmentMan): Added deletion of splitter and diskWriter.
  8538. * src/DownloadEngine.h
  8539. (Commands): Use deque.
  8540. (clearQueue): New function.
  8541. * src/DownloadEngine.cc
  8542. (~DownloadEngine): Added deletion of segmentMan.
  8543. (cleanQueue): New function.
  8544. * src/TorrentDownloadEngine.h
  8545. (TorrentDownloadEngine): The implementation was moved to
  8546. TorrentDownloadEngine.cc.
  8547. (~TorrentDownloadEngine): The implementation was moved to
  8548. TorrentDownloadEngine.cc.
  8549. * src/TorrentDownloadEngine.cc
  8550. (~TorrentDownloadEngine): Added deletion of torrentMan.
  8551. * src/main.cc
  8552. (clearRequest): Removed.
  8553. (handler): Added deletion of e.
  8554. (torrentHandler): Added deletion of te.
  8555. (main): Do not share splitter.
  8556. Use Deleter instead of clearRequest.
  8557. Deletion of classes were updated.
  8558. 2006-05-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8559. * src/main.cc (main): Fixed typo.
  8560. * src/message.h: Fixed typo.
  8561. * po/de.po: Added German translation, thanks to Hermann J. Beckers.
  8562. 2006-04-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8563. To add --select-file command-line option:
  8564. * src/Util.cc
  8565. (unfoldRange): New function.
  8566. (getNum): New function.
  8567. (unfoldSubRange): New function
  8568. * src/main.cc
  8569. (showUsage): Added help message.
  8570. (main): Added --select-file command-line option. Updated the layout of
  8571. file listing.
  8572. * src/common.h
  8573. (Integers): New definition.
  8574. * src/SocketCore.cc
  8575. (writeData): Removed timeout argument.
  8576. (readData): Removed timeout argument.
  8577. (peekData): Removed timeout argument.
  8578. * src/Socket.cc
  8579. (writeData): Removed timeout argument.
  8580. (readData): Removed timeout argument.
  8581. (peekData): Removed timeout argument.
  8582. * Release 0.4.1
  8583. 2006-04-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8584. To deploy upload rate based choking algorithm:
  8585. * src/PeerInteractionCommand.cc
  8586. (PeerInteractionCommand): Add peer to TorrentMan::activePeers to track
  8587. peer currently used.
  8588. (decideChoking): Deleted the choke/unchoke decision algorithm when
  8589. download completes. Simplified.
  8590. (receiveMessage): Updated.
  8591. * src/TorrentMan.h
  8592. (activePeers): New variable.
  8593. (addActivePeer): New function.
  8594. (getActivePeers): New function.
  8595. (deleteActivePeer): New function.
  8596. * src/TorrentMan.cc
  8597. (addPeer): deleteOldErrorPeers is moved to the begining of the function
  8598. * src/PeerAbstractCommand.cc
  8599. (onAbort): Use peer->resetStatus().
  8600. * src/main.cc
  8601. (PeerChokeCommand.h): Included.
  8602. (main): Added the instance of ChokingCommand to the command queue.
  8603. * src/Peer.h
  8604. (amChoking): Renamed from amChocking
  8605. (chokingRequired): New variable.
  8606. (optUnchoking): New variable.
  8607. (deltaUpload): New variable.
  8608. (deltaDownload): New variable.
  8609. (addDeltaUpload): New function.
  8610. (resetDeltaUpload): New function.
  8611. (addDeltaDownload): New function.
  8612. (resetDeltaDownload): New function.
  8613. (addPeerUpload): Added a call to addDeltaUpload.
  8614. (addPeerDownload): Added a call to addDeltaDownload.
  8615. * src/Peer.cc
  8616. (shouldBeChoking): Renamed from shouldChoke.
  8617. (resetStatus): New function.
  8618. * src/PeerChokeCommand.h: New class.
  8619. * src/PeerChokeCommand.cc: New class.
  8620. To add lazy upload speed limiter:
  8621. * src/TorrentConsoleDownloadEngine.h: Moved the variables for
  8622. statistics calculation to TorrentDownloadEngine.
  8623. * src/TorrentConsoleDownloadEngine.cc
  8624. (sendStatistics): Renamed from printStatistics.
  8625. (initStatistics): Removed. Moved to TorrentDownloadEngine.
  8626. (calculateSpeed): Removed. Moved to TorrentDownloadEngine.
  8627. (calculateStatistics): Removed. Moved to TorrentDownloadEngine.
  8628. * src/TorrentDownloadEngine.h: Added the variables for statistics
  8629. calculation.
  8630. (sendStatistics): New function as pure virtual function.
  8631. (getUploadSpeed): New function.
  8632. * src/TorrentDownloadEngine.cc
  8633. (initStatistics): New function.
  8634. (calculateSpeed): New function.
  8635. (calculateStatistics): New function.
  8636. * src/SendMessageQueue.h
  8637. (uploadLength): New variable.
  8638. (send): Added an argument.
  8639. (setUploadLimit): New function.
  8640. (getUploadLimit): New function.
  8641. * src/SendMessageQueue.cc
  8642. (send): Added upload speed limiter.
  8643. * src/prefs.h
  8644. (PREF_UPLOAD_LIMIT): New definition.
  8645. * src/PeerInteractionCommand.cc
  8646. (PeerInteractionCommand): Set upload speed limit to sendMessageQueue.
  8647. * src/main.cc
  8648. (main): Added --upload-limit option
  8649. For bug fixes:
  8650. * src/main.cc
  8651. (showUsage): Corrected --listen-port help
  8652. Other changes:
  8653. * src/TorrentMan.cc
  8654. (getPeer): Return nullPeer if connection is grather than
  8655. MAX_PEER_UPDATE(15) in order to leave space for incoming peers.
  8656. 2006-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8657. To add some useful information to the exception message:
  8658. * src/SocketCore.cc : Updated messages.
  8659. * src/SegmentMan.cc :
  8660. * src/TorrentMan.cc : Updated messages.
  8661. * src/MultiDiskWriter.cc : Updated messages.
  8662. * src/Util.cc : Updated messages.
  8663. * src/AbstractDiskWriter.cc : Updated messages.
  8664. * src/PreAllocationDiskWriter.cc : Updated messages.
  8665. * src/message.cc : Added new messages. Updated some messages.
  8666. * src/TrackerWatcherCommand.h (MIN_PEERS): New definition.
  8667. * src/TrackerWatcherCommand.cc (execute): Use MIN_PEERS.
  8668. Updated threshold from 30 to 15.
  8669. * src/AbstractDiskWriter.h (filename): New variable.
  8670. * src/AbstractDiskWriter.cc (openExistingFile): Assigned filename.
  8671. (createFile): Assigned filename.
  8672. * src/main.cc: Updated the help message for http-auth-scheme.
  8673. * Release 0.4.0
  8674. 2006-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8675. To add TrackerUpdateCommand with which replaces
  8676. CompactTrackerResponseProcessor:
  8677. * src/TrackerWatcherCommand.h (req): Removed.
  8678. * src/TrackerWatcherCommand.cc (execute): Send a request to tracker
  8679. if the number of peer connections are less than 30.
  8680. * src/ByteArrayDiskWriter.h (readData): Implemented.
  8681. * src/SegmentMan.h (diskWriter): New function.
  8682. * src/SegmentMan.cc (init): Added a call to diskWriter->closeFile()
  8683. * src/main.cc : Removed #include "CompactTrackerResponseProcessor.h"
  8684. (main): Use TrackerUpdateCommand.
  8685. * src/TorrentMan.h (CompactTrackerResponseProcessor): Removed.
  8686. (req): New variable.
  8687. (setTrackerResponseProcessor): Removed.
  8688. (getTrackerResponseProcessor): Removed.
  8689. (processTrackerResponse): Removed.
  8690. * src/DownloadEngine.h (diskWriter): Removed.
  8691. * src/TorrentDownloadEngine.cc (afterEachIteration): Removed a call
  8692. to torrentMan->processTrackerResponse().
  8693. To add Util::expandBuffer:
  8694. * src/ByteArrayDiskWriter.h (expandBuffer): Removed.
  8695. * src/ByteArrayDiskWriter.cc (writeData): Use Util::expandBuffer().
  8696. * src/Util.h (expandBuffer): New function.
  8697. To fix the bug that causes segmentation fault when "-l ." is specified
  8698. in command-line option:
  8699. * src/SimpleLogger.h (SimpleLogger): Removed "filename" argument.
  8700. (openFile): New function.
  8701. (closeFile): New function.
  8702. * src/SimpleLogger.cc (SimpleLogger): Removed fopen.
  8703. (~SimpleLogger): Call closeFile();
  8704. * src/LogFactory.cc (getInstance): Added a call to slogger->openFile().
  8705. * src/main.cc (main): Added a check to see logger is configured
  8706. properly.
  8707. To enable HTTP authentication without specifying "--http-auth-scheme"
  8708. * src/prefs.h (PREF_HTTP_AUTH_ENABLED): New definition.
  8709. * src/HttpConnection.cc (createRequest): Send Authorization header
  8710. if PREF_HTTP_AUTH_ENABLED == V_TRUE.
  8711. * src/main.cc (main): Preset PREF_HTTP_AUTH_SCHEME to V_TRUE
  8712. If "--http-user" is specified, set PREF_HTTP_AUTH_ENABLED to V_TRUE
  8713. * src/Peer.cc (shouldChoke): Updated algorithm.
  8714. * src/message.h (EX_AUTH_FAILED): New definition.
  8715. (EX_FILE_OPEN): New definition.
  8716. * src/HttpResponseCommand.cc (checkResponse): Throw DlAbortEx
  8717. if status == 401.
  8718. (handleDefaultEncoding): Added a call to diskWriter->initAndOpenFile()
  8719. if req->isTorrent == true.
  8720. * src/main.cc (handler): Removed the check to see e->diskWriter != NULL
  8721. (torrentHandler): Removed the check to see diskAdaptor != NULL.
  8722. * src/AbstractDiskWriter.cc (openExistingFile): Updated messsage.
  8723. (createFile): Updated message.
  8724. 2006-04-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8725. To add a readout of estimated remaining time to normal HTTP/FTP
  8726. downloads:
  8727. * src/ConsoleDownloadEngine.h (startup): New variable.
  8728. (startupLength): New variable.
  8729. (isStartupLengthSet): New variable.
  8730. (avgSpeed): New variable.
  8731. (eta): New variable.
  8732. * src/ConsoleDownloadEngine.cc (sendStatistics): Added a readout of
  8733. estimated remaining time.
  8734. (initStatistics): Initialized newly added variables.
  8735. (calculateStatistics): Calculate average speed and estimated remaining
  8736. time.
  8737. To decouple TorrentDownloadEngine from HttpResponseCommand:
  8738. * src/TrackerDownloadCommand.h: Removed.
  8739. * src/TrackerDownloadCommand.cc: Removed.
  8740. * src/TrackerInitCommand.h: Removed.
  8741. * src/TrackerInitCommand.cc: Removed.
  8742. * src/TrackerUpdateCommand.h: Removed.
  8743. * src/TrackerUpdateCommand.cc: Removed.
  8744. * src/TrackerWatcherCommand.cc (execute): The construction of request
  8745. url written in TrackerInitCommand was moved here. Do not create
  8746. tracker request command if torrentMan->trackers != 0.
  8747. * src/CompactTrackerResponseProcessor.h: New class.
  8748. * src/CompactTrackerResponseProcessor.cc: New class.
  8749. * src/message.h (MSG_TRACKER_WARNING_MESSAGE): Updated.
  8750. * src/HttpResponseCommand.cc (createHttpDownloadCommand):
  8751. Decoupled TorrentDownloadEngine from this.
  8752. * src/SegmentMan.h (init): New function.
  8753. * src/SegmentMan.cc (init): New function.
  8754. * src/TorrentMan.h (responseProcessor): New variable.
  8755. (trackers): New variable.
  8756. (setTrackerResponseProcessor): New function.
  8757. (getTrackerResponseProcessor): New function.
  8758. (processTrackerResponse): New function.
  8759. * src/TorrentMan.cc (Constructor): Initialized new variable trackers.
  8760. (processTrackerResponse): New function.
  8761. * src/main.cc (main): Use ByteArrayDiskWriter and
  8762. CompactTrackerResponseProcessor.
  8763. * src/TorrentDownloadEngine.cc (afterEachIteration): Call torrentMan->
  8764. processTrackerResponse().
  8765. * src/TorrentConsoleDownloadEngine.cc (printStatistics): Updated a
  8766. readout.
  8767. * src/TorrentDownloadEngine.cc (afterEachIteration): Added log message
  8768. which indicates download has completed.
  8769. * src/AbstractDiskWriter.cc (Destructor): fd >= 0, not fd >0
  8770. (closeFile): fd >= 0, not fd > 0
  8771. * src/main.cc (main): Added short cut for show-files.
  8772. Added short cut for torrent-file.
  8773. Added new command-line option listen-port.
  8774. Updated i18n messages.
  8775. 2006-04-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8776. To add LogFactory which creates singleton logger:
  8777. * src/LogFactory.h: New class.
  8778. * src/LogFactory.cc: New class.
  8779. * src/Command.h (logger): New variable.
  8780. (Constructor): Use LogFactory.
  8781. * src/AbstractCommand.cc: Use Command::logger
  8782. * src/PeerConnection.cc (Constructor): Deleted the argument logger.
  8783. Use LogFactory.
  8784. * src/SegmentSplitter.h : Made logger protected.
  8785. * src/SegmentSplitter.cc (Constructor): Use LogFactory.
  8786. * src/SegmentMan.cc (Constructor): Use LogFactory.
  8787. * src/DownloadEngine.h : Made logger protected.
  8788. * src/DownloadEngine.cc (Constructor): Use LogFactory.
  8789. * src/PeerInteractionCommand.cc : Use Command::logger.
  8790. * src/HttpResponseCommand.cc : Use Command::logger.
  8791. * src/SegmentMan.h : Made logger private.
  8792. * src/TorrentMan.h : Made logger private.
  8793. * src/TorrentMan.cc : Use LogFactory.
  8794. * src/FtpNegotiateCommand.cc : Use Command::logger.
  8795. * src/HttpConnection.h (Constructor): Deleted the argument logger.
  8796. * src/HttpConnection.cc (Constructor): Deleted the argument logger.
  8797. Use LogFactory.
  8798. * src/FtpConnection.h (Constructor): Deleted the argument logger.
  8799. * src/FtpConnection.cc (Constructor): Deleted the argument logger.
  8800. Use LogFactory.
  8801. * src/DownloadCommand.cc : Use Command::logger.
  8802. * src/PeerAbstractCommand.cc : Use Command::logger.
  8803. * src/PeerListenCommand.cc : Use Command::logger.
  8804. * src/PeerInitiateConnectionCommand.cc : Use Command::logger.
  8805. * src/HttpInitiateConnectionCommand.cc : Use Command::logger.
  8806. * src/FtpInitiateConnectionCommand.cc : Use Command::logger.
  8807. * src/TrackerWatcherCommand.cc : Use Command::logger.
  8808. * src/TrackerUpdateCommand.cc : Use Command::logger.
  8809. * src/TrackerDownloadCommand.cc : Use Command::logger.
  8810. * src/RequestSlotMan.cc (Constructor): Deleted the argument logger.
  8811. Use LogFactory.
  8812. * src/SendMessageQueue.h (Constructor): Deleted the argument logger.
  8813. * src/SendMessageQueue.cc (Constructor): Deleted the argument logger.
  8814. Use LogFactory.
  8815. * src/main.cc (main): Use LogFactory.
  8816. * src/DiskAdaptor.h (logger): New variable.
  8817. * src/DiskAdaptor.cc (Constructor): Use LogFactory.
  8818. * src/CopyDiskAdaptor.cc (fixFilename): Added a log message.
  8819. 2006-04-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8820. * src/TrackerInitCommand.cc (TrackerInitCommand): Added a "key"
  8821. parameter to a tracker request.
  8822. * src/TorrentMan.cc (readFileEntryFromMetaInfoFile): Bug fix.
  8823. * src/TrackerWatcherCommand.cc (execute): Call req->resetTryCount().
  8824. * src/main.cc (setSignalHander): New function.
  8825. (main): Added a handler for SIGTERM.
  8826. (handler): Updated message.
  8827. (torrentHandler): Updated message.
  8828. 2006-04-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8829. * src/TorrentConsoleDownloadEngine.cc
  8830. (onPartialDownloadingCompletes): Renamed as
  8831. onSelectiveDownloadingCompletes.
  8832. (onSelectiveDownloadingCompletes): Updated message.
  8833. To add DiskAdaptor which abstract DiskWriter family:
  8834. * src/PeerConnection.cc: Use diskAdaptor instead of diskWriter.
  8835. * src/PeerInteractionCommand.cc: Use diskAdaptor instead of diskWriter.
  8836. * src/BitfieldMan.cc (isAllBitSet): bug fix.
  8837. * src/TorrentMan.cc : Included CopyDiskAdaptor.h, DirectDiskAdaptor.h,
  8838. MultiDiskAdaptor.h.
  8839. (readFileEntry): Changed its arguments.
  8840. (setup): setupDiskWriter is merged into this function.
  8841. (setupDiskWriter): Removed.
  8842. (setFileFilter): New function.
  8843. (readFileEntryFromMetaInfoFile): Updated according to the changes
  8844. made in readFileEntry.
  8845. (getFilePath): Removed.
  8846. (getTempFilePath): Removed.
  8847. (getSegmentFilePath): Updated due to the removal of getFilePath.
  8848. (fixFilename): Removed.
  8849. (copySingleFile): Removed.
  8850. (splitMultiFile): Removed.
  8851. (deleteTempFile): Removed.
  8852. (setFileEntriesToDownload): Removed.
  8853. (isPartialDownloadingMode): Renamed as isSelectiveDownloadingMode.
  8854. (isSelectiveDownloadingMode): New function.
  8855. (setAllMultiFileRequestedState): Removed.
  8856. (finishPartialDownloadingMode): Renamed as
  8857. finishSelectiveDownloadingMode.
  8858. (finishSelectiveDownloadingMode): New function.
  8859. (getPartialTotalLength): Renamed as getSelectedTotalLength.
  8860. (getSelectedTotalLength): New function.
  8861. (onDownloadComplete): Use diskAdaptor.
  8862. * src/MultiDiskWriter.cc (Constructor): Added the argument pieceLength
  8863. (Range): Removed.
  8864. (setMultiFileEntries): Renamed as setFileEntries.
  8865. (setFileEntries): New function.
  8866. * src/MultiDiskWriter.h [DiskWriterEntry](enabled): Removed.
  8867. (pieceLength): New variable.
  8868. * src/main.cc (printDownloadCompeleteMessage): New function.
  8869. (torrentHandler): Use diskAdaptor instead of diskWriter.
  8870. (main): Renamed torrent-show-files to show-files.
  8871. Rewritten file contents listing.
  8872. * src/TorrentMan.h (FileEntry): Removed.
  8873. (multiFileTopDir): Removed.
  8874. (multiFileEntries): Removed.
  8875. (diskWriter): Removed.
  8876. (diskAdaptor): New variable.
  8877. * src/DefaultDiskWriter.h (totalLength): New variable.
  8878. * src/DefaultDiskWriter.cc (initAndOpenFile): Added ftruncate.
  8879. * src/TorrentDownloadEngine.cc (onEndOfRun): Use diskAdaptor instead of
  8880. diskWriter.
  8881. * src/TorrentConsoleDownloadEngine.h
  8882. (partialDownloadLengthDiff): Renamed as selectedDownloadLengthDiff.
  8883. (partialTotalLength): Renamed as selectedTotalLength.
  8884. * src/AbstractDiskWriter.cc (openFile): If file exists, call
  8885. openExistingFile, otherwise call initAndOpenFile.
  8886. (closeFile): fd > 0, not fd != 0.
  8887. * src/DirectDiskAdaptor.h: New class.
  8888. * src/DirectDiskAdaptor.cc: New class.
  8889. * src/MultiDiskAdaptor.h: New class.
  8890. * src/MultiDiskAdaptor.cc: New class.
  8891. * src/CopyDiskAdaptor.h: New class.
  8892. * src/CopyDiskAdaptor.cc: New class.
  8893. * src/DiskAdaptor.h: New class.
  8894. * src/DiskAdaptor.cc: New class.
  8895. * src/prefs.h (PREF_TORRENT_SHOW_FILES): Renamed as PREF_SHOW_FILES
  8896. (PREF_SHOW_FILES): New definition.
  8897. 2006-04-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8898. To add the ability to download multi torrent into respective files
  8899. directly:
  8900. * src/DiskWriter.h (openFile): New function.
  8901. (seek): Removed.
  8902. * src/MultiDiskWriter.h: New class.
  8903. * src/MultiDiskWriter.cc: New class.
  8904. * src/AbstractDiskWriter.h (seek): Changed its scope from public to
  8905. protected.
  8906. (openFile): New function.
  8907. * src/AbstractDiskWriter.cc (openFile): New function.
  8908. * src/prefs.h (V_FALSE): New definition.
  8909. (PREF_DIRECT_FILE_MAPPING): New definition.
  8910. * src/TorrentMan.h (setupDiskWriter): New function.
  8911. (setAllMultiFileRequestedState): New function.
  8912. (onDownloadComplete): New function.
  8913. * src/TorrentMan.cc : Included MultiDiskWriter.h
  8914. (setupDiskWriter): New function.
  8915. (getFilePath): Updated.
  8916. (getTempFilePath): Updated.
  8917. (getSegmentFilePath): Updated.
  8918. (fixFilename): Updated.
  8919. (deleteTempFile): Updated.
  8920. (setAllMultiFileRequestedState): New function.
  8921. (setFileEntriesToDownload): Use setAllMultiFileRequestedState().
  8922. (finishPartialDownloadingMode): Reset requested flags.
  8923. (onDownloadComplete): New function.
  8924. * src/main.cc: Added --direct-file-mapping option.
  8925. Use TorrentMan::setupDiskWriter().
  8926. * src/TorrentDownloadEngine.cc (afterEachIteration): Use TorrentMan::
  8927. onDownloadComplete().
  8928. To fix ETA bug:
  8929. * src/Util.h (difftvsec): New function.
  8930. * src/Util.cc (difftvsec): New function.
  8931. * src/TorrentConsoleDownloadEngine.cc (calculateSpeed): Use int for the
  8932. type of "elapsed" instead of long long int.
  8933. (calculateStatistics): Use Util::difftvsec instead of Util::difftv.
  8934. The updates of statistics takes place every 1 seconds.
  8935. * src/TorrentConsoleDownloadEngine.h (lastElapsed): Changed its type.
  8936. (calculateSpeed): Changed its argument signature.
  8937. * src/PeerMessage.cc (toString): Fixed message.
  8938. 2006-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8939. To print ETA:
  8940. * src/TorrentDownloadEngine.cc (afterEachIteration): Added download
  8941. completion handling when dealing with
  8942. TorrentMan::isPartialDownloadingMode() == true.
  8943. * src/TorrentDownloadEngine.h (onPartialDownloadingCompletes):
  8944. New function.
  8945. * src/TorrentConsoleDownloadEngine.h (startup): New variable.
  8946. (sessionDownloadLength): New variable.
  8947. (avgSpeed): New variable.
  8948. (eta): New variable.
  8949. * src/TorrentConsoleDownloadEngine.cc (initStatistics): Initialized
  8950. new variables: eta, avgSpeed, startup.
  8951. (calculateSpeed): Calculate average speed and ETA.
  8952. (printStatistics): Added ETA.
  8953. * src/Util.h (secfmt): New function.
  8954. * src/Util.cc (secfmt): New function.
  8955. 2006-04-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8956. To detect "keep alive" flooding:
  8957. * src/PeerInteractionCommand.h (keepAliveCount): New variable
  8958. * src/PeerInteractionCommand.cc (Constructor): Initialized new
  8959. variable: keepAliveCount.
  8960. (detectMessageFlooding): Added "keep alive" flooding detection.
  8961. (receiveMessage): Increase keepAliveCount when "keep alive" message
  8962. received.
  8963. To add the ability to download only specified files in multi-file
  8964. torrent:
  8965. * src/BitfieldMan.h (filterBitfield): New variable.
  8966. (filterEnabled): New variable.
  8967. (setFilterBit): New function.
  8968. (enableFilter): New function.
  8969. (disableFilter): New function.
  8970. (isFilterEnabled): New function.
  8971. (getFilteredTotalLength): New function.
  8972. (getCompletedLength): New function.
  8973. * src/BitfieldMan.cc (Constructor): Initialized new variable:
  8974. filterBitfield, filterEnabled.
  8975. (CopyConstructor): Added filterBitfield and filterEnabled.
  8976. (operator==): Added filterBitfield and filterEnabled.
  8977. (Destructor): Added filterBitfield.
  8978. (getMissingIndex): Use filterBitfield.
  8979. (getMissingUnusedIndex): Use filterBitfield.
  8980. (getFirstMissingUnusedIndex): Use filterBitfield.
  8981. (getFirstMissingUnusedIndex): Use filterBitfield.
  8982. (getAllMissingIndexes): Use filterBitfield.
  8983. (countMissingBlock): Use filterBitfield.
  8984. (countBlock): Use filterBitfield.
  8985. (setBitInternal): Added new argument on.
  8986. (setUseBit): Use setBitInternal.
  8987. (unsetUseBit): Use setBitInternal.
  8988. (setBit): Use setBitInternal.
  8989. (unsetBit): Use setBitInternal.
  8990. (isAllBitSet): Use filterBitfield.
  8991. (setFilterBit): New function.
  8992. (addFilter): New function.
  8993. (enableFilter): New function.
  8994. (disableFilter): New function.
  8995. (clearFilter): New function.
  8996. (isFilterEnabled): New function.
  8997. (getFilteredTotalLength): New function.
  8998. (getCompletedLength): New function.
  8999. * src/TorrentMan.h [FileEntry](Constructor): Updated signature.
  9000. Initalized newly added variables.
  9001. [FileEntry](offset): New variable.
  9002. [FileEntry](extracted): New variable.
  9003. [FileEntry](requested): New variable.
  9004. (readFileEntry): New function.
  9005. (option): New variable.
  9006. (splitMultiFile): Removed const qualifier.
  9007. (fixFilename): Removed const qualifier.
  9008. (readFileEntryFromMetaInfoFile): New function.
  9009. (finishPartialDownloadingMode): New function.
  9010. (isPartialDownloadingMode): New function.
  9011. (setFileEntriesToDownload): New function.
  9012. (getCompletedLength): New function.
  9013. (getPartialTotalLength): New function.
  9014. * src/TorrentMan.cc (readFileEntry): New function.
  9015. (setup): Use readFileEntry. If no-preallocation option is specified,
  9016. use DefaultDiskWriter.
  9017. (readFileEntryFromMetaInfoFile): New function.
  9018. (fixFilename): Removed const qualifier.
  9019. (splitMultiFile): Removed const qualifier.
  9020. (setFileEntriesToDownload): New function.
  9021. (isPartialDownloadingMode): New function.
  9022. (finishPartialDownloadingMode): New function.
  9023. (getCompletedLength): New function.
  9024. (getPartialTotalLength): New function.
  9025. * src/TorrentConsoleDownloadEngine.h (partialDownloadLengthDiff):
  9026. New variable.
  9027. (partialTotalLength): New variable.
  9028. (downloadLength): New variable.
  9029. (totalLength): New variable.
  9030. * src/TorrentConsoleDownloadEngine.cc (onPartialDownloadingCompletes):
  9031. Added log.
  9032. (initStatistics): Initialized new variables: partialDownloadLengthDiff,
  9033. partialTotalLength, downloadLength, totalLength.
  9034. (calculate): Calculate downloadLength and totalLength.
  9035. * src/prefs.h :New definition PREF_NO_PREALLOCATION
  9036. * src/main.cc (addCommand): Changed argument signature.
  9037. (main): Added new variable: args. Added new option "torrent-show-files"
  9038. "no-preallocation". Usage is not updated yet.
  9039. 2006-04-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9040. * src/PeerMessage.cc (setBitfield): Fixed invalid memory de-allocation.
  9041. 2006-04-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9042. Attempt to add the ability to listing file entries in a .torrent file.
  9043. This feature is not yet complete.
  9044. * src/prefs.h (PREF_TORRENT_SHOW_FILES): New definition
  9045. * src/TorrentMan.cc (getMultiFileEntries): New function.
  9046. (getName): New function.
  9047. * src/TorrentMan.h (getMultiFileEntries): New function.
  9048. (getName): New function.
  9049. * src/main.cc (main): Use above 2 funtion.
  9050. * Release 0.3.2
  9051. 2006-03-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9052. * src/PeerInteractionCommand.cc (checkInactiveConnection): New function
  9053. (detectMessageFlooding): Updated threshold value.
  9054. (checkLongTimePeerChoking): Updated timeout value.
  9055. (getNewPieceAndSendInterest): Added debug log.
  9056. * src/PeerInteractionCommand.h (checkInactiveConnection): New function
  9057. * src/TorrentMan.cc (deleteOldErrorPeers): Updated.
  9058. (getPeer): Updated.
  9059. * src/TorrentMan.h: Added MAX_PEER_ERROR.
  9060. * src/PeerAbstractCommand.cc (onAbort): Increment error counter.
  9061. * src/PeerListenCommand.cc (execute): Close connection if incoming peer
  9062. is localhost.
  9063. * src/main.cc (main): Updated PREF_PEER_CONNECTION_TIMEOUT to 60.
  9064. * src/PendingMessage.cc (processMessage): Not to send piece message
  9065. if peer is not interested in the pieces localhost has.
  9066. * src/Peer.cc (shouldChoke): Updated.
  9067. * src/SendMessageQueue.cc (cancelAllRequest): Fixed.
  9068. * src/Util.cc (isPowerOf): New function.
  9069. * src/Util.h (isPowerOf): New function.
  9070. * src/PeerMessageUtil.cc (checkLength): Added a check for length
  9071. whether or not it is power of 2.
  9072. 2006-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9073. Added new class SendMessageQueue that includes PendingMessages and
  9074. RequestSlotMan.
  9075. * src/SendMessageQueue.h: New class.
  9076. * src/SendMessageQueue.cc: New class.
  9077. * src/PendingMessage.h: Added new member variable blockIndex and its
  9078. accessors.
  9079. (createRequestMessage): Updated.
  9080. * src/PendingMessage.cc (createRequestMessage): Updated.
  9081. * src/PeerInteractionCommand.cc (executeInternal): Updated with
  9082. SendMessageQueue.
  9083. (checkLongTimePeerChoking): Updated with SendMessageQueue.
  9084. (receiveMessage): Updated with SendMessageQueue.
  9085. (deletePendingPieceMessage): Removed.
  9086. (getNewPieceAndSendInterest): Updated with SendMessageQueue.
  9087. (sendInterest): Updated with SendMessageQueue.
  9088. (createRequestPendingMessage): Updated with SendMessageQueue.
  9089. (sendMessages): Updated with SendMessageQueue.
  9090. (onAbort): Updated with SendMessageQueue.
  9091. (keepAlive): Updated with SendMessageQueue.
  9092. (beforeSocketCheck): Updated SendMessageQueue.
  9093. * src/PeerInteractionCommand (sendMessages): Shuffle
  9094. missingBLockIndexes before using it.
  9095. Added its own timeout for peer connection.
  9096. * src/PeerAbstractCommand.h: Added member variable timeout and its
  9097. setter.
  9098. * src/prefs.h: Added PREF_PEER_CONNECTION_TIMEOUT.
  9099. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  9100. Added setTimeout() call.
  9101. (executeInternal): Added setTimeout() call.
  9102. * src/PeerAbstractCommand.cc (PeerAbstractCommand):
  9103. Added timeout.
  9104. (isTimeoutDetected): Updated.
  9105. * src/main.cc (main): Added PREF_PEER_CONNECTION_TIMEOUT entry to
  9106. option.
  9107. Added *simple* message flooding checker.
  9108. * src/PeerInteractionCommand.cc (executeInternal):
  9109. Added detectMessageFlooding() call.
  9110. (detectMessageFlooding): New function.
  9111. (receiveMessage): Count up CHOKE, UNCHOKE, HAVE message.
  9112. (beforeSocketCheck): Added detectMessageFlooding() call.
  9113. * src/PeerInteractionCommand.h: Added sendMessageQueue,
  9114. chokeUnchokeCount, haveCount, detectMessageFlooding().
  9115. Removed deletePendingPieceMessage(), getRequestSlot(),
  9116. deleteRequestSlot(), deleteAllRequestSlot().
  9117. * src/PeerInteractionCommand.cc (beforeSocketCheck):
  9118. Added checkLongTimePeerChoking() call.
  9119. * src/RequestSlotMan.h: Renamed deleteTimeoutRequestSlot().
  9120. * src/TorrentMan.cc (addPeer): Delete at most MAX_PEER_LIST_SIZE peers
  9121. if duplicate == false.
  9122. The parameter "uploaded" and "downloaded" in the tracker request are
  9123. the size since the client sent the "started" event to the tracker.
  9124. * src/TorrentMan.cc (setup): Assigned saved downloaded Size and
  9125. uploaded size to preDownloadedSize, preUploadedSize respectively.
  9126. * src/TorrentMan.h: Added preDownloadedSize, preUploadedSize,
  9127. getSessionDownloadedSize(), getSessionUploadedSize().
  9128. * src/TrackerInitCommand.cc (execute): Use getSessionDownloadedSize(),
  9129. getSessionUploadedSize() instead of getDownloadedSize(),
  9130. getUploadedSize().
  9131. * src/PendingMessage.cc (processMessage): Do not send request message
  9132. if the peer is choking the client.
  9133. * src/TrackerUpdateCommand.cc (execute): Check wtheher minInterval is
  9134. less than interval.
  9135. 2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9136. * configure.in: Added gnutls support. Added several CPP macros.
  9137. * m4/openssl.m4: Added.
  9138. * src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
  9139. readData(), peekData(). Added gnutls support.
  9140. * src/HttpDownloadCommand.cc: Removed SleepCommand.h
  9141. * src/TrackerWatcherCommand.{h,cc}: Added. This command creates
  9142. TrackerInitCommand periodicaly(TorrentMan::minInterval).
  9143. * src/TorrentMan.cc: Remove downloadedSize == 0 check from save().
  9144. Instead, added a check for whether setup method has executed
  9145. successfully.
  9146. * src/TorrentMan.h: Added member vaiable setupComplete. Updated
  9147. DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to 300.
  9148. * src/Makefile.am: Updated.
  9149. * src/messageDigest.h: Added. This is a macro calculating SHA1 digest
  9150. using whether OpenSSL or gcrypt, depending on the result of configure
  9151. script.
  9152. * src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by using
  9153. messageDigest.h.
  9154. * src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
  9155. * src/PeerListenCommand.cc: Added log about port binded successfully.
  9156. Fixed memory leak.
  9157. * src/main.cc: Added gnutls support. Replaced LIB_SSL with
  9158. ENABLE_BITTORRENT where they are not related to OpenSSL but BitTorrent.
  9159. Removed instantiation of TrackerInitCommand. Instead,
  9160. TrackerWatcherCommand is instantiated and pushed to the command queue.
  9161. * src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL with
  9162. ENABLE_SSL.
  9163. * src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
  9164. * src/RequestSlotMan.cc (deleteCompletedRequestSlot):
  9165. If a piece is already acquired by another command, delete the request
  9166. slots for the piece.
  9167. * src/TrackerUpdateCommand.cc (execute):
  9168. Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to warn.
  9169. Added a check whether peer list is null.
  9170. Fixed the bug that causes sending completed event to the tracker
  9171. several times.
  9172. * src/TrackerInitCommand.cc (execute):
  9173. Fixed the bug that causes sending completed event to the tracker
  9174. several times.
  9175. * src/AbstractDiskWriter.{h,cc}: Removed direct dependency on OpenSSL
  9176. by using messageDigest.h.
  9177. 2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9178. * PeerConnection.cc: Replaced log message "keep-alive" with
  9179. "keep alive".
  9180. * PeerInteractionCommand.{h,cc}: Close connection if peer is choking
  9181. localhost long time.
  9182. * TorrentMan.cc: When adding new peer with duplicate = true, if the
  9183. number of peer list is equal to or grater than MAX_PEER_LIST, delete
  9184. at most 100 failure entry from the list. If with duplicate = false,
  9185. MAX_PEER_LIST is not checked.
  9186. * PeerListenCommand.cc: Fixed the argument order of log message.
  9187. 2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9188. * Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
  9189. Added warn().
  9190. * SimpleLogger.h: Moved enum LEVEL to Logger.h.
  9191. Implemented warn().
  9192. Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated code.
  9193. 2006-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9194. * Request.h: Added AFTER_COMPLETED event.
  9195. * TorrentDownloadEngine.cc: Prints "Download complete" message
  9196. instead of downloaded size and progress(%) after download completes.
  9197. * PeerInteractionCommand.cc: After download completes, sends unchoke
  9198. message to the peer if it is interested in what localhost has
  9199. downloaded.
  9200. * TorrentMan.cc: In single-file mode, copy temporary file to the final
  9201. destination instead of just renaming it.
  9202. * TorrentMan.cc: Added deleteTempFile().
  9203. * PeerAbstractCommand.cc: do not stop execution after download
  9204. completes. This makes localhost a seeder.
  9205. * Util.{h,cc}: Added fileCopy().
  9206. * PeerListenCommand.cc: do not stop execution after download completes.
  9207. This makes localhost a seeder.
  9208. * main.cc: Do not call TorrentMan::fixFilename() in torrentHandler.
  9209. Added TorrentMan::deleteTempFile() to torrentHandler.
  9210. Initialized the variable dir as ".".
  9211. * TorrentMan.h: Changed DEFAULT_ANNOUNCE_INTERVAL to 120 seconds.
  9212. Deleted renameSingleFile().
  9213. Added copySingleFile(), deleteTempFile().
  9214. * DownloadEngine.h: Added virtual function afterEachIteration().
  9215. * TorrentDownloadEngine.cc: Move a call to TorrentMan::fixFilename()
  9216. in onEndOfRun() to afterEachIteration().
  9217. In onEndOfRun(), changed if condition to check whether filenameFixed is
  9218. true.
  9219. * Util.cc: Implemented fileCopy() using rangedFileCopy().
  9220. In rangedFileCopy(), added try-catch block to properly close file
  9221. descriptors.
  9222. * TorrentDownloadEngine.cc: Added a member variable filenameFixed.
  9223. Added afterEachIteration(), isFilenameFixed().
  9224. * Peer.cc: Changed choking strategy.
  9225. * PreAllocationDiskWriter.cc: Drop O_DIRECT flag.
  9226. * TrackerInitCommand.cc: Send completed event only once.
  9227. * DownloadEngine.cc: Added a call to afterEachIteration().
  9228. * TrackerUpdateCommand.cc: Do not stop execution after download
  9229. completes.
  9230. * TorrentMan.h: Defined MAX_PEER_UPDATE as 15. aria2 attempts to
  9231. connect the peers at most MAX_PEER_UPDATE when a peer list is
  9232. received from a tracker.
  9233. * TrackerUpdateCommand.cc: Implemented above mentioned behavior.
  9234. Decreased the number of failure peers to delete to 0(just comment out
  9235. the line).
  9236. * Release 0.3.1
  9237. 2006-03-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9238. * PeerInteractionCommand.cc: added a call to
  9239. TorrentMan::unadvertisePiece in Destructor.
  9240. * PeerInteractionCommand.cc: make have message sent immediately
  9241. if the size of pending message queue is zero.
  9242. * TorrentMan.cc: set the maximum size of peer list to 250.
  9243. * TorrentMan.h: changed the container type of Peers and UsedPieces
  9244. to deque.
  9245. * Util.cc: fixed rangedFileCopy.
  9246. * AbstractDiskWriter.{h,cc}: moved digest context initialization
  9247. to Constructor. Also, moved digest cleanup to Destructor.
  9248. * MetaFileUtil.cc: fixed memory leak
  9249. * replaced std::vector with std::deque.
  9250. * AbstractCommand.cc: casted timeout value to long long int.
  9251. * ChunkedEncoding.cc: fixed memory leak.
  9252. * PeerInteractionCommand.cc: casted timeout value to long long int.
  9253. * SleepCommand.cc: casted timeout value to long long int.
  9254. * Data.cc: fixed memory leak.
  9255. * Data.cc: fixed toLLInt().
  9256. * BitfieldMan.cc: fixed memory leak.
  9257. * TorrentMan.cc: initialized storeDir to ".".
  9258. * TorrentMan.cc: fixed memory leak.
  9259. * TorrentMan.cc: corrected file paths of splitted files.
  9260. * PeerAbstractCommand.cc: casted timeout to long long int.
  9261. * main.cc: added delete(req) and delete(te->diskWriter).
  9262. * RequestSlot.cc: casted timeout value to long long int.
  9263. * Request.cc: fixed memory leak.
  9264. * PendingMessage.cc: make HAVE messages sent only when peer does not
  9265. have the piece.
  9266. * Peer.{h,cc}: added hasPiece(int index).
  9267. * main.cc: corrected addCommand.
  9268. 2006-03-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9269. * BitTorrent protocol support added.
  9270. * Release 0.3.0
  9271. 2006-03-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9272. * SocketCore.cc: remove the assignment of addrinfo.ai_addr.
  9273. 2006-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9274. * ChunkedEncoding.{h,cc}: fixed the bug that if chunk data is binary,
  9275. decoding did not work properly.
  9276. 2006-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9277. * DownloadEngine.h: included sys/time.h
  9278. * DownloadEngine.cc: remove sys/time.h
  9279. * Makefile.am (SUBDIRS): Add intl.
  9280. * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
  9281. 2006-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9282. * main.cc: correct help message for --http-auth-scheme.
  9283. * main.cc: changed e-mail address for bug reports.
  9284. * ja.po: added japanese translation.
  9285. 2006-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9286. * SimpleLogger.cc: flush log file instead of stdout.
  9287. 2006-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9288. * main.cc: Fixed command-line option: max-tries
  9289. * HttpResponseCommand.cc: Make the request re-sent only if req->seg.sp
  9290. does not equal to seg.sp.
  9291. * DownloadCommand.cc: If EOF is got from the server and the total size
  9292. of file is not zero, then throw DlRetryEx.
  9293. * main.cc: Set the minium value of min-segment-size to 1024.
  9294. * HttpResponseCommand.cc: Fixed the bug that http segmented downloading
  9295. fails because of a regression since 0.2.0 release.
  9296. 2006-03-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9297. * HttpConnection.cc:
  9298. * common.h: defined the user agent name as macro
  9299. * DownloadEngine.{h, cc}:
  9300. * ConsoleDownloadEngine.{h, cc}: Console output message(size, speed)
  9301. is now generated by ConsoleDownloadEngine not by DownloadEngine.
  9302. * main.cc: Download complete/abort message is now generated by main.
  9303. * Makefile.am (SUBDIRS): Add m4.
  9304. (ACLOCAL_AMFLAGS): New variable.
  9305. (EXTRA_DIST): New variable.
  9306. * configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
  9307. * gettext: added gettext functionality
  9308. 2006-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9309. * AbstractCommand.cc:
  9310. * DownloadCommand.{h, cc}: Aborted downloading commands now properly
  9311. unregister its cuid from SegmentMan.
  9312. * DownloadEngine.cc: .aria2 file was written when a downloading
  9313. failed with errors.
  9314. * HttpConnection.cc: Added "Proxy-Connection" header to proxy request.
  9315. Added "User-Agent" header to CONNECT proxy request.
  9316. Fixed "Proxy-Authorization" header. Now proxy authorization works
  9317. properly.
  9318. * Logger.h:
  9319. * SimpleLogger.{h,cc}: Changed the type of msg to const char*.
  9320. * ChunkedEncoding.cc: Added #include directive for strings.h
  9321. * Release 0.2.1
  9322. 2006-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9323. * Util.{h,cc}: added startsWith().
  9324. * CookieBox.cc: rewrited criteriaFind() using Util::startsWith() and
  9325. Util::endsWith().
  9326. * SocketCore.cc: struct addrinfo is now zero-initialized.
  9327. * common.h: added #include directive of limit.h.
  9328. * DownloadEngine.cc: added #include directive of sys/time.h and
  9329. algorithm.
  9330. * Exception.h: added #include directive of stdio.h.
  9331. * AbstractCommand.h: added #include directive of sys/time.h.
  9332. * DownloadCommand.h: added #include directive of sys/time.h.
  9333. * *.h: added #include directive of common.h to all base classes.
  9334. subclasses' one was removed.
  9335. * common.h: defined LONG_LONG_MAX and LONG_LONG_MIN if a compiler
  9336. does not define these macros.
  9337. 2006-02-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9338. * Release 0.2.0
  9339. * main.cc:
  9340. * HttpInitiateConnectionCommand.{h,cc}:
  9341. * prefs.h:
  9342. * HttpConnection.{h,cc}: added --http-proxy-method option.
  9343. We can now use GET command in http proxy.
  9344. 2006-02-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9345. * SplitSlowestSegmentSplitter.{h,cc}: This class provies algorithm
  9346. that splits slowest segment of SegmentMan::commands vector.
  9347. This is the default split algorithm of aria2.
  9348. * SplitFirstSegmentSplitter.{h,cc}: This class provides algorithm
  9349. that splits first segment of SegmentMan::commands vector.
  9350. * SegmentSplitter.{h,cc}: Added. This class provides split algorithm.
  9351. * DownloadCommand.{h,cc}: Added downloading speed calculation.
  9352. * Segment.h:
  9353. * SegmentMan.cc: Added speed field to Segment.h
  9354. * main.cc: -s option now affects all URLs in command-line arguemtns.
  9355. * HttpResponseCommand.cc: Fixed bug that segment file is not loaded.
  9356. * message.h: Change file size related %d to %lld.
  9357. 2006-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9358. * FtpInitiateConnectionCommand.{h,cc}:
  9359. * FtpNegotiationCommand.{h,cc}:
  9360. * FtpDownloadCommand.{h,cc}:
  9361. * FtpConnection.{h,cc}: Added FTP support
  9362. * SimpleLogger.cc: Log message now includes time information.
  9363. * main.cc: The value of --http-auth-scheme option is chagned from
  9364. 'BASIC' to 'basic'
  9365. * main.cc: Added --timeout command-line option.
  9366. * main.cc: Added --min-segment-size command-line option.
  9367. * main.cc: Added --max-retries command-line option.
  9368. * prefs.h: option string constants are now defined in prefs.h
  9369. 2006-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9370. * AbstractCommand.cc: Fixed timeout bug in AbstractCommand
  9371. * SegmentMan.cc: Added totalSize entry to .aria2 file. No compatibility
  9372. with version 0.1.0's one.
  9373. 2006-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9374. * configure.in: Added --enable-ssl option to configure script.
  9375. * HttpConnection.cc: Make Request-URI an absolute path. Some servers
  9376. cannot permit absoluteURI as Request-URI.
  9377. * HttpConnection.cc: Added Referer support.
  9378. * main.cc: Added referer command-line option.
  9379. * main.cc: Added rety-wait command-line option.
  9380. * Exception.h: Fixed formating bug in Exception::setMsg()
  9381. * SocketCore.{h,cc}:
  9382. * Socket.{h, cc}:
  9383. * Request.cc:
  9384. * InitiateConnectionCommandFactory.cc:
  9385. * HttpRequestCommand.cc: Added HTTPS support.
  9386. * SocketCore.{h,cc}: Added SocketCore. Socket becomes a handle class
  9387. for SocketCore.
  9388. * ChunkedEncoding.cc: Fixed bug in ChunkedEncoding: expanding buffer
  9389. size is wrong
  9390. * DownloadCommand.cc: Fixed bug in DownloadCommand: In Chunked
  9391. Encoding, it wrongly adds to Segment.ds buff length from the socket.
  9392. 2006-02-17 Tatsuhiro Tsujikawa <tsujikawa at rednoah dot com>
  9393. * Release 0.1.0