ChangeLog 380 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598
  1. 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2. Added gzip, deflate decoding support in HTTP using libz. If compiled
  3. with this feature, aria2 sends "Accept-Encoding: deflate, gzip" header
  4. to a HTTP server. If a server returns "Content-Encoding: gzip" or
  5. "Content-Encoding: deflate" then, aria2 decodes the response body on the
  6. fly and writes decoded data to a local disk.
  7. * README
  8. * README.html
  9. * configure.ac
  10. * m4/aria2_arg.m4: Added ARIA2_ARG_WITH and ARIA2_ARG_ENABLE, they are
  11. wrapper function for AC_ARG_WITH and AC_ARG_ENABLE respectively.
  12. * m4/libz.m4
  13. * src/Decoder.h
  14. * src/DownloadCommand.cc
  15. * src/DownloadCommand.h
  16. * src/Exception.h
  17. * src/GZipDecoder.cc
  18. * src/GZipDecoder.h
  19. * src/HttpHeader.cc
  20. * src/HttpHeader.h
  21. * src/HttpRequest.cc
  22. * src/HttpRequest.h
  23. * src/HttpResponse.cc
  24. * src/HttpResponse.h
  25. * src/HttpResponseCommand.cc
  26. * src/Makefile.am
  27. * test/GZipDecoderTest.cc
  28. * test/HttpRequestTest.cc
  29. * test/HttpResponseTest.cc
  30. * test/Makefile.am
  31. * test/Makefile.in
  32. * test/gzip_decode_test.gz
  33. 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  34. Clarified usage of -j option.
  35. * src/usage_text.h
  36. 2008-06-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  37. Disabled getting size from the response of RETR.
  38. If SIZE command failed, then disable resuming and segmented downloading.
  39. * src/FtpConnection.cc
  40. * src/FtpConnection.h
  41. * src/FtpNegotiationCommand.cc
  42. * src/FtpNegotiationCommand.h
  43. 2008-06-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  44. Use digits to find first byte of file size, which makes the intention
  45. of the code clearer.
  46. * src/FtpConnection.cc
  47. Don't call validateTotalLength() when size is 0.
  48. * src/FtpNegotiationCommand.cc
  49. 2008-06-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  50. Updated po files.
  51. * po/aria2c.pot
  52. * po/*.gmo
  53. * po/*.po
  54. 2008-06-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  55. Clarified usage text for --split option.
  56. * src/usage_text.h
  57. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  58. Bump up version number to 0.15.0dev. "dev" means "development"
  59. version, which means I started the development of the next release!
  60. * src/configure.ac
  61. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  62. If FTP server returns negative response with REST raw command and
  63. requested range is not 0, throw exception. If requested range is 0,
  64. continue download a file from 0 byte.
  65. * src/FtpNegotiationCommand.cc
  66. * src/FtpNegotiationCommand.h
  67. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  68. Supported FTP server which don't recognize SIZE raw command.
  69. If SIZE raw command is failed, aria2 will try to get file size
  70. from the response of RETR raw command. If both attempts are failed,
  71. then resuming and segmented downloading are disabled.
  72. * src/FtpConnection.cc
  73. * src/FtpConnection.h
  74. * src/FtpNegotiationCommand.cc
  75. * src/FtpNegotiationCommand.h
  76. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  77. * Release 0.14.0+1
  78. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  79. Bump up version number to 0.14.0+1
  80. * src/configure.ac
  81. 2008-06-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  82. Fixed the code that refers static member variable from non-static
  83. context.
  84. * src/DefaultPeerStorage.cc
  85. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  86. * Release 0.14.0
  87. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  88. Added build test script
  89. * build_test.sh
  90. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  91. Updated ja.po
  92. * src/ja.po
  93. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  94. Bump up version number to 0.14.0
  95. * src/configure.ac
  96. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  97. Updated ja.po and fr.po. Great thanks for french translators and
  98. Sebastien WILLEMIJNS.
  99. * po/fr.po
  100. * po/ja.po
  101. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  102. Added configure option to enable/disable epoll support.
  103. * configure.ac
  104. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  105. Updated man page.
  106. * doc/aria2c.1.txt
  107. * doc/aria2c.1
  108. * doc/aria2c.1.html
  109. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  110. Added missing default value '5' to the usage of --split option.
  111. * src/HelpItemFactory.cc
  112. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  113. Filled up pieces based on the number of missing blocks, rather than
  114. simplay the number of piece * block length.
  115. * src/BtRequestFactory.h
  116. * src/DefaultBtInteractive.cc
  117. * src/DefaultBtInteractive.h
  118. * src/DefaultBtRequestFactory.cc
  119. * src/DefaultBtRequestFactory.h
  120. * src/Piece.cc
  121. * src/Piece.h
  122. * test/BitfieldManTest.cc
  123. * test/DefaultBtRequestFactoryTest.cc
  124. * test/MockBtRequestFactory.h
  125. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  126. Made _epEvents a member variable.
  127. * src/DownloadEngine.cc
  128. * src/DownloadEngine.h
  129. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  130. Cancel download if http redirect is bounded more than 20 times.
  131. * src/AbstractCommand.cc
  132. * src/HttpSkipResponseCommand.cc
  133. * src/Request.cc
  134. * src/Request.h
  135. * test/RequestTest.cc
  136. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  137. Fixed unhandled exception(removed keyword `new').
  138. * src/SocketCore.cc (initEPOLL)
  139. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  140. Removed visit(const MetaEntry*)
  141. * src/MetaEntryVisitor.h:
  142. Added visit(const Data*),visit(const Dictionary*),visit(const List*)
  143. and made them virtual.
  144. * src/BencodeVisitor.h
  145. * src/BencodeVisitor.cc
  146. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  147. Updated po files.
  148. * po/aria2c.pot
  149. * po/*.po
  150. * po/*.gmo
  151. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  152. Moved the call setWriteCheckSocket inside the previous clause to reduce
  153. the number of socket to watch out.
  154. * src/PeerInteractionCommand.cc
  155. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  156. When there is not enough space in disk when writing a chunk of data,
  157. aria2 now prints the message to the console to warn user and aborts
  158. its download. Not all downloads are canceled because some downloads
  159. may use another disk or partition. BUG#1640332
  160. * src/AbstractDiskWriter.cc
  161. * src/PeerAbstractCommand.cc
  162. * src/PeerAbstractCommand.h: Added onFailure() function for override.
  163. * src/PeerInteractionCommand.cc: In onFailure(), call RequestGroup::
  164. setHaltRequested(true) to cancel download.
  165. * src/PeerInteractionCommand.h
  166. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  167. Applied Ross's aria2-0.13.2+1-mingw-5.patch, which changes the type of
  168. socket from int to sock_t as sockets are unsigned in Windows.
  169. For AsyncNameResolver, DownloadEngine, I did additional modification
  170. for the portion of the code changed according to epoll support.
  171. I defined sock_t in a2netcompat.h to use sock_t without including
  172. SocketCore.h.
  173. * src/AsyncNameResolver.cc
  174. * src/AsyncNameResolver.h
  175. * src/DownloadEngine.cc
  176. * src/DownloadEngine.h
  177. * src/SocketCore.cc
  178. * src/SocketCore.h
  179. * src/a2netcompat.h
  180. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  181. Applied Ross's aria2-0.13.2+1-mingw-4.patch. With this change, all
  182. changes in the patch were applied.
  183. * test/DHTConnectionImplTest.cc: Fixed unit test error in MinGW.
  184. * test/DefaultPieceStorageTest.cc: Fixed unit test error in MinGW.
  185. * test/PeerMessageUtilTest.cc: Fixed unit test error in MinGW.
  186. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  187. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this change,
  188. a2io.h and common.h were modified.
  189. * src/a2io.h: Changed seek/stat/tell calls to use 64 bit versions in
  190. MinGW.
  191. * src/common.h: Changed off_t to 64 bit in MinGW.
  192. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  193. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
  194. only a2netcompat.h is modified.
  195. * src/a2netcompat.h: Removed unused getaddrinfo related #define
  196. directives.
  197. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  198. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
  199. only gai_strerror.h is modified.
  200. * src/gai_strerror.h: Fixed gai_strerror() function to report all
  201. winsock errors in MinGW.
  202. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  203. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit, only the
  204. follow sources are applied.
  205. * src/Platform.h: I removed HAVE_WINSOCK2_H directive from Platform.h.
  206. * src/Platform.cc: Moved common setup/teardown code to Platform class.
  207. I moved #endif // HAVE_WINSOCK2_H to the front of #include "DlAbortEx.h"
  208. I included locale.h from Platform.cc.
  209. * src/main.cc: Moved common setup/teardown code to Platform class.
  210. * test/AllTest.cc: Use Platform class.
  211. Set locale to C in AllTest.cc to prevent the messages to be localized.
  212. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  213. Applied Ross's aria2-0.13.2+1-mingw-3.patch.
  214. * test/HttpHeaderTest.cc: Casted to off_t where it should.
  215. * test/HttpRequestTest.cc: Casted to off_t where it should.
  216. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  217. Applied Ross's aria2-0.13.2+1-mingw.patch and
  218. aria2-0.13.2+1-mingw-2.patch.
  219. * src/ConsoleStatCalc.cc: Added HAVE_TERMIOUS_H directive for the
  220. systems which don't have termious.h. I moved the directive inside of
  221. if(isTTY) { ... clause so that line is wiped out without termious.h.
  222. I also removed HAVE_ASCTIME_R clause because asctime_r is provided
  223. anyway.
  224. * src/asctime_r.h
  225. * src/asctime_r.c: Added for the systems don't have asctime_r function.
  226. I added 2nd argument to the prototype declaration.
  227. * src/StringFormat.cc: Get rid of vasprintf.
  228. * src/getaddrinfo.h: Fixed constants.
  229. * configure.ac: Added the check for asctime_r function.
  230. * src/Makefile.am: Added conditional based on HAVE_ASCTIME_R
  231. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  232. Added writable test for Socket when the sending message is in progress.
  233. Usually the sending message is piece message. Without wriable check,
  234. upload latency is dropped to more than 1sec.
  235. * src/PeerInteractionCommand.cc
  236. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  237. Create only requested files and files which shares a piece with
  238. requested file in multi-torrent downloads. Directory structures are
  239. also created in the same rule.
  240. MultiDiskAdaptor::fileExists() now uses FileEntry instead of
  241. DiskWriterEntry as in the previous implementation.
  242. * src/MultiDiskWriter.cc
  243. * src/MultiFileAllocationIterator.cc
  244. * src/MultiFileAllocationIterator.h
  245. * test/MultiFileAllocationIteratorTest.cc
  246. 2008-06-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  247. Commented out -lprofiler
  248. * src/Makefile.am
  249. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  250. Bump up version number to 0.14.0b.
  251. * src/configure.ac
  252. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  253. Actively establish connection to peers in seeding, when peer cache
  254. is not full and max upload speed limit is not reached.
  255. * src/ActivePeerConnectionCommand.cc
  256. * src/ActivePeerConnectionCommand.h
  257. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  258. Always remove a peer from cache in DefaultPeerStorage::returnPeer(),
  259. to make room more fleshy, recently found peers.
  260. Peer::_badConditionStartTime is not used anymore. Consider to remove
  261. it.
  262. * src/DefaultPeerStorage.cc
  263. * test/DefaultPeerStorageTest.cc
  264. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  265. Returns cached data only when the previous receiveHandshake() is called
  266. with peek = true.
  267. * src/PeerConnection.cc (receiveHandshake)
  268. * src/PeerConnection.h (receiveHandshake)
  269. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  270. Changed default value of -s option from 1 to 5.
  271. Also max value of -s option is changed from 5 to 16.
  272. * src/HelpItemFactory.cc
  273. * src/OptionHandlerFactory.cc
  274. * src/option_processing.cc
  275. * src/usage_text.h
  276. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  277. Changed -s options behavior. Now it means the number of connections
  278. made simultaneously in each http/ftp download.
  279. If 1 URL is specified, the behavior is the same with old implementation.
  280. If -s N is given and more than N URLs are specified, first N URLs are
  281. used and remaining URLs are used for backup. If less than N URLs are
  282. specified, some of URLs are used more than once so that totally N
  283. connections are made simultaneously.
  284. * src/main.cc
  285. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  286. Included missing iosfwd or ostream header.
  287. * src/RequestGroupMan.cc
  288. * src/TaggedItem.cc
  289. * src/TaggedItem.h
  290. * src/Util.cc
  291. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  292. * src/HttpHeaderProcessor.cc: Rewritten using std::string as a buffer.
  293. * src/HttpHeaderProcessor.h: Rewritten using std::string as a buffer.
  294. * src/HttpConnection.cc: Included missing sstream.
  295. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  296. Added --bt-max-open-files option.
  297. * src/DefaultPieceStorage.cc
  298. * src/HelpItemFactory.cc
  299. * src/MultiDiskAdaptor.cc
  300. * src/MultiDiskAdaptor.h
  301. * src/OptionHandlerFactory.cc
  302. * src/option_processing.cc
  303. * src/prefs.cc
  304. * src/prefs.h
  305. * src/usage_text.h
  306. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  307. Fixed the bug that aria2 aborts when a path to a directory is given
  308. in command-line.
  309. * src/ProtocolDetector.cc
  310. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  311. Limited the number files opened in each BitTorrent download. The default
  312. value is 100. The option to change this value will be added.
  313. * src/MultiDiskAdaptor.cc
  314. * src/MultiDiskAdaptor.h
  315. * src/MultiFileAllocationIterator.cc
  316. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  317. Fixed the bug that HTTP downloads don't start with old libraries.
  318. * src/HttpHeaderProcessor.cc
  319. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  320. Use empty() instead of size() > 0.
  321. * src/HttpConnection.cc
  322. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  323. Drop connection if the incoming peer ID is the same with localhost's
  324. one. The previous implementation drops connection when incoming peer's
  325. IP address is the same with localhost's one.
  326. * src/PeerListenCommand.cc
  327. * src/DefaultBtInteractive.cc
  328. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  329. Returns cached data without checking whether socket is readable
  330. if the cache is available.
  331. * src/PeerConnection.cc (receiveHandshake)
  332. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  333. Included stdint.h
  334. * src/common.h
  335. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  336. Removed duplicate HAVE_GETTIMEOFDAY
  337. * src/Makefile.am
  338. * src/Makefile.in
  339. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  340. Use interval as a minInterval when minInterval is not supplied.
  341. * src/DefaultBtAnnounce.cc
  342. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  343. Made DEFAULT_ANNOUNCE_INTERVAL 120, so that if first tracker request
  344. attempt is failed, then 2nd attempt get kicked out more quickly.
  345. And it is now static const member of DefaultBtAnnounce.
  346. * src/DefaultBtAnnounce.h
  347. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  348. Renamed BtRuntime::lessThanMinPeers() and BtRuntime::lessThanEqMinPeers.
  349. Made MAX_PEERS and MIN_PEERS static const members of BtRuntime.
  350. * src/ActivePeerConnectionCommand.cc
  351. * src/BtConstants.h
  352. * src/BtRuntime.h
  353. * src/DHTGetPeersCommand.cc
  354. * src/DefaultBtAnnounce.cc
  355. * src/DefaultPeerStorage.cc: Calculate maxPeerListSize based on
  356. BtRuntime::MAX_PEERS.
  357. * src/DefaultPeerStorage.h
  358. * src/InitiatorMSEHandshakeCommand.cc
  359. * src/PeerInitiateConnectionCommand.cc
  360. * src/PeerInteractionCommand.cc
  361. * src/PeerReceiveHandshakeCommand.cc
  362. * src/TrackerWatcherCommand.cc
  363. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  364. Always Connect to _numNewConnection
  365. * src/ActivePeerConnectionCommand.cc
  366. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  367. Made `begin' unsigned int.
  368. * src/GrowSegment.h
  369. * src/Piece.cc
  370. * src/Piece.h
  371. * src/PiecedSegment.cc
  372. * src/PiecedSegment.h
  373. * src/Segment.h
  374. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  375. Calculate piece hash when data is arrived if the data is arrived in
  376. order. This removes additional read operation for hash calculation.
  377. If the data is arrived in out of order, the hash is calucated when the
  378. piece is completed. This is the same behavior as the old implementation.
  379. * src/BtPieceMessage.cc
  380. * src/DefaultBtProgressInfoFile.cc
  381. * src/DefaultPieceStorage.cc
  382. * src/DownloadCommand.cc
  383. * src/DownloadCommand.h
  384. * src/DownloadEngine.cc
  385. * src/GrowSegment.cc
  386. * src/GrowSegment.h
  387. * src/Piece.cc
  388. * src/Piece.h
  389. * src/PiecedSegment.cc
  390. * src/PiecedSegment.h
  391. * src/Segment.h
  392. * test/PieceTest.cc
  393. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  394. Try to keep the ordering of outgoing piece message.
  395. * src/DefaultBtMessageDispatcher.cc
  396. (DefaultBtMessageDispatcher::sendMessages)
  397. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  398. Fixed busy loop when error/hup epoll events occur.
  399. * src/AbstractCommand.cc
  400. * src/PeerAbstractCommand.cc
  401. 2008-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  402. Added --bt-request-peer-speed-limit option, which was a constant
  403. SLOW_SPEED_THRESHOLD.
  404. * src/ActivePeerConnectionCommand.cc
  405. * src/ActivePeerConnectionCommand.h
  406. * src/BtConstants.h
  407. * src/HelpItemFactory.cc
  408. * src/OptionHandlerFactory.cc
  409. * src/PeerReceiveHandshakeCommand.cc
  410. * src/option_processing.cc
  411. * src/prefs.cc
  412. * src/prefs.h
  413. * src/usage_text.h
  414. 2008-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  415. Removed repeated call of getTopDirPath(). Instead, call it once and
  416. cache the result.
  417. * src/MultiDiskAdaptor.cc
  418. * src/MultiDiskAdaptor.h
  419. (mkdir, openFile, initAndOpenFile, openExistingFile)
  420. 2008-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  421. Fixed compile error on debian etch.
  422. The libc6 shipped with debian etch doesn't define ULLONG_MAX properly
  423. even if _GNU_SOURCE is defined. So define ULLONG_MAX in case when
  424. it is undefined.
  425. * src/Util.cc (ULLONG_MAX)
  426. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  427. Added epoll support. Use epoll if it is available. If not, use select.
  428. When async dns is enabled in compile time, epoll support is enabled
  429. only when aria2 is built with c-ares. This condition statement is
  430. defined in a2io.h.
  431. Currently aria2 supports both c-ares and ares, but ares is maintained
  432. for quite a while and debian already has c-ares package, ares support
  433. will be dropped in the future version.
  434. * configure.ac
  435. * src/AbstractCommand.cc
  436. * src/AsyncNameResolver.cc
  437. * src/AsyncNameResolver.h
  438. * src/Command.cc
  439. * src/Command.h
  440. * src/DownloadEngine.cc
  441. * src/DownloadEngine.h
  442. * src/PeerAbstractCommand.cc
  443. * src/SocketCore.cc
  444. * src/SocketCore.h
  445. * src/a2io.h
  446. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  447. * test/MetalinkEntryTest.cc: Added missing `defined' keyword to #if
  448. directive.
  449. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  450. Do not do write operation to /dev/null file.
  451. * src/LogFactory.cc
  452. * src/SimpleLogger.cc
  453. Replaced vasprintf with vsnprintf
  454. * src/SimpleLogger.cc (SimpleLogger::writeLog)
  455. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  456. * src/BtRequestMessage.cc
  457. (BtRequestMessage::onQueue): Given piece to RequestSlot. This is a fix
  458. for segmentation fault caused by previous commit.
  459. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  460. Reduced the usage of gettimeofday().
  461. * src/DefaultBtMessageDispatcher.cc
  462. (DefaultBtMessageDispatcher::checkRequestSlotAndDoNecessaryThing)
  463. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  464. * src/RequestSlot.cc
  465. * src/RequestSlot.h
  466. (RequestSlot::isTimeout)
  467. Made RequestSlot have a reference to Piece object to avoid find
  468. Piece repeatedly.
  469. * src/DefaultBtMessageDispatcher.cc
  470. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  471. * src/RequestSlot.cc
  472. * src/RequestSlot.h
  473. (RequestSlot::getPiece)
  474. * test/DefaultBtMessageDispatcherTest.cc
  475. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  476. * src/TimeA2.cc
  477. * src/TimeA2.h
  478. (Time::difference): New function.
  479. (Time::elapsed): Done optimization.
  480. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  481. * src/HelpItemFactory.cc: Added missing `defined' keyword to #if
  482. directive.
  483. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  484. * src/option_processing.cc: Added missing `defined' keyword to #if
  485. directive.
  486. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  487. Bump up version number to 0.13.2+1
  488. * src/configure.ac
  489. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  490. Refactored broken outstanding piece handling.
  491. * src/DefaultPieceStorage.cc
  492. * src/DefaultPieceStorage.h
  493. * src/Piece.cc
  494. * src/Piece.h
  495. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  496. Fixed compile error on Mac OS X 10.3.9. This error was caused by the
  497. name collision of static variable and predefined macro.
  498. * src/BtContext.cc
  499. * src/BtContext.h
  500. * src/CookieBoxFactory.cc
  501. * src/CookieBoxFactory.h
  502. * src/CookieParser.cc
  503. * src/CookieParser.h
  504. * src/DefaultBtContext.cc
  505. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  506. * src/RequestGroup.cc
  507. (RequestGroup::createInitialCommand): Use empty() instead of size().
  508. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  509. * Release 0.13.2
  510. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  511. Updated fr.po(thanks to Sebastien) and ja.po. ThanksDone make update-po
  512. * po/fr.po
  513. * po/ja.po
  514. * po/aria2c.pot
  515. * po/*.po
  516. * po/*.gmo
  517. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  518. Bump up version number to 0.13.2
  519. * src/configure.ac
  520. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  521. Refactord.
  522. * src/RequestGroupMan.cc
  523. (removeStoppedGroup)
  524. (fillRequestGroupFromReserver)
  525. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  526. Fixed compile error on Ubuntu.
  527. * src/BtPieceMessage.cc
  528. * src/MessageDigestHelper.cc
  529. * src/Util.cc
  530. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  531. Fixed compile error when configured with --disable-bittorrent
  532. * test/DownloadHandlerFactoryTest.cc
  533. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  534. Done make update-po
  535. * po/aria2c.pot
  536. * po/*.po
  537. * po/*.gmo
  538. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  539. Bump up version number to 0.13.2rc.
  540. * src/configure.ac
  541. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  542. Made option name bold. Updated SYNOPSIS to make it more readable.
  543. * doc/aria2c.1.txt
  544. * doc/aria2c.1
  545. * doc/aria2c.1.html
  546. * src/version_usage.cc
  547. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  548. Refactored. Use std::string instead of size and char*.
  549. * Data.cc
  550. * Data.h
  551. * test/Data.cc
  552. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  553. Added trimSelf(). Rewritten trim() to use trimSelf().
  554. * Util.cc
  555. * Util.h
  556. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  557. * src/ChunkChecksum.h (getChecksum): Return const reference.
  558. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  559. Fixed compile error when configured with --disable-metalink.
  560. Also moved test/DownloadHandlerFactoryTest.cc to SRC in Makefile.am.
  561. * test/FeatureConfigTest.cc
  562. * test/DownloadHandlerFactoryTest.cc
  563. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  564. Fixed compile error when configured with --without-gnutls
  565. --without-openssl
  566. * src/main.cc
  567. * test/DefaultBtProgressInfoFileTest.cc
  568. * test/SegmentManTest.cc
  569. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  570. Fixed compile error with OpenSSL.
  571. * src/IteratableChunkChecksumValidator.cc
  572. * src/LibsslDHKeyExchange.h
  573. * src/MessageDigestHelper.cc
  574. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  575. Revert the default value of --max-concurrent-downloads to 5.
  576. Revert the default value of --metalink-servers to 5.
  577. Man pages was also updated.
  578. * src/option_processing.cc
  579. * doc/aria2c.1.txt
  580. * doc/aria2c.1.html
  581. * doc/aria2c.1
  582. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  583. Returns const reference:
  584. DownloadContext::getPieceHash, DownloadContext::getName,
  585. DownloadContext::getPieceHashAlgo, DownloadContext::getDir,
  586. BtContext::getInfoHashAsString,
  587. * src/BtContext.h
  588. * src/DefaultBtContext.cc
  589. * src/DefaultBtContext.h
  590. * src/DownloadContext.h
  591. * src/SingleFileDownloadContext.h
  592. * test/MockBtContext.h
  593. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  594. * src/RequestGroup.h (getDir): Removed.
  595. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  596. Returns const reference. The internal urlencode function was optimized
  597. a little bit.
  598. * src/Request.cc
  599. * src/Request.h
  600. * src/HttpRequest.cc
  601. * src/HttpRequest.h
  602. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  603. Defined option name and possible values as std::string to reduce
  604. temporary string object creation in runtime.
  605. * src/HelpItemFactory.cc
  606. * src/LogFactory.cc
  607. * src/Option.cc
  608. * src/OptionHandlerFactory.cc
  609. * src/option_processing.cc
  610. * src/prefs.cc
  611. * src/prefs.h
  612. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  613. Return const reference.
  614. * src/DownloadHandlerConstants.cc
  615. * src/DownloadHandlerConstants.h
  616. (getMetalinkExtensions)
  617. (getMetalinkContentTypes)
  618. (getBtExtensions)
  619. (getBtContentTypes)
  620. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  621. * src/HttpHeader.cc (get): Rewritten.
  622. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  623. Make HttpHeader::getFirst(...) return const reference.
  624. * src/HttpHeader.cc
  625. * src/HttpHeader.h
  626. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  627. Use Option::getAsBool(...) instead of Option::get(...) and compare
  628. it with V_TRUE.
  629. * src/DefaultPieceStorage.cc
  630. * src/DownloadCommand.cc
  631. * src/FtpNegotiationCommand.cc
  632. * src/HttpRequest.cc
  633. * src/InitiateConnectionCommand.cc
  634. * src/RequestGroup.cc
  635. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  636. Made Option::get(...) return const reference of std::string.
  637. * src/Option.cc
  638. * src/Option.h
  639. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  640. Replaced std:copy with insert.
  641. * src/DefaultBtMessageDispatcher.cc
  642. * src/DefaultPieceStorage.cc
  643. * src/DownloadEngineFactory.cc
  644. * src/RequestGroup.cc
  645. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  646. Included SocketCore.h to fix compiler warning.
  647. * src/InitiateConnectionCommand.cc
  648. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  649. Put piece selection strategy algorithm to RarestPieceSelector class,
  650. Added a switch to choose whether randomized selection so that unit
  651. tests emit same results in, possibly, win32.
  652. * src/DefaultPieceStorage.cc
  653. * src/DefaultPieceStorage.h
  654. * src/RarestPieceSelector.cc
  655. * src/RarestPieceSelector.h
  656. * test/DefaultPieceStorageTest.cc
  657. * test/RarestPieceSelectorTest.cc
  658. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  659. Don't pool connection if HTTP proxy is enabled.
  660. * src/FtpFinishDownloadCommand.cc
  661. * src/FtpNegotiationCommand.cc
  662. * src/HttpSkipResponseCommand.cc
  663. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  664. Don't add closed socket to DownloadEngine::addSocketForReadCheck()
  665. * src/AbstractCommand.cc
  666. * src/AbstractCommand.h
  667. * src/ActivePeerConnectionCommand.cc
  668. * src/FtpInitiateConnectionCommand.cc
  669. * src/HttpInitiateConnectionCommand.cc
  670. * src/InitiateConnectionCommandFactory.cc
  671. * src/PeerAbstractCommand.cc
  672. * src/PeerAbstractCommand.h
  673. * src/PeerInitiateConnectionCommand.cc
  674. * src/TrackerWatcherCommand.cc
  675. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  676. Sort RequestSlot in ascending order and manipulate them using
  677. lower_bound.
  678. * src/DefaultBtMessageDispatcher.cc
  679. * src/DefaultBtMessageDispatcher.h
  680. (getMessageQueue): Added const qualifier.
  681. (getRequestSlots): Added const qualifier.
  682. (sendMessages): Use empty() instead of size().
  683. (doCancelSendingPieceAction): Use HandleEvent object.
  684. (doAbortOutstandingRequestAction): Rewritten.
  685. (doChokedAction): Rewritten.
  686. (checkRequestSlotAndDoNecessaryThing): Rewritten.
  687. (isOutstandingRequest): Rewritten.
  688. (getOutstandingRequest): Rewritten.
  689. (removeOutstandingRequest): Rewritten.
  690. (addOutstandingRequest): Rewritten.
  691. * src/RequestSlot.cc
  692. * src/RequestSlot.h
  693. (operator=): Rewritten.
  694. (operator!=): New function.
  695. (operator<): New function.
  696. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  697. * src/DefaultBtRequestFactory.cc
  698. (doChokedAction): Rewritten.
  699. (removeCompletedPiece): Rewritten.
  700. (removeTargetPiece): Rewritten.
  701. (createRequestMessages): Added the debug log.
  702. (createRequestMessagesOnEndGame: Added the debug log.
  703. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  704. Added the debug log message.
  705. * src/BtPieceMessage.cc (doReceivedAction)
  706. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  707. Sorted DHTPeerAnnounceEntry in a ascending order of info hash and
  708. used lower_bound to process them rather than linear search.
  709. * src/DHTPeerAnnounceStorage.cc
  710. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  711. Call subtractPieceStats from ~PeerInteractionCommand only when the
  712. peer has at least one completed piece.
  713. * src/Peer.cc
  714. * src/Peer.h
  715. * src/PeerInteractionCommand.cc
  716. * src/PeerSessionResource.cc
  717. * src/PeerSessionResource.h
  718. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  719. Removed unnecessary sorting
  720. * src/DefaultPieceStorage (DefaultPieceStorage)
  721. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  722. Rewritten the portion of the code that mangaes allowed fast indexes.
  723. * src/PeerSessionResource.cc
  724. * src/PeerSessionResource.h
  725. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  726. Removed the invalid string including '\r' from ru.po and
  727. did make update-po.
  728. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  729. Added --log-level and --summary-interval to man page.
  730. * doc/aria2c.1.txt
  731. * doc/aria2c.1.html
  732. * doc/aria2c.1
  733. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  734. Added --log-level option to specify log level. Log messages under
  735. the specified level are not output. Default value is `debug'.
  736. * src/HelpItemFactory.cc
  737. * src/LogFactory.cc
  738. * src/LogFactory.h
  739. * src/Logger.h
  740. * src/OptionHandlerFactory.cc
  741. * src/SimpleLogger.cc
  742. * src/SimpleLogger.h
  743. * src/main.cc
  744. * src/option_processing.cc
  745. * src/prefs.h
  746. * src/usage_text.h
  747. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  748. Print download progress summary of all parallel downloads in specified
  749. interval, default 60 secs. While aria2 could download several files
  750. in parallel (see -j option), it displayed just first download progress,
  751. and the other downloads are hidden from the users. This new feature
  752. prints all downloads currently in-progress to the console so that you
  753. can check the status of all downloads. The interval can be adjusted
  754. by --summary-interval option.
  755. The progress readout is now cut so that all fits in the one line of
  756. console.
  757. * src/ConsoleStatCalc.cc
  758. * src/ConsoleStatCalc.h
  759. * src/HelpItemFactory.cc
  760. * src/OptionHandlerFactory.cc
  761. * src/RequestGroupMan.cc
  762. * src/RequestGroupMan.h
  763. * src/main.cc
  764. * src/option_processing.cc
  765. * src/prefs.h
  766. * src/usage_text.h
  767. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  768. Call updateFdSet() to initialize rfdset, wfdset fdmax.
  769. * src/DownloadEngine.cc (DownloadEngine)
  770. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  771. Use free() to deallocate memory for _buffer if HAVE_POSIX_MEMALIGN is
  772. defined.
  773. * src/SingleFileAllocationIterator.cc (~SingleFileAllocationIterator)
  774. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  775. Use erase+lower_bound+insert instead of sort.
  776. * src/DefaultPieceStorage.cc (addPieceStats)
  777. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  778. Use A2STR::SHARP_C and A2STR::EQUAL_C.
  779. * src/A2STR.cc
  780. * src/A2STR.h
  781. * src/OptionParser.cc (parse)
  782. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  783. Defined fake filename `[tracker.announce]' as static const std::string.
  784. * src/TrackerWatcherCommand.cc (createRequestGroup)
  785. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  786. Defined default filename `index.html' as static const std::string
  787. * src/SingleFileDownloadContext.cc
  788. * src/SingleFileDownloadContext.h
  789. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  790. Defined "[MEMORY]" as static const std::string.
  791. * src/MemoryBufferPreDownloadHandler.cc (execute)
  792. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  793. Defined control file's version number as static const std::string.
  794. * src/DefaultBtProgressInfoFile.cc
  795. * src/DefaultBtProgressInfoFile.h
  796. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  797. Use Request::METHOD_GET
  798. * src/RequestGroup.cc (createNextCommandWithAdj)
  799. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  800. Defined "OK", "ERR", "INPR" as static const std::string
  801. * src/RequestGroupMan.cc (showDownloadResults)
  802. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  803. Defined default client used in extended handshake as static const
  804. std::string
  805. * src/DefaultBtInteractive.cc (addHandshakeExtendedMessageToQueue)
  806. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  807. Defined AUTH_HEADER, PROXY_AUTH_HEADER as static const std::string
  808. * src/HttpConnection.cc (eraseConfidentialInfo)
  809. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  810. Defined default ftp user and password as static const std::string
  811. * src/AuthConfigFactory.cc
  812. * src/AuthConfigFactory.h
  813. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  814. Defined strings used in netrc as static const std::string
  815. * src/Netrc.cc
  816. * src/Netrc.h
  817. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  818. Defined HTTP status as static const std::string
  819. * src/AbstractProxyResponseCommand.cc
  820. * src/HttpHeader.cc
  821. * src/HttpHeader.h
  822. * src/HttpResponse.cc
  823. * src/HttpResponseCommand.cc
  824. * src/HttpSkipResponseCommand.cc
  825. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  826. Defined "\r\n", "A", "I" as static const std::string
  827. * src/A2STR.cc
  828. * src/A2STR.h
  829. * src/FtpConnection.cc
  830. * src/FtpConnection.h
  831. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  832. Added COLON_C(".") and used it in Request::parseUrl()
  833. * src/A2STR.cc
  834. * src/A2STR.h
  835. * src/Request.cc (parseUrl)
  836. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  837. Changed the type of padName from `const std::string&' to `const char*'.
  838. * src/MSEHandshake.cc (verifyPadLength)
  839. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  840. Defined "sha1" as static const std::string.
  841. * src/MetalinkParserController.cc
  842. * src/MetalinkParserController.h
  843. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  844. Defined message digest algorithm name as static const std::string
  845. * src/DHTTokenTracker.cc
  846. * src/DHTUtil.cc
  847. * src/DefaultBtContext.cc
  848. * src/MSEHandshake.cc
  849. * src/MessageDigestHelper.cc
  850. * src/Peer.cc
  851. * src/messageDigest.cc
  852. * src/messageDigest.h
  853. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  854. Made string literals used in SAX parser static const std::string.
  855. * src/FileMetalinkParserState.cc
  856. * src/FileMetalinkParserState.h
  857. * src/FilesMetalinkParserState.cc
  858. * src/FilesMetalinkParserState.h
  859. * src/InitialMetalinkParserState.cc
  860. * src/InitialMetalinkParserState.h
  861. * src/MetalinkMetalinkParserState.cc
  862. * src/MetalinkMetalinkParserState.h
  863. * src/PiecesMetalinkParserState.cc
  864. * src/PiecesMetalinkParserState.h
  865. * src/ResourcesMetalinkParserState.cc
  866. * src/ResourcesMetalinkParserState.h
  867. * src/VerificationMetalinkParserState.cc
  868. * src/VerificationMetalinkParserState.h
  869. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  870. Use A2STR::SLASH_C, A2STR::DOT_C instead of "/", "." respectively.
  871. * src/A2STR.cc
  872. * src/A2STR.h
  873. * src/File.cc
  874. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  875. Defined static const std::string IP("ip"), PORT("port") and use them
  876. instead of string literals.
  877. * src/DefaultPeerListProcessor.cc
  878. * src/DefaultPeerListProcessor.h
  879. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  880. Made string literals for torrent file processing static const
  881. std::string.
  882. * src/BtContext.cc
  883. * src/BtContext.h
  884. * src/DefaultBtContext.cc
  885. * src/DefaultBtContext.h
  886. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  887. Made string literal for tracker response static const std::string
  888. * src/BtAnnounce.cc
  889. * src/BtAnnounce.h
  890. * src/DefaultBtAnnounce.cc
  891. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  892. Use DHTMessage::T instead of "t".
  893. * src/DHTMessageTracker.cc (messageArrived)
  894. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  895. Made keyName static const. Made trimmed charset static const
  896. std::string.
  897. * src/Util.cc (getContentDispositionFilename)
  898. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  899. Made USER_AGENT const. Made "/" static const std::string.
  900. * src/A2STR.cc
  901. * src/A2STR.h
  902. * src/HttpRequest.cc
  903. * src/HttpRequest.h
  904. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  905. Made string listeral to static const std::string:
  906. "Content-Range", "Content-Length"
  907. * src/HttpHeader.cc
  908. * src/HttpHeader.h
  909. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  910. Made string listeral to static const std::string.
  911. * src/HttpConnection.cc
  912. * src/HttpHeader.cc
  913. * src/HttpHeader.h
  914. * src/HttpResponse.cc
  915. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  916. Made string listeral to static const std::string.
  917. * src/A2STR.cc
  918. * src/A2STR.h
  919. * src/SimpleLogger.cc
  920. * src/SimpleLogger.h
  921. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  922. Made string literal to static const std::string.
  923. Rewritten CookieParser::setField.
  924. * src/A2STR.cc
  925. * src/A2STR.h
  926. * src/CookieBoxFactory.cc
  927. * src/CookieBoxFactory.h
  928. * src/CookieParser.cc
  929. * src/CookieParser.h
  930. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  931. Made string literal to static const std::string
  932. * src/DHTAbstractMessage.cc
  933. * src/DHTAnnouncePeerMessage.cc
  934. * src/DHTAnnouncePeerMessage.h
  935. * src/DHTAnnouncePeerReplyMessage.cc
  936. * src/DHTAnnouncePeerReplyMessage.h
  937. * src/DHTFindNodeMessage.cc
  938. * src/DHTFindNodeMessage.h
  939. * src/DHTFindNodeReplyMessage.cc
  940. * src/DHTFindNodeReplyMessage.h
  941. * src/DHTGetPeersMessage.cc
  942. * src/DHTGetPeersMessage.h
  943. * src/DHTGetPeersReplyMessage.cc
  944. * src/DHTGetPeersReplyMessage.h
  945. * src/DHTMessage.cc
  946. * src/DHTMessage.h
  947. * src/DHTMessageFactoryImpl.cc
  948. * src/DHTMessageReceiver.cc
  949. * src/DHTPingMessage.cc
  950. * src/DHTPingMessage.h
  951. * src/DHTPingReplyMessage.cc
  952. * src/DHTPingReplyMessage.h
  953. * src/DHTQueryMessage.cc
  954. * src/DHTQueryMessage.h
  955. * src/DHTResponseMessage.cc
  956. * src/DHTResponseMessage.h
  957. * src/DHTUnknownMessage.cc
  958. * src/DHTUnknownMessage.h
  959. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  960. Made string literal to static const std::string
  961. * src/BtChokeMessage.cc (toString)
  962. * src/BtHaveAllMessage.cc (toString)
  963. * src/BtHaveNoneMessage.cc (toString)
  964. * src/BtInterestedMessage.cc (toString)
  965. * src/BtNotInterestedMessage.cc (toString)
  966. * src/BtUnchokeMessage.cc (toString)
  967. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  968. Replaced "" with static const variable A2STR::NIL.
  969. Replaced string comparison against "" with std::string::empty().
  970. Added PROTO_* to Request class and use them as a protocol string
  971. constant.
  972. Made "started", "stopped", "completed" static const variable in
  973. AnnounceList class.
  974. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  975. Updated translations. Great thanks to translators.
  976. * po/ca.po
  977. * po/de.po
  978. * po/fr.po
  979. * po/it.po
  980. * po/ja.po
  981. * po/ru.po
  982. * po/zh_CN.po
  983. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  984. Updated man page; categorized options and fixed typo.
  985. * doc/aria2c.1.txt
  986. * doc/aria2c.1.html
  987. * doc/aria2c.1
  988. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  989. Removed const ref
  990. * src/MetalinkEntry.cc (AddProtocolPreference)
  991. * src/RequestGroup.cc (FindServerHostByHostname)
  992. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  993. Rewritten Accept-Features handling.
  994. * src/HttpRequestCommand.cc (createHttpRequest)
  995. * src/a2functional.h
  996. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  997. Changed method signature:
  998. DHTAbstractNodeLookupTask::toEntries
  999. * src/DHTAbstractNodeLookupTask.cc
  1000. * src/DHTAbstractNodeLookupTask.h
  1001. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1002. Changed method signature:
  1003. BtContext::computeFastSet, DefaultBtContext::extractUrlList
  1004. * src/BtContext.h
  1005. * src/DefaultBtContext.cc
  1006. * src/DefaultBtContext.h
  1007. * src/DefaultBtInteractive.cc
  1008. * test/DefaultBtContextTest.cc
  1009. * test/MockBtContext.h
  1010. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1011. Changed method signature:
  1012. MultiFileAllocationIterator::makeDiskWriterEntries
  1013. * src/MultiFileAllocationIterator.cc
  1014. * src/MultiFileAllocationIterator.h
  1015. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1016. Changed method sinature:
  1017. MetalinkEntry::toFileEntry,
  1018. MetalinkHelper::query, MetalinkHelper::parseAndQuery,
  1019. Metalinker::queryEntry
  1020. * src/Metalink2RequestGroup.cc
  1021. * src/MetalinkEntry.cc
  1022. * src/MetalinkEntry.h
  1023. * src/MetalinkHelper.cc
  1024. * src/MetalinkHelper.h
  1025. * src/Metalinker.cc
  1026. * src/Metalinker.h
  1027. * src/main.cc
  1028. * test/MetalinkHelperTest.cc
  1029. * test/MetalinkerTest.cc
  1030. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1031. Changed method sinature:
  1032. RequestGroup::getURIs
  1033. * src/RequestGroup.cc
  1034. * src/RequestGroup.h
  1035. * test/Metalink2RequestGroupTest.cc
  1036. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1037. Changed method signature:
  1038. PeerListProcessor::extractPeer
  1039. * src/CompactPeerListProcessor.cc
  1040. * src/CompactPeerListProcessor.h
  1041. * src/DefaultBtAnnounce.cc
  1042. * src/DefaultPeerListProcessor.cc
  1043. * src/DefaultPeerListProcessor.h
  1044. * src/DelegatingPeerListProcessor.cc
  1045. * src/DelegatingPeerListProcessor.h
  1046. * src/PeerListProcessor.h
  1047. * src/UTPexExtensionMessage.cc
  1048. * test/DefaultPeerListProcessorTest.cc
  1049. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1050. Changed method signature:
  1051. BtRequestFactory::createRequestMessages,
  1052. BtRequestFactory::createRequestMessagesOnEndGame
  1053. * src/BtRequestFactory.h
  1054. * src/DefaultBtInteractive.cc
  1055. * src/DefaultBtRequestFactory.cc
  1056. * src/DefaultBtRequestFactory.h
  1057. * test/DefaultBtRequestFactoryTest.cc
  1058. * test/MockBtRequestFactory.h
  1059. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1060. Changed method signature:
  1061. PieceStorage::getInFlightPieces
  1062. * src/DefaultBtProgressInfoFile.cc
  1063. * src/DefaultPieceStorage.cc
  1064. * src/DefaultPieceStorage.h
  1065. * src/PieceStorage.h
  1066. * src/UnknownLengthPieceStorage.cc
  1067. * src/UnknownLengthPieceStorage.h
  1068. * test/DefaultBtProgressInfoFileTest.cc
  1069. * test/MockPieceStorage.h
  1070. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1071. Changed method signature:
  1072. PostDownloadHandler::getNextRequestGroups
  1073. Metalink2RequestGroup::generate
  1074. RequestGroup::postDownloadProcessing
  1075. * src/BtPostDownloadHandler.cc
  1076. * src/BtPostDownloadHandler.h
  1077. * src/Metalink2RequestGroup.cc
  1078. * src/Metalink2RequestGroup.h
  1079. * src/MetalinkPostDownloadHandler.cc
  1080. * src/MetalinkPostDownloadHandler.h
  1081. * src/PostDownloadHandler.h
  1082. * src/RequestGroup.cc
  1083. * src/RequestGroup.h
  1084. * src/RequestGroupMan.cc
  1085. * src/main.cc
  1086. * test/BtPostDownloadHandlerTest.cc
  1087. * test/Metalink2RequestGroupTest.cc
  1088. * test/MetalinkPostDownloadHandlerTest.cc
  1089. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1090. Rewritten AccRequestGroup
  1091. * src/main.cc
  1092. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1093. Rewritten.
  1094. * src/TaggedItem.cc (toTagString)
  1095. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1096. Rewritten Accept-Features handling.
  1097. * src/HttpRequestCommand.cc (createHttpRequest)
  1098. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1099. Rewritten accept types handling.
  1100. * HttpRequest.cc (createRequest)
  1101. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1102. Rewritten
  1103. * src/FeatureConfig.cc (featureSummary)
  1104. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1105. Changed method signature:
  1106. PeerStorage::getActivePeers
  1107. * src/DHTPeerAnnounceEntry.cc
  1108. * src/DefaultPeerStorage.cc
  1109. * src/DefaultPeerStorage.h
  1110. * src/PeerStorage.h
  1111. * test/DefaultPeerStorageTest.cc
  1112. * test/MockPeerStorage.h
  1113. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1114. Changed method signature:
  1115. DHTPeerAnnounceStorage::getPeers,
  1116. DHTPeerAnnounceEntry::getPeers
  1117. * src/DHTGetPeersMessage.cc
  1118. * src/DHTPeerAnnounceEntry.cc
  1119. * src/DHTPeerAnnounceEntry.h
  1120. * src/DHTPeerAnnounceStorage.cc
  1121. * src/DHTPeerAnnounceStorage.h
  1122. * test/DHTAnnouncePeerMessageTest.cc
  1123. * test/DHTPeerAnnounceEntryTest.cc
  1124. * test/DHTPeerAnnounceStorageTest.cc
  1125. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1126. Changed method signature:
  1127. NameResolver::resolve
  1128. * src/DHTEntryPointNameResolveCommand.cc
  1129. * src/InitiateConnectionCommand.cc
  1130. * src/NameResolver.cc
  1131. * src/NameResolver.h
  1132. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1133. Changed method signature:
  1134. PieceStorage::getAdvertisedPieceIndexes
  1135. * src/DefaultBtInteractive.cc
  1136. * src/DefaultPieceStorage.cc
  1137. * src/DefaultPieceStorage.h
  1138. * src/PieceStorage.h
  1139. * src/UnknownLengthPieceStorage.h
  1140. * test/MockPieceStorage.h
  1141. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1142. Changed method signature:
  1143. SegmentMan::getInFlightSegment
  1144. * src/AbstractCommand.cc
  1145. * src/SegmentMan.cc
  1146. * src/SegmentMan.h
  1147. * test/SegmentManTest.cc
  1148. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1149. Changed method signature:
  1150. DHTAbstractNodeLookupTask::getNodesFromMessage
  1151. * src/DHTAbstractNodeLookupTask.cc
  1152. * src/DHTAbstractNodeLookupTask.h
  1153. * src/DHTNodeLookupTask.cc
  1154. * src/DHTNodeLookupTask.h
  1155. * src/DHTPeerLookupTask.cc
  1156. * src/DHTPeerLookupTask.h
  1157. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1158. Pass std::deque<Command*> by reference to avoid unnecessary coping.
  1159. * src/AbstractCommand.cc
  1160. * src/BtCheckIntegrityEntry.cc
  1161. * src/BtCheckIntegrityEntry.h
  1162. * src/BtFileAllocationEntry.cc
  1163. * src/BtFileAllocationEntry.h
  1164. * src/BtSetup.cc
  1165. * src/BtSetup.h
  1166. * src/CheckIntegrityCommand.cc
  1167. * src/CheckIntegrityEntry.h
  1168. * src/ChecksumCheckIntegrityEntry.cc
  1169. * src/ChecksumCheckIntegrityEntry.h
  1170. * src/DHTSetup.cc
  1171. * src/DHTSetup.h
  1172. * src/DownloadEngine.cc
  1173. * src/FileAllocationCommand.cc
  1174. * src/FileAllocationEntry.h
  1175. * src/RequestGroup.cc
  1176. * src/RequestGroup.h
  1177. * src/RequestGroupMan.cc
  1178. * src/RequestGroupMan.h
  1179. * src/StreamCheckIntegrityEntry.cc
  1180. * src/StreamCheckIntegrityEntry.h
  1181. * src/StreamFileAllocationEntry.cc
  1182. * src/StreamFileAllocationEntry.h
  1183. * src/TrackerWatcherCommand.cc
  1184. * src/a2functional.h
  1185. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1186. Changed method signature:
  1187. BNode::findClosestKNodes, BNode:: enumerateBucket,
  1188. DHTBucket::getGoodNodes,
  1189. DHTRoutingTable::getClosestKNodes, DHTRoutingTable::getBuckets
  1190. * src/BNode.cc
  1191. * src/BNode.h
  1192. * src/DHTAbstractNodeLookupTask.cc
  1193. * src/DHTAutoSaveCommand.cc
  1194. * src/DHTBucket.cc
  1195. * src/DHTBucket.h
  1196. * src/DHTBucketRefreshTask.cc
  1197. * src/DHTFindNodeMessage.cc
  1198. * src/DHTGetPeersMessage.cc
  1199. * src/DHTRoutingTable.cc
  1200. * src/DHTRoutingTable.h
  1201. * test/BNodeTest.cc
  1202. * test/DHTBucketTest.cc
  1203. * test/DHTRoutingTableTest.cc
  1204. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1205. In piece selection functions, Pass std::deque<...> by reference rather
  1206. than returning it.
  1207. * src/BitfieldMan.cc
  1208. * src/BitfieldMan.h
  1209. * src/DefaultBtRequestFactory.cc
  1210. * src/DefaultPieceStorage.cc
  1211. * src/Piece.cc
  1212. * src/Piece.h
  1213. * test/BitfieldManTest.cc
  1214. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1215. Implemented rarest piece first piece selection strategy.
  1216. * src/AbstractBtMessage.cc
  1217. * src/AbstractBtMessage.h
  1218. * src/BitfieldMan.cc
  1219. * src/BitfieldMan.h
  1220. * src/BtBitfieldMessage.cc
  1221. * src/BtHaveAllMessage.cc
  1222. * src/BtHaveMessage.cc
  1223. * src/DefaultPieceStorage.cc
  1224. * src/DefaultPieceStorage.h
  1225. * src/PeerInteractionCommand.cc
  1226. * src/PieceStorage.h
  1227. * src/UnknownLengthPieceStorage.h
  1228. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1229. Rewritten readData and writeData.
  1230. * src/MultiDiskAdaptor.cc
  1231. * src/MultiDiskAdaptor.h
  1232. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1233. Move \n out of the message "Usage: ...".
  1234. * src/version_usage.cc
  1235. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1236. Bump up version number to 0.13.2b.
  1237. * configure.ac
  1238. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1239. Added const qualifier to argument Exception& e.
  1240. * src/Logger.h
  1241. * src/SimpleLogger.cc
  1242. * src/SimpleLogger.h
  1243. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1244. Pool connection when CWD, SIZE command fails.
  1245. * src/FtpNegotiationCommand.cc
  1246. * src/FtpNegotiationCommand.h
  1247. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1248. Renamed HttpNullDownloadCommand as HttpSkipResponseCommand
  1249. * src/HttpResponseCommand.cc
  1250. * src/HttpSkipResponseCommand.cc
  1251. * src/HttpSkipResponseCommand.h
  1252. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1253. Pool connection when a server returns 4xx, 5xx responses.
  1254. * src/HttpNullDownloadCommand.cc
  1255. * src/HttpNullDownloadCommand.h
  1256. * src/HttpResponse.cc
  1257. * src/HttpResponse.h
  1258. * src/HttpResponseCommand.cc
  1259. * src/HttpResponseCommand.h
  1260. * test/HttpResponseTest.cc
  1261. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1262. Print usage when no URL is specifed or bad command-line option is
  1263. specified.
  1264. * src/HelpItemFactory.cc
  1265. * src/help_tags.h
  1266. * src/option_processing.cc
  1267. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1268. Removed duplicate log message.
  1269. * src/AbstractCommand.cc (asyncResolveHostname)
  1270. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1271. Updated man page: --async-dns and --ftp-reuse-connection were added.
  1272. Changed -j option's default value from 5 to 1.
  1273. Added new examples using protocol auto detection feature.
  1274. Removed -T, -M usage where it can be omitted.
  1275. * doc/aria2c.1.txt
  1276. * doc/aria2c.1.html
  1277. * doc/aria2c.1.txt
  1278. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1279. Updated command-line usage text, so that it tells users that they
  1280. can specify any number of torrent files and metalink files in
  1281. command-line.
  1282. * src/version_usage.cc
  1283. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1284. Changed the default value of -j option to 1.
  1285. * src/HelpItemFactory.cc
  1286. * src/option_processing.cc
  1287. * src/usage_text.h
  1288. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1289. Added the ability to reuse connection in FTP and it is enabled by
  1290. default. It can be disabled by --ftp-reuse-connection=false option.
  1291. * src/Command.cc
  1292. * src/DownloadCommand.cc
  1293. * src/FtpDownloadCommand.cc
  1294. * src/FtpDownloadCommand.h
  1295. * src/FtpFinishDownloadCommand.cc
  1296. * src/FtpFinishDownloadCommand.h
  1297. * src/FtpInitiateConnectionCommand.cc
  1298. * src/FtpNegotiationCommand.cc
  1299. * src/FtpNegotiationCommand.h
  1300. * src/HelpItemFactory.cc
  1301. * src/Makefile.am
  1302. * src/Makefile.in
  1303. * src/OptionHandlerFactory.cc
  1304. * src/option_processing.cc
  1305. * src/prefs.h
  1306. * src/usage_text.h
  1307. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1308. Call Command::transitStatus() before calling Command::execute(),
  1309. so that the status change made in execute() is not cleared.
  1310. * src/DownloadEngine.cc
  1311. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1312. Removed forward declaration of SocketCore class.
  1313. * src/HttpDownloadCommand.h
  1314. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1315. Set Request::setKeepAliveHint() and Request::setPipeliningHint()
  1316. in InitiateConnectionCommandFactory. They should be set only when
  1317. the protocol is HTTP or HTTPS.
  1318. * src/InitiateConnectionCommandFactory.cc
  1319. * src/RequestGroup.cc
  1320. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1321. Fixed infinite loop in checksum checking.
  1322. * src/IteratableChecksumValidator.cc
  1323. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1324. Set _supportsPersistentConnection to true by default.
  1325. * src/Request.cc
  1326. * src/RequestGroup.cc
  1327. * test/HttpRequestTest.cc
  1328. * test/RequestTest.cc
  1329. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1330. Added timeout to socket pool. The default timeout is 15 seconds,
  1331. which is the same value Apache uses.
  1332. * src/DownloadEngine.cc
  1333. * src/DownloadEngine.h
  1334. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1335. Fixed misuse of multimap::find()
  1336. * src/HttpHeader.cc
  1337. * test/HttpHeaderTest.cc
  1338. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1339. Rewritten name resolver. Now async DNS can be disabled by --async-dns
  1340. option.
  1341. The asynchronous DNS is not capable of IPv6 yet.
  1342. By disabling asynchronous DNS, aria2 is IPv6 enabled application, at
  1343. least for HTTP download.
  1344. * src/AbstractCommand.cc
  1345. * src/AbstractCommand.h
  1346. * src/AsyncNameResolver.cc
  1347. * src/AsyncNameResolver.h
  1348. * src/DHTEntryPointNameResolveCommand.cc
  1349. * src/DHTEntryPointNameResolveCommand.h
  1350. * src/DownloadEngine.cc
  1351. * src/DownloadEngine.h
  1352. * src/FtpInitiateConnectionCommand.cc
  1353. * src/FtpInitiateConnectionCommand.h
  1354. * src/HelpItemFactory.cc
  1355. * src/HttpInitiateConnectionCommand.cc
  1356. * src/HttpInitiateConnectionCommand.h
  1357. * src/InitiateConnectionCommand.cc
  1358. * src/InitiateConnectionCommand.h
  1359. * src/Makefile.am
  1360. * src/Makefile.in
  1361. * src/NameResolver.cc
  1362. * src/NameResolver.h
  1363. * src/OptionHandlerFactory.cc
  1364. * src/SocketCore.cc
  1365. * src/SocketCore.h
  1366. * src/Util.cc
  1367. * src/Util.h
  1368. * src/option_processing.cc
  1369. * src/prefs.h
  1370. * src/usage_text.h
  1371. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1372. Updated man page: --quiet, --header were added.
  1373. --metalink-servers and --enable-http-keep-alive option were updated.
  1374. * doc/aria2c.1
  1375. * doc/aria2c.1.html
  1376. * doc/aria2c.1.txt
  1377. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1378. Enable HTTP keep-alive by default.
  1379. * src/HelpItemFactory.cc
  1380. * src/option_processing.cc
  1381. * src/usage_text.h
  1382. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1383. Disable http keep-alive if the remote server is not HTTP/1.1.
  1384. * src/HttpConnection.cc
  1385. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1386. Receive content body of 302 response so that the connection can be
  1387. reused later when http keep-alive is enabled.
  1388. * src/HttpNullDownloadCommand.cc
  1389. * src/HttpNullDownloadCommand.h
  1390. * src/HttpResponseCommand.cc
  1391. * src/HttpResponseCommand.h
  1392. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1393. const SharedHandle<Request> -> const SharedHandle<Request>&
  1394. * src/FtpDowndloadCommand.cc
  1395. * src/FtpDowndloadCommand.h
  1396. * src/HttpDownloadCommand.cc
  1397. * src/HttpDownloadCommand.h
  1398. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1399. Fixed the bug that the control file(.aria2 file) is not renamed
  1400. according to tryAutoFileRenaming().
  1401. tryAutoFileRenaming() was rewritten so that if both renamed file and
  1402. its control file exist, use them and continue download.
  1403. The old implementation didn't take into account of control file's
  1404. existence, so basically you couldn't continue download of renamed file.
  1405. * src/BtProgressInfoFile.h
  1406. * src/DefaultBtProgressInfoFile.cc
  1407. * src/DefaultBtProgressInfoFile.h
  1408. * src/NullProgressInfoFile.h
  1409. * src/RequestGroup.cc
  1410. * test/DefaultBtProgressInfoFileTest.cc
  1411. * test/MockBtProgressInfoFile.h
  1412. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1413. Change the default value of --metalink-servers option from `5' to `1'.
  1414. * src/HelpItemFactory.cc
  1415. * src/option_processing.cc
  1416. * src/usage_text.h
  1417. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1418. Reimplemented transparent metalink using Accept request header.
  1419. * src/HttpRequest.cc
  1420. * src/HttpRequest.h
  1421. * src/HttpRequestCommand.cc
  1422. * src/Metalink2RequestGroup.cc
  1423. * src/RequestGroup.cc
  1424. * src/RequestGroup.h
  1425. * test/HttpRequestTest.cc
  1426. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1427. Bump up version number to 0.13.2a
  1428. * configure.ac
  1429. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1430. Updated configure.ac using the result of autoscan.
  1431. * configure.ac
  1432. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1433. Fixed compilation error without gcrypt/openssl.
  1434. * src/DownloadCommand.cc
  1435. * src/DownloadCommand.h
  1436. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1437. Reorganized version information so that it can be displayed in a
  1438. standard terminal screen without scrolling.
  1439. Removed http, ftp from Configuration section, because they are always
  1440. enabled.
  1441. * src/FeatureConfig.cc
  1442. * src/FeatureConfig.h
  1443. * src/main.cc
  1444. * src/messageDigest.cc
  1445. * src/messageDigest.h
  1446. * src/version_usage.cc
  1447. * test/FeatureConfigTest.cc
  1448. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1449. Masked user ID in log.
  1450. * src/FtpConnection.cc (sendUser)
  1451. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1452. Removed query part from filename in HTTP download. The query part means
  1453. the substring after "?" in URL. Firefox seems do the same thing.
  1454. A query part is sometimes very long and not suitable to filename,
  1455. so I think it is better to remove it from filename.
  1456. * src/HttpRequest.cc
  1457. * src/HttpRequest.h
  1458. * src/Request.cc
  1459. * src/Request.h
  1460. * test/HttpRequestTest.cc
  1461. * test/RequestTest.cc
  1462. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1463. Rewritten Exception class. Throw exception object, not its pointer and
  1464. catch by reference, so that remove problematic delete operator for
  1465. catched exception.
  1466. * src/Exception.cc
  1467. * src/Exception.h
  1468. * test/ExceptionTest.cc
  1469. * src/*: All files throwing/catching exception.
  1470. * test/*: All files throwing/catching exception.
  1471. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1472. Now auto protocol detection is enabled without -Z option.
  1473. But there is a important difference between with/without -Z optoin.
  1474. For example, if you type:
  1475. aria2c http://host/file file1.torrent file2.metalink http://mirror/file
  1476. then, aria2 interprets there are 3 request groups:
  1477. (1) http://host/file, http://mirror/file <-- multi-source download
  1478. (2) file1.torrent
  1479. (3) file2.metalink
  1480. On the other hand, if you invoke above command with -Z option, it is
  1481. interpreted as 4 request groups:
  1482. (1) http://host/file
  1483. (2) file1.torrent
  1484. (3) file2.metalink
  1485. (4) http://mirror/file
  1486. I think usually user don't mix multi-source URLs and torrent files, so
  1487. there is no big problem here.
  1488. * src/main.cc
  1489. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1490. Fixed the bug that causes segmentaion fault when reading XML containing
  1491. unescapsed character like '&'.
  1492. Also a modification was made which avoids adding unnecessary
  1493. characters stack and appending unused string.
  1494. * src/ExpatMetalinkProcessor.cc
  1495. * src/FileMetalinkParserState.h
  1496. * src/FilesMetalinkParserState.h
  1497. * src/FinMetalinkParserState.h
  1498. * src/HashMetalinkParserState.h
  1499. * src/InitialMetalinkParserState.h
  1500. * src/LanguageMetalinkParserState.h
  1501. * src/MetalinkMetalinkParserState.h
  1502. * src/MetalinkParserState.h
  1503. * src/MetalinkParserStateMachine.cc
  1504. * src/MetalinkParserStateMachine.h
  1505. * src/OSMetalinkParserState.h
  1506. * src/PieceHashMetalinkParserState.h
  1507. * src/PiecesMetalinkParserState.h
  1508. * src/ResourcesMetalinkParserState.h
  1509. * src/SizeMetalinkParserState.h
  1510. * src/SkipTagMetalinkParserState.h
  1511. * src/URLMetalinkParserState.h
  1512. * src/VerificationMetalinkParserState.h
  1513. * src/VersionMetalinkParserState.h
  1514. * src/XML2SAXMetalinkProcessor.cc
  1515. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1516. Added StringFormat class, which internally calls vasprintf.
  1517. operator<< is defined for this class, so it can be used with iostream
  1518. classes nicely. SimpleLogger and following functions are rewritten
  1519. using StringFormat class.
  1520. Besides, now Logger class's methods are non-const, many classes
  1521. that has a const Logger* as a member variable are modified to remove
  1522. const qualifier from the variable declaration.
  1523. * src/HelpItemFactory.cc
  1524. * src/Request.cc
  1525. * src/SimpleLogger.cc
  1526. * src/StringFormat.cc
  1527. * src/StringFormat.h
  1528. * src/Util.cc
  1529. * src/option_processing.cc
  1530. * src/version_usage.cc
  1531. * test/StringFormatTest.cc
  1532. * src/*.h: The classes that has const Logger* as a member variable.
  1533. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1534. Log error in AccRequestGroup when reading BitTorrent/Metalink file is
  1535. failed. Also fixed memory link when exception is thrown there.
  1536. * src/main.cc (AccRequestGroup)
  1537. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1538. Added build-in "Accept-Features" support. For now only "metalink" is
  1539. used in this header field.
  1540. This "metalink" value is removed from the list when connecting URLs
  1541. fed by metalink file to avoid loop in "transparent" metlaink.
  1542. * src/HttpRequest.cc
  1543. * src/HttpRequest.h: Renamed _userHeaders as _headers. Accept-Features
  1544. header is also held in this variable. Also renamed setUserHeaders as
  1545. addHeader and it was rewritten to add header not just to clear the old
  1546. value.
  1547. * src/HttpRequestCommand.cc
  1548. * src/Metalink2RequestGroup.cc: Added the code to remove "metalink"
  1549. from "Accept-Features" list.
  1550. * src/RequestGroup.cc: Added "metalink" to "Accept-Features" by
  1551. default.
  1552. * src/RequestGroup.h
  1553. * src/TaggedItem.cc: Moved Concat class to a2functional.h.
  1554. * src/a2functional.h: Included <string> because Concat class depends on
  1555. it.
  1556. * test/HttpRequestTest.cc
  1557. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1558. Added comment
  1559. * src/RequestGroup.cc (createNextCommand)
  1560. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1561. Capitalized METHOD_GET and METHOD_HEAD
  1562. * src/Request.cc
  1563. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1564. Added getDownloadResults() method
  1565. * src/RequestGroupMan.cc
  1566. * src/RequestGroupMan.h
  1567. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1568. Fixed the bug that aria2 exits when commands is empty() but
  1569. _routineCommands are not.
  1570. * src/DownloadEngine.cc
  1571. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1572. Use the default value pulled from Option object in HelpItemFactory.
  1573. except options whose defualt value is embedded in a usage text.
  1574. * src/HelpItemFactory.cc
  1575. * src/HelpItemFactory.h
  1576. * src/option_processing.cc
  1577. * src/version_usage.cc
  1578. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1579. Added --quiet option to make aria2 quiet (no console output).
  1580. --quiet option is tagged with ADVANCED.
  1581. * src/HelpItemFactory.cc
  1582. * src/LogFactory.cc
  1583. * src/LogFactory.h
  1584. * src/MultiUrlRequestInfo.cc
  1585. * src/MultiUrlRequestInfo.h
  1586. * src/NullStatCalc.h: New class. This class prints nothing.
  1587. * src/OptionHandlerFactory.cc
  1588. * src/main.cc
  1589. * src/option_processing.cc
  1590. * src/prefs.h
  1591. * src/usage_text.h
  1592. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1593. Add HTTP tag to --header option. Removed ADVANCED tag instead.
  1594. * src/HelpItemFactory.cc (createHelpItems):
  1595. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1596. Fixed compilation error in ExpatMetalinkProcessor.cc
  1597. * src/ExpatMetalinkProcessor.cc
  1598. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1599. Reuse socket if the origin server supports HTTP keep-alive and
  1600. --enable-http-keep-alive or --enable-http-pipelining is given.
  1601. The current implementation doesn't reuse the connections established
  1602. against proxy server.
  1603. * src/AbstractCommand.cc
  1604. * src/DownloadEngine.cc
  1605. * src/DownloadEngine.h
  1606. * src/HttpDownloadCommand.cc
  1607. * src/HttpInitiateConnectionCommand.cc
  1608. * src/HttpResponseCommand.cc
  1609. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1610. Rewritten HTTP keep-alive and pipelining routine.
  1611. * src/AbstractCommand.cc
  1612. * src/HttpConnection.cc
  1613. * src/HttpDownloadCommand.cc
  1614. * src/HttpRequest.cc
  1615. * src/HttpRequestCommand.cc
  1616. * src/HttpResponseCommand.cc
  1617. * src/Request.cc
  1618. * src/Request.h
  1619. * src/RequestGroup.cc
  1620. * test/HttpRequestTest.cc
  1621. * test/HttpResponseTest.cc
  1622. * test/RequestTest.cc
  1623. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1624. Added missing setUserHeaders call
  1625. * src/HttpRequestCommand.cc
  1626. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1627. Call FileAllocationMan::nextFileAllocationEntryExists() first.
  1628. Calling FileAllocationMan::isFileAllocationBeingExecuted() is somwhat
  1629. waste of time because it is more likey false.
  1630. * src/FileAllocationDispatcherCommand.cc (execute)
  1631. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1632. Now HTTP status and version are a member variable of HttpHeader.
  1633. HTTP status is processed as a string, not integer.
  1634. * src/AbstractProxyResponseCommand.cc
  1635. * src/HttpConnection.cc
  1636. * src/HttpHeader.cc
  1637. * src/HttpHeader.h
  1638. * src/HttpHeaderProcessor.cc
  1639. * src/HttpHeaderProcessor.h
  1640. * src/HttpResponse.cc
  1641. * src/HttpResponse.h
  1642. * test/HttpHeaderProcessorTest.cc
  1643. * test/HttpResponseTest.cc
  1644. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1645. Added --header option. You can specify any number of additional HTTP headers
  1646. like:
  1647. aria2 --header="X-A: 300" --header="X-B: 900" http://host/file
  1648. Unlike other commad-line option, you can use --header option multiple times.
  1649. * src/HelpItemFactory.cc
  1650. * src/HttpRequest.{cc, h}
  1651. * src/HttpRequestCommand.cc
  1652. * src/OptionHandlerFactory.cc
  1653. * src/OptionHandlerImpl.h
  1654. * src/option_processing.cc
  1655. * src/prefs.h
  1656. * src/usage_text.h
  1657. * test/HttpRequestTest.cc (testUserHeaders)
  1658. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1659. Eliminates the time lag between sequential downloads and commands in
  1660. the same RequestGroup.
  1661. In old implementation, aria2 occasionally waits 1 seconds before
  1662. executing next command or RequestGroup.
  1663. This is really a waste of time, and new implementation eliminates
  1664. this unnecessary time lag.
  1665. * src/AbstractCommand.cc
  1666. * src/AutoSaveCommand.cc
  1667. * src/CheckIntegrityCommand.cc
  1668. * src/Command.{cc, h}
  1669. * src/DownloadEngine.{cc, h}
  1670. * src/DownloadEngineFactory.cc
  1671. * src/FileAllocationCommand.cc
  1672. * src/FileAllocationDispatcherCommand.cc
  1673. * src/FillRequestGroupCommand.cc
  1674. * src/FtpInitiateConnectionCommand.cc
  1675. * src/HaveEraseCommand.cc
  1676. * src/HttpInitiateConnectionCommand.cc
  1677. * src/HttpResponseCommand.cc
  1678. * src/RealtimeCommand.cc
  1679. * src/RequestGroup.cc
  1680. * src/RequestGroupMan.cc
  1681. * src/StreamFileAllocationEntry.cc
  1682. * src/TimeBasedCommand.{cc, h}
  1683. * src/TimedHaltCommand.cc
  1684. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1685. Rewritten SharedHandle. Now copy constructor taking raw pointer has
  1686. keyword explicit and SharedHandle's default constructor initializes
  1687. its internal obj to null, old implementation initializes it using
  1688. obj's default constructor.
  1689. To assign null, write SharedHandle<T> x(...); x.reset();
  1690. TODO: test/SharedHandleTest.cc needs more tests.
  1691. * src/SharedHandle.h
  1692. 2008-04-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1693. Fixed type in man page.
  1694. * doc/aria2c.1.txt
  1695. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1696. Merged Ross's 0.13.1+1 Cygwin compile fix patch.
  1697. * src/SimpleLogger.{cc, h}
  1698. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1699. Implemented auto protocol detection.
  1700. Now you can do:
  1701. aria2c -Z http://host/file file1.torrent file2.metalink
  1702. (Note: -Z option is required for auto protcol detection.)
  1703. Then aria2c downloads 3 files simultaneously:
  1704. 1. http://host/file
  1705. 2. file1.torrent <-- read local torrent file
  1706. 3. file2.metalink <-- read local Metalink file.
  1707. Same thing goes with -i option. Assume your uris.txt contans:
  1708. http://host/file
  1709. file1.torrent
  1710. file2.metalink
  1711. Then you can do: aria2c -i uris.txt
  1712. (Note: -Z option is not needed if -i option is given.)
  1713. * src/main.cc
  1714. * src/ProtocolDetector.{cc, h}
  1715. * test/ProtocolDetectorTest.cc
  1716. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1717. Fixed compile error without gnutls/libgcrypt/libgpg-error and openSSL
  1718. installed
  1719. * src/ARC4Encryptor.h
  1720. * src/ARC4Decryptor.h
  1721. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1722. Renamed argument from 'errno' to 'err', since errno is confused with
  1723. errno defined in errno.h.
  1724. * src/LibgcryptARC4Decryptor.h
  1725. * src/LibgcryptARC4Context.h
  1726. * src/LibgcryptDHKeyExchange.h
  1727. * src/LibgcryptARC4Encryptor.h
  1728. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1729. Rewritten choking algorithm.
  1730. * src/PeerChokeCommand.{cc, h}
  1731. * src/BtInterestedMessage.cc
  1732. * src/PeerSessionResource.{cc, h}
  1733. * src/DefaultPeerStorage.{cc, h}
  1734. * src/BtNotInterestedMessage.cc
  1735. * src/DefaultBtMessageDispatcher.{cc, h}
  1736. * src/BtMessageDispatcher.h
  1737. * src/Peer.{cc, h}
  1738. * src/BtLeecherStateChoke.{cc, h}
  1739. * src/BtSetup.cc
  1740. * src/BtSeederStateChoke.{cc, h}
  1741. * src/PeerStorage.h
  1742. * test/MockPeerStorage.h
  1743. * test/MockBtMessageDispatcher.h
  1744. 2008-04-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1745. Fixed compilation error on x84-64 platform.
  1746. * src/AuthConfig.cc: Included ostream.
  1747. 2008-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1748. Rewritten getBasename() and getDirname(), without standard library
  1749. basename(), dirname().
  1750. * src/File.cc
  1751. * test/FileTest.cc
  1752. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1753. Added Simplified Chinese translation. Also updated the following
  1754. translations: Polish, Dutch, German. Great thanks to all translators.
  1755. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1756. Suppress content-range error when 'Content-Range' response header
  1757. doesn't contains bytes-unit specifier 'bytes'
  1758. * src/HttpHeader.cc (getRange)
  1759. * test/HttpHeaderTest.cc
  1760. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1761. Fixed compilation error with g++-4.3
  1762. 2008-03-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1763. Added missing include files for MinGW
  1764. * test/HttpHeaderProcessorTest.cc
  1765. * test/DHTRoutingTableSerializerTest.cc
  1766. * test/DHTRoutingTableDeserializerTest.cc
  1767. * test/UriListParserTest.cc
  1768. 2008-03-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1769. Now download line is printed nicely with no garbage at the end of
  1770. line. I use ioctl to get the columns of terminal.
  1771. If stdout is redirected to another device, instead of carriage return,
  1772. end of line '\n' character is used. This is feature request#1909659
  1773. * src/ConsoleStatCalc.cc (calculateStat)
  1774. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1775. Included a2time.h
  1776. * src/DHTMessageDispatcher.h
  1777. * src/DHTMessageEntry.h
  1778. * src/DHTReplaceNodeTask.h
  1779. * src/DHTMessageTracker.h
  1780. * src/Util.h
  1781. * src/CookieBox.h
  1782. * src/SocketCore.h
  1783. * src/DefaultBtMessageDispatcher.h
  1784. * src/SocketCore.cc
  1785. * src/Util.cc
  1786. * src/DHTPingTask.h
  1787. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1788. Fixed high memory footprint when DHT is enabled.
  1789. This is not a memory leak, but DHTReplaceNodeTask is more frequently
  1790. queued than it is processed and the queue is getting longer. As a
  1791. consequence, momory usage is increased.
  1792. As for a fix, instead of issuing DHTReplaceNodeTask, I've implemented
  1793. replacement cache in DHTBucket which is described in Kademlia paper.
  1794. * src/DHTRoutingTable.cc (addNode): Removed the issuing of
  1795. DHTReplaceNodeTask.
  1796. * src/DHTBucket.{h, cc}
  1797. (cacheNode): New function.
  1798. (getCachedNodes): New function.
  1799. (dropNode): Push back cached node to _nodes.
  1800. * test/DHTBucketTest.cc
  1801. (testCacheNode): New test
  1802. (testDropNode): New test
  1803. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1804. Allocate memory for peekBuf in initiateSecureConnection() to avoid
  1805. the unused 4KB memory when ssl is not used.
  1806. * src/SocketCore.cc
  1807. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1808. Added summary log for peer announce storage.
  1809. * src/DHTPeerAnnounceStorage.cc (handleTimeout)
  1810. Removed cast
  1811. * src/DefaultPeerStorage.cc (addPeer)
  1812. Log exception message
  1813. * src/DHTMessageTracker.cc (handleTimeout)
  1814. Fixed casting
  1815. * test/HttpRequestTest.cc
  1816. * test/MetalinkProcessorTest.cc
  1817. * test/PieceTest.cc
  1818. * test/MetalinkEntryTest.cc
  1819. * test/SequenceTest.cc
  1820. 2008-03-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1821. * src/ParameterizedStringParser.cc (createLoop):
  1822. Removed unused variable sstep.
  1823. * src/AlphaNumberDecorator.h (decode): Rewritten.
  1824. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1825. * src/Util.{h, cc}
  1826. (parseUInt): New function.
  1827. (alphaToNum): Now returns unsigned int and 0 when overflow detected.
  1828. The actual range is uint32_t.
  1829. * test/UtilTest.cc
  1830. * src/ParameterizedStringParser.cc:
  1831. Use Util::parseUInt() for loop variables.
  1832. * test/ParameterizedStringParserTest.cc
  1833. * src/PStringNumLoop.h: Make _startValue and _endValue unsigned int.
  1834. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1835. Rewritten the functions for binding port.
  1836. * src/DHTConnectionImpl.{h, cc}
  1837. * src/PeerListenCommand.{h, cc}
  1838. * src/DHTSetup.cc
  1839. * src/BtSetup.cc
  1840. * test/DHTConnectionImplTest.cc
  1841. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1842. type cleanup for allmost all remaining files.
  1843. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1844. Type clarification
  1845. * src/PeerSessionResource.{h, cc}
  1846. * src/DefaultPieceStorage.{h, cc}
  1847. * src/Peer.{h, cc}
  1848. * test/PeerSessionResourceTest.cc
  1849. Use div function
  1850. * src/BtPieceMessage.cc (erasePieceOnDisk)
  1851. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1852. Type clarification
  1853. * src/DefaultPeerStorage.{h, cc}
  1854. * test/DefaultPeerStorageTest.cc
  1855. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1856. Type clarification: size_t for length or size, uint64_t for file
  1857. length, off_t for file offset.
  1858. * src/DefaultBtProgressInfoFile.cc
  1859. * src/DefaultBtContext.{h, cc}
  1860. * src/DefaultBtInteractive.cc
  1861. * src/DownloadCommand.{h, cc}
  1862. * src/IteratableChunkChecksumValidator.{h, cc}
  1863. * src/SegmentMan.{h, cc}
  1864. * src/SingleFileDownloadContext.{h, cc}
  1865. * src/IteratableChecksumValidator.{h, cc}
  1866. * src/BtContext.h
  1867. * src/IteratableValidator.h
  1868. * src/DownloadContext.h
  1869. * test/SingleFileDownloadContextTest.cc
  1870. * test/DefaultBtContextTest.cc
  1871. * test/MockBtContext.h
  1872. * test/Metalink2RequestGroupTest.cc
  1873. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1874. Type clarification: size_t for length or size, uint64_t for file
  1875. length, off_t for file offset.
  1876. * src/PiecedSegment.cc
  1877. * src/GrowSegment.h
  1878. * src/DefaultBtRequestFactory.h
  1879. * src/DefaultBtProgressInfoFile.cc
  1880. * src/UnknownLengthPieceStorage.h
  1881. * src/DefaultPieceStorage.cc
  1882. * src/UnknownLengthPieceStorage.cc
  1883. * src/DefaultBtInteractive.cc
  1884. * src/GrowSegment.cc
  1885. * src/BitfieldMan.h
  1886. * src/DownloadCommand.cc
  1887. * src/BtRequestFactory.h
  1888. * src/PiecedSegment.h
  1889. * src/DefaultPieceStorage.h
  1890. * src/Piece.cc
  1891. * src/DefaultBtRequestFactory.cc
  1892. * src/PieceStorage.h
  1893. * src/Segment.h
  1894. * src/Piece.h
  1895. * src/BitfieldMan.cc
  1896. * src/Util.cc
  1897. * test/DefaultBtProgressInfoFileTest.cc
  1898. * test/DefaultPieceStorageTest.cc
  1899. * test/MockPieceStorage.h
  1900. * test/BtRequestMessageTest.cc
  1901. * test/DefaultBtMessageDispatcherTest.cc
  1902. * test/BitfieldManTest.cc
  1903. * test/GrowSegmentTest.cc
  1904. * test/PieceTest.cc
  1905. * test/SegmentTest.cc
  1906. * test/SegmentManTest.cc
  1907. * test/DefaultBtRequestFactoryTest.cc
  1908. * test/MockBtRequestFactory.h
  1909. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1910. Fixed compilation error with --disable-nls
  1911. It seems that defining gettext(Msgid) to ((const char *) (Msgid))
  1912. in gettext.h causes the problem.
  1913. * src/common.h
  1914. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1915. Removed subPiece related functions.
  1916. * src/Piece.{h, cc} : Also rewritten getCompletedLength().
  1917. * src/DefaultPieceStorage.{h, cc}
  1918. * test/PieceTest.cc
  1919. * test/DefaultPieceStorageTest.cc
  1920. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1921. Use unsigned char for data store.
  1922. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1923. Bump up version number to 0.13.0+1
  1924. * configure.ac
  1925. * Release 0.13.0+1
  1926. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1927. Changed inactive connection timeout to 120.
  1928. To accept more mulually interested peers, disconnect peer when there
  1929. is no interest between us after certain time passed.
  1930. * src/DefaultBtInteractive.cc (checkActiveInteraction)
  1931. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1932. Fixed the bug that aria2 only uses first dns server in resolv.conf
  1933. when compiled with async DNS support.
  1934. * src/DownloadEngine.cc
  1935. * src/option_processing.cc: Lengthened DNS timeout to 30. I think old
  1936. value '10' will be a little bit short when some DNS servers are
  1937. offline and several DNS servers are tried. It should be configured
  1938. by command-line option.
  1939. 2008-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1940. Merged Ross's mingw patch.
  1941. * src/DHTRoutingTableDeserializer.cc
  1942. * src/DHTRoutingTableSerializer.cc
  1943. * src/Platform.{h, cc}
  1944. * src/timegm.h
  1945. * src/gettimeofday.h
  1946. * src/getaddrinfo.h
  1947. * src/SocketCore.h
  1948. * src/common.h
  1949. * src/inet_aton.h
  1950. * src/DownloadEngine.h
  1951. * src/gai_strerror.h
  1952. * src/a2netcompat.h
  1953. * configure.ac
  1954. * configure
  1955. * aclocal.m4
  1956. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1957. Included missing iostream.
  1958. * test/AllTest.cc
  1959. * test/BtDependencyTest.cc
  1960. * test/BtExtendedMessageTest.cc
  1961. * test/DHTConnectionImplTest.cc
  1962. * test/DHTMessageFactoryImplTest.cc
  1963. * test/DHTMessageTrackerEntryTest.cc
  1964. * test/DHTNodeTest.cc
  1965. * test/DHTRoutingTableSerializerTest.cc
  1966. * test/DefaultBtAnnounceTest.cc
  1967. * test/DefaultBtContextTest.cc
  1968. * test/DefaultBtMessageFactoryTest.cc
  1969. * test/DefaultExtensionMessageFactoryTest.cc
  1970. * test/HandshakeExtensionMessageTest.cc
  1971. * test/HttpResponseTest.cc
  1972. * test/MetalinkProcessorTest.cc
  1973. * test/MultiFileAllocationIteratorTest.cc
  1974. * test/SocketCoreTest.cc
  1975. * test/UTPexExtensionMessageTest.cc
  1976. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1977. Reorganized includes.
  1978. * src/NameResolver.cc
  1979. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1980. Fixed compilation error without ares/c-ares
  1981. * src/NameResolver.h:
  1982. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1983. Added a test for large file.
  1984. * test/MetalinkProcessorTest.cc (testLargeFileSize):
  1985. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1986. Fixed the bug that file size is ignored if size > INT32_MAX
  1987. * src/SizeMetalinkParserState.cc (endElement):
  1988. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1989. Bump up version number to 0.13.0
  1990. * configure.ac
  1991. * Release 0.13.0
  1992. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1993. Updated Makfefile.am to make 'make dist' work.
  1994. Now packaged filename is aria2c-VERSION.tar.bz2.
  1995. Added README, README.html, and aria2c.1.html to dist_doc_DATA.
  1996. Added LICENSE.OpenSSL to dist_noinst_DATA.
  1997. Large file support is now configured by configure script.
  1998. * configure.ac
  1999. Removed unsused source files
  2000. * src/
  2001. * test/
  2002. Removed PeerDecl.h and BtContextDecl.h. typedefs are removed to
  2003. Peer.h and BtContext.h respectively.
  2004. * src/Peer.h
  2005. * src/BtContext.h
  2006. Updated translations.
  2007. Added Polish, Thai, Indonesian, Norwegian Nynorsk, Hungarian
  2008. translations. Great thanks to all translators!;)
  2009. * po/*.{po, gmo}
  2010. 2008-02-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2011. Create MessageDigestHelper::staticSHA1DigestInit() which uses
  2012. statically declared sha1 MessageDigestContext.
  2013. * src/BtPieceMessage.cc: Use staticSHA1DigestInit() to avoid
  2014. initialization of short-lived MessageDigestContext.
  2015. * src/MessageDigestHelper.{h, cc}
  2016. * src/main.cc
  2017. Now DownloadCommand has a reference to MessageDigestContext to avoid
  2018. the initialization of MessageDigestContext every time in validating
  2019. chunk checksum.
  2020. * src/DownloadCommand.{h, cc}
  2021. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2022. Add a file descriptor which connected to fast peer(latency<1500) to
  2023. select(). This change reduced CPU load.
  2024. * src/PeerInteractionCommand.cc
  2025. * src/DefaultBtInteractive.{h, cc}
  2026. * src/BtInteractive.h
  2027. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2028. Fixed the previous insufficient fix for possible busy loop.
  2029. * src/MSEHandshake.cc (identifyHandshakeType)
  2030. Removed unused functions.
  2031. * src/MSEHandshake.{h, cc} (readDataAndDecrypt)
  2032. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2033. Fixed possible busy loop if first 20 bytes are not received for a few
  2034. minutes.
  2035. * src/MSEHandshake.{h, cc} (identifyHandshakeType)
  2036. * src/ReceiverMSEHandshakeCommand.cc
  2037. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2038. Fixed compilation error
  2039. * src/ExpatMetalinkProcessor.cc
  2040. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2041. Fixed compile error on Mac OS X, on 64Bit OS maybe.
  2042. * src/DHTBucket.cc
  2043. Removed unnecessary cast.
  2044. * src/HandshakeExtensionMessage.cc
  2045. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2046. Fixed the bug that option handler for PREF_METALINK_ENABLE_UNIQUE_PROTOCOL.
  2047. is missing.
  2048. * src/OptionHandlerFactory.cc
  2049. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2050. Fixed the bug that HAVE message is not sent for a piece they are
  2051. downloaded fom http/ftp server before any BitTorrent handshake is done
  2052. with peers.
  2053. * src/DefaultBtInteractive.cc
  2054. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2055. Removed RequestInfo.h and FileAllocator.h since they have been removed.
  2056. * src/Makefile.am
  2057. * src/Makefile.in
  2058. 2008-02-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2059. Updated README. Added html version of README and man page.
  2060. * README
  2061. * README.html
  2062. * readme2html: Shell script to generate README.html from README using
  2063. asciidoc.
  2064. * doc/aria2c.1.html
  2065. * doc/makeman: Added the line to generate aria2c.1.html
  2066. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2067. Fixed offset calculation.
  2068. * src/LibgcryptDHKeyExchange.h (computeSecret)
  2069. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2070. Rewritten itos and uitos using template. llitos and ullitos are
  2071. replaced with itos and uitos respectively.
  2072. * src/Util.{h, cc}
  2073. * test/UtilTest.cc
  2074. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2075. Fixed the bug that DH key exchange sometimes fails due to bad handling
  2076. of the number of bytes required for storing public key and shared
  2077. secret.
  2078. * src/LibgcryptDHKeyExchange.h
  2079. * src/LibsslDHKeyExchange.h: Also added function name to handleError.
  2080. * src/MSEHandshake.cc
  2081. * test/DHKeyExchangeTest.cc
  2082. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2083. Removed since they are not used.
  2084. * src/Xml2MetalinkProcessor.{h, cc}
  2085. * src/Socket.cc
  2086. * src/SegmentSplitter.{h, cc}
  2087. * test/Xml2MetalinkProcessorTest.cc
  2088. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2089. Fixed the bug that prevents aria2 from stopping other than by pressing
  2090. Ctrl-C in BitTorrent download. It is reproducible using --seed-time
  2091. option. aria2 doesn't stop even after --seed-time is satisfied and
  2092. continues to output blank lines in the console.
  2093. * src/ReceiverMSEHandshakeCommand.cc
  2094. * src/PeerReceiveHandshakeCommand.cc
  2095. * src/PeerListenCommand.cc
  2096. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2097. Bump up version number to 0.13.0rc
  2098. * configure.ac
  2099. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2100. Updated man page and some usage text.
  2101. * doc/aria2c.1.txt
  2102. * src/usage_text.h
  2103. * po/*.{po, gmo}
  2104. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2105. Updated translations. Added Finnish and Hebrew translations.
  2106. Great thanks to all translators!
  2107. * po/*.{po, gmo}
  2108. * po/LINGUAS
  2109. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2110. Log more detailed information about each message.
  2111. * src/DHTQueryMessage.{h, cc}
  2112. * src/DHTGetPeersMessage.{h, cc}
  2113. * src/DHTFindNodeReplyMessage.{h, cc}
  2114. * src/DHTGetPeersReplyMessage.{h, cc}
  2115. * src/DHTAnnouncePeerMessage.{h, cc}
  2116. * src/DHTResponseMessage.{h, cc}
  2117. * src/DHTFindNodeMessage.{h, cc}
  2118. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2119. Use constants defined in prefs.h
  2120. * src/option_processing.cc
  2121. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2122. * test/AllTest.cc: Added OpenSSL, GNUTLS initialization code.
  2123. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2124. Make room for future enchancements for IPv6 addresses.
  2125. Bump up version number of dht.dat file format to 2.
  2126. Not compatible with previous version.
  2127. * src/DHTRoutingTableSerializer.cc
  2128. * src/DHTRoutingTableDeserializer.cc
  2129. * test/DHTRoutingTableSerializerTest.cc
  2130. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2131. Added handling for the return values from
  2132. PeerMessageUtil::createcompact().
  2133. * src/DefaultBtContext.cc (computeFastSet):
  2134. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2135. Fixed abort when peer's ip address is IPv4-mapped address.
  2136. * src/DefaultBtContext.cc (computeFastSet)
  2137. Removed number-and-dots criteria, since Util::isNumberAndDotsNotation()
  2138. cannot handle IPv4-mapped addresses.
  2139. * src/DefaultBtInteractive.cc (addPeerExchangeMessage)
  2140. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2141. Proper return value handling for OpenSSL functions.
  2142. * src/LibsslDHKeyExchange.h
  2143. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2144. Random bytes generation using libgcrypt and OpenSSL.
  2145. * src/DHTUtil.{h, cc}
  2146. * test/DHTUtilTest.cc
  2147. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2148. Fixed segmentation fault when a DHT message which doesn't have 'y' key
  2149. received.
  2150. * src/DHTMessageReceiver.cc (receiveMessage)
  2151. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2152. Fixed the bug that a return code is always 0. BUG#1897704
  2153. If error occurred during the download or there exist unfinished
  2154. downloads, aria2 returns with code 1.
  2155. * src/RequestGroupMan.{h, cc}
  2156. * src/MultiUrlRequestInfo.{h, cc}
  2157. * src/main.cc
  2158. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2159. IPv6 support for SocketCore class.
  2160. TODO: In SocketCore::establishConnection(), this is insufficient to
  2161. determin the failure of connect() here because the socket is
  2162. non-blocking state. The next addresses should be tried after select().
  2163. TODO: NameResolver still uses c-ares(<= 1.4) ares_gethostbyname().
  2164. If c-ares 1.5 or newer is installed, ares_getaddrinfo() should be used
  2165. instead which address family independent.
  2166. TODO: DHTRoutingTable{Deserializer,Serializer} currently saves peer
  2167. information in a compact peer format which is for IPv4 only.
  2168. Some BitTorrent functions in PeerMessageUtil still depends on IPv4 but
  2169. this is a spec of BitTorrent protocol.
  2170. * src/SocketCore.{h, cc}
  2171. * src/PeerMessageUtil.cc
  2172. * test/SocketCoreTest.cc
  2173. * test/PeerMessageUtilTest.cc
  2174. * test/DHTConnectionImplTest.cc
  2175. Handle IPv4-mapped addresses.
  2176. * src/DHTNode.cc: Now identity is determined by node id.
  2177. * src/DHTMessageTrackerEntry.cc
  2178. Because now PeerMessageUtil::unpackcompact() could fail, the caller
  2179. should handle it.
  2180. * src/DHTRoutingTableDeserializer.cc
  2181. * src/DHTMessageFactoryImpl.cc
  2182. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2183. Change the unit of --stop option from a minute to a second.
  2184. * src/usage_text.h
  2185. * src/DownloadEngineFactory.cc
  2186. * src/OptionHandlerFactory.cc
  2187. * src/message.h
  2188. * src/TimedHaltCommand.cc
  2189. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2190. Make listening socket non-block mode.
  2191. * src/FtpConnection.cc
  2192. * src/FtpNegotiationCommand.{h, cc}
  2193. * src/PeerListenCommand.cc
  2194. Fixed the bug that cause slow ftp negotiation.
  2195. * src/FtpNegotiationCommand.{h, cc}
  2196. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2197. Added basic tag to --enable-dht, --dht-listen-port option.
  2198. * src/HelpItemFactory.cc (createHelpItems)
  2199. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2200. Updated text.
  2201. * src/usage_text.h
  2202. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2203. * src/MSEHandshake.cc (encryptAndSendData): Use std::min().
  2204. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2205. Determin _threadtholdSpeed in each constructor for
  2206. ActivePeerConnectionCommand and PeerReceiveHandshakeCommand.
  2207. * src/ActivePeerConnectionCommand.{h, cc}
  2208. * src/PeerReceiveHandshakeCommand.{h, cc}
  2209. * src/BtSetup.cc
  2210. * src/BtConstants.h
  2211. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2212. Added --bt-min-crypto-level and --bt-require-crypto options.
  2213. * src/OptionHandlerFactory.cc
  2214. * src/MSEHandshake.cc
  2215. * src/HelpItemFactory.cc
  2216. * src/option_processing.cc
  2217. * src/ReceiverMSEHandshakeCommand.cc
  2218. * src/prefs.h
  2219. * src/DefaultBtAnnounce.cc
  2220. * src/InitiatorMSEHandshakeCommand.cc
  2221. * src/usage_text.h
  2222. * test/MSEHandshakeTest.cc
  2223. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2224. Bump version number to 0.13.0b
  2225. * configure.ac
  2226. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2227. Updated doc.
  2228. * src/MessageDigestHelper.h:
  2229. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2230. Use raw message digest as a token instead of its hexadecimal
  2231. representation.
  2232. * src/DHTTokenTracker.cc (generateToken)
  2233. 2008-02-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2234. Added Message Stream Encryption(MSE) support.
  2235. Currently, aria2 accepts incoming connections with Obfuscation Header
  2236. and legacy BitTorrent Header and establishes connections with
  2237. Obfuscation Header first and if failed then retry with legacy
  2238. BitTorrent header. If plain text and ARC4 is provided, aria2 always
  2239. choose ARC4. The new option to change the default behavior is planned.
  2240. For tracker extension, "supportcrypto=1" is added statically.
  2241. * src/PeerInitiateConnectionCommand.{h, cc}
  2242. * src/PeerConnection.{h, cc}
  2243. * src/HandleRegistry.h
  2244. * src/SocketCore.h
  2245. * src/PeerReceiveHandshakeCommand.{h, cc}
  2246. * src/BtRegistry.{h, cc}
  2247. * src/PeerListenCommand.cc
  2248. * src/InitiatorMSEHandshakeCommand.{h, cc}
  2249. * src/ReceiverMSEHandshakeCommand.{h, cc}
  2250. * src/MSEHandshake.{h, cc}
  2251. * src/ARC4Encryptor.h
  2252. * src/ARC4Decryptor.h
  2253. * src/LibgcryptARC4Encryptor.h
  2254. * src/LibgcryptARC4Decryptor.h
  2255. * src/LibgcryptARC4Context.h
  2256. * src/LibsslARC4Encryptor.h
  2257. * src/LibsslARC4Decryptor.h
  2258. * src/LibsslARC4Context.h
  2259. * src/DHKeyExchange.h
  2260. * src/LibgcryptDHKeyExchange.h
  2261. * src/LibsslDHKeyExchange.h
  2262. * src/DefaultBtAnnounce.cc: Just added "supportcrypto=1" parameter.
  2263. * test/DefaultBtAnnounceTest.cc
  2264. * test/ARC4Test.cc
  2265. * test/DHKeyExchangeTest.cc
  2266. Removed prepareForRetry() because it is not used.
  2267. * src/PeerAbstractCommand.{h, cc}
  2268. * src/PeerInteractionCommand.{h, cc}
  2269. * src/PeerInitiateConnectionCommand.{h, cc}
  2270. 2008-02-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2271. Added the ability to load nodes from torrent file. These nodes are
  2272. added to the routing table when downloading that torrent.
  2273. * src/BtContext.h
  2274. * src/DefaultBtContext.{h, cc}
  2275. * src/DHTSetup.cc
  2276. * src/DHTEntryPointNameResolveCommand.{h, cc}: Now accepts list of
  2277. hostname and port pair, and resolves all of them.
  2278. * src/NameResolver.{h, cc}: Added reset().
  2279. * src/RequestGroup.cc
  2280. * test/DefaultBtContextTest.cc
  2281. * test/MockBtContext.h
  2282. Removed assert() from DefaultBtContext and throw exception instead.
  2283. * src/DefaultBtContext.cc
  2284. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2285. Fixed segmentation fault bug when exiting if dht is disabled.
  2286. * src/RequestGroup.cc
  2287. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2288. Fixed typo in log message and define the message in message.h
  2289. * src/TimedHaltCommand.cc
  2290. * src/message.h
  2291. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2292. Included RecoverableException.h to fix compilation error.
  2293. * test/DHTMessageFactoryImplTest.cc
  2294. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2295. Added test 'testDoReceivedAction' for DHTQueryMessage subclasses.
  2296. * test/DHTPingMessageTest.cc
  2297. * test/DHTGetPeersMessageTest.cc
  2298. * test/DHTFindNodeMessageTest.cc
  2299. * test/DHTAnnouncePeerMessageTest.cc
  2300. * test/MockDHTMessage.h
  2301. * test/MockDHTMessageFactory.h
  2302. * test/MockDHTMessageDispatcher.h: New class.
  2303. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2304. Added DHTMessageDispatcherImpl. Now DHTMessageDispatcher is pure
  2305. virtual.
  2306. * src/DHTMessageDispatcher.h
  2307. * src/DHTMessageDispatcherImpl.{h, cc}
  2308. * src/DHTSetup.cc
  2309. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2310. Adding handling of DHT error message. Just log error message and
  2311. throw exception.
  2312. * src/DHTMessageFactoryImpl.cc
  2313. * test/DHTMessageFactoryImplTest.cc
  2314. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2315. Added handling of dynamic cast failure.
  2316. * src/DHTNodeLookupTask.cc
  2317. * src/DHTPeerLookupTask.cc
  2318. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2319. Added the ability to stop aria2 itself when given time has passed
  2320. from start. Use --stop option to specify time in minutes.
  2321. When 0 is given, this feature is disabled.
  2322. * src/OptionHandlerFactory.cc
  2323. * src/TimeBasedCommand.h: Make _interval protected scope.
  2324. * src/HelpItemFactory.cc
  2325. * src/option_processing.cc
  2326. * src/prefs.h
  2327. * src/FillRequestGroupCommand.cc: Evaluate _e->isHaltRequested()
  2328. before calling RequestGroupMan::fillRequestGroupFromReserver().
  2329. Without this modification, the result list shows "ERR" when aria2 is
  2330. stopped by --stop option. It should be "INPR".
  2331. * src/DownloadEngine.{h, cc}
  2332. * src/DownloadEngineFactory.cc
  2333. * src/usage_text.h
  2334. * src/TimedHaltCommand.{h, cc}: New class.
  2335. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2336. Bootstrap through node added by port message.
  2337. Currently bootstrap is executed if the number of buckets in routing
  2338. table is 1.
  2339. * src/BtPortMessage.{h, cc}
  2340. * src/DefaultBtMessageFactory.{h, cc}
  2341. * src/PeerInteractionCommand.cc
  2342. * test/BtPortMessageTest.cc
  2343. * test/MockDHTTask.h
  2344. 2008-02-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2345. Extract the Peer class's member variables, which are only needed after
  2346. PeerInteractionCommand, into PeerSessionResource class.
  2347. This class is instantiated in PeerInteractionCommand class's ctor and
  2348. released in its dtor.
  2349. This will make Peer class lightweight and uses less memory for peers
  2350. which are not connected and wait in the queue.
  2351. * src/PeerChokeCommand.cc
  2352. * src/PeerSessionResource.{h, cc}
  2353. * src/PeerInteractionCommand.cc
  2354. * src/PeerAbstractCommand.cc: Note: 0 is given to onAbort() function.
  2355. * src/DefaultBtInteractive.cc
  2356. * src/BtPieceMessage.cc
  2357. * src/BtInterestedMessage.cc
  2358. * src/BtUnchokeMessage.cc
  2359. * src/DefaultPeerStorage.{h, cc}
  2360. * src/PeerInitiateConnectionCommand.cc
  2361. * src/ActivePeerConnectionCommand.cc
  2362. * src/BtNotInterestedMessage.cc
  2363. * src/DefaultBtMessageDispatcher.cc
  2364. * src/BtChokeMessage.cc
  2365. * src/BtRequestMessage.cc
  2366. * src/Peer.{h, cc}
  2367. * src/BtRegistry.h
  2368. * src/TrackerWatcherCommand.cc
  2369. * src/PeerReceiveHandshakeCommand.cc
  2370. * test/BtExtendedMessageTest.cc
  2371. * test/BtAllowedFastMessageTest.cc
  2372. * test/BtCancelMessageTest.cc
  2373. * test/DefaultPieceStorageTest.cc
  2374. * test/BtBitfieldMessageTest.cc
  2375. * test/BtHaveMessageTest.cc
  2376. * test/BtNotInterestedMessageTest.cc
  2377. * test/BtRequestMessageTest.cc
  2378. * test/PeerSessionResourceTest.cc
  2379. * test/DefaultBtMessageDispatcherTest.cc
  2380. * test/PeerTest.cc
  2381. * test/BtInterestedMessageTest.cc
  2382. * test/BtRejectMessageTest.cc
  2383. * test/BtChokeMessageTest.cc
  2384. * test/DefaultPeerStorageTest.cc
  2385. * test/BtHaveNoneMessageTest.cc
  2386. * test/BtHaveAllMessageTest.cc
  2387. * test/DefaultExtensionMessageFactoryTest.cc
  2388. * test/BtUnchokeMessageTest.cc
  2389. * test/DefaultBtMessageFactoryTest.cc
  2390. * test/HandshakeExtensionMessageTest.cc
  2391. * test/UTPexExtensionMessageTest.cc
  2392. * test/DefaultBtRequestFactoryTest.cc
  2393. * test/BtPieceMessageTest.cc
  2394. Removed typedef PeerStats.
  2395. * src/PeerStat.h
  2396. * src/SegmentMan.cc
  2397. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2398. Added std namespace to copy, remove_copy, back_inserter,
  2399. front_inserter.
  2400. * src/RequestGroupMan.cc
  2401. * src/DefaultPieceStorage.cc
  2402. * src/StreamFileAllocationEntry.cc
  2403. * src/BtFileAllocationEntry.cc
  2404. * src/RequestGroup.cc
  2405. * src/MetalinkEntry.cc
  2406. * src/DelegatingPeerListProcessor.cc
  2407. * src/DefaultBtRequestFactory.cc
  2408. * src/DefaultBtMessageDispatcher.cc
  2409. * src/version_usage.cc: Included <algorithm>
  2410. * src/main.cc
  2411. * src/MetalinkParserController.cc
  2412. * src/DefaultBtContext.cc
  2413. * src/DownloadEngineFactory.cc
  2414. * src/a2algo.h
  2415. Removed.
  2416. * test/StreamUriListParserTest.cc
  2417. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2418. Use PREF_MAX_DOWNLOAD_LIMIT as a threshold for
  2419. ActivePeerConnectionCommand when it is given and
  2420. PREF_MAX_DOWNLOAD_LIMIT < default threshold.
  2421. * src/ActivePeerConnectionCommand.{h, cc}
  2422. * src/BtSetup.cc
  2423. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2424. Only add socket to DownloadEngine's select routine when peer or
  2425. localhost is unchoked and interested. This lowers CPU usage a
  2426. little bit.
  2427. * src/PeerInteractionCommand.cc
  2428. * src/PeerAbstractCommand.{h, cc}
  2429. * src/BtInteractive.h
  2430. * src/DefaultBtInteractive.{h, cc}
  2431. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2432. Revert previous change because get_peers message is needed for
  2433. announce_peer anyway.
  2434. * src/DHTGetPeersCommand.cc
  2435. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2436. Request peers thought DHT only when download hasn't finished.
  2437. * src/DHTGetPeersCommand.cc
  2438. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2439. Force refresh bucket when startup if certain time has passed(currently 15 minutes).
  2440. * src/DHTBucketRefreshTask.{h, cc}
  2441. * src/DHTSetup.cc
  2442. 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2443. Removed "using namespace std;" from all sources. Appended std:: prefix to c++
  2444. standard classes.
  2445. Included string.h where mem* function are used.
  2446. Added namespace aria2.
  2447. 2008-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2448. Create directory before saving DHT routing table.
  2449. Now ios::failure is now handled properly.
  2450. * src/DHTAutoSaveCommand.cc
  2451. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2452. Removed unnecessary cerr.
  2453. * src/DownloadEngine.cc
  2454. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2455. Catch exception inside DHTMessageReceiver::receiveMessage().
  2456. Log unknown message.
  2457. * src/DHTMessageReceiver.{h, cc}
  2458. * src/DHTMessageFactory.h
  2459. * src/DHTMessageFactoryImpl.{h, cc}
  2460. * src/DHTMessageTracker.cc (handleTimeout): Catch and handle exception.
  2461. * src/DHTInteractionCommand.cc
  2462. * src/DHTUnknownMessage.{h, cc}
  2463. * test/DHTUnknownMessageTest.cc
  2464. * test/MockDHTMessageFactory.h
  2465. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2466. Commented out ip address comparison because a host can have multiple
  2467. ip addresses and it is hard to predict the hostname is resolved into
  2468. which one.
  2469. * test/SocketCoreTest.cc (testWriteAndReadDatagram)
  2470. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2471. * po/Makefile.in: Removed since this is generated by configure.
  2472. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2473. Fixed compiler warning about redefinition of SIZE_MAX.
  2474. Use common.h instead of config.h directly here.
  2475. * src/Platform.{h, cc}
  2476. The check of ENABLE_NLS is made in gettext.h, so it is not required
  2477. here.
  2478. * common.h
  2479. 2008-02-02 gettextize <bug-gnu-gettext@gnu.org>
  2480. Updated gettext related files.
  2481. * configure.ac (AC_CONFIG_FILES): Add intl/Makefile.
  2482. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17.
  2483. 2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2484. Added DHT functionality, compatible with mainline.
  2485. DHT is disabled by default. To enable it, give --enable-dht to aria2c.
  2486. You may need to specify entry point to DHT network using
  2487. --dht-entry-point. DHT uses UDP port to listen incoming message.
  2488. Use --dht-listen-port to specify port number. Make sure that your
  2489. firewall configuration can pass through UDP traffic to the port.
  2490. The routing table is saved in $HOME/.aria2/dht.dat.
  2491. * src/DHT*
  2492. * src/BNode.{h, cc}
  2493. * src/PeerInteractionCommand.cc: enable DHT functionality for a
  2494. particular torrent.
  2495. * src/Data.cc: Rewritten ctor.
  2496. * src/OptionHandlerFactory.cc: Added --enable-dht, --dht-listen-port,
  2497. --dht-entry-point.
  2498. * src/DefaultBtInteractive.cc: Send port message if dht is enabled.
  2499. * src/RequestGroup.cc: Initialize DHT functionality. When download
  2500. ends, remove BtContext from DHTPeerAnnounceStorage.
  2501. * src/BtPortMessage.{h, cc}: Rewritten.
  2502. * src/message.h
  2503. * src/OptionHandlerImpl.cc
  2504. * src/option_processing.cc: Added --enable-dht, --dht-listen-port,
  2505. --dht-entry-point.
  2506. * src/Dictionary.{h, cc} (remove): New function.
  2507. * src/prefs.h
  2508. * src/DefaultBtMessageFactory.h
  2509. * src/BtHandshakeMessage.cc
  2510. * src/ActivePeerConnectionCommand.cc
  2511. * src/SocketCore.{h, cc}: Added datagram socket support.
  2512. * src/DefaultBtMessageFactory.cc
  2513. * src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
  2514. Create DHT commands.
  2515. * src/BtMessageFactory.h
  2516. * src/PeerMessageUtil.{h, cc}
  2517. 2008-01-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2518. Fixed the bug that log file is not written when configuration file doesn't exist.
  2519. This is caused by using Logger class before LogFactory is not configured.
  2520. BUG #1875079
  2521. * src/option_processing.cc
  2522. Warning message "configuration doesn't exist" is only printed when --conf is
  2523. given.
  2524. * src/option_processing.cc
  2525. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2526. Use BencodeVisitor and MessageDigestHelper instead of ShaVisitor.
  2527. ShaVisitor is now deprecated and slated to be removed.
  2528. * src/DefaultBtContext.cc
  2529. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2530. Externalize message to message.h
  2531. * src/Platform.cc
  2532. * src/message.h
  2533. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2534. Set default domain and default path to cookie.
  2535. * src/HttpResponse.cc
  2536. * src/CookieBox.{h, cc}
  2537. * src/CookieParser.{h, cc}
  2538. * test/CookieParserTest.cc
  2539. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2540. Added --no-conf and --conf-path command-line option.
  2541. --no-conf option disables loading aria2.conf file.
  2542. --conf-path option changes the configuration file path. The default
  2543. file path is $HOME/.aria2/aria2.conf
  2544. Added a warning message when the configuration file is not found.
  2545. * src/HelpItemFactory.cc
  2546. * src/option_processing.cc
  2547. * src/prefs.h
  2548. * src/usage_text.h
  2549. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2550. Added the message to inform users that other help categories are
  2551. available in -h option.
  2552. * src/version_usage.cc
  2553. * src/TagContainer.{h, cc}
  2554. * test/TagContainerTest.cc
  2555. * src/TaggedItem.{h, cc}
  2556. * test/TaggedItemTest.cc
  2557. * src/HelpItem.h
  2558. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2559. Added Piece::getFirstMissingBlockIndexWithoutLock() and it is called
  2560. from PiecedSegment's ctor.
  2561. Previously Piece::getAllMissingBlockIndexes() is called from
  2562. PiecedSegment() but it is rather expensive since only first element is
  2563. used.
  2564. * src/PiecedSegment.cc
  2565. * src/Piece.{h, cc}
  2566. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2567. Rewritten get*Missing*Index functions. Now no need to allocate memory
  2568. each time these functions are called.
  2569. * src/BitfieldMan.{h, cc}
  2570. * test/BitfieldManTest.cc
  2571. * src/array_fun.h
  2572. * test/array_funTest.cc
  2573. Now BitfieldMan::countBlock() returns BitfieldMan::blocks.
  2574. Added new BitfieldMan::countFilteredBlock() to get the number of blocks
  2575. filtered. Removed unnecessary cast to int32_t.
  2576. * src/BitfieldMan.{h, cc}
  2577. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2578. Fixed the bug that EX_TOO_LONG_PAYLOAD exception is thrown if just
  2579. payload length(4bytes) are received. This happens because lenbufLength
  2580. is not updated in this particular case and successive call of
  2581. receiveMessage() overwrites payload length with bytes recieved which
  2582. are payload body.
  2583. * src/PeerConnection.{h, cc}
  2584. * src/message.h
  2585. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2586. Fixed the bug that DefaultPeerStorage::returnPeer() may delete wrong
  2587. peer if there are peers that have same ipaddr and port.
  2588. I've experiened segmentation fault and "pure virtual function was
  2589. called" error.
  2590. * src/Peer.h
  2591. * test/PeerTest.cc
  2592. * src/DefaultPeerStorage.cc
  2593. * test/DefaultPeerStorageTest.cc
  2594. 2008-01-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2595. Removed a call to isPowerOf() because it is no longer necessary here
  2596. and a request block is not always power of 2.
  2597. BUG#1866924
  2598. * src/PeerMessageUtil.cc (checkLength)
  2599. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2600. Fixed the bug that always first found Segment is removed from
  2601. usedSegmentEntries. Removed unused functions.
  2602. * src/SegmentMan.{h, cc}
  2603. * test/SegmentManTest.cc
  2604. Fixed the bug that ServerHost is not removed.
  2605. * src/RequestGroup.cc
  2606. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2607. Fixed the bug that SegmentMan::completeSegment() is not called
  2608. even if Segment is complete when --lowest-speed-limit is enabled.
  2609. BUG#1864525
  2610. * src/DownloadCommand.{h, cc}
  2611. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2612. Fixed: hash algorithm 'sha1' is always used.
  2613. * src/DownloadCommand.cc (validatePieceHash)
  2614. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2615. Added --enable-peer-exchange command-line option.
  2616. * src/OptionHandlerFactory.cc
  2617. * src/HelpItemFactory.cc
  2618. * src/option_processing.cc
  2619. * src/usage_text.h
  2620. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2621. Move extension from BtRuntime to ExtensionMessageFactory, because
  2622. extension can be specified per peer, not per torrent.
  2623. * src/DefaultBtInteractive.cc
  2624. * src/BtRuntime.h
  2625. * src/ExtendedMessagingAware.h
  2626. * src/ExtensionMessageFactory.h
  2627. * src/DefaultExtensionMessageFactory.cc
  2628. * test/DefaultExtensionMessageFactoryTest.cc
  2629. 2008-01-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2630. Added categorized option help. Specify category using --help option.
  2631. Also added the ability to search options in forward match.
  2632. * src/HelpItem.{h, cc}
  2633. * test/HelpItemTest.cc
  2634. * src/HelpItemFactory.{h, cc}
  2635. * src/TagContainer.{h, cc}
  2636. * test/TagContainerTest.cc
  2637. * src/option_processing.cc
  2638. * src/prefs.h
  2639. * src/TaggedItem.{h, cc}
  2640. * test/TaggedItemTest.cc
  2641. * src/version_usage.cc
  2642. * src/help_tags.h
  2643. * src/usage_text.h
  2644. 2008-01-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2645. Fixed segmentation fault when bad torrent metainfo is parsed.
  2646. Added dynamic_cast properly to detect the misconfiguration of metainfo
  2647. and then throw exception or skip it.
  2648. * src/DefaultBtContext.{h, cc}
  2649. * test/DefaultBtContextTest.cc
  2650. * src/AnnounceList.cc
  2651. * src/CompactPeerListProcessor.cc
  2652. * src/message.h
  2653. * src/DefaultBtAnnounce.{h, cc}
  2654. * test/DefaultBtAnnounceTest.cc
  2655. * src/BencodeVisitor.cc
  2656. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2657. Added missing "B"(=Byte). So now the message looks like this:
  2658. Your share ratio was 1.0, uploaded/downloaded=12MiB/12MiB
  2659. * src/message.h (MSG_SHARE_RATIO_REPORT)
  2660. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2661. Show the seed ratio after torrent downloads.
  2662. For example, after torrent download completed and --seed-time and
  2663. --seed-ratio conditions are fulfilled, following message is printed
  2664. right after "Download complete: .....":
  2665. Your share ratio was 1.0, uploaded/downloaded=12M/12M
  2666. * src/RequestGroupMan.cc
  2667. * src/RequestGroup.{h, cc}
  2668. * src/message.h
  2669. 2007-12-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2670. Remove a defunct control file. A defunct control file means that while
  2671. it exists, but the corresponding download file is missing.
  2672. After its removal, a download restarts from the beginning.
  2673. * src/RequestGroup.cc
  2674. * src/message.h
  2675. 2007-12-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2676. Allocate bitfield in Peer when it is really used. More specifically,
  2677. bitfield in Peer is allocated after the connection is established and
  2678. deallocated when the connection is dropped.
  2679. Since 2 parameters(piece length and total length) was removed from the
  2680. constructor of Peer class, many test classes were modified accordingly.
  2681. See svn log for more detailed information.
  2682. * src/PeerInteractionCommand.cc
  2683. * src/CompactPeerListProcessor.cc
  2684. * src/Peer.cc
  2685. * src/DefaultPeerListProcessor.cc
  2686. * src/PeerListenCommand.cc
  2687. * src/PeerReceiveHandshakeCommand.cc
  2688. Fixed memory leak
  2689. * src/Piece.cc
  2690. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2691. Changed the default value of PREF_PEER_CONNECTION_TIMEOUT and
  2692. lowestSpeedLimit in ActivePeerConnectionCommand. TODO: Make them
  2693. command-line options.
  2694. * src/option_processing.cc
  2695. * src/ActivePeerConnectionCommand.cc
  2696. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2697. Send have message to peer if it already has the piece.
  2698. * src/BtHaveMessage.{h, cc}
  2699. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2700. Removed incomingPeer. Set 0 to peer's port if it is not a listening
  2701. port.
  2702. * src/DefaultPeerStorage.{h, cc}
  2703. * test/DefaultPeerStorageTest.cc
  2704. * src/HandshakeExtensionMessage.cc
  2705. * test/HandshakeExtensionMessageTest.cc
  2706. * src/Peer.{h, cc}: Added ipaddr and port to identity comparison.
  2707. * src/PeerStorage.h
  2708. * test/MockPeerStorage.h
  2709. * src/PeerListenCommand.cc
  2710. * src/PeerReceiveHandshakeCommand.cc
  2711. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2712. Added --metalink-enable-unique-protocol option.
  2713. * src/Metalink2RequestGroup.cc
  2714. * src/option_processing.cc
  2715. * src/prefs.h
  2716. * src/version_usage.cc
  2717. * doc/aria2c.1.txt
  2718. * doc/aria2c.1
  2719. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2720. Allow a peer in incomingPeer to be added peers.
  2721. * src/DefaultPeerStorage.cc
  2722. * test/DefaultPeerStorageTest.cc
  2723. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2724. Fixed the bug that causes aria2 not to finish download. BUG#1855875.
  2725. I could reproduce this bug in following procedure:
  2726. 1. Stop the download at the very beginning(1% or 100KB downloaded).
  2727. 2. Restart aria2.
  2728. 3. You see the download stopped around 99%.
  2729. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  2730. * src/StreamFileAllocationEntry.cc: Removed the timeout handling.
  2731. If timeout is reached, then _nextCommand is unused and it may contains
  2732. segments and they won't be canceled. Actually, timeout is not needed
  2733. here because if the server dropped connection, then retry is made.
  2734. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2735. Added uTorrent compatible Peer Exchange.
  2736. * src/BencodeVisitor.{h, cc}
  2737. * test/BencodeVisitorTest.cc
  2738. * src/BtConstants.h
  2739. * src/BtContext.h: Added 'private' flag.
  2740. * src/BtExtendedMessage.{h, cc}
  2741. * test/BtExtendedMessageTest.cc
  2742. * src/BtHandshakeMessage.{h, cc}: Set extended messaging bit in
  2743. reserved field.
  2744. * test/BtHandshakeMessageTest.cc
  2745. * src/BtMessageFactory.h
  2746. * src/BtRegistry.h
  2747. * src/BtRuntime.h: This class holds default extension message IDs for
  2748. aria2. By default, aria2 uses ID 8 for ut_pex.
  2749. * src/DefaultBtContext.cc
  2750. * src/DefaultBtInteractive.{h, cc}: This class holds _utPexEnabled.
  2751. When it is true, aria2 enables ut_pex. This value is set by
  2752. PeerInteractionCommand.
  2753. * src/DefaultBtMessageFactory.{h, cc}
  2754. * test/DefaultBtMessageFactoryTest.cc
  2755. * src/DefaultBtMessageReceiver.cc: Moved the code of fast extension
  2756. handling to DefaultBtInteractive class.
  2757. * src/DefaultExtensionMessageFactory.{h, cc}
  2758. * test/DefaultExtensionMessageFactoryTest.cc
  2759. * src/DefaultPeerStorage.cc: Returns false if a peer is already in
  2760. the container(peers and incomingPeers. The equality is determined by
  2761. Peer::id).
  2762. * test/DefaultPeerStorageTest.cc
  2763. * src/ExtensionMessage.h
  2764. * test/MockExtensionMessage.h
  2765. * src/ExtensionMessageFactory.h
  2766. * test/MockExtensionMessageFactory.h
  2767. * src/HandshakeExtensionMessage.{h, cc}
  2768. * test/HandshakeExtensionMessageTest.cc
  2769. * src/MetaEntry.h
  2770. * src/Peer.{h, cc}
  2771. * src/PeerInteractionCommand.cc
  2772. * src/PeerReceiveHandshakeCommand.cc: Evaluate the return value of
  2773. addIncomingPeer.
  2774. * src/PeerMessageUtil.{h, cc}
  2775. * src/PeerObject.h
  2776. * src/UTPexExtensionMessage.{h, cc}
  2777. * test/UTPexExtensionMessageTest.cc
  2778. * src/message.h
  2779. * src/prefs.h
  2780. Fixed the bug that returns incomplete data when it contains null
  2781. character. A convenient constructor was also added.
  2782. * src/Data.{h, cc}
  2783. Rewritten.
  2784. * src/CompactPeerListProcessor.cc
  2785. Fixed typos.
  2786. * src/message.h
  2787. * src/MetaFileUtil.cc
  2788. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2789. Added "Status Legend" label to the explanation text of 'stat' in
  2790. download result and moved it to the last. BUG#1848214
  2791. * src/RequestGroupMan.cc
  2792. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2793. Fixed the bug that -lexpat is always added to aria2c_LDADD.
  2794. * src/Makefie.am
  2795. * test/Makefile.am
  2796. 2007-12-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2797. Fixed the bug that prevents aria2 from loading cookie file when expire
  2798. value is greater than 2^31-1. BUG#1851066
  2799. * src/CookieBoxFactory.cc
  2800. * test/CookieBoxFactoryTest.cc
  2801. 2007-12-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2802. Fixed possible memory leak when an exception is thrown.
  2803. * src/XML2SAXMetalinkProcessor.cc
  2804. Added Expat support. If both libxml2 and Expat are installed, then
  2805. libxml2 is used by default.
  2806. MetalinkProcessorFactory chooses from XML2SAXMetalinkProcessor and
  2807. ExpatMetalinkProcessor according to the configuration.
  2808. * src/ExpatMetalinkProcessor.{h, cc}
  2809. * src/main.cc: Removed libxml2 specific header and init/free function.
  2810. * src/MetalinkProcessorFactory.{h, cc}
  2811. * src/MetalinkHelper.cc
  2812. * src/Metalinker.h: Removed unnecessary libxml2 header.
  2813. * src/MetalinkProcessor.h
  2814. * test/XML2SAXMetalinkProcessorTest.cc: Removed because
  2815. MetalinkProcessorTest is used instead.
  2816. * test/MetalinkProcessorTest.cc: Added. It is actually the same with
  2817. XML2SAXMetalinkProcessor, replaced XML2SAXMetalinkProcessor with
  2818. MetalinkProcessorFactory::newInstance().
  2819. * m4/libexpat.m4
  2820. * configure.ac: Added configuration options for libexpat.
  2821. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2822. Disabled -s option in metalink download.
  2823. * src/Metalink2RequestGroup.cc
  2824. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2825. If several protocols are available for a mirror in metalink file,
  2826. aria2 now use one of them. --metalink-preferred-protocol option was
  2827. added to specify the preference of protocol.
  2828. * src/AbstractCommand.cc
  2829. * src/OptionHandlerFactory.cc
  2830. * src/ServerHost.{h, cc}
  2831. * src/Metalink2RequestGroup.cc
  2832. * src/RequestGroup.{h, cc}
  2833. * test/RequestGroupTest.cc
  2834. * src/option_processing.cc
  2835. * src/prefs.h
  2836. * src/HttpResponseCommand.cc
  2837. * src/MetalinkResource.{h, cc}
  2838. * src/FtpNegotiationCommand.cc
  2839. * src/MetalinkEntry.{h, cc}
  2840. * src/MetalinkEntryTest.cc
  2841. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2842. Code cleanup and added debug log.
  2843. * src/PeerConnection.cc
  2844. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2845. Compiler error fix: applied the patch by Tiziano Mueller
  2846. * src/RequestGroup.cc
  2847. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2848. Fixed the bug: only first announce URL is tried in AnnounceTier,
  2849. in stopped and completed event.
  2850. * src/AnnounceList.{h, cc}
  2851. * test/AnnounceListTest.cc
  2852. * src/DefaultBtAnnounce.cc
  2853. * test/DefaultBtAnnounceTest.cc
  2854. Sorted URLs.
  2855. * test/Metalink2RequestGroupTest.cc
  2856. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2857. Removed unnecessary string copy. Updated doc and corrected indentation.
  2858. * src/Base64.cc
  2859. Fixed compilation warnings
  2860. * test/DataTest.cc
  2861. * test/HttpRequestTest.cc
  2862. * test/MetaFileUtilTest.cc
  2863. * test/RequestTest.cc
  2864. * Release 0.12.0
  2865. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2866. Updated translations
  2867. * po/{de,fr,ja,nl,ru}.po
  2868. Added Brazilian Portuguese, Catalan, Italian, Spanish, Swedish
  2869. translations. Many thanks to translators.
  2870. * po/{ca,es,it,pt_BR,sv}.po
  2871. * po/LINGUAS
  2872. 2007-12-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2873. Added a notice about URL
  2874. * src/version_usage.cc
  2875. 2007-12-07 Tatsuhiro Tsujikawa <tujikawa at rednoah com>
  2876. Fixed the bug#1845750; CTRL+C does not stop torrent.
  2877. aria2 repeatedly sends stopped request when tracker returns error code.
  2878. * src/AnnounceList.cc
  2879. * test/AnnounceListTest.cc
  2880. * src/AnnounceTier.h
  2881. Added a message when ctrl-c is hit.
  2882. Now second ctrl-c is also handled in signal handler.
  2883. * src/RequestGroupMan.{h, cc}
  2884. * src/RequestGroup.{h, cc}
  2885. * src/MultiUrlRequestInfo.cc
  2886. * src/DownloadEngine.cc
  2887. * src/TrackerWatcherCommand.cc
  2888. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2889. Code cleanup
  2890. * src/Base64.cc (encode)
  2891. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2892. Changed Direct/IO enable/disable procesure in file allocation routine.
  2893. * src/SingleFileAllocationIterator.cc
  2894. (SingleFileAllocationIterator):
  2895. Disable directIO if offset is not multiple of 512.
  2896. (~SingleFileAllocationIterator): Removed a call to disableDirectIO.
  2897. * src/MultiFileAllocationIterator.cc (allocateChunk):
  2898. Enable created SingleFileAllocationIterator's directIO.
  2899. * src/FileAllocationEntry.cc
  2900. (FileAllocationEntry): Enable directIO here.
  2901. (~FileAllocationEntry): Disable directIO here.
  2902. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2903. Fixed the bug: aria2 doesn't utilize fast set index offered by peer.
  2904. * src/Peer.{h, cc}
  2905. * src/DefaultPieceStorage.cc
  2906. * test/DefaultPieceStorageTest.cc
  2907. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2908. Rewritten direct I/O support routine
  2909. * src/SingleFileAllocationIterator.cc
  2910. * src/MultiDiskAdaptor.{h, cc}
  2911. * src/ByteArrayDiskWriter.h
  2912. * src/AbstractSingleDiskAdaptor.h
  2913. * src/AbstractDiskWriter.cc
  2914. * src/DefaultPieceStorage.cc
  2915. * src/DiskWriter.h
  2916. * src/BinaryStream.h
  2917. * src/IteratableChunkChecksumValidator.cc
  2918. * src/IteratableChecksumValidator.cc
  2919. * src/CheckIntegrityEntry.cc
  2920. * src/FileAllocationEntry.cc
  2921. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2922. Fixed typo
  2923. * src/version_usage.cc
  2924. Updated doc
  2925. * doc/aria2c.1.txt
  2926. * doc/aria2c.1
  2927. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2928. Fixed compile error without message digest support.
  2929. * src/FileMetalinkParserState.cc
  2930. * src/MetalinkParserController.{h, cc}
  2931. * test/XML2SAXMetalinkProcessorTest.cc
  2932. * test/MetalinkParserControllerTest.cc
  2933. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2934. Enable direct I/O support in checksum checking.
  2935. * src/IteratableChunkChecksumValidator.{h, cc}
  2936. * test/IteratableChunkChecksumValidatorTest.cc
  2937. * src/CheckIntegrityEntry.cc
  2938. * src/PieceHashCheckIntegrityEntry.cc
  2939. * src/IteratableChecksumValidator.{h, cc}
  2940. * src/BtCheckIntegrityEntry.cc: Added doc.
  2941. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2942. Added --allow-piece-length-change option.
  2943. * src/DefaultBtProgressInfoFile.cc
  2944. * test/DefaultBtProgressInfoFileTest.cc
  2945. * src/OptionHandlerFactory.cc
  2946. * src/option_processing.cc
  2947. * src/prefs.h
  2948. * src/version_usage.cc
  2949. * doc/aria2c.1.txt
  2950. * doc/aria2c.1
  2951. Fixed: duplicated result entry appears when exception is thrown in
  2952. RequestGroup::createInitiateConnectionCommand().
  2953. * src/RequestGroupMan.cc (fillRequestGroupFromReserver):
  2954. Add RequestGroup to _requestGroup after RequetGroup::
  2955. createInitiateConnectionCommand() succeeds.
  2956. Externalized message
  2957. * src/XML2SAXMetalinkProcessor.cc
  2958. * src/message.h
  2959. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2960. Forced download abort when received negative response from http/ftp
  2961. server.
  2962. * src/HttpResponseCommand.cc
  2963. * src/FtpNegotiationCommand.cc
  2964. * src/HttpResponse.cc
  2965. * src/FtpConnection.cc
  2966. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2967. Added XML2SAXMetalinkProcessor class, which is a lot faster than
  2968. the predecessor, Xml2MetalinkParser class.
  2969. I tested them against 94KB metalink file with 1234 chunk checksums.
  2970. The new one parsed it in 22msec, while it took 6000msec with old one.
  2971. * src/XML2SAXMetalinkProcessor.{h, cc}
  2972. * test/XML2SAXMetalinkProcessorTest.cc
  2973. * src/MetalinkParserController.{h, cc}
  2974. * test/MetalinkParserControllerTest.cc
  2975. * src/MetalinkParserState.h: Also added 16 subclasses.
  2976. * src/main.cc
  2977. * src/Metalink2RequestGroup.cc
  2978. * src/MetalinkHelper.cc
  2979. * src/MetalinkEntry.cc
  2980. * src/ChunkChecksum.h
  2981. Rewritten Base64 class for better performance.
  2982. * src/Base64.{h, cc}
  2983. * test/Base64Test.cc
  2984. * src/HttpRequest.cc
  2985. 2007-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2986. Fixed the bug#1841757: aria2 will connect to server to only get
  2987. file size.
  2988. * src/StreamFileAllocationEntry.cc
  2989. * src/option_processing.cc
  2990. * src/HttpResponseCommand.cc: Now reuse connection in segmented
  2991. downloads.
  2992. * src/FtpNegotiationCommand.cc
  2993. Suppressed wrong message when finding PreDownloadHandler
  2994. * src/RequestGroup.cc
  2995. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2996. Updated usage
  2997. * src/version_usage.cc
  2998. Updated man page
  2999. * doc/aria2c.1.txt
  3000. * doc/aria2c.1
  3001. Updated po files
  3002. * po/aria2c.pot
  3003. * po/*.po
  3004. * po/*.gmo
  3005. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3006. Eliminated g++-4.2 warning
  3007. * src/DownloadHandlerConstants.{h, cc}
  3008. * src/Util.cc
  3009. * test/MetaFileUtilTest.cc
  3010. * test/PStringBuildVisitorTest.cc
  3011. Fixed bug: --check-integrity doesn't work for multi file torrent.
  3012. * src/RequestGroup.cc
  3013. * src/BtCheckIntegrityEntry.cc
  3014. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3015. Fixed a2io.h
  3016. * src/a2io.h
  3017. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3018. Added direct I/O support. The current implementation uses O_DIRECT,
  3019. which is not posix standard and is tested on linux 2.6.21.
  3020. Currently only file allocation uses direct I/O.
  3021. * src/SingleFileAllocationIterator.{h, cc}
  3022. * test/SingleFileAllocationIteratorTest.cc
  3023. * src/MultiFileAllocationIterator.{h, cc}
  3024. * test/MultiFileAllocationIteratorTest.cc
  3025. * src/BinaryStream.h
  3026. * src/DiskWriter.h
  3027. * src/AbstractDiskWriter.{h, cc}
  3028. * src/ByteArrayDiskWriter.h
  3029. * src/DiskAdaptor.h
  3030. * src/AbstractSingleDiskAdaptor.{h, cc}
  3031. * src/MultiDiskAdaptor.{h, cc}
  3032. * src/FileAllocationEntry.cc
  3033. * src/Util.{h, cc}
  3034. * src/OptionHandlerFactory.cc
  3035. * src/prefs.h
  3036. * src/version_usage.cc
  3037. * src/option_processing.cc
  3038. Moved FileAllocationMan::markCurrentFileAllocationEntryDone() to
  3039. handleException.
  3040. * src/MultiFileAllocationIterator.cc
  3041. Added EINTR handling
  3042. * src/SocketCore.cc
  3043. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3044. Updated usage
  3045. * src/version_usage.cc
  3046. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3047. Applied Ross's patch for MinGW port.
  3048. * src/DownloadEngine.h
  3049. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3050. Set Content-Type to SingleFileDownloadContext when http response is
  3051. received.
  3052. * src/HttpResponseCommand.cc
  3053. * src/HttpResponse.{h, cc}
  3054. * test/HttpResponseTest.cc
  3055. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3056. Rewritten to add content-type support.
  3057. * src/DownloadHandler.{h, cc}
  3058. * src/BtPostDownloadHandler.{h, cc}
  3059. * test/BtPostDownloadHandlerTest.cc
  3060. * src/MetalinkPostDownloadHandler.{h, cc}
  3061. * test/MetalinkPostDownloadHandlerTest.cc
  3062. * src/PostDownloadHandler.{h, cc}
  3063. * src/DownloadHandlerConstants.{h, cc}
  3064. * src/RequestGroup.cc
  3065. * src/HttpResponseCommand.cc
  3066. * src/FtpNegotiationCommand.cc
  3067. * src/SingleFileDownloadContext.{h, cc}
  3068. * src/RequestGroup.h
  3069. * src/RequestGroupCriteria.h
  3070. * src/ContentTypeRequestGroupCriteria.h
  3071. Added 'mem' option value for --follow-metalink, --follow-torrent.
  3072. If it is give, metalink/torrent file is not written to the disk, but
  3073. just is kept in memory. Parsing is occurred on memory.
  3074. * src/MetalinkHelper.{h, cc}
  3075. * src/MetalinkProcessor.h
  3076. * src/Xml2MetalinkProcessor.{h, cc}
  3077. * test/Xml2MetalinkProcessorTest.cc
  3078. * src/DownloadHandlerFactory.{h, cc}
  3079. * test/DownloadHandlerFactoryTest.cc
  3080. * src/PreDownloadHandler.{h, cc}
  3081. * src/OptionHandlerFactory.cc
  3082. * src/DefaultBtContext.{h, cc}
  3083. * test/DefaultBtContextTest.cc
  3084. * src/version_usage.cc
  3085. * src/Metalink2RequestGroup.{h, cc}
  3086. * src/RequestGroup.{h, cc}
  3087. * src/a2functional.h
  3088. * test/a2functionalTest.cc
  3089. * src/MemoryBufferPreDownloadHandler.{h, cc}
  3090. * src/OptionHandlerImpl.h
  3091. * src/prefs.h
  3092. * src/Util.{h, cc}
  3093. * test/UtilTest.cc
  3094. Keep DownloadResult rather than RequestGroup after downloads to reduce
  3095. memory usage.
  3096. * src/RequestGroupMan.{h, cc}
  3097. * src/DownloadEngine.cc
  3098. * src/BtDependency.{h, cc}: Changed the type of dependee from
  3099. WeakHandle to SharedHandle because WeakHandle could be null.
  3100. * src/RequestGroup.{h, cc}
  3101. * src/DownloadEngineFactory.cc
  3102. * src/DownloadResult.h
  3103. Set totalLength after download finished
  3104. * src/UnknownLengthPieceStorage.{h, cc}
  3105. Keep torrent file specified in metalink in memory.
  3106. * src/Metalink2RequestGroup.cc
  3107. * src/BtDependency.cc
  3108. * src/TrueRequestGroupCriteria.h
  3109. Fixed the bug: seekg is used where seekp should be used.
  3110. * src/ByteArrayDiskWriter.cc
  3111. * test/ByteArraydiskWriterTest.cc
  3112. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3113. Fixed syntax error
  3114. * test/SequenceTest.cc
  3115. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3116. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  3117. * src/RequestGroupMan.cc (isSameFileBeingDownloaded)
  3118. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  3119. * src/RequestGroup.cc (downloadFinishedByFileLength)
  3120. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3121. Added the check to see whether ares_host_callback accepts timeouts
  3122. with c-ares; only c-ares 1.5.0 or newer accepts it.
  3123. * src/NameResolver.{h, cc}
  3124. * m4/libcares.m4
  3125. * configure.ac: Set C++ for language choice.
  3126. 2007-11-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3127. Fixed: compilation fails without c-ares/ares
  3128. * src/DownloadEngine.cc (addCommand): Moved outside #ifdef
  3129. Generate http/ftp commands only when download is incomplete.
  3130. * src/BtFileAllocationEntry.cc (prepareForNextAction)
  3131. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3132. Corrected typo. Examples are removed since they are available in man
  3133. page.
  3134. * src/version_usage.cc
  3135. Updated man page.
  3136. * doc/aria2c.1
  3137. * doc/aria2c.1.txt
  3138. * doc/makeman: Commented out sed command.
  3139. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3140. Throw DlAbortEx when a remote file is not found.
  3141. * src/HttpResponse.cc
  3142. * src/FtpNegotiationCommand.cc
  3143. * src/message.h
  3144. Overwrite an existing file if --allow-overwrite=true is given.
  3145. * src/RequestGroup.cc
  3146. Removed unused functions
  3147. * src/AbstractCommand.h
  3148. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3149. Removed 'extern' from 'extern typedef ...' in src/*.h
  3150. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3151. Updated usage
  3152. * src/version_usage.cc
  3153. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3154. Trim announce URL
  3155. * src/DefaultBtContext.cc
  3156. * test/ShaVisitorTest.cc
  3157. Trim argument s. Give trimed s to exception constructor.
  3158. * src/Util.cc (parseInt)(parseLLInt)
  3159. * test/UtilTest.cc
  3160. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3161. Set precision back to 1.
  3162. * src/ConsoleStatCalc.cc (calculateStat)
  3163. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3164. Replaced strtol with Util::parseInt
  3165. * src/ChunkedEncoding.cc
  3166. * src/HttpConnection.cc
  3167. * src/CookieBoxFactory.cc
  3168. * src/ParameterizedStringParser.cc
  3169. * src/Util.cc
  3170. * test/UtilTest.cc
  3171. * test/OptionHandlerTest.cc
  3172. * src/Request.cc
  3173. Throw exception when empty string is given. The message for exception
  3174. changed.
  3175. * src/Util.cc (parseInt)(parseLLInt)
  3176. * src/message.h
  3177. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3178. Set precision to 2 because share ratio is rounded into 1.0 if precision
  3179. set to 1.
  3180. * src/ConsoleStatCalc.cc (calculateStat)
  3181. 2007-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3182. Preallocate non-requested file which is adjacent forward to requested
  3183. file('requested' files means the files given in --select-file option)
  3184. if they share a same piece.
  3185. This fixes long pause in the file system which doesn't support sparse
  3186. files like FAT32 while downloading.
  3187. * src/MultiFileAllocationIterator.{h, cc}
  3188. * test/MultiFileAllocationIteratorTest.cc
  3189. * src/FileEntry.{h, cc}
  3190. Removed unused _option.
  3191. * src/MultiDiskAdaptor.h
  3192. * test/MultiDiskAdaptorTest.cc
  3193. * src/DefaultPieceStorage.cc
  3194. Set the default value of --seed-ratio to 1.0.
  3195. If 0.0 is given, then seeding continues regardless of share ratio.
  3196. * src/version_usage.cc
  3197. * src/option_processing.cc
  3198. * src/BtSetup.cc
  3199. * doc/aria2c.1.txt
  3200. * doc/aria2c.1
  3201. Fixed: Selective download is not working in BitTorrent
  3202. * src/RequestGroup.cc
  3203. Introduced Sequence class. Use this instead of Util::unfoldRange()
  3204. * src/PieceStorage.h
  3205. * test/MockPieceStorage.h
  3206. * src/UnknownLengthPieceStorage.h
  3207. * src/DefaultPieceStorage.{h, cc}
  3208. * src/Metalink2RequestGroup.cc
  3209. * src/RequestGroup.cc
  3210. * src/Sequence.h
  3211. * test/SequenceTest.cc
  3212. * src/IntSequence.h
  3213. * src/message.h
  3214. * src/Util.{h, cc}
  3215. * test/UtilTest.cc
  3216. Added new function 'parse' to catch exception thrown by subclass's
  3217. parseArg
  3218. * src/OptionHandler.h
  3219. * src/OptionParser.cc
  3220. * src/NameMatchOptionHandler.h
  3221. * src/OptionHandlerImpl.h
  3222. * test/OptionHandlerTest.cc
  3223. Added IntegerRangeOptionHandler. Used for --listen-port and
  3224. --select-file. Now --listen-port accepts range of port.
  3225. * src/OptionHandlerFactory.cc
  3226. * src/version_usage.cc
  3227. * src/OptionHandlerImpl.h
  3228. * src/option_processing.cc
  3229. * src/BtSetup.cc
  3230. * src/PeerListenCommand.{h, cc}
  3231. * doc/aria2c.1.txt
  3232. * doc/aria2c.1
  3233. Implemented operator< for Exception class to provide easy way to print
  3234. exception stack trace.
  3235. * src/Exception.{h, cc}
  3236. * src/main.cc
  3237. * src/option_processing.cc
  3238. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3239. * src/version_usage.cc
  3240. (showVersion): Reworked.
  3241. (showUsage): Added examples.
  3242. Removed Hint for total length and file name.
  3243. * src/Metalink2RequestGroup.cc
  3244. * src/RequestGroup.{h, cc}
  3245. * src/HttpResponseCommand.cc
  3246. * src/FtpNegotiationCommand.cc
  3247. Now --follow-torrent and --follow-metalink option work properly.
  3248. * src/RequestGroup.cc
  3249. Updated man page
  3250. * doc/aria2c.1.txt
  3251. * doc/aria2c.1
  3252. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3253. Removed.
  3254. * src/PiecedSegment.{h, cc} (operator==)(operator!=)
  3255. Use Segment::operator==()
  3256. * src/HttpConnection.cc
  3257. * src/Segment.h
  3258. Updated usage
  3259. * src/version_usage.cc
  3260. Added EINTR treatment.
  3261. * src/SocketCore.cc
  3262. * src/AbstractDiskWriter.cc
  3263. Rewritten.
  3264. * src/Util.cc (rangedFileCopy)
  3265. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3266. Fixed typo.
  3267. * src/version_usage.cc
  3268. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3269. Implemented. Now -c option works fine.
  3270. * src/DefaultPieceStorage.cc (markPiecesDone)
  3271. * test/DefaultPieceStorageTest.cc
  3272. Removed.
  3273. * src/SegmentMan.{h, cc}
  3274. (markAllPiecesDone)
  3275. (markPieceDone)
  3276. Synchronized po files with
  3277. https://translations.launchpad.net/aria2/trunk/+pots/aria2c
  3278. * src/fr.po
  3279. * src/ru.po
  3280. * src/de.po
  3281. * src/ja.po
  3282. 2007-11-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3283. Added ifdef and some modifications to compile without BitTorrent,
  3284. Metalink, MessageDigest
  3285. support.
  3286. * src/PieceHashCheckIntegrityEntry.cc
  3287. * src/MetalinkEntry.h
  3288. * src/version_usage.cc
  3289. * src/main.cc
  3290. * src/DownloadEngine.{h, cc}
  3291. * src/Metalink2RequestGroup.cc
  3292. * src/Peer.cc
  3293. * src/RequestGroup.cc
  3294. * src/MetalinkHelper.cc
  3295. * test/DefaultPieceStorageTest.cc
  3296. * test/MetalinkPostDownloadHandlerTest.cc
  3297. * test/Metalink2RequestGroupTest.cc
  3298. Hide TOTAL SPD when all downloads complete.
  3299. * src/ConsoleStatCalc.cc
  3300. Log target system information.
  3301. * src/main.cc
  3302. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3303. Now --metalink-location accepts a comma-deliminated list of locations.
  3304. * src/MetalinkEntry.{h, cc}
  3305. * test/MetalinkEntryTest.cc
  3306. * src/version_usage.cc
  3307. * src/Metalink2RequestGroup.cc
  3308. * src/Xml2MetalinkProcessor.cc
  3309. * test/Xml2MetalinkProcessorTest.cc
  3310. * doc/aria2c.1.txt
  3311. * doc/aria2c.1
  3312. * src/Util.cc (toUpper)(toLower): Rewritten.
  3313. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3314. Added the ability to detect duplicate download entry which is about to
  3315. download the same file other RequestGroup is downloading.
  3316. * src/RequestGroup.cc
  3317. * src/HttpResponseCommand.cc
  3318. * src/FtpNegotiationCommand.cc
  3319. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3320. Recalculates download progress when loading a control file,
  3321. if the piece length of DownloadContext is different from the one saved
  3322. in the control file. Currently in-flight pieces are ignored.
  3323. * src/DefaultBtProgressInfoFile.cc
  3324. * test/DefaultBtProgressInfoFileTest.cc
  3325. * src/Util.{h, cc}
  3326. * test/UtilTest.cc
  3327. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3328. Do not rotate tiers in announce-list.
  3329. * src/DefaultBtAnnounce.{h, cc}: Removed trackerNumTry.
  3330. AnnounceList::allTiersFailed() used instead to detect whether all
  3331. tiers are tried and failed.
  3332. * test/DefaultBtAnnounceTest.cc
  3333. * src/AnnounceList.{h, cc}: If all tiers are tried and failed then
  3334. allTiersFailed() returns true. To reset tier pointer, call resetTier();
  3335. * test/AnnounceListTest.cc
  3336. * src/TrackerWatcherCommand.cc (execute): Removed DlAbortEx catch
  3337. clause. Catch RecoverableException instead of DlRetryEx instead.
  3338. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3339. Implemented checksum validation feature(1 checksum for each file)
  3340. The validation takes place after the download.
  3341. * src/PieceHashCheckIntegrityEntry.{h, cc}: New class.
  3342. * src/IteratableChecksumValidator.{h, cc}: Rewritten.
  3343. * src/CheckIntegrityCommand.cc: Changed log message.
  3344. * src/Metalink2RequestGroup.cc: Set checksum to
  3345. SingleFileDownloadContext.
  3346. * src/StreamCheckIntegrityEntry.{h, cc}: Now derived from
  3347. PieceHashCheckIntegrity class.
  3348. * src/BtCheckIntegrityEntry.{h, cc}: Now derived from
  3349. PieceHashCheckIntegrity class.
  3350. * src/ChecksumCheckIntegrityEntry.{h, cc}: New class.
  3351. * src/IteratableValidator.h: New class.
  3352. * src/message.h
  3353. * src/CheckIntegrityEntry.{h, cc}
  3354. * src/IteratableChunkChecksumValidator.{h, cc}
  3355. * src/SingleFileDownloadContext.h
  3356. * src/DownloadCommand.cc
  3357. --allow-overwrite=true is no longer needed to check file integrity
  3358. before download in BitTorrent download.
  3359. * src/RequestGroup.cc (getInitialCommand)
  3360. Removed RequestGroup from queue when RequestGroup::getInitialCommand()
  3361. throws exception.
  3362. * src/RequestGroupMan.cc (getInitialCommands)
  3363. 2007-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3364. urlencode the given url inside Request::parseUrl(...)
  3365. * src/Request.{h, cc}
  3366. * src/Util.{h, cc}
  3367. * test/RequestTest.cc
  3368. Removed #!metalink3! notation support because it is deleted from
  3369. the metalink specification.
  3370. * src/Request.{h, cc}
  3371. * test/RequestTest.cc
  3372. 2007-11-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3373. Don't connect server before checking file integrity at startup, if
  3374. filesize and output file path are known.
  3375. * src/AbstractCommand.cc
  3376. * src/StreamFileAllocationEntry.cc
  3377. * src/Metalink2RequestGroup.cc
  3378. * src/RequestGroup.{h, cc}
  3379. * src/HttpResponseCommand.cc
  3380. * src/FtpNegotiationCommand.cc
  3381. Added DownloadFailureException. If it is thrown, RequestGroup should
  3382. halt.
  3383. * src/AbstractCommand.cc
  3384. * src/DownloadFailureException.h
  3385. * src/RequestGroup.cc
  3386. Catch RecoverableException, instead of DlAbortEx.
  3387. * src/RequestGroupMan.cc
  3388. * src/FillRequestGroupCommand.cc
  3389. * src/MetaFileUtil.cc
  3390. * src/IteratableChunkChecksumValidator.cc
  3391. Now first parameter of MSG_DOWNLOAD_ABORTED is gid(RequestGroup::
  3392. getGID())
  3393. * src/CheckIntegrityCommand.cc
  3394. * src/message.h
  3395. Print gid instead of idx.
  3396. * src/RequestGroupMan.cc
  3397. Removed exception throwers declaration.
  3398. * src/DirectDiskAdaptor.{h, cc}
  3399. * src/SocketCore.{h, cc}
  3400. * src/MultiDiskAdaptor.{h, cc}
  3401. * src/HttpConnection.{h, cc}
  3402. * src/HttpResponse.{h, cc}
  3403. * src/DiskAdaptor.{h, cc}
  3404. * src/CopyDiskAdaptor.{h, cc}
  3405. * src/MultiDiskAdaptor.{h, cc}
  3406. * src/HttpHeaderProcessor.{h, cc}
  3407. * src/AbstractSingleDiskAdaptor.{h, cc}
  3408. * src/Util.{h, cc}
  3409. * test/UtilTest.cc
  3410. * src/DefaultDiskWriter.{h, cc}
  3411. * src/FtpConnection.{h, cc}
  3412. * src/AbstractDiskWriter.{h, cc}
  3413. Removed duplicate code.
  3414. * src/StreamCheckIntegrityEntry.cc
  3415. Removed unnecessary include.
  3416. * src/DiskWriter.h
  3417. Included Exception.h
  3418. * src/option_processing.cc
  3419. Included 2 files and added doc
  3420. * src/TrackerWatcherCommand.cc
  3421. * src/SocketCore.cc (writeData): Fixed send error with GnuTLS.
  3422. 2007-11-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3423. Changed CheckIntegrityEntry interface so that it can define
  3424. the action when all the chunk checksums are valid.
  3425. * src/CheckIntegrityEntry.h
  3426. * src/StreamCheckIntegrityEntry.{h, cc}
  3427. * src/BtCheckIntegrityEntry.{h, cc}: Currently,when all the checksums
  3428. are valid, then aira2 goes to seeding mode. Sometimes it is better
  3429. to exit rather than doing seeding. So, it would be good to toggle this
  3430. behavior.
  3431. * src/CheckIntegrityCommand.cc
  3432. * src/AbstractCommand.cc
  3433. * src/RequestGroup.cc
  3434. 2007-11-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3435. Reflect the download length of in-flight pieces.
  3436. It makes the download length readout more precise.
  3437. * src/DefaultPieceStorage.{h, cc}
  3438. * test/DefaultPieceStorageTest.cc
  3439. * src/a2functional.h
  3440. * test/a2functionalTest.cc
  3441. Lower CPU load when --max-download-limit is used.
  3442. There is up and down in speed indicator when enabling
  3443. http-pipelining but a download goes well. I think the problem is that
  3444. because http-pipelining is enabled, DownloadCommand is created for
  3445. each segment and in its constructor, PeerStat::downloadStart() is
  3446. called. In PeerStat::downloadStart(), speed calculation object is
  3447. reseted, which makes download speed zero.
  3448. * src/DownloadCommand.cc
  3449. Rewritten using accumulate.
  3450. * src/RequestGroupMan.cc (calculateStat)
  3451. Code clearnup.
  3452. * src/FtpNegotiationCommand.cc
  3453. * src/HttpResponseCommand.cc
  3454. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3455. Fixed: Can not resume: aria2 reports download already finished.
  3456. * src/AbstractCommand.{h, cc}
  3457. * src/HttpResponseCommand.cc
  3458. * src/FtpNegotiateCommand.cc
  3459. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3460. Now a file is stored in the directory specified in .metalnk file
  3461. (file[@name]).
  3462. * src/Metalink2RequestGroup.cc
  3463. Create the directory structure when opening the file if it doesn't
  3464. exist.
  3465. * src/AbstractDiskWriter.cc
  3466. * src/Util.{h, cc}
  3467. * src/File.h
  3468. * test/UtilTest.cc
  3469. Removed file name comparison
  3470. * src/Metalink2RequestGroup.cc
  3471. * src/HttpResponseCommand.cc
  3472. Rewritten using Util::mkdirs()
  3473. * src/FileEntry.cc (setupDir)
  3474. * test/FileEntryTest.cc
  3475. Updated doc
  3476. * src/SingleFileDownloadContext.h
  3477. 2007-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3478. Now SleepCommand dispatches nextCommand when halt is requested.
  3479. It avoids a possible long wait after hitting CTRL-C.
  3480. * src/SleepCommand.{h, cc}
  3481. * src/RequestGroupAware.{h, cc}
  3482. 2007-11-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3483. Fixed: the listen port sent to the tracker is wrong. If aria2 fails
  3484. to open listen port, then remove the port number from the tracker
  3485. request.
  3486. * src/DefaultBtAnnounce.cc
  3487. * test/DefaultBtAnnounceTest.cc
  3488. * test/MockPieceStorage.h
  3489. Inject randomizer to DefaultBtAnnounce and DefaultBtContext to make
  3490. them more testable.
  3491. * src/DefaultBtAnnounce.{h, cc}
  3492. * src/DefaultBtContext.{h, cc}
  3493. * src/Util.{h, cc}
  3494. * test/DefaultBtAnnounceTest.cc
  3495. * test/DefaultBtContextTest.cc
  3496. * test/UtilTest.cc
  3497. Added 'B' to upload bytes readout.
  3498. * src/ConsoleStatCalc.cc
  3499. Now the listen port for BitTorrent download is opened when it is
  3500. needed.
  3501. * src/DownloadEngineFactory.cc
  3502. * src/BtSetup.{h, cc}
  3503. * src/PeerListenCommand.{h, cc}
  3504. Now an exception thrown while parsing tracker response is now logged.
  3505. If DlAbortEx is catched, then btAnnounce->resetAnnounce() immediately
  3506. called, which means no retry is made in this case, assuming a tracker
  3507. has a problem.
  3508. * src/TrackerWatcherCommand.cc
  3509. Fixed: downloading a file whose length is unkown fails.
  3510. * src/DownloadCommand.cc
  3511. Simplified prepareForNextSegment()
  3512. * src/DownloadCommand.cc
  3513. Updated
  3514. * po/POTFILES.in
  3515. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3516. Re-implemented a file listing for Metalink, which was dropped while
  3517. http/ftp/torrent integration was being implemented.
  3518. * src/MetalinkHelper.{h, cc}: New class.
  3519. * test/MetalinkHelperTest.cc
  3520. * src/main.cc
  3521. * src/Metalink2RequestGroup.cc
  3522. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3523. Added the ability to display the detailed torrent file information.
  3524. Now -S option gives not only a file listing, but also total download
  3525. length, info hash, announce URI, piece length, the number of pieces,
  3526. and mode(single or multi-torrent).
  3527. * src/DefaultBtContext.{h, cc} (operator<<): New function.
  3528. * src/Util.cc (toStream): Show file length in a abbreviated form(like
  3529. KiB)
  3530. * test/UtilTest.cc
  3531. * src/main.cc
  3532. 2007-10-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3533. Added ftp://USER:PASSWD@Servername automatic parsing.
  3534. * src/Request.{h, cc}: Removed AuthResolvers. Added _username and
  3535. _password. Recognize username and password in URI.
  3536. * src/main.cc: Use AuthConfigFactory instead of RequestFactory.
  3537. * src/RequestGroup.cc: Use AuthConfigFactory instead of RequestFactory.
  3538. * src/RequestFactory.{h, cc}: Removed.
  3539. * src/AuthConfigFactory.{h, cc}: New class.
  3540. * src/FtpConnection.cc: Use AuthConfigFactory.
  3541. * src/HttpRequest.cc: Use AuthConfigFactory.
  3542. * test/HttpRequestTest.cc: Updated.
  3543. * test/RequestTest.cc: Updated.
  3544. * test/AuthConfigFactoryTest.cc: New class.
  3545. * test/RequestFactoryTest.cc: Removed.
  3546. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3547. Use RequestGroup::allDownloadFinished() to decide whether the control
  3548. file should be removed or saved.
  3549. * src/RequestGroup.{h, cc} (allDownloadFinished): New function.
  3550. * src/RequestGroupMan.cc (removeStoppedGroup) (save)
  3551. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3552. Use File::renameTo()
  3553. * src/DefaultBtProgressInfoFile.cc
  3554. Added --no-file-allocation-limit command-line option.
  3555. * src/version_usage.cc
  3556. * src/option_processing.cc
  3557. * src/OptionHandlerFactory.cc
  3558. * src/RequestGroup.{h, cc}
  3559. * src/BtCheckIntegrityEntry.cc
  3560. * src/StreamCheckIntegrityEntry.cc
  3561. * src/prefs.h
  3562. * doc/aria2c.1.txt
  3563. * doc/aria2c.1
  3564. Now prealloc is the default value for --file-allocation option.
  3565. * src/version_usage.cc
  3566. * src/option_processing.cc
  3567. * doc/aria2c.1.txt
  3568. * doc/aria2c.1
  3569. Don't URL-encode user-agent.
  3570. * src/HttpRequest.cc
  3571. Updated translations
  3572. * po/LINGUAS: Added nl for Dutch translation.
  3573. * po/nl.po: Added Dutch translation, thanks to A. Bram Neijt.
  3574. * po/de.po: Updated German translation, thanks to Patrick Ruckstuhl.
  3575. * po/POTFILES.in: Updated.
  3576. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3577. Added the ability to recognize url-list in a torrent file.
  3578. The retrieved URLs are attached to the corresponding FileEntry.
  3579. * src/DefaultBtContext.{h, cc}
  3580. * src/FileEntry.{h, cc}
  3581. * test/DefaultBtContextTest.cc
  3582. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3583. * src/ConsoleStatCalc.cc: Let the user know that aria2 is now seeding
  3584. after the download finishes.
  3585. 2007-10-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3586. * src/Piece.{h, cc}: Added SubPiece infrastructure to track down
  3587. the data smaller than block length.
  3588. A block length can be specified by constructor's argument.
  3589. * src/DefaultPieceStorage.{h, cc} (getMissingPiece):
  3590. Get a missing piece in the range of given FileEntry. This function is
  3591. not used in the program yet.
  3592. * src/Util.h: Added some macros.
  3593. 2007-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3594. Added HTTP/1.1 keep alive and pipelining support.
  3595. See --enable-http-keep-alive and --enable-http-pipelining option.
  3596. * src/AbstractCommand.{h, cc}: Now it has one-to-many relation to
  3597. Segment.
  3598. * src/HttpDownloadCommand.{h, cc}
  3599. * src/OptionHandlerFactory.cc
  3600. * src/HttpConnection.{h, cc}
  3601. * src/version_usage.cc
  3602. * src/HttpInitiateConnectionCommand.cc
  3603. * src/FtpInitiateConnectionCommand.cc
  3604. * src/Segment.h
  3605. * src/HttpRequestCommand.{h, cc}
  3606. * src/option_processing.cc
  3607. * src/prefs.h
  3608. * src/HttpResponseCommand.cc
  3609. * src/SegmentMan.{h, cc}
  3610. * src/FtpNegotiateCommand.cc
  3611. * src/HttpProxyResponseCommand.cc
  3612. * src/Request.cc
  3613. * src/HttpRequest.cc
  3614. * src/DownloadCommand.cc
  3615. * test/HttpRequestTest.cc
  3616. * test/RequestTest.cc
  3617. 2007-10-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3618. * src/ConsoleCalc.cc (calculateStat): Hide SPD after the download
  3619. finished.
  3620. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3621. * src/Metalink2RequestGroup.cc (generate): Throw exception instead of
  3622. catching it inside the method.
  3623. When no file entry is found in a metalink without querying user
  3624. preferences, throw the exception with the error message that suggests
  3625. metalink file is probably broken.
  3626. * src/RequestGroup.cc (postDownloadProcessing): Catch exception here.
  3627. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3628. Fixed the bug that prevents remote Metalink/Torrent file from begin
  3629. processed.
  3630. * src/RequestGroupMan.cc (removeStoppedGroup)
  3631. Added debug message.
  3632. * src/BtPostDownloadHandler.cc
  3633. * src/MetalinkPostDownloadHandler.cc
  3634. * src/PostDownloadHandler.{h, cc}
  3635. * src/RequestGroup.cc
  3636. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3637. * src/Request.cc (parseUrl): Removed unnecessary slashes around dir.
  3638. 2007-10-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3639. * src/MultiUrlRequestInfo.h: Updated the message shown when program
  3640. stops and there are any unfinished or in-progress downloads.
  3641. Added the legend of "stat".
  3642. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3643. Throw exception when chunck checksum verification fails.
  3644. * src/DownloadCommand.cc (validatePieceHash): New function.
  3645. * src/PiecedSegment.{h, cc} (clear): New function.
  3646. * src/GrowSegment.{h, cc} (clear): New function.
  3647. * src/Segment.h (clear): New function.
  3648. * src/SegmentMan.{h, cc} (validatePieceHash): Removed.
  3649. * test/SegmentTest.cc
  3650. * test/GrowSegmentTest.cc
  3651. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3652. Do not send referer when redirected.
  3653. * src/Request.cc (redirectUrl)
  3654. * test/RequestTest.cc
  3655. * test/HttpRequestTest.cc
  3656. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3657. Implemented BitTorrent/http/ftp integrated download.
  3658. I've rewritten lots of files and now some headers have forward
  3659. class declarations to reduce compile time.
  3660. The implementation is extremely alpha stage, I recommend to use this
  3661. for testing purpose only.
  3662. 2007-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3663. Fixed the compilation error on 64bit platform.
  3664. * test/HttpHeaderProcessorTest.cc
  3665. 2007-09-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3666. Merged Ross's patch that fixes compilation problem in MinGW
  3667. * test/DefaultBtProgressInfoFileTest.cc
  3668. 2007-09-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3669. Updated fr.po by sebone
  3670. * po/fr.po
  3671. Updated man page.
  3672. * doc/aria2c.1.txt
  3673. * Release 0.11.3
  3674. 2007-09-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3675. * src/MetalinkRequestInfo.cc (execute): Fixed BitTorrent download
  3676. failure in Metalink.
  3677. 2007-09-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3678. Automatically save *.aria2 control file of http/ftp download in every
  3679. 60 seconds.
  3680. * src/AutoSaveCommand.{h, cc}: New class.
  3681. * src/TimeBasedCommand.{h, cc}: New class.
  3682. * src/DownloadEngineFactory.cc (newConsoleEngine)
  3683. Disable parameterized URI support by default. Added -P option to
  3684. enable the feature.
  3685. * src/prefs.h: Added PREF_PARAMETERIZED_URI
  3686. * src/OptionHandlerFactory.cc
  3687. * src/main.cc: Also updated usages for -Z and --auto-file-renaming
  3688. Updated Japanese translation.
  3689. * po/ja.po
  3690. Updated man page.
  3691. * doc/aria2c.1.txt
  3692. * Release 0.11.3-rc
  3693. 2007-09-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3694. Now *.aria2 contorol file is first saved to *.aria2__temp and if
  3695. it is successful, then renamed to *.aria2.
  3696. This prevents *.aria2 file from being truncated or corrupted when
  3697. file system becomes out of space.
  3698. * src/DefaultBtProgressInfoFile.cc (save)
  3699. * src/SegmentMan.cc (save)
  3700. * test/DefaultBtProgressInfoFileTest.cc (testSave): Implemented.
  3701. 2007-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3702. Reduced the fragmentation of bitfield in http/ftp download.
  3703. * src/BitfieldMan.cc (getSparseMissingUnusedIndex)
  3704. * test/BitfieldManTest.cc
  3705. 2007-08-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3706. Added the ability to disable segmented download in .metalink.
  3707. aria2 can now recognize 'maxconnections' attribute in 'resources' and
  3708. 'url' tag.
  3709. * src/MetalinkEntry.{h, cc}
  3710. * src/RequestResource.{h, cc}
  3711. * src/MetalinkRequestInfo.cc
  3712. * src/Xml2MetalinkProcessor.cc
  3713. * test/Xml2MetalinkProcessorTest.cc
  3714. 2007-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3715. Added parameterized URI support.
  3716. * src/main.cc: -Z option added.
  3717. * src/OptionHandlerFactory.cc
  3718. * src/prefs.h: Added PREF_FORCE_SEQUENTIAL.
  3719. * src/PStringDatum.h: New class.
  3720. * src/PStringSegment.{h,cc}: New class.
  3721. * src/PStringNumLoop.h: New class.
  3722. * src/PStringSelect.h: New class.
  3723. * src/NumberDecorator.h: New class.
  3724. * src/FixedWidthNumberDecorator.h: New class.
  3725. * src/AlphaNumberDecorator.h: New class.
  3726. * src/PStringVisitor.h: New class.
  3727. * src/PStringBuildVisitor.{h,cc}: New class.
  3728. * src/ParameterizedStringParser.{h,cc}: New class.
  3729. * src/Util.{h,cc}
  3730. (isNumber): New function.
  3731. (isLowercase): New function.
  3732. (isUppercase): New function.
  3733. (alphaToNum): New function.
  3734. * test/ParameterizedStringParserTest.cc: New class.
  3735. * test/AlphaNumberDecoratorTest.cc: New class.
  3736. * test/PStringBuildVisitorTest.cc: New class.
  3737. * test/UtilTest.cc
  3738. (testIsNumber): New function.
  3739. (testIsLowercase): New function.
  3740. (testIsUppercase): New function.
  3741. (testAlphaToNum): New function.
  3742. Added '\n' after the error message
  3743. * src/RequestInfo.h (printDownloadAbortMessage)
  3744. Added auto file renaming feature in http(s)/ftp download.
  3745. * src/main.cc: Added --auto-file-renaming command-line option.
  3746. * src/OptionHandlerFactory.cc
  3747. * src/prefs.h: Added PREF_AUTO_FILE_RENAMING
  3748. * src/RequestGroup.{h, cc}
  3749. (shouldCancelDownloadForSafety): Rewritten
  3750. (tryAutoFileRenaming): New function.
  3751. * src/SegmentMan.{h, cc} (shouldCancelDownloadForSafety): Removed.
  3752. * src/HttpResponseCommand.cc
  3753. (executeInternal): Removed the call to RequestGroupMan::
  3754. isSameFileBeingDownloaded()
  3755. * src/FtpNegotiateCommand.cc
  3756. (recvSize): Removed the call to RequestGroupMan::
  3757. isSameFileBeingDownloaded()
  3758. * test/RequestGroupTest.cc: New class.
  3759. 2007-08-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3760. Merged Ross's patch: Removed setmode(). Use _CRT_fmode to enable binary
  3761. IO.
  3762. * src/DefaultBtProgressInfoFile.cc
  3763. * src/MetaFileUtil.cc
  3764. * src/SimpleLogger.cc
  3765. * src/SegmentMan.cc
  3766. * src/Util.cc
  3767. * src/Platform.cc
  3768. 2007-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3769. * src/Xml2MetalinkProcessor.cc (getPieceHash): Added missing .c_str().
  3770. 2007-08-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3771. Avoid sparse files if possible, because VFAT32 doesn't support it.
  3772. * src/DefaultDiskWriter.cc (initAndOpenFile)
  3773. Fixed the bug that prevents file allocation is not done when
  3774. dowloading multi-torrent file.
  3775. * src/AbstractDiskWriter.cc (openFile)
  3776. Increase the maximum number of -j option from 15 to 45.
  3777. * src/OptionHandlerFactory.cc (createOptionHandlers)
  3778. Added fr.po, thanks to Charles Landemaine.
  3779. * po/fr.po
  3780. * po/LINGUAS
  3781. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  3782. gcc 3.4.4 support:
  3783. * src/DefaultBtContext.cc: int32_t -> int
  3784. * src/main.cc: int -> int32_t, int32_t -> int
  3785. * src/messageDigest.h: uint32_t -> unsigned int
  3786. * src/NameResolver.h: int32_t -> int
  3787. * src/PeerConnection.cc: int -> int32_t
  3788. * src/SpeedCalc.cc: int32_t -> int
  3789. * src/TrackerUpdateCommand.h: int -> int32_t
  3790. * src/Util.cc: int32_t -> int
  3791. * src/Util.h: int32_t -> int
  3792. * src/Xml2MetalinkProcessor.cc: int -> uint32_t, int64_t -> uint64_t
  3793. * test/AnnounceListTest.cc: int -> int32_t
  3794. * test/ChunkedEncodingTest.cc: int -> int32_t
  3795. * test/DataTest.cc: int -> int32_t
  3796. * test/DefaultBtRequestFactoryTest.cc: int -> int32_t
  3797. * test/DefaultPeerListProcessorTest.cc: int -> int32_t
  3798. * test/DefaultPieceStorageTest.cc: int -> int32_t
  3799. * test/FeatureConfigTest.cc: int -> int32_t
  3800. * test/MetalinkEntryTest.cc: int -> int32_t
  3801. * test/MockBtRequestFactory.h: int -> int32_t
  3802. * test/MockPieceStorage.h: int -> int32_t
  3803. * test/OptionTest.cc: int -> int32_t
  3804. * test/RequestTest.cc: int -> int32_t
  3805. * test/SegmentManTest.cc: int -> int32_t
  3806. * test/Xml2MetalinkProcessorTest.cc: int -> int32_t
  3807. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  3808. Move sleep functions to Util class:
  3809. * src/Util.cc
  3810. (sleep): New function.
  3811. (usleep): New function.
  3812. * src/DownloadCommand.cc: sleep -> Util::sleep
  3813. * test/TimeSeedCriteriaTest.cc: sleep -> Util::sleep
  3814. MinGW build enhancements. The following files are added:
  3815. * src/timegm.{c,h}
  3816. Changes to support the above new files:
  3817. * configure.ac
  3818. * src/Makefile.am
  3819. * src/a2time.h
  3820. * src/Util.cc:
  3821. * src/strptime.c: Added support for %Z option.
  3822. Fixed MinGW non-blocking bug.
  3823. * src/SocketCore.cc
  3824. * src/HttpRequestCommand.cc
  3825. Miscellenous build fixes/enhancements.
  3826. * configure.ac: Added summary report.
  3827. * src/Platform.h: Tweaked #include's.
  3828. * src/a2netcompat.h: Tweaked #include's.
  3829. * src/strptime.h: Tweaked #include's.
  3830. * src/gai_strerror.c: Tweaked #include's.
  3831. * src/gai_strerror.h: _D_GETADDRINFO_H -> _D_GAI_STRERROR_H
  3832. * src/getaddrinfo.h: Moved #ifndef __MINGW32__
  3833. * src/gettimeofday.h: Added HAVE_CONFIG_H
  3834. 2007-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3835. Increased the initial connection size in BitTorrent download to 40.
  3836. * src/BtRuntime.h
  3837. Added the usage message of --peer-id-prefix option.
  3838. * src/main.cc
  3839. * Release 0.11.2
  3840. 2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3841. MessageDigestHelper is introduced in order to simplify the use
  3842. of message digest. Removed repeated code.
  3843. The message digest algorithm is now specified by string, like "sha1",
  3844. "md5".
  3845. * src/messageDigest.{h, cc}
  3846. * src/MessageDigestHelper.{h, cc}: New class.
  3847. * src/DefaultPieceStorage.cc
  3848. * src/DefaultBtContext.{h, cc}
  3849. (computeFastSet): New function.
  3850. (setInfoHash): Added for unit testing.
  3851. (setNumPieces): Added for unit testing.
  3852. * src/DefaultBtInteractive.cc
  3853. * src/BtPieceMessage.cc
  3854. * src/Peer.cc
  3855. * src/Checksum.h
  3856. * src/message.h
  3857. * src/IteratableChecksumValidator.h
  3858. * src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator
  3859. inside it.
  3860. * src/SegmentMan.{h, cc}
  3861. (checkIntegrity): Removed.
  3862. * src/IteratableChunkChecksumValidator.{h, cc}
  3863. * src/Util.h
  3864. (sha1Sum): Removed.
  3865. (simpleMessageDigest): Removed.
  3866. (fileChecksum): Removed.
  3867. (computeFastSet): Removed.
  3868. * src/ShaVisitor.cc
  3869. * src/ChunkChecksum.h
  3870. * src/DownloadCommand.cc
  3871. Removed messageDigest virtual functions.
  3872. * src/MultiDiskAdaptor.{h, cc}
  3873. * src/DiskAdaptor.h
  3874. * src/ByteArrayDiskWriter.h
  3875. * src/DiskWriter.h
  3876. * src/DiskAdaptorWriter.h
  3877. * src/AbstractSingleDiskAdaptor.{h, cc}
  3878. * src/AbstractDiskWriter.{h, cc}
  3879. Fixed comilation error when message digest is disabled.
  3880. * src/MetalinkEntry.{h, cc}
  3881. * src/MetalinkRequestInfo.cc
  3882. Removed srandom and random.
  3883. * src/SimpleRandomizer.h
  3884. Added size() virtual function to DiskAdaptor
  3885. * src/MultiDiskAdaptor.h
  3886. Fixed the bug that causes that files are not opened correctly in
  3887. multi-file torrent.
  3888. * src/TorrentRequestInfo.cc
  3889. * src/MultiDiskAdaptor.cc
  3890. Added SHA256 support
  3891. * src/messageDigest.cc
  3892. * src/Xml2MetalinkProcessor.cc
  3893. Show supported message digest algorithms
  3894. * src/main.cc
  3895. Updated contact info.
  3896. * src/main.cc
  3897. Applied Ross's patch
  3898. * src/a2netcompat.h
  3899. * src/main.cc
  3900. Fixed the bug that prevents a remote metalink from not being processed
  3901. even if '-o foo.metalink' is specified.
  3902. * src/MetalinkRequestInfo.cc
  3903. 2007-08-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3904. Merged Dan's patch:
  3905. * src/ByteArrayDiskWriter.cc: ios_base -> ios
  3906. Use va_copy to avoid core dump on amd64:
  3907. * src/SimpleLogger.cc
  3908. Updated contact info.
  3909. * src/main.cc
  3910. Added #ifdef ENABLE_MESSAGE_DIGEST to fix test errors when message
  3911. digest is not available.
  3912. * src/MetalinkEntry.h
  3913. 2007-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3914. Make a2netcompat.h include a2io.h to fix compilation error:
  3915. * src/a2netcompat.h
  3916. * src/SocketCore.cc: Removed include of a2io.h
  3917. * src/Util.cc: Removed include of a2io.h
  3918. Gather time related functions to a2time.h:
  3919. * src/a2time.h: New file.
  3920. * src/DefaultPeerStorage.cc
  3921. * src/SimpleLogger.cc
  3922. * src/Util.{h, cc}
  3923. * src/SimpleRandomizer.h
  3924. * src/TimeA2.{h,cc}
  3925. * src/DownloadCommand.cc
  3926. * src/main.cc
  3927. Removed #ifdef __MINGW32__ since gai_strerror is included in
  3928. a2netcompat.h:
  3929. * src/NameResolver.cc
  3930. Fixed compilation error without openssl:
  3931. * src/SocketCore.{h,cc}: Moved include of openssl/err.h to SocketCore.h
  3932. Added default block to suppress compiler warnings:
  3933. * src/MetalinkRequestInfo.cc (AccumulateNonP2PUrl::operator())
  3934. 2007-07-26 Ross Smith II <aria2spam at smithii dot com>
  3935. MinGW build enhancements. The following files are added:
  3936. * src/gai_strerror.{c,h}
  3937. * src/gettimeofday.{c,h}
  3938. Changes to support the above new files:
  3939. * configure.ac
  3940. * src/Makefile.am
  3941. * src/a2netcompat.h
  3942. * src/TimeA2.cc
  3943. * src/DefaultPeerStorage.cc
  3944. * src/NameResolver.cc: removed mingw_strerror() function.
  3945. * src/SocketCore.cc: removed mingw_strerror() function.
  3946. Miscellaneous MinGW build fixes.
  3947. * src/a2io.h: Use _lseeki64() instead of lseek()
  3948. * src/common.h
  3949. * src/DefaultFileAllocator.cc
  3950. * src/GlowFileAllocator.cc
  3951. * src/main.cc: Moved #include "prefs.h" to quiet compile error.
  3952. * src/NameResolver.cc
  3953. (callback): Changed int32_t to int.
  3954. (resolve): Changed int32_t to int.
  3955. * src/Platform.cc
  3956. * src/Platform.h
  3957. * test/MultiDiskWriterTest.cc
  3958. * test/PeerMessageUtilTest.cc
  3959. * src/localtime_r.c: Add DeleteCriticalSection() and at exit().
  3960. Other enhancements and fixes.
  3961. * src/HttpRequestCommand.cc
  3962. (executeInternal) Use non-blocking socket for HTTPS (MinGW only).
  3963. * src/SocketCore.cc:
  3964. (error): New function to abstract errno/WSAGetLastError().
  3965. (errorMsg): New function to abstract errno/WSAGetLastError().
  3966. (initiateSecureConnection): Added more detailed error reporting.
  3967. * src/SocketCore.h: Added private variable blocking, to allow
  3968. proper handling of OpenSSL psuedo-errors.
  3969. * src/message.h
  3970. (EX_SSL_INIT_FAILURE)
  3971. (EX_SSL_IO_ERROR)
  3972. (EX_SSL_PROTOCOL_ERROR)
  3973. (EX_SSL_UNKNOWN_ERROR)
  3974. (EX_SSL_CONNECT_ERROR)
  3975. (EX_SOCKET_BLOCKING)
  3976. (EX_SOCKET_NONBLOCKING)
  3977. (EX_SOCKET_UNKNOWN_ERROR)
  3978. * src/Util.cc
  3979. (setGlobalSignalHandler): Renamed signal to sig as signal is a
  3980. reserved name.
  3981. (httpGMT): Fixed typo.
  3982. 2007-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3983. Merged Ross's win32 patch(manually)
  3984. In the course of merging, following files are added.
  3985. * src/strptime.{h,c}
  3986. * src/libgen.{h,c}
  3987. * src/inet_aton.{h,c}
  3988. * src/Platform.{h,cc}
  3989. * src/localtime_r.{h,c}
  3990. * src/getaddrinfo.{h,c}
  3991. I've gethered network related things, and put them to following file:
  3992. * src/a2netcompat.h
  3993. Also io related things are put to following file:
  3994. * src/a2io.h
  3995. Changed %lld to %s because mingw32 doesn't recognize %lld.
  3996. * src/message.h
  3997. (MSG_ALLOCATION_COMPLETED)
  3998. (EX_TOO_LARGE_FILE)
  3999. (EX_SIZE_MISMATCH)
  4000. (EX_FILE_OFFSET_OUT_OF_RANGE)
  4001. (EX_INVALID_CHUNK_CHECKSUM)
  4002. (EX_INVALID_RANGE_HEADER)
  4003. * src/FileAllocationCommand.cc
  4004. * src/HttpResponse.cc
  4005. * src/RequestGroup.cc
  4006. * src/MultiDiskAdaptor.cc
  4007. * src/OptionHandlerImpl.h
  4008. * src/HttpResponseCommand.cc
  4009. * src/FtpNegotiateCommand.cc
  4010. * src/IteratableChecksumValidator.cc
  4011. * src/SegmentMan.cc
  4012. * src/ChunkChecksumValidator.cc
  4013. Added Randomizer::getRandomNumber(long int)
  4014. * src/Randomizer.h (getRandomNumber)
  4015. * src/SimpleRandomizer.h (getRandomNumber)
  4016. * src/BitfieldMan.cc (getMissingIndexRandomly): Use this new function.
  4017. * src/Util.cc (randomAlpha): Use this new function.
  4018. 2007-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4019. Converted int's to in32_t. long long int's are also converted to
  4020. int64_t
  4021. 2007-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4022. Fixed the bug that prevents cookies from being sent to the server
  4023. if the domain of cookie is FQDN and starts with ".".
  4024. * src/Cookie.cc (match)
  4025. To add the ability to change peer id.
  4026. * src/DefaultBtContext.h
  4027. (_peerIdPrefix): New variable
  4028. (setPeerIdPrefix): New function.
  4029. * src/torrentRequestInfo.cc
  4030. (execute): Set the option value of PREF_PEER_ID_PREFIX to
  4031. DefaultBtContext.
  4032. * src/main.cc (main): Added peer-id-prefix command-line option.
  4033. The usage message is not added yet.
  4034. * src/DefaultBtContext.cc
  4035. (generatePeerId): Use _peerIdPrefix.
  4036. * src/prefs.h (PREF_PEER_ID_PREFIX): New definition.
  4037. 2007-07-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4038. Fixed the bug that prevents filename in content-disposition from
  4039. being retrieved when filename is not quoted.
  4040. * src/Util.cc (getContentDispositionFilename)
  4041. Fixed the bug that causes infinate loop and memory leak when file open
  4042. operation failed.
  4043. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  4044. 2007-07-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4045. Fixed the bug that causes segfault when all URIs specified are
  4046. unsupported.
  4047. * src/RequestGroupMan.cc (getInitialCommands)
  4048. Check if RequestGroup::createNextCommand() returns empty list of
  4049. commands.
  4050. * src/RequestGroup.cc (createNextCommand)
  4051. Change log level from info to error so that users can notice that
  4052. an error occurred.
  4053. Fixed the bug that causes segfault when a zero-sized file is
  4054. downloaded.
  4055. * src/BitfieldMan.cc (isAllBitSet)
  4056. Return true if bitfieldLength is 0.
  4057. 2007-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4058. * src/main.cc
  4059. (showUsage): Added 3 usage examples for metalink download.
  4060. Replace MetalinkChunkChecksum with ChunkChecksum.
  4061. * src/MetalinkChunkChecksum.h: Removed.
  4062. * src/MetalinkEntry.h: MetalinkChunkChecksum -> ChunkChecksum.
  4063. * src/Xml2MetalinkProcessor.h: MetalinkChunkChecksum -> ChunkChecksum.
  4064. * src/Xml2MetalinkProcessor.cc
  4065. (getPieceHash): Use ChunkChecksum instead of MetalinkChunkChecksum.
  4066. * src/MetalinkRequestInfo.cc (execute)
  4067. * Release 0.11.1
  4068. 2007-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4069. Reads URIs from stdin when "-i -" is specified.
  4070. * src/UriFileListParser.h, src/UriFileListParser.cc: Removed.
  4071. * src/UriListParser.h, src/UriListParser.cc: New class.
  4072. * src/StreamUriListParser.h: New class.
  4073. * src/FileUriListParser.h: New class.
  4074. * src/main.cc (main): Use StreamUriListParser and FileUriListParser
  4075. instead of UriFileListParser.
  4076. 2007-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4077. Made console readout more readable.
  4078. * src/ConsoleDownloadEngine.cc (sendStatistics)
  4079. 2007-07-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4080. Fix the bug that causes -s option not to work.
  4081. * src/main.cc (main)
  4082. * src/a2algo.h: New file.
  4083. 2007-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4084. Create directory structure specified in metalink file.
  4085. * src/RequestGroup.h, src/RequestGroup.cc
  4086. (initAndOpenFile): Create a directory to store files if it does not
  4087. exist.
  4088. (getDir): New function.
  4089. Added ETA and download speed for an individual file to readout.
  4090. * src/ConsoleDownloadEngine.cc (sendStatistics)
  4091. * src/RequestGroup.h
  4092. (calculateDownloadSpeed): New function.
  4093. 2007-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4094. Made -S option work with metalink file and provided selective download
  4095. to metalink.
  4096. * src/MetalinkEntry.h, src/MetalinkEntry.cc
  4097. (filename): Removed.
  4098. (file): New variable.
  4099. (size): Removed.
  4100. (operator=): Updated.
  4101. (getPath): New function.
  4102. (getLength): New function.
  4103. (toFileEntry): New function.
  4104. * src/TorrentRequestInfo.h, src/TorrentRequestInfo.cc
  4105. (execute): Use toStream.
  4106. (showFileEntry): Removed.
  4107. * src/MetalinkRequestInfo.h
  4108. (targetFiles): New variable.
  4109. (setTargetFiles): New variable.
  4110. * src/MetalinkRequestInfo.cc
  4111. (execute): Added the ability to print file information included in
  4112. a metalink file.
  4113. Added selective download mode to metalink.
  4114. * src/main.cc
  4115. (showUsage): Updated to denote that -S and --select-file options are
  4116. applicable to metalink.
  4117. * src/FileEntry.h
  4118. (operator=): New function.
  4119. (getBasename): New function.
  4120. (getDirname): New function.
  4121. * src/Util.h, src/Util.cc
  4122. (toStream): New function.
  4123. * src/Xml2MetalinkProcessor.cc: Updated.
  4124. Made aria2 work with metalink with directory structure.
  4125. * src/File.h, src/File.cc
  4126. (getBasename): New function.
  4127. (getDirname): New function.
  4128. * src/RequestGroup.h, src/RequestGroup.cc
  4129. (_topDir): New variable.
  4130. (setTopDir): New function.
  4131. (initSegmentMan): A directory structure is added to _segmentMan->dir.
  4132. Rewrote HTTP header parsing with stringstream.
  4133. * src/HttpConnection.h, src/HttpConnection.cc
  4134. (HttpRequestEntry): New class.
  4135. (headerBuf): Removed.
  4136. (headerBufLength): Removed.
  4137. (outstandingHttpRequests): Now its element type is
  4138. HttpRequestEntryHandle.
  4139. (findEndOfHeader): Removed.
  4140. (receiveResponse): Rewritten.
  4141. * src/HttpHeaderProcessor.h, src/HttpHeaderProcessor.cc: New class.
  4142. Updated doc for -j option to notice that it should be used with -i
  4143. option.
  4144. * src/main.cc (showUsage)
  4145. Removed unused classes.
  4146. * src/RequestInfo.h
  4147. (FileInfo): Removed.
  4148. (checksum): Removed.
  4149. (fileInfo): Removed.
  4150. (setChecksum): Removed.
  4151. (getChecksum): Removed.
  4152. (getFileInfo): Removed.
  4153. Use ISO units.
  4154. * src/ConsoleDownloadEngine.cc
  4155. * src/TorrentConsoleDownloadEngine.cc
  4156. * src/Util.cc (abbrevSize)
  4157. 2007-06-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4158. Added the default listening ports to the help message.
  4159. * src/main.cc (showUsage)
  4160. 2007-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4161. Reduce the number of calls to gettimeofday to lower CPU load.
  4162. * src/TimeA2.h, src/TimeA2.cc (differenceInMillis): New function.
  4163. * src/SpeedCalc.h, src/SpeedCalc.cc (calculateSpeed): New function.
  4164. * src/Peer.h (calculateUploadSpeed): New function.
  4165. (calculateDownloadSpeed): New function.
  4166. * src/DefaultPeerStorage.cc
  4167. (CalculateStat): Added _now variable.
  4168. In operator(), call Peer::calculateDownloadSpeed(const struct timeval&)
  4169. and Peer::calculateUploadSpeed(const struct timeval&)
  4170. Drop connection if no request or piece message is exchanged in
  4171. a certain interval.
  4172. * src/DefaultBtInteractive.h
  4173. (btRuntime): New variable.
  4174. (inactiveCheckPoint): New variable.
  4175. (checkActiveInteraction): New function.
  4176. * src/DefaultBtInteractive.cc (receiveMessages): Reset timer when
  4177. request or piece message is received.
  4178. (checkActiveInteraction): New function.
  4179. (doInteractionProcessing): Call checkActiveInteraction.
  4180. Fixed the bug that causes remote Metalink and Torrent files are not
  4181. processed.
  4182. * src/MultiUrlRequestInfo.cc (createNextRequestInfo): Fixed the bug.
  4183. 2007-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4184. Changed format of log file.
  4185. * src/SimpleLogger.cc
  4186. * Release 0.11.0
  4187. 2007-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4188. * src/AbstractCommand.cc
  4189. (execute): Changed log level of MSG_RESTARTING_DOWNLOAD and
  4190. MSG_MAX_TRY from error to info.
  4191. Added MSG_DOWNLOAD_ABORTED after MSG_MAX_TRY.
  4192. * src/message.h
  4193. (MSG_TORRENT_DOWNLOAD_ABORTED): New definition.
  4194. (MSG_DOWNLOAD_ABORTED): Added %s.
  4195. (MSG_RESTARTING_DOWNLOAD): Added %s.
  4196. (MSG_DOWNLOAD_ALREADY_COMPLETED): Updated.
  4197. * src/PeerAbstractCommand.cc
  4198. (execute): MSG_DOWNLOAD_ABORTED -> MSG_TORRENT_DOWNLOAD_ABORTED
  4199. * src/Request.h
  4200. (cookieBox): Made ShardHandle.
  4201. * src/RequestGroup.h, src/RequestGroup.cc
  4202. (createNextCommandWithAdj): New function.
  4203. * src/FileAllocationCommand.cc
  4204. (executeInternal): Use createNextCommandWithAdj().
  4205. * src/CheckIntegrityCommand.cc
  4206. (executeInternal): Use createNextCommandWithAdj().
  4207. Added --load-cookies command-option.
  4208. * src/OptionHandlerFactory.cc
  4209. (createOptionHandlers): Added PREF_LOAD_COOKIES.
  4210. * src/CookieBox.h, src/CookieBox.cc: Rwritten using CookieParser.
  4211. Now aria2 can handle cookie's expiration date.
  4212. * src/Cookie.h (expires): Changed its type to time_t.
  4213. * src/main.cc: Added --load-cookies command-line option.
  4214. * src/prefs.h (PREF_LOAD_COOKIES): New definition.
  4215. * src/Util.h, src/Util.cc (httpGMT): New function.
  4216. * src/Request.cc (Request): Initialize cookieBox using
  4217. CookieBoxFactory.
  4218. * src/CookieBoxFactory.h, src/CookieBoxFactory.cc: New class.
  4219. * src/CookieParser.h, src/CookieParser.cc: New class.
  4220. * src/main.cc: Chagned the default value of --metalink-servers to 5.
  4221. * src/HttpResponseCommand.cc
  4222. (handleOtherEncoding): Call RequestGroup::shouldCancelDownloadForSafety
  4223. * src/MetalinkRequestInfo.cc: Now -s option is ignored in Metalink
  4224. download.
  4225. 2007-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4226. Added -j command-line option.
  4227. * src/OptionHandlerFactory.cc (createOptionHandlers)
  4228. * src/main.cc
  4229. * src/ByteArrayDiskWriter.h, src/ByteArrayDiskWriter.cc
  4230. Rewritten using stringstream.
  4231. * src/TrackerUpdateCommand.h, src/TrackerUpdateCommand.cc
  4232. Rewritten using stringstream.
  4233. 2007-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4234. Make download size shown in MB, KB.
  4235. * src/ConsoleDownloadEngine.h (sendStatistics)
  4236. * src/Util.h, srcUtil.cc (abbrevSize): New function.
  4237. 2007-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4238. Accept incoming connections if download rate is low.
  4239. * src/PeerListenCommand.h, src/PeerListenCommand.cc:
  4240. (_lowestSpeedLimit): New variable.
  4241. (setLowestSpeedLimit): New function.
  4242. (execute): Accept incoming connections if download rate is low.
  4243. MAX_PEERS is ignored in this case.
  4244. Disable PREF_OUT in multiple concurrent download:
  4245. * src/RequestGroup.h, src/RequestGroup.cc
  4246. (setUserDefinedFilename): New function.
  4247. * src/DownloadEngineFactory.cc
  4248. (newConsoleEngine): Do not set PREF_OUT to requestGroup in multiple
  4249. concurrent download.
  4250. * src/DefaultSegmentManFactory.cc
  4251. (createNewInstance): Comment out the line: segmentMan->ufilename = ...
  4252. 2007-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4253. RequestGroup::getNextCommand() was renamed to createNextCommand().
  4254. Added its overloaded method.
  4255. * src/RequestGroup.h
  4256. (_numConcurrentCommand): New variable.
  4257. (setNumConcurrentCommand): New function.
  4258. * src/RequestGroup.cc
  4259. Abort download if same file is being downloaded concurrently.
  4260. * src/RequestGroup.h, src/RequestGroupMan.cc
  4261. (isSameFileBeingDownloaded): New function.
  4262. * src/HttpResponseCommand.cc (executeInternal)
  4263. * src/FtpNegotiateCommand.cc (recvSize)
  4264. * src/message.h (EX_DUPLICATE_FILE_DOWNLOAD): New definition.
  4265. * main.cc: Added help message for -i option.
  4266. 2007-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4267. * src/FileAllocationCommand.cc: Derived from RealtimeCommand.
  4268. * src/CheckIntegrityCommand.cc: Derived from RealtimeCommand.
  4269. * src/MetalinkEntry.h
  4270. (checksum): Changed to ChecksumHandle
  4271. * src/MetalinkRequestInfo.cc
  4272. (checksum): Changed to ChecksumHandle
  4273. * src/File.cc
  4274. (mkdirs): OPEN_MODE -> DIR_OPEN_MODE
  4275. * src/common.h
  4276. (DIR_OPEN_MODE): New definition
  4277. * src/RequestGroup.cc
  4278. (prepareForNextAction): Added an argument.
  4279. * src/message.h
  4280. (MSG_GOOD_CHECKSUM): New definition
  4281. (MSG_BAD_CHECKSUM): New definition
  4282. * src/HttpResponseCommand.cc
  4283. (handleDefaultEncoding): Continue download sequence in new
  4284. non-segmented download.
  4285. * src/FileAllocationEntry.h
  4286. (_nextDownloadCommand): New variable.
  4287. * src/DownloadCommand.cc
  4288. (prepareForNextSegment): Create ChecksumCommand if checksum is
  4289. available.
  4290. * src/RealtimeCommand.h, src/RealtimeCommand.cc: New class.
  4291. * src/IteratableChecksumValidator.h,
  4292. src/IteratableChecksumValidator.cc: New class.
  4293. * src/ChecksumCommand.h, src/ChecksumCommand.cc: New class.
  4294. 2007-05-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4295. Change file mode to 666:
  4296. * src/common.h (OPEN_MODE): New definition.
  4297. * src/File.cc
  4298. * src/Util.cc
  4299. * src/Directry.cc
  4300. * src/AbstractDiskWriter.cc
  4301. Change the level of log message "download aborted" to debug:
  4302. * src/PeerAbstractCommand.cc (execute)
  4303. * src/RequestGroup.h (RequestGroup): Initialized _hintTotalLength to 0.
  4304. * src/TrackerWatcherCommand.cc
  4305. (createCommand): Sleep some seconds after request failed.
  4306. If tracker request fails more than value of PREF_TRACKER_MAX_TRIES,
  4307. then abort tracker request.
  4308. 2007-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4309. * Added the simultaneous download feature.
  4310. * src/main.cc: Print "Exception caught: " when exception is caught.
  4311. Use CUIDCounter instead of BtRuntime::getNewCuid():
  4312. * src/ActivePeerConnectionCommand.cc
  4313. * src/PeerInteractionCommand.cc
  4314. * src/BtRuntime.h
  4315. (cuidCounter): Removed.
  4316. (getNewCuid): Removed.
  4317. * src/DownloadEngineFactory.cc
  4318. * src/PeerListenCommand.cc
  4319. * src/TrackerUpdateCommand.cc
  4320. * src/PeerInitiateConnectionCommand.cc
  4321. 2007-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4322. * src/PeerAbstractCommand.cc
  4323. (onAbort): Call PeerStorage::returnPeer()
  4324. * src/DefaultPeerStorage.h, src/DefaultPeerStorage.cc
  4325. (incomingPeers): New variable.
  4326. (addIncomingPeer): New function.
  4327. (returnPeer): New function.
  4328. (onErasingPeer): New function.
  4329. (addPeer): push_back -> push_front
  4330. (getActivePeers): Rewritten.
  4331. (calculateStat): Rewritten.
  4332. * src/PeerStorage.h
  4333. (TransferStat::copy): New function.
  4334. (TransferStat::TransferStat): New function.
  4335. (TransferStat::operator=): New function.
  4336. (addIncomingPeer): New function.
  4337. (returnPeer): New function.
  4338. * src/PeerListenCommand.cc
  4339. (execute): Use PeerStorage::addIncomingPeer() instead of
  4340. Peer::addPeer().
  4341. 2007-04-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4342. Connect to a peer actively when download speed is lower than specified
  4343. speed in torrent download:
  4344. * src/ActivePeerConnectionCommand.h: New class.
  4345. 2007-03-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4346. * src/HttpRequest.cc (createRequest): url-encode user-agent
  4347. * src/main.cc: Fixed the bug that prevents download if .netrc
  4348. doesn't exist.
  4349. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4350. To cache resolved hostname:
  4351. * src/AbstractCommand.h, src/AbstractCommand.cc
  4352. (resolveHostname): Put outside #ifdef ENABLE_ASYNC_DNS clause.
  4353. Added dns cache.
  4354. * src/FtpInitiateConnectionCommand.cc
  4355. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS.
  4356. * src/NameResolver.h, src/NameResolver.cc: Added synchronized
  4357. NameResolver working without ares.
  4358. * src/TorrentRequestInfo.cc
  4359. (execute): Don't cache dns in torrent download.
  4360. * src/HttpInitiateConnectionCommand.cc
  4361. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS
  4362. * src/DNSCache.h: New class.
  4363. * src/UrlRequestInfo.cc
  4364. (execute): Use dns cache.
  4365. In http request, suppress port number in http request header if port
  4366. is 80 or 443:
  4367. * src/HttpRequest.cc (getHostText): Suppress port number in http
  4368. request header if port is 80 or 443.
  4369. (createProxyRequest): Allways send port number.
  4370. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4371. To add the command-line option which disables netrc support:
  4372. * src/OptionHandlerFactory.cc
  4373. (createOptionHandlers): Added PREF_NO_NETRC.
  4374. * src/main.cc: Added -n option.
  4375. * src/prefs.h (PREF_NO_NETRC): New definition.
  4376. * src/RequestFactory.cc: Do not use netrc in ftp if PREF_NO_NETRC is
  4377. V_TRUE.
  4378. Note that netrc is not used in http, http proxy even if PREF_NO_NETRC
  4379. is V_FALSE. This may get configurable in the future release.
  4380. To clear peer's error status by time basis:
  4381. * src/PeerAbstractCommand.cc
  4382. (onAbort): Call Peer::startBadCondition().
  4383. * src/Peer.h, src/Peer.cc
  4384. (error): Removed.
  4385. (_badConditionStartTime): New variable.
  4386. (_badConditionInterval): New variable. Initialized to 10 seconds.
  4387. (startBadCondition): New function.
  4388. (isGood): New function.
  4389. * src/DefaultPeerStorage.cc
  4390. (addPeer): Use Peer::isGood().
  4391. (FindFinePeer): Use Peer::isGood().
  4392. Always include port number in http request header:
  4393. * src/HttpRequest.cc (getHostText): Always include port number in
  4394. http request header.
  4395. 2007-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4396. To the ability to read options from a config file:
  4397. * src/main.cc: Command-line parameter validation is delegated to
  4398. OptionHandler class.
  4399. * src/OptionHandlerFactory.h, src/OptionHandlerFactory.cc: New class.
  4400. * src/Option.h, src/Option.cc (clear): New function.
  4401. * src/OptionParser.h, src/OptionParser.cc: New class.
  4402. * src/OptionHandler.h: New class.
  4403. * src/NameMatchOptionHandler.h: New class.
  4404. * src/OptionHandlerImpl.h: New classes.
  4405. * src/prefs.h: '_' -> '-'
  4406. (FTP_PASV_ENABLED): Renamed to FTP_PASV.
  4407. (FTP_PASV): New definition.
  4408. * src/Util.h, src/Util.cc (getRealSize): New function.
  4409. To disable netrc support if .netrc file does not have correct
  4410. permissions:
  4411. * src/File.h, src/File.cc (mode): New function.
  4412. To prevent confidential information to be logged:
  4413. * src/HttpConnection.h, src/HttpConnection.cc
  4414. (eraseConfidentialInfo): New function.
  4415. (sendRequest): Call eraseConfidentialInfo().
  4416. (sendProxyRequest): Call eraseConfidentialInfo().
  4417. * src/main.cc: Validate permissions of .netrc file.
  4418. To add --user-agent command-line option:
  4419. * src/main.cc: Added new command line option: --user-agent
  4420. * src/prefs.h (PREF_USER_AGENT): New definition.
  4421. * src/HttpRequestCommand.cc (executeInternal): Set user-agent option
  4422. parameter to HttpRequest object.
  4423. * src/AbstractProxyRequestCommand.cc
  4424. (executeInternal): Set user-agent option parameter to HttpRequest
  4425. object.
  4426. Marged the patches from Dan Fandrich.
  4427. 2007-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4428. Use filename and size from Metalink file instead of sending HEAD
  4429. request:
  4430. * src/UrlRequestInfo.h
  4431. (_filename): New variable.
  4432. (_totalLength): New variable.
  4433. (setTotalLength): New variable.
  4434. (setFilename): New variable.
  4435. * src/MetalinkRequestInfo.cc
  4436. (execute): Set filename and size to UrlRequestInfo
  4437. * src/UrlRequestInfo.cc
  4438. (execute): Use filename and size from Metalink instead of seding
  4439. HEAD request to servers.
  4440. 2007-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4441. To add the ability to resume downloading a partially downloaded file
  4442. which is downloaded from the beginning:
  4443. * src/FileAllocator.h: Made abstract class. New DefaultFileAllocator
  4444. takes this role.
  4445. * src/main.cc: Added -c option.
  4446. * src/BitfieldMan.h, src/BitfieldMan.cc (setBitRange): New function.
  4447. * src/DiskWriter.h (openExistingFile): Added totalLength argument.
  4448. * src/prefs.h (PREF_CONTINUE): New definition.
  4449. * src/SegmentMan.h, src/SegmentMan.cc (markPieceDone): New function.
  4450. * src/DefaultDiskWriter.cc
  4451. (createNewDiskWriter): Add GlowFileAllocator to the new object.
  4452. * src/AbstractDiskWriter.h
  4453. (glowFileAllocator): New variable.
  4454. * src/AbstractDiskWriter.cc
  4455. (openExistingFile): Now preallocate file space from the end of the
  4456. existing file if totalLength argument is specified and grater than 0.
  4457. * src/UrlRequestInfo.cc: If -c option is specified and the file
  4458. to download exists in local, continue the download of the file.
  4459. --allow-overwrite=true is assumed in this context.
  4460. * src/DefaultFileAllocator.h, src/DefaultFileAllocator.cc: New class.
  4461. * src/GlowFileAllocator.h, src/GlowFileAllocator.cc: New class.
  4462. Throw exception if --check-integrity=true is specified but chunk
  4463. checksums are not provided:
  4464. * src/UrlRequestInfo.cc
  4465. Do not print URLs to stdout:
  4466. * src/UrlRequestInfo.cc
  4467. 2007-03-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4468. * src/Request.h: Use AuthResolver to get authentication information.
  4469. * src/main.cc: Made RequestFactory a singleton object. Netrc is now
  4470. set to RequestFactory object.
  4471. * src/AuthConfigItem.h, src/AuthConfigItem.cc: Removed.
  4472. * src/AuthConfig.h, src/AuthConfig.cc: Rewritten.
  4473. * src/TrackerWatcherComand.cc: Use RequestFactorySingletonHolder to
  4474. create Request object.
  4475. 2007-03-19 Tatsuhiro Tsujikawa <tujikawa at valkyrie dot rednoah com>
  4476. To integrate Netrc into exsiting classes:
  4477. * src/Request.h
  4478. (_userDefinedAuthConfig): New variable.
  4479. (findNetrcAuthenticator): New function.
  4480. (segment): Removed.
  4481. (setUserDefinedAuthConfig): New function.
  4482. (resolveHttpAuthConfigItem): New function.
  4483. (resolveFtpAuthConfigItem): New function.
  4484. (resolveHttpProxyAuthConfigItem): New function.
  4485. * src/HttpRequest.h
  4486. (authConfig): Removed.
  4487. (proxyAuthConfig): Removed.
  4488. (setAuthConfig): Removed.
  4489. (setProxyAuthConfig): Removed.
  4490. * src/UrlRequest.h
  4491. (getHeadResult): Added a parameter: authConfigHandle
  4492. * src/common.h
  4493. (SingletonHolder.h): New include.
  4494. * src/main.cc
  4495. (Netrc.h): New include.
  4496. (main): Removed initial values of PREF_FTP_USER, PREF_FTP_PASSWD.
  4497. Added initial value of PREF_NETRC_PATH.
  4498. Added the initialization of netrc.
  4499. * src/AuthConfig.h: New class.
  4500. * src/prefs.h
  4501. (PREF_NETRC_PATH): New definition.
  4502. * src/HttpAuthConfig.h: Removed.
  4503. * src/Netrc.cc
  4504. (getRequiredNextToken): New function.
  4505. (skipMacdef): New function.
  4506. (parse): Rewritten.
  4507. * src/Netrc.h
  4508. (getRequiredNextToken): New function.
  4509. (skipMacdef): New function.
  4510. * src/Util.h, src/Util.cc
  4511. (getHomeDir): New function.
  4512. * src/TrackerWatcherComand.cc
  4513. (createRequestCommand): Use AuthConfig.
  4514. * src/FtpConnection.cc
  4515. (sendUser): Use Request::resolveFtpAuthConfigItem().
  4516. (sendPass): Use Request::resolveFtpAuthConfigItem().
  4517. * src/Request.cc
  4518. (findNetrcAuthenticator): New function.
  4519. (resolveHttpAuthConfigItem): New function.
  4520. (resolveFtpAuthConfigItem): New function.
  4521. (resolveHttpProxyAuthConfigItem): New function.
  4522. * src/UrlRequestInfo.cc: Use AuthConfig.
  4523. * src/HttpRequest.cc
  4524. (createRequest): Use authConfig.
  4525. (getProxyAuthString): Use authConfig.
  4526. (configure): Removed PREF_HTTP_USER, PREF_HTTP_PASSWD,
  4527. PREF_HTTP_PROXY_USER, PREF_HTTP_PROXY_PASSWD.
  4528. 2007-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4529. To reduce overhead to find commands whose socket is either
  4530. readable or writable in the download engine loop:
  4531. * src/Command.h, src/Command.cc
  4532. (STATUS): New enum.
  4533. (status): New variable.
  4534. (statusMatch): New function.
  4535. (setStatusActive): New function.
  4536. (setStatusInactive): New function.
  4537. * src/DownloadEngine.h, src/DownloadEngine.cc
  4538. (executeCommand): New function.
  4539. (run): Simplified.
  4540. (waitData): Call Command::setStatusActive() when command's socket is
  4541. readable or writable.
  4542. 2007-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4543. To handle Segment as SegmentHandle:
  4544. * src/AbstractCommand.cc (execute): Rewritten.
  4545. * src/SegmentMan.h: Segment -> SegmentHandle
  4546. Introducded HttpResponse class, HttpRequest class to improve code
  4547. extensiveness and make it clear:
  4548. * src/HttpDownloadCommand.cc: transfer encoders are now managed by
  4549. HttpResponse class.
  4550. * src/HttpRequest.h, src/HttpRequest.cc: New class.
  4551. * src/HttpResponse.h, src/HttpResponse.cc: New class.
  4552. * src/HttpConnection.cc: Contruction of http request were moved to
  4553. HttpRequest class.
  4554. * src/HttpResponseCommand.h, src/HttpResponseCommand.cc: Refactored.
  4555. * src/HttpRequestCommand.cc (executeInternal): Rewritten.
  4556. * src/HttpAuthConfig.h: New class.
  4557. * src/Range.h: New class.
  4558. To make FtpTunnel{Request, Response}Command and
  4559. HttpProxy{Request, Response}Command derived from
  4560. AbstractProxy{Request, Response}Command:
  4561. * src/FtpTunnelResponseCommand.h, src/FtpTunnelResponseCommand.cc:
  4562. Derived from AbstractProxyRequestCommand class.
  4563. * src/FtpTunnelRequestCommand.h, src/FtpTunnelRequestCommand.cc:
  4564. Derived from AbstractProxyResponseCommand class.
  4565. * src/HttpProxyRequestCommand.h, src/HttpProxyRequestCommand.cc:
  4566. Derived from AbstractProxyRequestCommand class.
  4567. * src/HttpProxyResponseCommand.h, src/HttpProxyResponseCommand.cc:
  4568. Derived from AbstractProxyResponseCommand class.
  4569. * src/AbstractProxyRequestCommand.h, src/AbstractProxyRequestCommand.cc
  4570. : New class.
  4571. * src/AbstractProxyResponseCommand.h,
  4572. src/AbstractProxyResponseCommand.cc: New class.
  4573. To add netrc support:
  4574. * src/Netrc.h, src/Netrc.cc: New class.
  4575. * src/Util.h, src/Util.cc (split): New function.
  4576. * src/HttpHeader.cc (getRange): Fixed so that it inspects
  4577. "Content-Range" header instead of "Range" header.
  4578. * src/HttpHeader.h
  4579. (getStatus): Removed.
  4580. (setStatus): Removed.
  4581. * src/Segment.h
  4582. (getPositionToWrite): New function.
  4583. 2007-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4584. * src/HttpHeader.h
  4585. (Range.h): New include.
  4586. (status): New variable.
  4587. (HttpHeader): Initialized status with 0.
  4588. (getStatus): New function.
  4589. (setStatus): New function.
  4590. (getRange): New function.
  4591. (HttpHeaderHandle): New function.
  4592. * src/HttpHeader.cc
  4593. (getRange): New function.
  4594. * src/Request.h
  4595. (RequestWeakHandle): New definition.
  4596. * src/HttpConnection.h
  4597. (HttpConnectionHandle): New type definition.
  4598. * src/HttpConnection.cc
  4599. (receiveResponse): Set HTTP status to headers.
  4600. * src/main.cc
  4601. (showUsage): Fixed typo.
  4602. * src/Segment.h
  4603. (SegmentHandle): New type definition.
  4604. * src/BitfieldMan.h
  4605. (getMissingUnusedLength): New function.
  4606. * src/BitfieldMan.cc
  4607. (getMissingUnusedLength): New function.
  4608. 2007-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4609. To fix static initialization order problem:
  4610. * src/BitfieldManFactory.h
  4611. (defaultRandomizer): Removed.
  4612. (factory): New variable.
  4613. (getNewFactory): Removed.
  4614. (getFactoryInstance): New function.
  4615. (setDefaultRandomizer): Rewritten.
  4616. (getDefaultRandomizer): Rewritten.
  4617. * src/BitfieldManFactory.cc
  4618. (defaultRandomizer): Removed.
  4619. (factory): Initialized to 0.
  4620. (BitfieldManFactory): Initialized randomizer to 0.
  4621. * src/DefaultPieceStorage.cc
  4622. (DefaultPieceStorage): getNewFactory() -> getFactoryInstance()
  4623. * src/Peer.cc
  4624. (Peer): getNewFactory() -> getFactoryInstance()
  4625. * src/SegmentMan.cc
  4626. (initBitfield): getNewFactory() -> getFactoryInstance()
  4627. * src/Piece.cc
  4628. (Piece): getNewFactory() -> getFactoryInstance()
  4629. 2007-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4630. To fix the bug that causes crash on Max OS X:
  4631. * src/SimpleRandomizer.h
  4632. (getInstance): Create new instance if the static variable is null.
  4633. * src/SimpleRandomizer.cc
  4634. (randomizer): Initialized to 0.
  4635. * src/BitfieldManFactory.h
  4636. (getNewFactory): Removed the call to setRandomizer().
  4637. To fix the miscalculation of the range of checksum:
  4638. * src/BitfieldMan.h
  4639. (isBitSetOffsetRange): New function.
  4640. * src/BitfieldMan.cc
  4641. (isBitSetOffsetRange): New function.
  4642. * src/SegmentMan.cc
  4643. (tryChunkChecksumValidation): Use BitfieldMan::isBitSetOffsetRange().
  4644. Use bitfield->getBlockLength() instead of segment.segmentLength.
  4645. * Release 0.10.1
  4646. 2007-02-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4647. To lower CPU usage in BitTorrent download when --max-upload-limit
  4648. command-line option specified:
  4649. * src/DefaultBtMessageDispatcher.cc
  4650. (sendMessages): Calculate uploading speed only when current message
  4651. is uploading data and is not sent yet.
  4652. * src/DefaultPeerStorage.h
  4653. (MAX_PEER_LIST_SIZE): 100 -> 60, because 60 is well enough.
  4654. * src/HttpResponseCommand.cc
  4655. (handleDefaultEncoding): Added the cast to int32_t to itos.
  4656. This fixes compile error in Soralis 10.
  4657. 2007-01-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4658. To fix segfault in Metalink download:
  4659. * src/UrlRequestInfo.h
  4660. (filename): Removed.
  4661. (totalLength): Removed.
  4662. (setTotalLength): Removed.
  4663. (setFilename): Removed.
  4664. * src/MetalinkRequestInfo.cc
  4665. (execute): Do not set filename and totalLength to reqInfo.
  4666. Set chunk checksum to reqInfo if it is not null.
  4667. * src/HttpResponseCommand.cc
  4668. (executeInternal): Fixed filename in log.
  4669. (handleDefaultEncoding): Removed the call to initBitfield() and
  4670. markAllPiecesDone().
  4671. (handleOtherEncoding): Added HEAD method handling.
  4672. * src/FtpNegotiateCommand.cc
  4673. (executeInternal): Added SEQ_HEAD_OK handling.
  4674. (recvSize): In HEAD handling, set sequence to SEQ_HEAD_OK and
  4675. return false.
  4676. * src/FtpNegotiateCommand.h
  4677. (SEQ_HEAD_OK): New definition.
  4678. * src/SegmentMan.cc
  4679. (initBitfield): Delete bitfield.
  4680. (isChunkChecksumValidationReady): Fixed the condition.
  4681. * src/UrlRequestInfo.cc: Fixed so that Metalink and Torrent download
  4682. works fine.
  4683. 2007-01-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4684. * src/Xml2MetalinkProcessor.h
  4685. (xpathExists): New function.
  4686. * src/Xml2MetalinkProcessor.cc
  4687. (xpathExists): New function.
  4688. Not to send HEAD request if filename and size are available in Metalink
  4689. file:
  4690. * src/UrlRequestInfo.h
  4691. (filename): New variable.
  4692. (totalLength): New variable.
  4693. (setTotalLength): New function.
  4694. (setFilename): New function.
  4695. * src/MetalinkRequestInfo.cc
  4696. (execute): Set filename and size to UrlRequestInfo.
  4697. * src/MetalinkEntry.cc
  4698. (MetalinkEntry): Initialize size with 0.
  4699. * src/UrlRequestInfo.cc
  4700. (execute): Set filename and size to SegmentMan.
  4701. Not to download rest of the files after selected files are downloaded
  4702. in BitTorrent:
  4703. * src/PieceStorage.h
  4704. (allDownloadFinished): New function.
  4705. * src/DefaultBtAnnounce.cc
  4706. (isCompleteAnnounceReady): Use allDownloadFinished instead of
  4707. downloadFinished.
  4708. (getAnnounceUrl): Use allDownloadFinished instead of downloadFinished.
  4709. * src/DefaultPieceStorage.cc
  4710. (completePiece): Use allDownloadFinished instead of downloadFinished.
  4711. Commented out the call to finishSelectiveDownloadingMode().
  4712. (downloadFinished): Call isFilteredAllBitSet() instead of
  4713. isAllBitSet().
  4714. (allDownloadFinished): New function.
  4715. * src/DefaultBtInteractive.cc
  4716. (addBitfieldMessageToQueue): Call allDownloadFinished() instead of
  4717. downloadFinished().
  4718. (checkHave): Call allDownloadFinished() instead of downloadFinished().
  4719. * src/TorrentDownloadEngine.cc
  4720. (onEndOfRun): Call allDownloadFinished() instead of downloadFinished().
  4721. * src/BitfieldMan.h
  4722. (isFilteredAllBitSet): New function.
  4723. * src/ShareRatioSeedCriteria.h
  4724. (PieceStorage.h): New include.
  4725. (pieceStorage): New variable.
  4726. (evaluate):
  4727. btContext->getTotalLength() -> pieceStorage->getCompletedLength()
  4728. * src/BitfieldMan.cc
  4729. (isFilteredAllBitSet): New function.
  4730. (isAllBitSet): Filter is not took into account.
  4731. Rename --force-truncate as --allow-overwrite:
  4732. * src/TorrentRequestInfo.cc
  4733. (execute): PREF_FORCE_TRUNCATE -> PREF_ALLOW_OVERWRITE
  4734. * src/main.cc
  4735. (showUsage): --force-truncate -> --allow-overwrite
  4736. * src/message.h
  4737. (EX_FILE_ALREADY_EXISTS): --force-truncate -> --allow-overwrite
  4738. * src/prefs.h
  4739. (PREF_FORCE_TRUNCATE): Removed.
  4740. (PREF_ALLOW_OVERWRITE): New definition.
  4741. * src/SegmentMan.cc
  4742. (shouldCancelDownloadForSafety): --force-truncate -> --allow-overwrite
  4743. * src/MetalinkRequestInfo.cc
  4744. (execute): Queueing message are now logged in info level.
  4745. * src/common.h
  4746. (LONG_LONG_MAX): Removed.
  4747. (LONG_LONG_MIN): Removed.
  4748. * src/HttpResponseCommand.cc
  4749. (handleDefaultEncoding): LONG_LONG_MAX -> INT64_MAX
  4750. * src/FtpNegotiateCommand.cc
  4751. (recvSize): LONG_LONG_MAX -> INT64_MAX
  4752. * src/main.cc
  4753. (showUsage): Added --check-integriy and --realtime-chunk-checksum
  4754. command-line option.
  4755. (main): Added --check-integriy and --realtime-chunk-checksum
  4756. command-line option.
  4757. --force-truncate -> --allow-overwrite
  4758. Set initial value of --check-integrity option to false.
  4759. Don't show usage when error occurs while persing command-line options.
  4760. Removed deprecated --upload-limit option.
  4761. 2007-01-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4762. * src/message.h: Added EX_INVALID_PAYLOAD_SIZE and
  4763. EX_INVALID_BT_MESSAGE_ID. Following source files affected.
  4764. * src/BtAllowedFastMessage.cc:
  4765. * src/BtBitfieldMessage.cc
  4766. * src/BtCancelMessage.cc
  4767. * src/BtChokeMessage.cc
  4768. * src/BtHaveAllMessage.cc
  4769. * src/BtHaveMessage.cc
  4770. * src/BtHaveNoneMessage.cc
  4771. * src/BtInterestedMessage.cc
  4772. * src/BtNotInterestedMessage.cc
  4773. * src/BtPieceMessage.cc
  4774. * src/BtPortMessage.cc
  4775. * src/BtRejectMessage.cc
  4776. * src/BtRequestMessage.cc
  4777. * src/BtSuggestPieceMessage.cc
  4778. * src/BtUnchokeMessage.cc
  4779. * src/message.h: Added EX_INVALID_CHUNK_CHECKSUM. Following source
  4780. files are affected.
  4781. * src/ChunkChecksumValidator.cc
  4782. * src/SegmentMan.cc
  4783. 2007-01-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4784. To add chunk checksum validation:
  4785. * src/MetalinkEntry.h
  4786. (MetalinkChunkChecksum.h): New include.
  4787. (chunkChecksum): New variable.
  4788. * src/Request.h
  4789. (method): New variable.
  4790. (setMethod): New function.
  4791. (getMethod): New function.
  4792. (METHOD_GET): New static constant.
  4793. (METHOD_HEAD): New static constant.
  4794. * src/Xml2MetalinkProcessor.h
  4795. (getPieceHash): New function.
  4796. * src/PieceStorage.h
  4797. (markAllPiecesDone): New function.
  4798. (checkIntegrity): New function.
  4799. * src/FileAllocator.h
  4800. (NullFileAllocationMonitor.h): New include.
  4801. (FileAllocator): Initialize fileAllocationMonitor with new
  4802. NullFileAllocationMonitor().
  4803. * src/MultiDiskAdaptor.h
  4804. (messageDigest.h): Remove include.
  4805. (ctx): Removed.
  4806. (hashUpdate): Added ctx.
  4807. (MultiDiskAdaptor): Removed ctx.
  4808. (sha1Sum): Renamed as messageDigest.
  4809. (messageDigest): New function.
  4810. * src/UrlRequestInfo.h
  4811. (HeadResult): New class.
  4812. (digestAlgo): New variable.
  4813. (chunkChecksumLength): New variable.
  4814. (chunkChecksums): New variable.
  4815. (getHeadResult): New function.
  4816. (UrlRequestInfo): Added digestAlgo, chunkChecksumLength.
  4817. (setDigestAlgo): New function.
  4818. (setChunkChecksumLength): New function.
  4819. (setChunkChecksums): New function.
  4820. * src/DefaultPieceStorage.cc
  4821. (DiskAdaptorWriter.h): New include.
  4822. (ChunkChecksumValidator.h): New include.
  4823. (markAllPiecesDone): New function.
  4824. (checkIntegrity): New function.
  4825. * src/DefaultBtContext.h
  4826. (getPieceHashes): New function.
  4827. * src/TorrentRequestInfo.cc
  4828. (execute): Try to validate chunk checksum if file already exists and
  4829. .aria2 file doesn't there and user allows aria2 to overwrite it.
  4830. * src/messageDigest.h
  4831. (~MessageDigestContext): Added digestFree().
  4832. * src/MetalinkRequestInfo.cc
  4833. (execute): Set digestAlgo, chunkChecksum, chunkChecksums to reqInfo.
  4834. * src/DiskAdaptor.h
  4835. (messageDigest.h): New include.
  4836. (sha1Sum): Renamed as messageDigest.
  4837. (messageDigest): New function.
  4838. * src/DownloadCommand.h
  4839. (PeerStat.h): New include.
  4840. (maxDownloadSpeedLimit): New variable.
  4841. (startupIdleTime): New variable.
  4842. (lowestDownloadSpeedLimit): New variable.
  4843. (peerStat): New variable.
  4844. (setMaxDownloadSpeedLimit): New function.
  4845. (setStartupIdleTime): New function.
  4846. (setLowestDownloadSPeedLimit): New function.
  4847. * src/BtContext.h
  4848. (getPieceHashes): New function.
  4849. * src/main.cc
  4850. (main): Set PREF_REALTIME_CHUNK_CHECKSUM and PREF_CHECK_INTEGRITY
  4851. option to true for testing purpose.
  4852. * src/BtPieceMessage.cc
  4853. (checkPieceHash): Use messageDigest
  4854. * src/DownloadEngine.cc
  4855. (SetDescriptor): Removed.
  4856. (AccumulateActiveCommand): Removed.
  4857. (waitData): Rewritten.
  4858. (updateFdSet): Rewritten.
  4859. * src/MultiDiskAdaptor.cc
  4860. (hashUpdate): Added ctx.
  4861. (sha1Sum): Renamed as messageDigest.
  4862. (messageDigest): New function.
  4863. * src/BitfieldMan.h
  4864. (isBitRangeSet): New function.
  4865. (unsetBitRange): New function.
  4866. * src/ByteArrayDiskWriter.h
  4867. (sha1Sum): Renamed as messageDigest.
  4868. (messageDigest): New function.
  4869. * src/ConsoleDownloadEngine.cc
  4870. (calculateStatistics): If nspeed < 0 then set nspeed to 0.
  4871. * src/DiskWriter.h
  4872. (messageDigest.h): New include.
  4873. (sha1Sum): Renamed as messageDigest.
  4874. (messageDigest): New function.
  4875. * src/ChunkChecksumValidator.h: New class.
  4876. * src/DiskAdaptorWriter.h: New class.
  4877. * src/prefs.h
  4878. (PREF_REALTIME_CHUNK_CHECKSUM): New definition.
  4879. (PREF_CHECK_INTEGRITY): New definition.
  4880. * src/HttpResponseCommand.cc
  4881. (handleDefaultEncoding): Added method "HEAD" handling.
  4882. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  4883. (handleOtherEncoding):
  4884. Added the call to e->segmentMan->shouldCancelDownloadForSafety().
  4885. (createHttpDownloadCommand): Set maxDownloadSpeedLimit,
  4886. startupIdleTime, lowestDownloadSpeedLimit to command.
  4887. * src/SegmentMan.h
  4888. (getSegmentEntryByIndex): New function.
  4889. (getSegmentEntryByCuid): New function.
  4890. (getSegmentEntryIteratorByCuid): New function.
  4891. (diskWriter): DiskWriter -> DiskWriterHandle
  4892. (pieceHashes): New variable.
  4893. (chunkHashLength): New variable.
  4894. (digestAlgo): New variable.
  4895. (FindPeerStat): Removed.
  4896. (getPeerStat): Rewritten.
  4897. (markAllPiecesDone): New function.
  4898. (checkIntegrity): New function.
  4899. (tryChunkChecksumValidation): New function.
  4900. (isChunkChecksumValidationReady): New function.
  4901. * src/BitfieldMan.cc
  4902. (BitfieldMan): Initialized bitfieldLength, blocks to 0.
  4903. (BitfieldMan): Initialized blockLength, totalLength, bitfieldLength,
  4904. blocks to 0.
  4905. (isBitRangeSet): New function.
  4906. (unsetBitRange): New function.
  4907. * src/FtpNegotiateCommand.cc
  4908. (executeInternal): Set maxDownloadSpeedLimit,
  4909. startupIdleTime, lowestDownloadSpeedLimit to command.
  4910. (recvSize): Added method "HEAD" handling.
  4911. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  4912. * src/AbstractSingleDiskAdaptor.cc
  4913. (sha1Sum): Renamed as messageDigest.
  4914. (messageDigest): New function.
  4915. * src/AbstractSingleDiskAdaptor.h
  4916. (sha1Sum): Renamed as messageDigest.
  4917. (messageDigest): New function.
  4918. * src/Util.h
  4919. (indexRange): New function.
  4920. * src/MetalinkEntry.cc
  4921. (MetalinkEntry): Initialized chunkChecksum to 0.
  4922. * src/ShaVisitor.cc
  4923. (~ShaVisitor): Removed the call to ctx.digestFree().
  4924. * src/SegmentMan.cc
  4925. (ChunkChecksumValidator.h): New include.
  4926. (SegmentMan): Initialized chunkHashLength to 0. Initialized digestAlgo
  4927. to DIGEST_ALGO_SHA1.
  4928. (~SegmentMan): Removed diskWriter.
  4929. (FindSegmentEntryByIndex): Removed.
  4930. (FindSegmentEntryByCuid): Removed.
  4931. (checkoutSegment): Rewritten.
  4932. (findSlowerSegmentEntry): Rewritten.
  4933. (getSegment): Rewritten.
  4934. (updateSegment): Rewritten.
  4935. (completeSegment): Rewritten.
  4936. (markAllPiecesDone): New function.
  4937. (checkIntegrity): New function.
  4938. (isChunkChecksumValidationReady): New function.
  4939. (tryChunkChecksumValidation): New function.
  4940. * src/Xml2MetalinkProcessor.cc
  4941. (getEntry): Get size and set it to entry.
  4942. Get chunk checksum and set it to entry.
  4943. (getPieceHash): New function.
  4944. * src/Util.cc
  4945. (sha1Sum): Removed ctx.digestFree()
  4946. (fileChecksum): Removed ctx.digestFree()
  4947. (indexRange): New function.
  4948. * src/Request.cc
  4949. (METHOD_GET): New variable.
  4950. (METHOD_HEAD): New variable.
  4951. (Request): Added method.
  4952. * src/UrlRequestInfo.cc
  4953. (FatalException.h): New include.
  4954. (message.h): New include.
  4955. (operator<<): Added operator<< for class HeadResult.
  4956. (getHeadResult): New function.
  4957. (execute): Get filename and size in separate download engine.
  4958. * src/ChunkChecksumValidator.cc: New class.
  4959. * src/DownloadCommand.cc:
  4960. (DownloadCommand): Added peerStat.
  4961. (executeInternal): Use maxDownloadSpeedLimit member instead of getting
  4962. the value from Option.
  4963. The buffer size is now 16KB.
  4964. Use peerStat member instead of getting it from SegmentMan.
  4965. Use startupIdleTime member instead of gettingit from Option.
  4966. Added chunk checksum validation.
  4967. * src/AbstractDiskWriter.cc
  4968. (AbstractDiskWriter): Removed ctx.
  4969. (~AbstractDiskWriter): Removed ctx.digestFree()
  4970. (writeDataInternal): Returns the return value of write.
  4971. (readDataInternal): Returns the return value of read.
  4972. (sha1Sum): Renamed as messageDigest
  4973. (messageDigest): New function.
  4974. * src/AbstractDiwkWriter.h
  4975. (messageDigest.h): Removed include.
  4976. (ctx): Removed.
  4977. (sha1Sum): Renamed as messageDigest
  4978. (messageDigest): New function.
  4979. * src/DefaultPieceStorage.h
  4980. (markAllPiecesDone): New function.
  4981. (checkIntegrity): New function.
  4982. * src/NullFileAllocationMonitor.h: New class.
  4983. * src/MetalinkChunkChecksum.h: New class.
  4984. 2007-01-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4985. To decrease CPU usage in bittorrent download, calculation results in
  4986. BitfieldMan were cached and realtime fetching PeerObject was removed
  4987. with WeakHandle introduced. Option values are set to the objects
  4988. by setter before download begins.
  4989. * src/DefaultBtRequestFactory.cc: Use messageFactory member.
  4990. * src/DefaultBtRequestFactory.h
  4991. (dispatcher): BtMessageDispatcherHandle ->
  4992. BtMessageDispatcherWeakHandle.
  4993. (messageFactory): New variable.
  4994. (setBtMessageDispatcher): BtMessageDispatcherHandle ->
  4995. BtMessageDispatcherWeakHandle.
  4996. (setBtMessageFactory): New function.
  4997. * src/DefaultBtMessageDispatcher.cc:
  4998. (sendMessages): Use maxUploadSpeedLimit instead of fetching the value
  4999. from Option.
  5000. (checkRequestSlotAndDoNecessaryThing): Use requestTimeout instead of
  5001. feating the value from Option.
  5002. Use messageFactory member.
  5003. * src/PeerInteractionCommand.cc
  5004. (PeerInteractionCommand): Added maxDownloadSpeedLimit.
  5005. Add reverse dependencies to factory object.
  5006. Set maxUploadSpeedLimit and requestTimeout and messageFactory to
  5007. dispatcher.
  5008. Set messageFactory to receiver.
  5009. Set keepAliveInterval and maxDownloadSpeedLimit and messageFactory to
  5010. btInteractive.
  5011. Set receiver to peerObject.
  5012. Set maxDownloadSpeedLimit to this.
  5013. (executeInternal): Use maxDownloadSpeedLimit member.
  5014. * src/BtChokeMessage.cc
  5015. (doReceivedAction): Use dispatcher, requestFactory member.
  5016. (onSendComplete): Use dispatcher member.
  5017. * src/PeerInteractionCommand.h
  5018. (maxDownloadSpeedLimit): New variable.
  5019. * src/DefaultBtMessageReceiver.h
  5020. (peerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  5021. (dispatcher):
  5022. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  5023. (messageFactory): New variable.
  5024. (setPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  5025. (getPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  5026. (setDispatcher):
  5027. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  5028. (setBtMessageFactory): New function.
  5029. * src/DefaultBtInteractive.cc
  5030. (initiateHandshake): Use messageFactory member.
  5031. (addBitfieldMessageToQueue): Use messageFactory member.
  5032. (addAllowedFastMessageToQueue): Use messageFactory member.
  5033. (decideChoking): Use messageFactory member.
  5034. (checkHave): Use messageFactory member.
  5035. (sendKeepAlive): Use keepAliveInterval, messageFactory member.
  5036. (receiveMessages): Use maxDownloadSpeedLimit member.
  5037. (decideInterest): Use messageFactory member.
  5038. * src/BtRequestMessage.cc
  5039. (doReceivedAction): Use messageFactory, dispatcher member.
  5040. (onQueued): Use dispatcher member.
  5041. * src/BtPieceMessage.cc
  5042. (doReceivedAction): Use dispatcher member.
  5043. (send): Use peerConnection member.
  5044. (onWrongPiece): Use requestFactory member.
  5045. (handleChokingEvent): Use messageFactory, dispatcher member.
  5046. (handleCancelSendingPieceEvent): Use messageFactory, dispatcher member.
  5047. * src/BtMessageDispatcher.h
  5048. (BtMessageDispatcherWeakHandle): New type definition.
  5049. * src/SimpleBtMessage.cc
  5050. (send): Use peerConnection member.
  5051. * src/BtRejectMessage.cc
  5052. (doReceivedAction): Use dispatcher member.
  5053. * src/DefaultBtMessageDispatcher.h
  5054. (Option.h): Removed include.
  5055. (messageFactory): New variable.
  5056. (option): Removed.
  5057. (maxUploadSpeedLimit): New variable.
  5058. (requestTimeout): New variable.
  5059. (DefaultBtMessageDispatcher): Removed option.
  5060. Added maxUploadSpeedLimit, requestTimeout.
  5061. (setOption): Removed.
  5062. (getOption): Removed.
  5063. (setMaxUploadSpeedLimit): New function.
  5064. (setRequestTimeout): New function.
  5065. (setBtMessageFactory): New function.
  5066. * src/DefaultBtInteractive.h
  5067. (btMessageReceiver):
  5068. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  5069. (dispatcher):
  5070. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  5071. (btRequestFactory):
  5072. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  5073. (peerConnection):
  5074. PeerConnectionHandle -> PeerConnectionWeakHandle
  5075. (messageFactory): New variable.
  5076. (option): Removed.
  5077. (keepAliveInterval): New variable.
  5078. (maxDownloadSpeedLimit): New variable.
  5079. (DefaultBtInteractive): Added keepAliveInterval, maxDownloadSpeedLimit.
  5080. (setBtMessageReceiver):
  5081. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  5082. (setDispatcher):
  5083. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  5084. (setBtRequestFactory):
  5085. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  5086. (setPeerConnection):
  5087. PeerConnectionHandle -> PeerConnectionWeakHandle
  5088. (setOption): Removed.
  5089. (setKeepAliveInterval): New function.
  5090. (setMaxDownloadSpeedLimit): New function.
  5091. (setBtMessageFactory): New function.
  5092. * src/BitfieldMan.h
  5093. (cachedNumMissingBlock): New variable.
  5094. (cachedNumFilteredBlock): New variable.
  5095. (cachedCompletedLength): New variable.
  5096. (cachedFilteredComletedLength): New variable.
  5097. (cachedFilteredTotalLength): New variable.
  5098. (countMissingBlockNow): New function.
  5099. (countFilteredBlockNow): New function.
  5100. (getFilteredTotalLengthNow): New function.
  5101. (getCompletedLengthNow): New function.
  5102. (getFilteredCompletedLengthNow): New function.
  5103. (updateCache): New function.
  5104. * src/AbstractBtMessage.h
  5105. (BtMessageDispatcher.h): New include.
  5106. (PeerConnection.h): New include.
  5107. (BtRequestFactory.h): New include
  5108. (BtMessageFactory.h): New include.
  5109. (dispatcher): New variable.
  5110. (messageFactory): New variable.
  5111. (peerConnection: New variable.
  5112. (setBtMessageDispatcher): New function.
  5113. (setPeerConnection): New function.
  5114. (setBtMessageFactory): New function.
  5115. (setBtRequestFactory): New function.
  5116. * src/DefaultBtMessageFactory.cc
  5117. (setCommonProperty): Set dispatcher, requestFactory, this,
  5118. peerConnection to msg.
  5119. * src/BtRegistry.h
  5120. (BT_MESSAGE_RECEIVER): New macro.
  5121. * src/PeerConnection.h
  5122. (PeerConnectionWeakHandle): New type definition.
  5123. * src/BtMessageFactory.h
  5124. (BtMessageFactoryWeakHandle): New type definition.
  5125. * src/BitfieldMan.cc
  5126. (BitfieldMan): Added cachedNumMissingBlock, cachedNumFilteredBlock,
  5127. cachedCompletedLength, cachedFilteredComletedLength,
  5128. cachedFilteredTotalLength.
  5129. Call updateCache().
  5130. (countMissingBlock): Return cachedNumMissingBlock.
  5131. (countMissingBlockNow): New function.
  5132. (countBlock): Return cachedNumFilteredBlock if filterEnabled is true.
  5133. (countFilteredBlockNow): New function.
  5134. (setBit): Call updateCache().
  5135. (unsetBit): Call updateCache().
  5136. (setBitfield): Call updateCache().
  5137. (clearAllBit): Call updateCache().
  5138. (setAllBit): Use setBitInternal instead of setBit.
  5139. Call updateCache().
  5140. (addFilter): Call updateCache().
  5141. (enableFilter): Call updateCache().
  5142. (disableFilter): Call updateCache().
  5143. (clearFilter): Call updateCache().
  5144. (getFilteredTotalLength): Return cachedFilteredTotalLength.
  5145. (getFilteredTotalLengthNow): New function.
  5146. (getCompletedLength): Return cachedCompletedLength.
  5147. (getCompletedLengthNow): New function.
  5148. (getFilteredCompletedLength): Return cachedFilteredComletedLength.
  5149. (getFilteredCompletedLengthNow): New function.
  5150. (updateCache): New function.
  5151. * src/BtMessageReceiver.h
  5152. (BtMessageReceiverWeakHandle): New type definition.
  5153. * src/DefaultBtMessageReceiver.cc
  5154. (receiveHandshake): Use messageFactory member.
  5155. (sendHandshake): Use messageFactory member.
  5156. (receiveMessage): Use messageFactory member.
  5157. * src/DefaultBtMessageFactory.h
  5158. (dispatcher): New variable.
  5159. (requestFactory): New variable.
  5160. (peerConnection): New variablle.
  5161. (setBtMessageDispatcher): New function.
  5162. (setBtRequestFactory): New function.
  5163. (setPeerConnection): New function.
  5164. * src/SharedHandle.h
  5165. (RefCount): New class.
  5166. (WeakHandle): New class.
  5167. * src/PeerObject.h
  5168. (BtMessageReceiver.h): New include.
  5169. (PeerObject): Added btMessageReceiver.
  5170. (btMessageReceiver): New variable.
  5171. * src/Util.cc
  5172. (countBit): Simplified.
  5173. * src/BtCancelMessage.cc
  5174. (doReceivedAction): Use dispatcher member.
  5175. * src/BtRequestFactory.h
  5176. (BtRequestFactoryWeakHandle): New type definition.
  5177. * src/PeerStorage.h
  5178. (downloadSpeed): int -> uint32_t
  5179. (uploadSpeed): int -> uint32_t
  5180. (sessionDownloadLength): long long int -> uint64_t
  5181. (sessionUploadLength): long long int -> uint64_t
  5182. 2007-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5183. To add RecoverableException, FatalException:
  5184. * src/AbstractCommand.cc
  5185. (onAbort): Exception -> RecoverableException
  5186. * src/PeerAbstractCommand.h
  5187. (RecoverableException.h): New include.
  5188. (onAbort): Exception -> RecoverableException.
  5189. * src/PeerInteractionCommand.cc
  5190. (onAbort): Exception -> RecoverableException.
  5191. * src/PeerAbstractCommand.cc
  5192. (execute): Exception -> RecoverableException.
  5193. (onAbort): Exception -> RecoverableException.
  5194. * src/TorrentRequestInfo.cc
  5195. (execute): Exception -> RecoverableException.
  5196. * src/MetalinkRequestInfo.cc
  5197. (execute): Exception -> RecoverableException.
  5198. * src/MetaFileUtil.cc: RecoverableException.
  5199. * src/AbstractCommand.h
  5200. (onAbort): Exception -> RecoverableException.
  5201. * src/DlRetryEx.h: Exception -> RecoverableException.
  5202. * src/DlAbortEx.h: Exception -> RecoverableException.
  5203. * src/PeerListenCommand.cc: Exception -> RecoverableException.
  5204. * src/Util.cc: Exception -> RecoverableException.
  5205. * src/DefauldDiskWriter.cc: Exception -> RecoverableException.
  5206. * src/TrackerUpdateCommand.cc: Exception -> RecoverableException.
  5207. * src/UrlRequestInfo.cc: Exception -> RecoverableException.
  5208. To make ID static const int
  5209. * src/BtInterestedMessage.h
  5210. (ID_t): Removed.
  5211. (ID): New variable.
  5212. (getId): Made non-const.
  5213. * src/BtPieceMessage.h
  5214. (ID_t): Removed.
  5215. (ID): New variable.
  5216. (getId): Made non-const.
  5217. * src/BtChokeMessage.h
  5218. (ID_t): Removed.
  5219. (ID): New variable.
  5220. (getId): Made non-const.
  5221. * src/BtHaveAllMessage.h
  5222. (ID_t): Removed.
  5223. (ID): New variable.
  5224. (getId): Made non-const.
  5225. * src/BtKeepAliveMessage.h
  5226. (ID_t): Removed.
  5227. (ID): New variable.
  5228. (getId): Made non-const.
  5229. * src/BtHandshakeMessage.h
  5230. (ID): New variable.
  5231. (getId): Made non-const.
  5232. * src/BtSuggestPieceMessage.h
  5233. (ID_t): Removed.
  5234. (ID): New variable.
  5235. (getId): Made non-const.
  5236. * src/BtPortMessage.h
  5237. (ID_t): Removed.
  5238. (ID): New variable.
  5239. (getId): Made non-const.
  5240. * src/AbstractBtMessage.h
  5241. (id): Removed.
  5242. (AbstractBtMessage): Removed id.
  5243. (getId): Removed.
  5244. * src/BtHaveMessage.h
  5245. (ID_t): Removed.
  5246. (ID): New variable.
  5247. (getId): Made non-const.
  5248. * src/BtAllowedFastMessage.h
  5249. (ID_t): Removed.
  5250. (ID): New variable.
  5251. (getId): Made non-const.
  5252. * src/BtCancelMessage.h
  5253. (ID_t): Removed.
  5254. (ID): New variable.
  5255. (getId): Made non-const.
  5256. * src/BtNotInterestedMessage.h
  5257. (ID_t): Removed.
  5258. (ID): New variable.
  5259. (getId): Made non-const.
  5260. * src/BtChokeMessage.h
  5261. (ID_t): Removed.
  5262. (ID): New variable.
  5263. (getId): Made non-const.
  5264. * src/BtRejectMessage.h
  5265. (ID_t): Removed.
  5266. (ID): New variable.
  5267. (getId): Made non-const.
  5268. * src/BtBitfieldMessage.h
  5269. (ID_t): Removed.
  5270. (ID): New variable.
  5271. (getId): Made non-const.
  5272. * src/BtUnchokeMessage.h
  5273. (ID_t): Removed.
  5274. (ID): New variable.
  5275. (getId): Made non-const.
  5276. * src/BtRequestMessage.h
  5277. (ID_t): Removed.
  5278. (ID): New variable.
  5279. (getId): Made non-const.
  5280. * src/BtHaveMessage.h
  5281. (ID_t): Removed.
  5282. (ID): New variable.
  5283. (getId): Made non-const.
  5284. To add --force-truncate command-line option and a check whether
  5285. the file already exists:
  5286. * src/DirectDiskAdaptor.h
  5287. (getFilePath): Made virtual public.
  5288. * src/MultiDiskAdaptor.h
  5289. (File.h): New include.
  5290. (DiskWriterEntry::fileEntry): Made private.
  5291. (DiskWriterEntry::fileExists): New function.
  5292. (DiskWriterEntry::getFileEntry): New function.
  5293. (fileExists): New function.
  5294. (getFilePath): New function.
  5295. * src/TorrentRequestInfo.cc
  5296. (FatalException.h): New include.
  5297. (message.h): New include.
  5298. (RecoverableException.h): New include.
  5299. (execute): Added a check whether file is already exists or not.
  5300. * src/DiskAdaptor.h
  5301. (fileExists): New function.
  5302. (getFilePath): New function.
  5303. * src/main.cc
  5304. (showUsage): Added an explanation of --force-truncate command-line
  5305. option.
  5306. (main): Added --force-truncate command-line option.
  5307. * src/Exception.h
  5308. (setMsg): buf[256] -> buf[1024]
  5309. * src/CopyDiskWriter.h
  5310. (getFilePath): Made public virtual.
  5311. * src/MultiDiskAdaptor.cc: fileEntry -> getFileEntry()
  5312. (fileExists): New function.
  5313. * src/DownloadEngineFactory.cc
  5314. (newTorrentConsoleEngine): Don't open file here.
  5315. * src/message.h
  5316. (EX_FILE_ALREADY_EXISTS): New definition.
  5317. * src/prefs.h
  5318. (PREF_FOECE_TRUNCATE): New definition.
  5319. * src/HttpResponseCommand.cc
  5320. (handleDefaultEncoding): Added a check whether the file already exists.
  5321. * src/SegmentMan.h
  5322. (fileExists): New function.
  5323. (shouldCancelDownloadForSafety): New function.
  5324. * src/FtpNegotiateCommand.cc
  5325. (recvSize): Added a check whether the file already exists.
  5326. * src/AbstractSingleDiskAdaptor.cc
  5327. (File.h): New include.
  5328. (fileExists): New function.
  5329. * src/AbstractSingleDiskAdaptor.h
  5330. (getFilePath): Removed.
  5331. (fileExists): New function.
  5332. * src/SegmentMan.cc
  5333. (fileExists): New function.
  5334. (shouldCancelDownloadForSafety): New function.
  5335. To fix regression bug in torrent downloading:
  5336. * src/DefaultBtRequestFactory.cc
  5337. (doChokedAction): New function.
  5338. * src/DefaultBtRequestFactory.h
  5339. (doChokedAction): New function.
  5340. * src/DefaultBtMessageDispatcher.cc
  5341. (doChokedAction): Do not delete request if its target is in allowed
  5342. fast set.
  5343. * src/DefaultBtInteractive.cc
  5344. (doPostHandshakeProcessing): Added a call to sendPendingMessage().
  5345. (sendKeepAlive): Send keep alive message even if the outgoing message
  5346. queue is not empty.
  5347. (decideInterest): Simplified the code.
  5348. (fillPiece): Remove a call to dispatcher->doChokedAction() because
  5349. it is already called when BtChokeMessage is received from a peer.
  5350. * src/BtRequestFactory.h
  5351. (doChokedAction): New function.
  5352. To clean up code:
  5353. * src/PeerInteractionCommand.h
  5354. (executeInternal): Added virtual keyword explicitly.
  5355. (prepareForRetry): Added virtual keyword explicitly.
  5356. (prepareForNextPeer): Added virtual keyword explicitly.
  5357. (onAbort): Added virtual keyword explicitly.
  5358. * src/RequestSlot.cc
  5359. (isTimeout): Use Time::elapsed() instead of differenceInMillis().
  5360. * src/BtPieceMessage.cc
  5361. (doReceivedAction): Added a debug log of piece's bitfield.
  5362. * src/Piece.h
  5363. (getBitfieldLength): New function.
  5364. * src/ByteArrayDiskWriter.cc
  5365. (clear): Added buf = 0 to avoid double free corruption.
  5366. * src/FileAllocator.cc
  5367. (allocate): Fixed an assignment of fileAllocationMonitor->currentValue.
  5368. Added cp.reset().
  5369. * src/BitfieldMan.h
  5370. (operator=): Rewritten.
  5371. * src/BitfieldMan.cc
  5372. (BitfieldMan): Initialized bitfield, useBitfield.
  5373. * src/PeerConnection.cc
  5374. (receiveMessage): Added a call to socket->readable() after getting
  5375. message length to avoid possible EOF.
  5376. * src/Util.cc
  5377. (torrentUrlencode): Fixed an encodeing bug. BUG#1629912
  5378. 2007-01-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5379. To add an ability to pre-allocate file space:
  5380. * src/DirectDiskAdaptor.h: Rewritten.
  5381. * src/PieceStorage.h: DiskAdaptor -> DiskAdaptorHandle
  5382. * src/MultiDiskAdaptor.h: Rewritten.
  5383. * src/DefaultPieceStorage.cc
  5384. (MultiDiskWriter.h): Removed include.
  5385. (PreAllocationDiskWriter.h): Removed include.
  5386. (FileAllocationMonitor.h): New include.
  5387. (~DefaultPieceStorage): Removed deletion of diskAdaptor.
  5388. (initStorage): Rewritten.
  5389. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5390. * src/FileAllocator.h: New class.
  5391. * src/FileAllocator.cc: New class.
  5392. * src/FileAllocationMonitor.h: New class.
  5393. * src/FileAllocationMonitor.cc: New class.
  5394. * src/ConsoleFileAllocationMonitor.h: New class.
  5395. * src/ConsoleFileAllocationMonitor.cc: New class.
  5396. * src/AbstractSingleDiskAdaptor.h: New class.
  5397. * src/AbstractSingleDiskAdaptor.cc: New class.
  5398. * src/DiskAdaptor.h
  5399. (Directory.h): Removed include.
  5400. (DiskWriter.h): Removed include.
  5401. (FileEntry.h): Removed include.
  5402. (diskWriter): Removed.
  5403. (DiskAdaptor): Removed diskWriter.
  5404. (openFile): Made pure virtual.
  5405. (closeFile): Made pure virtual.
  5406. (openExistingFile): Made pure virtual.
  5407. (initAndOpenFile): Made pure virtual.
  5408. (writeData): Made pure virtual.
  5409. (readData): Made pure virtual.
  5410. (sha1Sum): Made pure virtual.
  5411. (getStoreDir): Returns const reference of storeDir.
  5412. (DiskAdaptorHandle): New type definition.
  5413. * src/main.cc
  5414. (ConsoleFileAllocationMonitor.h): New include.
  5415. (showUsage): Added default value description of -s option.
  5416. Added the description of --file-allocation option.
  5417. (main): Set default value of --file-allocation option to 'none'.
  5418. Added --file-allocation command-line option.
  5419. Setup FileAllocationMonitorFactory.
  5420. * src/FtpInitiateConnectionCommand.cc
  5421. (executeInternal): Removed diskWriter related processing, which was
  5422. moved to FtpNegotiationCommand.cc.
  5423. * src/DirectDiskAdaptor.cc
  5424. (getFilePath): Made non-const.
  5425. * src/CopyDiskAdaptor.h
  5426. (DiskAdaptor.h): Removed include.
  5427. (DiskWriter.h): Removed include.
  5428. (AbstractSingleDiskAdaptor.h): New include.
  5429. (getFilePath): Made non-const. Added virtual keyword.
  5430. (CopyDiskAdaptor): Removed diskWriter.
  5431. (getTempFile): Returns const reference.
  5432. (CopyDiskAdaptorHandle): New type definition.
  5433. * src/ByteArrayDiskWriter.cc
  5434. (clear): Simplified.
  5435. (initAndOpenFile): Rewritten.
  5436. (openFile): Call initAndOpenFile()
  5437. * src/MultiDiskAdaptor.cc: Rewritten.
  5438. * src/DownloadEngineFactory.cc
  5439. (FileAllocator.h): New include.
  5440. (FileAllocationMonitor.h): New include.
  5441. (newConsoleEngine): Call DefaultDiskWriter::createNewDiskWriter() to
  5442. create DefaultDiskWriter with file allocator.
  5443. * src/DiskWriter.h
  5444. (initAndOpenFile): Added totalLength argument.
  5445. (openFile): Added totalLength argument.
  5446. * src/prefs.h
  5447. (PREF_FILE_ALLOCATION): New definition.
  5448. (V_PREALLOC): New definition.
  5449. (V_NONE): New definition.
  5450. * src/HttpResponseCommand.cc
  5451. (handleDefaultEncoding): Call DefaultDiskWriter::initAndOpenFile with
  5452. size.
  5453. * src/FtpNegotiateCommand.cc
  5454. (Util.h): New include.
  5455. (recvSize): Open file here.
  5456. * src/Util.h
  5457. (ullitos): New function.
  5458. * src/CopyDiskWriter.h
  5459. (getFilePath): Made non-const.
  5460. * src/DefaultDiskWriter.h
  5461. (Option.h): New include.
  5462. (totalLength): Removed.
  5463. (DefaultDiskWriter): Removed totalLength.
  5464. (initAndOpenFile): Added totalLength argument.
  5465. (DefaultDiskWriterHandle): New type definition.
  5466. (createNewDiskWriter): New function.
  5467. * src/Util.cc
  5468. (ullitos): New function.
  5469. * src/DefaultDiskWriter.cc
  5470. (message.h): New include.
  5471. (FileAllocator.h): New include.
  5472. (prefs.h): New include.
  5473. (Util.h): New include.
  5474. (DefaultDiskWriter): Removed totalLength.
  5475. (initAndOpenFile): Added file allocation.
  5476. (createNewDiskWriter): New function. Just for temporary solution.
  5477. It will be rewritten later.
  5478. * src/DiskAdaptor.cc
  5479. (DiskAdaptor): Removed diskWriter.
  5480. * src/AbstractDiskWriter.cc
  5481. (LogFactory.h): New include.
  5482. (AbstractDiskWriter): Added fileAllocator, logger.
  5483. (openFile): Added totalLength argument.
  5484. * src/AbstractDiskWriter.h
  5485. (FileAllocator.h): New include.
  5486. (Logger.h): New include.
  5487. (fileAllocator): New variable.
  5488. (logger): New variable.
  5489. (openFile): Added totalLength argument. Added virtual keyword
  5490. explicitly.
  5491. (openExistingFile): Added totalLength argument. Added virtual keyword
  5492. explicitly.
  5493. (closeFile): Added virtual keyword explicitly.
  5494. (sha1Sum): Added virtual keyword explicitly.
  5495. (writeData): Added virtual keyword explicitly.
  5496. (readData): Added virtual keyword explicitly.
  5497. (setFileAllocator): New function.
  5498. * src/DefaultPieceStorage.h
  5499. (FileAllocator.h): New include.
  5500. (diskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5501. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5502. * src/FileProgressMonitor.h: New class.
  5503. To compile aria2 on PC-BSD:
  5504. * src/DefaultBtContext.cc
  5505. (libgen.h): New include.
  5506. To fix memory leak:
  5507. * src/Exception.h
  5508. (~Exception): Delete cause. Fixed memory leak.
  5509. 2006-12-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5510. Rewritten a portion of bittorrent implementation:
  5511. * src/BtMessageValidator.h: New class.
  5512. * src/BtBitfieldMessageValidator.h: New class.
  5513. * src/BtHandshakeMessageValidator.h: New class.
  5514. * src/BtRequestMessageValidator.h: New class.
  5515. * src/BtSuggestPieceMessageValidator.h: New class.
  5516. * src/BtAllowedFastMessageValidator.h: New class.
  5517. * src/BtRejectMessageValidator.h: New class.
  5518. * src/BtCancelMessageValidator.h: New class.
  5519. * src/BtPieceMessageValidator.h: New class.
  5520. * src/BtHaveMessageValidator.h: New class.
  5521. * src/BtEventListener.h: New class.
  5522. * src/AbstractBtEventListener.h: New class.
  5523. * src/BtEvent.h: New class.
  5524. * src/BtChokingEvent.h: New class.
  5525. * src/BtChokedEvent.h: New class.
  5526. * src/BtCancelSendingPieceEvent.h: New class.
  5527. * src/BtAbortOutstandingRequestEvent.h: New class.
  5528. * src/Randomizer.h: New class.
  5529. * src/SimpleRandomizer.h: New class.
  5530. * src/BtMessage.h: New class.
  5531. * src/AbstractBtMessage.h: New class.
  5532. * src/SimpleBtMessage.h: New class.
  5533. * src/BtHaveMessage.h: New class.
  5534. * src/BtInterestedMessage.h: New class.
  5535. * src/BtAllowedFastMessage.h: New class.
  5536. * src/BtUnchokeMessage.h: New class.
  5537. * src/BtCancelMessage.h: New class.
  5538. * src/BtNotInterestedMessage.h: New class.
  5539. * src/BtChokeMessage.h: New class.
  5540. * src/BtHaveNoneMessage.h: New class.
  5541. * src/BtHandshakeMessage.h: New class.
  5542. * src/BtSuggestPieceMessage.h: New class.
  5543. * src/BtHaveMessage.h: New class.
  5544. * src/BtPieceMessage.h: New class.
  5545. * src/BtHaveAllMessage.h: New class.
  5546. * src/BtKeepAliveMessage.h: New class.
  5547. * src/BtPortMessage.h: New class.
  5548. * src/BtRejectMessage.h: New class.
  5549. * src/BtBitfieldMessage.h: New class.
  5550. * src/BtRequestMessage.h: New class.
  5551. * src/DefaultBtRequestFactory.h: New class.
  5552. * src/DefaultBtMessageReceiver.h: New class.
  5553. * src/BtInteractive.h: New class.
  5554. * src/BtMessageDispatcher.h: New class.
  5555. * src/DefaultBtMessageDispatcher.h: New class.
  5556. * src/DefaultBtInteractive.h: New class.
  5557. * src/BitfieldManFactory.h: New class.
  5558. * src/HandleRegistry.h: New class.
  5559. * src/BtMessageFactory.h: New class.
  5560. * src/BtMessageReceiver.h: New class.
  5561. * src/DefaultBtMessageFactory.h: New class.
  5562. * src/PeerObject.h: New class.
  5563. * src/BtRequestFactory.h: New class.
  5564. * src/SuggestPieceMessage.h: Removed.
  5565. * src/PortMessage.h: Removed.
  5566. * src/SuggestPieceMessage.h: Removed.
  5567. * src/KeepAliveMessage.h: Removed.
  5568. * src/HandshakeMessage.h: Removed.
  5569. * src/PeerInteraction.h: Removed.
  5570. * src/UnchokeMessage.h: Removed.
  5571. * src/PieceMessage.h: Removed.
  5572. * src/RequestMessage.h: Removed.
  5573. * src/InterestedMessage.h: Removed.
  5574. * src/HaveMessage.h: Removed.
  5575. * src/CancelMessage.h: Removed.
  5576. * src/RejectMessage.h: Removed.
  5577. * src/AllowedFastMessage.h: Removed.
  5578. * src/HaveNoneMessage.h: Removed.
  5579. * src/SimplePeerMessage.h: Removed.
  5580. * src/HaveAllMessage.h: Removed.
  5581. * src/BitfieldMessage.h: Removed.
  5582. * src/PeerMessageFactory.h: Removed.
  5583. * src/NotInterestedMessage.h: Removed.
  5584. * src/ChokeMessage.h: Removed.
  5585. * src/PeerMessage.h: Removed.
  5586. 2006-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5587. To know root cause of exception:
  5588. * src/Exception.h
  5589. (cause): New variable.
  5590. (Exception): Added a parameter.
  5591. (getMsg): Return const reference to msg.
  5592. (getCause): New function.
  5593. * src/DlRetryEx.h
  5594. (DlRetryEx): Added a parameter 'cause'.
  5595. Added an overloaded constructor.
  5596. (DlAbortEx): Added a parameter 'cause'.
  5597. Added an overloaded constructor.
  5598. * src/SimpleLogger.cc
  5599. (writeLog): Log nested exception messages recursively.
  5600. 2006-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5601. * src/DefaultBtProgressInfoFile.cc
  5602. (load): Fixed memory leak when the infohash doesn't match.
  5603. 2006-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5604. * src/DefaultPeerStorage.cc
  5605. (calculateStat): Simplified the code by combining 2 loops into 1.
  5606. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5607. Introduce new preference PREF_BT_TIMEOUT. This is the timeout value
  5608. for BitTorrent download:
  5609. * src/PeerAbstractCommand.cc
  5610. (PeerAbstractCommand): PREF_TIMEOUT -> PREF_BT_TIMEOUT
  5611. * src/main.cc:
  5612. (timeoutSpecified): Removed.
  5613. (main): Set the initial value of PREF_BT_TIMEOUT to 180.
  5614. Removed timeoutSpecified. TODO: Add --bt-timeout command line option.
  5615. * src/TorrentRequestInfo.cc
  5616. (timeoutSpecified): Removed.
  5617. (torrentHandler): Removed timeoutSpecified and the adjustment of
  5618. timeout value.
  5619. * src/prefs.h
  5620. (PREF_BT_TIMEOUT): New definition.
  5621. Delete unused variables:
  5622. * src/TorrentRequestInfo.cc
  5623. (requestInfo): Removed.
  5624. Move setSignalHander to Util::setGlobalSignalHandler:
  5625. * src/TorrentRequestInfo.cc:
  5626. setSignalHander -> Util::setGlobalSignalHandler
  5627. * src/main.cc
  5628. (setSignalHander): Removed.
  5629. (main): setSignalHander -> Util::setGlobalSignalHandler
  5630. * src/Util.h
  5631. (setGlobalSignalHandler): New function.
  5632. * src/Util.cc
  5633. (setGlobalSignalHandler): New function.
  5634. * src/UrlRequestInfo.cc:
  5635. setSignalHander -> Util::setGlobalSignalHandler
  5636. Reset peer status in order to exit gracefully:
  5637. * src/PeerAbstractCommand.cc
  5638. (execute): Call peer->resetStatus() when btRuntime->isHalt() is true.
  5639. To fix the bug that causes the number of bytes uploaded is not saved
  5640. to .aria2 file:
  5641. * src/DefaultPeerStorage.h
  5642. (removedPeerSessionDownloadLength): New variable.
  5643. (removedPeerSessionUploadLength): New variable.
  5644. * src/DefaultPeerStorage.cc
  5645. (DefaultPieceStorage): Added removedPeerSessionDownloadLength(0),
  5646. removedPeerSessionUploadLength(0).
  5647. (calculateStat): Calculate the number of bytes downloaded(uploaded)
  5648. through all peers, and then add removedPeerSessionDownloadLength(
  5649. removedPeerSessionUploadLength) to it.
  5650. (deleteUnusedPeer): Add the number of bytes downloaded(uploaded) from
  5651. (to) the peer to removedPeerSessionDownloadLength
  5652. (removedPeerSessionUploadLength).
  5653. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5654. To add Metalink location option:
  5655. * src/MetalinkRequestInfo.cc
  5656. (execute): Call MetalinkEntry::setLocationPreference()
  5657. * src/main.cc
  5658. (showUsage): Added the help message for --metalink-location option.
  5659. (main): Added --metalink-location option.
  5660. * src/prefs.h
  5661. (PREF_METALINK_LOCATION): New definition.
  5662. * src/MetalinkEntry.cc
  5663. (AddLocationPreference): New function object.
  5664. (setLocationPreference): New function.
  5665. * src/Xml2MetalinkProcessor.cc
  5666. (getResource): Set location attribute to MetalinkResource
  5667. To show URLs to download
  5668. * src/UrlRequestInfo.h
  5669. (printUrls): New function.
  5670. To add multiple <file> Metalink support:
  5671. * src/MetalinkEntry.h
  5672. (MetalinkResources): Removed.
  5673. (setLocationPreference): New function.
  5674. (MetalinkEntryHandle): New type definition.
  5675. (MetalinkEntries): New type definition.
  5676. * src/Xml2MetalinkProcessor.h
  5677. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  5678. (getResource): MetalinkResource* -> MetalinkResourceHandle
  5679. (parseFile): Metalinker* -> MetalinkerHandle
  5680. * src/UrlRequestInfo.h
  5681. (execute): RequestInfo* -> RequestInfos
  5682. * src/MetalinkRequestInfo.cc
  5683. (AccumulateNonP2PUrl): MetalinkResource* -> MetalinkResourceHandle
  5684. (FindBitTorrentUrl): MetalinkResource* -> MetalinkResourceHandle
  5685. (execute): RequestInfo* -> RequestInfos
  5686. Added multiple <file> support. Print filename when it is queued.
  5687. * src/MetalinkRequestInfo.h
  5688. (execute): RequestInfo* -> RequestInfos
  5689. (getDownloadEngine): Removed.
  5690. * src/RequestInfo.h
  5691. (RequestInfoHandle): New type definition.
  5692. (RequestInfos): New type definition.
  5693. (execute): RequestInfo* -> RequestInfos
  5694. (getDownloadEngine): Removed.
  5695. * src/MetalinkResource.h
  5696. (MetalinkResourceHandle): New type definition.
  5697. (MetalinkResources): New type definition.
  5698. * src/MetalinkEntry.cc
  5699. (~MetalinkEntry): Removed the deletion of the elements of resources,
  5700. because the element is now of type MetalinkResourceHandle.
  5701. (PrefOrder): MetalinkResource* -> MetalinkResourceHandle
  5702. (Supported): MetalinkResource* -> MetalinkResourceHandle
  5703. (dropUnsupportedResource): Removed the deletion of the elements of
  5704. resources because the element is now of type MetalinkResourceHandle.
  5705. * src/Xml2MetalinkProcessor.cc
  5706. (parseFile): Metalinker* -> MetalinkerHandle
  5707. MetalinkEntry* -> MetalinkEntryHandle
  5708. Removed try-catch block.
  5709. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  5710. MetalinkResource* -> MetalinkResourceHandle
  5711. Removed try-catch block.
  5712. (getResource): MetalinkResource* -> MetalinkResourceHandle
  5713. Free result by using xmlXPathFreeObject()
  5714. * src/Metalinker.cc
  5715. (~Metalinker): Removed the deletion of entries.
  5716. MetalinkEntry* -> MetalinkEntryHandle
  5717. (queryEntry): Add multiple <file> Metalink support.
  5718. * src/Metalinker.h
  5719. (MetalinkEntries): Removed.
  5720. (queryEntry): MetalinkEntry* -> MetalinkEntries
  5721. * src/MetalinkProcessor.h
  5722. (parseFile): Metalinker* -> MetalinkerHandle
  5723. Bug fixes:
  5724. * src/PeerChokeCommand.cc
  5725. (execute): cat01->cat02
  5726. * src/DefaultPieceStorage.cc
  5727. (DefaultPieceStorage): Added diskAdaptor(0)
  5728. * src/TrackerWatcherComand.cc:
  5729. (execute): Use btAnnounce->noMoreAnnounce()
  5730. to determin whether the function returns true or not.
  5731. * src/TrackerUpdateCommand.cc:
  5732. (execute): Use btAnnounce->noMoreAnnounce()
  5733. to determin whether the function returns true or not.
  5734. * src/FtpConnection.cc
  5735. (bulkReceiveResponse): Throw DlRetryEx if EOF got.
  5736. This is the fix of the busy loop bug.
  5737. * src/DownloadCommand.cc
  5738. (DownloadCommand): Reuse PeerStat. segmentMan->getPeerStat() returns
  5739. cached PeerStat.
  5740. The value of "name" entry in torrent file is now set by
  5741. *DiskAdaptor::setTopDir(...) methods.
  5742. * src/MultiDiskAdaptor.h
  5743. (topDir): New variable.
  5744. (setTopDir): New function.
  5745. (getTopDir): New function.
  5746. * src/MultiDiskAdaptor.cc
  5747. (getFilePath): Concat storDir, "/" and topDir.
  5748. (mkdir): Use getFilePath() to get the directory path for output.
  5749. * src/DefaultPieceStorage.cc
  5750. (initStorage): Set the value of "name" entry to MultiDiskAdaptor,
  5751. CopyDiskAdaptor.
  5752. * src/CopyDiskAdaptor.h
  5753. (topDir): New variable.
  5754. (setTopDir): New function.
  5755. (getTopDir): New function.
  5756. * src/CopyDiskAdaptor.cc
  5757. (fixFilename): Updated.
  5758. Misc
  5759. * src/UrlRequestInfo.h
  5760. (e): Removed.
  5761. (UrlRequestInfo): Removed e.
  5762. (getDownloadEngine): Removed.
  5763. * src/UrlRequestInfo.cc
  5764. (handler): Rewritten.
  5765. (printUrls): New function.
  5766. (execute): Call printUrls().
  5767. * src/HandshakeMessage.cc
  5768. (check): peerinteraction->getBtContext() -> btContext
  5769. * src/PeerInteraction.h
  5770. (getBtContext): Removed.
  5771. * src/TorrentRequestInfo.h
  5772. (execute): RequestInfo* -> RequestInfos
  5773. (getDownloadEngine): Removed.
  5774. * src/TorrentRequestInfo.cc
  5775. (haltRequested): Removed.
  5776. (btHaltRequested): New variable.
  5777. (torrentHandler): haltRequested -> btHaltRequested
  5778. (execute): RequestInfo* -> RequestInfos
  5779. * src/TorrentConsoleDownloadEngine.cc
  5780. (afterEachIteration): haltRequested -> btHaltRequested.
  5781. * src/ConsoleDownloadEngine.h
  5782. (initStatistics): Added virtual.
  5783. (calculateStatistics): Added virtual.
  5784. (onEndOfRun): Added virtual.
  5785. (afterEachIteration): Added virtual.
  5786. * src/ConsoleDownloadEngine.cc
  5787. (haltRequested): New variable.
  5788. (afterEachIteration): New function.
  5789. * src/main.cc
  5790. (requestInfo): Removed.
  5791. * src/SegmentMan.cc
  5792. (findSlowerSegmentEntry): Refactored.
  5793. * Release 0.9.0
  5794. 2006-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5795. To divide TorrentMan into 6 classes: BtContext, BtRuntime,
  5796. PeerStorage, PieceStorage, BtAnnounce and BtProgressInfoFile
  5797. * src/TorrentMan.h: Removed.
  5798. * src/TorrentMan.cc: Removed.
  5799. * src/TrackerWatcherComand.h: Made subclass of BtContextAwareCommand.
  5800. * src/SeedCheckCommand.cc: Use pieceStorage, btRuntime
  5801. * src/PeerAbstractCommand.h: Made subclass of BtContextAwareCommand.
  5802. * src/PeerAbstractCommand.cc: Use btRuntime.
  5803. * src/BtContextAwareCommand.h: New class.
  5804. * src/FileEntry.h: Added accessor methods for following variables.
  5805. (path): Made private.
  5806. (length): Made private.
  5807. (offset): Made private.
  5808. (extracted): Made private.
  5809. (requested): Made private.
  5810. (FileEntries): New definition.
  5811. (FileEntryHandle): New definition.
  5812. * src/FileEntry.cc: New file.
  5813. * src/HaveEraseCommand.h: Made subclass of BtContextAwareCommand.
  5814. * src/HaveEraseCommand.cc: Use btRuntime, pieceStorage.
  5815. * src/PeerChokeCommand.h: Made subclass of BtContextAwareCommand.
  5816. * src/PeerChokeCommand.cc: Use btRuntime, peerStorage, pieceStorage.
  5817. * src/PieceStorage.h: New file.
  5818. * src/PeerInteractionCommand.h: Use btContext.
  5819. * src/PeerInteractionCommand.cc: Use pieceStorage, peerStorage,
  5820. btRuntime.
  5821. * src/DefaultBtProgressInfoFile.h: New file.
  5822. * src/DefaultBtProgressInfoFile.cc: New file.
  5823. * src/File.cc
  5824. (Util.h): New include.
  5825. (mkdirs): New function.
  5826. * src/MultiDiskAdaptor.h
  5827. (mkdir): New function.
  5828. * src/PeerListProcessor.h
  5829. (Peers): Removed.
  5830. * src/PeerInteraction.h
  5831. (torrentMan): Removed.
  5832. (btContext): New variable.
  5833. (peerStorage): New variable.
  5834. (pieceStorage): New variable.
  5835. (btAnnounce): New variable.
  5836. (getTorrentMan): Removed.
  5837. (getBtContext): New function.
  5838. * src/PeerInteraction.cc: Use btContext, peerStorage, pieceStorage,
  5839. btAnnounce.
  5840. * src/HandshakeMessage.h
  5841. (TorrentMan.h): Removed.
  5842. * src/HandshakeMessage.cc: Use btContext.
  5843. * src/DefaultBtAnnounce.cc: New file.
  5844. * src/MultiDiskWriter.cc: Use the accessor methods of FileEntry.
  5845. * src/DefaultPieceStorage.cc: New file.
  5846. * src/DefaultBtContext.h: New file.
  5847. * src/TorrentRequestInfo.cc: Use btContext, pieceStorage.
  5848. Use the accessor methods of FileEntry.
  5849. * src/CookieBox.cc: Updated to use Util::slice().
  5850. * src/PieceMessage.cc: Use btContext, pieceStorage.
  5851. * src/common.h (SharedHandle.h): New include.
  5852. * src/PeerMessage.cc (PeerMessage): Added btContext, peerStorage,
  5853. pieceStorage.
  5854. * src/TorrentAutoSaveCommand.h: Made subclass of BtContextAwareCommand.
  5855. * src/DiskAdaptor.h
  5856. (topDir): Removed.
  5857. (getFileEntryFromPath): Changed the return type to FileEntryHandle.
  5858. (setTopDir): Removed.
  5859. (getTopDir): Removed.
  5860. * src/BtContext.h: New file.
  5861. * src/DefaultPeerStorage.h: New file.
  5862. * src/PieceMessage.h (TorrentMan.h): Removed.
  5863. * src/RequestMessage.h (TorrentMan.h): Removed.
  5864. * src/TorrentDownloadEngine.h
  5865. (uploadLength): New variable.
  5866. (btContext): New variable.
  5867. (btRuntime): New variable.
  5868. (pieceStorage): New variable.
  5869. (peerStorage): New variable.
  5870. (btAnnounce): New variable.
  5871. (btProgressInfoFile): New variable.
  5872. (torrentMan): Removed.
  5873. (setBtContext): New function.
  5874. * src/TorrentDownloadEngine.cc: Use BtContext, BtRuntime, pieceStorage,
  5875. peerStorage, btAnnounce, btProgressInfoFile.
  5876. * src/Piece.h
  5877. (toString): New function.
  5878. (Pieces): New type definition.
  5879. * src/Peer.h
  5880. (active): New variable.
  5881. (Peer): Added active.
  5882. (activate): Set active to true.
  5883. (deactivate): Set active to false.
  5884. (isActive): New function.
  5885. (Peers): New type definition.
  5886. * src/DirectDiskAdaptor.cc
  5887. (getFilePath): Use the accessor methods of FileEntry.
  5888. * src/TorrentConsoleDownloadEngine.h
  5889. (afterEachIteration): New function.
  5890. * src/TorrentConsoleDownloadEngine.cc
  5891. (haltRequested): New variable.
  5892. (sendStatistics): Use pieceStorage, btRuntime.
  5893. (afterEachIteration): New function.
  5894. * src/AnnounceList: AnnounceTier->AnnounceTierHandle.
  5895. * src/Directry.h
  5896. (Directory): New function.
  5897. (DirectoryHandle): New type definition.
  5898. * src/BtProgressInfoFile.h: New file.
  5899. * src/RequestMessage.cc: Use pieceStorage.
  5900. * src/BtRuntime.h: New file.
  5901. * src/DefaultBtContext.cc: New file.
  5902. * src/BitfieldMan.h
  5903. (getCompletedLength): New function(private).
  5904. (getCompletedLength): New function.
  5905. (getFilteredCompletedLength): New function.
  5906. * src/BitfieldMan.h
  5907. (getCompletedLength): New function(private).
  5908. (getCompletedLength): New function.
  5909. (getFilteredCompletedLength): New function.
  5910. * src/MultiDiskAdaptor.cc
  5911. (mkdir): New function.
  5912. (openFile): Call mkdir().
  5913. (initAndOpenFile): Call mkdir().
  5914. * src/CancelMessage.h
  5915. (TorrentMan.h): Removed.
  5916. * src/RejectMessage.h
  5917. (TorrentMan.h): Removed.
  5918. * src/DownloadEngineFactory.cc
  5919. (DefaultPieceStorage.h): New include.
  5920. (DefaultPeerStorage.h): New include.
  5921. (DefaultBtAnnounce.h): New include.
  5922. (DefaultBtProgressInfoFile.h): New include.
  5923. (newTorrentConsoleEngine): Rewritten.
  5924. * src/ShareRatioSeedCriteria.h
  5925. (torrentMan): Removed.
  5926. (btContext): New variable.
  5927. (peerStorage): New variable.
  5928. (btRuntime): New variable.
  5929. (evaluate): Use btContext, btRuntime, peerStorage.
  5930. * src/AnnounceTier.h: New file.
  5931. * src/BtAnnounce.h: New file.
  5932. * src/BtRegistry.h: New file.
  5933. * src/PeerInitiateConnectionCommand.h: Added btContext.
  5934. * src/PeerConnection.h (TorrentMan.h): Removed.
  5935. * src/PeerMessageFactory.cc: Use btContext, pieceStorage.
  5936. * src/Util.h
  5937. (slice): Added an argument.
  5938. * src/Util.cc
  5939. (slice): Added an argument to control whether trim is made or not.
  5940. * src/PeerStorage.h: New file.
  5941. * src/BtRegistry.cc: New file.
  5942. * src/TrackerUpdateCommand.h: Made subclass of BtContextAwareCommand.
  5943. * src/CopyDiskAdaptor.cc: Use the accessor methods of FileEntry.
  5944. * src/MultiDiskWriter.h: FileEntry -> FileEntryHandle
  5945. * src/PeerListenCommand.cc: Use btRuntime, peerStorage, btContext.
  5946. * src/TorrentRequestInfo.h
  5947. (e): Removed.
  5948. (showFileEntry): Added an argument.
  5949. (getDownloadEngine): Return 0.
  5950. * src/DefaultBtAnnounce.h: New file.
  5951. * src/TorrentAutoSaveCommand.cc: Use btRuntime, btProgressInfoFile.
  5952. * src/TrackerWatcherComand.cc: Use btRuntime, btAnnounce,
  5953. * src/PeerMessageFactory.h
  5954. (btContext): New variable.
  5955. (pieceStorage): New variable.
  5956. * src/TrackerUpdateCommand.cc: Use btRuntime, peerStorage, btContext,
  5957. btAnnounce.
  5958. * src/DiskAdaptor.cc
  5959. (DiskAdaptor): Removed topDir.
  5960. (~DiskAdaptor): Removed topDir.
  5961. * src/PeerListenCommand.h: Made subclass of BtContextAwareCommand.
  5962. * src/SeedCheckCommand.h: Made subclass of BtContextAwareCommand.
  5963. * src/File.h (mkdirs): New function.
  5964. * src/DefaultPeerStorage): New file.
  5965. * src/DownloadEngineFactory.h
  5966. (newTorrentConsoleEngine): Use btContext.
  5967. * src/BtContextAwareCommand.cc: New file.
  5968. * src/PeerInitiateConnectionCommand.cc: Use btRuntime, peerStorage.
  5969. * src/PeerMessage.h
  5970. (btContext): New variable.
  5971. (peerStorage): New variable.
  5972. (pieceStorage): New variable.
  5973. (setBtContext): New function.
  5974. * src/Directry.cc
  5975. (Directory): New function.
  5976. (createDir): Do nothing if name.size() == 0.
  5977. * src/AnnounceList.h
  5978. (AnnounceTier): Removed.
  5979. (AnnounceTiers): Removed.
  5980. * src/DefaultPieceStorage.h: New file.
  5981. * src/Piece.cc (toString): New function.
  5982. To fix typo:
  5983. * src/main.cc (showVersion): Fixed typo.
  5984. To fix compile warning:
  5985. * src/DelegatingPeerListProcessor.cc
  5986. (canHandle): Added "return false".
  5987. 2006-10-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5988. To simplify TrackerWatherCommand, TrackerUpdateCommand and
  5989. make the process of announce request testable.
  5990. * src/TrackerWatcherCommand.h
  5991. (TimeA2.h): Removed.
  5992. (interval): Removed.
  5993. (checkPoint): Removed.
  5994. (createRequestCommand): Added an argument 'url'.
  5995. (TrackerWatherCommand): Removed interval.
  5996. (createCommand): New function.
  5997. * src/DownloadEngineFactory.cc
  5998. (newTorrentConsoleEngine): Updated according to the changes in
  5999. TrackerWatherCommand.
  6000. * src/TorrentMan.cc
  6001. (DelegatingPeerListProcessor.h): New includes.
  6002. (TorrentMan): Added the initialization of announceInterval.
  6003. (isStoppedAnnounceReady): New function.
  6004. (isCompletedAnnounceReady): New function.
  6005. (isDefaultAnnounceReady): New function.
  6006. (isAnnounceReady): New function.
  6007. (getAnnounceUrl): New function.
  6008. (announceStart): New function.
  6009. (announceFailure): New function.
  6010. (announceSuccess): New function.
  6011. (isAllAnnounceFailed): New function.
  6012. (resetAnnounce): New function.
  6013. (processAnnounceResponse): New function.
  6014. (needMorePeerConnection): New function.
  6015. (noMoreAnnounce): New function.
  6016. * src/TrackerUpdateCommand.h
  6017. (getTrackerResponse): int->size_t
  6018. * src/TorrentMan.h
  6019. (isStoppedAnnounceReady): New function.
  6020. (isCompletedAnnounceReady): New function.
  6021. (isDefaultAnnounceReady): New function.
  6022. (announceInterval): New variable.
  6023. (isAnnounceReady): New function.
  6024. (getAnnounceUrl): New function.
  6025. (announceStart): New function.
  6026. (announceFailure): New function.
  6027. (announceSuccess): New function.
  6028. (isAllAnnounceFailed): New function.
  6029. (resetAnnounce): New function.
  6030. (processAnnounceResponse): New function.
  6031. (needMorePeerConnection): New function.
  6032. (noMoreAnnounce): New function.
  6033. * src/TrackerWatcherCommand.cc
  6034. (TrackerWatherCommand): Removed interval and checkPoint.
  6035. (execute): Rewritten.
  6036. (createCommand): New function.
  6037. (createRequestCommand): Rewritten.
  6038. * src/TrackerUpdateCommand.cc
  6039. (MetaFileUtil.h): Removed.
  6040. (DelegatingPeerListProcessor.h): Removed.
  6041. (getTrackerResponse): int->size_t. Use torrentMan's new functions.
  6042. 2006-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6043. Request -> RequestHandle:
  6044. * src/HttpResponseCommand.h: Request->RequestHandle
  6045. * src/AbstractCommand.cc: Request->RequestHandle
  6046. * src/HttpDownloadCommand.cc: Request->RequestHandle
  6047. * src/HttpRequestCommand.cc: Request->RequestHandle
  6048. * src/FtpInitiateConnectionCommand.h: Request->RequestHandle
  6049. * src/AbstractCommand.h: Request->RequestHandle
  6050. * src/HttpProxyRequestCommand.h: Request->RequestHandle
  6051. * src/HttpResponseCommand.cc: Request->RequestHandle
  6052. * src/HttpInitiateConnectionCommand.h: Request->RequestHandle
  6053. * src/FtpNegotiateCommand.cc: Request->RequestHandle
  6054. * src/FtpTunnelResponseCommand.h: Request->RequestHandle
  6055. * src/HttpConnection.h: Request->RequestHandle
  6056. * src/HttpProxyResponseCommand.cc: Request->RequestHandle
  6057. * src/InitiateConnectionCommandFactory.h: Request->RequestHandle
  6058. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  6059. * src/DownloadCommand.h: Request->RequestHandle
  6060. * src/FtpDowndloadCommand.cc: Request->RequestHandle
  6061. * src/HttpInitiateConnectionCommand.cc: Request->RequestHandle
  6062. * src/HttpRequestCommand.h: Request->RequestHandle
  6063. * src/FtpNegotiateCommand.h: Request->RequestHandle
  6064. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  6065. * src/FtpInitiateConnectionCommand.cc: Request->RequestHandle
  6066. * src/HttpDownloadCommand.h: Request->RequestHandle
  6067. * src/FtpConnection.cc: Request->RequestHandle
  6068. * src/InitiateConnectionCommandFactory.cc: Request->RequestHandle
  6069. * src/UrlRequestInfo.cc: Request->RequestHandle
  6070. * src/HttpProxyResponseCommand.h: Request->RequestHandle
  6071. * src/HttpConnection.h: Request->RequestHandle
  6072. * src/DownloadCommand.cc: Request->RequestHandle
  6073. * src/FtpConnection.h: Request->RequestHandle
  6074. * src/FtpDowndloadCommand.h: Request->RequestHandle
  6075. * src/HttpProxyRequestCommand.cc: Request->RequestHandle
  6076. * src/FtpTunnelRequestCommand.h: Request->RequestHandle
  6077. * src/Request.h
  6078. (SharedHandle.h): New include.
  6079. (RequestHandle): New type definition.
  6080. (Requests): Redefined.
  6081. To add MULTITRACKER support:
  6082. * src/TrackerWatcherCommand.h
  6083. (createRequestCommand): New function.
  6084. * src/DownloadEngineFactory.cc
  6085. (newTorrentConsoleEngine): Removed req.
  6086. * src/prefs.h
  6087. (PREF_TRACKER_MAX_TRIES): New definition.
  6088. * src/TorrentMan.cc
  6089. (TorrentMan): Removed req. Added trackerNumTry.
  6090. (~TorrentMan): Removed req.
  6091. (setupInternal1): Added announceList.
  6092. * src/TorrentRequestInfo.cc
  6093. (execute): Set PREF_MAX_TIRES to 1. The max number of tries for
  6094. announces is now specified by PREF_TRACKER_MAX_TRIES.
  6095. * src/main.cc
  6096. (main): Added PREF_TRACKER_MAX_TRIES.
  6097. * src/TorrentMan.h
  6098. (Request.h): Removed.
  6099. (AnnounceList.h): New include.
  6100. (trackerNumTry): New variable.
  6101. (req): Removed.
  6102. (announceList): New variable.
  6103. * src/TrackerWatcherCommand.cc
  6104. (execute): Rewritten.
  6105. (createRequestCommand): New function.
  6106. * src/TrackerUpdateCommand.cc
  6107. (execute): Updated with the use of AnnounceList.
  6108. * src/AnnounceList.cc: New class.
  6109. * src/AnnounceList.h: New class.
  6110. To fix typo:
  6111. * src/prefs.h
  6112. (PREF_MAX_TRIES): max_try->max_tries
  6113. To not to decode "+" as space in URL decode:
  6114. * src/Util.cc
  6115. (urldecode): Removed "+"->space decoding rule. Test case was updated.
  6116. 2006-10-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6117. To add timeout to async name resolution:
  6118. * src/AbstractCommand.h
  6119. (nameResolveFinished): New function. This is not elegant way. It needs
  6120. to be more refined.
  6121. (nameResolverCheck): New variable.
  6122. * src/AbstractCommand.cc
  6123. (AbstractCommand): Added nameResolverCheck.
  6124. (execute): Added the check whether the name resolution has finished.
  6125. (setNameResolverCheck): Set nameResolverCheck to true.
  6126. (disableNameResolverCheck): Set nameResolverCheck to false.
  6127. (nameResolverFinished): New function.
  6128. * src/FtpInitiateConnectionCommand.h
  6129. (nameResolverFinished): New function.
  6130. * src/FtpInitiateConnectionCommand.cc
  6131. (FtpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  6132. * src/HttpInitiateConnectionCommand.h
  6133. (nameResolverFinished): New function.
  6134. * src/HttpInitiateConnectionCommand.cc
  6135. (HttpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  6136. * src/prefs.h
  6137. (PREF_DNS_TIMEOUT): New definition.
  6138. * src/main.cc
  6139. (main): Added PREF_DNS_TIMEOUT.
  6140. To add the support for a non-compact response from a tracker:
  6141. * src/PeerListProcessor.h: New class.
  6142. * src/DefaultPeerListProcessor.h: New class.
  6143. * src/DefaultPeerListProcessor.cc: New class.
  6144. * src/CompactPeerListProcessor.h: New class.
  6145. * src/CompactPeerListProcessor.cc: New class.
  6146. * src/DelegatingPeerListProcessor.h: New class.
  6147. * src/DelegatingPeerListProcessor.cc: New class.
  6148. * src/TorrentMan.cc
  6149. (addPeer): New function(overload).
  6150. (addPeer): Delete unused peers only when new peer is added.
  6151. * src/TorrentMan.h
  6152. (PeerListProcessor.h): Included.
  6153. (Peers): Removed.
  6154. (addPeer): New function(overload).
  6155. * src/TrackerUpdateCommand.cc
  6156. (netinet/in.h): Removed.
  6157. (DelegatingPeerListProcessor.h): Included.
  6158. (execute): Updated to use DelegatingPeerListProcessor.
  6159. To fix the memory leak in TorrentMan::peers:
  6160. * src/PeerAbstractCommand.cc
  6161. (onAbort): Added peer->resetStatus().
  6162. * src/Peer.h
  6163. (resetStatus): Made public.
  6164. To improve the precision of the speed calculation:
  6165. * src/SpeedCalc.h
  6166. (nextInterval): New variable.
  6167. * src/SpeedCalc.cc
  6168. (reset): Added nextInterval.
  6169. (isIntervalOver): Use nextInterval instead of CHANGE_INTERVAL_SEC.
  6170. (changeSw): Set nextInterval to 15 seconds relative to the current
  6171. instant time.
  6172. * src/main.cc
  6173. (showVersion): Updated.
  6174. (showUsage): Updated.
  6175. * Release 0.8.1
  6176. 2006-09-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6177. * src/main.cc
  6178. (showUsage): Commented out --min-segment-size option.
  6179. (main): Commented out --min-segment-size option.
  6180. * Release 0.8.0
  6181. 2006-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6182. * src/*.{h,cc}:
  6183. Added an exception to the license which allows linking with OpenSSL.
  6184. 2006-09-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6185. * src/AbstractCommand.cc
  6186. (execute): Check whether the download has finished before checking
  6187. socket status.
  6188. Return true if peerStat->getStatus() == REQUEST_IDLE.
  6189. Do not exit even if no segment is available.
  6190. * src/prefs.h
  6191. (PREF_STARTUP_IDLE_TIME): New definition.
  6192. * src/PeerInteractionCommand.cc
  6193. (executeInternal): Removed max speed limit. Because it performs bad.
  6194. (receiveMessages): Added max speed limit. This was better than above,
  6195. but still a little bit to be desired. Sometimes the download speed
  6196. became much faster than I specified.
  6197. * src/SpeedCalc.h
  6198. (start): New variable.
  6199. (accumulatedLength): New variable.
  6200. (getAvgSpeed): New function.
  6201. * src/SpeedCalc.cc
  6202. (reset): Added start, accumulatedLength.
  6203. (update): Added calculation of an average speed.
  6204. (getAvgSpeed): New function.
  6205. * src/DownloadCommand.h
  6206. (sw): Removed.
  6207. * src/main.cc
  6208. (main): Added PREF_STARTUP_IDLE_TIME.
  6209. * src/PeerStat.h
  6210. (STATUS): Added REQUEST_IDLE.
  6211. (getMaxSpeed): Renamed as getMaxDownloadSpeed().
  6212. (getAvgDownloadSpeed): New function
  6213. (requestIdle): New function.
  6214. * src/SegmentMan.h
  6215. (SegmentEntryHandle): New type definition.
  6216. (SegmentEntries): Now holds SegmentEntryHandle.
  6217. (findSlowerSegmentEntry): New funtion.
  6218. * src/SegmentMan.cc
  6219. (save): Updated according to the changes in SegmentEntries.
  6220. (read): Updated according to the changes in SegmentEntries.
  6221. (FindSegmentEntryByIndex): Updated according to the changes in
  6222. SegmentEntries.
  6223. (FindSegmentEntryByCuid): Updated according to the changes in
  6224. SegmentEntries.
  6225. (checkoutSegment): Updated according to the changes in SegmentEntries.
  6226. (onNullBitfield): Updated according to the changes in SegmentEntries.
  6227. Renamed uitr as itr.
  6228. (findSlowerSegmentEntry): New function.
  6229. (getSegment): Updated according to the changes in SegmentEntries.
  6230. Added the feature that cancels the segment with slow server and fast
  6231. one takes it over.
  6232. (cancelSegment): Updated according to the changes in SegmentEntries.
  6233. (getDownloadLength): Updated according to the changes in
  6234. SegmentEntries.
  6235. (init): Assigned 0 to bitfield after deleting it.
  6236. * src/DownloadCommand.cc
  6237. (STARTUP_IDLE_TIME): Removed.
  6238. (executeInternal): Use PREF_STARTUP_IDLE_TIME.
  6239. * src/PeerChokeCommand.cc
  6240. (optUnchokingPeer): Updated according to the changes in Peer.
  6241. (ResetDelta): Removed.
  6242. (UploadFaster): Updated according to the changes in Peer.
  6243. (DownloadFaster): Updated according to the changes in Peer.
  6244. (execute): I clarify the meaning of "upload" and "download" here.
  6245. "upload" means the transfer from localhost to remote host.
  6246. "download" means the transfer from remote host to localhost.
  6247. Based on this rule, I swapped orderByUploadRate and
  6248. orderByDownloadRate.
  6249. * src/PeerInteractionCommand.cc
  6250. (PeerInteraction): Removed peerInteraction->setUploadLImit().
  6251. (executeInternal): Removed the argument of
  6252. peerInteraction->sendMessages().
  6253. (receiveMessages): Rewritten download speed limit.
  6254. (sendKeepAlive): Removed peerInteraction->sendMessages().
  6255. * src/HttpResponseCommand.cc
  6256. (handleDefaultEncoding): If file size is unknown in torrent request,
  6257. do not call segmentMan->initBitfield() here.
  6258. Disabled persistent connection feature in torrent request.
  6259. * src/UrlRequestInfo.h
  6260. (UrlRequestInfo): Removed const qualifier from option.
  6261. * src/TorrentMan.h
  6262. (TransferStat): New class.
  6263. (deltaDownloadLength): Removed.
  6264. (deltaUploadLength): Removed.
  6265. (addDeltaDownloadLength): Removed.
  6266. (getDeltaDownloadLength): Removed.
  6267. (resetDeltaDownloadLength): Removed.
  6268. (addDeltaUploadLength): Removed.
  6269. (getDeltaUploadLength): Removed.
  6270. (resetDeltaUploadLength): Removed.
  6271. (addActivePeer): Added peer->activate().
  6272. (deleteActivePeer): Added peer->deactivate().
  6273. (calculateStat): New function.
  6274. * src/TorrentMan.cc
  6275. (TorrentMan): Removed deltaDownloadLength and deltaUploadLength.
  6276. (calculateStat): New function.
  6277. * src/PeerInteraction.h
  6278. (uploadLimit): Removed.
  6279. (option): New variable.
  6280. (setUploadLimit): Removed.
  6281. (getUploadSpeed): Removed.
  6282. (sendMessages): Removed the argument "currentUploadSpeed".
  6283. * src/PeerInteraction.cc
  6284. (prefs.h): Included.
  6285. (PeerInteraction): Removed uploadLimit. Added option.
  6286. (sendMessages): Rewritten upload speed limit.
  6287. (sendHandshake): Removed the argument from sendMessages().
  6288. (sendBitfield): Removed the argument from sendMessages().
  6289. * src/PeerAbstractCommand.cc
  6290. (execute): Commented out the portion of upload limit.
  6291. (onAbort): Removed peer->resetStatus().
  6292. * src/TorrentRequestInfo.cc
  6293. (timeoutSpecified): Declared extern.
  6294. (execute): Set timeout to 180 if timeout is not specified by.
  6295. command-line.
  6296. * src/PieceMessage.cc
  6297. (receivedAction): Added peer->updateDownloadLength().
  6298. Removed peer->addPeerUpload().
  6299. Removed torrentMan->addDeltaDownloadLength().
  6300. (send): Added peer->updateUploadLength().
  6301. Removed peer->addPeerDownload().
  6302. Removed torrentMan->addDeltaUploadLength().
  6303. * src/main.cc
  6304. (timeoutSpecified): New variable.
  6305. (main): Set timeoutSpecified to false.
  6306. If the command-line option "--upload-limit" is specified, then
  6307. timeoutSpecified is set to true. This option will remain in the next
  6308. release, but be deprecated in the future release.
  6309. * src/TorrentRequestInfo.h
  6310. (TorrentRequestInfo): Removed const qualifier from op.
  6311. * src/PeerStat.h
  6312. (uploadSpeed): New variable.
  6313. (PeerStat): Added default value to cuid.
  6314. (calculateUploadSpeed): New function.
  6315. (updateUploadLength): New function.
  6316. (getMaxUploadSpeed): New function.
  6317. (getAvgUploadSpeed): New function.
  6318. (reset): Added uploadSpeed. Set status to IDLE.
  6319. * src/TorrentDownloadEngine.h
  6320. (cp): Declared as Time.
  6321. (sessionDownloadLengthArray): Removed.
  6322. (sessionUploadLengthArray): Removed.
  6323. (currentCp): Removed.
  6324. (lastCalcStat): New variable
  6325. (lastElapsed): Removed.
  6326. (sessionDownloadLength): Removed.
  6327. (calculateStat): New function.
  6328. * src/TorrentDownloadEngine.cc
  6329. (initStatistics): Removed lastElapsed, cp[],
  6330. sessionDownloadLengthArray[], sessionUploadLengthArray[],
  6331. currentCp, sessionDownloadLength.
  6332. Added cp.reset() and lastCalcStat.reset().
  6333. (calculateSpeed): Changed the name of the argument.
  6334. (calculateStatistics): Rewritten.
  6335. (calculateStat): New function.
  6336. * src/Peer.h
  6337. (PeerStat.h): Included.
  6338. (peerUpload): Removed.
  6339. (peerDownload): Removed.
  6340. (peerStat): New variable.
  6341. (sessionUploadLength): New variable.
  6342. (sessionDownloadLength): New variable.
  6343. (deltaUpload): Removed.
  6344. (deltaDownload): Removed.
  6345. (resetStatus): Made private.
  6346. (Peer): Added sessionUploadLength, sessionDownloadLength.
  6347. Removed peerUpload, peerDownload.
  6348. (updateUploadLength): New function.
  6349. (addDeltaUpload): Removed.
  6350. (updateDownloadLength): New function.
  6351. (resetDeltaUpload): Removed.
  6352. (getDeltaUpload): Removed.
  6353. (addDeltaDownload): Removed.
  6354. (calculateUploadSpeed): New function.
  6355. (resetDeltaDownload): Removed.
  6356. (getDeltaDownload): Removed.
  6357. (calculateDownloadSpeed): New function.
  6358. (getSessionUploadLength): New function.
  6359. (getSessionDownloadLength): New function.
  6360. (activate): New function.
  6361. (deactivate): New function.
  6362. (addPeerUpload): Removed.
  6363. (setPeerUpload): Removed.
  6364. (getPeerUpload): Removed.
  6365. (addPeerDownload): Removed.
  6366. (setPeerDownload): Removed.
  6367. (getPeerDownload): Removed.
  6368. * src/Peer.cc
  6369. (resetStatus): Removed resetDeltaUpload() and resetDeltaDownload().
  6370. * src/MetalinkRequestInfo.h
  6371. (MetalinkRequestInfo): Removed const qualifier from op.
  6372. * src/RequestInfo.h
  6373. (op): Removed const qualifier.
  6374. (RequestInfo): Removed const qualifier from op.
  6375. * src/prefs.h
  6376. (PREF_MAX_SPEED_LIMIT): Renamed as PREF_MAX_DOWNLOAD_LIMIT.
  6377. (PREF_UPLOAD_LIMIT): Renamed as PREF_MAX_UPLOAD_LIMIT.
  6378. * src/PeerInteractionCommand.cc
  6379. (PeerInteractionCommand): Use PREF_MAX_UPLOAD_LIMIT.
  6380. (receiveMessages): Use PREF_MAX_DOWNLOAD_LIMIT.
  6381. * src/PeerInteraction.cc
  6382. (sendMessages): Use PREF_MAX_UPLOAD_LIMIT.
  6383. * src/main.cc
  6384. (showUsage): Updated the description of "--lowest-speed-limit" option.
  6385. Added the description of "--max-download-limit" option.
  6386. Removed the description of "--upload-limit" option.
  6387. Added the description of "--max-upload-limit" option.
  6388. (main): Use PREF_MAX_UPLOAD_LIMIT, PREF_MAX_DOWNLOAD_LIMIT.
  6389. Added "--max-download-limit" option and "--max-upload-limit" option.
  6390. Added the warning message if "--upload-limit" option is used.
  6391. * src/DownloadCommand.cc
  6392. (executeInternal): Use PREF_MAX_DOWNLOAD_LIMIT.
  6393. 2006-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6394. To rewrite segment download mechanism for HTTP/FTP download.
  6395. Use BitfieldMan to manage segment download.
  6396. * src/HttpResponseCommand.h
  6397. (executeInternal): Pass the reference of segment.
  6398. * src/AbstractCommand.cc
  6399. (prepareForRetry): Call segmentMan->cancelSegment here.
  6400. (onAbort): Call segmentMan->cancelSegment here.
  6401. * src/HttpDownloadCommand.cc
  6402. (prepareForNextSegment): New function.
  6403. * src/DownloadEngineFactory.cc
  6404. (newConsoleEngine): Removed splitter.
  6405. (newTorrentConsoleEngine): Removed splitter.
  6406. * src/Request.h
  6407. (segment): Renamed from seg.
  6408. * src/FtpInitiateConnectionCommand.h
  6409. (executeInternal): Pass the reference of segment.
  6410. * src/AbstractCommand.h
  6411. (executeInternal): Pass the reference of segment.
  6412. * src/pref.h
  6413. (PREF_SEGMENT_SIZE): New definition.
  6414. * src/HttpProxyRequestCommand.h
  6415. (executeInternal): Pass the reference of segment.
  6416. * src/HttpResponseCommand.cc
  6417. (checkResponse): Allowed status 206 when a request range starts 0.
  6418. (handleDefaultEncoding): Rewritten the code related to Segment.
  6419. (handleOtherEncoding): Rewritten the code related to Segment.
  6420. * src/SegmentMan.h
  6421. (SegmentEntry): New class.
  6422. (SegmentEntries): New type definition.
  6423. (bitfield): New variable.
  6424. (usedSegmentEntries): New variable.
  6425. (onNullBitfield): New function.
  6426. (checkoutSegment): New function.
  6427. (segments): Removed.
  6428. (splitter): Removed.
  6429. (unregisterId): Removed.
  6430. (getSegment): New function(overload)
  6431. (getDownloadedSize): Removed.
  6432. (cancelSegment): New function.
  6433. (completeSegment): New function.
  6434. (initBitfield): New function.
  6435. (hasSegment): New function.
  6436. (getDownloadLength): New function.
  6437. * src/BitfieldMan.h
  6438. (getStartIndex): New function.
  6439. (getEndIndex): New function.
  6440. (getMissingUnusedIndex): New function(overload).
  6441. (getSparseMissingUnusedIndex): New function.
  6442. * src/BitfieldMan.cc
  6443. (getMissingIndexRandomly): Handle the last byte of bitfield properly.
  6444. (getMissingUnusedIndex): New function(overload).
  6445. (Range): New class.
  6446. (getStartIndex): New function.
  6447. (getEndIndex): New function.
  6448. (getSparseMissingUnusedIndex): New function.
  6449. (isBitSetInternal): Return false if the given index is less than 0.
  6450. * src/HttpInitiateConnectionCommand.h
  6451. (executeInternal): Pass the reference of segment.
  6452. * src/FtpNegotiateCommand.h
  6453. (executeInternal): Pass the reference of segment.
  6454. * src/FtpNegotiateCommand.cc
  6455. (recvSize): Initialize bitfield here.
  6456. * src/FtpTunnelResponseCommand.h
  6457. (executeInternal): Pass the reference of segment.
  6458. * src/HttpConnection.cc
  6459. (createRequest): Rewritten range header processing.
  6460. * src/DownloadCommand.h
  6461. (executeInternal): Pass the reference of segment.
  6462. (prepareForRetry): Removed.
  6463. (prepareForNextSegment): Added an argument segment. Made it a virtual
  6464. function.
  6465. * src/main.cc
  6466. (main): Set the initial value of PREF_SEGMENT_SIZE to 1MB.
  6467. * src/SegmentMan.cc
  6468. (SegmentMan): Added bitfield. Removed splitter.
  6469. (~SegmentMan): Added bitfield. Removed splitter.
  6470. (unregisterId): Removed.
  6471. (getSegment): Rewritten.
  6472. (updateSegment): Rewritten.
  6473. (save): Rewritten.
  6474. (read): Rewritten.
  6475. (finished): Rewritten.
  6476. (getDownloadedSize): Removed.
  6477. (initBitfield): New function.
  6478. (FindSegmentEntryByIndex): New function object.
  6479. (FindSegmentEntryByCuid): New function object.
  6480. (checkoutSegment): New function.
  6481. (onNullBitfield): New function.
  6482. (getSegment): New function(overload).
  6483. (CancelSegment): New function object.
  6484. (cancelSegment): New function.
  6485. (completeSegment): New function.
  6486. (hasSegment): New function.
  6487. (getDownloadLength): New function.
  6488. * src/FtpInitiateConnectionCommand.cc
  6489. (executeInternal): Load .aria2 file after hostname resolution finishes.
  6490. * src/Segment.h: Rewritten.
  6491. * src/Segment.cc (operator<<): New function.
  6492. * src/HttpDownloadCommand.h
  6493. (prepareForNextSegment): New function.
  6494. * src/Request.cc
  6495. (resetUrl): Made segment null.
  6496. * src/DownloadEngine.cc
  6497. (~DownloadEngine): Call cleanQueue before deleting segmentMan.
  6498. * src/HttpProxyRequestCommand.h
  6499. (executeInternal): Pass the reference of segment.
  6500. * src/DownloadCommand.cc
  6501. (executeInternal): Rewritten the code related to Segment.
  6502. (prepareForRetry): Removed.
  6503. (prepareForNextSegment): Rewritten.
  6504. * src/FtpTunnelResponseCommand.h
  6505. (executeInternal): Pass the reference of segment.
  6506. To add HTTP 1.1 persistent connection support(experimental)
  6507. * src/HttpRequestCommand.cc
  6508. (executeInternal): Disable keep alive if it is disabled by
  6509. configuration.
  6510. * src/Request.h
  6511. (keepAlive): New variable.
  6512. (isKeepAlive): New function.
  6513. (setKeepAlive): New function.
  6514. * src/pref.h
  6515. (PREF_HTTP_KEEP_ALIVE): New definition.
  6516. * src/HttpResponseCommand.cc
  6517. (executeInternal): Check the remote server supports keep alive.
  6518. * src/HttpConnection.cc
  6519. (createRequest): Send "Connection: close" only if keep alive is
  6520. disabled.
  6521. * src/main.cc
  6522. (main):
  6523. Set the initial value(false) of PREF_KEEP_ALIVE to false.
  6524. To add max download speed limit:
  6525. * src/pref.h
  6526. (PREF_MAX_SPEED_LIMIT): New definition.
  6527. * src/PeerInteractionCommand.cc
  6528. (executeInternal): Added max download speed limit. Not tested yet.
  6529. * src/SegmentMan.h
  6530. (PeerStats): New type definition.
  6531. (peerStats): New variable.
  6532. (registerPeerStat): New function.
  6533. (FindPeerStat): New function object.
  6534. (getPeerStat): New function.
  6535. (calculateDownloadSpeed): New function.
  6536. * src/SpeedCalc.h: New class.
  6537. * src/SpeedCalc.cc: New class.
  6538. * src/main.cc
  6539. (main):
  6540. Set the initial value of PREF_MAX_SPEED_LIMIT to 0(which means the
  6541. download speed is not restricted).
  6542. * src/PeerStat.h: New class.
  6543. * src/SegmentMan.cc
  6544. (registerPeerStat): New function.
  6545. (calculateDownloadSpeed): New function.
  6546. * src/DownloadCommand.cc
  6547. (STARTUP_IDLE_TIME): New definition.
  6548. (DownloadCommand): Register peerStat to segmentMan. Call peerStat->
  6549. downloadStart.
  6550. (~DownloadCommand): Call peerStat->downloadStop.
  6551. (executeInternal): Added download speed limitter. Rewritten lowest
  6552. speed limitter.
  6553. * src/HttpConnection.cc
  6554. (receiveResponse): Fixed: eohIndex[headerBuf] -> headerBuf[eohIndex].
  6555. * src/AbstractCommand.cc
  6556. (resolveHostname): Throw DlAbortEx if a name resolution failes.
  6557. Added hostname to the error message.
  6558. * src/ConsoleDownloadEngine.cc
  6559. (calculateStatistics): Initialize psize with dlSize.
  6560. * src/PieceMessage.cc
  6561. (receivedAction): Do not call peerInteraction->abortPiece here.
  6562. (onGotWrongPiece): Call peerInteraction->abortPiece here.
  6563. * src/BitfieldMan.h
  6564. (clearAllUseBit): New function.
  6565. (setAllUseBit): New function.
  6566. * src/BitfieldMan.cc
  6567. (clearAllBit): Do not clear useBitfield here.
  6568. (clearAllUseBit): New function.
  6569. (setAllUseBit): New function.
  6570. * src/Piece.cc
  6571. (clearAllBlock): Call bitfield->clearAllUseBit().
  6572. 2006-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6573. To make filename URL-decoded:
  6574. * src/HttpResponseCommand.h: Updated doc.
  6575. * src/HttpResponseCommand.cc
  6576. (determinFilename): Made filename URL-decoded.
  6577. * src/FtpInitiateConnectionCommand.cc
  6578. (executeInternal): Made filename URL-decoded.
  6579. * src/Util.h (urldecode): New function.
  6580. * src/Util.cc (urldecode): New function.
  6581. To fix a bug that caused assertion failure in ares_strerror:
  6582. * src/NameResolver.cc (callback): Fixed the bug.
  6583. * Release 0.7.3
  6584. 2006-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6585. To add --seed-time and --seed-ratio command-line option:
  6586. * src/Option.h (getAsDouble): New function.
  6587. * src/Option.cc (getAsDouble): New function.
  6588. * src/SeedCheckCommand.h: New class.
  6589. * src/SeedCheckCommand.cc: New class.
  6590. * src/DownloadEngineFactory.cc
  6591. (SeedCheckCommand.h): Included.
  6592. (UnionSeedCriteria.h): Included.
  6593. (TimeSeedCriteria.h): Included.
  6594. (ShareRatioSeedCriteria.h): Included.
  6595. (newTorrentConsoleEngine): Added the processing of seed option.
  6596. * src/SeedCriteria.h: New class.
  6597. * src/ShareRatioSeedCriteria.h: New class.
  6598. * src/TimeSeedCriteria.h: New class.
  6599. * src/UnionSeedCriteria.h: New class.
  6600. * src/prefs.h
  6601. (PREF_SEED_TIME): New definition.
  6602. (PREF_SEED_RATIO): New definition.
  6603. * src/main.cc
  6604. (showUsage): Added --seed-time and --seed-ratio option.
  6605. (main): Added --seed-time and --seed-ratio option.
  6606. Made default log file name "/dev/null".
  6607. * src/SharedHandle.h
  6608. (SharedHandle): Copy constructor. Made it assignable from the
  6609. SharedHandle of the subclasses.
  6610. (operator=): Made it assignable from the SharedHandle of the
  6611. subclasses.
  6612. (getRefCount): New function.
  6613. To add notice log level and the switch to write log to stdout. This
  6614. switch is configurable per log level.
  6615. * src/Logger.h
  6616. (notice): New function.
  6617. (LEVEL): Added NOTICE. Assigned an explicit value to each log level
  6618. constant.
  6619. * src/LogFactory.cc
  6620. (getInstance): The use of NullLogger was removed. A log message with
  6621. notice log level was made written to stdout along with log file.
  6622. * src/NullLogger.h
  6623. (notice): New function.
  6624. * src/SimpleLogger.h
  6625. (writeHeader): Added the 'file' argument.
  6626. (writeLog): Added the 'file' argument.
  6627. (writeFile): New function.
  6628. (stdoutField): New variable.
  6629. (SimpleLogger): Removed the default constructor.
  6630. (SimpleLogger): Made the default value of logfile 0.
  6631. (debug): Added 'virtual' keyword.
  6632. (info): Added 'virtual' keyword.
  6633. (warn): Added 'virtual' keyword.
  6634. (error): Added 'virtual' keyword.
  6635. (notice): New function.
  6636. (setStdout): New function.
  6637. * src/SimpleLogger.cc
  6638. (WRITE_LOG): Replaced writeLog with writeFile.
  6639. (WRITE_LOG_EX): Replaced writeLog with writeFile.
  6640. (SimpleLogger): Removed the default constructor.
  6641. (setStdout): New function.
  6642. (writeLog): Added the handling of NOTICE log level.
  6643. (writeFile): New function.
  6644. (notice): New function.
  6645. * src/TorrentMan.h: Updated doc.
  6646. * src/BitfieldMan.h: Updated doc.
  6647. * src/TrackerWatcherCommand.cc
  6648. (execute): Return true if error occurred in the request to the tracker
  6649. and halt is requested.
  6650. * src/TrackerUpdateCommand.cc
  6651. (execute): Return true if error occurred in the request to the tracker
  6652. and halt is requested.
  6653. To call onDownloadComplete from TorrentMan::completePiece(), not from
  6654. DownloadEngine:
  6655. * src/TorrentConsoleDownloadEngine.h
  6656. (onSelectiveDownloadingCompletes): Removed.
  6657. * src/TorrentConsoleDownloadEngine.cc
  6658. (onSelectiveDownloadingCompletes): Removed.
  6659. * src/TorrentDownloadEngine.h
  6660. (onEndOfRun): Added 'virtual' keyword.
  6661. (afterEachIteration): Removed.
  6662. (onSelectiveDownloadingCompletes): Removed.
  6663. * src/TorrentDownloadEngine.cc
  6664. (onEndOfRun): Removed filenameFixed.
  6665. (afterEachIteration): Removed.
  6666. * src/TorrentMan.cc
  6667. (completePiece): Call onDownloadComplete here.
  6668. (onDownloadComplete): Added 2 log messages.
  6669. 2006-08-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6670. To fix compilation problem on gcc4.1.1(patch#1542283 by tizianomueller)
  6671. * src/NameResolver.h: Added the prototype declaration of callback().
  6672. To support c-ares library:
  6673. * src/AbstractCommand.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6674. * src/FeatureConfig.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6675. * src/FtpInitiateConnectionCommand.h:
  6676. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6677. * src/AbstractCommand.h: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6678. * src/HttpInitiateConnectionCommand.h:
  6679. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6680. * src/NameResolver.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS.
  6681. Added thes upport of c-ares's ares_strerror(the idea came from patch
  6682. #1542285 by tizianomueller)
  6683. * src/HttpInitiateConnectionCommand.cc:
  6684. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6685. * src/FtpInitiateConnectionCommand.cc:
  6686. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6687. * src/DownloadEngine.h:
  6688. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6689. * src/DownloadEngine.cc:
  6690. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6691. To fix the bug that causes compilation failure with metalink-support
  6692. disabled(bug#1543587):
  6693. * src/main.cc: Fixed with the patch by tizianomueller.
  6694. * Release 0.7.2
  6695. 2006-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6696. * src/main.cc
  6697. (main): Added a message to inform users that aria2 is starting to
  6698. verify checksum.
  6699. * src/RequestInfo.cc
  6700. (printDownloadAbortMessage): Added a message to inform users that
  6701. transfer can be resumed.
  6702. * src/FeatureConfig.cc
  6703. (FEATURE_ASYNC_DNS): New definition.
  6704. (FeatureConfig): Added aysnc DNS entry.
  6705. To replace CommandUuid with Command* in SocketEntry and
  6706. NameResolverEntry:
  6707. * src/DownloadEngine.h
  6708. (CommandUuids): Removed.
  6709. (SocketEntry::commandUuid): Removed.
  6710. (SocketEntry::command): New variable.
  6711. (SocketEntry::SocketEntry): Updated.
  6712. (SocketEntry::operator==): Updated.
  6713. (NameResolverEntry::commandUuid): Removed.
  6714. (NameResolverEntry::command): New variable.
  6715. (NameResolverEntry::NameResolverEntry): Updated.
  6716. (NameResolverEntry::operator==): Updated.
  6717. (waitData): Changed the argument type.
  6718. (addSocketForReadCheck): Changed the argument type.
  6719. (deleteSocketForReadCheck): Changed the argument type.
  6720. (addSocketForWriteCheck): Changed the argument type.
  6721. (deleteSocketForWriteCheck): Changed the argument type.
  6722. (addNameResolverCheck): Changed the argument type.
  6723. (deleteNameResolverCheck): Changed the argument type.
  6724. * src/DownloadEngine.cc
  6725. (FindCommand): Removed.
  6726. (run): Removed activeUuid. Added activeCommands instead.
  6727. (AccumulateActiveUuid): Renamed as AccumulateActiveCommand.
  6728. (AccumulateActiveCommand): New function object.
  6729. (waitData): Use AccumulateActiveCommand.
  6730. (addSocketForReadCheck): Use Command instead of CommandUuid.
  6731. (deleteSocketForReadCheck): Use Command instead of CommandUuid.
  6732. (addSocketForWriteCheck): Use Command instead of CommandUuid.
  6733. (deleteSocketForWriteCheck): Use Command instead of CommandUuid.
  6734. (addNameResolverCheck): Use Command instead of CommandUuid.
  6735. (deleteNameResolverCheck): Use Command instead of CommandUuid.
  6736. * src/AbstractCommand.cc
  6737. (disableReadCheckSocket): Updated according to the changes in
  6738. DownloadEngine.
  6739. (setReadCheckSocket): Updated according to the changes in
  6740. DownloadEngine.
  6741. (disableWriteCheckSocket): Updated according to the changes in
  6742. DownloadEngine.
  6743. (setWriteCheckSocket): Updated according to the changes in
  6744. DownloadEngine.
  6745. (setNameResolverCheck): Updated according to the changes in
  6746. DownloadEngine.
  6747. (disableNameResolverCheck): Updated according to the changes in
  6748. DownloadEngine.
  6749. * src/AbstractCommand.cc
  6750. (disableReadCheckSocket): Updated according to the changes in
  6751. DownloadEngine.
  6752. (setReadCheckSocket): Updated according to the changes in
  6753. DownloadEngine.
  6754. (disableWriteCheckSocket): Updated according to the changes in
  6755. DownloadEngine.
  6756. (setWriteCheckSocket): Updated according to the changes in
  6757. DownloadEngine.
  6758. * release 0.7.1
  6759. 2006-08-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6760. To handle the case where some BitTorrent tracker requires all letters
  6761. except for [A-Za-z0-9] is URL encoded.
  6762. * src/Util.h
  6763. (torrentUrlencode): New function.
  6764. * src/Util.cc
  6765. (ctype.h): Included.
  6766. (torrentUrlencode): New function.
  6767. * src/TrackerWatcherCommand.cc
  6768. (execute): Use Util::torrentUrlencode() instead of Util::urlencode().
  6769. 2006-08-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6770. To add asynchronous DNS support(libares):
  6771. * src/AbstractCommand.h
  6772. (setNameResolverCheck): New function.
  6773. (disableNameResolverCheck): New function
  6774. (resolveHostname): New function.
  6775. * src/AbstractCommand.cc
  6776. (setNameResolverCheck): New function.
  6777. (disableNameResolverCheck): New function
  6778. (resolveHostname): New function.
  6779. * src/FtpInitiateConnectionCommand.h
  6780. (nameResolver): New function.
  6781. * src/FtpInitiateConnectionCommand.cc
  6782. (Util.h): Included.
  6783. (FtpInitiateConnectionCommand): Call disableReadCheckSocket,
  6784. disableWriteCheckSocket.
  6785. (~FtpInitiateConnectionCommand): Call disableNameResolverCheck.
  6786. (executeInternal): Added async DNS support.
  6787. * src/HttpInitiateConnectionCommand.h
  6788. (nameResolver): New function.
  6789. * src/HttpInitiateConnectionCommand.cc
  6790. (DlRetryEx.h): Included.
  6791. (HttpInitiateConnectionCommand): Call disableReadCheckSocket,
  6792. disableWriteCheckSocket.
  6793. (~HttpInitiateConnectionCommand): Call disableNameResolverCheck.
  6794. (executeInternal): Added async DNS support.
  6795. * src/NameResolver.h: New class. Note: #include <ares.h> is surrounded
  6796. by extern "C" declaration.
  6797. * src/NameResolver.cc: New class.
  6798. * src/Util.h:
  6799. (isNumberAndDotsNotation): New function
  6800. * src/Util.cc
  6801. (isNumberAndDotsNotation): New function.
  6802. * src/DownloadEngine.h
  6803. (NameResolver.h): Included.
  6804. (NameResolverEntry): New class.
  6805. (NameResolverEntries): New type definition.
  6806. (addNameResolverCheck): New function.
  6807. (deleteNameResolverCheck): New function.
  6808. * src/DownloadEngine.cc
  6809. (run): Initialize cp with 0.
  6810. (SetDescriptor::operator()): Added for NameResolverEntry.
  6811. (AccumulateActiveUuid::operator()): Added for NameResolverEntry.
  6812. (waitData): Check nameResolver entries.
  6813. (updateFdSet): Update fds in nameResolver entries.
  6814. (addNameResolverCheck): New function.
  6815. (deleteNameResolverCheck): new function.
  6816. * src/PeerInteractionCommand.cc
  6817. (executeInternal): Fixed wrong socket handling.
  6818. * src/main.cc
  6819. (main): Fixed the initial value of PREF_LOWEST_SPEED_LIMIT option to 0.
  6820. * src/Util.cc
  6821. (fileChecksum): Removed the call to ctx.digestReset().
  6822. 2006-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6823. * po/ru.po: Azamat sent me Russian translation.
  6824. * src/FtpNegotiateCommand.cc
  6825. (recvGreeting): Call disableWriteCheckSocket just after
  6826. socket->setBlockingMode(). This avoids unnecessary CPU-hog loop.
  6827. (recvRetr): Recognized status code 125 as a acceptable response code.
  6828. Rename Time.h to TimeA2.h to avoid compilation ploblem on
  6829. case-insesitive filesystem(BUG#1531057).
  6830. * src/Time.h: Renamed as TimeA2.h.
  6831. * src/Time.cc: Renamed as TimeA2.cc.
  6832. * src/TimeA2.h: New class.
  6833. * src/TimeA2.cc: New class.
  6834. * src/PeerChokeCommand.h: Replaced Time.h with TimeA2.h.
  6835. * src/TrackerWatcherCommand.h: Replaced Time.h with TimeA2.h.
  6836. * src/PeerAbstractCommand.h: Replaced Time.h with TimeA2.h.
  6837. * src/AbstractCommand.h: Replaced Time.h with TimeA2.h.
  6838. * src/PeerInteractionCommand.h: Replaced Time.h with TimeA2.h.
  6839. * src/ConsoleDownloadEngine.h: Replaced Time.h with TimeA2.h.
  6840. * src/TorrentAutoSaveCommand.h: Replaced Time.h with TimeA2.h.
  6841. * src/DownloadCommand.h: Replaced Time.h with TimeA2.h.
  6842. * src/TorrentMan.h: Replaced Time.h with TimeA2.h.
  6843. * src/TorrentDownloadEngine.h: Replaced Time.h with TimeA2.h.
  6844. * src/RequestSlot.h: Replaced Time.h with TimeA2.h.
  6845. * src/SleepCommand.h: Replaced Time.h with TimeA2.h.
  6846. * src/DownloadEngine.cc: Replaced Time.h with TimeA2.h.
  6847. * release 0.7.0
  6848. 2006-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6849. * src/PeerChokeCommand.h
  6850. (PeerChokeCommand): Rearranged the arguments.
  6851. * src/PeerChokeCommand.cc
  6852. (PeerChokeCommand): Rearranged the arguments.
  6853. * src/MetalinkEntry.h
  6854. (Checksum.h): Included.
  6855. (md5): Removed.
  6856. (sha1): Removed.
  6857. (checksum): New variable.
  6858. (operator=): Updated.
  6859. (check): Removed.
  6860. * src/prefs.h
  6861. (PREF_LOWEST_SPEED_LIMIT): New definition.
  6862. (PREF_FOLLOW_TORRENT): New definition.
  6863. (PREF_SELECT_FILE): New definition.
  6864. (PREF_FOLLOW_METALINK): New definition.
  6865. * src/MetalinkResource.h
  6866. (TYPE_HTTPS): Added to enum TYPE.
  6867. * src/TorrentMan.cc
  6868. (~TorrentMan): Rewritten.
  6869. * src/MultiDiskWriter.cc
  6870. (MultiDiskAdaptor): Updated according to the changes in
  6871. MessageDigestContext.
  6872. (~MultiDiskAdaptor): Updated according to the changes in
  6873. MessageDigestContext.
  6874. (hashUpdate): Updated according to the changes in MessageDigestContext.
  6875. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6876. * src/Util.h
  6877. (fileChecksum): Updated according to the changes in
  6878. MessageDigestContext.
  6879. * src/Util.cc
  6880. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6881. (fileChecksum): Updated according to the changes in
  6882. MessageDigestContext.
  6883. * src/messageDigest.h: Rewritten.
  6884. * src/MetalinkEntry.cc
  6885. (check): Removed.
  6886. (Supported): Updated.
  6887. (dropUnsupportedResource): Fixed a memory leak.
  6888. * src/ShaVisitor.cc
  6889. (ShaVisitor): Updated according to the changes in MessageDigestContext.
  6890. (~ShaVisitor): Updated according to the changes in
  6891. MessageDigestContext.
  6892. (visit): Updated according to the changes in MessageDigestContext.
  6893. * src/main.cc
  6894. (main): Rewritten the portion of download loop. --lowest-speed-limit
  6895. command-line option added.
  6896. * src/DownloadEngine.h
  6897. (SocketEntry): New class.
  6898. (SocketEntries): New definition.
  6899. (PairFind): Removed.
  6900. (SockCmdMap): Removed.
  6901. * src/DownloadEngine.cc
  6902. (DownloadEngine): Rewritten.
  6903. (~DownloadEngine): Rewritten.
  6904. (run): Renamed activeCommandUuids as activeUuids.
  6905. (SetDescriptor): Rewritten.
  6906. (AccumulateActiveCommandUuid): Removed.
  6907. (AccumulateActiveUuid): New function object.
  6908. (waitData): Rewritten.
  6909. (updateFdSet): Rewritten.
  6910. (addSocket): Rewritten.
  6911. (deleteSocket): Rewritten.
  6912. (addSocketForReadCheck): Rewritten.
  6913. (deleteSocketForReadCheck): Rewritten.
  6914. (addSocketForWriteCheck): Rewritten.
  6915. (deleteSocketForWriteCheck): Rewritten.
  6916. * src/Xml2MetalinkProcessor.cc
  6917. (getEntry): Rewritten the portion of MetalinkEntry creation.
  6918. * src/DownloadCommand.cc
  6919. (executeInternal): Added the check routine for lowest speed limit.
  6920. * src/AbstractDiskWriter.cc
  6921. (AbstractDiskWriter): Updated according to the changes in
  6922. MessageDigestContext.
  6923. (~AbstractDiskWriter): Updated according to the changes in
  6924. MessageDigestContext.
  6925. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6926. * src/RequestInfo.h: New class.
  6927. * src/UrlRequestInfo.h: New class.
  6928. * src/UrlRequestInfo.cc: New class.
  6929. * src/TorrentRequestInfo.h: New class.
  6930. * src/TorrentRequestInfo.cc: New class.
  6931. * src/MetalinkRequestInfo.h: New class.
  6932. * src/MetalinkRequestInfo.cc: New class.
  6933. * src/Checksum.h: New class.
  6934. * src/DownloadEngineFactory.h: New class.
  6935. * src/DownloadEngineFactory.cc: New class.
  6936. 2006-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6937. * src/Option.h
  6938. (getAsBool): New function.
  6939. * src/Option.cc
  6940. (prefs.h): Included.
  6941. (defined): 0-length value is now recognized as undefined.
  6942. (getAsInt): Rewritten.
  6943. (getAsLLInt): Rewritten.
  6944. (getAsBool): New function.
  6945. * src/FeatureConfig.h: Rewritten.
  6946. * src/FeatureConfig.cc: Rewritten.
  6947. * src/prefs.h
  6948. (PREF_STDOUT_LOG): New definition.
  6949. (PREF_LOG): New definition.
  6950. (PREF_DIR): New definition.
  6951. (PREF_OUT): New definition.
  6952. (PREF_SPLIT): New definition.
  6953. (PREF_DAEMON): New definition.
  6954. (PREF_REFERER): New definition.
  6955. (PREF_TORRENT_FILE): New definition.
  6956. (PREF_LISTEN_PORT): New definition.
  6957. (PREF_METALINK_FILE): New definition.
  6958. (PREF_METALINK_VERSION): New definition.
  6959. (PREF_METALINK_LANGUAGE): New definition.
  6960. (PREF_METALINK_OS): New definition.
  6961. (PREF_METALINK_SERVERS): New definition.
  6962. * src/main.cc
  6963. (main): Following command-line parameters are now put into Option
  6964. class: stdoutLog, logfile, dir, ufilename, split, daemonMode,
  6965. referer, torrentFile, metalinkFile, listenPort, metalinkVersion,
  6966. metalinkLanguage, metalinkOs, metalinkServers
  6967. To fix the bug that aria2 can not handle http response header properly.
  6968. * src/HttpHeader.cc
  6969. (put): Made name lowercased.
  6970. (defined): Made name lowercased.
  6971. (getFirst): Made name lowercased.
  6972. (get): Made name lowercased.
  6973. (getFirstAsInt): Rewritten.
  6974. (getFirstAsLLInt): Rewritten.
  6975. 2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6976. * src/TorrentMan.h:
  6977. (advertisePiece): Updated doc.
  6978. (getAdvertisedPieceIndexes): Updated doc.
  6979. (removeAdvertisedPiece); New function.
  6980. * src/TorrentMan.cc
  6981. (FindElapsedHave): New function object.
  6982. (removeAdvertisedPiece): New function.
  6983. * src/HaveEraseCommand.h: New class.
  6984. * src/HaveEraseCommand.cc: New class.
  6985. * src/FeatureConfig.h: New class.
  6986. * src/FeatureConfig.cc: New class.
  6987. * src/Request.h
  6988. (defaultPorts): Removed.
  6989. * src/Request.cc
  6990. (FeatureConfig.h): Included.
  6991. (Request): Removed the statements related to defaultPorts.
  6992. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead.
  6993. A default port number is now retrieved from FeatureConfig.
  6994. * src/main.cc
  6995. (HaveEraseCommand.h): Included.
  6996. (showVersion): Added the output of feature list.
  6997. (main): Added HaveEraseCommand to command queue in BitTorrent
  6998. downloading.
  6999. * src/PeerInteractionCommand.h
  7000. (chokeCheckPoint): Commented out.
  7001. (periodicExecPoint): New variable.
  7002. * src/PeerInteractionCommand.cc
  7003. (executeInternal): Following methods are now called in at least every
  7004. 0.5 seconds to reduce CPU usage:
  7005. detectMessageFlooding(), peerInteraction->checkRequestSlot(),
  7006. checkHave(), sendKeepAlive().
  7007. (checkLongTimePeerChoking): Commented out.
  7008. * src/BitfieldMan.h
  7009. (getNthBitIndex): Changed the method signature.
  7010. (getMissingIndexRandomly): Changed the method signature.
  7011. * src/BitfieldMan.cc
  7012. (getNthBitIndex): Rewritten
  7013. (getMissingIndexRandomly): Rewritten.
  7014. (hasMissingPiece): Rewritten.
  7015. (getMissingIndex): Refactored.
  7016. (getMissingUnusedIndex); Refactored.
  7017. (getMissingIndex): Refactored.
  7018. 2006-07-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7019. * src/PeerMessage.h
  7020. (Piece.h): Included.
  7021. (SharedHandle.h): Included.
  7022. (invalidate): New variable.
  7023. (uploading): New variable.
  7024. (isInvalidate): New function.
  7025. (isUploading): New function.
  7026. (onPush): New function.
  7027. (onChoked): New function.
  7028. (onCanceled): New function.
  7029. (onAbortPiece): New function.
  7030. (PeerMessageHandle): New type definition.
  7031. * src/PeerMessage.cc
  7032. (PeerMessage): Added the initialization for invalidate and uploading.
  7033. * src/CancelMessage.h
  7034. (CancelMessage): Rewritten.
  7035. * src/RejectMessage.h
  7036. (RejectMessage): Rewritten.
  7037. * src/Metalinker.h
  7038. (operator=): Defined.
  7039. * src/MetaEntry.h
  7040. (operator=): Defined.
  7041. * src/MetalinkResource.h
  7042. (operator=): Defined.
  7043. * src/AllowedFastMessage.h
  7044. (AllowedFastMessage): Rewritten.
  7045. * src/HandshakeMessage.h
  7046. (HandshakeMessage): New function(overload).
  7047. * src/HandshakeMessage.cc
  7048. (HandshakeMessage): Rewritten.
  7049. (init): New function.
  7050. * src/HaveMessage.h
  7051. (HaveMessage): Rewritten.
  7052. * src/Time.h
  7053. (operator=): Defined the function body here.
  7054. * src/Time.cc
  7055. (operator=): Removed.
  7056. * src/SocketCore.h
  7057. (operator==): Defined here.
  7058. (operator!=): Defined here.
  7059. (operator<): Defined here.
  7060. * src/SocketCore.cc
  7061. (operator==): Removed.
  7062. (operator<): Removed.
  7063. * src/BitfieldMan.h
  7064. (operator=): Defined the function body here.
  7065. * src/BitfieldMan.cc
  7066. (operator=): Removed.
  7067. * src/TorrentMan.h
  7068. (deleteErrorPeer): Removed.
  7069. (deleteUnusedPeer); New function.
  7070. * src/TorrentMan.cc
  7071. (addPeer): Call deleteUnusedPeer.
  7072. (deleteErrorPeer): Removed.
  7073. (deleteUnusedPeer): New function.
  7074. * src/PeerAbstractCommand.h
  7075. (setNoCheck): New function.
  7076. (noCheck): New variable.
  7077. * src/PeerAbstractCommand.cc
  7078. (PeerAbstractCommand): Added the initialization of noCheck.
  7079. (execute): Added a check for noCheck.
  7080. (setNoCheck): New function.
  7081. * src/Util.h
  7082. (stdio.h): Included.
  7083. * src/Util.cc
  7084. (unistd.h): Included.
  7085. * src/DefaultDiskWriter.cc
  7086. (unistd.h): Included.
  7087. * src/Peer.h
  7088. (operator==): Defined the function body here.
  7089. (operator!=): Defined the function body here.
  7090. * src/Peer.cc
  7091. (operator==): Removed.
  7092. (operator!=): Removed.
  7093. * src/Piece.h
  7094. (Piece): Defined the function body here(copy constructor).
  7095. (operator=): Defined the function body here.
  7096. (operator==): Defined the function body here.
  7097. * src/Piece.cc
  7098. (Piece): Removed(copy constructor).
  7099. (operator=): Removed.
  7100. (operator==): Removed.
  7101. * src/PeerMessageUtil.h
  7102. (ChokeMessage.h): Removed.
  7103. (UnchokeMessage.h): Removed.
  7104. (InterestedMessage.h): Removed.
  7105. (NotInterestedMessage.h): Removed.
  7106. (HaveMessage.h): Removed.
  7107. (BitfieldMessage.h): Removed.
  7108. (RequestMessage.h): Removed.
  7109. (CancelMessage.h): Removed.
  7110. (PieceMessage.h): Removed.
  7111. (HandshakeMessage.h): Removed.
  7112. (KeepAliveMessage.h): Removed.
  7113. (PortMessage.h): Removed.
  7114. (HaveAllMessage.h): Removed.
  7115. (HaveNoneMessage.h): Removed.
  7116. (PeerConnection.h): Removed.
  7117. (HandshakeMessage.h): Included.
  7118. * src/BitfieldMessage.h
  7119. (init): New function.
  7120. (BitfieldMessage): Rewritten.
  7121. (BitfieldMessage): New function(overload).
  7122. * src/RequestSlot.h
  7123. (operator=): Defined the function body here.
  7124. (operator==): Defined the function body here.
  7125. * src/RequestSlot.cc
  7126. (operator=): Removed.
  7127. (operator==): Removed.
  7128. To remove the dependency on the PeerMessage subclass from
  7129. PeerInteraction:
  7130. * src/PeerMessageFactory.h: New class.
  7131. * src/PeerMessageFactory.cc: New class.
  7132. * src/SimplePeerMessage.cc
  7133. (send): If invalidate is true then do nothing.
  7134. * src/PeerInteractionCommand.cc
  7135. (HandshakeMessage.h): Included.
  7136. (KeepAliveMessage.h): Included.
  7137. (ChokeMessage.h): Included.
  7138. (UnchokeMessage.h): Included.
  7139. (HaveMessage.h): Included.
  7140. (executeInternal): Call setNoCheck().
  7141. Removed setWriteCheckSocket(socket).
  7142. * src/PeerInteraction.h
  7143. (ChokeMessage.h): Removed.
  7144. (UnchokeMessage.h): Removed.
  7145. (InterestedMessage.h): Removed.
  7146. (NotInterestedMessage.h): Removed.
  7147. (HaveMessage.h): Removed.
  7148. (BitfieldMessage.h): Removed.
  7149. (RequestMessage.h): Removed.
  7150. (CancelMessage.h): Removed.
  7151. (PieceMessage.h): Removed.
  7152. (HandshakeMessage.h): Removed.
  7153. (KeepAliveMessage.h): Removed.
  7154. (PortMessage.h): Removed.
  7155. (HaveAllMessage.h): Removed.
  7156. (HaveNoneMessage.h): Removed.
  7157. (RejectMessage.h): Removed.
  7158. (AllowedFastMessage.h): Removed.
  7159. (SuggestPieceMessage.h): Removed.
  7160. (PeerMessageFactory.h): Included.
  7161. (PeerMessageHandle): Removed typedef of PeerMessageHandle.
  7162. (HandshakeMessageHandle): Removed typedef of HandshakeMessageHandle.
  7163. (PeerMessageFactory): New variable.
  7164. (createPeerMessage): Removed.
  7165. (createHandshakeMessage): Removed.
  7166. (setPeerMessageCommonProperty): Removed.
  7167. (addRequestSlot): New function.
  7168. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  7169. (getPeerMessageFactory): New function.
  7170. (createRequestMessage): Removed.
  7171. (createCancelMessage): Removed.
  7172. (createPieceMessage): Removed.
  7173. (createHaveMessage): Removed.
  7174. (createChokeMessage): Removed.
  7175. (createUnchokeMessage): Removed.
  7176. (createInterestedMessage): Removed.
  7177. (createNotInterestedMessage): Removed.
  7178. (createBitfieldMessage): Removed.
  7179. (createKeepAliveMessage): Removed.
  7180. (createHaveAllMessage): Removed.
  7181. (createHaveNoneMessage): Removed.
  7182. (createRejectMessage): Removed.
  7183. (createAllowedFastMessage): Removed.
  7184. * src/PeerInteraction.cc
  7185. (PeerInteraction): Allocate PeerMessageFactory here.
  7186. (~PeerInteraction): Deallocate PeerMessageFactory here.
  7187. (sendMessages): Use msg->isUploading() instead of msg->getId() ==
  7188. PieceMessage::ID.
  7189. (addMessage): Simplified by using PeerMessage::onPush().
  7190. (addRequestSlot): New function.
  7191. (rejectAllPieceMessageInQueue): Simplified by using
  7192. PeerMessage::onChoked().
  7193. (rejectPieceMessageInQueue): Simplified by using
  7194. PeerMessage::onCanceled().
  7195. (abortPiece): Simplified by using PeerMessage::abortPiece().
  7196. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  7197. (createHandshakeMessage): Removed.
  7198. (createPeerMessage): Removed.
  7199. (sendHandshake): Call PeerMessageFactory::createHandshakeMessage().
  7200. (setPeerMessageCommonProperty): Removed.
  7201. (createRequestMessage): Removed.
  7202. (createCancelMessage): Removed.
  7203. (createPieceMessage): Removed.
  7204. (createHaveMessage): Removed.
  7205. (createChokeMessage): Removed.
  7206. (createUnchokeMessage): Removed.
  7207. (createInterestedMessage): Removed.
  7208. (createNotInterestedMessage): Removed.
  7209. (createBitfieldMessage): Removed.
  7210. (createKeepAliveMessage): Removed.
  7211. (createHaveAllMessage): Removed.
  7212. (createHaveNoneMessage): Removed.
  7213. (createRejectMessage): Removed.
  7214. (createAllowedFastMessage): Removed.
  7215. * src/PieceMessage.h
  7216. (createRejectMessage): New function.
  7217. (PieceMessage): Rewritten.
  7218. (onChoked): New function.
  7219. (onCanceled): New function.
  7220. * src/PieceMessage.cc
  7221. (send): If invalidate is true then do nothing, just return.
  7222. (createRejectMessage): New function.
  7223. (onChoked): New function.
  7224. (onCanceled): New function.
  7225. * src/RequestMessage.h
  7226. (RequestMessage): Rewritten.
  7227. (onPush): New function.
  7228. (onAbortPiece): New function.
  7229. * src/RequestMessage.cc
  7230. (onPush): New function.
  7231. (onAbortPiece): New function.
  7232. Update fd_set when a socket is added or deleted in order to improve
  7233. performance:
  7234. * src/DownloadEngine.h
  7235. (rfdset): New variable.
  7236. (wfdset): New variable.
  7237. (updateFdSet): New function.
  7238. * src/DownloadEngine.cc
  7239. (SetDescriptor::operator()): Use SockCmdMap::value_type.
  7240. (AccumulateActiveCommandUuid::operator()): Use SockCmdMap::value_type.
  7241. (waitData): Copy rfdset and wfdset.
  7242. (updateFdSet): New function.
  7243. (addSocket): Call updateFdSet.
  7244. (deleteSocket): Call updateFdSet.
  7245. 2006-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7246. To add the support for Metalink3.0 backward compatible links:
  7247. * src/Request.h
  7248. (SAFE_CHARS): Added '#'.
  7249. (METALINK_MARK): New definition.
  7250. * src/Request.cc
  7251. (parseUrl): Added the support for Metalink3.0 backward compatible
  7252. links.
  7253. etc
  7254. * src/PeerInteraction.cc
  7255. (MsgPushBack): Removed.
  7256. (sendMessages): Use STL copy and back_inserter.
  7257. (rejectAllPieceMessageInQueue): Use STL copy and back_inserter.
  7258. (rejectPieceMessageInQueue): Use STL copy and back_inserter.
  7259. * src/TorrentMan.h
  7260. (MAX_PEER_LIST_SIZE): Changed to 100 from 250.
  7261. 2006-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7262. * src/SharedHandle.h: New class.
  7263. To wrap Socket, Command, PeerMessage and Peer with SharedHandle:
  7264. * src/HttpResponseCommand.h
  7265. (HttpResponseCommand): Wrapped Socket.
  7266. * src/SocketCore.h
  7267. (operator==): New function.
  7268. (operator!=): New function.
  7269. (operator<): New function.
  7270. (getSockfd): New function.
  7271. (isOpen): New function.
  7272. (writeData): New function.
  7273. * src/SocketCore.cc
  7274. (operator==): New function.
  7275. (operator!=): New function.
  7276. (operator<): New function.
  7277. * src/AbstractCommand.h
  7278. (socket): Changed its type to SocketHandle.
  7279. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7280. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7281. (disableReadCheckSocket): New function.
  7282. (disableWriteCheckSocket): New function.
  7283. (readCheckTarget): Changed its type to SocketHandle.
  7284. (writeCheckTarget): Changed its type to SocketHandle.
  7285. (AbstractCommand): Replaced Socket with SocketHandle.
  7286. * src/AbstractCommand.cc
  7287. (AbstractCommand): Replaced Socket with SocketHandle.
  7288. (~AbstractCommand): Removed the deallocation for Socket object.
  7289. (disableReadCheckSocket): New function.
  7290. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7291. (disableWriteCheckSocket): New function.
  7292. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7293. * src/HttpDownloadCommand.cc
  7294. (DownloadCommand): Replaced Socket with SocketHandle.
  7295. * src/PeerAbstractCommand.h
  7296. (socket): Changed its type to SocketHandle.
  7297. (peer): Changed its type to PeerHandle.
  7298. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7299. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7300. (disableReadCheckSocket): New function.
  7301. (disableWriteCheckSocket): New function.
  7302. (readCheckTarget): Changed its type to SocketHandle.
  7303. (writeCheckTarget): Changed its type to SocketHandle.
  7304. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  7305. Replaced Peer with PeerHandle.
  7306. * src/HttpRequestCommand.cc
  7307. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7308. Use disableReadCheckSocket.
  7309. * src/PeerInitiateConnectionCommand.h
  7310. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7311. * src/PeerChokeCommand.cc
  7312. (UploadFaster::operator()): Replaced Peer with PeerHandle.
  7313. (DownloadFaster::operator()): Replaced Peer with PeerHandle.
  7314. (execute): Use PeerHandle.
  7315. * src/PeerConnection.h
  7316. (HandshakeMessage.h): Removed include of HandshakeMessage.h.
  7317. (socket): Changed its type to SocketHandle.
  7318. (PeerConnection): Replaced Socket with SocketHandle.
  7319. * src/PeerConnection.cc
  7320. (PeerConnection): Replaced Socket with SocketHandle.
  7321. * src/PeerInteractionCommand.h
  7322. (PeerInteractionCommand): Replaced socket with SocketHandle.
  7323. Replaced Peer with PeerHandle.
  7324. * src/PeerInteractionCommand.cc
  7325. (PeerInteractionCommand): Replaced Socket with SocketHandle.
  7326. Replaced Peer with PeerHandle.
  7327. (executeInternal): Use disableWriteCheckSocket.
  7328. Use HandshakeMessageHandle.
  7329. (receiveMessages): Use PeerMessageHandle.
  7330. (prepareForNextPeer): Use PeerHandle.
  7331. * src/HttpProxyRequestCommand.h
  7332. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7333. * src/HttpResponseCommand.cc
  7334. (HttpResponseCommand): Replaced Socket with SocketHandle.
  7335. * src/TorrentMan.cc
  7336. (nullPeer): Added external reference.
  7337. (~TorrentMan): Removed the deallocation of the elements of peers.
  7338. (addPeer): Rewritten.
  7339. (isPeerAvailable): Use nullPeer.
  7340. (deleteOldpeers): Replaced with deleteErrorPeer.
  7341. (deleteErrorPeer): New function.
  7342. (getPeer): Use PeerHandle and nullPeer.
  7343. (hasMissingPiece): Replaced Peer with PeerHandle.
  7344. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7345. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7346. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7347. (getMissingPiece): Replaced Peer with PeerHandle.
  7348. * src/FtpNegotiateCommand.cc
  7349. (FtpNegotiationCommand): Replaced Peer with PeerHandle.
  7350. (~FtpNegotiationCommand): Removed the deallocation of Sockets.
  7351. (recvGreeting): Use disableWriteCheckSocket.
  7352. (recvPasv): Removed the allocation of Socket.
  7353. Use disableReadCheckSocket.
  7354. (sendRestPasv): Use disableWriteCheckSocket.
  7355. (recvRetr): Changed assertion.
  7356. * src/PeerInteraction.h
  7357. (SharedHandle.h): Included SharedHandle.h.
  7358. (PeerMessageHandle): New type definition.
  7359. (HandshakeMessageHandle): New type definition.
  7360. (MessageQueue): Changed. Now its element is of type PeerMessageHandle.
  7361. (peer): Changed its type to PeerHandle.
  7362. (createHandshakeMessage): Replaced HandshakeMessage with
  7363. HandshakeMessageHandle.
  7364. (createPeerMessage): Replaced PeerMessageHandle with PeerMessage.
  7365. (PeerInteraction): Replaced Peer with PeerHandle.
  7366. Replaced Socket with SocketHandle.
  7367. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  7368. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  7369. (receiveHandshake): Replaced HandshakeMessage with
  7370. HandshakeMessageHandle.
  7371. * src/PeerInteraction.cc
  7372. (PeerInteraction): Replaced Peer with PeerHandle.
  7373. Replaced Socket with SocketHandle.
  7374. (~PeerInteraction): Removed the deallocation of the elements of
  7375. messageQueue.
  7376. (MsgPushBack::operator()): Replaced PeerMessage with PeerMessageHandle.
  7377. (isSendingMessageInProgress): Replaced PeerMessage with
  7378. PeerMessageHandle.
  7379. (sendMessages): Use PeerMessageHandle. Removed try-catch block.
  7380. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  7381. (rejectAllPieceMessageInQueue): Use PeerMessageHandle.
  7382. (rejectPieceMessageInQueue): Use PeerMessageHandle.
  7383. (abortPiece): Use PeerMessageHandle.
  7384. (receiveHandshake): Replaced HandshakeMessage with
  7385. HandshakeMessageHandle. Removed try-catch block.
  7386. (createHandshakeMessage): Replaced HandshakeMessage with
  7387. HandshakeMessageHandle.
  7388. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  7389. Removed try-catch block.
  7390. (createPeerMessage): Replaced PeerMessage with PeerMessageHandle.
  7391. * src/HttpProxyResponseCommand.cc
  7392. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7393. * src/FtpTunnelResponseCommand.h
  7394. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7395. * src/HttpConnection.cc
  7396. (HttpConnection): Replaced Socket with SocketHandle.
  7397. * src/PeerAbstractCommand.cc
  7398. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  7399. (~PeerAbstractCommand): Removed the deallocation of socket.
  7400. Use disableReadCheckSocket, disableWriteCheckSocket.
  7401. (disableReadCheckSocket): New function.
  7402. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7403. (disableWriteCheckSocket): New function.
  7404. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7405. * src/InitiateConnectionCommandFactory.h: Corrected indentation.
  7406. * src/FtpTunnelRequestCommand.cc
  7407. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7408. (~FtpTunnelRequestCommand): Corrected indentation.
  7409. * src/DownloadCommand.h
  7410. (DownloadCommand): Replaced Socket with SocketHandle.
  7411. * src/PeerListenCommand.cc
  7412. (PeerListenCommand): Removed the initialization of socket.
  7413. (~PeerListenCommand): Removed the deallocation of socket.
  7414. (bindPort): Use SocketHandle.
  7415. (execute): Use SocketHandle and PeerHandle.
  7416. * src/FtpDowndloadCommand.cc
  7417. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7418. (~FtpDownloadCommand): Removed the deallocation of ctrlSocket.
  7419. * src/main.cc
  7420. (main): Corrected indentation.
  7421. * src/HttpInitiateConnectionCommand.cc
  7422. (HttpInitiateConnectionCommand): Replaced Socket with SocketHandle.
  7423. (executeInternal): Removed the allocation of socket.
  7424. * src/HttpRequestCommand.h
  7425. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7426. * src/FtpNegotiationCommand.h
  7427. (dataSocket): Changed its type to SocketHandle.
  7428. (serverSocket): Changed its type to SocketHandle.
  7429. (FtpNegotiationCommand): Replaced Socket with SocketHandle.
  7430. * src/TorrentMan.h
  7431. (MAX_PEER_UPDATE): Removed.
  7432. (MAX_PEERS): New definition.
  7433. (Peers): The element is now of type PeerHandle.
  7434. (addPeer): Replaced Peer with PeerHandle. Removed 'duplicate' argument.
  7435. (getPeer): Replaced Peer with PeerHandle.
  7436. (deleteOldErrorPeers): Removed.
  7437. (deleteErrorPeer): New function.
  7438. (hasMissingPiece): Replaced Peer with PeerHandle.
  7439. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7440. (getMissingPiece): Replaced Peer with PeerHandle.
  7441. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7442. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7443. (addActivePeer): Replaced Peer with PeerHandle.
  7444. (deleteActivePeer): Replaced Peer with PeerHandle.
  7445. Added a check for the return value of find.
  7446. * src/FtpTunnelResponseCommand.cc
  7447. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7448. * src/FtpInitiateConnectionCommand.cc
  7449. (executeInternal): Removed the allocation of socket.
  7450. * src/DownloadEngine.h
  7451. (Sockets): An element is now of type SocketHandle.
  7452. (SockCmdMap): A key is of type SocketHandle, a value is of type int.
  7453. (CommandUuids): New type definition.
  7454. (rsockets): Changed its type to SockCmdMap.
  7455. (wsockets): Changed its type to SockCmdMap.
  7456. (addSocket): Rewritten.
  7457. (deleteSocket): Rewritten.
  7458. (addSocketForReadCheck): Rewritten.
  7459. (deleteSocketForReadCheck): Rewritten.
  7460. (addSocketForWriteCheck): Rewritten.
  7461. (deleteSocketForWriteCheck): Rewritten.
  7462. (PairFind): New template class.
  7463. * src/HttpDownloadCommand.h
  7464. (HttpDownloadCommand): Replaced Socket with SocketHandle.
  7465. * src/FtpConnection.cc
  7466. (FtpConnection): Replaced Socket with SocketHandle.
  7467. (sendPort): Removed the allocation of serverSocket. Removed try-catch
  7468. block.
  7469. * src/InitiateConnectionCommandFactory.cc
  7470. (DlAbortEx.h): Included DlAbortEx.h.
  7471. (createInitiateConnectionCommand): Throw exception if the protocol of
  7472. requested URI is not supported.
  7473. * src/Peer.cc
  7474. (nullPeer): Changed its type to PeerHandle.
  7475. (operator==): New function.
  7476. (operator!=): New function.
  7477. * src/Peer.h
  7478. (SharedHandle.h): Included SharedHandle.h.
  7479. (operator==): New function.
  7480. (operator!=): New function.
  7481. (Peer): Added the default constructor.
  7482. Use resetStatus() to initialize member variables.
  7483. (nullPeer): Removed.
  7484. * src/TrackerUpdateCommand.cc
  7485. (execute): Brushed up using SharedHandle. Replaced MAX_PEER_UPDATE
  7486. with MIN_PEERS.
  7487. * src/PeerListenCommand.h
  7488. (socket): Changed its type to SocketHandle.
  7489. * src/Command.h
  7490. (CommandUuid): New type definition.
  7491. (uuid): New variable.
  7492. (uuidGen): New variable.
  7493. (Command): Added the initialization of uuid.
  7494. (getUuid): New function.
  7495. * src/Socket.h
  7496. (Socket): Removed.
  7497. (SocketHandle): New type definition.
  7498. * src/DownloadEngine.h
  7499. (FindCommand): New function object.
  7500. (run): The portion of socket check was rewritten.
  7501. (SetDescriptor): New function object.
  7502. (AccumulateActiveCommandUuid): New function object.
  7503. (waitData): Rewritten.
  7504. (addSocket): Rewritten.
  7505. (deleteSocket): Rewritten.
  7506. (addSocketForReadCheck): Rewritten.
  7507. (addSocketForWriteCheck): Rewritten.
  7508. (deleteSocketForReadCheck): Rewritten.
  7509. (deleteSocketForWriteCheck): Rewritten.
  7510. * src/HttpProxyResponseCommand.h
  7511. (HttpProxyResponseCommand): Replaced Socket with SocketHandle.
  7512. * src/HttpConnection.h
  7513. (socket): Changed its type to SocketHandle.
  7514. (HttpConnection): Replaced Socket with SocketHandle.
  7515. * src/PeerInitiateConnectionCommand.cc
  7516. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7517. (executeInternal): Removed the allocation of socket.
  7518. (prepareForNextPeer): Use PeerHandle.
  7519. * src/PeerMessage.h
  7520. (peer): Changed its type to PeerHandle.
  7521. (getPeer): Replaced Peer with PeerHandle.
  7522. (setPeer): Replaced Peer with PeerHandle.
  7523. * src/DownloadCommand.cc
  7524. (DownloadCommand): Replaced Socket with SocketHandle.
  7525. * src/FtpConnection.h
  7526. (socket): Changed its type to SocketHandle.
  7527. (FtpConnection): Replaced Socket with SocketHandle.
  7528. (sendPort); Replaced Socket with SocketHandle.
  7529. * src/FtpDowndloadCommand.h
  7530. (ctrlSocket): Changed its type to SocketHandle.
  7531. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7532. * src/HttpProxyRequestCommand.cc
  7533. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7534. * src/FtpTunnelRequestCommand.h
  7535. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7536. etc
  7537. * src/PeerChokeCommand.h
  7538. (setAllPeerChoked): Removed.
  7539. (setAllPeerResetDelta): Removed.
  7540. * src/PeerChokeCommand.cc
  7541. (setAllPeerChoked): Removed.
  7542. (ChokePeer): New function object.
  7543. (setAllPeerResetDelta): Removed.
  7544. (ResetDelta): New function object.
  7545. (orderByDownloadRate): Fixed a bug: use DowloadFaster, not UploadFaster
  7546. (execute): Show download speed when the local node is a seeder.
  7547. setAllPeerChoked and setAllPeerResetDelta were rewritten
  7548. using STL.
  7549. * src/TrackerWatcherCommand.h
  7550. (MIN_PEERS): Removed.
  7551. * src/TorrentMan.cc
  7552. (getPeer): Replaced MAX_PEER_UPDATE with MIN_PEERS.
  7553. 2006-07-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7554. To fix the bug that .aria2 file is not saved if downloading is stopped
  7555. by the errors:it results that aria2 can not resume downloading:
  7556. * src/main.cc
  7557. (normalDownload): Added the call to save().
  7558. (main): Added the deletion of the elements in 'reserved'.
  7559. To fix log:
  7560. * src/PeerInteraction.cc
  7561. (receiveHandshake): Fixed log.
  7562. 2006-07-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7563. To improve download performance in BitTorrent:
  7564. * src/TorrentMan.cc
  7565. (getPeer): Check the number of connections. Return nullPeer if
  7566. it is greater than MAX_PEER_UPDATE.
  7567. This code was originally here, but was removed in 0.5.1.
  7568. 2006-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7569. To improve the conditional compilation:
  7570. * src/MultiDiskWriter.h:
  7571. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7572. * src/MultiDiskWriter.cc:
  7573. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7574. * src/Util.h:
  7575. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7576. Added ENABLE_BITTORRENT around computeFastSet().
  7577. * src/Util.cc:
  7578. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7579. Added ENABLE_BITTORRENT around computeFastSet().
  7580. * src/messageDigest.h:
  7581. Replaced ENABLE_BITTORRENT with ENABLE_SSL.
  7582. * src/ShaVisitor.h:
  7583. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7584. * src/ShaVisitor.cc:
  7585. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7586. * src/main.cc:
  7587. Added ENABLE_BITTORRENT around includes and blocks related to
  7588. BitTorrent.
  7589. Added ENABLE_MESSAGE_DIGEST to skip checksum checking when the message
  7590. digest support is not available.
  7591. * src/AbstractDiskWriter.h:
  7592. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7593. * src/AbstractDiskWriter.cc:
  7594. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7595. * src/MetalinkEntry.cc
  7596. (check): Added ENABLE_MESSAGE_DIGEST. Return true if the message digest
  7597. support is not available.
  7598. To add command-line options for Metalink:
  7599. * src/main.cc:
  7600. Added metalink-version, metalink-language, metalink-os,
  7601. follow-metalink.
  7602. To use EXIT_SUCCESS and EXIT_FAILURE with exit():
  7603. * src/main.cc: Use these definition.
  7604. * Release 0.6.0
  7605. 2006-07-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7606. To add Metalink support(http/ftp only):
  7607. * src/AbstractCommand.h
  7608. (tryReserved): New function.
  7609. * src/AbstractCommand.cc
  7610. (execute): Call tryReserved().
  7611. (tryReserved): New function.
  7612. * src/Request.h
  7613. (Requests): New type definition.
  7614. * src/SegmentMan.h
  7615. (reserved): New variable.
  7616. * src/Util.h
  7617. (fileChecksum): New function.
  7618. (toUpper): New function.
  7619. (toLower): New function.
  7620. * src/Util.cc
  7621. (messageDigest.h): Included.
  7622. (trim): Trim \r\n\t.
  7623. (fileChecksum): New function.
  7624. (toUpper): New function.
  7625. (toLower): New function.
  7626. * src/main.cc
  7627. (normalDownload): New function.
  7628. (main): Added 2 command-line options: metalink-file,
  7629. metalink-connection. Their usage has not been written yet.
  7630. * src/MetalinkProcessor.h: New class.
  7631. * src/Xml2MetalinkProcessor.h: New class.
  7632. * src/Xml2MetalinkProcessor.cc: New class.
  7633. * src/MetalinkEntry.h: New class.
  7634. * src/MetalinkEntry.cc: New class.
  7635. * src/MetalinkResource.h: New class.
  7636. * src/MetalinkResource.cc: New class.
  7637. To add md5 message digest checking:
  7638. * src/messageDigest.h: Rewritten.
  7639. * src/MultiDiskWriter.cc: Updated according to the changes in
  7640. messageDigest.h.
  7641. * src/ShaVisitor.cc: Updated according to the changes in
  7642. messageDigest.h.
  7643. * src/Util.cc: Updated according to the changes in messageDigest.h.
  7644. * src/AbstractDiskWriter.cc: Updated according to the changes in
  7645. messageDigest.h.
  7646. To fix a bug that causes segfault when the payload length in peer
  7647. message is less than 0:
  7648. * src/PeerConnection.cc:
  7649. (receiveMessage): Fixed the bug.
  7650. * src/PeerMessageUtil.cc
  7651. (checkLength): Throw an exception if length is less than or equals to
  7652. 0.
  7653. To add new interfaces to Base64 encoding/decoding:
  7654. * src/Base64.h
  7655. (part_encode): Changed the method signature.
  7656. (encode): New function(overload).
  7657. (decode): New function(overload).
  7658. * src/Base64.cc
  7659. (part_encode): Rewritten.
  7660. (encode): Rewritten.
  7661. (encode): New function(overload).
  7662. To prevent a peer to download same piece if there is an error in
  7663. checksum:
  7664. * src/PieceMessage.cc
  7665. (receivedAction): Call peerInteraction->abortPiece().
  7666. 2006-06-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7667. To fix the bug that causes same have message is sent many times to
  7668. a single peer.
  7669. * src/Time.cc
  7670. (isNewer): Use Util::difftv().
  7671. * src/Util.cc
  7672. (difftv): Added a cast to (long long int).
  7673. * src/TorrentMan.cc
  7674. (advertisePiece): Use push_front.
  7675. (getAdvertisedPieceIndexes): A performance improvement was made.
  7676. To fix the bug that sends tracker requests without a sleep interval
  7677. when the number of connections is less than 15.
  7678. * src/TrackerWatcherCommand.cc
  7679. (execute): Now the number of connections is not a factor to decide
  7680. whether or not a tracker request should be sent or not.
  7681. * src/Time.h
  7682. (setTimeInSec): New function.
  7683. * src/Time.cc
  7684. (setTimeInSec): New function.
  7685. etc.
  7686. * src/ChokeMessage.cc
  7687. (receivedAction): Removed peer->snubbing = false
  7688. * src/PeerConnection.h
  7689. (receiveHandshake): Updated doc.
  7690. * src/TorrentMan.h
  7691. (getAdvertisedPieceIndexes): Updated the method signature.
  7692. * src/TorrentMan.cc
  7693. (getAdvertisedPieceIndexes): Updated the method signature.
  7694. * src/Time.h
  7695. (getTimeInMicros): Added a cast to (long long int).
  7696. (getTimeInMillis): Added a cast to (long long int).
  7697. * Release 0.5.2
  7698. 2006-06-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7699. To make a listening socket non-block:
  7700. * src/SocketCore.h
  7701. (setNonBlockingMode): New function.
  7702. * src/SocketCore.cc
  7703. (setNonBlockingMode): New function.
  7704. (beginListen): Added a call to setNonBlockingMode().
  7705. (acceptConnection): Call setNonBlockingMode().
  7706. (setBlockingMode): Updated.
  7707. To handle tracker's NAT-checking:
  7708. * src/PeerConnection.cc
  7709. (receiveHandshake): 'msg' param is filled with received data and
  7710. its length is assigned to 'length' param, even if all handshake
  7711. message is not yet received.
  7712. * src/PeerInteractionCommand.cc
  7713. (executeInternal): Use peerInteraction->receiveHandshake(true) when
  7714. a new peer connects to localhost.
  7715. A call to peerInteraction->sendHandshake() was removed because
  7716. it is called from peerInteraction->receiveHandshake(true).
  7717. * src/PeerInteraction.h
  7718. (quickReplied): New variable.
  7719. (receiveHandshake): Added an argument.
  7720. * src/PeerInteraction.cc
  7721. (PeerInteraction): Added the initialization of quickReplied.
  7722. (receiveHandshake): Send handshake message as soon as the info hash
  7723. in a handshake message from a peer is correct.
  7724. To change the random part of peer id and key parameter:
  7725. * src/TorrentMan.h
  7726. (key): New variable.
  7727. * src/TorrentMan.cc
  7728. (setupInternal1): Use Util::randomAlpha() to generate random part
  7729. of peer id, which is now "-aria2-"+13 alphabet characters([A-Za-z]).
  7730. key is also generated by Util::randomAlpha() and it is now 8 character
  7731. long.
  7732. * src/Util.h
  7733. (randomAlpha): New function.
  7734. * src/Util.cc
  7735. (randomAlpha): New function.
  7736. * src/TrackerWatcherCommand.cc
  7737. (execute): In a tracker request: Use torrentMan->key as key parameter.
  7738. Added no_peer_id=1.
  7739. Set snubbing flag to false when a choke message is received from a
  7740. snubbed peer.
  7741. * src/ChokeMessage.cc
  7742. (receivedAction): Set snubbing flag to false.
  7743. 2006-06-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7744. * src/TorrentMan.cc (setupInternal1): Fixed peerId generation bug.
  7745. * src/SimpleLogger.h (writeHeader): New function.
  7746. * src/SimpleLogger.cc (writeHeader): New function.
  7747. (writeLog): Fixed the bug that causes segfaults if exception message
  7748. contains an unescaped "%" character.
  7749. * src/TrackerWatcherCommand.cc (execute): Added a short sleep
  7750. when a tracker request fails.
  7751. * src/Request.cc (parseUrl): Query string is now handled properly.
  7752. * Release 0.5.1
  7753. 2006-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7754. To add Time class which represents a specific instant in time and
  7755. its precision is microseconds. Time checking procedures were rewritten
  7756. using this object.
  7757. * src/Time.h: New class.
  7758. * src/Time.cc: New class.
  7759. * src/AbstractCommand.h
  7760. (updateCheckPoint): Removed.
  7761. (isTimeoutDetected): Removed.
  7762. (checkPoint): Changed the type to Time.
  7763. (timeout): New variable.
  7764. (setTimeout): New function.
  7765. * src/AbstractCommand.cc
  7766. (AbstractCommand): Removed the initialization of checkPoint.
  7767. Added the initialization of timeout.
  7768. (updateCheckPoint): Removed.
  7769. (isTimeoutDetected): Removed.
  7770. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  7771. * src/PeerChokeCommand.h
  7772. (checkPoint): Changed the type to Time.
  7773. * src/PeerChokeCommand.cc
  7774. (PeerChokeCommand): Removed the initialization of checkPoint.
  7775. (execute): Rewritten using Time object.
  7776. * src/TrackerWatcherCommand.h
  7777. (checkPoint): Changed the type to Time.
  7778. * src/TrackerWatcherCommand.cc
  7779. (TrackerWatcherCommand): Removed the initialization of checkPoint.
  7780. (execute): Rewritten.
  7781. * src/ConsoleDownloadEngine.h
  7782. (cp): Changed the type to Time.
  7783. (startup): Changed the type to Time.
  7784. * src/ConsoleDownloadEngine.cc
  7785. (initStatistics): Use cp.reset(), startup.reset().
  7786. (calculateStatistics): Rewritten using Time object.
  7787. * src/PeerAbstractCommand.h
  7788. (updateCheckPoint): Removed.
  7789. (isTimeoutDetected): Removed.
  7790. (checkPoint): Changed the type to Time.
  7791. * src/PeerAbstractCommand.cc
  7792. (PeerAbstractCommand): Removed the initialization of checkPoint.
  7793. (updateCheckPoint): Removed.
  7794. (isTimeoutDetected): Removed.
  7795. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  7796. * src/PeerInteractionCommand.cc
  7797. (PeerInteractionCommand): Removed the initializations of struct
  7798. timeval variables.
  7799. * src/PeerInteractionCommand.h
  7800. (keepAliveCheckPoint): Changed the type to Time.
  7801. (chokeCheckPoint): Changed the type to Time.
  7802. (freqCheckPoint): Changed the type to Time.
  7803. (haveCheckTime): Changed the type to Time.
  7804. * src/PeerInteractionCommand.cc
  7805. (executeInternal): Rewritten using Time object.
  7806. (detectMessageFlooding): Rewritten using Time object.
  7807. (checkLongTimePeerChoking): Rewritten using Time object.
  7808. (sendKeepAlive): Rewritten using Time object.
  7809. (checkHave): Rewritten using Time object.
  7810. * src/SleepCommand.h
  7811. (checkPoint): Changed the type to Time.
  7812. * src/SleepCommand.cc
  7813. (SleepCommand): Removed the initialization of checkPoint.
  7814. (execute): Rewritten using Time object.
  7815. * src/TorrentAutoSaveCommand.h
  7816. (checkPoint): Changed the type to Time.
  7817. * src/TorrentAutoSaveCommand.cc
  7818. (TorrentAutoSaveCommand): Removed the initialization of checkPoint.
  7819. (execute): Rewritten.
  7820. * src/DownloadCommand.h
  7821. (sw): Changed the type to Time.
  7822. * src/DownloadCommand.cc
  7823. (DownloadCommand): Removed the initialization of sw.
  7824. (executeInternal): Rewritten.
  7825. * src/RequestSlot.h
  7826. (dispatchedTime): Changed the type to Time.
  7827. * src/RequestSlot.cc
  7828. (RequestSlot): Removed the call to setDispatchedTime().
  7829. (setDispatchedTime): Rewirtten.
  7830. (isTimeout): Rewritten.
  7831. (getLatencyInMillis): Rewritten.
  7832. * src/TorrentDownloadEngine.h
  7833. (cp): Changed the type to Time[2].
  7834. (startup): Changed the type to Time.
  7835. * src/TorrentDownloadEngine.cc
  7836. (initStatistics): Rewritten.
  7837. (calculateStatistics): Rewritten.
  7838. * src/DownloadEngine.cc
  7839. (run): Rewritten.
  7840. To detect all attempts to connect to the tracker are failed:
  7841. * src/AbstractCommand.cc
  7842. (execute): Increment e->segmentMan->errors if a command aborted.
  7843. * src/SegmentMan.h
  7844. (errors): New variable.
  7845. * src/SegmentMan.cc
  7846. (SegmentMan): Added the initialization of errors.
  7847. (init): Added the initialization of errors.
  7848. * src/TrackerWatcherCommand.cc
  7849. (execute): If e->segmentMan->errors > 0 then assume that the tracker
  7850. request was failed.
  7851. To handle snubbed peers:
  7852. * src/PeerChokeCommand.cc
  7853. (optUnchokingPeer): Snubbed peers don't get unchoked.
  7854. (execute): Snubbed peers don't get unchoked.
  7855. * src/PeerInteraction.h
  7856. (REQUEST_TIME_OUT): Changed the value from 120 to 60.
  7857. * src/PeerInteraction.cc
  7858. (checkRequestSlot): A peer get marked as "snubbed" if it doesn't send
  7859. back the requested 16k block in 60 seconds.
  7860. * src/PieceMessage.cc
  7861. (receivedAction): A peer's snubbed state is cleard if it sends
  7862. the requested 16k block in 60 seconds.
  7863. * src/Peer.h
  7864. (snubbing): New variable.
  7865. * src/Peer.cc
  7866. (resetStatus): Added snubbed = false.
  7867. To fix the bug that causes have message is not sent:
  7868. * src/PeerInteractionCommand.cc
  7869. (~PeerInteractionCommand): Removed e->torrentMan->unadvertisePiece().
  7870. (FLOODING_CHECK_INTERVAL): New definition(temporal).
  7871. (detectMessageFlooding): Use FLOODING_CHECK_INTERVAL.
  7872. * src/TorrentMan.h
  7873. (HaveEntry): New class.
  7874. (advertisePiece): Rewritten.
  7875. (getAdvertisedPieceIndexes): Rewritten.
  7876. (Haves): Changed the type.
  7877. (getAdvertisedPieceIndexes): Added an argument.
  7878. Others:
  7879. * src/TorrentMan.h
  7880. (DEFAULT_ANNOUNCE_INTERVAL): Changed the value to 1800.
  7881. (DEFAULT_ANNOUNCE_MIN_INTERVAL): Changed the value to 1800.
  7882. * src/TorrentMan.cc
  7883. (getPeer): Don't check the number of connections here.
  7884. (setupInternal1): Changed peerId.
  7885. * src/PeerInteractionCommand.h
  7886. (KEEP_ALIVE_INTERVAL): New definition.
  7887. (sendKeepAlive): Use KEEP_ALIVE_INTERVAL.
  7888. * src/main.cc
  7889. (main): SA_ONESHOT was replaced with SA_RESETHAND.
  7890. * src/DownloadEngine.h: Removed unnecessary header includes.
  7891. 2006-05-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7892. To fix the bug that causes segfaults if a tracker returns a zero-length
  7893. list as "peers":
  7894. * src/TrackerUpdateCommand.cc
  7895. (execute): Added a check to see wether the type of peers is Data*.
  7896. 2006-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7897. * Release 0.5.0
  7898. To fix compile issue with gcc3:
  7899. * src/CancelMessage.h
  7900. (ID): Renamed as ID_t
  7901. (ID_t): New enum.
  7902. * src/RejectMessage.h
  7903. (ID): Renamed as ID_t
  7904. (ID_t): New enum.
  7905. * src/SuggestPieceMessage.h
  7906. (ID): Renamed as ID_t
  7907. (ID_t): New enum.
  7908. * src/AllowedFastMessage.h
  7909. (ID): Renamed as ID_t
  7910. (ID_t): New enum.
  7911. * src/PortMessage.h
  7912. (ID): Renamed as ID_t
  7913. (ID_t): New enum.
  7914. * src/HaveNoneMessage.h
  7915. (ID): Renamed as ID_t
  7916. (ID_t): New enum.
  7917. * src/KeepAliveMessage.h
  7918. (ID): Renamed as ID_t
  7919. (ID_t): New enum.
  7920. * src/HaveAllMessage.h
  7921. (ID): Renamed as ID_t
  7922. (ID_t): New enum.
  7923. * src/UnchokeMessage.h
  7924. (ID): Renamed as ID_t
  7925. (ID_t): New enum.
  7926. * src/BitfieldMessage.h
  7927. (ID): Renamed as ID_t
  7928. (ID_t): New enum.
  7929. * src/PieceMessage.h
  7930. (ID): Renamed as ID_t
  7931. (ID_t): New enum.
  7932. * src/RequestMessage.h
  7933. (ID): Renamed as ID_t
  7934. (ID_t): New enum.
  7935. * src/NotInterestedMessage.h
  7936. (ID): Renamed as ID_t
  7937. (ID_t): New enum.
  7938. * src/ChokeMessage.h
  7939. (ID): Renamed as ID_t
  7940. (ID_t): New enum.
  7941. * src/InterestedMessage.h
  7942. (ID): Renamed as ID_t
  7943. (ID_t): New enum.
  7944. * src/HaveMessage.h
  7945. (ID): Renamed as ID_t
  7946. (ID_t): New enum.
  7947. 2006-05-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7948. * src/PeerAbstractCommand.h
  7949. (beforeSocketCheck): Removed.
  7950. * src/PeerAbstractCommand.cc
  7951. Modified in order to call executeInternal() even if socket check
  7952. and upload limit check fail.
  7953. * src/PeerInteractionCommand.h
  7954. (keepAlive): Removed.
  7955. (sendKeepAlive): New function.
  7956. (checkHave): New function.
  7957. (beforeSocketCheck): Removed.
  7958. * src/PeerInteractionCommand.cc
  7959. (executeInternal): Use peerInteraction->checkRequestSlot(). Added
  7960. calls to checkHave() and sendKeepAlive().
  7961. (keepAlive): Renamed to sendKeepAlive().
  7962. (sendKeepAlive): New function.
  7963. (beforeSocketCheck): Removed.
  7964. (checkHave): New function.
  7965. * src/BitfieldMan.cc
  7966. (getMissingIndex): Don't call getMissingIndexRandomly() if max is 0.
  7967. (getMissingUnusedIndex): Don't call getMissingIndexRandomly() if max is
  7968. 0.
  7969. (getMissingIndex): Dont't call getMissingIndexRandomly() if max is 0.
  7970. * src/TorrentMan.h
  7971. (UsedPieces): Removed.
  7972. (Pieces): New type definition.
  7973. * src/Piece.h: Updated doc.
  7974. * src/Peer.h
  7975. (totalLength): Removed.
  7976. * src/Peer.cc
  7977. (updateLatency): Fixed the latency calculation.
  7978. * src/TorrentMan.cc
  7979. (addPeer): Call deleteOldErrorPeers() only if peers.size() is higher
  7980. than or equal to MAX_PEER_LIST_SIZE.
  7981. If duplicate is false and peer.size() >= MAX_PEER_LIST_SIZE,
  7982. then return false.
  7983. (deleteOldErrorPeers): Rewritten.
  7984. (deleteUsedPiece): Fixed the miss use of STL remove.
  7985. * src/PeerInteraction.h
  7986. (Pieces): Removed.
  7987. (deleteTimeoutRequestSlot): Removed.
  7988. (deleteCompletedRequestSlot): Removed.
  7989. (checkRequestSlot): New function.
  7990. * src/PeerInteraction.cc
  7991. (deleteTimeoutRequestSlot): Merged to checkRequestSlot().
  7992. (deleteCompletedRequestSlot): Merged to checkRequestSlot().
  7993. (checkRequestSlot): New function.
  7994. * src/DownloadEngine.cc
  7995. (run): Clear activeSockets before calling waitData().
  7996. (waitData): Removed a call to activeSockets.clear().
  7997. 2006-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7998. To attempt to handle EINTR:
  7999. * src/SocketCore.cc
  8000. (isReadable): Added EINTR handling.
  8001. (isWritable): Added EINTR handling.
  8002. To improve the performance:
  8003. * src/AbstractCommand.cc
  8004. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  8005. * src/PeerInteractionCommand.h
  8006. (receiveMessage): Renamed as receiveMessages().
  8007. (receiveMessages): New function.
  8008. * src/PeerInteractionCommand.cc
  8009. (executeInternal): receiveMessage loop is moved to new receiveMessages
  8010. () function. detectMessageFlooding() is moved here.
  8011. (detectMessageFlooding): Use Util::difftvsec() instead of Util::difftv
  8012. (). The flooding detection for have message is comment out.
  8013. (checkLongTimePeerChoking): Use Util::difftvsec() instead of
  8014. Util::difftv().
  8015. (receiveMessage): Renamed as receiveMessages().
  8016. (receiveMessages): New function.
  8017. (keepAlive): Use Util::difftvsec() instead of Util::difftv().
  8018. (beforeSocketCheck): Commented out checkLongTimePeerChoking().
  8019. * src/SleepCommand.cc
  8020. (execute): Use Util::difftvsec() instead of Util::difftv().
  8021. * src/BitfieldMan.h
  8022. (getNthBitIndex): New function.
  8023. (hasMissingPiece): New function.
  8024. (getAllMissingIndexes): New function.
  8025. * src/BitfieldMan.cc
  8026. (countSetBit): Rewritten.
  8027. (getNthBitIndex): New function.
  8028. (getMissingIndexRandomly): Rewritten.
  8029. (hasMissingPiece): New function.
  8030. (getAllMissingIndexes): New function.
  8031. * src/TorrentMan.cc
  8032. (hasMissingPiece): New function.
  8033. (deleteUsedPiece): Rewritten using STL.
  8034. * src/PeerInteraction.cc
  8035. (getNewPieceAndSendInterest): Use TorrentMan::hasMissingPiece(), which
  8036. is a little bit faster then TorrentMan::getMissingPieceIndex().
  8037. (addRequests): Updated the number of pending requests.
  8038. * src/PeerAbstractCommand.cc
  8039. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  8040. (execute): Returns true if TorrentMan::isHalt() is true.
  8041. Corrected the condition of upload limit checking.
  8042. * src/Util.h
  8043. (countBit): New function.
  8044. * src/Util.cc
  8045. (nbits): New variable.
  8046. (countBit): New function.
  8047. * src/DownloadEngine.h
  8048. (SockCmdMap): New type definition.
  8049. (waitData): Added an argument.
  8050. (addSocket): Added an argument.
  8051. (addSocketForReadCheck): Added an argument.
  8052. (addSocketForWriteCheck): Added an argument.
  8053. * src/DownloadEngine.cc
  8054. (run): Executes only commands whose sockets are ready to read or write.
  8055. All commands are executed in every 1 second.
  8056. (waitData): Calls select() again if it returned
  8057. EINTR.
  8058. (addSocket): Saves socket and command object pair to the map.
  8059. (deleteSocket): Deletes socket and command object pair from the map.
  8060. (addSocketForReadCheck): Added an argument.
  8061. (addSocketForWriteCheck): Added an argument.
  8062. * src/DownloadCommand.cc
  8063. (executeInternal): Use Util::difftvsec() instead of Util::difftv().
  8064. To send "event=stopped" to the tracker when the application finishes:
  8065. * src/PeerChokeCommand.h
  8066. (checkPoint): New variable.
  8067. * src/PeerChokeCommand.cc
  8068. (PeerChokeCommand): Added the initialization of checkPoint.
  8069. (execute): The interval check is now done by checkPoint, not
  8070. SleepCommand. Return true if TorrentMan::isHalt() is true.
  8071. * src/TorrentMan.h
  8072. (halt): New function.
  8073. (hasMissingPiece): New function.
  8074. (isHalt): New function.
  8075. (setHalt): New function.
  8076. * src/TorrentMan.cc
  8077. (TorrentMan): Added the initialization of halt.
  8078. * src/TorrentAutoSaveCommand.h
  8079. (checkPoint): New variable.
  8080. * src/PeerListenCommand.cc
  8081. (execute): Returns true if TorrentMan::isHalt() is true.
  8082. * src/main.cc
  8083. (setSignalHander): Added flags argument.
  8084. (torrentHandler): Just calls TorrentMan::setHalt(true) and returns.
  8085. (main): Set SA_ONESHOT flag of the signal hander of SIGINT and SIGTERM.
  8086. Removed printDownloadAbortMessage() after torrent downloading loop.
  8087. * src/TorrentAutoSaveCommand.cc
  8088. (TorrentAutoSaveCommand): Added the initialization of checkPoint.
  8089. (execute): Returns true if TorrentMan::isHalt() is true.
  8090. The interval check is now done by checkPoint, not SleepCommand.
  8091. * src/TrackerWatcherCommand.cc
  8092. (execute): If TorrentMan::isHalt(), then create a tracker request with
  8093. event=stopped.
  8094. * src/TrackerUpdateCommand.cc
  8095. (prepareForRetry): Do not use SleepCommand here.
  8096. (execute): Returns true if TorrentMan::isHalt() is true.
  8097. Others:
  8098. * src/TorrentMan.cc
  8099. (getMissingPieceIndex): Updated log message.
  8100. * src/PeerInteraction.cc
  8101. (createPeerMessag): Updated log message.
  8102. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8103. To add the ability to download several pieces in mix in a command and
  8104. increase the number of request slots according to request-cancel
  8105. latency:
  8106. * src/PeerInteractionCommand.cc
  8107. (executeInternal): The number of messages to be received at a time
  8108. is increased from 10 to 50.
  8109. * src/LogFactory
  8110. (getInstance): Added NullLogger.
  8111. * src/NullLogger.h: New class.
  8112. * src/BitfieldMan.h
  8113. (getMissingIndex): New function.
  8114. * src/BitfieldMan.cc
  8115. (getMissingIndex): New function.
  8116. * src/TorrentMan.h
  8117. (checkOutPiece): New function.
  8118. (getMissingPieceIndex): New function.
  8119. (getMissingFastPieceIndex): New function.
  8120. (getMissingFastPiece): New function.
  8121. * src/TorrentMan.cc
  8122. (updatePiece): Rewritten using STL.
  8123. (syncPiece): Rewritten using STL.
  8124. (getMissingPiece): Rewritten using getMissingPieceIndex() and
  8125. checkOutPiece().
  8126. (getMissingPieceIndex): New function.
  8127. (getMissingFastPieceIndex): New function.
  8128. (getMissingFastPiece): New function.
  8129. (checkOutPiece): New function.
  8130. * src/PeerInteraction.h
  8131. (Pieces): New type definition.
  8132. (piece): Removed.
  8133. (pieces): New variable.
  8134. (getNewPieceAndSendInterest): Added the "piece" argument.
  8135. (abortPiece): Added the "piece" argument.
  8136. (abortAllPieces): New function.
  8137. (isInRequestSlot): New function.
  8138. (hasDownloadPiece): Added the "index" argument.
  8139. (setDownloadPiece): Removed.
  8140. (getDownloadPiece): Added the "index" argument.
  8141. (updatePiece): New function.
  8142. (createRequestMessage): Added the "index" argument.
  8143. * src/PeerInteraction.cc
  8144. (onChoked): Rewritten.
  8145. (abortPiece): Rewirtten.
  8146. (abortAllPieces): New function.
  8147. (deleteTimeoutRequestSlot): Rewritten.
  8148. Clarified code a little bit.
  8149. (deleteCompletedRequestSlot): Rewritten.
  8150. (isInRequestSlot): New function.
  8151. (syncPiece): Rewritten.
  8152. (updatePiece): New function.
  8153. (getNewPieceAndSendInterest): Rewritten.
  8154. (addRequests): Rewritten.
  8155. (getDownloadPiece): Rewritten.
  8156. (hasDownloadPiece): Rewritten.
  8157. (createRequestMessage): Added the "index" argument.
  8158. * src/common.h
  8159. (BITFIELD_LEN_FROM_PIECES): Enclosed the variable in parentheses.
  8160. (DIV_FLOOR): New definition.
  8161. * src/PieceMessage.cc
  8162. (receivedAction): Update request-piece latency here.
  8163. * src/RequestSlot.h
  8164. (getLatencyInMillis): New function.
  8165. * src/RequestSlot.cc
  8166. (isTimeout): Rewritten using getLatencyInMillis.
  8167. (getLatencyInMillis): New function.
  8168. * src/Piece.h
  8169. (operator==): New function.
  8170. (getMissingBlockIndex): New function.
  8171. * src/Piece.cc
  8172. (operator==): New function.
  8173. (getMissingBlockIndex): New function.
  8174. * src/Peer.h
  8175. (DEFAULT_LATENCY): New definition.
  8176. (latency): New variable.
  8177. (updateLatency): New function.
  8178. (getLatency): New function.
  8179. * src/Peer.cc
  8180. (resetStatus): Reset latecy.
  8181. (updateLatency): New function.
  8182. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8183. * src/SocketCore.cc
  8184. (isReadable): Added secure to the condition.
  8185. * src/HttpConnection.cc
  8186. (receiveResponse): Fixed a bug that causes no response header
  8187. exception.
  8188. * src/Peer.h
  8189. (getFastSet): Fixed the return value type.
  8190. 2006-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8191. To remove a wait from download loop:
  8192. * src/DownloadEngine.cc
  8193. (run): Comment out shortSleep.
  8194. To rewrite the message handling:
  8195. * src/SimplePeerMessage.h: New class.
  8196. * src/SimplePeerMessage.cc: New class.
  8197. * src/CancelMessage.h: Derived from SimplePeerMessage.
  8198. (msg): New variable.
  8199. (create): New function.
  8200. (send): Removed.
  8201. (getMessage): New function.
  8202. (getMessageLength): New function.
  8203. * src/CancelMessage.cc
  8204. (create): New function.
  8205. (receivedAction): Replaced deleteRequestMessageInQueue with
  8206. rejectPieceMessageInQueue.
  8207. (send): Removed.
  8208. (getMessage): New function.
  8209. (getMessageLength): New function.
  8210. * src/BitfieldMessage.h: Derived from SimplePeerMessage.
  8211. (msg): New variable.
  8212. (msgLength): New variable.
  8213. (~BitfieldMessage): Deleted msg.
  8214. (send): Removed.
  8215. (getMessage): New function.
  8216. (getMessageLength): New function.
  8217. * src/BitfieldMessage.cc
  8218. (create): New function.
  8219. (send): Removed.
  8220. (getMessage): New function.
  8221. (getMessageLength): New function.
  8222. * src/ChokeMessage.h: Derived from SimplePeerMessage.
  8223. (msg): New variable.
  8224. (sendPredicate): New function.
  8225. (onSendComplete): New function.
  8226. (send): Removed.
  8227. (getMessage): New function.
  8228. (getMessageLength): New function.
  8229. (create): New function.
  8230. * src/ChokeMessage.cc
  8231. (create): New function.
  8232. (send): Removed.
  8233. (sendPredicate): New function.
  8234. (getMessage): New function.
  8235. (getMessageLength): New function.
  8236. (onSendComplete): New function.
  8237. * src/KeepAliveMessage.h: Derived from SimplePeerMessage.
  8238. (msg): New variable.
  8239. (send): Removed.
  8240. (getMessage): New function.
  8241. (getMessageLength): New function.
  8242. * src/KeepAliveMessage.cc
  8243. (send): Removed.
  8244. (getMessage): New function.
  8245. (getMessageLength): New function.
  8246. * src/PortMessage.h
  8247. (create): New function.
  8248. (receivedAction): Updated log message.
  8249. * src/PortMessage.cc: New file.
  8250. * src/UnchokeMessage.h: Derived from SimplePeerMessage.
  8251. (msg): New variable.
  8252. (sendPredicate): New function.
  8253. (onSendComplete): New function.
  8254. (create): New function.
  8255. (send): Removed.
  8256. (getMessage): New function.
  8257. (getMessageLength): New function.
  8258. * src/UnchokeMessage.cc
  8259. (create): New function.
  8260. (send): Removed.
  8261. (sendPredicate): New function.
  8262. (getMessage): New function.
  8263. (getMessageLength): New function.
  8264. (onSendComplete): New function.
  8265. * src/PieceMessage.h
  8266. (leftPieceDataLength): Removed.
  8267. (leftDataLength): New variable.
  8268. (headerSend): New variable.
  8269. (pendingCount): New variable.
  8270. (msgHeader): New variable.
  8271. (sendPieceData): New function.
  8272. (incrementPendingCount): New function.
  8273. (isPendingCountMax): New function.
  8274. (create): New function.
  8275. (getMessageHeader): New function.
  8276. (getMessageHeaderLength): New function.
  8277. * src/PieceMessage.cc
  8278. (create): New function.
  8279. (getMessageHeader): New function.
  8280. (getMessageHeaderLength): New function.
  8281. (send): Rewritten.
  8282. (sendPieceData): New function.
  8283. * src/HaveMessage.h: Derived from SimplePeerMessage.
  8284. (msg): New variable.
  8285. (create): New function.
  8286. (getMessage): New function.
  8287. (getMessageLength): New function.
  8288. * src/HaveMessage.cc
  8289. (create): New function.
  8290. (send): Removed.
  8291. (sendPieceData): New function.
  8292. (getMessage): New function.
  8293. (getMessageLength): New function.
  8294. * src/RequestMessage.h: Derived from SimplePeerMessage.
  8295. (msg): New variable.
  8296. (create): New function.
  8297. (send): Removed.
  8298. (getMessage): New function.
  8299. (getMessageLength): New function.
  8300. * src/RequestMessage.cc
  8301. (create): New function.
  8302. (receivedAction): Added the handling of fast extension.
  8303. Deleted torrentMan->addUploadLength, torrentMan->addDeltaUploadLength.
  8304. (send): Removed.
  8305. (getMessage): New function.
  8306. (getMessageLength): New function.
  8307. * src/InterestedMessage.h: Derived from SimplePeerMessage.
  8308. (msg): New variable.
  8309. (sendPredicate): New function.
  8310. (onSendComplete): New function.
  8311. (create): New function.
  8312. (getMessage): New function.
  8313. (getMessageLength): New function.
  8314. * src/InterestedMessage.cc
  8315. (create): New function.
  8316. (send): Removed.
  8317. (sendPieceData): New function.
  8318. (getMessage): New function.
  8319. (getMessageLength): New function.
  8320. (onSendComplete): New function.
  8321. * src/NotInterestedMessage.h: Derived from SimplePeerMessage.
  8322. (msg): New variable.
  8323. (sendPieceData): New function.
  8324. (onSendComplete): New function.
  8325. (create): New function.
  8326. (send): Removed.
  8327. (getMessage): New function.
  8328. (getMessageLength): New function.
  8329. * src/NotInterestedMessage.cc
  8330. (create): New function.
  8331. (send): Removed.
  8332. (sendPredicate): New function.
  8333. (getMessage): New function.
  8334. (getMessageLength): New function.
  8335. (onSendComplete): New function.
  8336. * src/AllowedFastMessage.h: New class.
  8337. * src/AllowedFastMessage.cc: New class.
  8338. * src/RejectMessage.h: New class.
  8339. * src/RejectMessage.cc: New class.
  8340. * src/SuggestPieceMessage.h: New class.
  8341. * src/SuggestPieceMessage.cc: New class.
  8342. * src/HaveAllMessage.h: New class.
  8343. * src/HaveAllMessage.cc: New class.
  8344. * src/HaveNoneMessage.h: New class.
  8345. * src/HaveNoneMessage.cc: New class.
  8346. * src/HandshakeMessage.h: Derived from SimplePeerMessage.
  8347. (msg): New variable.
  8348. (reserved): New variable.
  8349. (create): New function.
  8350. (getId): New function.
  8351. (receivedAction): New function.
  8352. (getMessage): New function.
  8353. (getMessageLength): New function.
  8354. (isFastExtensionSupported): New function.
  8355. * src/HandshakeMessage.cc
  8356. (HandshakeMessage): Moved here from HandshakeMessage.h.
  8357. (create): New function.
  8358. (getMessage): New function.
  8359. (getMessageLength): New function.
  8360. (toString): Added the output of reserved field.
  8361. (check): Added const qualifier.
  8362. (isFastExtensionSupported): New function.
  8363. * src/PeerMessageUtil.h
  8364. (createChokeMessage): Removed.
  8365. (createUnchokeMessage): Removed.
  8366. (createInterestedMessage): Removed.
  8367. (createNotInterestedMessage): Removed.
  8368. (createHaveMessage): Removed.
  8369. (createBitfieldMessage): Removed.
  8370. (createRequestMessage): Removed.
  8371. (createCancelMessage): Removed.
  8372. (createPieceMessage): Removed.
  8373. (createPortMessage): Removed.
  8374. (createChokeMessage): Removed.
  8375. (createUnchokeMessage): Removed.
  8376. (createInterestedMessage): Removed.
  8377. (createNotInterestedMessage): Removed.
  8378. (createHaveMessage): Removed.
  8379. (createBitfieldMessage): Removed.
  8380. (createRequestMessage): Removed.
  8381. (createCancelMessage): Removed.
  8382. (createPieceMessage): Removed.
  8383. (createKeepAliveMessage): Removed.
  8384. (createHandshakeMessage): Removed.
  8385. (setIntParam): New function.
  8386. (createPeerMessageString): New function.
  8387. * src/PeerMessageUtil.cc
  8388. (createChokeMessage): Removed.
  8389. (createUnchokeMessage): Removed.
  8390. (createInterestedMessage): Removed.
  8391. (createNotInterestedMessage): Removed.
  8392. (createHaveMessage): Removed.
  8393. (createBitfieldMessage): Removed.
  8394. (createRequestMessage): Removed.
  8395. (createCancelMessage): Removed.
  8396. (createPieceMessage): Removed.
  8397. (createPortMessage): Removed.
  8398. (createRequestMessage): Removed.
  8399. (createCancelMessage): Removed.
  8400. (createPieceMessage): Removed.
  8401. (createHaveMessage): Removed.
  8402. (createChokeMessage): Removed.
  8403. (createUnchokeMessage): Removed.
  8404. (createInterestedMessage): Removed.
  8405. (createNotInterestedMessage): Removed.
  8406. (createBitfieldMessage): Removed.
  8407. (createKeepAliveMessage): Removed.
  8408. (createHandshakeMessage): Removed.
  8409. (setIntParam): New function.
  8410. (createPeerMessageString): New function.
  8411. * src/PeerConnection.h
  8412. (peer): Removed.
  8413. (torrentMan): Removed.
  8414. (createNLengthMessage): Removed.
  8415. (setIntParam): Removed.
  8416. (writeOutgoingMessageLog): Removed all overloaded functions.
  8417. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8418. (sendMessage): New function.
  8419. (sendHandshake): Removed.
  8420. (sendKeepAlive): Removed.
  8421. (sendChoke): Removed.
  8422. (sendUnchoke): Removed.
  8423. (sendInterested): Removed.
  8424. (sendNotInterested): Removed.
  8425. (sendHave): Removed.
  8426. (sendBitfield): Removed.
  8427. (sendRequest): Removed.
  8428. (sendPiece): Removed.
  8429. (sendPieceHeader): Removed.
  8430. (sendPieceData): Removed.
  8431. (sendCancel): Removed.
  8432. (getPeer): Removed.
  8433. * src/PeerConnection.cc
  8434. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8435. (sendHandshake): Removed.
  8436. (sendKeepAlive): Removed.
  8437. (createNLengthMessage): Removed.
  8438. (setIntParam): Removed.
  8439. (writeOutgoingMessageLog): Removed all overloaded functions.
  8440. (sendChoke): Removed.
  8441. (sendUnchoke): Removed.
  8442. (sendInterested): Removed.
  8443. (sendNotInterested): Removed.
  8444. (sendHave): Removed.
  8445. (sendBitfield): Removed.
  8446. (sendRequest): Removed.
  8447. (sendPiece): Removed.
  8448. (sendPieceHeader): Removed.
  8449. (sendPieceData): Removed.
  8450. (sendMessage): New function.
  8451. (sendCancel): Removed.
  8452. * src/PeerInteractionCommand.cc
  8453. (PeerInteractionCommand): Call setUploadLimit.
  8454. (executeInternal): Call setUploadLimit.
  8455. Added the handling of "inProgress" state of handshake message.
  8456. Call sendBitfield() or sendAllowdFast() instead of deprecated
  8457. sendNow().
  8458. (keepAlive): Call addMessage and sendMessage instead of deprecated
  8459. sendNow().
  8460. (beforeSocketCheck): Call addMessage instead of deprecated trySendNow()
  8461. * src/TorrentMan.h
  8462. (PEER_ID_LENGTH): New definition.
  8463. (hasAllPieces): New function.
  8464. * src/TorrentMan.cc
  8465. (getMissingPiece): Added the handling of fast extension.
  8466. (cancelPiece): Call updatePiece().
  8467. (hasAllPieces): New function.
  8468. * src/PeerInteraction.h
  8469. (fastSet): New variable.
  8470. (getNewPieceAndSendInterest): Changed the return type to void.
  8471. (send): Renamed as sendMessages.
  8472. (deleteAllRequestSlot): Removed.
  8473. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8474. (cancelAllRequest): Removed all overloaded functions.
  8475. (deleteAllRequestSlot): Removed.
  8476. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8477. (rejectPieceMessageInQueue): New function.
  8478. (rejectAllPieceMessageInQueue): New function.
  8479. (onChoked): New function.
  8480. (isSendingMessageInProgress): New function.
  8481. (getCorrespondingRequestSlot): Changed its arguments.
  8482. (isInFastSet): New function.
  8483. (addFastSetIndex): New function.
  8484. (addRequests): New function.
  8485. (sendNow): Removed.
  8486. (trySendNow): Removed.
  8487. (sendBitfield): New function.
  8488. (sendAllowdFast): New function.
  8489. (createHaveAllMessage): New function.
  8490. (createHaveNoneMessage): New function.
  8491. (createRejectMessage): New function.
  8492. (createAllowedFastMessage): New function.
  8493. * src/PeerInteraction.cc
  8494. (send): Renamed as sendMessages.
  8495. (sendMessages): New function.
  8496. (MsgPushBack): New class.
  8497. (isSendingMessageInProgress): New function.
  8498. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8499. (rejectAllPieceMessageInQueue): New function.
  8500. Added the handling of fast extension.
  8501. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8502. (rejectPieceMessageInQueue): New function.
  8503. Added the handling of fast extension.
  8504. (deleteRequestSlot): Replaced for loop with std::find.
  8505. (onChoked): New function.
  8506. (deleteAllRequestSlot): Removed.
  8507. (abortPiece): Rewirtten.
  8508. (deleteTimeoutRequestSlot): Updated log messages.
  8509. (getCorrespondingRequestSlot): Changed its arguments.
  8510. (cancelAllRequest): Removed all overloaded functions.
  8511. (receiveHandshake): Added the check to see whether an incoming peer
  8512. supports fast extension.
  8513. (createHandshakeMessage): Use HandshakeMessage::create instead of
  8514. PeerMessageUtil.
  8515. (createPeerMessage): Use create() of each message class instead of
  8516. PeerMessageUtil.
  8517. HaveAllMessage, HaveNoneMessage, RejectMessage, SuggestPieceMessage,
  8518. AllowedFastMessage were added.
  8519. (getNewPieceAndSendInterest): Changed its return value type to void.
  8520. Added the handling of fast extension.
  8521. (addRequests): New function.
  8522. (sendNow): Removed.
  8523. (sendHandshake): Rewritten.
  8524. (trySendNow): Removed.
  8525. (sendBitfield): New function.
  8526. (sendAllowdFast): New function.
  8527. (isInFastSet): New function.
  8528. (addFastSetIndex): New function.
  8529. (createRequestMessage): Use RequestMessage::create instead of
  8530. PeerMessageUtil.
  8531. (createCancelMessage): Use CancelMessage::create instead of
  8532. PeerMessageUtil.
  8533. (createPieceMessage): Use PieceMessage::create instead of
  8534. PeerMessageUtil.
  8535. (createHaveMessage): Use HaveMessage::create instead of
  8536. PeerMessageUtil.
  8537. (createChokeMessage): Use ChokeMessage::create instead of
  8538. PeerMessageUtil.
  8539. (createUnchokeMessage): Use UnchokeMessage::create instead of
  8540. PeerMessageUtil.
  8541. (createInterestedMessage): Use InterestedMessage::create instead of
  8542. PeerMessageUtil.
  8543. (createNotInterestedMessage): Use NotInterestedMessage::create instead
  8544. of PeerMessageUtil.
  8545. (createBitfieldMessage): Use BitfieldMessage::create instead of
  8546. PeerMessageUtil.
  8547. (createKeepAliveMessage): Use KeepAliveMessage::create instead of
  8548. PeerMessageUtil.
  8549. (createHaveAllMessage): New function.
  8550. (createHaveNoneMessage): New function.
  8551. (createRejectMessage): New function.
  8552. (createAllowedFastMessage: New function.
  8553. * src/Util.h
  8554. (sha1Sum): New function.
  8555. (computeFastSet): New function.
  8556. * src/Util.cc
  8557. (sha1Sum): New function.
  8558. (computeFastSet): New function.
  8559. * src/Peer.h
  8560. (fastExtensionEnabled): New variable.
  8561. (fastSet): New variable.
  8562. (setAllBitfield): New function.
  8563. (setFastExtensionEnabled): New function.
  8564. (isFastExtensionEnabled): New function.
  8565. (addFastSetIndex): New function.
  8566. (getFastSet): New function.
  8567. (isInFastSet): New function.
  8568. (countFastSet): New function.
  8569. * src/Peer.cc
  8570. (isInFastSet): New function.
  8571. (addFastSetIndex): New function.
  8572. (setAllBitfield): New function.
  8573. * src/AbstractCommand.cc (execute): Changed the procedure of checking
  8574. sockets.
  8575. * src/PeerAbstractCommand.cc
  8576. (PeerAbstractCommand): Added the initialization for uploadLimitCheck
  8577. and uploadLimit.
  8578. (execute): Changed the procedure of checking sockets. The upload speed
  8579. checking were added.
  8580. (setUploadLimit): New function.
  8581. (setUploadLimitCheck): New function.
  8582. * src/PeerAbstractCommand.h
  8583. (setUploadLimit): New function.
  8584. (setUploadLimitCheck): New function.
  8585. (uploadLimit): New variable.
  8586. (uploadLimitCheck): New variable.
  8587. To contact a tracker regularly:
  8588. * src/TrackerWatcherCommand.h (interval): New variable.
  8589. (checkPoint): New variable.
  8590. (TrackerWatcherCommand): Added interval argument.
  8591. * src/TrackerWatcherCommand.cc
  8592. (TrackerWatcherCommand): Initialized checkPoint.
  8593. (execute): Now a tracker is contacted in every specified period.
  8594. If peer list is not needed, send request with numwant=0.
  8595. * src/TrackerUpdateCommand.cc
  8596. (execute): Updated log messages.
  8597. * src/DownloadEngine.cc
  8598. (~DownloadEngine): Removed two asserts.
  8599. (waitData): Uncommented wfds. May be a bug fix.
  8600. 2006-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8601. * src/PeerInteractionCommand.h
  8602. (checkInactiveConnection): Removed.
  8603. * src/PeerInteractionCommand.cc
  8604. (executeInternal): Removed following function calls:
  8605. detectMessageFlooding(), checkLongTimePeerChoking and
  8606. checkInactiveConnection().
  8607. (checkInactiveConnection): Removed.
  8608. (detectMessageFlooding): Removed function call to
  8609. checkInactiveConnection().
  8610. * src/PeerMessageUtil.h
  8611. (createChokeMessage): New function. Overload.
  8612. (createUnchokeMessage): New function. Overload.
  8613. (createInterestedMessage): New function. Overload.
  8614. (createNotInterestedMessage): New function. Overload.
  8615. (createHaveMessage): New function. Overload.
  8616. (createBitfieldMessage): New function. Overload.
  8617. (createRequestMessage): New function. Overload.
  8618. (createCancelMessage): New function. Overload.
  8619. (createPieceMessage): New function. Overload.
  8620. (createKeepAliveMessage): New function. Overload.
  8621. * src/PeerMessageUtil.cc
  8622. (createChokeMessage): New function. Overload.
  8623. (createUnchokeMessage): New function. Overload.
  8624. (createInterestedMessage): New function. Overload.
  8625. (createNotInterestedMessage): New function. Overload.
  8626. (createHaveMessage): New function. Overload.
  8627. (createBitfieldMessage): New function. Overload.
  8628. (createRequestMessage): New function. Overload.
  8629. (createCancelMessage): New function. Overload.
  8630. (createPieceMessage): New function. Overload.
  8631. (createKeepAliveMessage): New function. Overload.
  8632. * src/SendMessageQueue.cc
  8633. (createRequestMessage): Use PeerMessageUtil.
  8634. (createCancelMessage): Use PeerMessageUtil.
  8635. (createPieceMessage): Use PeerMessageUtil.
  8636. (createHaveMessage): Use PeerMessageUtil.
  8637. (createChokeMessage): Use PeerMessageUtil.
  8638. (createUnchokeMessage): Use PeerMessageUtil.
  8639. (createInterestedMessage): Use PeerMessageUtil.
  8640. (createNotInterestedMessage): Use PeerMessageUtil.
  8641. (createBitfieldMessage): Use PeerMessageUtil.
  8642. (createKeepAliveMessage): Use PeerMessageUtil.
  8643. * src/SendMessageQueue.h: Renamed to PeerInteraction.h
  8644. * src/SendMessageQueue.cc: Renamed to PeerInteraction.cc
  8645. * src/PeerInteraction.h: New class.
  8646. * src/PeerInteraction.cc: New class.
  8647. 2006-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8648. Each peer message has its own class.
  8649. * src/PendingMessages.h: Removed.
  8650. * src/PendingMessages.cc: Removed. The sending process was moved to
  8651. each message class.
  8652. * src/RequestSlotMan.h: Removed.
  8653. * src/RequestSlotMan.cc: Removed. All functionarities were moved to
  8654. SendMessageQueue.
  8655. * src/RequestMessage.h: New class.
  8656. * src/RequestMessage.cc: New class.
  8657. * src/CancelMessage.h: New class.
  8658. * src/CancelMessage.cc: New class.
  8659. * src/BitfieldMessage.h: New class.
  8660. * src/BitfieldMessage.cc: New class.
  8661. * src/ChokeMessage.h: New class.
  8662. * src/ChokeMessage.cc: New class.
  8663. * src/KeepAliveMessage.h: New class.
  8664. * src/KeepAliveMessage.cc: New class.
  8665. * src/PortMessage.h: New class.
  8666. * src/UnchokeMessage.h: New class.
  8667. * src/UnchokeMessage.cc: New class.
  8668. * src/PieceMessage.h: New class.
  8669. * src/PieceMessage.cc: New class.
  8670. * src/HaveMessage.h: New class.
  8671. * src/HaveMessage.cc: New class.
  8672. * src/BitfieldMessage.h: New class.
  8673. * src/BitfieldMessage.cc: New class.
  8674. * src/NotInterestedMessage.h: New class.
  8675. * src/NotInterestedMessage.cc: New class.
  8676. * src/InterestedMessage.h: New class.
  8677. * src/InterestedMessage.cc: New class.
  8678. * src/HandshakeMessage.h (sendMessageQueue): New variable.
  8679. (getSendMessageQueue): New function.
  8680. (setSendMessageQueue): New function.
  8681. * src/HandshakeMessage.cc: New class.
  8682. * src/PeerConnection.h (receiveMessage): Changed return value and
  8683. arguments.
  8684. (receiveHandshake): Changed return value and arguments.
  8685. * src/PeerConnection.cc (receiveMessage): Do not create message class
  8686. here.
  8687. (receiveHandshake): Do not create handshake class here.
  8688. * src/PeerInteractionCommand.h (peerConnection): Removed.
  8689. (piece): Removed.
  8690. (syncPiece): Removed.
  8691. (sendInterest): Removed.
  8692. (sendMessages): Removed.
  8693. (createRequestPendingMessage): Removed.
  8694. (checkPieceHash): Removed.
  8695. (erasePieceOnDisk): Removed.
  8696. (getNewPieceAndSendInterest): Removed.
  8697. (onGotNewPice): Removed.
  8698. (onGotWrongPiece): Removed.
  8699. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  8700. Removed peerConnection, piece.
  8701. (~PeerInteractionCommand): Removed peerConnection.
  8702. (executeInternal): Use sendMessageQueue instead of peerConnection.
  8703. (syncPiece): Moved to SendMessageQueue.
  8704. (decideChoking): Removed PendingMessage.
  8705. (receiveMessage): Use sendMessageQueue instead of peerConnection.
  8706. The action after receiving peer message was moved to each message
  8707. class.
  8708. (onGotNewPice): Moved to SendMessageQueue.
  8709. (onGotWrongPiece): Moved to SendMessageQueue.
  8710. (getNewPieceAndSendInterest): Moved to SendMessageQueue.
  8711. (sendInterest): Moved to SendMessageQueue.
  8712. (createRequestPendingMessage): Removed.
  8713. (sendMessages): Moved to SendMessageQueue.
  8714. (onAbort): Use SendMessageQueue::abortPiece()
  8715. (keepAlive): Use sendMessageQueue instead of peerConnection.
  8716. (beforeSocketCheck): Use sendMessageQueue instead of peerConnection.
  8717. (checkPieceHash): Moved to SendMessageQueue.
  8718. (erasePieceOnDisk): Moved to SendMessageQueue.
  8719. * src/PeerMessageUtil.h
  8720. (createBitfieldMessage): Removed.
  8721. (createHaveMessage): Changed return value and arguments.
  8722. (createBitfieldMessage): Changed return value and arguments.
  8723. (createRequestCancelMessage): Removed.
  8724. (createPieceMessage): Changed return value and arguments.
  8725. (getShortIntParam): New function.
  8726. (checkIndex): Changed arguments.
  8727. (checkBegin): Changed arguments.
  8728. (checkLength): Changed arguments.
  8729. (checkPieceOffset): Removed.
  8730. (checkRange): New function.
  8731. (checkBitfield): Changed arguments.
  8732. (createPeerMessage): Removed.
  8733. (checkIntegrity): Removed.
  8734. (createHandshakeMessage): Changed arguments.
  8735. (createChokeMessage): New function.
  8736. (createUnchokeMessage): New function.
  8737. (createInterestedMessage): New function.
  8738. (createNotInterestedMessage): New function.
  8739. (createRequestMessage): New function.
  8740. (createCancelMessage): New function.
  8741. (createPortMessage): New function.
  8742. * src/PeerMessageUtil.cc
  8743. (createBitfieldMessage): Removed.
  8744. (createHaveMessage): Changed return value and arguments.
  8745. (createBitfieldMessage): Changed return value and arguments.
  8746. (createRequestCancelMessage): Removed.
  8747. (createPieceMessage): Changed return value and arguments.
  8748. (getShortIntParam): New function.
  8749. (checkIndex): Changed arguments.
  8750. (checkBegin): Changed arguments.
  8751. (checkLength): Changed arguments.
  8752. (checkPieceOffset): Removed.
  8753. (checkRange): New function.
  8754. (checkBitfield): Changed arguments.
  8755. (createPeerMessage): Removed.
  8756. (checkIntegrity): Removed.
  8757. (createHandshakeMessage): Changed arguments.
  8758. (createChokeMessage): New function.
  8759. (createUnchokeMessage): New function.
  8760. (createInterestedMessage): New function.
  8761. (createNotInterestedMessage): New function.
  8762. (createRequestMessage): New function.
  8763. (createCancelMessage): New function.
  8764. (createPortMessage): New function.
  8765. * src/PeerMessage.h
  8766. (id): Removed.
  8767. (index): Removed.
  8768. (begin): Removed.
  8769. (length): Removed.
  8770. (bitfield): Removed.
  8771. (bitfieldLength): Removed.
  8772. (block): Removed.
  8773. (blockLength): Removed.
  8774. (inProgress): New variable.
  8775. (cuid): New variable.
  8776. (peer): New variable.
  8777. (sendMessageQueue): New variable.
  8778. (logger): New variable.
  8779. (setBitfield): Removed.
  8780. (getBitfield): Removed.
  8781. (setBlock): Removed.
  8782. (getBlock): Removed.
  8783. (getBitfieldLength): Removed.
  8784. (getBlockLength): Removed.
  8785. (isInProgress): New function.
  8786. (toString): Made pure virtual.
  8787. (check): New function.
  8788. (send): New function.
  8789. (receivedAction): New function.
  8790. (getId): Made pure virtual.
  8791. (setId): Removed.
  8792. (getIndex): Removed.
  8793. (setIndex): Removed.
  8794. (getBegin): Removed.
  8795. (setBegin): Removed.
  8796. (getLength): Removed.
  8797. (setLength): Removed.
  8798. (getCuid): New function.
  8799. (setCuid): New function.
  8800. (getPeer): New function.
  8801. (setPeer): New function.
  8802. (getSendMessageQueue): New function.
  8803. (setSendMessageQueue): New function.
  8804. (ID): Removed.
  8805. * src/PeerMessage.cc
  8806. (setBitfield): Removed.
  8807. (setBlock): Removed.
  8808. (toString): Removed.
  8809. * src/TorrentMan.h
  8810. (getPieceLength): New function.
  8811. (getPieceLength): New function.
  8812. * src/SendMessageQueue.h
  8813. (REQUEST_TIME_OUT): New definition.
  8814. (RequestSlots): New definition.
  8815. (MessageQueue): New definition.
  8816. (requestSlotMan): Removed.
  8817. (pendingMessages): Removed.
  8818. (requestSlots): New variable.
  8819. (messageQueue): New variable.
  8820. (torrentMan): New variable.
  8821. (peerConnection): New variable.
  8822. (peer): New variable.
  8823. (piece): New variable.
  8824. (getNewPieceAndSendInterest): New function.
  8825. (createPeerMessage): New function.
  8826. (createHandshakeMessage): New function.
  8827. (send): Made private.
  8828. (setPeerMessageCommonProperty): New function.
  8829. (deleteAllRequestSlot): New function.
  8830. (deleteRequestMessageInQueue): New function.
  8831. (cancelAllRequest): Made private.
  8832. (cancelAllRequest): Made private.
  8833. (countRequestSlot): Made private.
  8834. (addPendingMessage): Removed.
  8835. (deletePendingPieceMessage): Removed.
  8836. (deletePendingRequestMessage): Removed.
  8837. (addMessage): New function.
  8838. (deletePieceMessageInQueue): New function.
  8839. (deleteTimeoutRequestSlot): Changed argument.
  8840. (deleteCompletedRequestSlot): Changed argument.
  8841. (getCorrespoindingRequestSlot): Renamed to getCorrespondingRequestSlot.
  8842. (getCorrespondingRequestSlot): New function.
  8843. (countPendingMessage): Removed.
  8844. (countMessageInQueue): New function.
  8845. (getTorrentMan): New function.
  8846. (getPeerConnection): New function.
  8847. (hasDownloadPiece): New function.
  8848. (getDownloadPiece): New function.
  8849. (setDownloadPiece): New function.
  8850. (syncPiece): New function.
  8851. (sendMessages): New function.
  8852. (sendNow): New function.
  8853. (trySendNow): New function.
  8854. (abortPiece): New function.
  8855. (sendHandshake): New function.
  8856. (receiveMessage): New function.
  8857. (receiveHandshake): New function.
  8858. (createRequestMessage): New function.
  8859. (createCancelMessage): New function.
  8860. (createPieceMessage): New function.
  8861. (createHaveMessage): New function.
  8862. (createChokeMessage): New function.
  8863. (createUnchokeMessage): New function.
  8864. (createInterestedMessage): New function.
  8865. (createNotInterestedMessage): New function.
  8866. (createBitfieldMessage): New function.
  8867. (createKeepAliveMessage): New function.
  8868. * src/SendMessageQueue.cc
  8869. (SendMessageQueue): Removed requestSlotMan.
  8870. Instantiated peerConnection here.
  8871. (~SendMessageQueue): Removed requestSlotMan.
  8872. Added deletion of peerConnection and the contents of messageQueue.
  8873. (send): Updated according to the change of messageQueue.
  8874. (addPendingMessage): Renamed to addMessage.
  8875. (addMessage): New function.
  8876. (deletePendingPieceMessage): Renamed to deletePieceMessageInQueue.
  8877. (deletePieceMessageInQueue): New function.
  8878. (deletePendingRequestMessage): Renamed to deleteRequestMessageInQueue.
  8879. (deleteRequestMessageInQueue): New function.
  8880. (deleteRequestSlot): RequestSlotMan::deleteRequestSlot(...) was moved
  8881. here.
  8882. (deleteTimeoutRequestSlot): RequestSlotMan::deleteTimeoutRequestSlot
  8883. (...) was moved here.
  8884. (deleteAllRequestSlot): RequestSlotMan::deleteAllRequestSlot(...) was
  8885. moved here.
  8886. (deleteCompletedRequestSlot):
  8887. RequestSlotMan::deleteCompletedRequestSlot(...) was moved here.
  8888. (getCorrespondingRequestSlot):
  8889. RequestSlotMan::getCorrespoindingRequestSlot(...) was moved here.
  8890. And renamed to getCorrespondingRequestSlot, correcting a typo.
  8891. (countPendingMessage): Renamed to countMessageInQueue.
  8892. (countMessageInQueue): New function.
  8893. (countRequestSlot): RequestSlotMan::countRequestSlot() was moved here.
  8894. (receiveHandshake): New function.
  8895. (createHandshakeMessage): New function.
  8896. (receiveMessage): New function.
  8897. (createPeerMessage): New function.
  8898. (syncPiece): New function.
  8899. (getNewPieceAndSendInterest): New function.
  8900. (sendMessages): New function.
  8901. (sendNow): New function.
  8902. (trySendNow): New function.
  8903. (sendHandshake): New function.
  8904. (abortPiece): New function.
  8905. (getDownloadPiece): New function.
  8906. (getPeerMessageCommonProperty): New function.
  8907. (createRequestMessage): New function.
  8908. (createCancelMessage): New function.
  8909. (createPieceMessage): New function.
  8910. (createHaveMessage): New function.
  8911. (createChokeMessage): New function.
  8912. (createUnchokeMessage): New function.
  8913. (createInterestedMessage): New function.
  8914. (createNotInterestedMessage): New function.
  8915. (createBitfieldMessage): New function.
  8916. (createKeepAliveMessage): New function.
  8917. To add simple Content-Disposition support:
  8918. * src/HttpResponseCommand.h (determinFilename): New function.
  8919. * src/HttpResponseCommand.cc (executeInternal):
  8920. Use determinFilename(headers) instead of req->getFile() when comparing
  8921. filename.
  8922. (determinFilename): New function.
  8923. (handleDefaultEncoding): Use determinFilename(headers) instead of
  8924. req->getFile().
  8925. (handleOtherEncoding): Use determinFilename(headers) instead of
  8926. req->getFile().
  8927. * src/Util.h (getContentDispositionFilename): New function.
  8928. * src/Util.cc (getContentDispositionFilename): New function.
  8929. * src/LogFactory.h (release): New function.
  8930. * src/LogFactory.cc (release): New function.
  8931. To fix a bug that causes out-of-bound exception when HTTP status
  8932. line is wrong:
  8933. * src/HttpConnection.cc (receiveResponse): Added a check for header
  8934. size.
  8935. * src/common.h (Deleter): New class.
  8936. * src/SegmentMan.cc
  8937. (~SegmentMan): Added deletion of splitter and diskWriter.
  8938. * src/DownloadEngine.h
  8939. (Commands): Use deque.
  8940. (clearQueue): New function.
  8941. * src/DownloadEngine.cc
  8942. (~DownloadEngine): Added deletion of segmentMan.
  8943. (cleanQueue): New function.
  8944. * src/TorrentDownloadEngine.h
  8945. (TorrentDownloadEngine): The implementation was moved to
  8946. TorrentDownloadEngine.cc.
  8947. (~TorrentDownloadEngine): The implementation was moved to
  8948. TorrentDownloadEngine.cc.
  8949. * src/TorrentDownloadEngine.cc
  8950. (~TorrentDownloadEngine): Added deletion of torrentMan.
  8951. * src/main.cc
  8952. (clearRequest): Removed.
  8953. (handler): Added deletion of e.
  8954. (torrentHandler): Added deletion of te.
  8955. (main): Do not share splitter.
  8956. Use Deleter instead of clearRequest.
  8957. Deletion of classes were updated.
  8958. 2006-05-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8959. * src/main.cc (main): Fixed typo.
  8960. * src/message.h: Fixed typo.
  8961. * po/de.po: Added German translation, thanks to Hermann J. Beckers.
  8962. 2006-04-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8963. To add --select-file command-line option:
  8964. * src/Util.cc
  8965. (unfoldRange): New function.
  8966. (getNum): New function.
  8967. (unfoldSubRange): New function
  8968. * src/main.cc
  8969. (showUsage): Added help message.
  8970. (main): Added --select-file command-line option. Updated the layout of
  8971. file listing.
  8972. * src/common.h
  8973. (Integers): New definition.
  8974. * src/SocketCore.cc
  8975. (writeData): Removed timeout argument.
  8976. (readData): Removed timeout argument.
  8977. (peekData): Removed timeout argument.
  8978. * src/Socket.cc
  8979. (writeData): Removed timeout argument.
  8980. (readData): Removed timeout argument.
  8981. (peekData): Removed timeout argument.
  8982. * Release 0.4.1
  8983. 2006-04-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8984. To deploy upload rate based choking algorithm:
  8985. * src/PeerInteractionCommand.cc
  8986. (PeerInteractionCommand): Add peer to TorrentMan::activePeers to track
  8987. peer currently used.
  8988. (decideChoking): Deleted the choke/unchoke decision algorithm when
  8989. download completes. Simplified.
  8990. (receiveMessage): Updated.
  8991. * src/TorrentMan.h
  8992. (activePeers): New variable.
  8993. (addActivePeer): New function.
  8994. (getActivePeers): New function.
  8995. (deleteActivePeer): New function.
  8996. * src/TorrentMan.cc
  8997. (addPeer): deleteOldErrorPeers is moved to the begining of the function
  8998. * src/PeerAbstractCommand.cc
  8999. (onAbort): Use peer->resetStatus().
  9000. * src/main.cc
  9001. (PeerChokeCommand.h): Included.
  9002. (main): Added the instance of ChokingCommand to the command queue.
  9003. * src/Peer.h
  9004. (amChoking): Renamed from amChocking
  9005. (chokingRequired): New variable.
  9006. (optUnchoking): New variable.
  9007. (deltaUpload): New variable.
  9008. (deltaDownload): New variable.
  9009. (addDeltaUpload): New function.
  9010. (resetDeltaUpload): New function.
  9011. (addDeltaDownload): New function.
  9012. (resetDeltaDownload): New function.
  9013. (addPeerUpload): Added a call to addDeltaUpload.
  9014. (addPeerDownload): Added a call to addDeltaDownload.
  9015. * src/Peer.cc
  9016. (shouldBeChoking): Renamed from shouldChoke.
  9017. (resetStatus): New function.
  9018. * src/PeerChokeCommand.h: New class.
  9019. * src/PeerChokeCommand.cc: New class.
  9020. To add lazy upload speed limiter:
  9021. * src/TorrentConsoleDownloadEngine.h: Moved the variables for
  9022. statistics calculation to TorrentDownloadEngine.
  9023. * src/TorrentConsoleDownloadEngine.cc
  9024. (sendStatistics): Renamed from printStatistics.
  9025. (initStatistics): Removed. Moved to TorrentDownloadEngine.
  9026. (calculateSpeed): Removed. Moved to TorrentDownloadEngine.
  9027. (calculateStatistics): Removed. Moved to TorrentDownloadEngine.
  9028. * src/TorrentDownloadEngine.h: Added the variables for statistics
  9029. calculation.
  9030. (sendStatistics): New function as pure virtual function.
  9031. (getUploadSpeed): New function.
  9032. * src/TorrentDownloadEngine.cc
  9033. (initStatistics): New function.
  9034. (calculateSpeed): New function.
  9035. (calculateStatistics): New function.
  9036. * src/SendMessageQueue.h
  9037. (uploadLength): New variable.
  9038. (send): Added an argument.
  9039. (setUploadLimit): New function.
  9040. (getUploadLimit): New function.
  9041. * src/SendMessageQueue.cc
  9042. (send): Added upload speed limiter.
  9043. * src/prefs.h
  9044. (PREF_UPLOAD_LIMIT): New definition.
  9045. * src/PeerInteractionCommand.cc
  9046. (PeerInteractionCommand): Set upload speed limit to sendMessageQueue.
  9047. * src/main.cc
  9048. (main): Added --upload-limit option
  9049. For bug fixes:
  9050. * src/main.cc
  9051. (showUsage): Corrected --listen-port help
  9052. Other changes:
  9053. * src/TorrentMan.cc
  9054. (getPeer): Return nullPeer if connection is grather than
  9055. MAX_PEER_UPDATE(15) in order to leave space for incoming peers.
  9056. 2006-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9057. To add some useful information to the exception message:
  9058. * src/SocketCore.cc : Updated messages.
  9059. * src/SegmentMan.cc :
  9060. * src/TorrentMan.cc : Updated messages.
  9061. * src/MultiDiskWriter.cc : Updated messages.
  9062. * src/Util.cc : Updated messages.
  9063. * src/AbstractDiskWriter.cc : Updated messages.
  9064. * src/PreAllocationDiskWriter.cc : Updated messages.
  9065. * src/message.cc : Added new messages. Updated some messages.
  9066. * src/TrackerWatcherCommand.h (MIN_PEERS): New definition.
  9067. * src/TrackerWatcherCommand.cc (execute): Use MIN_PEERS.
  9068. Updated threshold from 30 to 15.
  9069. * src/AbstractDiskWriter.h (filename): New variable.
  9070. * src/AbstractDiskWriter.cc (openExistingFile): Assigned filename.
  9071. (createFile): Assigned filename.
  9072. * src/main.cc: Updated the help message for http-auth-scheme.
  9073. * Release 0.4.0
  9074. 2006-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9075. To add TrackerUpdateCommand with which replaces
  9076. CompactTrackerResponseProcessor:
  9077. * src/TrackerWatcherCommand.h (req): Removed.
  9078. * src/TrackerWatcherCommand.cc (execute): Send a request to tracker
  9079. if the number of peer connections are less than 30.
  9080. * src/ByteArrayDiskWriter.h (readData): Implemented.
  9081. * src/SegmentMan.h (diskWriter): New function.
  9082. * src/SegmentMan.cc (init): Added a call to diskWriter->closeFile()
  9083. * src/main.cc : Removed #include "CompactTrackerResponseProcessor.h"
  9084. (main): Use TrackerUpdateCommand.
  9085. * src/TorrentMan.h (CompactTrackerResponseProcessor): Removed.
  9086. (req): New variable.
  9087. (setTrackerResponseProcessor): Removed.
  9088. (getTrackerResponseProcessor): Removed.
  9089. (processTrackerResponse): Removed.
  9090. * src/DownloadEngine.h (diskWriter): Removed.
  9091. * src/TorrentDownloadEngine.cc (afterEachIteration): Removed a call
  9092. to torrentMan->processTrackerResponse().
  9093. To add Util::expandBuffer:
  9094. * src/ByteArrayDiskWriter.h (expandBuffer): Removed.
  9095. * src/ByteArrayDiskWriter.cc (writeData): Use Util::expandBuffer().
  9096. * src/Util.h (expandBuffer): New function.
  9097. To fix the bug that causes segmentation fault when "-l ." is specified
  9098. in command-line option:
  9099. * src/SimpleLogger.h (SimpleLogger): Removed "filename" argument.
  9100. (openFile): New function.
  9101. (closeFile): New function.
  9102. * src/SimpleLogger.cc (SimpleLogger): Removed fopen.
  9103. (~SimpleLogger): Call closeFile();
  9104. * src/LogFactory.cc (getInstance): Added a call to slogger->openFile().
  9105. * src/main.cc (main): Added a check to see logger is configured
  9106. properly.
  9107. To enable HTTP authentication without specifying "--http-auth-scheme"
  9108. * src/prefs.h (PREF_HTTP_AUTH_ENABLED): New definition.
  9109. * src/HttpConnection.cc (createRequest): Send Authorization header
  9110. if PREF_HTTP_AUTH_ENABLED == V_TRUE.
  9111. * src/main.cc (main): Preset PREF_HTTP_AUTH_SCHEME to V_TRUE
  9112. If "--http-user" is specified, set PREF_HTTP_AUTH_ENABLED to V_TRUE
  9113. * src/Peer.cc (shouldChoke): Updated algorithm.
  9114. * src/message.h (EX_AUTH_FAILED): New definition.
  9115. (EX_FILE_OPEN): New definition.
  9116. * src/HttpResponseCommand.cc (checkResponse): Throw DlAbortEx
  9117. if status == 401.
  9118. (handleDefaultEncoding): Added a call to diskWriter->initAndOpenFile()
  9119. if req->isTorrent == true.
  9120. * src/main.cc (handler): Removed the check to see e->diskWriter != NULL
  9121. (torrentHandler): Removed the check to see diskAdaptor != NULL.
  9122. * src/AbstractDiskWriter.cc (openExistingFile): Updated messsage.
  9123. (createFile): Updated message.
  9124. 2006-04-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9125. To add a readout of estimated remaining time to normal HTTP/FTP
  9126. downloads:
  9127. * src/ConsoleDownloadEngine.h (startup): New variable.
  9128. (startupLength): New variable.
  9129. (isStartupLengthSet): New variable.
  9130. (avgSpeed): New variable.
  9131. (eta): New variable.
  9132. * src/ConsoleDownloadEngine.cc (sendStatistics): Added a readout of
  9133. estimated remaining time.
  9134. (initStatistics): Initialized newly added variables.
  9135. (calculateStatistics): Calculate average speed and estimated remaining
  9136. time.
  9137. To decouple TorrentDownloadEngine from HttpResponseCommand:
  9138. * src/TrackerDownloadCommand.h: Removed.
  9139. * src/TrackerDownloadCommand.cc: Removed.
  9140. * src/TrackerInitCommand.h: Removed.
  9141. * src/TrackerInitCommand.cc: Removed.
  9142. * src/TrackerUpdateCommand.h: Removed.
  9143. * src/TrackerUpdateCommand.cc: Removed.
  9144. * src/TrackerWatcherCommand.cc (execute): The construction of request
  9145. url written in TrackerInitCommand was moved here. Do not create
  9146. tracker request command if torrentMan->trackers != 0.
  9147. * src/CompactTrackerResponseProcessor.h: New class.
  9148. * src/CompactTrackerResponseProcessor.cc: New class.
  9149. * src/message.h (MSG_TRACKER_WARNING_MESSAGE): Updated.
  9150. * src/HttpResponseCommand.cc (createHttpDownloadCommand):
  9151. Decoupled TorrentDownloadEngine from this.
  9152. * src/SegmentMan.h (init): New function.
  9153. * src/SegmentMan.cc (init): New function.
  9154. * src/TorrentMan.h (responseProcessor): New variable.
  9155. (trackers): New variable.
  9156. (setTrackerResponseProcessor): New function.
  9157. (getTrackerResponseProcessor): New function.
  9158. (processTrackerResponse): New function.
  9159. * src/TorrentMan.cc (Constructor): Initialized new variable trackers.
  9160. (processTrackerResponse): New function.
  9161. * src/main.cc (main): Use ByteArrayDiskWriter and
  9162. CompactTrackerResponseProcessor.
  9163. * src/TorrentDownloadEngine.cc (afterEachIteration): Call torrentMan->
  9164. processTrackerResponse().
  9165. * src/TorrentConsoleDownloadEngine.cc (printStatistics): Updated a
  9166. readout.
  9167. * src/TorrentDownloadEngine.cc (afterEachIteration): Added log message
  9168. which indicates download has completed.
  9169. * src/AbstractDiskWriter.cc (Destructor): fd >= 0, not fd >0
  9170. (closeFile): fd >= 0, not fd > 0
  9171. * src/main.cc (main): Added short cut for show-files.
  9172. Added short cut for torrent-file.
  9173. Added new command-line option listen-port.
  9174. Updated i18n messages.
  9175. 2006-04-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9176. To add LogFactory which creates singleton logger:
  9177. * src/LogFactory.h: New class.
  9178. * src/LogFactory.cc: New class.
  9179. * src/Command.h (logger): New variable.
  9180. (Constructor): Use LogFactory.
  9181. * src/AbstractCommand.cc: Use Command::logger
  9182. * src/PeerConnection.cc (Constructor): Deleted the argument logger.
  9183. Use LogFactory.
  9184. * src/SegmentSplitter.h : Made logger protected.
  9185. * src/SegmentSplitter.cc (Constructor): Use LogFactory.
  9186. * src/SegmentMan.cc (Constructor): Use LogFactory.
  9187. * src/DownloadEngine.h : Made logger protected.
  9188. * src/DownloadEngine.cc (Constructor): Use LogFactory.
  9189. * src/PeerInteractionCommand.cc : Use Command::logger.
  9190. * src/HttpResponseCommand.cc : Use Command::logger.
  9191. * src/SegmentMan.h : Made logger private.
  9192. * src/TorrentMan.h : Made logger private.
  9193. * src/TorrentMan.cc : Use LogFactory.
  9194. * src/FtpNegotiateCommand.cc : Use Command::logger.
  9195. * src/HttpConnection.h (Constructor): Deleted the argument logger.
  9196. * src/HttpConnection.cc (Constructor): Deleted the argument logger.
  9197. Use LogFactory.
  9198. * src/FtpConnection.h (Constructor): Deleted the argument logger.
  9199. * src/FtpConnection.cc (Constructor): Deleted the argument logger.
  9200. Use LogFactory.
  9201. * src/DownloadCommand.cc : Use Command::logger.
  9202. * src/PeerAbstractCommand.cc : Use Command::logger.
  9203. * src/PeerListenCommand.cc : Use Command::logger.
  9204. * src/PeerInitiateConnectionCommand.cc : Use Command::logger.
  9205. * src/HttpInitiateConnectionCommand.cc : Use Command::logger.
  9206. * src/FtpInitiateConnectionCommand.cc : Use Command::logger.
  9207. * src/TrackerWatcherCommand.cc : Use Command::logger.
  9208. * src/TrackerUpdateCommand.cc : Use Command::logger.
  9209. * src/TrackerDownloadCommand.cc : Use Command::logger.
  9210. * src/RequestSlotMan.cc (Constructor): Deleted the argument logger.
  9211. Use LogFactory.
  9212. * src/SendMessageQueue.h (Constructor): Deleted the argument logger.
  9213. * src/SendMessageQueue.cc (Constructor): Deleted the argument logger.
  9214. Use LogFactory.
  9215. * src/main.cc (main): Use LogFactory.
  9216. * src/DiskAdaptor.h (logger): New variable.
  9217. * src/DiskAdaptor.cc (Constructor): Use LogFactory.
  9218. * src/CopyDiskAdaptor.cc (fixFilename): Added a log message.
  9219. 2006-04-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9220. * src/TrackerInitCommand.cc (TrackerInitCommand): Added a "key"
  9221. parameter to a tracker request.
  9222. * src/TorrentMan.cc (readFileEntryFromMetaInfoFile): Bug fix.
  9223. * src/TrackerWatcherCommand.cc (execute): Call req->resetTryCount().
  9224. * src/main.cc (setSignalHander): New function.
  9225. (main): Added a handler for SIGTERM.
  9226. (handler): Updated message.
  9227. (torrentHandler): Updated message.
  9228. 2006-04-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9229. * src/TorrentConsoleDownloadEngine.cc
  9230. (onPartialDownloadingCompletes): Renamed as
  9231. onSelectiveDownloadingCompletes.
  9232. (onSelectiveDownloadingCompletes): Updated message.
  9233. To add DiskAdaptor which abstract DiskWriter family:
  9234. * src/PeerConnection.cc: Use diskAdaptor instead of diskWriter.
  9235. * src/PeerInteractionCommand.cc: Use diskAdaptor instead of diskWriter.
  9236. * src/BitfieldMan.cc (isAllBitSet): bug fix.
  9237. * src/TorrentMan.cc : Included CopyDiskAdaptor.h, DirectDiskAdaptor.h,
  9238. MultiDiskAdaptor.h.
  9239. (readFileEntry): Changed its arguments.
  9240. (setup): setupDiskWriter is merged into this function.
  9241. (setupDiskWriter): Removed.
  9242. (setFileFilter): New function.
  9243. (readFileEntryFromMetaInfoFile): Updated according to the changes
  9244. made in readFileEntry.
  9245. (getFilePath): Removed.
  9246. (getTempFilePath): Removed.
  9247. (getSegmentFilePath): Updated due to the removal of getFilePath.
  9248. (fixFilename): Removed.
  9249. (copySingleFile): Removed.
  9250. (splitMultiFile): Removed.
  9251. (deleteTempFile): Removed.
  9252. (setFileEntriesToDownload): Removed.
  9253. (isPartialDownloadingMode): Renamed as isSelectiveDownloadingMode.
  9254. (isSelectiveDownloadingMode): New function.
  9255. (setAllMultiFileRequestedState): Removed.
  9256. (finishPartialDownloadingMode): Renamed as
  9257. finishSelectiveDownloadingMode.
  9258. (finishSelectiveDownloadingMode): New function.
  9259. (getPartialTotalLength): Renamed as getSelectedTotalLength.
  9260. (getSelectedTotalLength): New function.
  9261. (onDownloadComplete): Use diskAdaptor.
  9262. * src/MultiDiskWriter.cc (Constructor): Added the argument pieceLength
  9263. (Range): Removed.
  9264. (setMultiFileEntries): Renamed as setFileEntries.
  9265. (setFileEntries): New function.
  9266. * src/MultiDiskWriter.h [DiskWriterEntry](enabled): Removed.
  9267. (pieceLength): New variable.
  9268. * src/main.cc (printDownloadCompeleteMessage): New function.
  9269. (torrentHandler): Use diskAdaptor instead of diskWriter.
  9270. (main): Renamed torrent-show-files to show-files.
  9271. Rewritten file contents listing.
  9272. * src/TorrentMan.h (FileEntry): Removed.
  9273. (multiFileTopDir): Removed.
  9274. (multiFileEntries): Removed.
  9275. (diskWriter): Removed.
  9276. (diskAdaptor): New variable.
  9277. * src/DefaultDiskWriter.h (totalLength): New variable.
  9278. * src/DefaultDiskWriter.cc (initAndOpenFile): Added ftruncate.
  9279. * src/TorrentDownloadEngine.cc (onEndOfRun): Use diskAdaptor instead of
  9280. diskWriter.
  9281. * src/TorrentConsoleDownloadEngine.h
  9282. (partialDownloadLengthDiff): Renamed as selectedDownloadLengthDiff.
  9283. (partialTotalLength): Renamed as selectedTotalLength.
  9284. * src/AbstractDiskWriter.cc (openFile): If file exists, call
  9285. openExistingFile, otherwise call initAndOpenFile.
  9286. (closeFile): fd > 0, not fd != 0.
  9287. * src/DirectDiskAdaptor.h: New class.
  9288. * src/DirectDiskAdaptor.cc: New class.
  9289. * src/MultiDiskAdaptor.h: New class.
  9290. * src/MultiDiskAdaptor.cc: New class.
  9291. * src/CopyDiskAdaptor.h: New class.
  9292. * src/CopyDiskAdaptor.cc: New class.
  9293. * src/DiskAdaptor.h: New class.
  9294. * src/DiskAdaptor.cc: New class.
  9295. * src/prefs.h (PREF_TORRENT_SHOW_FILES): Renamed as PREF_SHOW_FILES
  9296. (PREF_SHOW_FILES): New definition.
  9297. 2006-04-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9298. To add the ability to download multi torrent into respective files
  9299. directly:
  9300. * src/DiskWriter.h (openFile): New function.
  9301. (seek): Removed.
  9302. * src/MultiDiskWriter.h: New class.
  9303. * src/MultiDiskWriter.cc: New class.
  9304. * src/AbstractDiskWriter.h (seek): Changed its scope from public to
  9305. protected.
  9306. (openFile): New function.
  9307. * src/AbstractDiskWriter.cc (openFile): New function.
  9308. * src/prefs.h (V_FALSE): New definition.
  9309. (PREF_DIRECT_FILE_MAPPING): New definition.
  9310. * src/TorrentMan.h (setupDiskWriter): New function.
  9311. (setAllMultiFileRequestedState): New function.
  9312. (onDownloadComplete): New function.
  9313. * src/TorrentMan.cc : Included MultiDiskWriter.h
  9314. (setupDiskWriter): New function.
  9315. (getFilePath): Updated.
  9316. (getTempFilePath): Updated.
  9317. (getSegmentFilePath): Updated.
  9318. (fixFilename): Updated.
  9319. (deleteTempFile): Updated.
  9320. (setAllMultiFileRequestedState): New function.
  9321. (setFileEntriesToDownload): Use setAllMultiFileRequestedState().
  9322. (finishPartialDownloadingMode): Reset requested flags.
  9323. (onDownloadComplete): New function.
  9324. * src/main.cc: Added --direct-file-mapping option.
  9325. Use TorrentMan::setupDiskWriter().
  9326. * src/TorrentDownloadEngine.cc (afterEachIteration): Use TorrentMan::
  9327. onDownloadComplete().
  9328. To fix ETA bug:
  9329. * src/Util.h (difftvsec): New function.
  9330. * src/Util.cc (difftvsec): New function.
  9331. * src/TorrentConsoleDownloadEngine.cc (calculateSpeed): Use int for the
  9332. type of "elapsed" instead of long long int.
  9333. (calculateStatistics): Use Util::difftvsec instead of Util::difftv.
  9334. The updates of statistics takes place every 1 seconds.
  9335. * src/TorrentConsoleDownloadEngine.h (lastElapsed): Changed its type.
  9336. (calculateSpeed): Changed its argument signature.
  9337. * src/PeerMessage.cc (toString): Fixed message.
  9338. 2006-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9339. To print ETA:
  9340. * src/TorrentDownloadEngine.cc (afterEachIteration): Added download
  9341. completion handling when dealing with
  9342. TorrentMan::isPartialDownloadingMode() == true.
  9343. * src/TorrentDownloadEngine.h (onPartialDownloadingCompletes):
  9344. New function.
  9345. * src/TorrentConsoleDownloadEngine.h (startup): New variable.
  9346. (sessionDownloadLength): New variable.
  9347. (avgSpeed): New variable.
  9348. (eta): New variable.
  9349. * src/TorrentConsoleDownloadEngine.cc (initStatistics): Initialized
  9350. new variables: eta, avgSpeed, startup.
  9351. (calculateSpeed): Calculate average speed and ETA.
  9352. (printStatistics): Added ETA.
  9353. * src/Util.h (secfmt): New function.
  9354. * src/Util.cc (secfmt): New function.
  9355. 2006-04-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9356. To detect "keep alive" flooding:
  9357. * src/PeerInteractionCommand.h (keepAliveCount): New variable
  9358. * src/PeerInteractionCommand.cc (Constructor): Initialized new
  9359. variable: keepAliveCount.
  9360. (detectMessageFlooding): Added "keep alive" flooding detection.
  9361. (receiveMessage): Increase keepAliveCount when "keep alive" message
  9362. received.
  9363. To add the ability to download only specified files in multi-file
  9364. torrent:
  9365. * src/BitfieldMan.h (filterBitfield): New variable.
  9366. (filterEnabled): New variable.
  9367. (setFilterBit): New function.
  9368. (enableFilter): New function.
  9369. (disableFilter): New function.
  9370. (isFilterEnabled): New function.
  9371. (getFilteredTotalLength): New function.
  9372. (getCompletedLength): New function.
  9373. * src/BitfieldMan.cc (Constructor): Initialized new variable:
  9374. filterBitfield, filterEnabled.
  9375. (CopyConstructor): Added filterBitfield and filterEnabled.
  9376. (operator==): Added filterBitfield and filterEnabled.
  9377. (Destructor): Added filterBitfield.
  9378. (getMissingIndex): Use filterBitfield.
  9379. (getMissingUnusedIndex): Use filterBitfield.
  9380. (getFirstMissingUnusedIndex): Use filterBitfield.
  9381. (getFirstMissingUnusedIndex): Use filterBitfield.
  9382. (getAllMissingIndexes): Use filterBitfield.
  9383. (countMissingBlock): Use filterBitfield.
  9384. (countBlock): Use filterBitfield.
  9385. (setBitInternal): Added new argument on.
  9386. (setUseBit): Use setBitInternal.
  9387. (unsetUseBit): Use setBitInternal.
  9388. (setBit): Use setBitInternal.
  9389. (unsetBit): Use setBitInternal.
  9390. (isAllBitSet): Use filterBitfield.
  9391. (setFilterBit): New function.
  9392. (addFilter): New function.
  9393. (enableFilter): New function.
  9394. (disableFilter): New function.
  9395. (clearFilter): New function.
  9396. (isFilterEnabled): New function.
  9397. (getFilteredTotalLength): New function.
  9398. (getCompletedLength): New function.
  9399. * src/TorrentMan.h [FileEntry](Constructor): Updated signature.
  9400. Initalized newly added variables.
  9401. [FileEntry](offset): New variable.
  9402. [FileEntry](extracted): New variable.
  9403. [FileEntry](requested): New variable.
  9404. (readFileEntry): New function.
  9405. (option): New variable.
  9406. (splitMultiFile): Removed const qualifier.
  9407. (fixFilename): Removed const qualifier.
  9408. (readFileEntryFromMetaInfoFile): New function.
  9409. (finishPartialDownloadingMode): New function.
  9410. (isPartialDownloadingMode): New function.
  9411. (setFileEntriesToDownload): New function.
  9412. (getCompletedLength): New function.
  9413. (getPartialTotalLength): New function.
  9414. * src/TorrentMan.cc (readFileEntry): New function.
  9415. (setup): Use readFileEntry. If no-preallocation option is specified,
  9416. use DefaultDiskWriter.
  9417. (readFileEntryFromMetaInfoFile): New function.
  9418. (fixFilename): Removed const qualifier.
  9419. (splitMultiFile): Removed const qualifier.
  9420. (setFileEntriesToDownload): New function.
  9421. (isPartialDownloadingMode): New function.
  9422. (finishPartialDownloadingMode): New function.
  9423. (getCompletedLength): New function.
  9424. (getPartialTotalLength): New function.
  9425. * src/TorrentConsoleDownloadEngine.h (partialDownloadLengthDiff):
  9426. New variable.
  9427. (partialTotalLength): New variable.
  9428. (downloadLength): New variable.
  9429. (totalLength): New variable.
  9430. * src/TorrentConsoleDownloadEngine.cc (onPartialDownloadingCompletes):
  9431. Added log.
  9432. (initStatistics): Initialized new variables: partialDownloadLengthDiff,
  9433. partialTotalLength, downloadLength, totalLength.
  9434. (calculate): Calculate downloadLength and totalLength.
  9435. * src/prefs.h :New definition PREF_NO_PREALLOCATION
  9436. * src/main.cc (addCommand): Changed argument signature.
  9437. (main): Added new variable: args. Added new option "torrent-show-files"
  9438. "no-preallocation". Usage is not updated yet.
  9439. 2006-04-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9440. * src/PeerMessage.cc (setBitfield): Fixed invalid memory de-allocation.
  9441. 2006-04-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9442. Attempt to add the ability to listing file entries in a .torrent file.
  9443. This feature is not yet complete.
  9444. * src/prefs.h (PREF_TORRENT_SHOW_FILES): New definition
  9445. * src/TorrentMan.cc (getMultiFileEntries): New function.
  9446. (getName): New function.
  9447. * src/TorrentMan.h (getMultiFileEntries): New function.
  9448. (getName): New function.
  9449. * src/main.cc (main): Use above 2 funtion.
  9450. * Release 0.3.2
  9451. 2006-03-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9452. * src/PeerInteractionCommand.cc (checkInactiveConnection): New function
  9453. (detectMessageFlooding): Updated threshold value.
  9454. (checkLongTimePeerChoking): Updated timeout value.
  9455. (getNewPieceAndSendInterest): Added debug log.
  9456. * src/PeerInteractionCommand.h (checkInactiveConnection): New function
  9457. * src/TorrentMan.cc (deleteOldErrorPeers): Updated.
  9458. (getPeer): Updated.
  9459. * src/TorrentMan.h: Added MAX_PEER_ERROR.
  9460. * src/PeerAbstractCommand.cc (onAbort): Increment error counter.
  9461. * src/PeerListenCommand.cc (execute): Close connection if incoming peer
  9462. is localhost.
  9463. * src/main.cc (main): Updated PREF_PEER_CONNECTION_TIMEOUT to 60.
  9464. * src/PendingMessage.cc (processMessage): Not to send piece message
  9465. if peer is not interested in the pieces localhost has.
  9466. * src/Peer.cc (shouldChoke): Updated.
  9467. * src/SendMessageQueue.cc (cancelAllRequest): Fixed.
  9468. * src/Util.cc (isPowerOf): New function.
  9469. * src/Util.h (isPowerOf): New function.
  9470. * src/PeerMessageUtil.cc (checkLength): Added a check for length
  9471. whether or not it is power of 2.
  9472. 2006-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9473. Added new class SendMessageQueue that includes PendingMessages and
  9474. RequestSlotMan.
  9475. * src/SendMessageQueue.h: New class.
  9476. * src/SendMessageQueue.cc: New class.
  9477. * src/PendingMessage.h: Added new member variable blockIndex and its
  9478. accessors.
  9479. (createRequestMessage): Updated.
  9480. * src/PendingMessage.cc (createRequestMessage): Updated.
  9481. * src/PeerInteractionCommand.cc (executeInternal): Updated with
  9482. SendMessageQueue.
  9483. (checkLongTimePeerChoking): Updated with SendMessageQueue.
  9484. (receiveMessage): Updated with SendMessageQueue.
  9485. (deletePendingPieceMessage): Removed.
  9486. (getNewPieceAndSendInterest): Updated with SendMessageQueue.
  9487. (sendInterest): Updated with SendMessageQueue.
  9488. (createRequestPendingMessage): Updated with SendMessageQueue.
  9489. (sendMessages): Updated with SendMessageQueue.
  9490. (onAbort): Updated with SendMessageQueue.
  9491. (keepAlive): Updated with SendMessageQueue.
  9492. (beforeSocketCheck): Updated SendMessageQueue.
  9493. * src/PeerInteractionCommand (sendMessages): Shuffle
  9494. missingBLockIndexes before using it.
  9495. Added its own timeout for peer connection.
  9496. * src/PeerAbstractCommand.h: Added member variable timeout and its
  9497. setter.
  9498. * src/prefs.h: Added PREF_PEER_CONNECTION_TIMEOUT.
  9499. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  9500. Added setTimeout() call.
  9501. (executeInternal): Added setTimeout() call.
  9502. * src/PeerAbstractCommand.cc (PeerAbstractCommand):
  9503. Added timeout.
  9504. (isTimeoutDetected): Updated.
  9505. * src/main.cc (main): Added PREF_PEER_CONNECTION_TIMEOUT entry to
  9506. option.
  9507. Added *simple* message flooding checker.
  9508. * src/PeerInteractionCommand.cc (executeInternal):
  9509. Added detectMessageFlooding() call.
  9510. (detectMessageFlooding): New function.
  9511. (receiveMessage): Count up CHOKE, UNCHOKE, HAVE message.
  9512. (beforeSocketCheck): Added detectMessageFlooding() call.
  9513. * src/PeerInteractionCommand.h: Added sendMessageQueue,
  9514. chokeUnchokeCount, haveCount, detectMessageFlooding().
  9515. Removed deletePendingPieceMessage(), getRequestSlot(),
  9516. deleteRequestSlot(), deleteAllRequestSlot().
  9517. * src/PeerInteractionCommand.cc (beforeSocketCheck):
  9518. Added checkLongTimePeerChoking() call.
  9519. * src/RequestSlotMan.h: Renamed deleteTimeoutRequestSlot().
  9520. * src/TorrentMan.cc (addPeer): Delete at most MAX_PEER_LIST_SIZE peers
  9521. if duplicate == false.
  9522. The parameter "uploaded" and "downloaded" in the tracker request are
  9523. the size since the client sent the "started" event to the tracker.
  9524. * src/TorrentMan.cc (setup): Assigned saved downloaded Size and
  9525. uploaded size to preDownloadedSize, preUploadedSize respectively.
  9526. * src/TorrentMan.h: Added preDownloadedSize, preUploadedSize,
  9527. getSessionDownloadedSize(), getSessionUploadedSize().
  9528. * src/TrackerInitCommand.cc (execute): Use getSessionDownloadedSize(),
  9529. getSessionUploadedSize() instead of getDownloadedSize(),
  9530. getUploadedSize().
  9531. * src/PendingMessage.cc (processMessage): Do not send request message
  9532. if the peer is choking the client.
  9533. * src/TrackerUpdateCommand.cc (execute): Check wtheher minInterval is
  9534. less than interval.
  9535. 2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9536. * configure.in: Added gnutls support. Added several CPP macros.
  9537. * m4/openssl.m4: Added.
  9538. * src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
  9539. readData(), peekData(). Added gnutls support.
  9540. * src/HttpDownloadCommand.cc: Removed SleepCommand.h
  9541. * src/TrackerWatcherCommand.{h,cc}: Added. This command creates
  9542. TrackerInitCommand periodicaly(TorrentMan::minInterval).
  9543. * src/TorrentMan.cc: Remove downloadedSize == 0 check from save().
  9544. Instead, added a check for whether setup method has executed
  9545. successfully.
  9546. * src/TorrentMan.h: Added member vaiable setupComplete. Updated
  9547. DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to 300.
  9548. * src/Makefile.am: Updated.
  9549. * src/messageDigest.h: Added. This is a macro calculating SHA1 digest
  9550. using whether OpenSSL or gcrypt, depending on the result of configure
  9551. script.
  9552. * src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by using
  9553. messageDigest.h.
  9554. * src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
  9555. * src/PeerListenCommand.cc: Added log about port binded successfully.
  9556. Fixed memory leak.
  9557. * src/main.cc: Added gnutls support. Replaced LIB_SSL with
  9558. ENABLE_BITTORRENT where they are not related to OpenSSL but BitTorrent.
  9559. Removed instantiation of TrackerInitCommand. Instead,
  9560. TrackerWatcherCommand is instantiated and pushed to the command queue.
  9561. * src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL with
  9562. ENABLE_SSL.
  9563. * src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
  9564. * src/RequestSlotMan.cc (deleteCompletedRequestSlot):
  9565. If a piece is already acquired by another command, delete the request
  9566. slots for the piece.
  9567. * src/TrackerUpdateCommand.cc (execute):
  9568. Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to warn.
  9569. Added a check whether peer list is null.
  9570. Fixed the bug that causes sending completed event to the tracker
  9571. several times.
  9572. * src/TrackerInitCommand.cc (execute):
  9573. Fixed the bug that causes sending completed event to the tracker
  9574. several times.
  9575. * src/AbstractDiskWriter.{h,cc}: Removed direct dependency on OpenSSL
  9576. by using messageDigest.h.
  9577. 2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9578. * PeerConnection.cc: Replaced log message "keep-alive" with
  9579. "keep alive".
  9580. * PeerInteractionCommand.{h,cc}: Close connection if peer is choking
  9581. localhost long time.
  9582. * TorrentMan.cc: When adding new peer with duplicate = true, if the
  9583. number of peer list is equal to or grater than MAX_PEER_LIST, delete
  9584. at most 100 failure entry from the list. If with duplicate = false,
  9585. MAX_PEER_LIST is not checked.
  9586. * PeerListenCommand.cc: Fixed the argument order of log message.
  9587. 2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9588. * Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
  9589. Added warn().
  9590. * SimpleLogger.h: Moved enum LEVEL to Logger.h.
  9591. Implemented warn().
  9592. Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated code.
  9593. 2006-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9594. * Request.h: Added AFTER_COMPLETED event.
  9595. * TorrentDownloadEngine.cc: Prints "Download complete" message
  9596. instead of downloaded size and progress(%) after download completes.
  9597. * PeerInteractionCommand.cc: After download completes, sends unchoke
  9598. message to the peer if it is interested in what localhost has
  9599. downloaded.
  9600. * TorrentMan.cc: In single-file mode, copy temporary file to the final
  9601. destination instead of just renaming it.
  9602. * TorrentMan.cc: Added deleteTempFile().
  9603. * PeerAbstractCommand.cc: do not stop execution after download
  9604. completes. This makes localhost a seeder.
  9605. * Util.{h,cc}: Added fileCopy().
  9606. * PeerListenCommand.cc: do not stop execution after download completes.
  9607. This makes localhost a seeder.
  9608. * main.cc: Do not call TorrentMan::fixFilename() in torrentHandler.
  9609. Added TorrentMan::deleteTempFile() to torrentHandler.
  9610. Initialized the variable dir as ".".
  9611. * TorrentMan.h: Changed DEFAULT_ANNOUNCE_INTERVAL to 120 seconds.
  9612. Deleted renameSingleFile().
  9613. Added copySingleFile(), deleteTempFile().
  9614. * DownloadEngine.h: Added virtual function afterEachIteration().
  9615. * TorrentDownloadEngine.cc: Move a call to TorrentMan::fixFilename()
  9616. in onEndOfRun() to afterEachIteration().
  9617. In onEndOfRun(), changed if condition to check whether filenameFixed is
  9618. true.
  9619. * Util.cc: Implemented fileCopy() using rangedFileCopy().
  9620. In rangedFileCopy(), added try-catch block to properly close file
  9621. descriptors.
  9622. * TorrentDownloadEngine.cc: Added a member variable filenameFixed.
  9623. Added afterEachIteration(), isFilenameFixed().
  9624. * Peer.cc: Changed choking strategy.
  9625. * PreAllocationDiskWriter.cc: Drop O_DIRECT flag.
  9626. * TrackerInitCommand.cc: Send completed event only once.
  9627. * DownloadEngine.cc: Added a call to afterEachIteration().
  9628. * TrackerUpdateCommand.cc: Do not stop execution after download
  9629. completes.
  9630. * TorrentMan.h: Defined MAX_PEER_UPDATE as 15. aria2 attempts to
  9631. connect the peers at most MAX_PEER_UPDATE when a peer list is
  9632. received from a tracker.
  9633. * TrackerUpdateCommand.cc: Implemented above mentioned behavior.
  9634. Decreased the number of failure peers to delete to 0(just comment out
  9635. the line).
  9636. * Release 0.3.1
  9637. 2006-03-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9638. * PeerInteractionCommand.cc: added a call to
  9639. TorrentMan::unadvertisePiece in Destructor.
  9640. * PeerInteractionCommand.cc: make have message sent immediately
  9641. if the size of pending message queue is zero.
  9642. * TorrentMan.cc: set the maximum size of peer list to 250.
  9643. * TorrentMan.h: changed the container type of Peers and UsedPieces
  9644. to deque.
  9645. * Util.cc: fixed rangedFileCopy.
  9646. * AbstractDiskWriter.{h,cc}: moved digest context initialization
  9647. to Constructor. Also, moved digest cleanup to Destructor.
  9648. * MetaFileUtil.cc: fixed memory leak
  9649. * replaced std::vector with std::deque.
  9650. * AbstractCommand.cc: casted timeout value to long long int.
  9651. * ChunkedEncoding.cc: fixed memory leak.
  9652. * PeerInteractionCommand.cc: casted timeout value to long long int.
  9653. * SleepCommand.cc: casted timeout value to long long int.
  9654. * Data.cc: fixed memory leak.
  9655. * Data.cc: fixed toLLInt().
  9656. * BitfieldMan.cc: fixed memory leak.
  9657. * TorrentMan.cc: initialized storeDir to ".".
  9658. * TorrentMan.cc: fixed memory leak.
  9659. * TorrentMan.cc: corrected file paths of splitted files.
  9660. * PeerAbstractCommand.cc: casted timeout to long long int.
  9661. * main.cc: added delete(req) and delete(te->diskWriter).
  9662. * RequestSlot.cc: casted timeout value to long long int.
  9663. * Request.cc: fixed memory leak.
  9664. * PendingMessage.cc: make HAVE messages sent only when peer does not
  9665. have the piece.
  9666. * Peer.{h,cc}: added hasPiece(int index).
  9667. * main.cc: corrected addCommand.
  9668. 2006-03-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9669. * BitTorrent protocol support added.
  9670. * Release 0.3.0
  9671. 2006-03-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9672. * SocketCore.cc: remove the assignment of addrinfo.ai_addr.
  9673. 2006-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9674. * ChunkedEncoding.{h,cc}: fixed the bug that if chunk data is binary,
  9675. decoding did not work properly.
  9676. 2006-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9677. * DownloadEngine.h: included sys/time.h
  9678. * DownloadEngine.cc: remove sys/time.h
  9679. * Makefile.am (SUBDIRS): Add intl.
  9680. * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
  9681. 2006-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9682. * main.cc: correct help message for --http-auth-scheme.
  9683. * main.cc: changed e-mail address for bug reports.
  9684. * ja.po: added japanese translation.
  9685. 2006-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9686. * SimpleLogger.cc: flush log file instead of stdout.
  9687. 2006-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9688. * main.cc: Fixed command-line option: max-tries
  9689. * HttpResponseCommand.cc: Make the request re-sent only if req->seg.sp
  9690. does not equal to seg.sp.
  9691. * DownloadCommand.cc: If EOF is got from the server and the total size
  9692. of file is not zero, then throw DlRetryEx.
  9693. * main.cc: Set the minium value of min-segment-size to 1024.
  9694. * HttpResponseCommand.cc: Fixed the bug that http segmented downloading
  9695. fails because of a regression since 0.2.0 release.
  9696. 2006-03-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9697. * HttpConnection.cc:
  9698. * common.h: defined the user agent name as macro
  9699. * DownloadEngine.{h, cc}:
  9700. * ConsoleDownloadEngine.{h, cc}: Console output message(size, speed)
  9701. is now generated by ConsoleDownloadEngine not by DownloadEngine.
  9702. * main.cc: Download complete/abort message is now generated by main.
  9703. * Makefile.am (SUBDIRS): Add m4.
  9704. (ACLOCAL_AMFLAGS): New variable.
  9705. (EXTRA_DIST): New variable.
  9706. * configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
  9707. * gettext: added gettext functionality
  9708. 2006-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9709. * AbstractCommand.cc:
  9710. * DownloadCommand.{h, cc}: Aborted downloading commands now properly
  9711. unregister its cuid from SegmentMan.
  9712. * DownloadEngine.cc: .aria2 file was written when a downloading
  9713. failed with errors.
  9714. * HttpConnection.cc: Added "Proxy-Connection" header to proxy request.
  9715. Added "User-Agent" header to CONNECT proxy request.
  9716. Fixed "Proxy-Authorization" header. Now proxy authorization works
  9717. properly.
  9718. * Logger.h:
  9719. * SimpleLogger.{h,cc}: Changed the type of msg to const char*.
  9720. * ChunkedEncoding.cc: Added #include directive for strings.h
  9721. * Release 0.2.1
  9722. 2006-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9723. * Util.{h,cc}: added startsWith().
  9724. * CookieBox.cc: rewrited criteriaFind() using Util::startsWith() and
  9725. Util::endsWith().
  9726. * SocketCore.cc: struct addrinfo is now zero-initialized.
  9727. * common.h: added #include directive of limit.h.
  9728. * DownloadEngine.cc: added #include directive of sys/time.h and
  9729. algorithm.
  9730. * Exception.h: added #include directive of stdio.h.
  9731. * AbstractCommand.h: added #include directive of sys/time.h.
  9732. * DownloadCommand.h: added #include directive of sys/time.h.
  9733. * *.h: added #include directive of common.h to all base classes.
  9734. subclasses' one was removed.
  9735. * common.h: defined LONG_LONG_MAX and LONG_LONG_MIN if a compiler
  9736. does not define these macros.
  9737. 2006-02-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9738. * Release 0.2.0
  9739. * main.cc:
  9740. * HttpInitiateConnectionCommand.{h,cc}:
  9741. * prefs.h:
  9742. * HttpConnection.{h,cc}: added --http-proxy-method option.
  9743. We can now use GET command in http proxy.
  9744. 2006-02-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9745. * SplitSlowestSegmentSplitter.{h,cc}: This class provies algorithm
  9746. that splits slowest segment of SegmentMan::commands vector.
  9747. This is the default split algorithm of aria2.
  9748. * SplitFirstSegmentSplitter.{h,cc}: This class provides algorithm
  9749. that splits first segment of SegmentMan::commands vector.
  9750. * SegmentSplitter.{h,cc}: Added. This class provides split algorithm.
  9751. * DownloadCommand.{h,cc}: Added downloading speed calculation.
  9752. * Segment.h:
  9753. * SegmentMan.cc: Added speed field to Segment.h
  9754. * main.cc: -s option now affects all URLs in command-line arguemtns.
  9755. * HttpResponseCommand.cc: Fixed bug that segment file is not loaded.
  9756. * message.h: Change file size related %d to %lld.
  9757. 2006-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9758. * FtpInitiateConnectionCommand.{h,cc}:
  9759. * FtpNegotiationCommand.{h,cc}:
  9760. * FtpDownloadCommand.{h,cc}:
  9761. * FtpConnection.{h,cc}: Added FTP support
  9762. * SimpleLogger.cc: Log message now includes time information.
  9763. * main.cc: The value of --http-auth-scheme option is chagned from
  9764. 'BASIC' to 'basic'
  9765. * main.cc: Added --timeout command-line option.
  9766. * main.cc: Added --min-segment-size command-line option.
  9767. * main.cc: Added --max-retries command-line option.
  9768. * prefs.h: option string constants are now defined in prefs.h
  9769. 2006-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9770. * AbstractCommand.cc: Fixed timeout bug in AbstractCommand
  9771. * SegmentMan.cc: Added totalSize entry to .aria2 file. No compatibility
  9772. with version 0.1.0's one.
  9773. 2006-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9774. * configure.in: Added --enable-ssl option to configure script.
  9775. * HttpConnection.cc: Make Request-URI an absolute path. Some servers
  9776. cannot permit absoluteURI as Request-URI.
  9777. * HttpConnection.cc: Added Referer support.
  9778. * main.cc: Added referer command-line option.
  9779. * main.cc: Added rety-wait command-line option.
  9780. * Exception.h: Fixed formating bug in Exception::setMsg()
  9781. * SocketCore.{h,cc}:
  9782. * Socket.{h, cc}:
  9783. * Request.cc:
  9784. * InitiateConnectionCommandFactory.cc:
  9785. * HttpRequestCommand.cc: Added HTTPS support.
  9786. * SocketCore.{h,cc}: Added SocketCore. Socket becomes a handle class
  9787. for SocketCore.
  9788. * ChunkedEncoding.cc: Fixed bug in ChunkedEncoding: expanding buffer
  9789. size is wrong
  9790. * DownloadCommand.cc: Fixed bug in DownloadCommand: In Chunked
  9791. Encoding, it wrongly adds to Segment.ds buff length from the socket.
  9792. 2006-02-17 Tatsuhiro Tsujikawa <tsujikawa at rednoah dot com>
  9793. * Release 0.1.0