ChangeLog 350 KB

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