ChangeLog 383 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697
  1. 2008-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2. Fixed the compile error on Nexenta OS(GNU/Solaris OS).
  3. Don't define `struct addrinfo' when __sun is defined.
  4. * src/getaddrinfo.h
  5. 2008-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6. Introduced a2_struct_stat. It is defined as `struct _stati64' if
  7. __MINGW32__ is defined, because under MinGW32, _stati64 is used and its
  8. second argument is of type `struct _stati64'. Otherwise it is defined as
  9. `struct stat'.
  10. * src/AbstractDiskWriter.cc
  11. * src/File.cc
  12. * src/File.h
  13. * src/a2io.h
  14. 2008-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  15. Fixed the compile error in hurd-i386
  16. See the original bug report:
  17. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488602
  18. * src/a2io.h
  19. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  20. Code cleanup.
  21. * src/PeerAbstractCommand.cc
  22. * src/PeerAbstractCommand.h
  23. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  24. Removed TransferEncoding.
  25. * src/DownloadCommand.cc
  26. * src/DownloadCommand.h
  27. * src/HttpResponseCommand.cc
  28. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  29. Updated po files.
  30. * po/aria2c.pot
  31. * po/*.po
  32. * po/*.gmo
  33. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  34. Rewritten ChunkedEncoding class as ChunkedDecoder class.
  35. * src/A2STR.cc
  36. * src/A2STR.h
  37. * src/ChunkedDecoder.cc
  38. * src/ChunkedDecoder.h
  39. * src/ChunkedEncoding.cc: Removed
  40. * src/ChunkedEncoding.h: Removed
  41. * src/DownloadCommand.cc
  42. * src/DownloadCommand.h
  43. * src/HttpDownloadCommand.cc
  44. * src/HttpResponse.cc
  45. * src/HttpResponse.h
  46. * src/HttpResponseCommand.cc
  47. * src/HttpSkipResponseCommand.cc
  48. * src/HttpSkipResponseCommand.h
  49. * src/Makefile.am
  50. * src/TransferEncoding.h: Removed
  51. * test/ChunkedDecoderTest.cc
  52. * test/ChunkedEncodingTest.cc: Removed
  53. * test/HttpResponseTest.cc
  54. * test/Makefile.am
  55. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  56. Use append instead of insert.
  57. * src/GZipDecoder.cc
  58. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  59. Updated doc
  60. * src/Decoder.h
  61. 2008-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  62. Updated usage text for -s option.
  63. * src/usage_text.h
  64. 2008-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  65. Fixed the bug that UTF-8 encoded URL is not URL-encoded properly.
  66. * src/Request.cc
  67. 2008-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  68. Cleaned up configure.ac.
  69. * configure.ac
  70. 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  71. Use ARIA2_ARG_WITH and ARIA2_ARG_ENABLE instead of AC_ARG_WITH and
  72. AC_ARG_ENABLE.
  73. * configure.ac
  74. 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  75. Added gzip, deflate decoding support in HTTP using libz. If compiled
  76. with this feature, aria2 sends "Accept-Encoding: deflate, gzip" header
  77. to a HTTP server. If a server returns "Content-Encoding: gzip" or
  78. "Content-Encoding: deflate" then, aria2 decodes the response body on the
  79. fly and writes decoded data to a local disk.
  80. * README
  81. * README.html
  82. * configure.ac
  83. * m4/aria2_arg.m4: Added ARIA2_ARG_WITH and ARIA2_ARG_ENABLE, they are
  84. wrapper function for AC_ARG_WITH and AC_ARG_ENABLE respectively.
  85. * m4/libz.m4
  86. * src/Decoder.h
  87. * src/DownloadCommand.cc
  88. * src/DownloadCommand.h
  89. * src/Exception.h
  90. * src/GZipDecoder.cc
  91. * src/GZipDecoder.h
  92. * src/HttpHeader.cc
  93. * src/HttpHeader.h
  94. * src/HttpRequest.cc
  95. * src/HttpRequest.h
  96. * src/HttpResponse.cc
  97. * src/HttpResponse.h
  98. * src/HttpResponseCommand.cc
  99. * src/Makefile.am
  100. * test/GZipDecoderTest.cc
  101. * test/HttpRequestTest.cc
  102. * test/HttpResponseTest.cc
  103. * test/Makefile.am
  104. * test/Makefile.in
  105. * test/gzip_decode_test.gz
  106. 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  107. Clarified usage of -j option.
  108. * src/usage_text.h
  109. 2008-06-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  110. Disabled getting size from the response of RETR.
  111. If SIZE command failed, then disable resuming and segmented downloading.
  112. * src/FtpConnection.cc
  113. * src/FtpConnection.h
  114. * src/FtpNegotiationCommand.cc
  115. * src/FtpNegotiationCommand.h
  116. 2008-06-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  117. Use digits to find first byte of file size, which makes the intention
  118. of the code clearer.
  119. * src/FtpConnection.cc
  120. Don't call validateTotalLength() when size is 0.
  121. * src/FtpNegotiationCommand.cc
  122. 2008-06-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  123. Updated po files.
  124. * po/aria2c.pot
  125. * po/*.gmo
  126. * po/*.po
  127. 2008-06-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  128. Clarified usage text for --split option.
  129. * src/usage_text.h
  130. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  131. Bump up version number to 0.15.0dev. "dev" means "development"
  132. version, which means I started the development of the next release!
  133. * src/configure.ac
  134. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  135. If FTP server returns negative response with REST raw command and
  136. requested range is not 0, throw exception. If requested range is 0,
  137. continue download a file from 0 byte.
  138. * src/FtpNegotiationCommand.cc
  139. * src/FtpNegotiationCommand.h
  140. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  141. Supported FTP server which don't recognize SIZE raw command.
  142. If SIZE raw command is failed, aria2 will try to get file size
  143. from the response of RETR raw command. If both attempts are failed,
  144. then resuming and segmented downloading are disabled.
  145. * src/FtpConnection.cc
  146. * src/FtpConnection.h
  147. * src/FtpNegotiationCommand.cc
  148. * src/FtpNegotiationCommand.h
  149. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  150. * Release 0.14.0+1
  151. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  152. Bump up version number to 0.14.0+1
  153. * src/configure.ac
  154. 2008-06-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  155. Fixed the code that refers static member variable from non-static
  156. context.
  157. * src/DefaultPeerStorage.cc
  158. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  159. * Release 0.14.0
  160. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  161. Added build test script
  162. * build_test.sh
  163. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  164. Updated ja.po
  165. * src/ja.po
  166. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  167. Bump up version number to 0.14.0
  168. * src/configure.ac
  169. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  170. Updated ja.po and fr.po. Great thanks for french translators and
  171. Sebastien WILLEMIJNS.
  172. * po/fr.po
  173. * po/ja.po
  174. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  175. Added configure option to enable/disable epoll support.
  176. * configure.ac
  177. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  178. Updated man page.
  179. * doc/aria2c.1.txt
  180. * doc/aria2c.1
  181. * doc/aria2c.1.html
  182. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  183. Added missing default value '5' to the usage of --split option.
  184. * src/HelpItemFactory.cc
  185. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  186. Filled up pieces based on the number of missing blocks, rather than
  187. simplay the number of piece * block length.
  188. * src/BtRequestFactory.h
  189. * src/DefaultBtInteractive.cc
  190. * src/DefaultBtInteractive.h
  191. * src/DefaultBtRequestFactory.cc
  192. * src/DefaultBtRequestFactory.h
  193. * src/Piece.cc
  194. * src/Piece.h
  195. * test/BitfieldManTest.cc
  196. * test/DefaultBtRequestFactoryTest.cc
  197. * test/MockBtRequestFactory.h
  198. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  199. Made _epEvents a member variable.
  200. * src/DownloadEngine.cc
  201. * src/DownloadEngine.h
  202. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  203. Cancel download if http redirect is bounded more than 20 times.
  204. * src/AbstractCommand.cc
  205. * src/HttpSkipResponseCommand.cc
  206. * src/Request.cc
  207. * src/Request.h
  208. * test/RequestTest.cc
  209. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  210. Fixed unhandled exception(removed keyword `new').
  211. * src/SocketCore.cc (initEPOLL)
  212. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  213. Removed visit(const MetaEntry*)
  214. * src/MetaEntryVisitor.h:
  215. Added visit(const Data*),visit(const Dictionary*),visit(const List*)
  216. and made them virtual.
  217. * src/BencodeVisitor.h
  218. * src/BencodeVisitor.cc
  219. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  220. Updated po files.
  221. * po/aria2c.pot
  222. * po/*.po
  223. * po/*.gmo
  224. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  225. Moved the call setWriteCheckSocket inside the previous clause to reduce
  226. the number of socket to watch out.
  227. * src/PeerInteractionCommand.cc
  228. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  229. When there is not enough space in disk when writing a chunk of data,
  230. aria2 now prints the message to the console to warn user and aborts
  231. its download. Not all downloads are canceled because some downloads
  232. may use another disk or partition. BUG#1640332
  233. * src/AbstractDiskWriter.cc
  234. * src/PeerAbstractCommand.cc
  235. * src/PeerAbstractCommand.h: Added onFailure() function for override.
  236. * src/PeerInteractionCommand.cc: In onFailure(), call RequestGroup::
  237. setHaltRequested(true) to cancel download.
  238. * src/PeerInteractionCommand.h
  239. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  240. Applied Ross's aria2-0.13.2+1-mingw-5.patch, which changes the type of
  241. socket from int to sock_t as sockets are unsigned in Windows.
  242. For AsyncNameResolver, DownloadEngine, I did additional modification
  243. for the portion of the code changed according to epoll support.
  244. I defined sock_t in a2netcompat.h to use sock_t without including
  245. SocketCore.h.
  246. * src/AsyncNameResolver.cc
  247. * src/AsyncNameResolver.h
  248. * src/DownloadEngine.cc
  249. * src/DownloadEngine.h
  250. * src/SocketCore.cc
  251. * src/SocketCore.h
  252. * src/a2netcompat.h
  253. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  254. Applied Ross's aria2-0.13.2+1-mingw-4.patch. With this change, all
  255. changes in the patch were applied.
  256. * test/DHTConnectionImplTest.cc: Fixed unit test error in MinGW.
  257. * test/DefaultPieceStorageTest.cc: Fixed unit test error in MinGW.
  258. * test/PeerMessageUtilTest.cc: Fixed unit test error in MinGW.
  259. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  260. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this change,
  261. a2io.h and common.h were modified.
  262. * src/a2io.h: Changed seek/stat/tell calls to use 64 bit versions in
  263. MinGW.
  264. * src/common.h: Changed off_t to 64 bit in MinGW.
  265. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  266. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
  267. only a2netcompat.h is modified.
  268. * src/a2netcompat.h: Removed unused getaddrinfo related #define
  269. directives.
  270. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  271. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
  272. only gai_strerror.h is modified.
  273. * src/gai_strerror.h: Fixed gai_strerror() function to report all
  274. winsock errors in MinGW.
  275. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  276. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit, only the
  277. follow sources are applied.
  278. * src/Platform.h: I removed HAVE_WINSOCK2_H directive from Platform.h.
  279. * src/Platform.cc: Moved common setup/teardown code to Platform class.
  280. I moved #endif // HAVE_WINSOCK2_H to the front of #include "DlAbortEx.h"
  281. I included locale.h from Platform.cc.
  282. * src/main.cc: Moved common setup/teardown code to Platform class.
  283. * test/AllTest.cc: Use Platform class.
  284. Set locale to C in AllTest.cc to prevent the messages to be localized.
  285. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  286. Applied Ross's aria2-0.13.2+1-mingw-3.patch.
  287. * test/HttpHeaderTest.cc: Casted to off_t where it should.
  288. * test/HttpRequestTest.cc: Casted to off_t where it should.
  289. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  290. Applied Ross's aria2-0.13.2+1-mingw.patch and
  291. aria2-0.13.2+1-mingw-2.patch.
  292. * src/ConsoleStatCalc.cc: Added HAVE_TERMIOUS_H directive for the
  293. systems which don't have termious.h. I moved the directive inside of
  294. if(isTTY) { ... clause so that line is wiped out without termious.h.
  295. I also removed HAVE_ASCTIME_R clause because asctime_r is provided
  296. anyway.
  297. * src/asctime_r.h
  298. * src/asctime_r.c: Added for the systems don't have asctime_r function.
  299. I added 2nd argument to the prototype declaration.
  300. * src/StringFormat.cc: Get rid of vasprintf.
  301. * src/getaddrinfo.h: Fixed constants.
  302. * configure.ac: Added the check for asctime_r function.
  303. * src/Makefile.am: Added conditional based on HAVE_ASCTIME_R
  304. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  305. Added writable test for Socket when the sending message is in progress.
  306. Usually the sending message is piece message. Without wriable check,
  307. upload latency is dropped to more than 1sec.
  308. * src/PeerInteractionCommand.cc
  309. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  310. Create only requested files and files which shares a piece with
  311. requested file in multi-torrent downloads. Directory structures are
  312. also created in the same rule.
  313. MultiDiskAdaptor::fileExists() now uses FileEntry instead of
  314. DiskWriterEntry as in the previous implementation.
  315. * src/MultiDiskWriter.cc
  316. * src/MultiFileAllocationIterator.cc
  317. * src/MultiFileAllocationIterator.h
  318. * test/MultiFileAllocationIteratorTest.cc
  319. 2008-06-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  320. Commented out -lprofiler
  321. * src/Makefile.am
  322. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  323. Bump up version number to 0.14.0b.
  324. * src/configure.ac
  325. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  326. Actively establish connection to peers in seeding, when peer cache
  327. is not full and max upload speed limit is not reached.
  328. * src/ActivePeerConnectionCommand.cc
  329. * src/ActivePeerConnectionCommand.h
  330. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  331. Always remove a peer from cache in DefaultPeerStorage::returnPeer(),
  332. to make room more fleshy, recently found peers.
  333. Peer::_badConditionStartTime is not used anymore. Consider to remove
  334. it.
  335. * src/DefaultPeerStorage.cc
  336. * test/DefaultPeerStorageTest.cc
  337. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  338. Returns cached data only when the previous receiveHandshake() is called
  339. with peek = true.
  340. * src/PeerConnection.cc (receiveHandshake)
  341. * src/PeerConnection.h (receiveHandshake)
  342. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  343. Changed default value of -s option from 1 to 5.
  344. Also max value of -s option is changed from 5 to 16.
  345. * src/HelpItemFactory.cc
  346. * src/OptionHandlerFactory.cc
  347. * src/option_processing.cc
  348. * src/usage_text.h
  349. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  350. Changed -s options behavior. Now it means the number of connections
  351. made simultaneously in each http/ftp download.
  352. If 1 URL is specified, the behavior is the same with old implementation.
  353. If -s N is given and more than N URLs are specified, first N URLs are
  354. used and remaining URLs are used for backup. If less than N URLs are
  355. specified, some of URLs are used more than once so that totally N
  356. connections are made simultaneously.
  357. * src/main.cc
  358. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  359. Included missing iosfwd or ostream header.
  360. * src/RequestGroupMan.cc
  361. * src/TaggedItem.cc
  362. * src/TaggedItem.h
  363. * src/Util.cc
  364. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  365. * src/HttpHeaderProcessor.cc: Rewritten using std::string as a buffer.
  366. * src/HttpHeaderProcessor.h: Rewritten using std::string as a buffer.
  367. * src/HttpConnection.cc: Included missing sstream.
  368. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  369. Added --bt-max-open-files option.
  370. * src/DefaultPieceStorage.cc
  371. * src/HelpItemFactory.cc
  372. * src/MultiDiskAdaptor.cc
  373. * src/MultiDiskAdaptor.h
  374. * src/OptionHandlerFactory.cc
  375. * src/option_processing.cc
  376. * src/prefs.cc
  377. * src/prefs.h
  378. * src/usage_text.h
  379. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  380. Fixed the bug that aria2 aborts when a path to a directory is given
  381. in command-line.
  382. * src/ProtocolDetector.cc
  383. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  384. Limited the number files opened in each BitTorrent download. The default
  385. value is 100. The option to change this value will be added.
  386. * src/MultiDiskAdaptor.cc
  387. * src/MultiDiskAdaptor.h
  388. * src/MultiFileAllocationIterator.cc
  389. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  390. Fixed the bug that HTTP downloads don't start with old libraries.
  391. * src/HttpHeaderProcessor.cc
  392. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  393. Use empty() instead of size() > 0.
  394. * src/HttpConnection.cc
  395. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  396. Drop connection if the incoming peer ID is the same with localhost's
  397. one. The previous implementation drops connection when incoming peer's
  398. IP address is the same with localhost's one.
  399. * src/PeerListenCommand.cc
  400. * src/DefaultBtInteractive.cc
  401. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  402. Returns cached data without checking whether socket is readable
  403. if the cache is available.
  404. * src/PeerConnection.cc (receiveHandshake)
  405. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  406. Included stdint.h
  407. * src/common.h
  408. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  409. Removed duplicate HAVE_GETTIMEOFDAY
  410. * src/Makefile.am
  411. * src/Makefile.in
  412. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  413. Use interval as a minInterval when minInterval is not supplied.
  414. * src/DefaultBtAnnounce.cc
  415. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  416. Made DEFAULT_ANNOUNCE_INTERVAL 120, so that if first tracker request
  417. attempt is failed, then 2nd attempt get kicked out more quickly.
  418. And it is now static const member of DefaultBtAnnounce.
  419. * src/DefaultBtAnnounce.h
  420. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  421. Renamed BtRuntime::lessThanMinPeers() and BtRuntime::lessThanEqMinPeers.
  422. Made MAX_PEERS and MIN_PEERS static const members of BtRuntime.
  423. * src/ActivePeerConnectionCommand.cc
  424. * src/BtConstants.h
  425. * src/BtRuntime.h
  426. * src/DHTGetPeersCommand.cc
  427. * src/DefaultBtAnnounce.cc
  428. * src/DefaultPeerStorage.cc: Calculate maxPeerListSize based on
  429. BtRuntime::MAX_PEERS.
  430. * src/DefaultPeerStorage.h
  431. * src/InitiatorMSEHandshakeCommand.cc
  432. * src/PeerInitiateConnectionCommand.cc
  433. * src/PeerInteractionCommand.cc
  434. * src/PeerReceiveHandshakeCommand.cc
  435. * src/TrackerWatcherCommand.cc
  436. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  437. Always Connect to _numNewConnection
  438. * src/ActivePeerConnectionCommand.cc
  439. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  440. Made `begin' unsigned int.
  441. * src/GrowSegment.h
  442. * src/Piece.cc
  443. * src/Piece.h
  444. * src/PiecedSegment.cc
  445. * src/PiecedSegment.h
  446. * src/Segment.h
  447. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  448. Calculate piece hash when data is arrived if the data is arrived in
  449. order. This removes additional read operation for hash calculation.
  450. If the data is arrived in out of order, the hash is calucated when the
  451. piece is completed. This is the same behavior as the old implementation.
  452. * src/BtPieceMessage.cc
  453. * src/DefaultBtProgressInfoFile.cc
  454. * src/DefaultPieceStorage.cc
  455. * src/DownloadCommand.cc
  456. * src/DownloadCommand.h
  457. * src/DownloadEngine.cc
  458. * src/GrowSegment.cc
  459. * src/GrowSegment.h
  460. * src/Piece.cc
  461. * src/Piece.h
  462. * src/PiecedSegment.cc
  463. * src/PiecedSegment.h
  464. * src/Segment.h
  465. * test/PieceTest.cc
  466. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  467. Try to keep the ordering of outgoing piece message.
  468. * src/DefaultBtMessageDispatcher.cc
  469. (DefaultBtMessageDispatcher::sendMessages)
  470. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  471. Fixed busy loop when error/hup epoll events occur.
  472. * src/AbstractCommand.cc
  473. * src/PeerAbstractCommand.cc
  474. 2008-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  475. Added --bt-request-peer-speed-limit option, which was a constant
  476. SLOW_SPEED_THRESHOLD.
  477. * src/ActivePeerConnectionCommand.cc
  478. * src/ActivePeerConnectionCommand.h
  479. * src/BtConstants.h
  480. * src/HelpItemFactory.cc
  481. * src/OptionHandlerFactory.cc
  482. * src/PeerReceiveHandshakeCommand.cc
  483. * src/option_processing.cc
  484. * src/prefs.cc
  485. * src/prefs.h
  486. * src/usage_text.h
  487. 2008-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  488. Removed repeated call of getTopDirPath(). Instead, call it once and
  489. cache the result.
  490. * src/MultiDiskAdaptor.cc
  491. * src/MultiDiskAdaptor.h
  492. (mkdir, openFile, initAndOpenFile, openExistingFile)
  493. 2008-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  494. Fixed compile error on debian etch.
  495. The libc6 shipped with debian etch doesn't define ULLONG_MAX properly
  496. even if _GNU_SOURCE is defined. So define ULLONG_MAX in case when
  497. it is undefined.
  498. * src/Util.cc (ULLONG_MAX)
  499. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  500. Added epoll support. Use epoll if it is available. If not, use select.
  501. When async dns is enabled in compile time, epoll support is enabled
  502. only when aria2 is built with c-ares. This condition statement is
  503. defined in a2io.h.
  504. Currently aria2 supports both c-ares and ares, but ares is maintained
  505. for quite a while and debian already has c-ares package, ares support
  506. will be dropped in the future version.
  507. * configure.ac
  508. * src/AbstractCommand.cc
  509. * src/AsyncNameResolver.cc
  510. * src/AsyncNameResolver.h
  511. * src/Command.cc
  512. * src/Command.h
  513. * src/DownloadEngine.cc
  514. * src/DownloadEngine.h
  515. * src/PeerAbstractCommand.cc
  516. * src/SocketCore.cc
  517. * src/SocketCore.h
  518. * src/a2io.h
  519. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  520. * test/MetalinkEntryTest.cc: Added missing `defined' keyword to #if
  521. directive.
  522. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  523. Do not do write operation to /dev/null file.
  524. * src/LogFactory.cc
  525. * src/SimpleLogger.cc
  526. Replaced vasprintf with vsnprintf
  527. * src/SimpleLogger.cc (SimpleLogger::writeLog)
  528. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  529. * src/BtRequestMessage.cc
  530. (BtRequestMessage::onQueue): Given piece to RequestSlot. This is a fix
  531. for segmentation fault caused by previous commit.
  532. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  533. Reduced the usage of gettimeofday().
  534. * src/DefaultBtMessageDispatcher.cc
  535. (DefaultBtMessageDispatcher::checkRequestSlotAndDoNecessaryThing)
  536. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  537. * src/RequestSlot.cc
  538. * src/RequestSlot.h
  539. (RequestSlot::isTimeout)
  540. Made RequestSlot have a reference to Piece object to avoid find
  541. Piece repeatedly.
  542. * src/DefaultBtMessageDispatcher.cc
  543. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  544. * src/RequestSlot.cc
  545. * src/RequestSlot.h
  546. (RequestSlot::getPiece)
  547. * test/DefaultBtMessageDispatcherTest.cc
  548. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  549. * src/TimeA2.cc
  550. * src/TimeA2.h
  551. (Time::difference): New function.
  552. (Time::elapsed): Done optimization.
  553. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  554. * src/HelpItemFactory.cc: Added missing `defined' keyword to #if
  555. directive.
  556. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  557. * src/option_processing.cc: Added missing `defined' keyword to #if
  558. directive.
  559. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  560. Bump up version number to 0.13.2+1
  561. * src/configure.ac
  562. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  563. Refactored broken outstanding piece handling.
  564. * src/DefaultPieceStorage.cc
  565. * src/DefaultPieceStorage.h
  566. * src/Piece.cc
  567. * src/Piece.h
  568. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  569. Fixed compile error on Mac OS X 10.3.9. This error was caused by the
  570. name collision of static variable and predefined macro.
  571. * src/BtContext.cc
  572. * src/BtContext.h
  573. * src/CookieBoxFactory.cc
  574. * src/CookieBoxFactory.h
  575. * src/CookieParser.cc
  576. * src/CookieParser.h
  577. * src/DefaultBtContext.cc
  578. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  579. * src/RequestGroup.cc
  580. (RequestGroup::createInitialCommand): Use empty() instead of size().
  581. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  582. * Release 0.13.2
  583. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  584. Updated fr.po(thanks to Sebastien) and ja.po. ThanksDone make update-po
  585. * po/fr.po
  586. * po/ja.po
  587. * po/aria2c.pot
  588. * po/*.po
  589. * po/*.gmo
  590. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  591. Bump up version number to 0.13.2
  592. * src/configure.ac
  593. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  594. Refactord.
  595. * src/RequestGroupMan.cc
  596. (removeStoppedGroup)
  597. (fillRequestGroupFromReserver)
  598. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  599. Fixed compile error on Ubuntu.
  600. * src/BtPieceMessage.cc
  601. * src/MessageDigestHelper.cc
  602. * src/Util.cc
  603. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  604. Fixed compile error when configured with --disable-bittorrent
  605. * test/DownloadHandlerFactoryTest.cc
  606. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  607. Done make update-po
  608. * po/aria2c.pot
  609. * po/*.po
  610. * po/*.gmo
  611. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  612. Bump up version number to 0.13.2rc.
  613. * src/configure.ac
  614. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  615. Made option name bold. Updated SYNOPSIS to make it more readable.
  616. * doc/aria2c.1.txt
  617. * doc/aria2c.1
  618. * doc/aria2c.1.html
  619. * src/version_usage.cc
  620. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  621. Refactored. Use std::string instead of size and char*.
  622. * Data.cc
  623. * Data.h
  624. * test/Data.cc
  625. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  626. Added trimSelf(). Rewritten trim() to use trimSelf().
  627. * Util.cc
  628. * Util.h
  629. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  630. * src/ChunkChecksum.h (getChecksum): Return const reference.
  631. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  632. Fixed compile error when configured with --disable-metalink.
  633. Also moved test/DownloadHandlerFactoryTest.cc to SRC in Makefile.am.
  634. * test/FeatureConfigTest.cc
  635. * test/DownloadHandlerFactoryTest.cc
  636. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  637. Fixed compile error when configured with --without-gnutls
  638. --without-openssl
  639. * src/main.cc
  640. * test/DefaultBtProgressInfoFileTest.cc
  641. * test/SegmentManTest.cc
  642. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  643. Fixed compile error with OpenSSL.
  644. * src/IteratableChunkChecksumValidator.cc
  645. * src/LibsslDHKeyExchange.h
  646. * src/MessageDigestHelper.cc
  647. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  648. Revert the default value of --max-concurrent-downloads to 5.
  649. Revert the default value of --metalink-servers to 5.
  650. Man pages was also updated.
  651. * src/option_processing.cc
  652. * doc/aria2c.1.txt
  653. * doc/aria2c.1.html
  654. * doc/aria2c.1
  655. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  656. Returns const reference:
  657. DownloadContext::getPieceHash, DownloadContext::getName,
  658. DownloadContext::getPieceHashAlgo, DownloadContext::getDir,
  659. BtContext::getInfoHashAsString,
  660. * src/BtContext.h
  661. * src/DefaultBtContext.cc
  662. * src/DefaultBtContext.h
  663. * src/DownloadContext.h
  664. * src/SingleFileDownloadContext.h
  665. * test/MockBtContext.h
  666. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  667. * src/RequestGroup.h (getDir): Removed.
  668. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  669. Returns const reference. The internal urlencode function was optimized
  670. a little bit.
  671. * src/Request.cc
  672. * src/Request.h
  673. * src/HttpRequest.cc
  674. * src/HttpRequest.h
  675. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  676. Defined option name and possible values as std::string to reduce
  677. temporary string object creation in runtime.
  678. * src/HelpItemFactory.cc
  679. * src/LogFactory.cc
  680. * src/Option.cc
  681. * src/OptionHandlerFactory.cc
  682. * src/option_processing.cc
  683. * src/prefs.cc
  684. * src/prefs.h
  685. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  686. Return const reference.
  687. * src/DownloadHandlerConstants.cc
  688. * src/DownloadHandlerConstants.h
  689. (getMetalinkExtensions)
  690. (getMetalinkContentTypes)
  691. (getBtExtensions)
  692. (getBtContentTypes)
  693. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  694. * src/HttpHeader.cc (get): Rewritten.
  695. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  696. Make HttpHeader::getFirst(...) return const reference.
  697. * src/HttpHeader.cc
  698. * src/HttpHeader.h
  699. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  700. Use Option::getAsBool(...) instead of Option::get(...) and compare
  701. it with V_TRUE.
  702. * src/DefaultPieceStorage.cc
  703. * src/DownloadCommand.cc
  704. * src/FtpNegotiationCommand.cc
  705. * src/HttpRequest.cc
  706. * src/InitiateConnectionCommand.cc
  707. * src/RequestGroup.cc
  708. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  709. Made Option::get(...) return const reference of std::string.
  710. * src/Option.cc
  711. * src/Option.h
  712. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  713. Replaced std:copy with insert.
  714. * src/DefaultBtMessageDispatcher.cc
  715. * src/DefaultPieceStorage.cc
  716. * src/DownloadEngineFactory.cc
  717. * src/RequestGroup.cc
  718. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  719. Included SocketCore.h to fix compiler warning.
  720. * src/InitiateConnectionCommand.cc
  721. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  722. Put piece selection strategy algorithm to RarestPieceSelector class,
  723. Added a switch to choose whether randomized selection so that unit
  724. tests emit same results in, possibly, win32.
  725. * src/DefaultPieceStorage.cc
  726. * src/DefaultPieceStorage.h
  727. * src/RarestPieceSelector.cc
  728. * src/RarestPieceSelector.h
  729. * test/DefaultPieceStorageTest.cc
  730. * test/RarestPieceSelectorTest.cc
  731. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  732. Don't pool connection if HTTP proxy is enabled.
  733. * src/FtpFinishDownloadCommand.cc
  734. * src/FtpNegotiationCommand.cc
  735. * src/HttpSkipResponseCommand.cc
  736. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  737. Don't add closed socket to DownloadEngine::addSocketForReadCheck()
  738. * src/AbstractCommand.cc
  739. * src/AbstractCommand.h
  740. * src/ActivePeerConnectionCommand.cc
  741. * src/FtpInitiateConnectionCommand.cc
  742. * src/HttpInitiateConnectionCommand.cc
  743. * src/InitiateConnectionCommandFactory.cc
  744. * src/PeerAbstractCommand.cc
  745. * src/PeerAbstractCommand.h
  746. * src/PeerInitiateConnectionCommand.cc
  747. * src/TrackerWatcherCommand.cc
  748. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  749. Sort RequestSlot in ascending order and manipulate them using
  750. lower_bound.
  751. * src/DefaultBtMessageDispatcher.cc
  752. * src/DefaultBtMessageDispatcher.h
  753. (getMessageQueue): Added const qualifier.
  754. (getRequestSlots): Added const qualifier.
  755. (sendMessages): Use empty() instead of size().
  756. (doCancelSendingPieceAction): Use HandleEvent object.
  757. (doAbortOutstandingRequestAction): Rewritten.
  758. (doChokedAction): Rewritten.
  759. (checkRequestSlotAndDoNecessaryThing): Rewritten.
  760. (isOutstandingRequest): Rewritten.
  761. (getOutstandingRequest): Rewritten.
  762. (removeOutstandingRequest): Rewritten.
  763. (addOutstandingRequest): Rewritten.
  764. * src/RequestSlot.cc
  765. * src/RequestSlot.h
  766. (operator=): Rewritten.
  767. (operator!=): New function.
  768. (operator<): New function.
  769. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  770. * src/DefaultBtRequestFactory.cc
  771. (doChokedAction): Rewritten.
  772. (removeCompletedPiece): Rewritten.
  773. (removeTargetPiece): Rewritten.
  774. (createRequestMessages): Added the debug log.
  775. (createRequestMessagesOnEndGame: Added the debug log.
  776. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  777. Added the debug log message.
  778. * src/BtPieceMessage.cc (doReceivedAction)
  779. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  780. Sorted DHTPeerAnnounceEntry in a ascending order of info hash and
  781. used lower_bound to process them rather than linear search.
  782. * src/DHTPeerAnnounceStorage.cc
  783. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  784. Call subtractPieceStats from ~PeerInteractionCommand only when the
  785. peer has at least one completed piece.
  786. * src/Peer.cc
  787. * src/Peer.h
  788. * src/PeerInteractionCommand.cc
  789. * src/PeerSessionResource.cc
  790. * src/PeerSessionResource.h
  791. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  792. Removed unnecessary sorting
  793. * src/DefaultPieceStorage (DefaultPieceStorage)
  794. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  795. Rewritten the portion of the code that mangaes allowed fast indexes.
  796. * src/PeerSessionResource.cc
  797. * src/PeerSessionResource.h
  798. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  799. Removed the invalid string including '\r' from ru.po and
  800. did make update-po.
  801. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  802. Added --log-level and --summary-interval to man page.
  803. * doc/aria2c.1.txt
  804. * doc/aria2c.1.html
  805. * doc/aria2c.1
  806. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  807. Added --log-level option to specify log level. Log messages under
  808. the specified level are not output. Default value is `debug'.
  809. * src/HelpItemFactory.cc
  810. * src/LogFactory.cc
  811. * src/LogFactory.h
  812. * src/Logger.h
  813. * src/OptionHandlerFactory.cc
  814. * src/SimpleLogger.cc
  815. * src/SimpleLogger.h
  816. * src/main.cc
  817. * src/option_processing.cc
  818. * src/prefs.h
  819. * src/usage_text.h
  820. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  821. Print download progress summary of all parallel downloads in specified
  822. interval, default 60 secs. While aria2 could download several files
  823. in parallel (see -j option), it displayed just first download progress,
  824. and the other downloads are hidden from the users. This new feature
  825. prints all downloads currently in-progress to the console so that you
  826. can check the status of all downloads. The interval can be adjusted
  827. by --summary-interval option.
  828. The progress readout is now cut so that all fits in the one line of
  829. console.
  830. * src/ConsoleStatCalc.cc
  831. * src/ConsoleStatCalc.h
  832. * src/HelpItemFactory.cc
  833. * src/OptionHandlerFactory.cc
  834. * src/RequestGroupMan.cc
  835. * src/RequestGroupMan.h
  836. * src/main.cc
  837. * src/option_processing.cc
  838. * src/prefs.h
  839. * src/usage_text.h
  840. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  841. Call updateFdSet() to initialize rfdset, wfdset fdmax.
  842. * src/DownloadEngine.cc (DownloadEngine)
  843. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  844. Use free() to deallocate memory for _buffer if HAVE_POSIX_MEMALIGN is
  845. defined.
  846. * src/SingleFileAllocationIterator.cc (~SingleFileAllocationIterator)
  847. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  848. Use erase+lower_bound+insert instead of sort.
  849. * src/DefaultPieceStorage.cc (addPieceStats)
  850. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  851. Use A2STR::SHARP_C and A2STR::EQUAL_C.
  852. * src/A2STR.cc
  853. * src/A2STR.h
  854. * src/OptionParser.cc (parse)
  855. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  856. Defined fake filename `[tracker.announce]' as static const std::string.
  857. * src/TrackerWatcherCommand.cc (createRequestGroup)
  858. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  859. Defined default filename `index.html' as static const std::string
  860. * src/SingleFileDownloadContext.cc
  861. * src/SingleFileDownloadContext.h
  862. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  863. Defined "[MEMORY]" as static const std::string.
  864. * src/MemoryBufferPreDownloadHandler.cc (execute)
  865. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  866. Defined control file's version number as static const std::string.
  867. * src/DefaultBtProgressInfoFile.cc
  868. * src/DefaultBtProgressInfoFile.h
  869. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  870. Use Request::METHOD_GET
  871. * src/RequestGroup.cc (createNextCommandWithAdj)
  872. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  873. Defined "OK", "ERR", "INPR" as static const std::string
  874. * src/RequestGroupMan.cc (showDownloadResults)
  875. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  876. Defined default client used in extended handshake as static const
  877. std::string
  878. * src/DefaultBtInteractive.cc (addHandshakeExtendedMessageToQueue)
  879. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  880. Defined AUTH_HEADER, PROXY_AUTH_HEADER as static const std::string
  881. * src/HttpConnection.cc (eraseConfidentialInfo)
  882. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  883. Defined default ftp user and password as static const std::string
  884. * src/AuthConfigFactory.cc
  885. * src/AuthConfigFactory.h
  886. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  887. Defined strings used in netrc as static const std::string
  888. * src/Netrc.cc
  889. * src/Netrc.h
  890. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  891. Defined HTTP status as static const std::string
  892. * src/AbstractProxyResponseCommand.cc
  893. * src/HttpHeader.cc
  894. * src/HttpHeader.h
  895. * src/HttpResponse.cc
  896. * src/HttpResponseCommand.cc
  897. * src/HttpSkipResponseCommand.cc
  898. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  899. Defined "\r\n", "A", "I" as static const std::string
  900. * src/A2STR.cc
  901. * src/A2STR.h
  902. * src/FtpConnection.cc
  903. * src/FtpConnection.h
  904. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  905. Added COLON_C(".") and used it in Request::parseUrl()
  906. * src/A2STR.cc
  907. * src/A2STR.h
  908. * src/Request.cc (parseUrl)
  909. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  910. Changed the type of padName from `const std::string&' to `const char*'.
  911. * src/MSEHandshake.cc (verifyPadLength)
  912. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  913. Defined "sha1" as static const std::string.
  914. * src/MetalinkParserController.cc
  915. * src/MetalinkParserController.h
  916. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  917. Defined message digest algorithm name as static const std::string
  918. * src/DHTTokenTracker.cc
  919. * src/DHTUtil.cc
  920. * src/DefaultBtContext.cc
  921. * src/MSEHandshake.cc
  922. * src/MessageDigestHelper.cc
  923. * src/Peer.cc
  924. * src/messageDigest.cc
  925. * src/messageDigest.h
  926. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  927. Made string literals used in SAX parser static const std::string.
  928. * src/FileMetalinkParserState.cc
  929. * src/FileMetalinkParserState.h
  930. * src/FilesMetalinkParserState.cc
  931. * src/FilesMetalinkParserState.h
  932. * src/InitialMetalinkParserState.cc
  933. * src/InitialMetalinkParserState.h
  934. * src/MetalinkMetalinkParserState.cc
  935. * src/MetalinkMetalinkParserState.h
  936. * src/PiecesMetalinkParserState.cc
  937. * src/PiecesMetalinkParserState.h
  938. * src/ResourcesMetalinkParserState.cc
  939. * src/ResourcesMetalinkParserState.h
  940. * src/VerificationMetalinkParserState.cc
  941. * src/VerificationMetalinkParserState.h
  942. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  943. Use A2STR::SLASH_C, A2STR::DOT_C instead of "/", "." respectively.
  944. * src/A2STR.cc
  945. * src/A2STR.h
  946. * src/File.cc
  947. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  948. Defined static const std::string IP("ip"), PORT("port") and use them
  949. instead of string literals.
  950. * src/DefaultPeerListProcessor.cc
  951. * src/DefaultPeerListProcessor.h
  952. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  953. Made string literals for torrent file processing static const
  954. std::string.
  955. * src/BtContext.cc
  956. * src/BtContext.h
  957. * src/DefaultBtContext.cc
  958. * src/DefaultBtContext.h
  959. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  960. Made string literal for tracker response static const std::string
  961. * src/BtAnnounce.cc
  962. * src/BtAnnounce.h
  963. * src/DefaultBtAnnounce.cc
  964. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  965. Use DHTMessage::T instead of "t".
  966. * src/DHTMessageTracker.cc (messageArrived)
  967. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  968. Made keyName static const. Made trimmed charset static const
  969. std::string.
  970. * src/Util.cc (getContentDispositionFilename)
  971. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  972. Made USER_AGENT const. Made "/" static const std::string.
  973. * src/A2STR.cc
  974. * src/A2STR.h
  975. * src/HttpRequest.cc
  976. * src/HttpRequest.h
  977. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  978. Made string listeral to static const std::string:
  979. "Content-Range", "Content-Length"
  980. * src/HttpHeader.cc
  981. * src/HttpHeader.h
  982. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  983. Made string listeral to static const std::string.
  984. * src/HttpConnection.cc
  985. * src/HttpHeader.cc
  986. * src/HttpHeader.h
  987. * src/HttpResponse.cc
  988. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  989. Made string listeral to static const std::string.
  990. * src/A2STR.cc
  991. * src/A2STR.h
  992. * src/SimpleLogger.cc
  993. * src/SimpleLogger.h
  994. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  995. Made string literal to static const std::string.
  996. Rewritten CookieParser::setField.
  997. * src/A2STR.cc
  998. * src/A2STR.h
  999. * src/CookieBoxFactory.cc
  1000. * src/CookieBoxFactory.h
  1001. * src/CookieParser.cc
  1002. * src/CookieParser.h
  1003. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1004. Made string literal to static const std::string
  1005. * src/DHTAbstractMessage.cc
  1006. * src/DHTAnnouncePeerMessage.cc
  1007. * src/DHTAnnouncePeerMessage.h
  1008. * src/DHTAnnouncePeerReplyMessage.cc
  1009. * src/DHTAnnouncePeerReplyMessage.h
  1010. * src/DHTFindNodeMessage.cc
  1011. * src/DHTFindNodeMessage.h
  1012. * src/DHTFindNodeReplyMessage.cc
  1013. * src/DHTFindNodeReplyMessage.h
  1014. * src/DHTGetPeersMessage.cc
  1015. * src/DHTGetPeersMessage.h
  1016. * src/DHTGetPeersReplyMessage.cc
  1017. * src/DHTGetPeersReplyMessage.h
  1018. * src/DHTMessage.cc
  1019. * src/DHTMessage.h
  1020. * src/DHTMessageFactoryImpl.cc
  1021. * src/DHTMessageReceiver.cc
  1022. * src/DHTPingMessage.cc
  1023. * src/DHTPingMessage.h
  1024. * src/DHTPingReplyMessage.cc
  1025. * src/DHTPingReplyMessage.h
  1026. * src/DHTQueryMessage.cc
  1027. * src/DHTQueryMessage.h
  1028. * src/DHTResponseMessage.cc
  1029. * src/DHTResponseMessage.h
  1030. * src/DHTUnknownMessage.cc
  1031. * src/DHTUnknownMessage.h
  1032. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1033. Made string literal to static const std::string
  1034. * src/BtChokeMessage.cc (toString)
  1035. * src/BtHaveAllMessage.cc (toString)
  1036. * src/BtHaveNoneMessage.cc (toString)
  1037. * src/BtInterestedMessage.cc (toString)
  1038. * src/BtNotInterestedMessage.cc (toString)
  1039. * src/BtUnchokeMessage.cc (toString)
  1040. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1041. Replaced "" with static const variable A2STR::NIL.
  1042. Replaced string comparison against "" with std::string::empty().
  1043. Added PROTO_* to Request class and use them as a protocol string
  1044. constant.
  1045. Made "started", "stopped", "completed" static const variable in
  1046. AnnounceList class.
  1047. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1048. Updated translations. Great thanks to translators.
  1049. * po/ca.po
  1050. * po/de.po
  1051. * po/fr.po
  1052. * po/it.po
  1053. * po/ja.po
  1054. * po/ru.po
  1055. * po/zh_CN.po
  1056. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1057. Updated man page; categorized options and fixed typo.
  1058. * doc/aria2c.1.txt
  1059. * doc/aria2c.1.html
  1060. * doc/aria2c.1
  1061. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1062. Removed const ref
  1063. * src/MetalinkEntry.cc (AddProtocolPreference)
  1064. * src/RequestGroup.cc (FindServerHostByHostname)
  1065. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1066. Rewritten Accept-Features handling.
  1067. * src/HttpRequestCommand.cc (createHttpRequest)
  1068. * src/a2functional.h
  1069. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1070. Changed method signature:
  1071. DHTAbstractNodeLookupTask::toEntries
  1072. * src/DHTAbstractNodeLookupTask.cc
  1073. * src/DHTAbstractNodeLookupTask.h
  1074. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1075. Changed method signature:
  1076. BtContext::computeFastSet, DefaultBtContext::extractUrlList
  1077. * src/BtContext.h
  1078. * src/DefaultBtContext.cc
  1079. * src/DefaultBtContext.h
  1080. * src/DefaultBtInteractive.cc
  1081. * test/DefaultBtContextTest.cc
  1082. * test/MockBtContext.h
  1083. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1084. Changed method signature:
  1085. MultiFileAllocationIterator::makeDiskWriterEntries
  1086. * src/MultiFileAllocationIterator.cc
  1087. * src/MultiFileAllocationIterator.h
  1088. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1089. Changed method sinature:
  1090. MetalinkEntry::toFileEntry,
  1091. MetalinkHelper::query, MetalinkHelper::parseAndQuery,
  1092. Metalinker::queryEntry
  1093. * src/Metalink2RequestGroup.cc
  1094. * src/MetalinkEntry.cc
  1095. * src/MetalinkEntry.h
  1096. * src/MetalinkHelper.cc
  1097. * src/MetalinkHelper.h
  1098. * src/Metalinker.cc
  1099. * src/Metalinker.h
  1100. * src/main.cc
  1101. * test/MetalinkHelperTest.cc
  1102. * test/MetalinkerTest.cc
  1103. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1104. Changed method sinature:
  1105. RequestGroup::getURIs
  1106. * src/RequestGroup.cc
  1107. * src/RequestGroup.h
  1108. * test/Metalink2RequestGroupTest.cc
  1109. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1110. Changed method signature:
  1111. PeerListProcessor::extractPeer
  1112. * src/CompactPeerListProcessor.cc
  1113. * src/CompactPeerListProcessor.h
  1114. * src/DefaultBtAnnounce.cc
  1115. * src/DefaultPeerListProcessor.cc
  1116. * src/DefaultPeerListProcessor.h
  1117. * src/DelegatingPeerListProcessor.cc
  1118. * src/DelegatingPeerListProcessor.h
  1119. * src/PeerListProcessor.h
  1120. * src/UTPexExtensionMessage.cc
  1121. * test/DefaultPeerListProcessorTest.cc
  1122. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1123. Changed method signature:
  1124. BtRequestFactory::createRequestMessages,
  1125. BtRequestFactory::createRequestMessagesOnEndGame
  1126. * src/BtRequestFactory.h
  1127. * src/DefaultBtInteractive.cc
  1128. * src/DefaultBtRequestFactory.cc
  1129. * src/DefaultBtRequestFactory.h
  1130. * test/DefaultBtRequestFactoryTest.cc
  1131. * test/MockBtRequestFactory.h
  1132. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1133. Changed method signature:
  1134. PieceStorage::getInFlightPieces
  1135. * src/DefaultBtProgressInfoFile.cc
  1136. * src/DefaultPieceStorage.cc
  1137. * src/DefaultPieceStorage.h
  1138. * src/PieceStorage.h
  1139. * src/UnknownLengthPieceStorage.cc
  1140. * src/UnknownLengthPieceStorage.h
  1141. * test/DefaultBtProgressInfoFileTest.cc
  1142. * test/MockPieceStorage.h
  1143. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1144. Changed method signature:
  1145. PostDownloadHandler::getNextRequestGroups
  1146. Metalink2RequestGroup::generate
  1147. RequestGroup::postDownloadProcessing
  1148. * src/BtPostDownloadHandler.cc
  1149. * src/BtPostDownloadHandler.h
  1150. * src/Metalink2RequestGroup.cc
  1151. * src/Metalink2RequestGroup.h
  1152. * src/MetalinkPostDownloadHandler.cc
  1153. * src/MetalinkPostDownloadHandler.h
  1154. * src/PostDownloadHandler.h
  1155. * src/RequestGroup.cc
  1156. * src/RequestGroup.h
  1157. * src/RequestGroupMan.cc
  1158. * src/main.cc
  1159. * test/BtPostDownloadHandlerTest.cc
  1160. * test/Metalink2RequestGroupTest.cc
  1161. * test/MetalinkPostDownloadHandlerTest.cc
  1162. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1163. Rewritten AccRequestGroup
  1164. * src/main.cc
  1165. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1166. Rewritten.
  1167. * src/TaggedItem.cc (toTagString)
  1168. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1169. Rewritten Accept-Features handling.
  1170. * src/HttpRequestCommand.cc (createHttpRequest)
  1171. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1172. Rewritten accept types handling.
  1173. * HttpRequest.cc (createRequest)
  1174. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1175. Rewritten
  1176. * src/FeatureConfig.cc (featureSummary)
  1177. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1178. Changed method signature:
  1179. PeerStorage::getActivePeers
  1180. * src/DHTPeerAnnounceEntry.cc
  1181. * src/DefaultPeerStorage.cc
  1182. * src/DefaultPeerStorage.h
  1183. * src/PeerStorage.h
  1184. * test/DefaultPeerStorageTest.cc
  1185. * test/MockPeerStorage.h
  1186. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1187. Changed method signature:
  1188. DHTPeerAnnounceStorage::getPeers,
  1189. DHTPeerAnnounceEntry::getPeers
  1190. * src/DHTGetPeersMessage.cc
  1191. * src/DHTPeerAnnounceEntry.cc
  1192. * src/DHTPeerAnnounceEntry.h
  1193. * src/DHTPeerAnnounceStorage.cc
  1194. * src/DHTPeerAnnounceStorage.h
  1195. * test/DHTAnnouncePeerMessageTest.cc
  1196. * test/DHTPeerAnnounceEntryTest.cc
  1197. * test/DHTPeerAnnounceStorageTest.cc
  1198. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1199. Changed method signature:
  1200. NameResolver::resolve
  1201. * src/DHTEntryPointNameResolveCommand.cc
  1202. * src/InitiateConnectionCommand.cc
  1203. * src/NameResolver.cc
  1204. * src/NameResolver.h
  1205. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1206. Changed method signature:
  1207. PieceStorage::getAdvertisedPieceIndexes
  1208. * src/DefaultBtInteractive.cc
  1209. * src/DefaultPieceStorage.cc
  1210. * src/DefaultPieceStorage.h
  1211. * src/PieceStorage.h
  1212. * src/UnknownLengthPieceStorage.h
  1213. * test/MockPieceStorage.h
  1214. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1215. Changed method signature:
  1216. SegmentMan::getInFlightSegment
  1217. * src/AbstractCommand.cc
  1218. * src/SegmentMan.cc
  1219. * src/SegmentMan.h
  1220. * test/SegmentManTest.cc
  1221. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1222. Changed method signature:
  1223. DHTAbstractNodeLookupTask::getNodesFromMessage
  1224. * src/DHTAbstractNodeLookupTask.cc
  1225. * src/DHTAbstractNodeLookupTask.h
  1226. * src/DHTNodeLookupTask.cc
  1227. * src/DHTNodeLookupTask.h
  1228. * src/DHTPeerLookupTask.cc
  1229. * src/DHTPeerLookupTask.h
  1230. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1231. Pass std::deque<Command*> by reference to avoid unnecessary coping.
  1232. * src/AbstractCommand.cc
  1233. * src/BtCheckIntegrityEntry.cc
  1234. * src/BtCheckIntegrityEntry.h
  1235. * src/BtFileAllocationEntry.cc
  1236. * src/BtFileAllocationEntry.h
  1237. * src/BtSetup.cc
  1238. * src/BtSetup.h
  1239. * src/CheckIntegrityCommand.cc
  1240. * src/CheckIntegrityEntry.h
  1241. * src/ChecksumCheckIntegrityEntry.cc
  1242. * src/ChecksumCheckIntegrityEntry.h
  1243. * src/DHTSetup.cc
  1244. * src/DHTSetup.h
  1245. * src/DownloadEngine.cc
  1246. * src/FileAllocationCommand.cc
  1247. * src/FileAllocationEntry.h
  1248. * src/RequestGroup.cc
  1249. * src/RequestGroup.h
  1250. * src/RequestGroupMan.cc
  1251. * src/RequestGroupMan.h
  1252. * src/StreamCheckIntegrityEntry.cc
  1253. * src/StreamCheckIntegrityEntry.h
  1254. * src/StreamFileAllocationEntry.cc
  1255. * src/StreamFileAllocationEntry.h
  1256. * src/TrackerWatcherCommand.cc
  1257. * src/a2functional.h
  1258. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1259. Changed method signature:
  1260. BNode::findClosestKNodes, BNode:: enumerateBucket,
  1261. DHTBucket::getGoodNodes,
  1262. DHTRoutingTable::getClosestKNodes, DHTRoutingTable::getBuckets
  1263. * src/BNode.cc
  1264. * src/BNode.h
  1265. * src/DHTAbstractNodeLookupTask.cc
  1266. * src/DHTAutoSaveCommand.cc
  1267. * src/DHTBucket.cc
  1268. * src/DHTBucket.h
  1269. * src/DHTBucketRefreshTask.cc
  1270. * src/DHTFindNodeMessage.cc
  1271. * src/DHTGetPeersMessage.cc
  1272. * src/DHTRoutingTable.cc
  1273. * src/DHTRoutingTable.h
  1274. * test/BNodeTest.cc
  1275. * test/DHTBucketTest.cc
  1276. * test/DHTRoutingTableTest.cc
  1277. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1278. In piece selection functions, Pass std::deque<...> by reference rather
  1279. than returning it.
  1280. * src/BitfieldMan.cc
  1281. * src/BitfieldMan.h
  1282. * src/DefaultBtRequestFactory.cc
  1283. * src/DefaultPieceStorage.cc
  1284. * src/Piece.cc
  1285. * src/Piece.h
  1286. * test/BitfieldManTest.cc
  1287. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1288. Implemented rarest piece first piece selection strategy.
  1289. * src/AbstractBtMessage.cc
  1290. * src/AbstractBtMessage.h
  1291. * src/BitfieldMan.cc
  1292. * src/BitfieldMan.h
  1293. * src/BtBitfieldMessage.cc
  1294. * src/BtHaveAllMessage.cc
  1295. * src/BtHaveMessage.cc
  1296. * src/DefaultPieceStorage.cc
  1297. * src/DefaultPieceStorage.h
  1298. * src/PeerInteractionCommand.cc
  1299. * src/PieceStorage.h
  1300. * src/UnknownLengthPieceStorage.h
  1301. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1302. Rewritten readData and writeData.
  1303. * src/MultiDiskAdaptor.cc
  1304. * src/MultiDiskAdaptor.h
  1305. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1306. Move \n out of the message "Usage: ...".
  1307. * src/version_usage.cc
  1308. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1309. Bump up version number to 0.13.2b.
  1310. * configure.ac
  1311. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1312. Added const qualifier to argument Exception& e.
  1313. * src/Logger.h
  1314. * src/SimpleLogger.cc
  1315. * src/SimpleLogger.h
  1316. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1317. Pool connection when CWD, SIZE command fails.
  1318. * src/FtpNegotiationCommand.cc
  1319. * src/FtpNegotiationCommand.h
  1320. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1321. Renamed HttpNullDownloadCommand as HttpSkipResponseCommand
  1322. * src/HttpResponseCommand.cc
  1323. * src/HttpSkipResponseCommand.cc
  1324. * src/HttpSkipResponseCommand.h
  1325. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1326. Pool connection when a server returns 4xx, 5xx responses.
  1327. * src/HttpNullDownloadCommand.cc
  1328. * src/HttpNullDownloadCommand.h
  1329. * src/HttpResponse.cc
  1330. * src/HttpResponse.h
  1331. * src/HttpResponseCommand.cc
  1332. * src/HttpResponseCommand.h
  1333. * test/HttpResponseTest.cc
  1334. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1335. Print usage when no URL is specifed or bad command-line option is
  1336. specified.
  1337. * src/HelpItemFactory.cc
  1338. * src/help_tags.h
  1339. * src/option_processing.cc
  1340. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1341. Removed duplicate log message.
  1342. * src/AbstractCommand.cc (asyncResolveHostname)
  1343. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1344. Updated man page: --async-dns and --ftp-reuse-connection were added.
  1345. Changed -j option's default value from 5 to 1.
  1346. Added new examples using protocol auto detection feature.
  1347. Removed -T, -M usage where it can be omitted.
  1348. * doc/aria2c.1.txt
  1349. * doc/aria2c.1.html
  1350. * doc/aria2c.1.txt
  1351. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1352. Updated command-line usage text, so that it tells users that they
  1353. can specify any number of torrent files and metalink files in
  1354. command-line.
  1355. * src/version_usage.cc
  1356. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1357. Changed the default value of -j option to 1.
  1358. * src/HelpItemFactory.cc
  1359. * src/option_processing.cc
  1360. * src/usage_text.h
  1361. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1362. Added the ability to reuse connection in FTP and it is enabled by
  1363. default. It can be disabled by --ftp-reuse-connection=false option.
  1364. * src/Command.cc
  1365. * src/DownloadCommand.cc
  1366. * src/FtpDownloadCommand.cc
  1367. * src/FtpDownloadCommand.h
  1368. * src/FtpFinishDownloadCommand.cc
  1369. * src/FtpFinishDownloadCommand.h
  1370. * src/FtpInitiateConnectionCommand.cc
  1371. * src/FtpNegotiationCommand.cc
  1372. * src/FtpNegotiationCommand.h
  1373. * src/HelpItemFactory.cc
  1374. * src/Makefile.am
  1375. * src/Makefile.in
  1376. * src/OptionHandlerFactory.cc
  1377. * src/option_processing.cc
  1378. * src/prefs.h
  1379. * src/usage_text.h
  1380. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1381. Call Command::transitStatus() before calling Command::execute(),
  1382. so that the status change made in execute() is not cleared.
  1383. * src/DownloadEngine.cc
  1384. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1385. Removed forward declaration of SocketCore class.
  1386. * src/HttpDownloadCommand.h
  1387. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1388. Set Request::setKeepAliveHint() and Request::setPipeliningHint()
  1389. in InitiateConnectionCommandFactory. They should be set only when
  1390. the protocol is HTTP or HTTPS.
  1391. * src/InitiateConnectionCommandFactory.cc
  1392. * src/RequestGroup.cc
  1393. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1394. Fixed infinite loop in checksum checking.
  1395. * src/IteratableChecksumValidator.cc
  1396. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1397. Set _supportsPersistentConnection to true by default.
  1398. * src/Request.cc
  1399. * src/RequestGroup.cc
  1400. * test/HttpRequestTest.cc
  1401. * test/RequestTest.cc
  1402. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1403. Added timeout to socket pool. The default timeout is 15 seconds,
  1404. which is the same value Apache uses.
  1405. * src/DownloadEngine.cc
  1406. * src/DownloadEngine.h
  1407. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1408. Fixed misuse of multimap::find()
  1409. * src/HttpHeader.cc
  1410. * test/HttpHeaderTest.cc
  1411. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1412. Rewritten name resolver. Now async DNS can be disabled by --async-dns
  1413. option.
  1414. The asynchronous DNS is not capable of IPv6 yet.
  1415. By disabling asynchronous DNS, aria2 is IPv6 enabled application, at
  1416. least for HTTP download.
  1417. * src/AbstractCommand.cc
  1418. * src/AbstractCommand.h
  1419. * src/AsyncNameResolver.cc
  1420. * src/AsyncNameResolver.h
  1421. * src/DHTEntryPointNameResolveCommand.cc
  1422. * src/DHTEntryPointNameResolveCommand.h
  1423. * src/DownloadEngine.cc
  1424. * src/DownloadEngine.h
  1425. * src/FtpInitiateConnectionCommand.cc
  1426. * src/FtpInitiateConnectionCommand.h
  1427. * src/HelpItemFactory.cc
  1428. * src/HttpInitiateConnectionCommand.cc
  1429. * src/HttpInitiateConnectionCommand.h
  1430. * src/InitiateConnectionCommand.cc
  1431. * src/InitiateConnectionCommand.h
  1432. * src/Makefile.am
  1433. * src/Makefile.in
  1434. * src/NameResolver.cc
  1435. * src/NameResolver.h
  1436. * src/OptionHandlerFactory.cc
  1437. * src/SocketCore.cc
  1438. * src/SocketCore.h
  1439. * src/Util.cc
  1440. * src/Util.h
  1441. * src/option_processing.cc
  1442. * src/prefs.h
  1443. * src/usage_text.h
  1444. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1445. Updated man page: --quiet, --header were added.
  1446. --metalink-servers and --enable-http-keep-alive option were updated.
  1447. * doc/aria2c.1
  1448. * doc/aria2c.1.html
  1449. * doc/aria2c.1.txt
  1450. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1451. Enable HTTP keep-alive by default.
  1452. * src/HelpItemFactory.cc
  1453. * src/option_processing.cc
  1454. * src/usage_text.h
  1455. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1456. Disable http keep-alive if the remote server is not HTTP/1.1.
  1457. * src/HttpConnection.cc
  1458. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1459. Receive content body of 302 response so that the connection can be
  1460. reused later when http keep-alive is enabled.
  1461. * src/HttpNullDownloadCommand.cc
  1462. * src/HttpNullDownloadCommand.h
  1463. * src/HttpResponseCommand.cc
  1464. * src/HttpResponseCommand.h
  1465. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1466. const SharedHandle<Request> -> const SharedHandle<Request>&
  1467. * src/FtpDowndloadCommand.cc
  1468. * src/FtpDowndloadCommand.h
  1469. * src/HttpDownloadCommand.cc
  1470. * src/HttpDownloadCommand.h
  1471. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1472. Fixed the bug that the control file(.aria2 file) is not renamed
  1473. according to tryAutoFileRenaming().
  1474. tryAutoFileRenaming() was rewritten so that if both renamed file and
  1475. its control file exist, use them and continue download.
  1476. The old implementation didn't take into account of control file's
  1477. existence, so basically you couldn't continue download of renamed file.
  1478. * src/BtProgressInfoFile.h
  1479. * src/DefaultBtProgressInfoFile.cc
  1480. * src/DefaultBtProgressInfoFile.h
  1481. * src/NullProgressInfoFile.h
  1482. * src/RequestGroup.cc
  1483. * test/DefaultBtProgressInfoFileTest.cc
  1484. * test/MockBtProgressInfoFile.h
  1485. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1486. Change the default value of --metalink-servers option from `5' to `1'.
  1487. * src/HelpItemFactory.cc
  1488. * src/option_processing.cc
  1489. * src/usage_text.h
  1490. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1491. Reimplemented transparent metalink using Accept request header.
  1492. * src/HttpRequest.cc
  1493. * src/HttpRequest.h
  1494. * src/HttpRequestCommand.cc
  1495. * src/Metalink2RequestGroup.cc
  1496. * src/RequestGroup.cc
  1497. * src/RequestGroup.h
  1498. * test/HttpRequestTest.cc
  1499. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1500. Bump up version number to 0.13.2a
  1501. * configure.ac
  1502. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1503. Updated configure.ac using the result of autoscan.
  1504. * configure.ac
  1505. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1506. Fixed compilation error without gcrypt/openssl.
  1507. * src/DownloadCommand.cc
  1508. * src/DownloadCommand.h
  1509. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1510. Reorganized version information so that it can be displayed in a
  1511. standard terminal screen without scrolling.
  1512. Removed http, ftp from Configuration section, because they are always
  1513. enabled.
  1514. * src/FeatureConfig.cc
  1515. * src/FeatureConfig.h
  1516. * src/main.cc
  1517. * src/messageDigest.cc
  1518. * src/messageDigest.h
  1519. * src/version_usage.cc
  1520. * test/FeatureConfigTest.cc
  1521. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1522. Masked user ID in log.
  1523. * src/FtpConnection.cc (sendUser)
  1524. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1525. Removed query part from filename in HTTP download. The query part means
  1526. the substring after "?" in URL. Firefox seems do the same thing.
  1527. A query part is sometimes very long and not suitable to filename,
  1528. so I think it is better to remove it from filename.
  1529. * src/HttpRequest.cc
  1530. * src/HttpRequest.h
  1531. * src/Request.cc
  1532. * src/Request.h
  1533. * test/HttpRequestTest.cc
  1534. * test/RequestTest.cc
  1535. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1536. Rewritten Exception class. Throw exception object, not its pointer and
  1537. catch by reference, so that remove problematic delete operator for
  1538. catched exception.
  1539. * src/Exception.cc
  1540. * src/Exception.h
  1541. * test/ExceptionTest.cc
  1542. * src/*: All files throwing/catching exception.
  1543. * test/*: All files throwing/catching exception.
  1544. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1545. Now auto protocol detection is enabled without -Z option.
  1546. But there is a important difference between with/without -Z optoin.
  1547. For example, if you type:
  1548. aria2c http://host/file file1.torrent file2.metalink http://mirror/file
  1549. then, aria2 interprets there are 3 request groups:
  1550. (1) http://host/file, http://mirror/file <-- multi-source download
  1551. (2) file1.torrent
  1552. (3) file2.metalink
  1553. On the other hand, if you invoke above command with -Z option, it is
  1554. interpreted as 4 request groups:
  1555. (1) http://host/file
  1556. (2) file1.torrent
  1557. (3) file2.metalink
  1558. (4) http://mirror/file
  1559. I think usually user don't mix multi-source URLs and torrent files, so
  1560. there is no big problem here.
  1561. * src/main.cc
  1562. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1563. Fixed the bug that causes segmentaion fault when reading XML containing
  1564. unescapsed character like '&'.
  1565. Also a modification was made which avoids adding unnecessary
  1566. characters stack and appending unused string.
  1567. * src/ExpatMetalinkProcessor.cc
  1568. * src/FileMetalinkParserState.h
  1569. * src/FilesMetalinkParserState.h
  1570. * src/FinMetalinkParserState.h
  1571. * src/HashMetalinkParserState.h
  1572. * src/InitialMetalinkParserState.h
  1573. * src/LanguageMetalinkParserState.h
  1574. * src/MetalinkMetalinkParserState.h
  1575. * src/MetalinkParserState.h
  1576. * src/MetalinkParserStateMachine.cc
  1577. * src/MetalinkParserStateMachine.h
  1578. * src/OSMetalinkParserState.h
  1579. * src/PieceHashMetalinkParserState.h
  1580. * src/PiecesMetalinkParserState.h
  1581. * src/ResourcesMetalinkParserState.h
  1582. * src/SizeMetalinkParserState.h
  1583. * src/SkipTagMetalinkParserState.h
  1584. * src/URLMetalinkParserState.h
  1585. * src/VerificationMetalinkParserState.h
  1586. * src/VersionMetalinkParserState.h
  1587. * src/XML2SAXMetalinkProcessor.cc
  1588. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1589. Added StringFormat class, which internally calls vasprintf.
  1590. operator<< is defined for this class, so it can be used with iostream
  1591. classes nicely. SimpleLogger and following functions are rewritten
  1592. using StringFormat class.
  1593. Besides, now Logger class's methods are non-const, many classes
  1594. that has a const Logger* as a member variable are modified to remove
  1595. const qualifier from the variable declaration.
  1596. * src/HelpItemFactory.cc
  1597. * src/Request.cc
  1598. * src/SimpleLogger.cc
  1599. * src/StringFormat.cc
  1600. * src/StringFormat.h
  1601. * src/Util.cc
  1602. * src/option_processing.cc
  1603. * src/version_usage.cc
  1604. * test/StringFormatTest.cc
  1605. * src/*.h: The classes that has const Logger* as a member variable.
  1606. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1607. Log error in AccRequestGroup when reading BitTorrent/Metalink file is
  1608. failed. Also fixed memory link when exception is thrown there.
  1609. * src/main.cc (AccRequestGroup)
  1610. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1611. Added build-in "Accept-Features" support. For now only "metalink" is
  1612. used in this header field.
  1613. This "metalink" value is removed from the list when connecting URLs
  1614. fed by metalink file to avoid loop in "transparent" metlaink.
  1615. * src/HttpRequest.cc
  1616. * src/HttpRequest.h: Renamed _userHeaders as _headers. Accept-Features
  1617. header is also held in this variable. Also renamed setUserHeaders as
  1618. addHeader and it was rewritten to add header not just to clear the old
  1619. value.
  1620. * src/HttpRequestCommand.cc
  1621. * src/Metalink2RequestGroup.cc: Added the code to remove "metalink"
  1622. from "Accept-Features" list.
  1623. * src/RequestGroup.cc: Added "metalink" to "Accept-Features" by
  1624. default.
  1625. * src/RequestGroup.h
  1626. * src/TaggedItem.cc: Moved Concat class to a2functional.h.
  1627. * src/a2functional.h: Included <string> because Concat class depends on
  1628. it.
  1629. * test/HttpRequestTest.cc
  1630. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1631. Added comment
  1632. * src/RequestGroup.cc (createNextCommand)
  1633. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1634. Capitalized METHOD_GET and METHOD_HEAD
  1635. * src/Request.cc
  1636. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1637. Added getDownloadResults() method
  1638. * src/RequestGroupMan.cc
  1639. * src/RequestGroupMan.h
  1640. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1641. Fixed the bug that aria2 exits when commands is empty() but
  1642. _routineCommands are not.
  1643. * src/DownloadEngine.cc
  1644. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1645. Use the default value pulled from Option object in HelpItemFactory.
  1646. except options whose defualt value is embedded in a usage text.
  1647. * src/HelpItemFactory.cc
  1648. * src/HelpItemFactory.h
  1649. * src/option_processing.cc
  1650. * src/version_usage.cc
  1651. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1652. Added --quiet option to make aria2 quiet (no console output).
  1653. --quiet option is tagged with ADVANCED.
  1654. * src/HelpItemFactory.cc
  1655. * src/LogFactory.cc
  1656. * src/LogFactory.h
  1657. * src/MultiUrlRequestInfo.cc
  1658. * src/MultiUrlRequestInfo.h
  1659. * src/NullStatCalc.h: New class. This class prints nothing.
  1660. * src/OptionHandlerFactory.cc
  1661. * src/main.cc
  1662. * src/option_processing.cc
  1663. * src/prefs.h
  1664. * src/usage_text.h
  1665. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1666. Add HTTP tag to --header option. Removed ADVANCED tag instead.
  1667. * src/HelpItemFactory.cc (createHelpItems):
  1668. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1669. Fixed compilation error in ExpatMetalinkProcessor.cc
  1670. * src/ExpatMetalinkProcessor.cc
  1671. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1672. Reuse socket if the origin server supports HTTP keep-alive and
  1673. --enable-http-keep-alive or --enable-http-pipelining is given.
  1674. The current implementation doesn't reuse the connections established
  1675. against proxy server.
  1676. * src/AbstractCommand.cc
  1677. * src/DownloadEngine.cc
  1678. * src/DownloadEngine.h
  1679. * src/HttpDownloadCommand.cc
  1680. * src/HttpInitiateConnectionCommand.cc
  1681. * src/HttpResponseCommand.cc
  1682. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1683. Rewritten HTTP keep-alive and pipelining routine.
  1684. * src/AbstractCommand.cc
  1685. * src/HttpConnection.cc
  1686. * src/HttpDownloadCommand.cc
  1687. * src/HttpRequest.cc
  1688. * src/HttpRequestCommand.cc
  1689. * src/HttpResponseCommand.cc
  1690. * src/Request.cc
  1691. * src/Request.h
  1692. * src/RequestGroup.cc
  1693. * test/HttpRequestTest.cc
  1694. * test/HttpResponseTest.cc
  1695. * test/RequestTest.cc
  1696. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1697. Added missing setUserHeaders call
  1698. * src/HttpRequestCommand.cc
  1699. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1700. Call FileAllocationMan::nextFileAllocationEntryExists() first.
  1701. Calling FileAllocationMan::isFileAllocationBeingExecuted() is somwhat
  1702. waste of time because it is more likey false.
  1703. * src/FileAllocationDispatcherCommand.cc (execute)
  1704. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1705. Now HTTP status and version are a member variable of HttpHeader.
  1706. HTTP status is processed as a string, not integer.
  1707. * src/AbstractProxyResponseCommand.cc
  1708. * src/HttpConnection.cc
  1709. * src/HttpHeader.cc
  1710. * src/HttpHeader.h
  1711. * src/HttpHeaderProcessor.cc
  1712. * src/HttpHeaderProcessor.h
  1713. * src/HttpResponse.cc
  1714. * src/HttpResponse.h
  1715. * test/HttpHeaderProcessorTest.cc
  1716. * test/HttpResponseTest.cc
  1717. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1718. Added --header option. You can specify any number of additional HTTP headers
  1719. like:
  1720. aria2 --header="X-A: 300" --header="X-B: 900" http://host/file
  1721. Unlike other commad-line option, you can use --header option multiple times.
  1722. * src/HelpItemFactory.cc
  1723. * src/HttpRequest.{cc, h}
  1724. * src/HttpRequestCommand.cc
  1725. * src/OptionHandlerFactory.cc
  1726. * src/OptionHandlerImpl.h
  1727. * src/option_processing.cc
  1728. * src/prefs.h
  1729. * src/usage_text.h
  1730. * test/HttpRequestTest.cc (testUserHeaders)
  1731. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1732. Eliminates the time lag between sequential downloads and commands in
  1733. the same RequestGroup.
  1734. In old implementation, aria2 occasionally waits 1 seconds before
  1735. executing next command or RequestGroup.
  1736. This is really a waste of time, and new implementation eliminates
  1737. this unnecessary time lag.
  1738. * src/AbstractCommand.cc
  1739. * src/AutoSaveCommand.cc
  1740. * src/CheckIntegrityCommand.cc
  1741. * src/Command.{cc, h}
  1742. * src/DownloadEngine.{cc, h}
  1743. * src/DownloadEngineFactory.cc
  1744. * src/FileAllocationCommand.cc
  1745. * src/FileAllocationDispatcherCommand.cc
  1746. * src/FillRequestGroupCommand.cc
  1747. * src/FtpInitiateConnectionCommand.cc
  1748. * src/HaveEraseCommand.cc
  1749. * src/HttpInitiateConnectionCommand.cc
  1750. * src/HttpResponseCommand.cc
  1751. * src/RealtimeCommand.cc
  1752. * src/RequestGroup.cc
  1753. * src/RequestGroupMan.cc
  1754. * src/StreamFileAllocationEntry.cc
  1755. * src/TimeBasedCommand.{cc, h}
  1756. * src/TimedHaltCommand.cc
  1757. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1758. Rewritten SharedHandle. Now copy constructor taking raw pointer has
  1759. keyword explicit and SharedHandle's default constructor initializes
  1760. its internal obj to null, old implementation initializes it using
  1761. obj's default constructor.
  1762. To assign null, write SharedHandle<T> x(...); x.reset();
  1763. TODO: test/SharedHandleTest.cc needs more tests.
  1764. * src/SharedHandle.h
  1765. 2008-04-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1766. Fixed type in man page.
  1767. * doc/aria2c.1.txt
  1768. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1769. Merged Ross's 0.13.1+1 Cygwin compile fix patch.
  1770. * src/SimpleLogger.{cc, h}
  1771. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1772. Implemented auto protocol detection.
  1773. Now you can do:
  1774. aria2c -Z http://host/file file1.torrent file2.metalink
  1775. (Note: -Z option is required for auto protcol detection.)
  1776. Then aria2c downloads 3 files simultaneously:
  1777. 1. http://host/file
  1778. 2. file1.torrent <-- read local torrent file
  1779. 3. file2.metalink <-- read local Metalink file.
  1780. Same thing goes with -i option. Assume your uris.txt contans:
  1781. http://host/file
  1782. file1.torrent
  1783. file2.metalink
  1784. Then you can do: aria2c -i uris.txt
  1785. (Note: -Z option is not needed if -i option is given.)
  1786. * src/main.cc
  1787. * src/ProtocolDetector.{cc, h}
  1788. * test/ProtocolDetectorTest.cc
  1789. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1790. Fixed compile error without gnutls/libgcrypt/libgpg-error and openSSL
  1791. installed
  1792. * src/ARC4Encryptor.h
  1793. * src/ARC4Decryptor.h
  1794. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1795. Renamed argument from 'errno' to 'err', since errno is confused with
  1796. errno defined in errno.h.
  1797. * src/LibgcryptARC4Decryptor.h
  1798. * src/LibgcryptARC4Context.h
  1799. * src/LibgcryptDHKeyExchange.h
  1800. * src/LibgcryptARC4Encryptor.h
  1801. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1802. Rewritten choking algorithm.
  1803. * src/PeerChokeCommand.{cc, h}
  1804. * src/BtInterestedMessage.cc
  1805. * src/PeerSessionResource.{cc, h}
  1806. * src/DefaultPeerStorage.{cc, h}
  1807. * src/BtNotInterestedMessage.cc
  1808. * src/DefaultBtMessageDispatcher.{cc, h}
  1809. * src/BtMessageDispatcher.h
  1810. * src/Peer.{cc, h}
  1811. * src/BtLeecherStateChoke.{cc, h}
  1812. * src/BtSetup.cc
  1813. * src/BtSeederStateChoke.{cc, h}
  1814. * src/PeerStorage.h
  1815. * test/MockPeerStorage.h
  1816. * test/MockBtMessageDispatcher.h
  1817. 2008-04-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1818. Fixed compilation error on x84-64 platform.
  1819. * src/AuthConfig.cc: Included ostream.
  1820. 2008-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1821. Rewritten getBasename() and getDirname(), without standard library
  1822. basename(), dirname().
  1823. * src/File.cc
  1824. * test/FileTest.cc
  1825. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1826. Added Simplified Chinese translation. Also updated the following
  1827. translations: Polish, Dutch, German. Great thanks to all translators.
  1828. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1829. Suppress content-range error when 'Content-Range' response header
  1830. doesn't contains bytes-unit specifier 'bytes'
  1831. * src/HttpHeader.cc (getRange)
  1832. * test/HttpHeaderTest.cc
  1833. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1834. Fixed compilation error with g++-4.3
  1835. 2008-03-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1836. Added missing include files for MinGW
  1837. * test/HttpHeaderProcessorTest.cc
  1838. * test/DHTRoutingTableSerializerTest.cc
  1839. * test/DHTRoutingTableDeserializerTest.cc
  1840. * test/UriListParserTest.cc
  1841. 2008-03-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1842. Now download line is printed nicely with no garbage at the end of
  1843. line. I use ioctl to get the columns of terminal.
  1844. If stdout is redirected to another device, instead of carriage return,
  1845. end of line '\n' character is used. This is feature request#1909659
  1846. * src/ConsoleStatCalc.cc (calculateStat)
  1847. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1848. Included a2time.h
  1849. * src/DHTMessageDispatcher.h
  1850. * src/DHTMessageEntry.h
  1851. * src/DHTReplaceNodeTask.h
  1852. * src/DHTMessageTracker.h
  1853. * src/Util.h
  1854. * src/CookieBox.h
  1855. * src/SocketCore.h
  1856. * src/DefaultBtMessageDispatcher.h
  1857. * src/SocketCore.cc
  1858. * src/Util.cc
  1859. * src/DHTPingTask.h
  1860. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1861. Fixed high memory footprint when DHT is enabled.
  1862. This is not a memory leak, but DHTReplaceNodeTask is more frequently
  1863. queued than it is processed and the queue is getting longer. As a
  1864. consequence, momory usage is increased.
  1865. As for a fix, instead of issuing DHTReplaceNodeTask, I've implemented
  1866. replacement cache in DHTBucket which is described in Kademlia paper.
  1867. * src/DHTRoutingTable.cc (addNode): Removed the issuing of
  1868. DHTReplaceNodeTask.
  1869. * src/DHTBucket.{h, cc}
  1870. (cacheNode): New function.
  1871. (getCachedNodes): New function.
  1872. (dropNode): Push back cached node to _nodes.
  1873. * test/DHTBucketTest.cc
  1874. (testCacheNode): New test
  1875. (testDropNode): New test
  1876. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1877. Allocate memory for peekBuf in initiateSecureConnection() to avoid
  1878. the unused 4KB memory when ssl is not used.
  1879. * src/SocketCore.cc
  1880. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1881. Added summary log for peer announce storage.
  1882. * src/DHTPeerAnnounceStorage.cc (handleTimeout)
  1883. Removed cast
  1884. * src/DefaultPeerStorage.cc (addPeer)
  1885. Log exception message
  1886. * src/DHTMessageTracker.cc (handleTimeout)
  1887. Fixed casting
  1888. * test/HttpRequestTest.cc
  1889. * test/MetalinkProcessorTest.cc
  1890. * test/PieceTest.cc
  1891. * test/MetalinkEntryTest.cc
  1892. * test/SequenceTest.cc
  1893. 2008-03-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1894. * src/ParameterizedStringParser.cc (createLoop):
  1895. Removed unused variable sstep.
  1896. * src/AlphaNumberDecorator.h (decode): Rewritten.
  1897. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1898. * src/Util.{h, cc}
  1899. (parseUInt): New function.
  1900. (alphaToNum): Now returns unsigned int and 0 when overflow detected.
  1901. The actual range is uint32_t.
  1902. * test/UtilTest.cc
  1903. * src/ParameterizedStringParser.cc:
  1904. Use Util::parseUInt() for loop variables.
  1905. * test/ParameterizedStringParserTest.cc
  1906. * src/PStringNumLoop.h: Make _startValue and _endValue unsigned int.
  1907. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1908. Rewritten the functions for binding port.
  1909. * src/DHTConnectionImpl.{h, cc}
  1910. * src/PeerListenCommand.{h, cc}
  1911. * src/DHTSetup.cc
  1912. * src/BtSetup.cc
  1913. * test/DHTConnectionImplTest.cc
  1914. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1915. type cleanup for allmost all remaining files.
  1916. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1917. Type clarification
  1918. * src/PeerSessionResource.{h, cc}
  1919. * src/DefaultPieceStorage.{h, cc}
  1920. * src/Peer.{h, cc}
  1921. * test/PeerSessionResourceTest.cc
  1922. Use div function
  1923. * src/BtPieceMessage.cc (erasePieceOnDisk)
  1924. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1925. Type clarification
  1926. * src/DefaultPeerStorage.{h, cc}
  1927. * test/DefaultPeerStorageTest.cc
  1928. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1929. Type clarification: size_t for length or size, uint64_t for file
  1930. length, off_t for file offset.
  1931. * src/DefaultBtProgressInfoFile.cc
  1932. * src/DefaultBtContext.{h, cc}
  1933. * src/DefaultBtInteractive.cc
  1934. * src/DownloadCommand.{h, cc}
  1935. * src/IteratableChunkChecksumValidator.{h, cc}
  1936. * src/SegmentMan.{h, cc}
  1937. * src/SingleFileDownloadContext.{h, cc}
  1938. * src/IteratableChecksumValidator.{h, cc}
  1939. * src/BtContext.h
  1940. * src/IteratableValidator.h
  1941. * src/DownloadContext.h
  1942. * test/SingleFileDownloadContextTest.cc
  1943. * test/DefaultBtContextTest.cc
  1944. * test/MockBtContext.h
  1945. * test/Metalink2RequestGroupTest.cc
  1946. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1947. Type clarification: size_t for length or size, uint64_t for file
  1948. length, off_t for file offset.
  1949. * src/PiecedSegment.cc
  1950. * src/GrowSegment.h
  1951. * src/DefaultBtRequestFactory.h
  1952. * src/DefaultBtProgressInfoFile.cc
  1953. * src/UnknownLengthPieceStorage.h
  1954. * src/DefaultPieceStorage.cc
  1955. * src/UnknownLengthPieceStorage.cc
  1956. * src/DefaultBtInteractive.cc
  1957. * src/GrowSegment.cc
  1958. * src/BitfieldMan.h
  1959. * src/DownloadCommand.cc
  1960. * src/BtRequestFactory.h
  1961. * src/PiecedSegment.h
  1962. * src/DefaultPieceStorage.h
  1963. * src/Piece.cc
  1964. * src/DefaultBtRequestFactory.cc
  1965. * src/PieceStorage.h
  1966. * src/Segment.h
  1967. * src/Piece.h
  1968. * src/BitfieldMan.cc
  1969. * src/Util.cc
  1970. * test/DefaultBtProgressInfoFileTest.cc
  1971. * test/DefaultPieceStorageTest.cc
  1972. * test/MockPieceStorage.h
  1973. * test/BtRequestMessageTest.cc
  1974. * test/DefaultBtMessageDispatcherTest.cc
  1975. * test/BitfieldManTest.cc
  1976. * test/GrowSegmentTest.cc
  1977. * test/PieceTest.cc
  1978. * test/SegmentTest.cc
  1979. * test/SegmentManTest.cc
  1980. * test/DefaultBtRequestFactoryTest.cc
  1981. * test/MockBtRequestFactory.h
  1982. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1983. Fixed compilation error with --disable-nls
  1984. It seems that defining gettext(Msgid) to ((const char *) (Msgid))
  1985. in gettext.h causes the problem.
  1986. * src/common.h
  1987. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1988. Removed subPiece related functions.
  1989. * src/Piece.{h, cc} : Also rewritten getCompletedLength().
  1990. * src/DefaultPieceStorage.{h, cc}
  1991. * test/PieceTest.cc
  1992. * test/DefaultPieceStorageTest.cc
  1993. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1994. Use unsigned char for data store.
  1995. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1996. Bump up version number to 0.13.0+1
  1997. * configure.ac
  1998. * Release 0.13.0+1
  1999. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2000. Changed inactive connection timeout to 120.
  2001. To accept more mulually interested peers, disconnect peer when there
  2002. is no interest between us after certain time passed.
  2003. * src/DefaultBtInteractive.cc (checkActiveInteraction)
  2004. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2005. Fixed the bug that aria2 only uses first dns server in resolv.conf
  2006. when compiled with async DNS support.
  2007. * src/DownloadEngine.cc
  2008. * src/option_processing.cc: Lengthened DNS timeout to 30. I think old
  2009. value '10' will be a little bit short when some DNS servers are
  2010. offline and several DNS servers are tried. It should be configured
  2011. by command-line option.
  2012. 2008-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2013. Merged Ross's mingw patch.
  2014. * src/DHTRoutingTableDeserializer.cc
  2015. * src/DHTRoutingTableSerializer.cc
  2016. * src/Platform.{h, cc}
  2017. * src/timegm.h
  2018. * src/gettimeofday.h
  2019. * src/getaddrinfo.h
  2020. * src/SocketCore.h
  2021. * src/common.h
  2022. * src/inet_aton.h
  2023. * src/DownloadEngine.h
  2024. * src/gai_strerror.h
  2025. * src/a2netcompat.h
  2026. * configure.ac
  2027. * configure
  2028. * aclocal.m4
  2029. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2030. Included missing iostream.
  2031. * test/AllTest.cc
  2032. * test/BtDependencyTest.cc
  2033. * test/BtExtendedMessageTest.cc
  2034. * test/DHTConnectionImplTest.cc
  2035. * test/DHTMessageFactoryImplTest.cc
  2036. * test/DHTMessageTrackerEntryTest.cc
  2037. * test/DHTNodeTest.cc
  2038. * test/DHTRoutingTableSerializerTest.cc
  2039. * test/DefaultBtAnnounceTest.cc
  2040. * test/DefaultBtContextTest.cc
  2041. * test/DefaultBtMessageFactoryTest.cc
  2042. * test/DefaultExtensionMessageFactoryTest.cc
  2043. * test/HandshakeExtensionMessageTest.cc
  2044. * test/HttpResponseTest.cc
  2045. * test/MetalinkProcessorTest.cc
  2046. * test/MultiFileAllocationIteratorTest.cc
  2047. * test/SocketCoreTest.cc
  2048. * test/UTPexExtensionMessageTest.cc
  2049. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2050. Reorganized includes.
  2051. * src/NameResolver.cc
  2052. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2053. Fixed compilation error without ares/c-ares
  2054. * src/NameResolver.h:
  2055. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2056. Added a test for large file.
  2057. * test/MetalinkProcessorTest.cc (testLargeFileSize):
  2058. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2059. Fixed the bug that file size is ignored if size > INT32_MAX
  2060. * src/SizeMetalinkParserState.cc (endElement):
  2061. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2062. Bump up version number to 0.13.0
  2063. * configure.ac
  2064. * Release 0.13.0
  2065. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2066. Updated Makfefile.am to make 'make dist' work.
  2067. Now packaged filename is aria2c-VERSION.tar.bz2.
  2068. Added README, README.html, and aria2c.1.html to dist_doc_DATA.
  2069. Added LICENSE.OpenSSL to dist_noinst_DATA.
  2070. Large file support is now configured by configure script.
  2071. * configure.ac
  2072. Removed unsused source files
  2073. * src/
  2074. * test/
  2075. Removed PeerDecl.h and BtContextDecl.h. typedefs are removed to
  2076. Peer.h and BtContext.h respectively.
  2077. * src/Peer.h
  2078. * src/BtContext.h
  2079. Updated translations.
  2080. Added Polish, Thai, Indonesian, Norwegian Nynorsk, Hungarian
  2081. translations. Great thanks to all translators!;)
  2082. * po/*.{po, gmo}
  2083. 2008-02-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2084. Create MessageDigestHelper::staticSHA1DigestInit() which uses
  2085. statically declared sha1 MessageDigestContext.
  2086. * src/BtPieceMessage.cc: Use staticSHA1DigestInit() to avoid
  2087. initialization of short-lived MessageDigestContext.
  2088. * src/MessageDigestHelper.{h, cc}
  2089. * src/main.cc
  2090. Now DownloadCommand has a reference to MessageDigestContext to avoid
  2091. the initialization of MessageDigestContext every time in validating
  2092. chunk checksum.
  2093. * src/DownloadCommand.{h, cc}
  2094. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2095. Add a file descriptor which connected to fast peer(latency<1500) to
  2096. select(). This change reduced CPU load.
  2097. * src/PeerInteractionCommand.cc
  2098. * src/DefaultBtInteractive.{h, cc}
  2099. * src/BtInteractive.h
  2100. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2101. Fixed the previous insufficient fix for possible busy loop.
  2102. * src/MSEHandshake.cc (identifyHandshakeType)
  2103. Removed unused functions.
  2104. * src/MSEHandshake.{h, cc} (readDataAndDecrypt)
  2105. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2106. Fixed possible busy loop if first 20 bytes are not received for a few
  2107. minutes.
  2108. * src/MSEHandshake.{h, cc} (identifyHandshakeType)
  2109. * src/ReceiverMSEHandshakeCommand.cc
  2110. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2111. Fixed compilation error
  2112. * src/ExpatMetalinkProcessor.cc
  2113. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2114. Fixed compile error on Mac OS X, on 64Bit OS maybe.
  2115. * src/DHTBucket.cc
  2116. Removed unnecessary cast.
  2117. * src/HandshakeExtensionMessage.cc
  2118. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2119. Fixed the bug that option handler for PREF_METALINK_ENABLE_UNIQUE_PROTOCOL.
  2120. is missing.
  2121. * src/OptionHandlerFactory.cc
  2122. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2123. Fixed the bug that HAVE message is not sent for a piece they are
  2124. downloaded fom http/ftp server before any BitTorrent handshake is done
  2125. with peers.
  2126. * src/DefaultBtInteractive.cc
  2127. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2128. Removed RequestInfo.h and FileAllocator.h since they have been removed.
  2129. * src/Makefile.am
  2130. * src/Makefile.in
  2131. 2008-02-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2132. Updated README. Added html version of README and man page.
  2133. * README
  2134. * README.html
  2135. * readme2html: Shell script to generate README.html from README using
  2136. asciidoc.
  2137. * doc/aria2c.1.html
  2138. * doc/makeman: Added the line to generate aria2c.1.html
  2139. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2140. Fixed offset calculation.
  2141. * src/LibgcryptDHKeyExchange.h (computeSecret)
  2142. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2143. Rewritten itos and uitos using template. llitos and ullitos are
  2144. replaced with itos and uitos respectively.
  2145. * src/Util.{h, cc}
  2146. * test/UtilTest.cc
  2147. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2148. Fixed the bug that DH key exchange sometimes fails due to bad handling
  2149. of the number of bytes required for storing public key and shared
  2150. secret.
  2151. * src/LibgcryptDHKeyExchange.h
  2152. * src/LibsslDHKeyExchange.h: Also added function name to handleError.
  2153. * src/MSEHandshake.cc
  2154. * test/DHKeyExchangeTest.cc
  2155. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2156. Removed since they are not used.
  2157. * src/Xml2MetalinkProcessor.{h, cc}
  2158. * src/Socket.cc
  2159. * src/SegmentSplitter.{h, cc}
  2160. * test/Xml2MetalinkProcessorTest.cc
  2161. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2162. Fixed the bug that prevents aria2 from stopping other than by pressing
  2163. Ctrl-C in BitTorrent download. It is reproducible using --seed-time
  2164. option. aria2 doesn't stop even after --seed-time is satisfied and
  2165. continues to output blank lines in the console.
  2166. * src/ReceiverMSEHandshakeCommand.cc
  2167. * src/PeerReceiveHandshakeCommand.cc
  2168. * src/PeerListenCommand.cc
  2169. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2170. Bump up version number to 0.13.0rc
  2171. * configure.ac
  2172. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2173. Updated man page and some usage text.
  2174. * doc/aria2c.1.txt
  2175. * src/usage_text.h
  2176. * po/*.{po, gmo}
  2177. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2178. Updated translations. Added Finnish and Hebrew translations.
  2179. Great thanks to all translators!
  2180. * po/*.{po, gmo}
  2181. * po/LINGUAS
  2182. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2183. Log more detailed information about each message.
  2184. * src/DHTQueryMessage.{h, cc}
  2185. * src/DHTGetPeersMessage.{h, cc}
  2186. * src/DHTFindNodeReplyMessage.{h, cc}
  2187. * src/DHTGetPeersReplyMessage.{h, cc}
  2188. * src/DHTAnnouncePeerMessage.{h, cc}
  2189. * src/DHTResponseMessage.{h, cc}
  2190. * src/DHTFindNodeMessage.{h, cc}
  2191. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2192. Use constants defined in prefs.h
  2193. * src/option_processing.cc
  2194. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2195. * test/AllTest.cc: Added OpenSSL, GNUTLS initialization code.
  2196. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2197. Make room for future enchancements for IPv6 addresses.
  2198. Bump up version number of dht.dat file format to 2.
  2199. Not compatible with previous version.
  2200. * src/DHTRoutingTableSerializer.cc
  2201. * src/DHTRoutingTableDeserializer.cc
  2202. * test/DHTRoutingTableSerializerTest.cc
  2203. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2204. Added handling for the return values from
  2205. PeerMessageUtil::createcompact().
  2206. * src/DefaultBtContext.cc (computeFastSet):
  2207. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2208. Fixed abort when peer's ip address is IPv4-mapped address.
  2209. * src/DefaultBtContext.cc (computeFastSet)
  2210. Removed number-and-dots criteria, since Util::isNumberAndDotsNotation()
  2211. cannot handle IPv4-mapped addresses.
  2212. * src/DefaultBtInteractive.cc (addPeerExchangeMessage)
  2213. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2214. Proper return value handling for OpenSSL functions.
  2215. * src/LibsslDHKeyExchange.h
  2216. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2217. Random bytes generation using libgcrypt and OpenSSL.
  2218. * src/DHTUtil.{h, cc}
  2219. * test/DHTUtilTest.cc
  2220. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2221. Fixed segmentation fault when a DHT message which doesn't have 'y' key
  2222. received.
  2223. * src/DHTMessageReceiver.cc (receiveMessage)
  2224. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2225. Fixed the bug that a return code is always 0. BUG#1897704
  2226. If error occurred during the download or there exist unfinished
  2227. downloads, aria2 returns with code 1.
  2228. * src/RequestGroupMan.{h, cc}
  2229. * src/MultiUrlRequestInfo.{h, cc}
  2230. * src/main.cc
  2231. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2232. IPv6 support for SocketCore class.
  2233. TODO: In SocketCore::establishConnection(), this is insufficient to
  2234. determin the failure of connect() here because the socket is
  2235. non-blocking state. The next addresses should be tried after select().
  2236. TODO: NameResolver still uses c-ares(<= 1.4) ares_gethostbyname().
  2237. If c-ares 1.5 or newer is installed, ares_getaddrinfo() should be used
  2238. instead which address family independent.
  2239. TODO: DHTRoutingTable{Deserializer,Serializer} currently saves peer
  2240. information in a compact peer format which is for IPv4 only.
  2241. Some BitTorrent functions in PeerMessageUtil still depends on IPv4 but
  2242. this is a spec of BitTorrent protocol.
  2243. * src/SocketCore.{h, cc}
  2244. * src/PeerMessageUtil.cc
  2245. * test/SocketCoreTest.cc
  2246. * test/PeerMessageUtilTest.cc
  2247. * test/DHTConnectionImplTest.cc
  2248. Handle IPv4-mapped addresses.
  2249. * src/DHTNode.cc: Now identity is determined by node id.
  2250. * src/DHTMessageTrackerEntry.cc
  2251. Because now PeerMessageUtil::unpackcompact() could fail, the caller
  2252. should handle it.
  2253. * src/DHTRoutingTableDeserializer.cc
  2254. * src/DHTMessageFactoryImpl.cc
  2255. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2256. Change the unit of --stop option from a minute to a second.
  2257. * src/usage_text.h
  2258. * src/DownloadEngineFactory.cc
  2259. * src/OptionHandlerFactory.cc
  2260. * src/message.h
  2261. * src/TimedHaltCommand.cc
  2262. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2263. Make listening socket non-block mode.
  2264. * src/FtpConnection.cc
  2265. * src/FtpNegotiationCommand.{h, cc}
  2266. * src/PeerListenCommand.cc
  2267. Fixed the bug that cause slow ftp negotiation.
  2268. * src/FtpNegotiationCommand.{h, cc}
  2269. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2270. Added basic tag to --enable-dht, --dht-listen-port option.
  2271. * src/HelpItemFactory.cc (createHelpItems)
  2272. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2273. Updated text.
  2274. * src/usage_text.h
  2275. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2276. * src/MSEHandshake.cc (encryptAndSendData): Use std::min().
  2277. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2278. Determin _threadtholdSpeed in each constructor for
  2279. ActivePeerConnectionCommand and PeerReceiveHandshakeCommand.
  2280. * src/ActivePeerConnectionCommand.{h, cc}
  2281. * src/PeerReceiveHandshakeCommand.{h, cc}
  2282. * src/BtSetup.cc
  2283. * src/BtConstants.h
  2284. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2285. Added --bt-min-crypto-level and --bt-require-crypto options.
  2286. * src/OptionHandlerFactory.cc
  2287. * src/MSEHandshake.cc
  2288. * src/HelpItemFactory.cc
  2289. * src/option_processing.cc
  2290. * src/ReceiverMSEHandshakeCommand.cc
  2291. * src/prefs.h
  2292. * src/DefaultBtAnnounce.cc
  2293. * src/InitiatorMSEHandshakeCommand.cc
  2294. * src/usage_text.h
  2295. * test/MSEHandshakeTest.cc
  2296. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2297. Bump version number to 0.13.0b
  2298. * configure.ac
  2299. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2300. Updated doc.
  2301. * src/MessageDigestHelper.h:
  2302. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2303. Use raw message digest as a token instead of its hexadecimal
  2304. representation.
  2305. * src/DHTTokenTracker.cc (generateToken)
  2306. 2008-02-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2307. Added Message Stream Encryption(MSE) support.
  2308. Currently, aria2 accepts incoming connections with Obfuscation Header
  2309. and legacy BitTorrent Header and establishes connections with
  2310. Obfuscation Header first and if failed then retry with legacy
  2311. BitTorrent header. If plain text and ARC4 is provided, aria2 always
  2312. choose ARC4. The new option to change the default behavior is planned.
  2313. For tracker extension, "supportcrypto=1" is added statically.
  2314. * src/PeerInitiateConnectionCommand.{h, cc}
  2315. * src/PeerConnection.{h, cc}
  2316. * src/HandleRegistry.h
  2317. * src/SocketCore.h
  2318. * src/PeerReceiveHandshakeCommand.{h, cc}
  2319. * src/BtRegistry.{h, cc}
  2320. * src/PeerListenCommand.cc
  2321. * src/InitiatorMSEHandshakeCommand.{h, cc}
  2322. * src/ReceiverMSEHandshakeCommand.{h, cc}
  2323. * src/MSEHandshake.{h, cc}
  2324. * src/ARC4Encryptor.h
  2325. * src/ARC4Decryptor.h
  2326. * src/LibgcryptARC4Encryptor.h
  2327. * src/LibgcryptARC4Decryptor.h
  2328. * src/LibgcryptARC4Context.h
  2329. * src/LibsslARC4Encryptor.h
  2330. * src/LibsslARC4Decryptor.h
  2331. * src/LibsslARC4Context.h
  2332. * src/DHKeyExchange.h
  2333. * src/LibgcryptDHKeyExchange.h
  2334. * src/LibsslDHKeyExchange.h
  2335. * src/DefaultBtAnnounce.cc: Just added "supportcrypto=1" parameter.
  2336. * test/DefaultBtAnnounceTest.cc
  2337. * test/ARC4Test.cc
  2338. * test/DHKeyExchangeTest.cc
  2339. Removed prepareForRetry() because it is not used.
  2340. * src/PeerAbstractCommand.{h, cc}
  2341. * src/PeerInteractionCommand.{h, cc}
  2342. * src/PeerInitiateConnectionCommand.{h, cc}
  2343. 2008-02-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2344. Added the ability to load nodes from torrent file. These nodes are
  2345. added to the routing table when downloading that torrent.
  2346. * src/BtContext.h
  2347. * src/DefaultBtContext.{h, cc}
  2348. * src/DHTSetup.cc
  2349. * src/DHTEntryPointNameResolveCommand.{h, cc}: Now accepts list of
  2350. hostname and port pair, and resolves all of them.
  2351. * src/NameResolver.{h, cc}: Added reset().
  2352. * src/RequestGroup.cc
  2353. * test/DefaultBtContextTest.cc
  2354. * test/MockBtContext.h
  2355. Removed assert() from DefaultBtContext and throw exception instead.
  2356. * src/DefaultBtContext.cc
  2357. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2358. Fixed segmentation fault bug when exiting if dht is disabled.
  2359. * src/RequestGroup.cc
  2360. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2361. Fixed typo in log message and define the message in message.h
  2362. * src/TimedHaltCommand.cc
  2363. * src/message.h
  2364. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2365. Included RecoverableException.h to fix compilation error.
  2366. * test/DHTMessageFactoryImplTest.cc
  2367. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2368. Added test 'testDoReceivedAction' for DHTQueryMessage subclasses.
  2369. * test/DHTPingMessageTest.cc
  2370. * test/DHTGetPeersMessageTest.cc
  2371. * test/DHTFindNodeMessageTest.cc
  2372. * test/DHTAnnouncePeerMessageTest.cc
  2373. * test/MockDHTMessage.h
  2374. * test/MockDHTMessageFactory.h
  2375. * test/MockDHTMessageDispatcher.h: New class.
  2376. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2377. Added DHTMessageDispatcherImpl. Now DHTMessageDispatcher is pure
  2378. virtual.
  2379. * src/DHTMessageDispatcher.h
  2380. * src/DHTMessageDispatcherImpl.{h, cc}
  2381. * src/DHTSetup.cc
  2382. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2383. Adding handling of DHT error message. Just log error message and
  2384. throw exception.
  2385. * src/DHTMessageFactoryImpl.cc
  2386. * test/DHTMessageFactoryImplTest.cc
  2387. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2388. Added handling of dynamic cast failure.
  2389. * src/DHTNodeLookupTask.cc
  2390. * src/DHTPeerLookupTask.cc
  2391. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2392. Added the ability to stop aria2 itself when given time has passed
  2393. from start. Use --stop option to specify time in minutes.
  2394. When 0 is given, this feature is disabled.
  2395. * src/OptionHandlerFactory.cc
  2396. * src/TimeBasedCommand.h: Make _interval protected scope.
  2397. * src/HelpItemFactory.cc
  2398. * src/option_processing.cc
  2399. * src/prefs.h
  2400. * src/FillRequestGroupCommand.cc: Evaluate _e->isHaltRequested()
  2401. before calling RequestGroupMan::fillRequestGroupFromReserver().
  2402. Without this modification, the result list shows "ERR" when aria2 is
  2403. stopped by --stop option. It should be "INPR".
  2404. * src/DownloadEngine.{h, cc}
  2405. * src/DownloadEngineFactory.cc
  2406. * src/usage_text.h
  2407. * src/TimedHaltCommand.{h, cc}: New class.
  2408. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2409. Bootstrap through node added by port message.
  2410. Currently bootstrap is executed if the number of buckets in routing
  2411. table is 1.
  2412. * src/BtPortMessage.{h, cc}
  2413. * src/DefaultBtMessageFactory.{h, cc}
  2414. * src/PeerInteractionCommand.cc
  2415. * test/BtPortMessageTest.cc
  2416. * test/MockDHTTask.h
  2417. 2008-02-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2418. Extract the Peer class's member variables, which are only needed after
  2419. PeerInteractionCommand, into PeerSessionResource class.
  2420. This class is instantiated in PeerInteractionCommand class's ctor and
  2421. released in its dtor.
  2422. This will make Peer class lightweight and uses less memory for peers
  2423. which are not connected and wait in the queue.
  2424. * src/PeerChokeCommand.cc
  2425. * src/PeerSessionResource.{h, cc}
  2426. * src/PeerInteractionCommand.cc
  2427. * src/PeerAbstractCommand.cc: Note: 0 is given to onAbort() function.
  2428. * src/DefaultBtInteractive.cc
  2429. * src/BtPieceMessage.cc
  2430. * src/BtInterestedMessage.cc
  2431. * src/BtUnchokeMessage.cc
  2432. * src/DefaultPeerStorage.{h, cc}
  2433. * src/PeerInitiateConnectionCommand.cc
  2434. * src/ActivePeerConnectionCommand.cc
  2435. * src/BtNotInterestedMessage.cc
  2436. * src/DefaultBtMessageDispatcher.cc
  2437. * src/BtChokeMessage.cc
  2438. * src/BtRequestMessage.cc
  2439. * src/Peer.{h, cc}
  2440. * src/BtRegistry.h
  2441. * src/TrackerWatcherCommand.cc
  2442. * src/PeerReceiveHandshakeCommand.cc
  2443. * test/BtExtendedMessageTest.cc
  2444. * test/BtAllowedFastMessageTest.cc
  2445. * test/BtCancelMessageTest.cc
  2446. * test/DefaultPieceStorageTest.cc
  2447. * test/BtBitfieldMessageTest.cc
  2448. * test/BtHaveMessageTest.cc
  2449. * test/BtNotInterestedMessageTest.cc
  2450. * test/BtRequestMessageTest.cc
  2451. * test/PeerSessionResourceTest.cc
  2452. * test/DefaultBtMessageDispatcherTest.cc
  2453. * test/PeerTest.cc
  2454. * test/BtInterestedMessageTest.cc
  2455. * test/BtRejectMessageTest.cc
  2456. * test/BtChokeMessageTest.cc
  2457. * test/DefaultPeerStorageTest.cc
  2458. * test/BtHaveNoneMessageTest.cc
  2459. * test/BtHaveAllMessageTest.cc
  2460. * test/DefaultExtensionMessageFactoryTest.cc
  2461. * test/BtUnchokeMessageTest.cc
  2462. * test/DefaultBtMessageFactoryTest.cc
  2463. * test/HandshakeExtensionMessageTest.cc
  2464. * test/UTPexExtensionMessageTest.cc
  2465. * test/DefaultBtRequestFactoryTest.cc
  2466. * test/BtPieceMessageTest.cc
  2467. Removed typedef PeerStats.
  2468. * src/PeerStat.h
  2469. * src/SegmentMan.cc
  2470. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2471. Added std namespace to copy, remove_copy, back_inserter,
  2472. front_inserter.
  2473. * src/RequestGroupMan.cc
  2474. * src/DefaultPieceStorage.cc
  2475. * src/StreamFileAllocationEntry.cc
  2476. * src/BtFileAllocationEntry.cc
  2477. * src/RequestGroup.cc
  2478. * src/MetalinkEntry.cc
  2479. * src/DelegatingPeerListProcessor.cc
  2480. * src/DefaultBtRequestFactory.cc
  2481. * src/DefaultBtMessageDispatcher.cc
  2482. * src/version_usage.cc: Included <algorithm>
  2483. * src/main.cc
  2484. * src/MetalinkParserController.cc
  2485. * src/DefaultBtContext.cc
  2486. * src/DownloadEngineFactory.cc
  2487. * src/a2algo.h
  2488. Removed.
  2489. * test/StreamUriListParserTest.cc
  2490. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2491. Use PREF_MAX_DOWNLOAD_LIMIT as a threshold for
  2492. ActivePeerConnectionCommand when it is given and
  2493. PREF_MAX_DOWNLOAD_LIMIT < default threshold.
  2494. * src/ActivePeerConnectionCommand.{h, cc}
  2495. * src/BtSetup.cc
  2496. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2497. Only add socket to DownloadEngine's select routine when peer or
  2498. localhost is unchoked and interested. This lowers CPU usage a
  2499. little bit.
  2500. * src/PeerInteractionCommand.cc
  2501. * src/PeerAbstractCommand.{h, cc}
  2502. * src/BtInteractive.h
  2503. * src/DefaultBtInteractive.{h, cc}
  2504. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2505. Revert previous change because get_peers message is needed for
  2506. announce_peer anyway.
  2507. * src/DHTGetPeersCommand.cc
  2508. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2509. Request peers thought DHT only when download hasn't finished.
  2510. * src/DHTGetPeersCommand.cc
  2511. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2512. Force refresh bucket when startup if certain time has passed(currently 15 minutes).
  2513. * src/DHTBucketRefreshTask.{h, cc}
  2514. * src/DHTSetup.cc
  2515. 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2516. Removed "using namespace std;" from all sources. Appended std:: prefix to c++
  2517. standard classes.
  2518. Included string.h where mem* function are used.
  2519. Added namespace aria2.
  2520. 2008-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2521. Create directory before saving DHT routing table.
  2522. Now ios::failure is now handled properly.
  2523. * src/DHTAutoSaveCommand.cc
  2524. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2525. Removed unnecessary cerr.
  2526. * src/DownloadEngine.cc
  2527. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2528. Catch exception inside DHTMessageReceiver::receiveMessage().
  2529. Log unknown message.
  2530. * src/DHTMessageReceiver.{h, cc}
  2531. * src/DHTMessageFactory.h
  2532. * src/DHTMessageFactoryImpl.{h, cc}
  2533. * src/DHTMessageTracker.cc (handleTimeout): Catch and handle exception.
  2534. * src/DHTInteractionCommand.cc
  2535. * src/DHTUnknownMessage.{h, cc}
  2536. * test/DHTUnknownMessageTest.cc
  2537. * test/MockDHTMessageFactory.h
  2538. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2539. Commented out ip address comparison because a host can have multiple
  2540. ip addresses and it is hard to predict the hostname is resolved into
  2541. which one.
  2542. * test/SocketCoreTest.cc (testWriteAndReadDatagram)
  2543. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2544. * po/Makefile.in: Removed since this is generated by configure.
  2545. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2546. Fixed compiler warning about redefinition of SIZE_MAX.
  2547. Use common.h instead of config.h directly here.
  2548. * src/Platform.{h, cc}
  2549. The check of ENABLE_NLS is made in gettext.h, so it is not required
  2550. here.
  2551. * common.h
  2552. 2008-02-02 gettextize <bug-gnu-gettext@gnu.org>
  2553. Updated gettext related files.
  2554. * configure.ac (AC_CONFIG_FILES): Add intl/Makefile.
  2555. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17.
  2556. 2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2557. Added DHT functionality, compatible with mainline.
  2558. DHT is disabled by default. To enable it, give --enable-dht to aria2c.
  2559. You may need to specify entry point to DHT network using
  2560. --dht-entry-point. DHT uses UDP port to listen incoming message.
  2561. Use --dht-listen-port to specify port number. Make sure that your
  2562. firewall configuration can pass through UDP traffic to the port.
  2563. The routing table is saved in $HOME/.aria2/dht.dat.
  2564. * src/DHT*
  2565. * src/BNode.{h, cc}
  2566. * src/PeerInteractionCommand.cc: enable DHT functionality for a
  2567. particular torrent.
  2568. * src/Data.cc: Rewritten ctor.
  2569. * src/OptionHandlerFactory.cc: Added --enable-dht, --dht-listen-port,
  2570. --dht-entry-point.
  2571. * src/DefaultBtInteractive.cc: Send port message if dht is enabled.
  2572. * src/RequestGroup.cc: Initialize DHT functionality. When download
  2573. ends, remove BtContext from DHTPeerAnnounceStorage.
  2574. * src/BtPortMessage.{h, cc}: Rewritten.
  2575. * src/message.h
  2576. * src/OptionHandlerImpl.cc
  2577. * src/option_processing.cc: Added --enable-dht, --dht-listen-port,
  2578. --dht-entry-point.
  2579. * src/Dictionary.{h, cc} (remove): New function.
  2580. * src/prefs.h
  2581. * src/DefaultBtMessageFactory.h
  2582. * src/BtHandshakeMessage.cc
  2583. * src/ActivePeerConnectionCommand.cc
  2584. * src/SocketCore.{h, cc}: Added datagram socket support.
  2585. * src/DefaultBtMessageFactory.cc
  2586. * src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
  2587. Create DHT commands.
  2588. * src/BtMessageFactory.h
  2589. * src/PeerMessageUtil.{h, cc}
  2590. 2008-01-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2591. Fixed the bug that log file is not written when configuration file doesn't exist.
  2592. This is caused by using Logger class before LogFactory is not configured.
  2593. BUG #1875079
  2594. * src/option_processing.cc
  2595. Warning message "configuration doesn't exist" is only printed when --conf is
  2596. given.
  2597. * src/option_processing.cc
  2598. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2599. Use BencodeVisitor and MessageDigestHelper instead of ShaVisitor.
  2600. ShaVisitor is now deprecated and slated to be removed.
  2601. * src/DefaultBtContext.cc
  2602. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2603. Externalize message to message.h
  2604. * src/Platform.cc
  2605. * src/message.h
  2606. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2607. Set default domain and default path to cookie.
  2608. * src/HttpResponse.cc
  2609. * src/CookieBox.{h, cc}
  2610. * src/CookieParser.{h, cc}
  2611. * test/CookieParserTest.cc
  2612. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2613. Added --no-conf and --conf-path command-line option.
  2614. --no-conf option disables loading aria2.conf file.
  2615. --conf-path option changes the configuration file path. The default
  2616. file path is $HOME/.aria2/aria2.conf
  2617. Added a warning message when the configuration file is not found.
  2618. * src/HelpItemFactory.cc
  2619. * src/option_processing.cc
  2620. * src/prefs.h
  2621. * src/usage_text.h
  2622. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2623. Added the message to inform users that other help categories are
  2624. available in -h option.
  2625. * src/version_usage.cc
  2626. * src/TagContainer.{h, cc}
  2627. * test/TagContainerTest.cc
  2628. * src/TaggedItem.{h, cc}
  2629. * test/TaggedItemTest.cc
  2630. * src/HelpItem.h
  2631. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2632. Added Piece::getFirstMissingBlockIndexWithoutLock() and it is called
  2633. from PiecedSegment's ctor.
  2634. Previously Piece::getAllMissingBlockIndexes() is called from
  2635. PiecedSegment() but it is rather expensive since only first element is
  2636. used.
  2637. * src/PiecedSegment.cc
  2638. * src/Piece.{h, cc}
  2639. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2640. Rewritten get*Missing*Index functions. Now no need to allocate memory
  2641. each time these functions are called.
  2642. * src/BitfieldMan.{h, cc}
  2643. * test/BitfieldManTest.cc
  2644. * src/array_fun.h
  2645. * test/array_funTest.cc
  2646. Now BitfieldMan::countBlock() returns BitfieldMan::blocks.
  2647. Added new BitfieldMan::countFilteredBlock() to get the number of blocks
  2648. filtered. Removed unnecessary cast to int32_t.
  2649. * src/BitfieldMan.{h, cc}
  2650. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2651. Fixed the bug that EX_TOO_LONG_PAYLOAD exception is thrown if just
  2652. payload length(4bytes) are received. This happens because lenbufLength
  2653. is not updated in this particular case and successive call of
  2654. receiveMessage() overwrites payload length with bytes recieved which
  2655. are payload body.
  2656. * src/PeerConnection.{h, cc}
  2657. * src/message.h
  2658. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2659. Fixed the bug that DefaultPeerStorage::returnPeer() may delete wrong
  2660. peer if there are peers that have same ipaddr and port.
  2661. I've experiened segmentation fault and "pure virtual function was
  2662. called" error.
  2663. * src/Peer.h
  2664. * test/PeerTest.cc
  2665. * src/DefaultPeerStorage.cc
  2666. * test/DefaultPeerStorageTest.cc
  2667. 2008-01-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2668. Removed a call to isPowerOf() because it is no longer necessary here
  2669. and a request block is not always power of 2.
  2670. BUG#1866924
  2671. * src/PeerMessageUtil.cc (checkLength)
  2672. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2673. Fixed the bug that always first found Segment is removed from
  2674. usedSegmentEntries. Removed unused functions.
  2675. * src/SegmentMan.{h, cc}
  2676. * test/SegmentManTest.cc
  2677. Fixed the bug that ServerHost is not removed.
  2678. * src/RequestGroup.cc
  2679. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2680. Fixed the bug that SegmentMan::completeSegment() is not called
  2681. even if Segment is complete when --lowest-speed-limit is enabled.
  2682. BUG#1864525
  2683. * src/DownloadCommand.{h, cc}
  2684. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2685. Fixed: hash algorithm 'sha1' is always used.
  2686. * src/DownloadCommand.cc (validatePieceHash)
  2687. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2688. Added --enable-peer-exchange command-line option.
  2689. * src/OptionHandlerFactory.cc
  2690. * src/HelpItemFactory.cc
  2691. * src/option_processing.cc
  2692. * src/usage_text.h
  2693. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2694. Move extension from BtRuntime to ExtensionMessageFactory, because
  2695. extension can be specified per peer, not per torrent.
  2696. * src/DefaultBtInteractive.cc
  2697. * src/BtRuntime.h
  2698. * src/ExtendedMessagingAware.h
  2699. * src/ExtensionMessageFactory.h
  2700. * src/DefaultExtensionMessageFactory.cc
  2701. * test/DefaultExtensionMessageFactoryTest.cc
  2702. 2008-01-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2703. Added categorized option help. Specify category using --help option.
  2704. Also added the ability to search options in forward match.
  2705. * src/HelpItem.{h, cc}
  2706. * test/HelpItemTest.cc
  2707. * src/HelpItemFactory.{h, cc}
  2708. * src/TagContainer.{h, cc}
  2709. * test/TagContainerTest.cc
  2710. * src/option_processing.cc
  2711. * src/prefs.h
  2712. * src/TaggedItem.{h, cc}
  2713. * test/TaggedItemTest.cc
  2714. * src/version_usage.cc
  2715. * src/help_tags.h
  2716. * src/usage_text.h
  2717. 2008-01-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2718. Fixed segmentation fault when bad torrent metainfo is parsed.
  2719. Added dynamic_cast properly to detect the misconfiguration of metainfo
  2720. and then throw exception or skip it.
  2721. * src/DefaultBtContext.{h, cc}
  2722. * test/DefaultBtContextTest.cc
  2723. * src/AnnounceList.cc
  2724. * src/CompactPeerListProcessor.cc
  2725. * src/message.h
  2726. * src/DefaultBtAnnounce.{h, cc}
  2727. * test/DefaultBtAnnounceTest.cc
  2728. * src/BencodeVisitor.cc
  2729. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2730. Added missing "B"(=Byte). So now the message looks like this:
  2731. Your share ratio was 1.0, uploaded/downloaded=12MiB/12MiB
  2732. * src/message.h (MSG_SHARE_RATIO_REPORT)
  2733. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2734. Show the seed ratio after torrent downloads.
  2735. For example, after torrent download completed and --seed-time and
  2736. --seed-ratio conditions are fulfilled, following message is printed
  2737. right after "Download complete: .....":
  2738. Your share ratio was 1.0, uploaded/downloaded=12M/12M
  2739. * src/RequestGroupMan.cc
  2740. * src/RequestGroup.{h, cc}
  2741. * src/message.h
  2742. 2007-12-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2743. Remove a defunct control file. A defunct control file means that while
  2744. it exists, but the corresponding download file is missing.
  2745. After its removal, a download restarts from the beginning.
  2746. * src/RequestGroup.cc
  2747. * src/message.h
  2748. 2007-12-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2749. Allocate bitfield in Peer when it is really used. More specifically,
  2750. bitfield in Peer is allocated after the connection is established and
  2751. deallocated when the connection is dropped.
  2752. Since 2 parameters(piece length and total length) was removed from the
  2753. constructor of Peer class, many test classes were modified accordingly.
  2754. See svn log for more detailed information.
  2755. * src/PeerInteractionCommand.cc
  2756. * src/CompactPeerListProcessor.cc
  2757. * src/Peer.cc
  2758. * src/DefaultPeerListProcessor.cc
  2759. * src/PeerListenCommand.cc
  2760. * src/PeerReceiveHandshakeCommand.cc
  2761. Fixed memory leak
  2762. * src/Piece.cc
  2763. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2764. Changed the default value of PREF_PEER_CONNECTION_TIMEOUT and
  2765. lowestSpeedLimit in ActivePeerConnectionCommand. TODO: Make them
  2766. command-line options.
  2767. * src/option_processing.cc
  2768. * src/ActivePeerConnectionCommand.cc
  2769. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2770. Send have message to peer if it already has the piece.
  2771. * src/BtHaveMessage.{h, cc}
  2772. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2773. Removed incomingPeer. Set 0 to peer's port if it is not a listening
  2774. port.
  2775. * src/DefaultPeerStorage.{h, cc}
  2776. * test/DefaultPeerStorageTest.cc
  2777. * src/HandshakeExtensionMessage.cc
  2778. * test/HandshakeExtensionMessageTest.cc
  2779. * src/Peer.{h, cc}: Added ipaddr and port to identity comparison.
  2780. * src/PeerStorage.h
  2781. * test/MockPeerStorage.h
  2782. * src/PeerListenCommand.cc
  2783. * src/PeerReceiveHandshakeCommand.cc
  2784. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2785. Added --metalink-enable-unique-protocol option.
  2786. * src/Metalink2RequestGroup.cc
  2787. * src/option_processing.cc
  2788. * src/prefs.h
  2789. * src/version_usage.cc
  2790. * doc/aria2c.1.txt
  2791. * doc/aria2c.1
  2792. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2793. Allow a peer in incomingPeer to be added peers.
  2794. * src/DefaultPeerStorage.cc
  2795. * test/DefaultPeerStorageTest.cc
  2796. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2797. Fixed the bug that causes aria2 not to finish download. BUG#1855875.
  2798. I could reproduce this bug in following procedure:
  2799. 1. Stop the download at the very beginning(1% or 100KB downloaded).
  2800. 2. Restart aria2.
  2801. 3. You see the download stopped around 99%.
  2802. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  2803. * src/StreamFileAllocationEntry.cc: Removed the timeout handling.
  2804. If timeout is reached, then _nextCommand is unused and it may contains
  2805. segments and they won't be canceled. Actually, timeout is not needed
  2806. here because if the server dropped connection, then retry is made.
  2807. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2808. Added uTorrent compatible Peer Exchange.
  2809. * src/BencodeVisitor.{h, cc}
  2810. * test/BencodeVisitorTest.cc
  2811. * src/BtConstants.h
  2812. * src/BtContext.h: Added 'private' flag.
  2813. * src/BtExtendedMessage.{h, cc}
  2814. * test/BtExtendedMessageTest.cc
  2815. * src/BtHandshakeMessage.{h, cc}: Set extended messaging bit in
  2816. reserved field.
  2817. * test/BtHandshakeMessageTest.cc
  2818. * src/BtMessageFactory.h
  2819. * src/BtRegistry.h
  2820. * src/BtRuntime.h: This class holds default extension message IDs for
  2821. aria2. By default, aria2 uses ID 8 for ut_pex.
  2822. * src/DefaultBtContext.cc
  2823. * src/DefaultBtInteractive.{h, cc}: This class holds _utPexEnabled.
  2824. When it is true, aria2 enables ut_pex. This value is set by
  2825. PeerInteractionCommand.
  2826. * src/DefaultBtMessageFactory.{h, cc}
  2827. * test/DefaultBtMessageFactoryTest.cc
  2828. * src/DefaultBtMessageReceiver.cc: Moved the code of fast extension
  2829. handling to DefaultBtInteractive class.
  2830. * src/DefaultExtensionMessageFactory.{h, cc}
  2831. * test/DefaultExtensionMessageFactoryTest.cc
  2832. * src/DefaultPeerStorage.cc: Returns false if a peer is already in
  2833. the container(peers and incomingPeers. The equality is determined by
  2834. Peer::id).
  2835. * test/DefaultPeerStorageTest.cc
  2836. * src/ExtensionMessage.h
  2837. * test/MockExtensionMessage.h
  2838. * src/ExtensionMessageFactory.h
  2839. * test/MockExtensionMessageFactory.h
  2840. * src/HandshakeExtensionMessage.{h, cc}
  2841. * test/HandshakeExtensionMessageTest.cc
  2842. * src/MetaEntry.h
  2843. * src/Peer.{h, cc}
  2844. * src/PeerInteractionCommand.cc
  2845. * src/PeerReceiveHandshakeCommand.cc: Evaluate the return value of
  2846. addIncomingPeer.
  2847. * src/PeerMessageUtil.{h, cc}
  2848. * src/PeerObject.h
  2849. * src/UTPexExtensionMessage.{h, cc}
  2850. * test/UTPexExtensionMessageTest.cc
  2851. * src/message.h
  2852. * src/prefs.h
  2853. Fixed the bug that returns incomplete data when it contains null
  2854. character. A convenient constructor was also added.
  2855. * src/Data.{h, cc}
  2856. Rewritten.
  2857. * src/CompactPeerListProcessor.cc
  2858. Fixed typos.
  2859. * src/message.h
  2860. * src/MetaFileUtil.cc
  2861. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2862. Added "Status Legend" label to the explanation text of 'stat' in
  2863. download result and moved it to the last. BUG#1848214
  2864. * src/RequestGroupMan.cc
  2865. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2866. Fixed the bug that -lexpat is always added to aria2c_LDADD.
  2867. * src/Makefie.am
  2868. * test/Makefile.am
  2869. 2007-12-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2870. Fixed the bug that prevents aria2 from loading cookie file when expire
  2871. value is greater than 2^31-1. BUG#1851066
  2872. * src/CookieBoxFactory.cc
  2873. * test/CookieBoxFactoryTest.cc
  2874. 2007-12-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2875. Fixed possible memory leak when an exception is thrown.
  2876. * src/XML2SAXMetalinkProcessor.cc
  2877. Added Expat support. If both libxml2 and Expat are installed, then
  2878. libxml2 is used by default.
  2879. MetalinkProcessorFactory chooses from XML2SAXMetalinkProcessor and
  2880. ExpatMetalinkProcessor according to the configuration.
  2881. * src/ExpatMetalinkProcessor.{h, cc}
  2882. * src/main.cc: Removed libxml2 specific header and init/free function.
  2883. * src/MetalinkProcessorFactory.{h, cc}
  2884. * src/MetalinkHelper.cc
  2885. * src/Metalinker.h: Removed unnecessary libxml2 header.
  2886. * src/MetalinkProcessor.h
  2887. * test/XML2SAXMetalinkProcessorTest.cc: Removed because
  2888. MetalinkProcessorTest is used instead.
  2889. * test/MetalinkProcessorTest.cc: Added. It is actually the same with
  2890. XML2SAXMetalinkProcessor, replaced XML2SAXMetalinkProcessor with
  2891. MetalinkProcessorFactory::newInstance().
  2892. * m4/libexpat.m4
  2893. * configure.ac: Added configuration options for libexpat.
  2894. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2895. Disabled -s option in metalink download.
  2896. * src/Metalink2RequestGroup.cc
  2897. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2898. If several protocols are available for a mirror in metalink file,
  2899. aria2 now use one of them. --metalink-preferred-protocol option was
  2900. added to specify the preference of protocol.
  2901. * src/AbstractCommand.cc
  2902. * src/OptionHandlerFactory.cc
  2903. * src/ServerHost.{h, cc}
  2904. * src/Metalink2RequestGroup.cc
  2905. * src/RequestGroup.{h, cc}
  2906. * test/RequestGroupTest.cc
  2907. * src/option_processing.cc
  2908. * src/prefs.h
  2909. * src/HttpResponseCommand.cc
  2910. * src/MetalinkResource.{h, cc}
  2911. * src/FtpNegotiationCommand.cc
  2912. * src/MetalinkEntry.{h, cc}
  2913. * src/MetalinkEntryTest.cc
  2914. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2915. Code cleanup and added debug log.
  2916. * src/PeerConnection.cc
  2917. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2918. Compiler error fix: applied the patch by Tiziano Mueller
  2919. * src/RequestGroup.cc
  2920. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2921. Fixed the bug: only first announce URL is tried in AnnounceTier,
  2922. in stopped and completed event.
  2923. * src/AnnounceList.{h, cc}
  2924. * test/AnnounceListTest.cc
  2925. * src/DefaultBtAnnounce.cc
  2926. * test/DefaultBtAnnounceTest.cc
  2927. Sorted URLs.
  2928. * test/Metalink2RequestGroupTest.cc
  2929. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2930. Removed unnecessary string copy. Updated doc and corrected indentation.
  2931. * src/Base64.cc
  2932. Fixed compilation warnings
  2933. * test/DataTest.cc
  2934. * test/HttpRequestTest.cc
  2935. * test/MetaFileUtilTest.cc
  2936. * test/RequestTest.cc
  2937. * Release 0.12.0
  2938. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2939. Updated translations
  2940. * po/{de,fr,ja,nl,ru}.po
  2941. Added Brazilian Portuguese, Catalan, Italian, Spanish, Swedish
  2942. translations. Many thanks to translators.
  2943. * po/{ca,es,it,pt_BR,sv}.po
  2944. * po/LINGUAS
  2945. 2007-12-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2946. Added a notice about URL
  2947. * src/version_usage.cc
  2948. 2007-12-07 Tatsuhiro Tsujikawa <tujikawa at rednoah com>
  2949. Fixed the bug#1845750; CTRL+C does not stop torrent.
  2950. aria2 repeatedly sends stopped request when tracker returns error code.
  2951. * src/AnnounceList.cc
  2952. * test/AnnounceListTest.cc
  2953. * src/AnnounceTier.h
  2954. Added a message when ctrl-c is hit.
  2955. Now second ctrl-c is also handled in signal handler.
  2956. * src/RequestGroupMan.{h, cc}
  2957. * src/RequestGroup.{h, cc}
  2958. * src/MultiUrlRequestInfo.cc
  2959. * src/DownloadEngine.cc
  2960. * src/TrackerWatcherCommand.cc
  2961. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2962. Code cleanup
  2963. * src/Base64.cc (encode)
  2964. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2965. Changed Direct/IO enable/disable procesure in file allocation routine.
  2966. * src/SingleFileAllocationIterator.cc
  2967. (SingleFileAllocationIterator):
  2968. Disable directIO if offset is not multiple of 512.
  2969. (~SingleFileAllocationIterator): Removed a call to disableDirectIO.
  2970. * src/MultiFileAllocationIterator.cc (allocateChunk):
  2971. Enable created SingleFileAllocationIterator's directIO.
  2972. * src/FileAllocationEntry.cc
  2973. (FileAllocationEntry): Enable directIO here.
  2974. (~FileAllocationEntry): Disable directIO here.
  2975. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2976. Fixed the bug: aria2 doesn't utilize fast set index offered by peer.
  2977. * src/Peer.{h, cc}
  2978. * src/DefaultPieceStorage.cc
  2979. * test/DefaultPieceStorageTest.cc
  2980. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2981. Rewritten direct I/O support routine
  2982. * src/SingleFileAllocationIterator.cc
  2983. * src/MultiDiskAdaptor.{h, cc}
  2984. * src/ByteArrayDiskWriter.h
  2985. * src/AbstractSingleDiskAdaptor.h
  2986. * src/AbstractDiskWriter.cc
  2987. * src/DefaultPieceStorage.cc
  2988. * src/DiskWriter.h
  2989. * src/BinaryStream.h
  2990. * src/IteratableChunkChecksumValidator.cc
  2991. * src/IteratableChecksumValidator.cc
  2992. * src/CheckIntegrityEntry.cc
  2993. * src/FileAllocationEntry.cc
  2994. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2995. Fixed typo
  2996. * src/version_usage.cc
  2997. Updated doc
  2998. * doc/aria2c.1.txt
  2999. * doc/aria2c.1
  3000. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3001. Fixed compile error without message digest support.
  3002. * src/FileMetalinkParserState.cc
  3003. * src/MetalinkParserController.{h, cc}
  3004. * test/XML2SAXMetalinkProcessorTest.cc
  3005. * test/MetalinkParserControllerTest.cc
  3006. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3007. Enable direct I/O support in checksum checking.
  3008. * src/IteratableChunkChecksumValidator.{h, cc}
  3009. * test/IteratableChunkChecksumValidatorTest.cc
  3010. * src/CheckIntegrityEntry.cc
  3011. * src/PieceHashCheckIntegrityEntry.cc
  3012. * src/IteratableChecksumValidator.{h, cc}
  3013. * src/BtCheckIntegrityEntry.cc: Added doc.
  3014. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3015. Added --allow-piece-length-change option.
  3016. * src/DefaultBtProgressInfoFile.cc
  3017. * test/DefaultBtProgressInfoFileTest.cc
  3018. * src/OptionHandlerFactory.cc
  3019. * src/option_processing.cc
  3020. * src/prefs.h
  3021. * src/version_usage.cc
  3022. * doc/aria2c.1.txt
  3023. * doc/aria2c.1
  3024. Fixed: duplicated result entry appears when exception is thrown in
  3025. RequestGroup::createInitiateConnectionCommand().
  3026. * src/RequestGroupMan.cc (fillRequestGroupFromReserver):
  3027. Add RequestGroup to _requestGroup after RequetGroup::
  3028. createInitiateConnectionCommand() succeeds.
  3029. Externalized message
  3030. * src/XML2SAXMetalinkProcessor.cc
  3031. * src/message.h
  3032. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3033. Forced download abort when received negative response from http/ftp
  3034. server.
  3035. * src/HttpResponseCommand.cc
  3036. * src/FtpNegotiationCommand.cc
  3037. * src/HttpResponse.cc
  3038. * src/FtpConnection.cc
  3039. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3040. Added XML2SAXMetalinkProcessor class, which is a lot faster than
  3041. the predecessor, Xml2MetalinkParser class.
  3042. I tested them against 94KB metalink file with 1234 chunk checksums.
  3043. The new one parsed it in 22msec, while it took 6000msec with old one.
  3044. * src/XML2SAXMetalinkProcessor.{h, cc}
  3045. * test/XML2SAXMetalinkProcessorTest.cc
  3046. * src/MetalinkParserController.{h, cc}
  3047. * test/MetalinkParserControllerTest.cc
  3048. * src/MetalinkParserState.h: Also added 16 subclasses.
  3049. * src/main.cc
  3050. * src/Metalink2RequestGroup.cc
  3051. * src/MetalinkHelper.cc
  3052. * src/MetalinkEntry.cc
  3053. * src/ChunkChecksum.h
  3054. Rewritten Base64 class for better performance.
  3055. * src/Base64.{h, cc}
  3056. * test/Base64Test.cc
  3057. * src/HttpRequest.cc
  3058. 2007-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3059. Fixed the bug#1841757: aria2 will connect to server to only get
  3060. file size.
  3061. * src/StreamFileAllocationEntry.cc
  3062. * src/option_processing.cc
  3063. * src/HttpResponseCommand.cc: Now reuse connection in segmented
  3064. downloads.
  3065. * src/FtpNegotiationCommand.cc
  3066. Suppressed wrong message when finding PreDownloadHandler
  3067. * src/RequestGroup.cc
  3068. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3069. Updated usage
  3070. * src/version_usage.cc
  3071. Updated man page
  3072. * doc/aria2c.1.txt
  3073. * doc/aria2c.1
  3074. Updated po files
  3075. * po/aria2c.pot
  3076. * po/*.po
  3077. * po/*.gmo
  3078. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3079. Eliminated g++-4.2 warning
  3080. * src/DownloadHandlerConstants.{h, cc}
  3081. * src/Util.cc
  3082. * test/MetaFileUtilTest.cc
  3083. * test/PStringBuildVisitorTest.cc
  3084. Fixed bug: --check-integrity doesn't work for multi file torrent.
  3085. * src/RequestGroup.cc
  3086. * src/BtCheckIntegrityEntry.cc
  3087. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3088. Fixed a2io.h
  3089. * src/a2io.h
  3090. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3091. Added direct I/O support. The current implementation uses O_DIRECT,
  3092. which is not posix standard and is tested on linux 2.6.21.
  3093. Currently only file allocation uses direct I/O.
  3094. * src/SingleFileAllocationIterator.{h, cc}
  3095. * test/SingleFileAllocationIteratorTest.cc
  3096. * src/MultiFileAllocationIterator.{h, cc}
  3097. * test/MultiFileAllocationIteratorTest.cc
  3098. * src/BinaryStream.h
  3099. * src/DiskWriter.h
  3100. * src/AbstractDiskWriter.{h, cc}
  3101. * src/ByteArrayDiskWriter.h
  3102. * src/DiskAdaptor.h
  3103. * src/AbstractSingleDiskAdaptor.{h, cc}
  3104. * src/MultiDiskAdaptor.{h, cc}
  3105. * src/FileAllocationEntry.cc
  3106. * src/Util.{h, cc}
  3107. * src/OptionHandlerFactory.cc
  3108. * src/prefs.h
  3109. * src/version_usage.cc
  3110. * src/option_processing.cc
  3111. Moved FileAllocationMan::markCurrentFileAllocationEntryDone() to
  3112. handleException.
  3113. * src/MultiFileAllocationIterator.cc
  3114. Added EINTR handling
  3115. * src/SocketCore.cc
  3116. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3117. Updated usage
  3118. * src/version_usage.cc
  3119. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3120. Applied Ross's patch for MinGW port.
  3121. * src/DownloadEngine.h
  3122. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3123. Set Content-Type to SingleFileDownloadContext when http response is
  3124. received.
  3125. * src/HttpResponseCommand.cc
  3126. * src/HttpResponse.{h, cc}
  3127. * test/HttpResponseTest.cc
  3128. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3129. Rewritten to add content-type support.
  3130. * src/DownloadHandler.{h, cc}
  3131. * src/BtPostDownloadHandler.{h, cc}
  3132. * test/BtPostDownloadHandlerTest.cc
  3133. * src/MetalinkPostDownloadHandler.{h, cc}
  3134. * test/MetalinkPostDownloadHandlerTest.cc
  3135. * src/PostDownloadHandler.{h, cc}
  3136. * src/DownloadHandlerConstants.{h, cc}
  3137. * src/RequestGroup.cc
  3138. * src/HttpResponseCommand.cc
  3139. * src/FtpNegotiationCommand.cc
  3140. * src/SingleFileDownloadContext.{h, cc}
  3141. * src/RequestGroup.h
  3142. * src/RequestGroupCriteria.h
  3143. * src/ContentTypeRequestGroupCriteria.h
  3144. Added 'mem' option value for --follow-metalink, --follow-torrent.
  3145. If it is give, metalink/torrent file is not written to the disk, but
  3146. just is kept in memory. Parsing is occurred on memory.
  3147. * src/MetalinkHelper.{h, cc}
  3148. * src/MetalinkProcessor.h
  3149. * src/Xml2MetalinkProcessor.{h, cc}
  3150. * test/Xml2MetalinkProcessorTest.cc
  3151. * src/DownloadHandlerFactory.{h, cc}
  3152. * test/DownloadHandlerFactoryTest.cc
  3153. * src/PreDownloadHandler.{h, cc}
  3154. * src/OptionHandlerFactory.cc
  3155. * src/DefaultBtContext.{h, cc}
  3156. * test/DefaultBtContextTest.cc
  3157. * src/version_usage.cc
  3158. * src/Metalink2RequestGroup.{h, cc}
  3159. * src/RequestGroup.{h, cc}
  3160. * src/a2functional.h
  3161. * test/a2functionalTest.cc
  3162. * src/MemoryBufferPreDownloadHandler.{h, cc}
  3163. * src/OptionHandlerImpl.h
  3164. * src/prefs.h
  3165. * src/Util.{h, cc}
  3166. * test/UtilTest.cc
  3167. Keep DownloadResult rather than RequestGroup after downloads to reduce
  3168. memory usage.
  3169. * src/RequestGroupMan.{h, cc}
  3170. * src/DownloadEngine.cc
  3171. * src/BtDependency.{h, cc}: Changed the type of dependee from
  3172. WeakHandle to SharedHandle because WeakHandle could be null.
  3173. * src/RequestGroup.{h, cc}
  3174. * src/DownloadEngineFactory.cc
  3175. * src/DownloadResult.h
  3176. Set totalLength after download finished
  3177. * src/UnknownLengthPieceStorage.{h, cc}
  3178. Keep torrent file specified in metalink in memory.
  3179. * src/Metalink2RequestGroup.cc
  3180. * src/BtDependency.cc
  3181. * src/TrueRequestGroupCriteria.h
  3182. Fixed the bug: seekg is used where seekp should be used.
  3183. * src/ByteArrayDiskWriter.cc
  3184. * test/ByteArraydiskWriterTest.cc
  3185. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3186. Fixed syntax error
  3187. * test/SequenceTest.cc
  3188. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3189. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  3190. * src/RequestGroupMan.cc (isSameFileBeingDownloaded)
  3191. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  3192. * src/RequestGroup.cc (downloadFinishedByFileLength)
  3193. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3194. Added the check to see whether ares_host_callback accepts timeouts
  3195. with c-ares; only c-ares 1.5.0 or newer accepts it.
  3196. * src/NameResolver.{h, cc}
  3197. * m4/libcares.m4
  3198. * configure.ac: Set C++ for language choice.
  3199. 2007-11-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3200. Fixed: compilation fails without c-ares/ares
  3201. * src/DownloadEngine.cc (addCommand): Moved outside #ifdef
  3202. Generate http/ftp commands only when download is incomplete.
  3203. * src/BtFileAllocationEntry.cc (prepareForNextAction)
  3204. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3205. Corrected typo. Examples are removed since they are available in man
  3206. page.
  3207. * src/version_usage.cc
  3208. Updated man page.
  3209. * doc/aria2c.1
  3210. * doc/aria2c.1.txt
  3211. * doc/makeman: Commented out sed command.
  3212. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3213. Throw DlAbortEx when a remote file is not found.
  3214. * src/HttpResponse.cc
  3215. * src/FtpNegotiationCommand.cc
  3216. * src/message.h
  3217. Overwrite an existing file if --allow-overwrite=true is given.
  3218. * src/RequestGroup.cc
  3219. Removed unused functions
  3220. * src/AbstractCommand.h
  3221. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3222. Removed 'extern' from 'extern typedef ...' in src/*.h
  3223. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3224. Updated usage
  3225. * src/version_usage.cc
  3226. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3227. Trim announce URL
  3228. * src/DefaultBtContext.cc
  3229. * test/ShaVisitorTest.cc
  3230. Trim argument s. Give trimed s to exception constructor.
  3231. * src/Util.cc (parseInt)(parseLLInt)
  3232. * test/UtilTest.cc
  3233. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3234. Set precision back to 1.
  3235. * src/ConsoleStatCalc.cc (calculateStat)
  3236. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3237. Replaced strtol with Util::parseInt
  3238. * src/ChunkedEncoding.cc
  3239. * src/HttpConnection.cc
  3240. * src/CookieBoxFactory.cc
  3241. * src/ParameterizedStringParser.cc
  3242. * src/Util.cc
  3243. * test/UtilTest.cc
  3244. * test/OptionHandlerTest.cc
  3245. * src/Request.cc
  3246. Throw exception when empty string is given. The message for exception
  3247. changed.
  3248. * src/Util.cc (parseInt)(parseLLInt)
  3249. * src/message.h
  3250. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3251. Set precision to 2 because share ratio is rounded into 1.0 if precision
  3252. set to 1.
  3253. * src/ConsoleStatCalc.cc (calculateStat)
  3254. 2007-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3255. Preallocate non-requested file which is adjacent forward to requested
  3256. file('requested' files means the files given in --select-file option)
  3257. if they share a same piece.
  3258. This fixes long pause in the file system which doesn't support sparse
  3259. files like FAT32 while downloading.
  3260. * src/MultiFileAllocationIterator.{h, cc}
  3261. * test/MultiFileAllocationIteratorTest.cc
  3262. * src/FileEntry.{h, cc}
  3263. Removed unused _option.
  3264. * src/MultiDiskAdaptor.h
  3265. * test/MultiDiskAdaptorTest.cc
  3266. * src/DefaultPieceStorage.cc
  3267. Set the default value of --seed-ratio to 1.0.
  3268. If 0.0 is given, then seeding continues regardless of share ratio.
  3269. * src/version_usage.cc
  3270. * src/option_processing.cc
  3271. * src/BtSetup.cc
  3272. * doc/aria2c.1.txt
  3273. * doc/aria2c.1
  3274. Fixed: Selective download is not working in BitTorrent
  3275. * src/RequestGroup.cc
  3276. Introduced Sequence class. Use this instead of Util::unfoldRange()
  3277. * src/PieceStorage.h
  3278. * test/MockPieceStorage.h
  3279. * src/UnknownLengthPieceStorage.h
  3280. * src/DefaultPieceStorage.{h, cc}
  3281. * src/Metalink2RequestGroup.cc
  3282. * src/RequestGroup.cc
  3283. * src/Sequence.h
  3284. * test/SequenceTest.cc
  3285. * src/IntSequence.h
  3286. * src/message.h
  3287. * src/Util.{h, cc}
  3288. * test/UtilTest.cc
  3289. Added new function 'parse' to catch exception thrown by subclass's
  3290. parseArg
  3291. * src/OptionHandler.h
  3292. * src/OptionParser.cc
  3293. * src/NameMatchOptionHandler.h
  3294. * src/OptionHandlerImpl.h
  3295. * test/OptionHandlerTest.cc
  3296. Added IntegerRangeOptionHandler. Used for --listen-port and
  3297. --select-file. Now --listen-port accepts range of port.
  3298. * src/OptionHandlerFactory.cc
  3299. * src/version_usage.cc
  3300. * src/OptionHandlerImpl.h
  3301. * src/option_processing.cc
  3302. * src/BtSetup.cc
  3303. * src/PeerListenCommand.{h, cc}
  3304. * doc/aria2c.1.txt
  3305. * doc/aria2c.1
  3306. Implemented operator< for Exception class to provide easy way to print
  3307. exception stack trace.
  3308. * src/Exception.{h, cc}
  3309. * src/main.cc
  3310. * src/option_processing.cc
  3311. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3312. * src/version_usage.cc
  3313. (showVersion): Reworked.
  3314. (showUsage): Added examples.
  3315. Removed Hint for total length and file name.
  3316. * src/Metalink2RequestGroup.cc
  3317. * src/RequestGroup.{h, cc}
  3318. * src/HttpResponseCommand.cc
  3319. * src/FtpNegotiationCommand.cc
  3320. Now --follow-torrent and --follow-metalink option work properly.
  3321. * src/RequestGroup.cc
  3322. Updated man page
  3323. * doc/aria2c.1.txt
  3324. * doc/aria2c.1
  3325. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3326. Removed.
  3327. * src/PiecedSegment.{h, cc} (operator==)(operator!=)
  3328. Use Segment::operator==()
  3329. * src/HttpConnection.cc
  3330. * src/Segment.h
  3331. Updated usage
  3332. * src/version_usage.cc
  3333. Added EINTR treatment.
  3334. * src/SocketCore.cc
  3335. * src/AbstractDiskWriter.cc
  3336. Rewritten.
  3337. * src/Util.cc (rangedFileCopy)
  3338. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3339. Fixed typo.
  3340. * src/version_usage.cc
  3341. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3342. Implemented. Now -c option works fine.
  3343. * src/DefaultPieceStorage.cc (markPiecesDone)
  3344. * test/DefaultPieceStorageTest.cc
  3345. Removed.
  3346. * src/SegmentMan.{h, cc}
  3347. (markAllPiecesDone)
  3348. (markPieceDone)
  3349. Synchronized po files with
  3350. https://translations.launchpad.net/aria2/trunk/+pots/aria2c
  3351. * src/fr.po
  3352. * src/ru.po
  3353. * src/de.po
  3354. * src/ja.po
  3355. 2007-11-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3356. Added ifdef and some modifications to compile without BitTorrent,
  3357. Metalink, MessageDigest
  3358. support.
  3359. * src/PieceHashCheckIntegrityEntry.cc
  3360. * src/MetalinkEntry.h
  3361. * src/version_usage.cc
  3362. * src/main.cc
  3363. * src/DownloadEngine.{h, cc}
  3364. * src/Metalink2RequestGroup.cc
  3365. * src/Peer.cc
  3366. * src/RequestGroup.cc
  3367. * src/MetalinkHelper.cc
  3368. * test/DefaultPieceStorageTest.cc
  3369. * test/MetalinkPostDownloadHandlerTest.cc
  3370. * test/Metalink2RequestGroupTest.cc
  3371. Hide TOTAL SPD when all downloads complete.
  3372. * src/ConsoleStatCalc.cc
  3373. Log target system information.
  3374. * src/main.cc
  3375. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3376. Now --metalink-location accepts a comma-deliminated list of locations.
  3377. * src/MetalinkEntry.{h, cc}
  3378. * test/MetalinkEntryTest.cc
  3379. * src/version_usage.cc
  3380. * src/Metalink2RequestGroup.cc
  3381. * src/Xml2MetalinkProcessor.cc
  3382. * test/Xml2MetalinkProcessorTest.cc
  3383. * doc/aria2c.1.txt
  3384. * doc/aria2c.1
  3385. * src/Util.cc (toUpper)(toLower): Rewritten.
  3386. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3387. Added the ability to detect duplicate download entry which is about to
  3388. download the same file other RequestGroup is downloading.
  3389. * src/RequestGroup.cc
  3390. * src/HttpResponseCommand.cc
  3391. * src/FtpNegotiationCommand.cc
  3392. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3393. Recalculates download progress when loading a control file,
  3394. if the piece length of DownloadContext is different from the one saved
  3395. in the control file. Currently in-flight pieces are ignored.
  3396. * src/DefaultBtProgressInfoFile.cc
  3397. * test/DefaultBtProgressInfoFileTest.cc
  3398. * src/Util.{h, cc}
  3399. * test/UtilTest.cc
  3400. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3401. Do not rotate tiers in announce-list.
  3402. * src/DefaultBtAnnounce.{h, cc}: Removed trackerNumTry.
  3403. AnnounceList::allTiersFailed() used instead to detect whether all
  3404. tiers are tried and failed.
  3405. * test/DefaultBtAnnounceTest.cc
  3406. * src/AnnounceList.{h, cc}: If all tiers are tried and failed then
  3407. allTiersFailed() returns true. To reset tier pointer, call resetTier();
  3408. * test/AnnounceListTest.cc
  3409. * src/TrackerWatcherCommand.cc (execute): Removed DlAbortEx catch
  3410. clause. Catch RecoverableException instead of DlRetryEx instead.
  3411. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3412. Implemented checksum validation feature(1 checksum for each file)
  3413. The validation takes place after the download.
  3414. * src/PieceHashCheckIntegrityEntry.{h, cc}: New class.
  3415. * src/IteratableChecksumValidator.{h, cc}: Rewritten.
  3416. * src/CheckIntegrityCommand.cc: Changed log message.
  3417. * src/Metalink2RequestGroup.cc: Set checksum to
  3418. SingleFileDownloadContext.
  3419. * src/StreamCheckIntegrityEntry.{h, cc}: Now derived from
  3420. PieceHashCheckIntegrity class.
  3421. * src/BtCheckIntegrityEntry.{h, cc}: Now derived from
  3422. PieceHashCheckIntegrity class.
  3423. * src/ChecksumCheckIntegrityEntry.{h, cc}: New class.
  3424. * src/IteratableValidator.h: New class.
  3425. * src/message.h
  3426. * src/CheckIntegrityEntry.{h, cc}
  3427. * src/IteratableChunkChecksumValidator.{h, cc}
  3428. * src/SingleFileDownloadContext.h
  3429. * src/DownloadCommand.cc
  3430. --allow-overwrite=true is no longer needed to check file integrity
  3431. before download in BitTorrent download.
  3432. * src/RequestGroup.cc (getInitialCommand)
  3433. Removed RequestGroup from queue when RequestGroup::getInitialCommand()
  3434. throws exception.
  3435. * src/RequestGroupMan.cc (getInitialCommands)
  3436. 2007-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3437. urlencode the given url inside Request::parseUrl(...)
  3438. * src/Request.{h, cc}
  3439. * src/Util.{h, cc}
  3440. * test/RequestTest.cc
  3441. Removed #!metalink3! notation support because it is deleted from
  3442. the metalink specification.
  3443. * src/Request.{h, cc}
  3444. * test/RequestTest.cc
  3445. 2007-11-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3446. Don't connect server before checking file integrity at startup, if
  3447. filesize and output file path are known.
  3448. * src/AbstractCommand.cc
  3449. * src/StreamFileAllocationEntry.cc
  3450. * src/Metalink2RequestGroup.cc
  3451. * src/RequestGroup.{h, cc}
  3452. * src/HttpResponseCommand.cc
  3453. * src/FtpNegotiationCommand.cc
  3454. Added DownloadFailureException. If it is thrown, RequestGroup should
  3455. halt.
  3456. * src/AbstractCommand.cc
  3457. * src/DownloadFailureException.h
  3458. * src/RequestGroup.cc
  3459. Catch RecoverableException, instead of DlAbortEx.
  3460. * src/RequestGroupMan.cc
  3461. * src/FillRequestGroupCommand.cc
  3462. * src/MetaFileUtil.cc
  3463. * src/IteratableChunkChecksumValidator.cc
  3464. Now first parameter of MSG_DOWNLOAD_ABORTED is gid(RequestGroup::
  3465. getGID())
  3466. * src/CheckIntegrityCommand.cc
  3467. * src/message.h
  3468. Print gid instead of idx.
  3469. * src/RequestGroupMan.cc
  3470. Removed exception throwers declaration.
  3471. * src/DirectDiskAdaptor.{h, cc}
  3472. * src/SocketCore.{h, cc}
  3473. * src/MultiDiskAdaptor.{h, cc}
  3474. * src/HttpConnection.{h, cc}
  3475. * src/HttpResponse.{h, cc}
  3476. * src/DiskAdaptor.{h, cc}
  3477. * src/CopyDiskAdaptor.{h, cc}
  3478. * src/MultiDiskAdaptor.{h, cc}
  3479. * src/HttpHeaderProcessor.{h, cc}
  3480. * src/AbstractSingleDiskAdaptor.{h, cc}
  3481. * src/Util.{h, cc}
  3482. * test/UtilTest.cc
  3483. * src/DefaultDiskWriter.{h, cc}
  3484. * src/FtpConnection.{h, cc}
  3485. * src/AbstractDiskWriter.{h, cc}
  3486. Removed duplicate code.
  3487. * src/StreamCheckIntegrityEntry.cc
  3488. Removed unnecessary include.
  3489. * src/DiskWriter.h
  3490. Included Exception.h
  3491. * src/option_processing.cc
  3492. Included 2 files and added doc
  3493. * src/TrackerWatcherCommand.cc
  3494. * src/SocketCore.cc (writeData): Fixed send error with GnuTLS.
  3495. 2007-11-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3496. Changed CheckIntegrityEntry interface so that it can define
  3497. the action when all the chunk checksums are valid.
  3498. * src/CheckIntegrityEntry.h
  3499. * src/StreamCheckIntegrityEntry.{h, cc}
  3500. * src/BtCheckIntegrityEntry.{h, cc}: Currently,when all the checksums
  3501. are valid, then aira2 goes to seeding mode. Sometimes it is better
  3502. to exit rather than doing seeding. So, it would be good to toggle this
  3503. behavior.
  3504. * src/CheckIntegrityCommand.cc
  3505. * src/AbstractCommand.cc
  3506. * src/RequestGroup.cc
  3507. 2007-11-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3508. Reflect the download length of in-flight pieces.
  3509. It makes the download length readout more precise.
  3510. * src/DefaultPieceStorage.{h, cc}
  3511. * test/DefaultPieceStorageTest.cc
  3512. * src/a2functional.h
  3513. * test/a2functionalTest.cc
  3514. Lower CPU load when --max-download-limit is used.
  3515. There is up and down in speed indicator when enabling
  3516. http-pipelining but a download goes well. I think the problem is that
  3517. because http-pipelining is enabled, DownloadCommand is created for
  3518. each segment and in its constructor, PeerStat::downloadStart() is
  3519. called. In PeerStat::downloadStart(), speed calculation object is
  3520. reseted, which makes download speed zero.
  3521. * src/DownloadCommand.cc
  3522. Rewritten using accumulate.
  3523. * src/RequestGroupMan.cc (calculateStat)
  3524. Code clearnup.
  3525. * src/FtpNegotiationCommand.cc
  3526. * src/HttpResponseCommand.cc
  3527. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3528. Fixed: Can not resume: aria2 reports download already finished.
  3529. * src/AbstractCommand.{h, cc}
  3530. * src/HttpResponseCommand.cc
  3531. * src/FtpNegotiateCommand.cc
  3532. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3533. Now a file is stored in the directory specified in .metalnk file
  3534. (file[@name]).
  3535. * src/Metalink2RequestGroup.cc
  3536. Create the directory structure when opening the file if it doesn't
  3537. exist.
  3538. * src/AbstractDiskWriter.cc
  3539. * src/Util.{h, cc}
  3540. * src/File.h
  3541. * test/UtilTest.cc
  3542. Removed file name comparison
  3543. * src/Metalink2RequestGroup.cc
  3544. * src/HttpResponseCommand.cc
  3545. Rewritten using Util::mkdirs()
  3546. * src/FileEntry.cc (setupDir)
  3547. * test/FileEntryTest.cc
  3548. Updated doc
  3549. * src/SingleFileDownloadContext.h
  3550. 2007-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3551. Now SleepCommand dispatches nextCommand when halt is requested.
  3552. It avoids a possible long wait after hitting CTRL-C.
  3553. * src/SleepCommand.{h, cc}
  3554. * src/RequestGroupAware.{h, cc}
  3555. 2007-11-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3556. Fixed: the listen port sent to the tracker is wrong. If aria2 fails
  3557. to open listen port, then remove the port number from the tracker
  3558. request.
  3559. * src/DefaultBtAnnounce.cc
  3560. * test/DefaultBtAnnounceTest.cc
  3561. * test/MockPieceStorage.h
  3562. Inject randomizer to DefaultBtAnnounce and DefaultBtContext to make
  3563. them more testable.
  3564. * src/DefaultBtAnnounce.{h, cc}
  3565. * src/DefaultBtContext.{h, cc}
  3566. * src/Util.{h, cc}
  3567. * test/DefaultBtAnnounceTest.cc
  3568. * test/DefaultBtContextTest.cc
  3569. * test/UtilTest.cc
  3570. Added 'B' to upload bytes readout.
  3571. * src/ConsoleStatCalc.cc
  3572. Now the listen port for BitTorrent download is opened when it is
  3573. needed.
  3574. * src/DownloadEngineFactory.cc
  3575. * src/BtSetup.{h, cc}
  3576. * src/PeerListenCommand.{h, cc}
  3577. Now an exception thrown while parsing tracker response is now logged.
  3578. If DlAbortEx is catched, then btAnnounce->resetAnnounce() immediately
  3579. called, which means no retry is made in this case, assuming a tracker
  3580. has a problem.
  3581. * src/TrackerWatcherCommand.cc
  3582. Fixed: downloading a file whose length is unkown fails.
  3583. * src/DownloadCommand.cc
  3584. Simplified prepareForNextSegment()
  3585. * src/DownloadCommand.cc
  3586. Updated
  3587. * po/POTFILES.in
  3588. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3589. Re-implemented a file listing for Metalink, which was dropped while
  3590. http/ftp/torrent integration was being implemented.
  3591. * src/MetalinkHelper.{h, cc}: New class.
  3592. * test/MetalinkHelperTest.cc
  3593. * src/main.cc
  3594. * src/Metalink2RequestGroup.cc
  3595. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3596. Added the ability to display the detailed torrent file information.
  3597. Now -S option gives not only a file listing, but also total download
  3598. length, info hash, announce URI, piece length, the number of pieces,
  3599. and mode(single or multi-torrent).
  3600. * src/DefaultBtContext.{h, cc} (operator<<): New function.
  3601. * src/Util.cc (toStream): Show file length in a abbreviated form(like
  3602. KiB)
  3603. * test/UtilTest.cc
  3604. * src/main.cc
  3605. 2007-10-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3606. Added ftp://USER:PASSWD@Servername automatic parsing.
  3607. * src/Request.{h, cc}: Removed AuthResolvers. Added _username and
  3608. _password. Recognize username and password in URI.
  3609. * src/main.cc: Use AuthConfigFactory instead of RequestFactory.
  3610. * src/RequestGroup.cc: Use AuthConfigFactory instead of RequestFactory.
  3611. * src/RequestFactory.{h, cc}: Removed.
  3612. * src/AuthConfigFactory.{h, cc}: New class.
  3613. * src/FtpConnection.cc: Use AuthConfigFactory.
  3614. * src/HttpRequest.cc: Use AuthConfigFactory.
  3615. * test/HttpRequestTest.cc: Updated.
  3616. * test/RequestTest.cc: Updated.
  3617. * test/AuthConfigFactoryTest.cc: New class.
  3618. * test/RequestFactoryTest.cc: Removed.
  3619. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3620. Use RequestGroup::allDownloadFinished() to decide whether the control
  3621. file should be removed or saved.
  3622. * src/RequestGroup.{h, cc} (allDownloadFinished): New function.
  3623. * src/RequestGroupMan.cc (removeStoppedGroup) (save)
  3624. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3625. Use File::renameTo()
  3626. * src/DefaultBtProgressInfoFile.cc
  3627. Added --no-file-allocation-limit command-line option.
  3628. * src/version_usage.cc
  3629. * src/option_processing.cc
  3630. * src/OptionHandlerFactory.cc
  3631. * src/RequestGroup.{h, cc}
  3632. * src/BtCheckIntegrityEntry.cc
  3633. * src/StreamCheckIntegrityEntry.cc
  3634. * src/prefs.h
  3635. * doc/aria2c.1.txt
  3636. * doc/aria2c.1
  3637. Now prealloc is the default value for --file-allocation option.
  3638. * src/version_usage.cc
  3639. * src/option_processing.cc
  3640. * doc/aria2c.1.txt
  3641. * doc/aria2c.1
  3642. Don't URL-encode user-agent.
  3643. * src/HttpRequest.cc
  3644. Updated translations
  3645. * po/LINGUAS: Added nl for Dutch translation.
  3646. * po/nl.po: Added Dutch translation, thanks to A. Bram Neijt.
  3647. * po/de.po: Updated German translation, thanks to Patrick Ruckstuhl.
  3648. * po/POTFILES.in: Updated.
  3649. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3650. Added the ability to recognize url-list in a torrent file.
  3651. The retrieved URLs are attached to the corresponding FileEntry.
  3652. * src/DefaultBtContext.{h, cc}
  3653. * src/FileEntry.{h, cc}
  3654. * test/DefaultBtContextTest.cc
  3655. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3656. * src/ConsoleStatCalc.cc: Let the user know that aria2 is now seeding
  3657. after the download finishes.
  3658. 2007-10-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3659. * src/Piece.{h, cc}: Added SubPiece infrastructure to track down
  3660. the data smaller than block length.
  3661. A block length can be specified by constructor's argument.
  3662. * src/DefaultPieceStorage.{h, cc} (getMissingPiece):
  3663. Get a missing piece in the range of given FileEntry. This function is
  3664. not used in the program yet.
  3665. * src/Util.h: Added some macros.
  3666. 2007-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3667. Added HTTP/1.1 keep alive and pipelining support.
  3668. See --enable-http-keep-alive and --enable-http-pipelining option.
  3669. * src/AbstractCommand.{h, cc}: Now it has one-to-many relation to
  3670. Segment.
  3671. * src/HttpDownloadCommand.{h, cc}
  3672. * src/OptionHandlerFactory.cc
  3673. * src/HttpConnection.{h, cc}
  3674. * src/version_usage.cc
  3675. * src/HttpInitiateConnectionCommand.cc
  3676. * src/FtpInitiateConnectionCommand.cc
  3677. * src/Segment.h
  3678. * src/HttpRequestCommand.{h, cc}
  3679. * src/option_processing.cc
  3680. * src/prefs.h
  3681. * src/HttpResponseCommand.cc
  3682. * src/SegmentMan.{h, cc}
  3683. * src/FtpNegotiateCommand.cc
  3684. * src/HttpProxyResponseCommand.cc
  3685. * src/Request.cc
  3686. * src/HttpRequest.cc
  3687. * src/DownloadCommand.cc
  3688. * test/HttpRequestTest.cc
  3689. * test/RequestTest.cc
  3690. 2007-10-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3691. * src/ConsoleCalc.cc (calculateStat): Hide SPD after the download
  3692. finished.
  3693. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3694. * src/Metalink2RequestGroup.cc (generate): Throw exception instead of
  3695. catching it inside the method.
  3696. When no file entry is found in a metalink without querying user
  3697. preferences, throw the exception with the error message that suggests
  3698. metalink file is probably broken.
  3699. * src/RequestGroup.cc (postDownloadProcessing): Catch exception here.
  3700. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3701. Fixed the bug that prevents remote Metalink/Torrent file from begin
  3702. processed.
  3703. * src/RequestGroupMan.cc (removeStoppedGroup)
  3704. Added debug message.
  3705. * src/BtPostDownloadHandler.cc
  3706. * src/MetalinkPostDownloadHandler.cc
  3707. * src/PostDownloadHandler.{h, cc}
  3708. * src/RequestGroup.cc
  3709. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3710. * src/Request.cc (parseUrl): Removed unnecessary slashes around dir.
  3711. 2007-10-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3712. * src/MultiUrlRequestInfo.h: Updated the message shown when program
  3713. stops and there are any unfinished or in-progress downloads.
  3714. Added the legend of "stat".
  3715. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3716. Throw exception when chunck checksum verification fails.
  3717. * src/DownloadCommand.cc (validatePieceHash): New function.
  3718. * src/PiecedSegment.{h, cc} (clear): New function.
  3719. * src/GrowSegment.{h, cc} (clear): New function.
  3720. * src/Segment.h (clear): New function.
  3721. * src/SegmentMan.{h, cc} (validatePieceHash): Removed.
  3722. * test/SegmentTest.cc
  3723. * test/GrowSegmentTest.cc
  3724. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3725. Do not send referer when redirected.
  3726. * src/Request.cc (redirectUrl)
  3727. * test/RequestTest.cc
  3728. * test/HttpRequestTest.cc
  3729. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3730. Implemented BitTorrent/http/ftp integrated download.
  3731. I've rewritten lots of files and now some headers have forward
  3732. class declarations to reduce compile time.
  3733. The implementation is extremely alpha stage, I recommend to use this
  3734. for testing purpose only.
  3735. 2007-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3736. Fixed the compilation error on 64bit platform.
  3737. * test/HttpHeaderProcessorTest.cc
  3738. 2007-09-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3739. Merged Ross's patch that fixes compilation problem in MinGW
  3740. * test/DefaultBtProgressInfoFileTest.cc
  3741. 2007-09-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3742. Updated fr.po by sebone
  3743. * po/fr.po
  3744. Updated man page.
  3745. * doc/aria2c.1.txt
  3746. * Release 0.11.3
  3747. 2007-09-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3748. * src/MetalinkRequestInfo.cc (execute): Fixed BitTorrent download
  3749. failure in Metalink.
  3750. 2007-09-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3751. Automatically save *.aria2 control file of http/ftp download in every
  3752. 60 seconds.
  3753. * src/AutoSaveCommand.{h, cc}: New class.
  3754. * src/TimeBasedCommand.{h, cc}: New class.
  3755. * src/DownloadEngineFactory.cc (newConsoleEngine)
  3756. Disable parameterized URI support by default. Added -P option to
  3757. enable the feature.
  3758. * src/prefs.h: Added PREF_PARAMETERIZED_URI
  3759. * src/OptionHandlerFactory.cc
  3760. * src/main.cc: Also updated usages for -Z and --auto-file-renaming
  3761. Updated Japanese translation.
  3762. * po/ja.po
  3763. Updated man page.
  3764. * doc/aria2c.1.txt
  3765. * Release 0.11.3-rc
  3766. 2007-09-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3767. Now *.aria2 contorol file is first saved to *.aria2__temp and if
  3768. it is successful, then renamed to *.aria2.
  3769. This prevents *.aria2 file from being truncated or corrupted when
  3770. file system becomes out of space.
  3771. * src/DefaultBtProgressInfoFile.cc (save)
  3772. * src/SegmentMan.cc (save)
  3773. * test/DefaultBtProgressInfoFileTest.cc (testSave): Implemented.
  3774. 2007-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3775. Reduced the fragmentation of bitfield in http/ftp download.
  3776. * src/BitfieldMan.cc (getSparseMissingUnusedIndex)
  3777. * test/BitfieldManTest.cc
  3778. 2007-08-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3779. Added the ability to disable segmented download in .metalink.
  3780. aria2 can now recognize 'maxconnections' attribute in 'resources' and
  3781. 'url' tag.
  3782. * src/MetalinkEntry.{h, cc}
  3783. * src/RequestResource.{h, cc}
  3784. * src/MetalinkRequestInfo.cc
  3785. * src/Xml2MetalinkProcessor.cc
  3786. * test/Xml2MetalinkProcessorTest.cc
  3787. 2007-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3788. Added parameterized URI support.
  3789. * src/main.cc: -Z option added.
  3790. * src/OptionHandlerFactory.cc
  3791. * src/prefs.h: Added PREF_FORCE_SEQUENTIAL.
  3792. * src/PStringDatum.h: New class.
  3793. * src/PStringSegment.{h,cc}: New class.
  3794. * src/PStringNumLoop.h: New class.
  3795. * src/PStringSelect.h: New class.
  3796. * src/NumberDecorator.h: New class.
  3797. * src/FixedWidthNumberDecorator.h: New class.
  3798. * src/AlphaNumberDecorator.h: New class.
  3799. * src/PStringVisitor.h: New class.
  3800. * src/PStringBuildVisitor.{h,cc}: New class.
  3801. * src/ParameterizedStringParser.{h,cc}: New class.
  3802. * src/Util.{h,cc}
  3803. (isNumber): New function.
  3804. (isLowercase): New function.
  3805. (isUppercase): New function.
  3806. (alphaToNum): New function.
  3807. * test/ParameterizedStringParserTest.cc: New class.
  3808. * test/AlphaNumberDecoratorTest.cc: New class.
  3809. * test/PStringBuildVisitorTest.cc: New class.
  3810. * test/UtilTest.cc
  3811. (testIsNumber): New function.
  3812. (testIsLowercase): New function.
  3813. (testIsUppercase): New function.
  3814. (testAlphaToNum): New function.
  3815. Added '\n' after the error message
  3816. * src/RequestInfo.h (printDownloadAbortMessage)
  3817. Added auto file renaming feature in http(s)/ftp download.
  3818. * src/main.cc: Added --auto-file-renaming command-line option.
  3819. * src/OptionHandlerFactory.cc
  3820. * src/prefs.h: Added PREF_AUTO_FILE_RENAMING
  3821. * src/RequestGroup.{h, cc}
  3822. (shouldCancelDownloadForSafety): Rewritten
  3823. (tryAutoFileRenaming): New function.
  3824. * src/SegmentMan.{h, cc} (shouldCancelDownloadForSafety): Removed.
  3825. * src/HttpResponseCommand.cc
  3826. (executeInternal): Removed the call to RequestGroupMan::
  3827. isSameFileBeingDownloaded()
  3828. * src/FtpNegotiateCommand.cc
  3829. (recvSize): Removed the call to RequestGroupMan::
  3830. isSameFileBeingDownloaded()
  3831. * test/RequestGroupTest.cc: New class.
  3832. 2007-08-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3833. Merged Ross's patch: Removed setmode(). Use _CRT_fmode to enable binary
  3834. IO.
  3835. * src/DefaultBtProgressInfoFile.cc
  3836. * src/MetaFileUtil.cc
  3837. * src/SimpleLogger.cc
  3838. * src/SegmentMan.cc
  3839. * src/Util.cc
  3840. * src/Platform.cc
  3841. 2007-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3842. * src/Xml2MetalinkProcessor.cc (getPieceHash): Added missing .c_str().
  3843. 2007-08-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3844. Avoid sparse files if possible, because VFAT32 doesn't support it.
  3845. * src/DefaultDiskWriter.cc (initAndOpenFile)
  3846. Fixed the bug that prevents file allocation is not done when
  3847. dowloading multi-torrent file.
  3848. * src/AbstractDiskWriter.cc (openFile)
  3849. Increase the maximum number of -j option from 15 to 45.
  3850. * src/OptionHandlerFactory.cc (createOptionHandlers)
  3851. Added fr.po, thanks to Charles Landemaine.
  3852. * po/fr.po
  3853. * po/LINGUAS
  3854. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  3855. gcc 3.4.4 support:
  3856. * src/DefaultBtContext.cc: int32_t -> int
  3857. * src/main.cc: int -> int32_t, int32_t -> int
  3858. * src/messageDigest.h: uint32_t -> unsigned int
  3859. * src/NameResolver.h: int32_t -> int
  3860. * src/PeerConnection.cc: int -> int32_t
  3861. * src/SpeedCalc.cc: int32_t -> int
  3862. * src/TrackerUpdateCommand.h: int -> int32_t
  3863. * src/Util.cc: int32_t -> int
  3864. * src/Util.h: int32_t -> int
  3865. * src/Xml2MetalinkProcessor.cc: int -> uint32_t, int64_t -> uint64_t
  3866. * test/AnnounceListTest.cc: int -> int32_t
  3867. * test/ChunkedEncodingTest.cc: int -> int32_t
  3868. * test/DataTest.cc: int -> int32_t
  3869. * test/DefaultBtRequestFactoryTest.cc: int -> int32_t
  3870. * test/DefaultPeerListProcessorTest.cc: int -> int32_t
  3871. * test/DefaultPieceStorageTest.cc: int -> int32_t
  3872. * test/FeatureConfigTest.cc: int -> int32_t
  3873. * test/MetalinkEntryTest.cc: int -> int32_t
  3874. * test/MockBtRequestFactory.h: int -> int32_t
  3875. * test/MockPieceStorage.h: int -> int32_t
  3876. * test/OptionTest.cc: int -> int32_t
  3877. * test/RequestTest.cc: int -> int32_t
  3878. * test/SegmentManTest.cc: int -> int32_t
  3879. * test/Xml2MetalinkProcessorTest.cc: int -> int32_t
  3880. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  3881. Move sleep functions to Util class:
  3882. * src/Util.cc
  3883. (sleep): New function.
  3884. (usleep): New function.
  3885. * src/DownloadCommand.cc: sleep -> Util::sleep
  3886. * test/TimeSeedCriteriaTest.cc: sleep -> Util::sleep
  3887. MinGW build enhancements. The following files are added:
  3888. * src/timegm.{c,h}
  3889. Changes to support the above new files:
  3890. * configure.ac
  3891. * src/Makefile.am
  3892. * src/a2time.h
  3893. * src/Util.cc:
  3894. * src/strptime.c: Added support for %Z option.
  3895. Fixed MinGW non-blocking bug.
  3896. * src/SocketCore.cc
  3897. * src/HttpRequestCommand.cc
  3898. Miscellenous build fixes/enhancements.
  3899. * configure.ac: Added summary report.
  3900. * src/Platform.h: Tweaked #include's.
  3901. * src/a2netcompat.h: Tweaked #include's.
  3902. * src/strptime.h: Tweaked #include's.
  3903. * src/gai_strerror.c: Tweaked #include's.
  3904. * src/gai_strerror.h: _D_GETADDRINFO_H -> _D_GAI_STRERROR_H
  3905. * src/getaddrinfo.h: Moved #ifndef __MINGW32__
  3906. * src/gettimeofday.h: Added HAVE_CONFIG_H
  3907. 2007-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3908. Increased the initial connection size in BitTorrent download to 40.
  3909. * src/BtRuntime.h
  3910. Added the usage message of --peer-id-prefix option.
  3911. * src/main.cc
  3912. * Release 0.11.2
  3913. 2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3914. MessageDigestHelper is introduced in order to simplify the use
  3915. of message digest. Removed repeated code.
  3916. The message digest algorithm is now specified by string, like "sha1",
  3917. "md5".
  3918. * src/messageDigest.{h, cc}
  3919. * src/MessageDigestHelper.{h, cc}: New class.
  3920. * src/DefaultPieceStorage.cc
  3921. * src/DefaultBtContext.{h, cc}
  3922. (computeFastSet): New function.
  3923. (setInfoHash): Added for unit testing.
  3924. (setNumPieces): Added for unit testing.
  3925. * src/DefaultBtInteractive.cc
  3926. * src/BtPieceMessage.cc
  3927. * src/Peer.cc
  3928. * src/Checksum.h
  3929. * src/message.h
  3930. * src/IteratableChecksumValidator.h
  3931. * src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator
  3932. inside it.
  3933. * src/SegmentMan.{h, cc}
  3934. (checkIntegrity): Removed.
  3935. * src/IteratableChunkChecksumValidator.{h, cc}
  3936. * src/Util.h
  3937. (sha1Sum): Removed.
  3938. (simpleMessageDigest): Removed.
  3939. (fileChecksum): Removed.
  3940. (computeFastSet): Removed.
  3941. * src/ShaVisitor.cc
  3942. * src/ChunkChecksum.h
  3943. * src/DownloadCommand.cc
  3944. Removed messageDigest virtual functions.
  3945. * src/MultiDiskAdaptor.{h, cc}
  3946. * src/DiskAdaptor.h
  3947. * src/ByteArrayDiskWriter.h
  3948. * src/DiskWriter.h
  3949. * src/DiskAdaptorWriter.h
  3950. * src/AbstractSingleDiskAdaptor.{h, cc}
  3951. * src/AbstractDiskWriter.{h, cc}
  3952. Fixed comilation error when message digest is disabled.
  3953. * src/MetalinkEntry.{h, cc}
  3954. * src/MetalinkRequestInfo.cc
  3955. Removed srandom and random.
  3956. * src/SimpleRandomizer.h
  3957. Added size() virtual function to DiskAdaptor
  3958. * src/MultiDiskAdaptor.h
  3959. Fixed the bug that causes that files are not opened correctly in
  3960. multi-file torrent.
  3961. * src/TorrentRequestInfo.cc
  3962. * src/MultiDiskAdaptor.cc
  3963. Added SHA256 support
  3964. * src/messageDigest.cc
  3965. * src/Xml2MetalinkProcessor.cc
  3966. Show supported message digest algorithms
  3967. * src/main.cc
  3968. Updated contact info.
  3969. * src/main.cc
  3970. Applied Ross's patch
  3971. * src/a2netcompat.h
  3972. * src/main.cc
  3973. Fixed the bug that prevents a remote metalink from not being processed
  3974. even if '-o foo.metalink' is specified.
  3975. * src/MetalinkRequestInfo.cc
  3976. 2007-08-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3977. Merged Dan's patch:
  3978. * src/ByteArrayDiskWriter.cc: ios_base -> ios
  3979. Use va_copy to avoid core dump on amd64:
  3980. * src/SimpleLogger.cc
  3981. Updated contact info.
  3982. * src/main.cc
  3983. Added #ifdef ENABLE_MESSAGE_DIGEST to fix test errors when message
  3984. digest is not available.
  3985. * src/MetalinkEntry.h
  3986. 2007-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3987. Make a2netcompat.h include a2io.h to fix compilation error:
  3988. * src/a2netcompat.h
  3989. * src/SocketCore.cc: Removed include of a2io.h
  3990. * src/Util.cc: Removed include of a2io.h
  3991. Gather time related functions to a2time.h:
  3992. * src/a2time.h: New file.
  3993. * src/DefaultPeerStorage.cc
  3994. * src/SimpleLogger.cc
  3995. * src/Util.{h, cc}
  3996. * src/SimpleRandomizer.h
  3997. * src/TimeA2.{h,cc}
  3998. * src/DownloadCommand.cc
  3999. * src/main.cc
  4000. Removed #ifdef __MINGW32__ since gai_strerror is included in
  4001. a2netcompat.h:
  4002. * src/NameResolver.cc
  4003. Fixed compilation error without openssl:
  4004. * src/SocketCore.{h,cc}: Moved include of openssl/err.h to SocketCore.h
  4005. Added default block to suppress compiler warnings:
  4006. * src/MetalinkRequestInfo.cc (AccumulateNonP2PUrl::operator())
  4007. 2007-07-26 Ross Smith II <aria2spam at smithii dot com>
  4008. MinGW build enhancements. The following files are added:
  4009. * src/gai_strerror.{c,h}
  4010. * src/gettimeofday.{c,h}
  4011. Changes to support the above new files:
  4012. * configure.ac
  4013. * src/Makefile.am
  4014. * src/a2netcompat.h
  4015. * src/TimeA2.cc
  4016. * src/DefaultPeerStorage.cc
  4017. * src/NameResolver.cc: removed mingw_strerror() function.
  4018. * src/SocketCore.cc: removed mingw_strerror() function.
  4019. Miscellaneous MinGW build fixes.
  4020. * src/a2io.h: Use _lseeki64() instead of lseek()
  4021. * src/common.h
  4022. * src/DefaultFileAllocator.cc
  4023. * src/GlowFileAllocator.cc
  4024. * src/main.cc: Moved #include "prefs.h" to quiet compile error.
  4025. * src/NameResolver.cc
  4026. (callback): Changed int32_t to int.
  4027. (resolve): Changed int32_t to int.
  4028. * src/Platform.cc
  4029. * src/Platform.h
  4030. * test/MultiDiskWriterTest.cc
  4031. * test/PeerMessageUtilTest.cc
  4032. * src/localtime_r.c: Add DeleteCriticalSection() and at exit().
  4033. Other enhancements and fixes.
  4034. * src/HttpRequestCommand.cc
  4035. (executeInternal) Use non-blocking socket for HTTPS (MinGW only).
  4036. * src/SocketCore.cc:
  4037. (error): New function to abstract errno/WSAGetLastError().
  4038. (errorMsg): New function to abstract errno/WSAGetLastError().
  4039. (initiateSecureConnection): Added more detailed error reporting.
  4040. * src/SocketCore.h: Added private variable blocking, to allow
  4041. proper handling of OpenSSL psuedo-errors.
  4042. * src/message.h
  4043. (EX_SSL_INIT_FAILURE)
  4044. (EX_SSL_IO_ERROR)
  4045. (EX_SSL_PROTOCOL_ERROR)
  4046. (EX_SSL_UNKNOWN_ERROR)
  4047. (EX_SSL_CONNECT_ERROR)
  4048. (EX_SOCKET_BLOCKING)
  4049. (EX_SOCKET_NONBLOCKING)
  4050. (EX_SOCKET_UNKNOWN_ERROR)
  4051. * src/Util.cc
  4052. (setGlobalSignalHandler): Renamed signal to sig as signal is a
  4053. reserved name.
  4054. (httpGMT): Fixed typo.
  4055. 2007-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4056. Merged Ross's win32 patch(manually)
  4057. In the course of merging, following files are added.
  4058. * src/strptime.{h,c}
  4059. * src/libgen.{h,c}
  4060. * src/inet_aton.{h,c}
  4061. * src/Platform.{h,cc}
  4062. * src/localtime_r.{h,c}
  4063. * src/getaddrinfo.{h,c}
  4064. I've gethered network related things, and put them to following file:
  4065. * src/a2netcompat.h
  4066. Also io related things are put to following file:
  4067. * src/a2io.h
  4068. Changed %lld to %s because mingw32 doesn't recognize %lld.
  4069. * src/message.h
  4070. (MSG_ALLOCATION_COMPLETED)
  4071. (EX_TOO_LARGE_FILE)
  4072. (EX_SIZE_MISMATCH)
  4073. (EX_FILE_OFFSET_OUT_OF_RANGE)
  4074. (EX_INVALID_CHUNK_CHECKSUM)
  4075. (EX_INVALID_RANGE_HEADER)
  4076. * src/FileAllocationCommand.cc
  4077. * src/HttpResponse.cc
  4078. * src/RequestGroup.cc
  4079. * src/MultiDiskAdaptor.cc
  4080. * src/OptionHandlerImpl.h
  4081. * src/HttpResponseCommand.cc
  4082. * src/FtpNegotiateCommand.cc
  4083. * src/IteratableChecksumValidator.cc
  4084. * src/SegmentMan.cc
  4085. * src/ChunkChecksumValidator.cc
  4086. Added Randomizer::getRandomNumber(long int)
  4087. * src/Randomizer.h (getRandomNumber)
  4088. * src/SimpleRandomizer.h (getRandomNumber)
  4089. * src/BitfieldMan.cc (getMissingIndexRandomly): Use this new function.
  4090. * src/Util.cc (randomAlpha): Use this new function.
  4091. 2007-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4092. Converted int's to in32_t. long long int's are also converted to
  4093. int64_t
  4094. 2007-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4095. Fixed the bug that prevents cookies from being sent to the server
  4096. if the domain of cookie is FQDN and starts with ".".
  4097. * src/Cookie.cc (match)
  4098. To add the ability to change peer id.
  4099. * src/DefaultBtContext.h
  4100. (_peerIdPrefix): New variable
  4101. (setPeerIdPrefix): New function.
  4102. * src/torrentRequestInfo.cc
  4103. (execute): Set the option value of PREF_PEER_ID_PREFIX to
  4104. DefaultBtContext.
  4105. * src/main.cc (main): Added peer-id-prefix command-line option.
  4106. The usage message is not added yet.
  4107. * src/DefaultBtContext.cc
  4108. (generatePeerId): Use _peerIdPrefix.
  4109. * src/prefs.h (PREF_PEER_ID_PREFIX): New definition.
  4110. 2007-07-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4111. Fixed the bug that prevents filename in content-disposition from
  4112. being retrieved when filename is not quoted.
  4113. * src/Util.cc (getContentDispositionFilename)
  4114. Fixed the bug that causes infinate loop and memory leak when file open
  4115. operation failed.
  4116. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  4117. 2007-07-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4118. Fixed the bug that causes segfault when all URIs specified are
  4119. unsupported.
  4120. * src/RequestGroupMan.cc (getInitialCommands)
  4121. Check if RequestGroup::createNextCommand() returns empty list of
  4122. commands.
  4123. * src/RequestGroup.cc (createNextCommand)
  4124. Change log level from info to error so that users can notice that
  4125. an error occurred.
  4126. Fixed the bug that causes segfault when a zero-sized file is
  4127. downloaded.
  4128. * src/BitfieldMan.cc (isAllBitSet)
  4129. Return true if bitfieldLength is 0.
  4130. 2007-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4131. * src/main.cc
  4132. (showUsage): Added 3 usage examples for metalink download.
  4133. Replace MetalinkChunkChecksum with ChunkChecksum.
  4134. * src/MetalinkChunkChecksum.h: Removed.
  4135. * src/MetalinkEntry.h: MetalinkChunkChecksum -> ChunkChecksum.
  4136. * src/Xml2MetalinkProcessor.h: MetalinkChunkChecksum -> ChunkChecksum.
  4137. * src/Xml2MetalinkProcessor.cc
  4138. (getPieceHash): Use ChunkChecksum instead of MetalinkChunkChecksum.
  4139. * src/MetalinkRequestInfo.cc (execute)
  4140. * Release 0.11.1
  4141. 2007-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4142. Reads URIs from stdin when "-i -" is specified.
  4143. * src/UriFileListParser.h, src/UriFileListParser.cc: Removed.
  4144. * src/UriListParser.h, src/UriListParser.cc: New class.
  4145. * src/StreamUriListParser.h: New class.
  4146. * src/FileUriListParser.h: New class.
  4147. * src/main.cc (main): Use StreamUriListParser and FileUriListParser
  4148. instead of UriFileListParser.
  4149. 2007-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4150. Made console readout more readable.
  4151. * src/ConsoleDownloadEngine.cc (sendStatistics)
  4152. 2007-07-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4153. Fix the bug that causes -s option not to work.
  4154. * src/main.cc (main)
  4155. * src/a2algo.h: New file.
  4156. 2007-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4157. Create directory structure specified in metalink file.
  4158. * src/RequestGroup.h, src/RequestGroup.cc
  4159. (initAndOpenFile): Create a directory to store files if it does not
  4160. exist.
  4161. (getDir): New function.
  4162. Added ETA and download speed for an individual file to readout.
  4163. * src/ConsoleDownloadEngine.cc (sendStatistics)
  4164. * src/RequestGroup.h
  4165. (calculateDownloadSpeed): New function.
  4166. 2007-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4167. Made -S option work with metalink file and provided selective download
  4168. to metalink.
  4169. * src/MetalinkEntry.h, src/MetalinkEntry.cc
  4170. (filename): Removed.
  4171. (file): New variable.
  4172. (size): Removed.
  4173. (operator=): Updated.
  4174. (getPath): New function.
  4175. (getLength): New function.
  4176. (toFileEntry): New function.
  4177. * src/TorrentRequestInfo.h, src/TorrentRequestInfo.cc
  4178. (execute): Use toStream.
  4179. (showFileEntry): Removed.
  4180. * src/MetalinkRequestInfo.h
  4181. (targetFiles): New variable.
  4182. (setTargetFiles): New variable.
  4183. * src/MetalinkRequestInfo.cc
  4184. (execute): Added the ability to print file information included in
  4185. a metalink file.
  4186. Added selective download mode to metalink.
  4187. * src/main.cc
  4188. (showUsage): Updated to denote that -S and --select-file options are
  4189. applicable to metalink.
  4190. * src/FileEntry.h
  4191. (operator=): New function.
  4192. (getBasename): New function.
  4193. (getDirname): New function.
  4194. * src/Util.h, src/Util.cc
  4195. (toStream): New function.
  4196. * src/Xml2MetalinkProcessor.cc: Updated.
  4197. Made aria2 work with metalink with directory structure.
  4198. * src/File.h, src/File.cc
  4199. (getBasename): New function.
  4200. (getDirname): New function.
  4201. * src/RequestGroup.h, src/RequestGroup.cc
  4202. (_topDir): New variable.
  4203. (setTopDir): New function.
  4204. (initSegmentMan): A directory structure is added to _segmentMan->dir.
  4205. Rewrote HTTP header parsing with stringstream.
  4206. * src/HttpConnection.h, src/HttpConnection.cc
  4207. (HttpRequestEntry): New class.
  4208. (headerBuf): Removed.
  4209. (headerBufLength): Removed.
  4210. (outstandingHttpRequests): Now its element type is
  4211. HttpRequestEntryHandle.
  4212. (findEndOfHeader): Removed.
  4213. (receiveResponse): Rewritten.
  4214. * src/HttpHeaderProcessor.h, src/HttpHeaderProcessor.cc: New class.
  4215. Updated doc for -j option to notice that it should be used with -i
  4216. option.
  4217. * src/main.cc (showUsage)
  4218. Removed unused classes.
  4219. * src/RequestInfo.h
  4220. (FileInfo): Removed.
  4221. (checksum): Removed.
  4222. (fileInfo): Removed.
  4223. (setChecksum): Removed.
  4224. (getChecksum): Removed.
  4225. (getFileInfo): Removed.
  4226. Use ISO units.
  4227. * src/ConsoleDownloadEngine.cc
  4228. * src/TorrentConsoleDownloadEngine.cc
  4229. * src/Util.cc (abbrevSize)
  4230. 2007-06-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4231. Added the default listening ports to the help message.
  4232. * src/main.cc (showUsage)
  4233. 2007-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4234. Reduce the number of calls to gettimeofday to lower CPU load.
  4235. * src/TimeA2.h, src/TimeA2.cc (differenceInMillis): New function.
  4236. * src/SpeedCalc.h, src/SpeedCalc.cc (calculateSpeed): New function.
  4237. * src/Peer.h (calculateUploadSpeed): New function.
  4238. (calculateDownloadSpeed): New function.
  4239. * src/DefaultPeerStorage.cc
  4240. (CalculateStat): Added _now variable.
  4241. In operator(), call Peer::calculateDownloadSpeed(const struct timeval&)
  4242. and Peer::calculateUploadSpeed(const struct timeval&)
  4243. Drop connection if no request or piece message is exchanged in
  4244. a certain interval.
  4245. * src/DefaultBtInteractive.h
  4246. (btRuntime): New variable.
  4247. (inactiveCheckPoint): New variable.
  4248. (checkActiveInteraction): New function.
  4249. * src/DefaultBtInteractive.cc (receiveMessages): Reset timer when
  4250. request or piece message is received.
  4251. (checkActiveInteraction): New function.
  4252. (doInteractionProcessing): Call checkActiveInteraction.
  4253. Fixed the bug that causes remote Metalink and Torrent files are not
  4254. processed.
  4255. * src/MultiUrlRequestInfo.cc (createNextRequestInfo): Fixed the bug.
  4256. 2007-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4257. Changed format of log file.
  4258. * src/SimpleLogger.cc
  4259. * Release 0.11.0
  4260. 2007-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4261. * src/AbstractCommand.cc
  4262. (execute): Changed log level of MSG_RESTARTING_DOWNLOAD and
  4263. MSG_MAX_TRY from error to info.
  4264. Added MSG_DOWNLOAD_ABORTED after MSG_MAX_TRY.
  4265. * src/message.h
  4266. (MSG_TORRENT_DOWNLOAD_ABORTED): New definition.
  4267. (MSG_DOWNLOAD_ABORTED): Added %s.
  4268. (MSG_RESTARTING_DOWNLOAD): Added %s.
  4269. (MSG_DOWNLOAD_ALREADY_COMPLETED): Updated.
  4270. * src/PeerAbstractCommand.cc
  4271. (execute): MSG_DOWNLOAD_ABORTED -> MSG_TORRENT_DOWNLOAD_ABORTED
  4272. * src/Request.h
  4273. (cookieBox): Made ShardHandle.
  4274. * src/RequestGroup.h, src/RequestGroup.cc
  4275. (createNextCommandWithAdj): New function.
  4276. * src/FileAllocationCommand.cc
  4277. (executeInternal): Use createNextCommandWithAdj().
  4278. * src/CheckIntegrityCommand.cc
  4279. (executeInternal): Use createNextCommandWithAdj().
  4280. Added --load-cookies command-option.
  4281. * src/OptionHandlerFactory.cc
  4282. (createOptionHandlers): Added PREF_LOAD_COOKIES.
  4283. * src/CookieBox.h, src/CookieBox.cc: Rwritten using CookieParser.
  4284. Now aria2 can handle cookie's expiration date.
  4285. * src/Cookie.h (expires): Changed its type to time_t.
  4286. * src/main.cc: Added --load-cookies command-line option.
  4287. * src/prefs.h (PREF_LOAD_COOKIES): New definition.
  4288. * src/Util.h, src/Util.cc (httpGMT): New function.
  4289. * src/Request.cc (Request): Initialize cookieBox using
  4290. CookieBoxFactory.
  4291. * src/CookieBoxFactory.h, src/CookieBoxFactory.cc: New class.
  4292. * src/CookieParser.h, src/CookieParser.cc: New class.
  4293. * src/main.cc: Chagned the default value of --metalink-servers to 5.
  4294. * src/HttpResponseCommand.cc
  4295. (handleOtherEncoding): Call RequestGroup::shouldCancelDownloadForSafety
  4296. * src/MetalinkRequestInfo.cc: Now -s option is ignored in Metalink
  4297. download.
  4298. 2007-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4299. Added -j command-line option.
  4300. * src/OptionHandlerFactory.cc (createOptionHandlers)
  4301. * src/main.cc
  4302. * src/ByteArrayDiskWriter.h, src/ByteArrayDiskWriter.cc
  4303. Rewritten using stringstream.
  4304. * src/TrackerUpdateCommand.h, src/TrackerUpdateCommand.cc
  4305. Rewritten using stringstream.
  4306. 2007-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4307. Make download size shown in MB, KB.
  4308. * src/ConsoleDownloadEngine.h (sendStatistics)
  4309. * src/Util.h, srcUtil.cc (abbrevSize): New function.
  4310. 2007-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4311. Accept incoming connections if download rate is low.
  4312. * src/PeerListenCommand.h, src/PeerListenCommand.cc:
  4313. (_lowestSpeedLimit): New variable.
  4314. (setLowestSpeedLimit): New function.
  4315. (execute): Accept incoming connections if download rate is low.
  4316. MAX_PEERS is ignored in this case.
  4317. Disable PREF_OUT in multiple concurrent download:
  4318. * src/RequestGroup.h, src/RequestGroup.cc
  4319. (setUserDefinedFilename): New function.
  4320. * src/DownloadEngineFactory.cc
  4321. (newConsoleEngine): Do not set PREF_OUT to requestGroup in multiple
  4322. concurrent download.
  4323. * src/DefaultSegmentManFactory.cc
  4324. (createNewInstance): Comment out the line: segmentMan->ufilename = ...
  4325. 2007-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4326. RequestGroup::getNextCommand() was renamed to createNextCommand().
  4327. Added its overloaded method.
  4328. * src/RequestGroup.h
  4329. (_numConcurrentCommand): New variable.
  4330. (setNumConcurrentCommand): New function.
  4331. * src/RequestGroup.cc
  4332. Abort download if same file is being downloaded concurrently.
  4333. * src/RequestGroup.h, src/RequestGroupMan.cc
  4334. (isSameFileBeingDownloaded): New function.
  4335. * src/HttpResponseCommand.cc (executeInternal)
  4336. * src/FtpNegotiateCommand.cc (recvSize)
  4337. * src/message.h (EX_DUPLICATE_FILE_DOWNLOAD): New definition.
  4338. * main.cc: Added help message for -i option.
  4339. 2007-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4340. * src/FileAllocationCommand.cc: Derived from RealtimeCommand.
  4341. * src/CheckIntegrityCommand.cc: Derived from RealtimeCommand.
  4342. * src/MetalinkEntry.h
  4343. (checksum): Changed to ChecksumHandle
  4344. * src/MetalinkRequestInfo.cc
  4345. (checksum): Changed to ChecksumHandle
  4346. * src/File.cc
  4347. (mkdirs): OPEN_MODE -> DIR_OPEN_MODE
  4348. * src/common.h
  4349. (DIR_OPEN_MODE): New definition
  4350. * src/RequestGroup.cc
  4351. (prepareForNextAction): Added an argument.
  4352. * src/message.h
  4353. (MSG_GOOD_CHECKSUM): New definition
  4354. (MSG_BAD_CHECKSUM): New definition
  4355. * src/HttpResponseCommand.cc
  4356. (handleDefaultEncoding): Continue download sequence in new
  4357. non-segmented download.
  4358. * src/FileAllocationEntry.h
  4359. (_nextDownloadCommand): New variable.
  4360. * src/DownloadCommand.cc
  4361. (prepareForNextSegment): Create ChecksumCommand if checksum is
  4362. available.
  4363. * src/RealtimeCommand.h, src/RealtimeCommand.cc: New class.
  4364. * src/IteratableChecksumValidator.h,
  4365. src/IteratableChecksumValidator.cc: New class.
  4366. * src/ChecksumCommand.h, src/ChecksumCommand.cc: New class.
  4367. 2007-05-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4368. Change file mode to 666:
  4369. * src/common.h (OPEN_MODE): New definition.
  4370. * src/File.cc
  4371. * src/Util.cc
  4372. * src/Directry.cc
  4373. * src/AbstractDiskWriter.cc
  4374. Change the level of log message "download aborted" to debug:
  4375. * src/PeerAbstractCommand.cc (execute)
  4376. * src/RequestGroup.h (RequestGroup): Initialized _hintTotalLength to 0.
  4377. * src/TrackerWatcherCommand.cc
  4378. (createCommand): Sleep some seconds after request failed.
  4379. If tracker request fails more than value of PREF_TRACKER_MAX_TRIES,
  4380. then abort tracker request.
  4381. 2007-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4382. * Added the simultaneous download feature.
  4383. * src/main.cc: Print "Exception caught: " when exception is caught.
  4384. Use CUIDCounter instead of BtRuntime::getNewCuid():
  4385. * src/ActivePeerConnectionCommand.cc
  4386. * src/PeerInteractionCommand.cc
  4387. * src/BtRuntime.h
  4388. (cuidCounter): Removed.
  4389. (getNewCuid): Removed.
  4390. * src/DownloadEngineFactory.cc
  4391. * src/PeerListenCommand.cc
  4392. * src/TrackerUpdateCommand.cc
  4393. * src/PeerInitiateConnectionCommand.cc
  4394. 2007-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4395. * src/PeerAbstractCommand.cc
  4396. (onAbort): Call PeerStorage::returnPeer()
  4397. * src/DefaultPeerStorage.h, src/DefaultPeerStorage.cc
  4398. (incomingPeers): New variable.
  4399. (addIncomingPeer): New function.
  4400. (returnPeer): New function.
  4401. (onErasingPeer): New function.
  4402. (addPeer): push_back -> push_front
  4403. (getActivePeers): Rewritten.
  4404. (calculateStat): Rewritten.
  4405. * src/PeerStorage.h
  4406. (TransferStat::copy): New function.
  4407. (TransferStat::TransferStat): New function.
  4408. (TransferStat::operator=): New function.
  4409. (addIncomingPeer): New function.
  4410. (returnPeer): New function.
  4411. * src/PeerListenCommand.cc
  4412. (execute): Use PeerStorage::addIncomingPeer() instead of
  4413. Peer::addPeer().
  4414. 2007-04-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4415. Connect to a peer actively when download speed is lower than specified
  4416. speed in torrent download:
  4417. * src/ActivePeerConnectionCommand.h: New class.
  4418. 2007-03-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4419. * src/HttpRequest.cc (createRequest): url-encode user-agent
  4420. * src/main.cc: Fixed the bug that prevents download if .netrc
  4421. doesn't exist.
  4422. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4423. To cache resolved hostname:
  4424. * src/AbstractCommand.h, src/AbstractCommand.cc
  4425. (resolveHostname): Put outside #ifdef ENABLE_ASYNC_DNS clause.
  4426. Added dns cache.
  4427. * src/FtpInitiateConnectionCommand.cc
  4428. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS.
  4429. * src/NameResolver.h, src/NameResolver.cc: Added synchronized
  4430. NameResolver working without ares.
  4431. * src/TorrentRequestInfo.cc
  4432. (execute): Don't cache dns in torrent download.
  4433. * src/HttpInitiateConnectionCommand.cc
  4434. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS
  4435. * src/DNSCache.h: New class.
  4436. * src/UrlRequestInfo.cc
  4437. (execute): Use dns cache.
  4438. In http request, suppress port number in http request header if port
  4439. is 80 or 443:
  4440. * src/HttpRequest.cc (getHostText): Suppress port number in http
  4441. request header if port is 80 or 443.
  4442. (createProxyRequest): Allways send port number.
  4443. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4444. To add the command-line option which disables netrc support:
  4445. * src/OptionHandlerFactory.cc
  4446. (createOptionHandlers): Added PREF_NO_NETRC.
  4447. * src/main.cc: Added -n option.
  4448. * src/prefs.h (PREF_NO_NETRC): New definition.
  4449. * src/RequestFactory.cc: Do not use netrc in ftp if PREF_NO_NETRC is
  4450. V_TRUE.
  4451. Note that netrc is not used in http, http proxy even if PREF_NO_NETRC
  4452. is V_FALSE. This may get configurable in the future release.
  4453. To clear peer's error status by time basis:
  4454. * src/PeerAbstractCommand.cc
  4455. (onAbort): Call Peer::startBadCondition().
  4456. * src/Peer.h, src/Peer.cc
  4457. (error): Removed.
  4458. (_badConditionStartTime): New variable.
  4459. (_badConditionInterval): New variable. Initialized to 10 seconds.
  4460. (startBadCondition): New function.
  4461. (isGood): New function.
  4462. * src/DefaultPeerStorage.cc
  4463. (addPeer): Use Peer::isGood().
  4464. (FindFinePeer): Use Peer::isGood().
  4465. Always include port number in http request header:
  4466. * src/HttpRequest.cc (getHostText): Always include port number in
  4467. http request header.
  4468. 2007-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4469. To the ability to read options from a config file:
  4470. * src/main.cc: Command-line parameter validation is delegated to
  4471. OptionHandler class.
  4472. * src/OptionHandlerFactory.h, src/OptionHandlerFactory.cc: New class.
  4473. * src/Option.h, src/Option.cc (clear): New function.
  4474. * src/OptionParser.h, src/OptionParser.cc: New class.
  4475. * src/OptionHandler.h: New class.
  4476. * src/NameMatchOptionHandler.h: New class.
  4477. * src/OptionHandlerImpl.h: New classes.
  4478. * src/prefs.h: '_' -> '-'
  4479. (FTP_PASV_ENABLED): Renamed to FTP_PASV.
  4480. (FTP_PASV): New definition.
  4481. * src/Util.h, src/Util.cc (getRealSize): New function.
  4482. To disable netrc support if .netrc file does not have correct
  4483. permissions:
  4484. * src/File.h, src/File.cc (mode): New function.
  4485. To prevent confidential information to be logged:
  4486. * src/HttpConnection.h, src/HttpConnection.cc
  4487. (eraseConfidentialInfo): New function.
  4488. (sendRequest): Call eraseConfidentialInfo().
  4489. (sendProxyRequest): Call eraseConfidentialInfo().
  4490. * src/main.cc: Validate permissions of .netrc file.
  4491. To add --user-agent command-line option:
  4492. * src/main.cc: Added new command line option: --user-agent
  4493. * src/prefs.h (PREF_USER_AGENT): New definition.
  4494. * src/HttpRequestCommand.cc (executeInternal): Set user-agent option
  4495. parameter to HttpRequest object.
  4496. * src/AbstractProxyRequestCommand.cc
  4497. (executeInternal): Set user-agent option parameter to HttpRequest
  4498. object.
  4499. Marged the patches from Dan Fandrich.
  4500. 2007-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4501. Use filename and size from Metalink file instead of sending HEAD
  4502. request:
  4503. * src/UrlRequestInfo.h
  4504. (_filename): New variable.
  4505. (_totalLength): New variable.
  4506. (setTotalLength): New variable.
  4507. (setFilename): New variable.
  4508. * src/MetalinkRequestInfo.cc
  4509. (execute): Set filename and size to UrlRequestInfo
  4510. * src/UrlRequestInfo.cc
  4511. (execute): Use filename and size from Metalink instead of seding
  4512. HEAD request to servers.
  4513. 2007-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4514. To add the ability to resume downloading a partially downloaded file
  4515. which is downloaded from the beginning:
  4516. * src/FileAllocator.h: Made abstract class. New DefaultFileAllocator
  4517. takes this role.
  4518. * src/main.cc: Added -c option.
  4519. * src/BitfieldMan.h, src/BitfieldMan.cc (setBitRange): New function.
  4520. * src/DiskWriter.h (openExistingFile): Added totalLength argument.
  4521. * src/prefs.h (PREF_CONTINUE): New definition.
  4522. * src/SegmentMan.h, src/SegmentMan.cc (markPieceDone): New function.
  4523. * src/DefaultDiskWriter.cc
  4524. (createNewDiskWriter): Add GlowFileAllocator to the new object.
  4525. * src/AbstractDiskWriter.h
  4526. (glowFileAllocator): New variable.
  4527. * src/AbstractDiskWriter.cc
  4528. (openExistingFile): Now preallocate file space from the end of the
  4529. existing file if totalLength argument is specified and grater than 0.
  4530. * src/UrlRequestInfo.cc: If -c option is specified and the file
  4531. to download exists in local, continue the download of the file.
  4532. --allow-overwrite=true is assumed in this context.
  4533. * src/DefaultFileAllocator.h, src/DefaultFileAllocator.cc: New class.
  4534. * src/GlowFileAllocator.h, src/GlowFileAllocator.cc: New class.
  4535. Throw exception if --check-integrity=true is specified but chunk
  4536. checksums are not provided:
  4537. * src/UrlRequestInfo.cc
  4538. Do not print URLs to stdout:
  4539. * src/UrlRequestInfo.cc
  4540. 2007-03-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4541. * src/Request.h: Use AuthResolver to get authentication information.
  4542. * src/main.cc: Made RequestFactory a singleton object. Netrc is now
  4543. set to RequestFactory object.
  4544. * src/AuthConfigItem.h, src/AuthConfigItem.cc: Removed.
  4545. * src/AuthConfig.h, src/AuthConfig.cc: Rewritten.
  4546. * src/TrackerWatcherComand.cc: Use RequestFactorySingletonHolder to
  4547. create Request object.
  4548. 2007-03-19 Tatsuhiro Tsujikawa <tujikawa at valkyrie dot rednoah com>
  4549. To integrate Netrc into exsiting classes:
  4550. * src/Request.h
  4551. (_userDefinedAuthConfig): New variable.
  4552. (findNetrcAuthenticator): New function.
  4553. (segment): Removed.
  4554. (setUserDefinedAuthConfig): New function.
  4555. (resolveHttpAuthConfigItem): New function.
  4556. (resolveFtpAuthConfigItem): New function.
  4557. (resolveHttpProxyAuthConfigItem): New function.
  4558. * src/HttpRequest.h
  4559. (authConfig): Removed.
  4560. (proxyAuthConfig): Removed.
  4561. (setAuthConfig): Removed.
  4562. (setProxyAuthConfig): Removed.
  4563. * src/UrlRequest.h
  4564. (getHeadResult): Added a parameter: authConfigHandle
  4565. * src/common.h
  4566. (SingletonHolder.h): New include.
  4567. * src/main.cc
  4568. (Netrc.h): New include.
  4569. (main): Removed initial values of PREF_FTP_USER, PREF_FTP_PASSWD.
  4570. Added initial value of PREF_NETRC_PATH.
  4571. Added the initialization of netrc.
  4572. * src/AuthConfig.h: New class.
  4573. * src/prefs.h
  4574. (PREF_NETRC_PATH): New definition.
  4575. * src/HttpAuthConfig.h: Removed.
  4576. * src/Netrc.cc
  4577. (getRequiredNextToken): New function.
  4578. (skipMacdef): New function.
  4579. (parse): Rewritten.
  4580. * src/Netrc.h
  4581. (getRequiredNextToken): New function.
  4582. (skipMacdef): New function.
  4583. * src/Util.h, src/Util.cc
  4584. (getHomeDir): New function.
  4585. * src/TrackerWatcherComand.cc
  4586. (createRequestCommand): Use AuthConfig.
  4587. * src/FtpConnection.cc
  4588. (sendUser): Use Request::resolveFtpAuthConfigItem().
  4589. (sendPass): Use Request::resolveFtpAuthConfigItem().
  4590. * src/Request.cc
  4591. (findNetrcAuthenticator): New function.
  4592. (resolveHttpAuthConfigItem): New function.
  4593. (resolveFtpAuthConfigItem): New function.
  4594. (resolveHttpProxyAuthConfigItem): New function.
  4595. * src/UrlRequestInfo.cc: Use AuthConfig.
  4596. * src/HttpRequest.cc
  4597. (createRequest): Use authConfig.
  4598. (getProxyAuthString): Use authConfig.
  4599. (configure): Removed PREF_HTTP_USER, PREF_HTTP_PASSWD,
  4600. PREF_HTTP_PROXY_USER, PREF_HTTP_PROXY_PASSWD.
  4601. 2007-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4602. To reduce overhead to find commands whose socket is either
  4603. readable or writable in the download engine loop:
  4604. * src/Command.h, src/Command.cc
  4605. (STATUS): New enum.
  4606. (status): New variable.
  4607. (statusMatch): New function.
  4608. (setStatusActive): New function.
  4609. (setStatusInactive): New function.
  4610. * src/DownloadEngine.h, src/DownloadEngine.cc
  4611. (executeCommand): New function.
  4612. (run): Simplified.
  4613. (waitData): Call Command::setStatusActive() when command's socket is
  4614. readable or writable.
  4615. 2007-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4616. To handle Segment as SegmentHandle:
  4617. * src/AbstractCommand.cc (execute): Rewritten.
  4618. * src/SegmentMan.h: Segment -> SegmentHandle
  4619. Introducded HttpResponse class, HttpRequest class to improve code
  4620. extensiveness and make it clear:
  4621. * src/HttpDownloadCommand.cc: transfer encoders are now managed by
  4622. HttpResponse class.
  4623. * src/HttpRequest.h, src/HttpRequest.cc: New class.
  4624. * src/HttpResponse.h, src/HttpResponse.cc: New class.
  4625. * src/HttpConnection.cc: Contruction of http request were moved to
  4626. HttpRequest class.
  4627. * src/HttpResponseCommand.h, src/HttpResponseCommand.cc: Refactored.
  4628. * src/HttpRequestCommand.cc (executeInternal): Rewritten.
  4629. * src/HttpAuthConfig.h: New class.
  4630. * src/Range.h: New class.
  4631. To make FtpTunnel{Request, Response}Command and
  4632. HttpProxy{Request, Response}Command derived from
  4633. AbstractProxy{Request, Response}Command:
  4634. * src/FtpTunnelResponseCommand.h, src/FtpTunnelResponseCommand.cc:
  4635. Derived from AbstractProxyRequestCommand class.
  4636. * src/FtpTunnelRequestCommand.h, src/FtpTunnelRequestCommand.cc:
  4637. Derived from AbstractProxyResponseCommand class.
  4638. * src/HttpProxyRequestCommand.h, src/HttpProxyRequestCommand.cc:
  4639. Derived from AbstractProxyRequestCommand class.
  4640. * src/HttpProxyResponseCommand.h, src/HttpProxyResponseCommand.cc:
  4641. Derived from AbstractProxyResponseCommand class.
  4642. * src/AbstractProxyRequestCommand.h, src/AbstractProxyRequestCommand.cc
  4643. : New class.
  4644. * src/AbstractProxyResponseCommand.h,
  4645. src/AbstractProxyResponseCommand.cc: New class.
  4646. To add netrc support:
  4647. * src/Netrc.h, src/Netrc.cc: New class.
  4648. * src/Util.h, src/Util.cc (split): New function.
  4649. * src/HttpHeader.cc (getRange): Fixed so that it inspects
  4650. "Content-Range" header instead of "Range" header.
  4651. * src/HttpHeader.h
  4652. (getStatus): Removed.
  4653. (setStatus): Removed.
  4654. * src/Segment.h
  4655. (getPositionToWrite): New function.
  4656. 2007-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4657. * src/HttpHeader.h
  4658. (Range.h): New include.
  4659. (status): New variable.
  4660. (HttpHeader): Initialized status with 0.
  4661. (getStatus): New function.
  4662. (setStatus): New function.
  4663. (getRange): New function.
  4664. (HttpHeaderHandle): New function.
  4665. * src/HttpHeader.cc
  4666. (getRange): New function.
  4667. * src/Request.h
  4668. (RequestWeakHandle): New definition.
  4669. * src/HttpConnection.h
  4670. (HttpConnectionHandle): New type definition.
  4671. * src/HttpConnection.cc
  4672. (receiveResponse): Set HTTP status to headers.
  4673. * src/main.cc
  4674. (showUsage): Fixed typo.
  4675. * src/Segment.h
  4676. (SegmentHandle): New type definition.
  4677. * src/BitfieldMan.h
  4678. (getMissingUnusedLength): New function.
  4679. * src/BitfieldMan.cc
  4680. (getMissingUnusedLength): New function.
  4681. 2007-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4682. To fix static initialization order problem:
  4683. * src/BitfieldManFactory.h
  4684. (defaultRandomizer): Removed.
  4685. (factory): New variable.
  4686. (getNewFactory): Removed.
  4687. (getFactoryInstance): New function.
  4688. (setDefaultRandomizer): Rewritten.
  4689. (getDefaultRandomizer): Rewritten.
  4690. * src/BitfieldManFactory.cc
  4691. (defaultRandomizer): Removed.
  4692. (factory): Initialized to 0.
  4693. (BitfieldManFactory): Initialized randomizer to 0.
  4694. * src/DefaultPieceStorage.cc
  4695. (DefaultPieceStorage): getNewFactory() -> getFactoryInstance()
  4696. * src/Peer.cc
  4697. (Peer): getNewFactory() -> getFactoryInstance()
  4698. * src/SegmentMan.cc
  4699. (initBitfield): getNewFactory() -> getFactoryInstance()
  4700. * src/Piece.cc
  4701. (Piece): getNewFactory() -> getFactoryInstance()
  4702. 2007-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4703. To fix the bug that causes crash on Max OS X:
  4704. * src/SimpleRandomizer.h
  4705. (getInstance): Create new instance if the static variable is null.
  4706. * src/SimpleRandomizer.cc
  4707. (randomizer): Initialized to 0.
  4708. * src/BitfieldManFactory.h
  4709. (getNewFactory): Removed the call to setRandomizer().
  4710. To fix the miscalculation of the range of checksum:
  4711. * src/BitfieldMan.h
  4712. (isBitSetOffsetRange): New function.
  4713. * src/BitfieldMan.cc
  4714. (isBitSetOffsetRange): New function.
  4715. * src/SegmentMan.cc
  4716. (tryChunkChecksumValidation): Use BitfieldMan::isBitSetOffsetRange().
  4717. Use bitfield->getBlockLength() instead of segment.segmentLength.
  4718. * Release 0.10.1
  4719. 2007-02-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4720. To lower CPU usage in BitTorrent download when --max-upload-limit
  4721. command-line option specified:
  4722. * src/DefaultBtMessageDispatcher.cc
  4723. (sendMessages): Calculate uploading speed only when current message
  4724. is uploading data and is not sent yet.
  4725. * src/DefaultPeerStorage.h
  4726. (MAX_PEER_LIST_SIZE): 100 -> 60, because 60 is well enough.
  4727. * src/HttpResponseCommand.cc
  4728. (handleDefaultEncoding): Added the cast to int32_t to itos.
  4729. This fixes compile error in Soralis 10.
  4730. 2007-01-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4731. To fix segfault in Metalink download:
  4732. * src/UrlRequestInfo.h
  4733. (filename): Removed.
  4734. (totalLength): Removed.
  4735. (setTotalLength): Removed.
  4736. (setFilename): Removed.
  4737. * src/MetalinkRequestInfo.cc
  4738. (execute): Do not set filename and totalLength to reqInfo.
  4739. Set chunk checksum to reqInfo if it is not null.
  4740. * src/HttpResponseCommand.cc
  4741. (executeInternal): Fixed filename in log.
  4742. (handleDefaultEncoding): Removed the call to initBitfield() and
  4743. markAllPiecesDone().
  4744. (handleOtherEncoding): Added HEAD method handling.
  4745. * src/FtpNegotiateCommand.cc
  4746. (executeInternal): Added SEQ_HEAD_OK handling.
  4747. (recvSize): In HEAD handling, set sequence to SEQ_HEAD_OK and
  4748. return false.
  4749. * src/FtpNegotiateCommand.h
  4750. (SEQ_HEAD_OK): New definition.
  4751. * src/SegmentMan.cc
  4752. (initBitfield): Delete bitfield.
  4753. (isChunkChecksumValidationReady): Fixed the condition.
  4754. * src/UrlRequestInfo.cc: Fixed so that Metalink and Torrent download
  4755. works fine.
  4756. 2007-01-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4757. * src/Xml2MetalinkProcessor.h
  4758. (xpathExists): New function.
  4759. * src/Xml2MetalinkProcessor.cc
  4760. (xpathExists): New function.
  4761. Not to send HEAD request if filename and size are available in Metalink
  4762. file:
  4763. * src/UrlRequestInfo.h
  4764. (filename): New variable.
  4765. (totalLength): New variable.
  4766. (setTotalLength): New function.
  4767. (setFilename): New function.
  4768. * src/MetalinkRequestInfo.cc
  4769. (execute): Set filename and size to UrlRequestInfo.
  4770. * src/MetalinkEntry.cc
  4771. (MetalinkEntry): Initialize size with 0.
  4772. * src/UrlRequestInfo.cc
  4773. (execute): Set filename and size to SegmentMan.
  4774. Not to download rest of the files after selected files are downloaded
  4775. in BitTorrent:
  4776. * src/PieceStorage.h
  4777. (allDownloadFinished): New function.
  4778. * src/DefaultBtAnnounce.cc
  4779. (isCompleteAnnounceReady): Use allDownloadFinished instead of
  4780. downloadFinished.
  4781. (getAnnounceUrl): Use allDownloadFinished instead of downloadFinished.
  4782. * src/DefaultPieceStorage.cc
  4783. (completePiece): Use allDownloadFinished instead of downloadFinished.
  4784. Commented out the call to finishSelectiveDownloadingMode().
  4785. (downloadFinished): Call isFilteredAllBitSet() instead of
  4786. isAllBitSet().
  4787. (allDownloadFinished): New function.
  4788. * src/DefaultBtInteractive.cc
  4789. (addBitfieldMessageToQueue): Call allDownloadFinished() instead of
  4790. downloadFinished().
  4791. (checkHave): Call allDownloadFinished() instead of downloadFinished().
  4792. * src/TorrentDownloadEngine.cc
  4793. (onEndOfRun): Call allDownloadFinished() instead of downloadFinished().
  4794. * src/BitfieldMan.h
  4795. (isFilteredAllBitSet): New function.
  4796. * src/ShareRatioSeedCriteria.h
  4797. (PieceStorage.h): New include.
  4798. (pieceStorage): New variable.
  4799. (evaluate):
  4800. btContext->getTotalLength() -> pieceStorage->getCompletedLength()
  4801. * src/BitfieldMan.cc
  4802. (isFilteredAllBitSet): New function.
  4803. (isAllBitSet): Filter is not took into account.
  4804. Rename --force-truncate as --allow-overwrite:
  4805. * src/TorrentRequestInfo.cc
  4806. (execute): PREF_FORCE_TRUNCATE -> PREF_ALLOW_OVERWRITE
  4807. * src/main.cc
  4808. (showUsage): --force-truncate -> --allow-overwrite
  4809. * src/message.h
  4810. (EX_FILE_ALREADY_EXISTS): --force-truncate -> --allow-overwrite
  4811. * src/prefs.h
  4812. (PREF_FORCE_TRUNCATE): Removed.
  4813. (PREF_ALLOW_OVERWRITE): New definition.
  4814. * src/SegmentMan.cc
  4815. (shouldCancelDownloadForSafety): --force-truncate -> --allow-overwrite
  4816. * src/MetalinkRequestInfo.cc
  4817. (execute): Queueing message are now logged in info level.
  4818. * src/common.h
  4819. (LONG_LONG_MAX): Removed.
  4820. (LONG_LONG_MIN): Removed.
  4821. * src/HttpResponseCommand.cc
  4822. (handleDefaultEncoding): LONG_LONG_MAX -> INT64_MAX
  4823. * src/FtpNegotiateCommand.cc
  4824. (recvSize): LONG_LONG_MAX -> INT64_MAX
  4825. * src/main.cc
  4826. (showUsage): Added --check-integriy and --realtime-chunk-checksum
  4827. command-line option.
  4828. (main): Added --check-integriy and --realtime-chunk-checksum
  4829. command-line option.
  4830. --force-truncate -> --allow-overwrite
  4831. Set initial value of --check-integrity option to false.
  4832. Don't show usage when error occurs while persing command-line options.
  4833. Removed deprecated --upload-limit option.
  4834. 2007-01-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4835. * src/message.h: Added EX_INVALID_PAYLOAD_SIZE and
  4836. EX_INVALID_BT_MESSAGE_ID. Following source files affected.
  4837. * src/BtAllowedFastMessage.cc:
  4838. * src/BtBitfieldMessage.cc
  4839. * src/BtCancelMessage.cc
  4840. * src/BtChokeMessage.cc
  4841. * src/BtHaveAllMessage.cc
  4842. * src/BtHaveMessage.cc
  4843. * src/BtHaveNoneMessage.cc
  4844. * src/BtInterestedMessage.cc
  4845. * src/BtNotInterestedMessage.cc
  4846. * src/BtPieceMessage.cc
  4847. * src/BtPortMessage.cc
  4848. * src/BtRejectMessage.cc
  4849. * src/BtRequestMessage.cc
  4850. * src/BtSuggestPieceMessage.cc
  4851. * src/BtUnchokeMessage.cc
  4852. * src/message.h: Added EX_INVALID_CHUNK_CHECKSUM. Following source
  4853. files are affected.
  4854. * src/ChunkChecksumValidator.cc
  4855. * src/SegmentMan.cc
  4856. 2007-01-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4857. To add chunk checksum validation:
  4858. * src/MetalinkEntry.h
  4859. (MetalinkChunkChecksum.h): New include.
  4860. (chunkChecksum): New variable.
  4861. * src/Request.h
  4862. (method): New variable.
  4863. (setMethod): New function.
  4864. (getMethod): New function.
  4865. (METHOD_GET): New static constant.
  4866. (METHOD_HEAD): New static constant.
  4867. * src/Xml2MetalinkProcessor.h
  4868. (getPieceHash): New function.
  4869. * src/PieceStorage.h
  4870. (markAllPiecesDone): New function.
  4871. (checkIntegrity): New function.
  4872. * src/FileAllocator.h
  4873. (NullFileAllocationMonitor.h): New include.
  4874. (FileAllocator): Initialize fileAllocationMonitor with new
  4875. NullFileAllocationMonitor().
  4876. * src/MultiDiskAdaptor.h
  4877. (messageDigest.h): Remove include.
  4878. (ctx): Removed.
  4879. (hashUpdate): Added ctx.
  4880. (MultiDiskAdaptor): Removed ctx.
  4881. (sha1Sum): Renamed as messageDigest.
  4882. (messageDigest): New function.
  4883. * src/UrlRequestInfo.h
  4884. (HeadResult): New class.
  4885. (digestAlgo): New variable.
  4886. (chunkChecksumLength): New variable.
  4887. (chunkChecksums): New variable.
  4888. (getHeadResult): New function.
  4889. (UrlRequestInfo): Added digestAlgo, chunkChecksumLength.
  4890. (setDigestAlgo): New function.
  4891. (setChunkChecksumLength): New function.
  4892. (setChunkChecksums): New function.
  4893. * src/DefaultPieceStorage.cc
  4894. (DiskAdaptorWriter.h): New include.
  4895. (ChunkChecksumValidator.h): New include.
  4896. (markAllPiecesDone): New function.
  4897. (checkIntegrity): New function.
  4898. * src/DefaultBtContext.h
  4899. (getPieceHashes): New function.
  4900. * src/TorrentRequestInfo.cc
  4901. (execute): Try to validate chunk checksum if file already exists and
  4902. .aria2 file doesn't there and user allows aria2 to overwrite it.
  4903. * src/messageDigest.h
  4904. (~MessageDigestContext): Added digestFree().
  4905. * src/MetalinkRequestInfo.cc
  4906. (execute): Set digestAlgo, chunkChecksum, chunkChecksums to reqInfo.
  4907. * src/DiskAdaptor.h
  4908. (messageDigest.h): New include.
  4909. (sha1Sum): Renamed as messageDigest.
  4910. (messageDigest): New function.
  4911. * src/DownloadCommand.h
  4912. (PeerStat.h): New include.
  4913. (maxDownloadSpeedLimit): New variable.
  4914. (startupIdleTime): New variable.
  4915. (lowestDownloadSpeedLimit): New variable.
  4916. (peerStat): New variable.
  4917. (setMaxDownloadSpeedLimit): New function.
  4918. (setStartupIdleTime): New function.
  4919. (setLowestDownloadSPeedLimit): New function.
  4920. * src/BtContext.h
  4921. (getPieceHashes): New function.
  4922. * src/main.cc
  4923. (main): Set PREF_REALTIME_CHUNK_CHECKSUM and PREF_CHECK_INTEGRITY
  4924. option to true for testing purpose.
  4925. * src/BtPieceMessage.cc
  4926. (checkPieceHash): Use messageDigest
  4927. * src/DownloadEngine.cc
  4928. (SetDescriptor): Removed.
  4929. (AccumulateActiveCommand): Removed.
  4930. (waitData): Rewritten.
  4931. (updateFdSet): Rewritten.
  4932. * src/MultiDiskAdaptor.cc
  4933. (hashUpdate): Added ctx.
  4934. (sha1Sum): Renamed as messageDigest.
  4935. (messageDigest): New function.
  4936. * src/BitfieldMan.h
  4937. (isBitRangeSet): New function.
  4938. (unsetBitRange): New function.
  4939. * src/ByteArrayDiskWriter.h
  4940. (sha1Sum): Renamed as messageDigest.
  4941. (messageDigest): New function.
  4942. * src/ConsoleDownloadEngine.cc
  4943. (calculateStatistics): If nspeed < 0 then set nspeed to 0.
  4944. * src/DiskWriter.h
  4945. (messageDigest.h): New include.
  4946. (sha1Sum): Renamed as messageDigest.
  4947. (messageDigest): New function.
  4948. * src/ChunkChecksumValidator.h: New class.
  4949. * src/DiskAdaptorWriter.h: New class.
  4950. * src/prefs.h
  4951. (PREF_REALTIME_CHUNK_CHECKSUM): New definition.
  4952. (PREF_CHECK_INTEGRITY): New definition.
  4953. * src/HttpResponseCommand.cc
  4954. (handleDefaultEncoding): Added method "HEAD" handling.
  4955. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  4956. (handleOtherEncoding):
  4957. Added the call to e->segmentMan->shouldCancelDownloadForSafety().
  4958. (createHttpDownloadCommand): Set maxDownloadSpeedLimit,
  4959. startupIdleTime, lowestDownloadSpeedLimit to command.
  4960. * src/SegmentMan.h
  4961. (getSegmentEntryByIndex): New function.
  4962. (getSegmentEntryByCuid): New function.
  4963. (getSegmentEntryIteratorByCuid): New function.
  4964. (diskWriter): DiskWriter -> DiskWriterHandle
  4965. (pieceHashes): New variable.
  4966. (chunkHashLength): New variable.
  4967. (digestAlgo): New variable.
  4968. (FindPeerStat): Removed.
  4969. (getPeerStat): Rewritten.
  4970. (markAllPiecesDone): New function.
  4971. (checkIntegrity): New function.
  4972. (tryChunkChecksumValidation): New function.
  4973. (isChunkChecksumValidationReady): New function.
  4974. * src/BitfieldMan.cc
  4975. (BitfieldMan): Initialized bitfieldLength, blocks to 0.
  4976. (BitfieldMan): Initialized blockLength, totalLength, bitfieldLength,
  4977. blocks to 0.
  4978. (isBitRangeSet): New function.
  4979. (unsetBitRange): New function.
  4980. * src/FtpNegotiateCommand.cc
  4981. (executeInternal): Set maxDownloadSpeedLimit,
  4982. startupIdleTime, lowestDownloadSpeedLimit to command.
  4983. (recvSize): Added method "HEAD" handling.
  4984. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  4985. * src/AbstractSingleDiskAdaptor.cc
  4986. (sha1Sum): Renamed as messageDigest.
  4987. (messageDigest): New function.
  4988. * src/AbstractSingleDiskAdaptor.h
  4989. (sha1Sum): Renamed as messageDigest.
  4990. (messageDigest): New function.
  4991. * src/Util.h
  4992. (indexRange): New function.
  4993. * src/MetalinkEntry.cc
  4994. (MetalinkEntry): Initialized chunkChecksum to 0.
  4995. * src/ShaVisitor.cc
  4996. (~ShaVisitor): Removed the call to ctx.digestFree().
  4997. * src/SegmentMan.cc
  4998. (ChunkChecksumValidator.h): New include.
  4999. (SegmentMan): Initialized chunkHashLength to 0. Initialized digestAlgo
  5000. to DIGEST_ALGO_SHA1.
  5001. (~SegmentMan): Removed diskWriter.
  5002. (FindSegmentEntryByIndex): Removed.
  5003. (FindSegmentEntryByCuid): Removed.
  5004. (checkoutSegment): Rewritten.
  5005. (findSlowerSegmentEntry): Rewritten.
  5006. (getSegment): Rewritten.
  5007. (updateSegment): Rewritten.
  5008. (completeSegment): Rewritten.
  5009. (markAllPiecesDone): New function.
  5010. (checkIntegrity): New function.
  5011. (isChunkChecksumValidationReady): New function.
  5012. (tryChunkChecksumValidation): New function.
  5013. * src/Xml2MetalinkProcessor.cc
  5014. (getEntry): Get size and set it to entry.
  5015. Get chunk checksum and set it to entry.
  5016. (getPieceHash): New function.
  5017. * src/Util.cc
  5018. (sha1Sum): Removed ctx.digestFree()
  5019. (fileChecksum): Removed ctx.digestFree()
  5020. (indexRange): New function.
  5021. * src/Request.cc
  5022. (METHOD_GET): New variable.
  5023. (METHOD_HEAD): New variable.
  5024. (Request): Added method.
  5025. * src/UrlRequestInfo.cc
  5026. (FatalException.h): New include.
  5027. (message.h): New include.
  5028. (operator<<): Added operator<< for class HeadResult.
  5029. (getHeadResult): New function.
  5030. (execute): Get filename and size in separate download engine.
  5031. * src/ChunkChecksumValidator.cc: New class.
  5032. * src/DownloadCommand.cc:
  5033. (DownloadCommand): Added peerStat.
  5034. (executeInternal): Use maxDownloadSpeedLimit member instead of getting
  5035. the value from Option.
  5036. The buffer size is now 16KB.
  5037. Use peerStat member instead of getting it from SegmentMan.
  5038. Use startupIdleTime member instead of gettingit from Option.
  5039. Added chunk checksum validation.
  5040. * src/AbstractDiskWriter.cc
  5041. (AbstractDiskWriter): Removed ctx.
  5042. (~AbstractDiskWriter): Removed ctx.digestFree()
  5043. (writeDataInternal): Returns the return value of write.
  5044. (readDataInternal): Returns the return value of read.
  5045. (sha1Sum): Renamed as messageDigest
  5046. (messageDigest): New function.
  5047. * src/AbstractDiwkWriter.h
  5048. (messageDigest.h): Removed include.
  5049. (ctx): Removed.
  5050. (sha1Sum): Renamed as messageDigest
  5051. (messageDigest): New function.
  5052. * src/DefaultPieceStorage.h
  5053. (markAllPiecesDone): New function.
  5054. (checkIntegrity): New function.
  5055. * src/NullFileAllocationMonitor.h: New class.
  5056. * src/MetalinkChunkChecksum.h: New class.
  5057. 2007-01-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5058. To decrease CPU usage in bittorrent download, calculation results in
  5059. BitfieldMan were cached and realtime fetching PeerObject was removed
  5060. with WeakHandle introduced. Option values are set to the objects
  5061. by setter before download begins.
  5062. * src/DefaultBtRequestFactory.cc: Use messageFactory member.
  5063. * src/DefaultBtRequestFactory.h
  5064. (dispatcher): BtMessageDispatcherHandle ->
  5065. BtMessageDispatcherWeakHandle.
  5066. (messageFactory): New variable.
  5067. (setBtMessageDispatcher): BtMessageDispatcherHandle ->
  5068. BtMessageDispatcherWeakHandle.
  5069. (setBtMessageFactory): New function.
  5070. * src/DefaultBtMessageDispatcher.cc:
  5071. (sendMessages): Use maxUploadSpeedLimit instead of fetching the value
  5072. from Option.
  5073. (checkRequestSlotAndDoNecessaryThing): Use requestTimeout instead of
  5074. feating the value from Option.
  5075. Use messageFactory member.
  5076. * src/PeerInteractionCommand.cc
  5077. (PeerInteractionCommand): Added maxDownloadSpeedLimit.
  5078. Add reverse dependencies to factory object.
  5079. Set maxUploadSpeedLimit and requestTimeout and messageFactory to
  5080. dispatcher.
  5081. Set messageFactory to receiver.
  5082. Set keepAliveInterval and maxDownloadSpeedLimit and messageFactory to
  5083. btInteractive.
  5084. Set receiver to peerObject.
  5085. Set maxDownloadSpeedLimit to this.
  5086. (executeInternal): Use maxDownloadSpeedLimit member.
  5087. * src/BtChokeMessage.cc
  5088. (doReceivedAction): Use dispatcher, requestFactory member.
  5089. (onSendComplete): Use dispatcher member.
  5090. * src/PeerInteractionCommand.h
  5091. (maxDownloadSpeedLimit): New variable.
  5092. * src/DefaultBtMessageReceiver.h
  5093. (peerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  5094. (dispatcher):
  5095. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  5096. (messageFactory): New variable.
  5097. (setPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  5098. (getPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  5099. (setDispatcher):
  5100. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  5101. (setBtMessageFactory): New function.
  5102. * src/DefaultBtInteractive.cc
  5103. (initiateHandshake): Use messageFactory member.
  5104. (addBitfieldMessageToQueue): Use messageFactory member.
  5105. (addAllowedFastMessageToQueue): Use messageFactory member.
  5106. (decideChoking): Use messageFactory member.
  5107. (checkHave): Use messageFactory member.
  5108. (sendKeepAlive): Use keepAliveInterval, messageFactory member.
  5109. (receiveMessages): Use maxDownloadSpeedLimit member.
  5110. (decideInterest): Use messageFactory member.
  5111. * src/BtRequestMessage.cc
  5112. (doReceivedAction): Use messageFactory, dispatcher member.
  5113. (onQueued): Use dispatcher member.
  5114. * src/BtPieceMessage.cc
  5115. (doReceivedAction): Use dispatcher member.
  5116. (send): Use peerConnection member.
  5117. (onWrongPiece): Use requestFactory member.
  5118. (handleChokingEvent): Use messageFactory, dispatcher member.
  5119. (handleCancelSendingPieceEvent): Use messageFactory, dispatcher member.
  5120. * src/BtMessageDispatcher.h
  5121. (BtMessageDispatcherWeakHandle): New type definition.
  5122. * src/SimpleBtMessage.cc
  5123. (send): Use peerConnection member.
  5124. * src/BtRejectMessage.cc
  5125. (doReceivedAction): Use dispatcher member.
  5126. * src/DefaultBtMessageDispatcher.h
  5127. (Option.h): Removed include.
  5128. (messageFactory): New variable.
  5129. (option): Removed.
  5130. (maxUploadSpeedLimit): New variable.
  5131. (requestTimeout): New variable.
  5132. (DefaultBtMessageDispatcher): Removed option.
  5133. Added maxUploadSpeedLimit, requestTimeout.
  5134. (setOption): Removed.
  5135. (getOption): Removed.
  5136. (setMaxUploadSpeedLimit): New function.
  5137. (setRequestTimeout): New function.
  5138. (setBtMessageFactory): New function.
  5139. * src/DefaultBtInteractive.h
  5140. (btMessageReceiver):
  5141. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  5142. (dispatcher):
  5143. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  5144. (btRequestFactory):
  5145. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  5146. (peerConnection):
  5147. PeerConnectionHandle -> PeerConnectionWeakHandle
  5148. (messageFactory): New variable.
  5149. (option): Removed.
  5150. (keepAliveInterval): New variable.
  5151. (maxDownloadSpeedLimit): New variable.
  5152. (DefaultBtInteractive): Added keepAliveInterval, maxDownloadSpeedLimit.
  5153. (setBtMessageReceiver):
  5154. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  5155. (setDispatcher):
  5156. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  5157. (setBtRequestFactory):
  5158. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  5159. (setPeerConnection):
  5160. PeerConnectionHandle -> PeerConnectionWeakHandle
  5161. (setOption): Removed.
  5162. (setKeepAliveInterval): New function.
  5163. (setMaxDownloadSpeedLimit): New function.
  5164. (setBtMessageFactory): New function.
  5165. * src/BitfieldMan.h
  5166. (cachedNumMissingBlock): New variable.
  5167. (cachedNumFilteredBlock): New variable.
  5168. (cachedCompletedLength): New variable.
  5169. (cachedFilteredComletedLength): New variable.
  5170. (cachedFilteredTotalLength): New variable.
  5171. (countMissingBlockNow): New function.
  5172. (countFilteredBlockNow): New function.
  5173. (getFilteredTotalLengthNow): New function.
  5174. (getCompletedLengthNow): New function.
  5175. (getFilteredCompletedLengthNow): New function.
  5176. (updateCache): New function.
  5177. * src/AbstractBtMessage.h
  5178. (BtMessageDispatcher.h): New include.
  5179. (PeerConnection.h): New include.
  5180. (BtRequestFactory.h): New include
  5181. (BtMessageFactory.h): New include.
  5182. (dispatcher): New variable.
  5183. (messageFactory): New variable.
  5184. (peerConnection: New variable.
  5185. (setBtMessageDispatcher): New function.
  5186. (setPeerConnection): New function.
  5187. (setBtMessageFactory): New function.
  5188. (setBtRequestFactory): New function.
  5189. * src/DefaultBtMessageFactory.cc
  5190. (setCommonProperty): Set dispatcher, requestFactory, this,
  5191. peerConnection to msg.
  5192. * src/BtRegistry.h
  5193. (BT_MESSAGE_RECEIVER): New macro.
  5194. * src/PeerConnection.h
  5195. (PeerConnectionWeakHandle): New type definition.
  5196. * src/BtMessageFactory.h
  5197. (BtMessageFactoryWeakHandle): New type definition.
  5198. * src/BitfieldMan.cc
  5199. (BitfieldMan): Added cachedNumMissingBlock, cachedNumFilteredBlock,
  5200. cachedCompletedLength, cachedFilteredComletedLength,
  5201. cachedFilteredTotalLength.
  5202. Call updateCache().
  5203. (countMissingBlock): Return cachedNumMissingBlock.
  5204. (countMissingBlockNow): New function.
  5205. (countBlock): Return cachedNumFilteredBlock if filterEnabled is true.
  5206. (countFilteredBlockNow): New function.
  5207. (setBit): Call updateCache().
  5208. (unsetBit): Call updateCache().
  5209. (setBitfield): Call updateCache().
  5210. (clearAllBit): Call updateCache().
  5211. (setAllBit): Use setBitInternal instead of setBit.
  5212. Call updateCache().
  5213. (addFilter): Call updateCache().
  5214. (enableFilter): Call updateCache().
  5215. (disableFilter): Call updateCache().
  5216. (clearFilter): Call updateCache().
  5217. (getFilteredTotalLength): Return cachedFilteredTotalLength.
  5218. (getFilteredTotalLengthNow): New function.
  5219. (getCompletedLength): Return cachedCompletedLength.
  5220. (getCompletedLengthNow): New function.
  5221. (getFilteredCompletedLength): Return cachedFilteredComletedLength.
  5222. (getFilteredCompletedLengthNow): New function.
  5223. (updateCache): New function.
  5224. * src/BtMessageReceiver.h
  5225. (BtMessageReceiverWeakHandle): New type definition.
  5226. * src/DefaultBtMessageReceiver.cc
  5227. (receiveHandshake): Use messageFactory member.
  5228. (sendHandshake): Use messageFactory member.
  5229. (receiveMessage): Use messageFactory member.
  5230. * src/DefaultBtMessageFactory.h
  5231. (dispatcher): New variable.
  5232. (requestFactory): New variable.
  5233. (peerConnection): New variablle.
  5234. (setBtMessageDispatcher): New function.
  5235. (setBtRequestFactory): New function.
  5236. (setPeerConnection): New function.
  5237. * src/SharedHandle.h
  5238. (RefCount): New class.
  5239. (WeakHandle): New class.
  5240. * src/PeerObject.h
  5241. (BtMessageReceiver.h): New include.
  5242. (PeerObject): Added btMessageReceiver.
  5243. (btMessageReceiver): New variable.
  5244. * src/Util.cc
  5245. (countBit): Simplified.
  5246. * src/BtCancelMessage.cc
  5247. (doReceivedAction): Use dispatcher member.
  5248. * src/BtRequestFactory.h
  5249. (BtRequestFactoryWeakHandle): New type definition.
  5250. * src/PeerStorage.h
  5251. (downloadSpeed): int -> uint32_t
  5252. (uploadSpeed): int -> uint32_t
  5253. (sessionDownloadLength): long long int -> uint64_t
  5254. (sessionUploadLength): long long int -> uint64_t
  5255. 2007-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5256. To add RecoverableException, FatalException:
  5257. * src/AbstractCommand.cc
  5258. (onAbort): Exception -> RecoverableException
  5259. * src/PeerAbstractCommand.h
  5260. (RecoverableException.h): New include.
  5261. (onAbort): Exception -> RecoverableException.
  5262. * src/PeerInteractionCommand.cc
  5263. (onAbort): Exception -> RecoverableException.
  5264. * src/PeerAbstractCommand.cc
  5265. (execute): Exception -> RecoverableException.
  5266. (onAbort): Exception -> RecoverableException.
  5267. * src/TorrentRequestInfo.cc
  5268. (execute): Exception -> RecoverableException.
  5269. * src/MetalinkRequestInfo.cc
  5270. (execute): Exception -> RecoverableException.
  5271. * src/MetaFileUtil.cc: RecoverableException.
  5272. * src/AbstractCommand.h
  5273. (onAbort): Exception -> RecoverableException.
  5274. * src/DlRetryEx.h: Exception -> RecoverableException.
  5275. * src/DlAbortEx.h: Exception -> RecoverableException.
  5276. * src/PeerListenCommand.cc: Exception -> RecoverableException.
  5277. * src/Util.cc: Exception -> RecoverableException.
  5278. * src/DefauldDiskWriter.cc: Exception -> RecoverableException.
  5279. * src/TrackerUpdateCommand.cc: Exception -> RecoverableException.
  5280. * src/UrlRequestInfo.cc: Exception -> RecoverableException.
  5281. To make ID static const int
  5282. * src/BtInterestedMessage.h
  5283. (ID_t): Removed.
  5284. (ID): New variable.
  5285. (getId): Made non-const.
  5286. * src/BtPieceMessage.h
  5287. (ID_t): Removed.
  5288. (ID): New variable.
  5289. (getId): Made non-const.
  5290. * src/BtChokeMessage.h
  5291. (ID_t): Removed.
  5292. (ID): New variable.
  5293. (getId): Made non-const.
  5294. * src/BtHaveAllMessage.h
  5295. (ID_t): Removed.
  5296. (ID): New variable.
  5297. (getId): Made non-const.
  5298. * src/BtKeepAliveMessage.h
  5299. (ID_t): Removed.
  5300. (ID): New variable.
  5301. (getId): Made non-const.
  5302. * src/BtHandshakeMessage.h
  5303. (ID): New variable.
  5304. (getId): Made non-const.
  5305. * src/BtSuggestPieceMessage.h
  5306. (ID_t): Removed.
  5307. (ID): New variable.
  5308. (getId): Made non-const.
  5309. * src/BtPortMessage.h
  5310. (ID_t): Removed.
  5311. (ID): New variable.
  5312. (getId): Made non-const.
  5313. * src/AbstractBtMessage.h
  5314. (id): Removed.
  5315. (AbstractBtMessage): Removed id.
  5316. (getId): Removed.
  5317. * src/BtHaveMessage.h
  5318. (ID_t): Removed.
  5319. (ID): New variable.
  5320. (getId): Made non-const.
  5321. * src/BtAllowedFastMessage.h
  5322. (ID_t): Removed.
  5323. (ID): New variable.
  5324. (getId): Made non-const.
  5325. * src/BtCancelMessage.h
  5326. (ID_t): Removed.
  5327. (ID): New variable.
  5328. (getId): Made non-const.
  5329. * src/BtNotInterestedMessage.h
  5330. (ID_t): Removed.
  5331. (ID): New variable.
  5332. (getId): Made non-const.
  5333. * src/BtChokeMessage.h
  5334. (ID_t): Removed.
  5335. (ID): New variable.
  5336. (getId): Made non-const.
  5337. * src/BtRejectMessage.h
  5338. (ID_t): Removed.
  5339. (ID): New variable.
  5340. (getId): Made non-const.
  5341. * src/BtBitfieldMessage.h
  5342. (ID_t): Removed.
  5343. (ID): New variable.
  5344. (getId): Made non-const.
  5345. * src/BtUnchokeMessage.h
  5346. (ID_t): Removed.
  5347. (ID): New variable.
  5348. (getId): Made non-const.
  5349. * src/BtRequestMessage.h
  5350. (ID_t): Removed.
  5351. (ID): New variable.
  5352. (getId): Made non-const.
  5353. * src/BtHaveMessage.h
  5354. (ID_t): Removed.
  5355. (ID): New variable.
  5356. (getId): Made non-const.
  5357. To add --force-truncate command-line option and a check whether
  5358. the file already exists:
  5359. * src/DirectDiskAdaptor.h
  5360. (getFilePath): Made virtual public.
  5361. * src/MultiDiskAdaptor.h
  5362. (File.h): New include.
  5363. (DiskWriterEntry::fileEntry): Made private.
  5364. (DiskWriterEntry::fileExists): New function.
  5365. (DiskWriterEntry::getFileEntry): New function.
  5366. (fileExists): New function.
  5367. (getFilePath): New function.
  5368. * src/TorrentRequestInfo.cc
  5369. (FatalException.h): New include.
  5370. (message.h): New include.
  5371. (RecoverableException.h): New include.
  5372. (execute): Added a check whether file is already exists or not.
  5373. * src/DiskAdaptor.h
  5374. (fileExists): New function.
  5375. (getFilePath): New function.
  5376. * src/main.cc
  5377. (showUsage): Added an explanation of --force-truncate command-line
  5378. option.
  5379. (main): Added --force-truncate command-line option.
  5380. * src/Exception.h
  5381. (setMsg): buf[256] -> buf[1024]
  5382. * src/CopyDiskWriter.h
  5383. (getFilePath): Made public virtual.
  5384. * src/MultiDiskAdaptor.cc: fileEntry -> getFileEntry()
  5385. (fileExists): New function.
  5386. * src/DownloadEngineFactory.cc
  5387. (newTorrentConsoleEngine): Don't open file here.
  5388. * src/message.h
  5389. (EX_FILE_ALREADY_EXISTS): New definition.
  5390. * src/prefs.h
  5391. (PREF_FOECE_TRUNCATE): New definition.
  5392. * src/HttpResponseCommand.cc
  5393. (handleDefaultEncoding): Added a check whether the file already exists.
  5394. * src/SegmentMan.h
  5395. (fileExists): New function.
  5396. (shouldCancelDownloadForSafety): New function.
  5397. * src/FtpNegotiateCommand.cc
  5398. (recvSize): Added a check whether the file already exists.
  5399. * src/AbstractSingleDiskAdaptor.cc
  5400. (File.h): New include.
  5401. (fileExists): New function.
  5402. * src/AbstractSingleDiskAdaptor.h
  5403. (getFilePath): Removed.
  5404. (fileExists): New function.
  5405. * src/SegmentMan.cc
  5406. (fileExists): New function.
  5407. (shouldCancelDownloadForSafety): New function.
  5408. To fix regression bug in torrent downloading:
  5409. * src/DefaultBtRequestFactory.cc
  5410. (doChokedAction): New function.
  5411. * src/DefaultBtRequestFactory.h
  5412. (doChokedAction): New function.
  5413. * src/DefaultBtMessageDispatcher.cc
  5414. (doChokedAction): Do not delete request if its target is in allowed
  5415. fast set.
  5416. * src/DefaultBtInteractive.cc
  5417. (doPostHandshakeProcessing): Added a call to sendPendingMessage().
  5418. (sendKeepAlive): Send keep alive message even if the outgoing message
  5419. queue is not empty.
  5420. (decideInterest): Simplified the code.
  5421. (fillPiece): Remove a call to dispatcher->doChokedAction() because
  5422. it is already called when BtChokeMessage is received from a peer.
  5423. * src/BtRequestFactory.h
  5424. (doChokedAction): New function.
  5425. To clean up code:
  5426. * src/PeerInteractionCommand.h
  5427. (executeInternal): Added virtual keyword explicitly.
  5428. (prepareForRetry): Added virtual keyword explicitly.
  5429. (prepareForNextPeer): Added virtual keyword explicitly.
  5430. (onAbort): Added virtual keyword explicitly.
  5431. * src/RequestSlot.cc
  5432. (isTimeout): Use Time::elapsed() instead of differenceInMillis().
  5433. * src/BtPieceMessage.cc
  5434. (doReceivedAction): Added a debug log of piece's bitfield.
  5435. * src/Piece.h
  5436. (getBitfieldLength): New function.
  5437. * src/ByteArrayDiskWriter.cc
  5438. (clear): Added buf = 0 to avoid double free corruption.
  5439. * src/FileAllocator.cc
  5440. (allocate): Fixed an assignment of fileAllocationMonitor->currentValue.
  5441. Added cp.reset().
  5442. * src/BitfieldMan.h
  5443. (operator=): Rewritten.
  5444. * src/BitfieldMan.cc
  5445. (BitfieldMan): Initialized bitfield, useBitfield.
  5446. * src/PeerConnection.cc
  5447. (receiveMessage): Added a call to socket->readable() after getting
  5448. message length to avoid possible EOF.
  5449. * src/Util.cc
  5450. (torrentUrlencode): Fixed an encodeing bug. BUG#1629912
  5451. 2007-01-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5452. To add an ability to pre-allocate file space:
  5453. * src/DirectDiskAdaptor.h: Rewritten.
  5454. * src/PieceStorage.h: DiskAdaptor -> DiskAdaptorHandle
  5455. * src/MultiDiskAdaptor.h: Rewritten.
  5456. * src/DefaultPieceStorage.cc
  5457. (MultiDiskWriter.h): Removed include.
  5458. (PreAllocationDiskWriter.h): Removed include.
  5459. (FileAllocationMonitor.h): New include.
  5460. (~DefaultPieceStorage): Removed deletion of diskAdaptor.
  5461. (initStorage): Rewritten.
  5462. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5463. * src/FileAllocator.h: New class.
  5464. * src/FileAllocator.cc: New class.
  5465. * src/FileAllocationMonitor.h: New class.
  5466. * src/FileAllocationMonitor.cc: New class.
  5467. * src/ConsoleFileAllocationMonitor.h: New class.
  5468. * src/ConsoleFileAllocationMonitor.cc: New class.
  5469. * src/AbstractSingleDiskAdaptor.h: New class.
  5470. * src/AbstractSingleDiskAdaptor.cc: New class.
  5471. * src/DiskAdaptor.h
  5472. (Directory.h): Removed include.
  5473. (DiskWriter.h): Removed include.
  5474. (FileEntry.h): Removed include.
  5475. (diskWriter): Removed.
  5476. (DiskAdaptor): Removed diskWriter.
  5477. (openFile): Made pure virtual.
  5478. (closeFile): Made pure virtual.
  5479. (openExistingFile): Made pure virtual.
  5480. (initAndOpenFile): Made pure virtual.
  5481. (writeData): Made pure virtual.
  5482. (readData): Made pure virtual.
  5483. (sha1Sum): Made pure virtual.
  5484. (getStoreDir): Returns const reference of storeDir.
  5485. (DiskAdaptorHandle): New type definition.
  5486. * src/main.cc
  5487. (ConsoleFileAllocationMonitor.h): New include.
  5488. (showUsage): Added default value description of -s option.
  5489. Added the description of --file-allocation option.
  5490. (main): Set default value of --file-allocation option to 'none'.
  5491. Added --file-allocation command-line option.
  5492. Setup FileAllocationMonitorFactory.
  5493. * src/FtpInitiateConnectionCommand.cc
  5494. (executeInternal): Removed diskWriter related processing, which was
  5495. moved to FtpNegotiationCommand.cc.
  5496. * src/DirectDiskAdaptor.cc
  5497. (getFilePath): Made non-const.
  5498. * src/CopyDiskAdaptor.h
  5499. (DiskAdaptor.h): Removed include.
  5500. (DiskWriter.h): Removed include.
  5501. (AbstractSingleDiskAdaptor.h): New include.
  5502. (getFilePath): Made non-const. Added virtual keyword.
  5503. (CopyDiskAdaptor): Removed diskWriter.
  5504. (getTempFile): Returns const reference.
  5505. (CopyDiskAdaptorHandle): New type definition.
  5506. * src/ByteArrayDiskWriter.cc
  5507. (clear): Simplified.
  5508. (initAndOpenFile): Rewritten.
  5509. (openFile): Call initAndOpenFile()
  5510. * src/MultiDiskAdaptor.cc: Rewritten.
  5511. * src/DownloadEngineFactory.cc
  5512. (FileAllocator.h): New include.
  5513. (FileAllocationMonitor.h): New include.
  5514. (newConsoleEngine): Call DefaultDiskWriter::createNewDiskWriter() to
  5515. create DefaultDiskWriter with file allocator.
  5516. * src/DiskWriter.h
  5517. (initAndOpenFile): Added totalLength argument.
  5518. (openFile): Added totalLength argument.
  5519. * src/prefs.h
  5520. (PREF_FILE_ALLOCATION): New definition.
  5521. (V_PREALLOC): New definition.
  5522. (V_NONE): New definition.
  5523. * src/HttpResponseCommand.cc
  5524. (handleDefaultEncoding): Call DefaultDiskWriter::initAndOpenFile with
  5525. size.
  5526. * src/FtpNegotiateCommand.cc
  5527. (Util.h): New include.
  5528. (recvSize): Open file here.
  5529. * src/Util.h
  5530. (ullitos): New function.
  5531. * src/CopyDiskWriter.h
  5532. (getFilePath): Made non-const.
  5533. * src/DefaultDiskWriter.h
  5534. (Option.h): New include.
  5535. (totalLength): Removed.
  5536. (DefaultDiskWriter): Removed totalLength.
  5537. (initAndOpenFile): Added totalLength argument.
  5538. (DefaultDiskWriterHandle): New type definition.
  5539. (createNewDiskWriter): New function.
  5540. * src/Util.cc
  5541. (ullitos): New function.
  5542. * src/DefaultDiskWriter.cc
  5543. (message.h): New include.
  5544. (FileAllocator.h): New include.
  5545. (prefs.h): New include.
  5546. (Util.h): New include.
  5547. (DefaultDiskWriter): Removed totalLength.
  5548. (initAndOpenFile): Added file allocation.
  5549. (createNewDiskWriter): New function. Just for temporary solution.
  5550. It will be rewritten later.
  5551. * src/DiskAdaptor.cc
  5552. (DiskAdaptor): Removed diskWriter.
  5553. * src/AbstractDiskWriter.cc
  5554. (LogFactory.h): New include.
  5555. (AbstractDiskWriter): Added fileAllocator, logger.
  5556. (openFile): Added totalLength argument.
  5557. * src/AbstractDiskWriter.h
  5558. (FileAllocator.h): New include.
  5559. (Logger.h): New include.
  5560. (fileAllocator): New variable.
  5561. (logger): New variable.
  5562. (openFile): Added totalLength argument. Added virtual keyword
  5563. explicitly.
  5564. (openExistingFile): Added totalLength argument. Added virtual keyword
  5565. explicitly.
  5566. (closeFile): Added virtual keyword explicitly.
  5567. (sha1Sum): Added virtual keyword explicitly.
  5568. (writeData): Added virtual keyword explicitly.
  5569. (readData): Added virtual keyword explicitly.
  5570. (setFileAllocator): New function.
  5571. * src/DefaultPieceStorage.h
  5572. (FileAllocator.h): New include.
  5573. (diskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5574. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5575. * src/FileProgressMonitor.h: New class.
  5576. To compile aria2 on PC-BSD:
  5577. * src/DefaultBtContext.cc
  5578. (libgen.h): New include.
  5579. To fix memory leak:
  5580. * src/Exception.h
  5581. (~Exception): Delete cause. Fixed memory leak.
  5582. 2006-12-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5583. Rewritten a portion of bittorrent implementation:
  5584. * src/BtMessageValidator.h: New class.
  5585. * src/BtBitfieldMessageValidator.h: New class.
  5586. * src/BtHandshakeMessageValidator.h: New class.
  5587. * src/BtRequestMessageValidator.h: New class.
  5588. * src/BtSuggestPieceMessageValidator.h: New class.
  5589. * src/BtAllowedFastMessageValidator.h: New class.
  5590. * src/BtRejectMessageValidator.h: New class.
  5591. * src/BtCancelMessageValidator.h: New class.
  5592. * src/BtPieceMessageValidator.h: New class.
  5593. * src/BtHaveMessageValidator.h: New class.
  5594. * src/BtEventListener.h: New class.
  5595. * src/AbstractBtEventListener.h: New class.
  5596. * src/BtEvent.h: New class.
  5597. * src/BtChokingEvent.h: New class.
  5598. * src/BtChokedEvent.h: New class.
  5599. * src/BtCancelSendingPieceEvent.h: New class.
  5600. * src/BtAbortOutstandingRequestEvent.h: New class.
  5601. * src/Randomizer.h: New class.
  5602. * src/SimpleRandomizer.h: New class.
  5603. * src/BtMessage.h: New class.
  5604. * src/AbstractBtMessage.h: New class.
  5605. * src/SimpleBtMessage.h: New class.
  5606. * src/BtHaveMessage.h: New class.
  5607. * src/BtInterestedMessage.h: New class.
  5608. * src/BtAllowedFastMessage.h: New class.
  5609. * src/BtUnchokeMessage.h: New class.
  5610. * src/BtCancelMessage.h: New class.
  5611. * src/BtNotInterestedMessage.h: New class.
  5612. * src/BtChokeMessage.h: New class.
  5613. * src/BtHaveNoneMessage.h: New class.
  5614. * src/BtHandshakeMessage.h: New class.
  5615. * src/BtSuggestPieceMessage.h: New class.
  5616. * src/BtHaveMessage.h: New class.
  5617. * src/BtPieceMessage.h: New class.
  5618. * src/BtHaveAllMessage.h: New class.
  5619. * src/BtKeepAliveMessage.h: New class.
  5620. * src/BtPortMessage.h: New class.
  5621. * src/BtRejectMessage.h: New class.
  5622. * src/BtBitfieldMessage.h: New class.
  5623. * src/BtRequestMessage.h: New class.
  5624. * src/DefaultBtRequestFactory.h: New class.
  5625. * src/DefaultBtMessageReceiver.h: New class.
  5626. * src/BtInteractive.h: New class.
  5627. * src/BtMessageDispatcher.h: New class.
  5628. * src/DefaultBtMessageDispatcher.h: New class.
  5629. * src/DefaultBtInteractive.h: New class.
  5630. * src/BitfieldManFactory.h: New class.
  5631. * src/HandleRegistry.h: New class.
  5632. * src/BtMessageFactory.h: New class.
  5633. * src/BtMessageReceiver.h: New class.
  5634. * src/DefaultBtMessageFactory.h: New class.
  5635. * src/PeerObject.h: New class.
  5636. * src/BtRequestFactory.h: New class.
  5637. * src/SuggestPieceMessage.h: Removed.
  5638. * src/PortMessage.h: Removed.
  5639. * src/SuggestPieceMessage.h: Removed.
  5640. * src/KeepAliveMessage.h: Removed.
  5641. * src/HandshakeMessage.h: Removed.
  5642. * src/PeerInteraction.h: Removed.
  5643. * src/UnchokeMessage.h: Removed.
  5644. * src/PieceMessage.h: Removed.
  5645. * src/RequestMessage.h: Removed.
  5646. * src/InterestedMessage.h: Removed.
  5647. * src/HaveMessage.h: Removed.
  5648. * src/CancelMessage.h: Removed.
  5649. * src/RejectMessage.h: Removed.
  5650. * src/AllowedFastMessage.h: Removed.
  5651. * src/HaveNoneMessage.h: Removed.
  5652. * src/SimplePeerMessage.h: Removed.
  5653. * src/HaveAllMessage.h: Removed.
  5654. * src/BitfieldMessage.h: Removed.
  5655. * src/PeerMessageFactory.h: Removed.
  5656. * src/NotInterestedMessage.h: Removed.
  5657. * src/ChokeMessage.h: Removed.
  5658. * src/PeerMessage.h: Removed.
  5659. 2006-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5660. To know root cause of exception:
  5661. * src/Exception.h
  5662. (cause): New variable.
  5663. (Exception): Added a parameter.
  5664. (getMsg): Return const reference to msg.
  5665. (getCause): New function.
  5666. * src/DlRetryEx.h
  5667. (DlRetryEx): Added a parameter 'cause'.
  5668. Added an overloaded constructor.
  5669. (DlAbortEx): Added a parameter 'cause'.
  5670. Added an overloaded constructor.
  5671. * src/SimpleLogger.cc
  5672. (writeLog): Log nested exception messages recursively.
  5673. 2006-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5674. * src/DefaultBtProgressInfoFile.cc
  5675. (load): Fixed memory leak when the infohash doesn't match.
  5676. 2006-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5677. * src/DefaultPeerStorage.cc
  5678. (calculateStat): Simplified the code by combining 2 loops into 1.
  5679. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5680. Introduce new preference PREF_BT_TIMEOUT. This is the timeout value
  5681. for BitTorrent download:
  5682. * src/PeerAbstractCommand.cc
  5683. (PeerAbstractCommand): PREF_TIMEOUT -> PREF_BT_TIMEOUT
  5684. * src/main.cc:
  5685. (timeoutSpecified): Removed.
  5686. (main): Set the initial value of PREF_BT_TIMEOUT to 180.
  5687. Removed timeoutSpecified. TODO: Add --bt-timeout command line option.
  5688. * src/TorrentRequestInfo.cc
  5689. (timeoutSpecified): Removed.
  5690. (torrentHandler): Removed timeoutSpecified and the adjustment of
  5691. timeout value.
  5692. * src/prefs.h
  5693. (PREF_BT_TIMEOUT): New definition.
  5694. Delete unused variables:
  5695. * src/TorrentRequestInfo.cc
  5696. (requestInfo): Removed.
  5697. Move setSignalHander to Util::setGlobalSignalHandler:
  5698. * src/TorrentRequestInfo.cc:
  5699. setSignalHander -> Util::setGlobalSignalHandler
  5700. * src/main.cc
  5701. (setSignalHander): Removed.
  5702. (main): setSignalHander -> Util::setGlobalSignalHandler
  5703. * src/Util.h
  5704. (setGlobalSignalHandler): New function.
  5705. * src/Util.cc
  5706. (setGlobalSignalHandler): New function.
  5707. * src/UrlRequestInfo.cc:
  5708. setSignalHander -> Util::setGlobalSignalHandler
  5709. Reset peer status in order to exit gracefully:
  5710. * src/PeerAbstractCommand.cc
  5711. (execute): Call peer->resetStatus() when btRuntime->isHalt() is true.
  5712. To fix the bug that causes the number of bytes uploaded is not saved
  5713. to .aria2 file:
  5714. * src/DefaultPeerStorage.h
  5715. (removedPeerSessionDownloadLength): New variable.
  5716. (removedPeerSessionUploadLength): New variable.
  5717. * src/DefaultPeerStorage.cc
  5718. (DefaultPieceStorage): Added removedPeerSessionDownloadLength(0),
  5719. removedPeerSessionUploadLength(0).
  5720. (calculateStat): Calculate the number of bytes downloaded(uploaded)
  5721. through all peers, and then add removedPeerSessionDownloadLength(
  5722. removedPeerSessionUploadLength) to it.
  5723. (deleteUnusedPeer): Add the number of bytes downloaded(uploaded) from
  5724. (to) the peer to removedPeerSessionDownloadLength
  5725. (removedPeerSessionUploadLength).
  5726. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5727. To add Metalink location option:
  5728. * src/MetalinkRequestInfo.cc
  5729. (execute): Call MetalinkEntry::setLocationPreference()
  5730. * src/main.cc
  5731. (showUsage): Added the help message for --metalink-location option.
  5732. (main): Added --metalink-location option.
  5733. * src/prefs.h
  5734. (PREF_METALINK_LOCATION): New definition.
  5735. * src/MetalinkEntry.cc
  5736. (AddLocationPreference): New function object.
  5737. (setLocationPreference): New function.
  5738. * src/Xml2MetalinkProcessor.cc
  5739. (getResource): Set location attribute to MetalinkResource
  5740. To show URLs to download
  5741. * src/UrlRequestInfo.h
  5742. (printUrls): New function.
  5743. To add multiple <file> Metalink support:
  5744. * src/MetalinkEntry.h
  5745. (MetalinkResources): Removed.
  5746. (setLocationPreference): New function.
  5747. (MetalinkEntryHandle): New type definition.
  5748. (MetalinkEntries): New type definition.
  5749. * src/Xml2MetalinkProcessor.h
  5750. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  5751. (getResource): MetalinkResource* -> MetalinkResourceHandle
  5752. (parseFile): Metalinker* -> MetalinkerHandle
  5753. * src/UrlRequestInfo.h
  5754. (execute): RequestInfo* -> RequestInfos
  5755. * src/MetalinkRequestInfo.cc
  5756. (AccumulateNonP2PUrl): MetalinkResource* -> MetalinkResourceHandle
  5757. (FindBitTorrentUrl): MetalinkResource* -> MetalinkResourceHandle
  5758. (execute): RequestInfo* -> RequestInfos
  5759. Added multiple <file> support. Print filename when it is queued.
  5760. * src/MetalinkRequestInfo.h
  5761. (execute): RequestInfo* -> RequestInfos
  5762. (getDownloadEngine): Removed.
  5763. * src/RequestInfo.h
  5764. (RequestInfoHandle): New type definition.
  5765. (RequestInfos): New type definition.
  5766. (execute): RequestInfo* -> RequestInfos
  5767. (getDownloadEngine): Removed.
  5768. * src/MetalinkResource.h
  5769. (MetalinkResourceHandle): New type definition.
  5770. (MetalinkResources): New type definition.
  5771. * src/MetalinkEntry.cc
  5772. (~MetalinkEntry): Removed the deletion of the elements of resources,
  5773. because the element is now of type MetalinkResourceHandle.
  5774. (PrefOrder): MetalinkResource* -> MetalinkResourceHandle
  5775. (Supported): MetalinkResource* -> MetalinkResourceHandle
  5776. (dropUnsupportedResource): Removed the deletion of the elements of
  5777. resources because the element is now of type MetalinkResourceHandle.
  5778. * src/Xml2MetalinkProcessor.cc
  5779. (parseFile): Metalinker* -> MetalinkerHandle
  5780. MetalinkEntry* -> MetalinkEntryHandle
  5781. Removed try-catch block.
  5782. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  5783. MetalinkResource* -> MetalinkResourceHandle
  5784. Removed try-catch block.
  5785. (getResource): MetalinkResource* -> MetalinkResourceHandle
  5786. Free result by using xmlXPathFreeObject()
  5787. * src/Metalinker.cc
  5788. (~Metalinker): Removed the deletion of entries.
  5789. MetalinkEntry* -> MetalinkEntryHandle
  5790. (queryEntry): Add multiple <file> Metalink support.
  5791. * src/Metalinker.h
  5792. (MetalinkEntries): Removed.
  5793. (queryEntry): MetalinkEntry* -> MetalinkEntries
  5794. * src/MetalinkProcessor.h
  5795. (parseFile): Metalinker* -> MetalinkerHandle
  5796. Bug fixes:
  5797. * src/PeerChokeCommand.cc
  5798. (execute): cat01->cat02
  5799. * src/DefaultPieceStorage.cc
  5800. (DefaultPieceStorage): Added diskAdaptor(0)
  5801. * src/TrackerWatcherComand.cc:
  5802. (execute): Use btAnnounce->noMoreAnnounce()
  5803. to determin whether the function returns true or not.
  5804. * src/TrackerUpdateCommand.cc:
  5805. (execute): Use btAnnounce->noMoreAnnounce()
  5806. to determin whether the function returns true or not.
  5807. * src/FtpConnection.cc
  5808. (bulkReceiveResponse): Throw DlRetryEx if EOF got.
  5809. This is the fix of the busy loop bug.
  5810. * src/DownloadCommand.cc
  5811. (DownloadCommand): Reuse PeerStat. segmentMan->getPeerStat() returns
  5812. cached PeerStat.
  5813. The value of "name" entry in torrent file is now set by
  5814. *DiskAdaptor::setTopDir(...) methods.
  5815. * src/MultiDiskAdaptor.h
  5816. (topDir): New variable.
  5817. (setTopDir): New function.
  5818. (getTopDir): New function.
  5819. * src/MultiDiskAdaptor.cc
  5820. (getFilePath): Concat storDir, "/" and topDir.
  5821. (mkdir): Use getFilePath() to get the directory path for output.
  5822. * src/DefaultPieceStorage.cc
  5823. (initStorage): Set the value of "name" entry to MultiDiskAdaptor,
  5824. CopyDiskAdaptor.
  5825. * src/CopyDiskAdaptor.h
  5826. (topDir): New variable.
  5827. (setTopDir): New function.
  5828. (getTopDir): New function.
  5829. * src/CopyDiskAdaptor.cc
  5830. (fixFilename): Updated.
  5831. Misc
  5832. * src/UrlRequestInfo.h
  5833. (e): Removed.
  5834. (UrlRequestInfo): Removed e.
  5835. (getDownloadEngine): Removed.
  5836. * src/UrlRequestInfo.cc
  5837. (handler): Rewritten.
  5838. (printUrls): New function.
  5839. (execute): Call printUrls().
  5840. * src/HandshakeMessage.cc
  5841. (check): peerinteraction->getBtContext() -> btContext
  5842. * src/PeerInteraction.h
  5843. (getBtContext): Removed.
  5844. * src/TorrentRequestInfo.h
  5845. (execute): RequestInfo* -> RequestInfos
  5846. (getDownloadEngine): Removed.
  5847. * src/TorrentRequestInfo.cc
  5848. (haltRequested): Removed.
  5849. (btHaltRequested): New variable.
  5850. (torrentHandler): haltRequested -> btHaltRequested
  5851. (execute): RequestInfo* -> RequestInfos
  5852. * src/TorrentConsoleDownloadEngine.cc
  5853. (afterEachIteration): haltRequested -> btHaltRequested.
  5854. * src/ConsoleDownloadEngine.h
  5855. (initStatistics): Added virtual.
  5856. (calculateStatistics): Added virtual.
  5857. (onEndOfRun): Added virtual.
  5858. (afterEachIteration): Added virtual.
  5859. * src/ConsoleDownloadEngine.cc
  5860. (haltRequested): New variable.
  5861. (afterEachIteration): New function.
  5862. * src/main.cc
  5863. (requestInfo): Removed.
  5864. * src/SegmentMan.cc
  5865. (findSlowerSegmentEntry): Refactored.
  5866. * Release 0.9.0
  5867. 2006-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5868. To divide TorrentMan into 6 classes: BtContext, BtRuntime,
  5869. PeerStorage, PieceStorage, BtAnnounce and BtProgressInfoFile
  5870. * src/TorrentMan.h: Removed.
  5871. * src/TorrentMan.cc: Removed.
  5872. * src/TrackerWatcherComand.h: Made subclass of BtContextAwareCommand.
  5873. * src/SeedCheckCommand.cc: Use pieceStorage, btRuntime
  5874. * src/PeerAbstractCommand.h: Made subclass of BtContextAwareCommand.
  5875. * src/PeerAbstractCommand.cc: Use btRuntime.
  5876. * src/BtContextAwareCommand.h: New class.
  5877. * src/FileEntry.h: Added accessor methods for following variables.
  5878. (path): Made private.
  5879. (length): Made private.
  5880. (offset): Made private.
  5881. (extracted): Made private.
  5882. (requested): Made private.
  5883. (FileEntries): New definition.
  5884. (FileEntryHandle): New definition.
  5885. * src/FileEntry.cc: New file.
  5886. * src/HaveEraseCommand.h: Made subclass of BtContextAwareCommand.
  5887. * src/HaveEraseCommand.cc: Use btRuntime, pieceStorage.
  5888. * src/PeerChokeCommand.h: Made subclass of BtContextAwareCommand.
  5889. * src/PeerChokeCommand.cc: Use btRuntime, peerStorage, pieceStorage.
  5890. * src/PieceStorage.h: New file.
  5891. * src/PeerInteractionCommand.h: Use btContext.
  5892. * src/PeerInteractionCommand.cc: Use pieceStorage, peerStorage,
  5893. btRuntime.
  5894. * src/DefaultBtProgressInfoFile.h: New file.
  5895. * src/DefaultBtProgressInfoFile.cc: New file.
  5896. * src/File.cc
  5897. (Util.h): New include.
  5898. (mkdirs): New function.
  5899. * src/MultiDiskAdaptor.h
  5900. (mkdir): New function.
  5901. * src/PeerListProcessor.h
  5902. (Peers): Removed.
  5903. * src/PeerInteraction.h
  5904. (torrentMan): Removed.
  5905. (btContext): New variable.
  5906. (peerStorage): New variable.
  5907. (pieceStorage): New variable.
  5908. (btAnnounce): New variable.
  5909. (getTorrentMan): Removed.
  5910. (getBtContext): New function.
  5911. * src/PeerInteraction.cc: Use btContext, peerStorage, pieceStorage,
  5912. btAnnounce.
  5913. * src/HandshakeMessage.h
  5914. (TorrentMan.h): Removed.
  5915. * src/HandshakeMessage.cc: Use btContext.
  5916. * src/DefaultBtAnnounce.cc: New file.
  5917. * src/MultiDiskWriter.cc: Use the accessor methods of FileEntry.
  5918. * src/DefaultPieceStorage.cc: New file.
  5919. * src/DefaultBtContext.h: New file.
  5920. * src/TorrentRequestInfo.cc: Use btContext, pieceStorage.
  5921. Use the accessor methods of FileEntry.
  5922. * src/CookieBox.cc: Updated to use Util::slice().
  5923. * src/PieceMessage.cc: Use btContext, pieceStorage.
  5924. * src/common.h (SharedHandle.h): New include.
  5925. * src/PeerMessage.cc (PeerMessage): Added btContext, peerStorage,
  5926. pieceStorage.
  5927. * src/TorrentAutoSaveCommand.h: Made subclass of BtContextAwareCommand.
  5928. * src/DiskAdaptor.h
  5929. (topDir): Removed.
  5930. (getFileEntryFromPath): Changed the return type to FileEntryHandle.
  5931. (setTopDir): Removed.
  5932. (getTopDir): Removed.
  5933. * src/BtContext.h: New file.
  5934. * src/DefaultPeerStorage.h: New file.
  5935. * src/PieceMessage.h (TorrentMan.h): Removed.
  5936. * src/RequestMessage.h (TorrentMan.h): Removed.
  5937. * src/TorrentDownloadEngine.h
  5938. (uploadLength): New variable.
  5939. (btContext): New variable.
  5940. (btRuntime): New variable.
  5941. (pieceStorage): New variable.
  5942. (peerStorage): New variable.
  5943. (btAnnounce): New variable.
  5944. (btProgressInfoFile): New variable.
  5945. (torrentMan): Removed.
  5946. (setBtContext): New function.
  5947. * src/TorrentDownloadEngine.cc: Use BtContext, BtRuntime, pieceStorage,
  5948. peerStorage, btAnnounce, btProgressInfoFile.
  5949. * src/Piece.h
  5950. (toString): New function.
  5951. (Pieces): New type definition.
  5952. * src/Peer.h
  5953. (active): New variable.
  5954. (Peer): Added active.
  5955. (activate): Set active to true.
  5956. (deactivate): Set active to false.
  5957. (isActive): New function.
  5958. (Peers): New type definition.
  5959. * src/DirectDiskAdaptor.cc
  5960. (getFilePath): Use the accessor methods of FileEntry.
  5961. * src/TorrentConsoleDownloadEngine.h
  5962. (afterEachIteration): New function.
  5963. * src/TorrentConsoleDownloadEngine.cc
  5964. (haltRequested): New variable.
  5965. (sendStatistics): Use pieceStorage, btRuntime.
  5966. (afterEachIteration): New function.
  5967. * src/AnnounceList: AnnounceTier->AnnounceTierHandle.
  5968. * src/Directry.h
  5969. (Directory): New function.
  5970. (DirectoryHandle): New type definition.
  5971. * src/BtProgressInfoFile.h: New file.
  5972. * src/RequestMessage.cc: Use pieceStorage.
  5973. * src/BtRuntime.h: New file.
  5974. * src/DefaultBtContext.cc: New file.
  5975. * src/BitfieldMan.h
  5976. (getCompletedLength): New function(private).
  5977. (getCompletedLength): New function.
  5978. (getFilteredCompletedLength): New function.
  5979. * src/BitfieldMan.h
  5980. (getCompletedLength): New function(private).
  5981. (getCompletedLength): New function.
  5982. (getFilteredCompletedLength): New function.
  5983. * src/MultiDiskAdaptor.cc
  5984. (mkdir): New function.
  5985. (openFile): Call mkdir().
  5986. (initAndOpenFile): Call mkdir().
  5987. * src/CancelMessage.h
  5988. (TorrentMan.h): Removed.
  5989. * src/RejectMessage.h
  5990. (TorrentMan.h): Removed.
  5991. * src/DownloadEngineFactory.cc
  5992. (DefaultPieceStorage.h): New include.
  5993. (DefaultPeerStorage.h): New include.
  5994. (DefaultBtAnnounce.h): New include.
  5995. (DefaultBtProgressInfoFile.h): New include.
  5996. (newTorrentConsoleEngine): Rewritten.
  5997. * src/ShareRatioSeedCriteria.h
  5998. (torrentMan): Removed.
  5999. (btContext): New variable.
  6000. (peerStorage): New variable.
  6001. (btRuntime): New variable.
  6002. (evaluate): Use btContext, btRuntime, peerStorage.
  6003. * src/AnnounceTier.h: New file.
  6004. * src/BtAnnounce.h: New file.
  6005. * src/BtRegistry.h: New file.
  6006. * src/PeerInitiateConnectionCommand.h: Added btContext.
  6007. * src/PeerConnection.h (TorrentMan.h): Removed.
  6008. * src/PeerMessageFactory.cc: Use btContext, pieceStorage.
  6009. * src/Util.h
  6010. (slice): Added an argument.
  6011. * src/Util.cc
  6012. (slice): Added an argument to control whether trim is made or not.
  6013. * src/PeerStorage.h: New file.
  6014. * src/BtRegistry.cc: New file.
  6015. * src/TrackerUpdateCommand.h: Made subclass of BtContextAwareCommand.
  6016. * src/CopyDiskAdaptor.cc: Use the accessor methods of FileEntry.
  6017. * src/MultiDiskWriter.h: FileEntry -> FileEntryHandle
  6018. * src/PeerListenCommand.cc: Use btRuntime, peerStorage, btContext.
  6019. * src/TorrentRequestInfo.h
  6020. (e): Removed.
  6021. (showFileEntry): Added an argument.
  6022. (getDownloadEngine): Return 0.
  6023. * src/DefaultBtAnnounce.h: New file.
  6024. * src/TorrentAutoSaveCommand.cc: Use btRuntime, btProgressInfoFile.
  6025. * src/TrackerWatcherComand.cc: Use btRuntime, btAnnounce,
  6026. * src/PeerMessageFactory.h
  6027. (btContext): New variable.
  6028. (pieceStorage): New variable.
  6029. * src/TrackerUpdateCommand.cc: Use btRuntime, peerStorage, btContext,
  6030. btAnnounce.
  6031. * src/DiskAdaptor.cc
  6032. (DiskAdaptor): Removed topDir.
  6033. (~DiskAdaptor): Removed topDir.
  6034. * src/PeerListenCommand.h: Made subclass of BtContextAwareCommand.
  6035. * src/SeedCheckCommand.h: Made subclass of BtContextAwareCommand.
  6036. * src/File.h (mkdirs): New function.
  6037. * src/DefaultPeerStorage): New file.
  6038. * src/DownloadEngineFactory.h
  6039. (newTorrentConsoleEngine): Use btContext.
  6040. * src/BtContextAwareCommand.cc: New file.
  6041. * src/PeerInitiateConnectionCommand.cc: Use btRuntime, peerStorage.
  6042. * src/PeerMessage.h
  6043. (btContext): New variable.
  6044. (peerStorage): New variable.
  6045. (pieceStorage): New variable.
  6046. (setBtContext): New function.
  6047. * src/Directry.cc
  6048. (Directory): New function.
  6049. (createDir): Do nothing if name.size() == 0.
  6050. * src/AnnounceList.h
  6051. (AnnounceTier): Removed.
  6052. (AnnounceTiers): Removed.
  6053. * src/DefaultPieceStorage.h: New file.
  6054. * src/Piece.cc (toString): New function.
  6055. To fix typo:
  6056. * src/main.cc (showVersion): Fixed typo.
  6057. To fix compile warning:
  6058. * src/DelegatingPeerListProcessor.cc
  6059. (canHandle): Added "return false".
  6060. 2006-10-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6061. To simplify TrackerWatherCommand, TrackerUpdateCommand and
  6062. make the process of announce request testable.
  6063. * src/TrackerWatcherCommand.h
  6064. (TimeA2.h): Removed.
  6065. (interval): Removed.
  6066. (checkPoint): Removed.
  6067. (createRequestCommand): Added an argument 'url'.
  6068. (TrackerWatherCommand): Removed interval.
  6069. (createCommand): New function.
  6070. * src/DownloadEngineFactory.cc
  6071. (newTorrentConsoleEngine): Updated according to the changes in
  6072. TrackerWatherCommand.
  6073. * src/TorrentMan.cc
  6074. (DelegatingPeerListProcessor.h): New includes.
  6075. (TorrentMan): Added the initialization of announceInterval.
  6076. (isStoppedAnnounceReady): New function.
  6077. (isCompletedAnnounceReady): New function.
  6078. (isDefaultAnnounceReady): New function.
  6079. (isAnnounceReady): New function.
  6080. (getAnnounceUrl): New function.
  6081. (announceStart): New function.
  6082. (announceFailure): New function.
  6083. (announceSuccess): New function.
  6084. (isAllAnnounceFailed): New function.
  6085. (resetAnnounce): New function.
  6086. (processAnnounceResponse): New function.
  6087. (needMorePeerConnection): New function.
  6088. (noMoreAnnounce): New function.
  6089. * src/TrackerUpdateCommand.h
  6090. (getTrackerResponse): int->size_t
  6091. * src/TorrentMan.h
  6092. (isStoppedAnnounceReady): New function.
  6093. (isCompletedAnnounceReady): New function.
  6094. (isDefaultAnnounceReady): New function.
  6095. (announceInterval): New variable.
  6096. (isAnnounceReady): New function.
  6097. (getAnnounceUrl): New function.
  6098. (announceStart): New function.
  6099. (announceFailure): New function.
  6100. (announceSuccess): New function.
  6101. (isAllAnnounceFailed): New function.
  6102. (resetAnnounce): New function.
  6103. (processAnnounceResponse): New function.
  6104. (needMorePeerConnection): New function.
  6105. (noMoreAnnounce): New function.
  6106. * src/TrackerWatcherCommand.cc
  6107. (TrackerWatherCommand): Removed interval and checkPoint.
  6108. (execute): Rewritten.
  6109. (createCommand): New function.
  6110. (createRequestCommand): Rewritten.
  6111. * src/TrackerUpdateCommand.cc
  6112. (MetaFileUtil.h): Removed.
  6113. (DelegatingPeerListProcessor.h): Removed.
  6114. (getTrackerResponse): int->size_t. Use torrentMan's new functions.
  6115. 2006-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6116. Request -> RequestHandle:
  6117. * src/HttpResponseCommand.h: Request->RequestHandle
  6118. * src/AbstractCommand.cc: Request->RequestHandle
  6119. * src/HttpDownloadCommand.cc: Request->RequestHandle
  6120. * src/HttpRequestCommand.cc: Request->RequestHandle
  6121. * src/FtpInitiateConnectionCommand.h: Request->RequestHandle
  6122. * src/AbstractCommand.h: Request->RequestHandle
  6123. * src/HttpProxyRequestCommand.h: Request->RequestHandle
  6124. * src/HttpResponseCommand.cc: Request->RequestHandle
  6125. * src/HttpInitiateConnectionCommand.h: Request->RequestHandle
  6126. * src/FtpNegotiateCommand.cc: Request->RequestHandle
  6127. * src/FtpTunnelResponseCommand.h: Request->RequestHandle
  6128. * src/HttpConnection.h: Request->RequestHandle
  6129. * src/HttpProxyResponseCommand.cc: Request->RequestHandle
  6130. * src/InitiateConnectionCommandFactory.h: Request->RequestHandle
  6131. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  6132. * src/DownloadCommand.h: Request->RequestHandle
  6133. * src/FtpDowndloadCommand.cc: Request->RequestHandle
  6134. * src/HttpInitiateConnectionCommand.cc: Request->RequestHandle
  6135. * src/HttpRequestCommand.h: Request->RequestHandle
  6136. * src/FtpNegotiateCommand.h: Request->RequestHandle
  6137. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  6138. * src/FtpInitiateConnectionCommand.cc: Request->RequestHandle
  6139. * src/HttpDownloadCommand.h: Request->RequestHandle
  6140. * src/FtpConnection.cc: Request->RequestHandle
  6141. * src/InitiateConnectionCommandFactory.cc: Request->RequestHandle
  6142. * src/UrlRequestInfo.cc: Request->RequestHandle
  6143. * src/HttpProxyResponseCommand.h: Request->RequestHandle
  6144. * src/HttpConnection.h: Request->RequestHandle
  6145. * src/DownloadCommand.cc: Request->RequestHandle
  6146. * src/FtpConnection.h: Request->RequestHandle
  6147. * src/FtpDowndloadCommand.h: Request->RequestHandle
  6148. * src/HttpProxyRequestCommand.cc: Request->RequestHandle
  6149. * src/FtpTunnelRequestCommand.h: Request->RequestHandle
  6150. * src/Request.h
  6151. (SharedHandle.h): New include.
  6152. (RequestHandle): New type definition.
  6153. (Requests): Redefined.
  6154. To add MULTITRACKER support:
  6155. * src/TrackerWatcherCommand.h
  6156. (createRequestCommand): New function.
  6157. * src/DownloadEngineFactory.cc
  6158. (newTorrentConsoleEngine): Removed req.
  6159. * src/prefs.h
  6160. (PREF_TRACKER_MAX_TRIES): New definition.
  6161. * src/TorrentMan.cc
  6162. (TorrentMan): Removed req. Added trackerNumTry.
  6163. (~TorrentMan): Removed req.
  6164. (setupInternal1): Added announceList.
  6165. * src/TorrentRequestInfo.cc
  6166. (execute): Set PREF_MAX_TIRES to 1. The max number of tries for
  6167. announces is now specified by PREF_TRACKER_MAX_TRIES.
  6168. * src/main.cc
  6169. (main): Added PREF_TRACKER_MAX_TRIES.
  6170. * src/TorrentMan.h
  6171. (Request.h): Removed.
  6172. (AnnounceList.h): New include.
  6173. (trackerNumTry): New variable.
  6174. (req): Removed.
  6175. (announceList): New variable.
  6176. * src/TrackerWatcherCommand.cc
  6177. (execute): Rewritten.
  6178. (createRequestCommand): New function.
  6179. * src/TrackerUpdateCommand.cc
  6180. (execute): Updated with the use of AnnounceList.
  6181. * src/AnnounceList.cc: New class.
  6182. * src/AnnounceList.h: New class.
  6183. To fix typo:
  6184. * src/prefs.h
  6185. (PREF_MAX_TRIES): max_try->max_tries
  6186. To not to decode "+" as space in URL decode:
  6187. * src/Util.cc
  6188. (urldecode): Removed "+"->space decoding rule. Test case was updated.
  6189. 2006-10-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6190. To add timeout to async name resolution:
  6191. * src/AbstractCommand.h
  6192. (nameResolveFinished): New function. This is not elegant way. It needs
  6193. to be more refined.
  6194. (nameResolverCheck): New variable.
  6195. * src/AbstractCommand.cc
  6196. (AbstractCommand): Added nameResolverCheck.
  6197. (execute): Added the check whether the name resolution has finished.
  6198. (setNameResolverCheck): Set nameResolverCheck to true.
  6199. (disableNameResolverCheck): Set nameResolverCheck to false.
  6200. (nameResolverFinished): New function.
  6201. * src/FtpInitiateConnectionCommand.h
  6202. (nameResolverFinished): New function.
  6203. * src/FtpInitiateConnectionCommand.cc
  6204. (FtpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  6205. * src/HttpInitiateConnectionCommand.h
  6206. (nameResolverFinished): New function.
  6207. * src/HttpInitiateConnectionCommand.cc
  6208. (HttpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  6209. * src/prefs.h
  6210. (PREF_DNS_TIMEOUT): New definition.
  6211. * src/main.cc
  6212. (main): Added PREF_DNS_TIMEOUT.
  6213. To add the support for a non-compact response from a tracker:
  6214. * src/PeerListProcessor.h: New class.
  6215. * src/DefaultPeerListProcessor.h: New class.
  6216. * src/DefaultPeerListProcessor.cc: New class.
  6217. * src/CompactPeerListProcessor.h: New class.
  6218. * src/CompactPeerListProcessor.cc: New class.
  6219. * src/DelegatingPeerListProcessor.h: New class.
  6220. * src/DelegatingPeerListProcessor.cc: New class.
  6221. * src/TorrentMan.cc
  6222. (addPeer): New function(overload).
  6223. (addPeer): Delete unused peers only when new peer is added.
  6224. * src/TorrentMan.h
  6225. (PeerListProcessor.h): Included.
  6226. (Peers): Removed.
  6227. (addPeer): New function(overload).
  6228. * src/TrackerUpdateCommand.cc
  6229. (netinet/in.h): Removed.
  6230. (DelegatingPeerListProcessor.h): Included.
  6231. (execute): Updated to use DelegatingPeerListProcessor.
  6232. To fix the memory leak in TorrentMan::peers:
  6233. * src/PeerAbstractCommand.cc
  6234. (onAbort): Added peer->resetStatus().
  6235. * src/Peer.h
  6236. (resetStatus): Made public.
  6237. To improve the precision of the speed calculation:
  6238. * src/SpeedCalc.h
  6239. (nextInterval): New variable.
  6240. * src/SpeedCalc.cc
  6241. (reset): Added nextInterval.
  6242. (isIntervalOver): Use nextInterval instead of CHANGE_INTERVAL_SEC.
  6243. (changeSw): Set nextInterval to 15 seconds relative to the current
  6244. instant time.
  6245. * src/main.cc
  6246. (showVersion): Updated.
  6247. (showUsage): Updated.
  6248. * Release 0.8.1
  6249. 2006-09-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6250. * src/main.cc
  6251. (showUsage): Commented out --min-segment-size option.
  6252. (main): Commented out --min-segment-size option.
  6253. * Release 0.8.0
  6254. 2006-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6255. * src/*.{h,cc}:
  6256. Added an exception to the license which allows linking with OpenSSL.
  6257. 2006-09-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6258. * src/AbstractCommand.cc
  6259. (execute): Check whether the download has finished before checking
  6260. socket status.
  6261. Return true if peerStat->getStatus() == REQUEST_IDLE.
  6262. Do not exit even if no segment is available.
  6263. * src/prefs.h
  6264. (PREF_STARTUP_IDLE_TIME): New definition.
  6265. * src/PeerInteractionCommand.cc
  6266. (executeInternal): Removed max speed limit. Because it performs bad.
  6267. (receiveMessages): Added max speed limit. This was better than above,
  6268. but still a little bit to be desired. Sometimes the download speed
  6269. became much faster than I specified.
  6270. * src/SpeedCalc.h
  6271. (start): New variable.
  6272. (accumulatedLength): New variable.
  6273. (getAvgSpeed): New function.
  6274. * src/SpeedCalc.cc
  6275. (reset): Added start, accumulatedLength.
  6276. (update): Added calculation of an average speed.
  6277. (getAvgSpeed): New function.
  6278. * src/DownloadCommand.h
  6279. (sw): Removed.
  6280. * src/main.cc
  6281. (main): Added PREF_STARTUP_IDLE_TIME.
  6282. * src/PeerStat.h
  6283. (STATUS): Added REQUEST_IDLE.
  6284. (getMaxSpeed): Renamed as getMaxDownloadSpeed().
  6285. (getAvgDownloadSpeed): New function
  6286. (requestIdle): New function.
  6287. * src/SegmentMan.h
  6288. (SegmentEntryHandle): New type definition.
  6289. (SegmentEntries): Now holds SegmentEntryHandle.
  6290. (findSlowerSegmentEntry): New funtion.
  6291. * src/SegmentMan.cc
  6292. (save): Updated according to the changes in SegmentEntries.
  6293. (read): Updated according to the changes in SegmentEntries.
  6294. (FindSegmentEntryByIndex): Updated according to the changes in
  6295. SegmentEntries.
  6296. (FindSegmentEntryByCuid): Updated according to the changes in
  6297. SegmentEntries.
  6298. (checkoutSegment): Updated according to the changes in SegmentEntries.
  6299. (onNullBitfield): Updated according to the changes in SegmentEntries.
  6300. Renamed uitr as itr.
  6301. (findSlowerSegmentEntry): New function.
  6302. (getSegment): Updated according to the changes in SegmentEntries.
  6303. Added the feature that cancels the segment with slow server and fast
  6304. one takes it over.
  6305. (cancelSegment): Updated according to the changes in SegmentEntries.
  6306. (getDownloadLength): Updated according to the changes in
  6307. SegmentEntries.
  6308. (init): Assigned 0 to bitfield after deleting it.
  6309. * src/DownloadCommand.cc
  6310. (STARTUP_IDLE_TIME): Removed.
  6311. (executeInternal): Use PREF_STARTUP_IDLE_TIME.
  6312. * src/PeerChokeCommand.cc
  6313. (optUnchokingPeer): Updated according to the changes in Peer.
  6314. (ResetDelta): Removed.
  6315. (UploadFaster): Updated according to the changes in Peer.
  6316. (DownloadFaster): Updated according to the changes in Peer.
  6317. (execute): I clarify the meaning of "upload" and "download" here.
  6318. "upload" means the transfer from localhost to remote host.
  6319. "download" means the transfer from remote host to localhost.
  6320. Based on this rule, I swapped orderByUploadRate and
  6321. orderByDownloadRate.
  6322. * src/PeerInteractionCommand.cc
  6323. (PeerInteraction): Removed peerInteraction->setUploadLImit().
  6324. (executeInternal): Removed the argument of
  6325. peerInteraction->sendMessages().
  6326. (receiveMessages): Rewritten download speed limit.
  6327. (sendKeepAlive): Removed peerInteraction->sendMessages().
  6328. * src/HttpResponseCommand.cc
  6329. (handleDefaultEncoding): If file size is unknown in torrent request,
  6330. do not call segmentMan->initBitfield() here.
  6331. Disabled persistent connection feature in torrent request.
  6332. * src/UrlRequestInfo.h
  6333. (UrlRequestInfo): Removed const qualifier from option.
  6334. * src/TorrentMan.h
  6335. (TransferStat): New class.
  6336. (deltaDownloadLength): Removed.
  6337. (deltaUploadLength): Removed.
  6338. (addDeltaDownloadLength): Removed.
  6339. (getDeltaDownloadLength): Removed.
  6340. (resetDeltaDownloadLength): Removed.
  6341. (addDeltaUploadLength): Removed.
  6342. (getDeltaUploadLength): Removed.
  6343. (resetDeltaUploadLength): Removed.
  6344. (addActivePeer): Added peer->activate().
  6345. (deleteActivePeer): Added peer->deactivate().
  6346. (calculateStat): New function.
  6347. * src/TorrentMan.cc
  6348. (TorrentMan): Removed deltaDownloadLength and deltaUploadLength.
  6349. (calculateStat): New function.
  6350. * src/PeerInteraction.h
  6351. (uploadLimit): Removed.
  6352. (option): New variable.
  6353. (setUploadLimit): Removed.
  6354. (getUploadSpeed): Removed.
  6355. (sendMessages): Removed the argument "currentUploadSpeed".
  6356. * src/PeerInteraction.cc
  6357. (prefs.h): Included.
  6358. (PeerInteraction): Removed uploadLimit. Added option.
  6359. (sendMessages): Rewritten upload speed limit.
  6360. (sendHandshake): Removed the argument from sendMessages().
  6361. (sendBitfield): Removed the argument from sendMessages().
  6362. * src/PeerAbstractCommand.cc
  6363. (execute): Commented out the portion of upload limit.
  6364. (onAbort): Removed peer->resetStatus().
  6365. * src/TorrentRequestInfo.cc
  6366. (timeoutSpecified): Declared extern.
  6367. (execute): Set timeout to 180 if timeout is not specified by.
  6368. command-line.
  6369. * src/PieceMessage.cc
  6370. (receivedAction): Added peer->updateDownloadLength().
  6371. Removed peer->addPeerUpload().
  6372. Removed torrentMan->addDeltaDownloadLength().
  6373. (send): Added peer->updateUploadLength().
  6374. Removed peer->addPeerDownload().
  6375. Removed torrentMan->addDeltaUploadLength().
  6376. * src/main.cc
  6377. (timeoutSpecified): New variable.
  6378. (main): Set timeoutSpecified to false.
  6379. If the command-line option "--upload-limit" is specified, then
  6380. timeoutSpecified is set to true. This option will remain in the next
  6381. release, but be deprecated in the future release.
  6382. * src/TorrentRequestInfo.h
  6383. (TorrentRequestInfo): Removed const qualifier from op.
  6384. * src/PeerStat.h
  6385. (uploadSpeed): New variable.
  6386. (PeerStat): Added default value to cuid.
  6387. (calculateUploadSpeed): New function.
  6388. (updateUploadLength): New function.
  6389. (getMaxUploadSpeed): New function.
  6390. (getAvgUploadSpeed): New function.
  6391. (reset): Added uploadSpeed. Set status to IDLE.
  6392. * src/TorrentDownloadEngine.h
  6393. (cp): Declared as Time.
  6394. (sessionDownloadLengthArray): Removed.
  6395. (sessionUploadLengthArray): Removed.
  6396. (currentCp): Removed.
  6397. (lastCalcStat): New variable
  6398. (lastElapsed): Removed.
  6399. (sessionDownloadLength): Removed.
  6400. (calculateStat): New function.
  6401. * src/TorrentDownloadEngine.cc
  6402. (initStatistics): Removed lastElapsed, cp[],
  6403. sessionDownloadLengthArray[], sessionUploadLengthArray[],
  6404. currentCp, sessionDownloadLength.
  6405. Added cp.reset() and lastCalcStat.reset().
  6406. (calculateSpeed): Changed the name of the argument.
  6407. (calculateStatistics): Rewritten.
  6408. (calculateStat): New function.
  6409. * src/Peer.h
  6410. (PeerStat.h): Included.
  6411. (peerUpload): Removed.
  6412. (peerDownload): Removed.
  6413. (peerStat): New variable.
  6414. (sessionUploadLength): New variable.
  6415. (sessionDownloadLength): New variable.
  6416. (deltaUpload): Removed.
  6417. (deltaDownload): Removed.
  6418. (resetStatus): Made private.
  6419. (Peer): Added sessionUploadLength, sessionDownloadLength.
  6420. Removed peerUpload, peerDownload.
  6421. (updateUploadLength): New function.
  6422. (addDeltaUpload): Removed.
  6423. (updateDownloadLength): New function.
  6424. (resetDeltaUpload): Removed.
  6425. (getDeltaUpload): Removed.
  6426. (addDeltaDownload): Removed.
  6427. (calculateUploadSpeed): New function.
  6428. (resetDeltaDownload): Removed.
  6429. (getDeltaDownload): Removed.
  6430. (calculateDownloadSpeed): New function.
  6431. (getSessionUploadLength): New function.
  6432. (getSessionDownloadLength): New function.
  6433. (activate): New function.
  6434. (deactivate): New function.
  6435. (addPeerUpload): Removed.
  6436. (setPeerUpload): Removed.
  6437. (getPeerUpload): Removed.
  6438. (addPeerDownload): Removed.
  6439. (setPeerDownload): Removed.
  6440. (getPeerDownload): Removed.
  6441. * src/Peer.cc
  6442. (resetStatus): Removed resetDeltaUpload() and resetDeltaDownload().
  6443. * src/MetalinkRequestInfo.h
  6444. (MetalinkRequestInfo): Removed const qualifier from op.
  6445. * src/RequestInfo.h
  6446. (op): Removed const qualifier.
  6447. (RequestInfo): Removed const qualifier from op.
  6448. * src/prefs.h
  6449. (PREF_MAX_SPEED_LIMIT): Renamed as PREF_MAX_DOWNLOAD_LIMIT.
  6450. (PREF_UPLOAD_LIMIT): Renamed as PREF_MAX_UPLOAD_LIMIT.
  6451. * src/PeerInteractionCommand.cc
  6452. (PeerInteractionCommand): Use PREF_MAX_UPLOAD_LIMIT.
  6453. (receiveMessages): Use PREF_MAX_DOWNLOAD_LIMIT.
  6454. * src/PeerInteraction.cc
  6455. (sendMessages): Use PREF_MAX_UPLOAD_LIMIT.
  6456. * src/main.cc
  6457. (showUsage): Updated the description of "--lowest-speed-limit" option.
  6458. Added the description of "--max-download-limit" option.
  6459. Removed the description of "--upload-limit" option.
  6460. Added the description of "--max-upload-limit" option.
  6461. (main): Use PREF_MAX_UPLOAD_LIMIT, PREF_MAX_DOWNLOAD_LIMIT.
  6462. Added "--max-download-limit" option and "--max-upload-limit" option.
  6463. Added the warning message if "--upload-limit" option is used.
  6464. * src/DownloadCommand.cc
  6465. (executeInternal): Use PREF_MAX_DOWNLOAD_LIMIT.
  6466. 2006-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6467. To rewrite segment download mechanism for HTTP/FTP download.
  6468. Use BitfieldMan to manage segment download.
  6469. * src/HttpResponseCommand.h
  6470. (executeInternal): Pass the reference of segment.
  6471. * src/AbstractCommand.cc
  6472. (prepareForRetry): Call segmentMan->cancelSegment here.
  6473. (onAbort): Call segmentMan->cancelSegment here.
  6474. * src/HttpDownloadCommand.cc
  6475. (prepareForNextSegment): New function.
  6476. * src/DownloadEngineFactory.cc
  6477. (newConsoleEngine): Removed splitter.
  6478. (newTorrentConsoleEngine): Removed splitter.
  6479. * src/Request.h
  6480. (segment): Renamed from seg.
  6481. * src/FtpInitiateConnectionCommand.h
  6482. (executeInternal): Pass the reference of segment.
  6483. * src/AbstractCommand.h
  6484. (executeInternal): Pass the reference of segment.
  6485. * src/pref.h
  6486. (PREF_SEGMENT_SIZE): New definition.
  6487. * src/HttpProxyRequestCommand.h
  6488. (executeInternal): Pass the reference of segment.
  6489. * src/HttpResponseCommand.cc
  6490. (checkResponse): Allowed status 206 when a request range starts 0.
  6491. (handleDefaultEncoding): Rewritten the code related to Segment.
  6492. (handleOtherEncoding): Rewritten the code related to Segment.
  6493. * src/SegmentMan.h
  6494. (SegmentEntry): New class.
  6495. (SegmentEntries): New type definition.
  6496. (bitfield): New variable.
  6497. (usedSegmentEntries): New variable.
  6498. (onNullBitfield): New function.
  6499. (checkoutSegment): New function.
  6500. (segments): Removed.
  6501. (splitter): Removed.
  6502. (unregisterId): Removed.
  6503. (getSegment): New function(overload)
  6504. (getDownloadedSize): Removed.
  6505. (cancelSegment): New function.
  6506. (completeSegment): New function.
  6507. (initBitfield): New function.
  6508. (hasSegment): New function.
  6509. (getDownloadLength): New function.
  6510. * src/BitfieldMan.h
  6511. (getStartIndex): New function.
  6512. (getEndIndex): New function.
  6513. (getMissingUnusedIndex): New function(overload).
  6514. (getSparseMissingUnusedIndex): New function.
  6515. * src/BitfieldMan.cc
  6516. (getMissingIndexRandomly): Handle the last byte of bitfield properly.
  6517. (getMissingUnusedIndex): New function(overload).
  6518. (Range): New class.
  6519. (getStartIndex): New function.
  6520. (getEndIndex): New function.
  6521. (getSparseMissingUnusedIndex): New function.
  6522. (isBitSetInternal): Return false if the given index is less than 0.
  6523. * src/HttpInitiateConnectionCommand.h
  6524. (executeInternal): Pass the reference of segment.
  6525. * src/FtpNegotiateCommand.h
  6526. (executeInternal): Pass the reference of segment.
  6527. * src/FtpNegotiateCommand.cc
  6528. (recvSize): Initialize bitfield here.
  6529. * src/FtpTunnelResponseCommand.h
  6530. (executeInternal): Pass the reference of segment.
  6531. * src/HttpConnection.cc
  6532. (createRequest): Rewritten range header processing.
  6533. * src/DownloadCommand.h
  6534. (executeInternal): Pass the reference of segment.
  6535. (prepareForRetry): Removed.
  6536. (prepareForNextSegment): Added an argument segment. Made it a virtual
  6537. function.
  6538. * src/main.cc
  6539. (main): Set the initial value of PREF_SEGMENT_SIZE to 1MB.
  6540. * src/SegmentMan.cc
  6541. (SegmentMan): Added bitfield. Removed splitter.
  6542. (~SegmentMan): Added bitfield. Removed splitter.
  6543. (unregisterId): Removed.
  6544. (getSegment): Rewritten.
  6545. (updateSegment): Rewritten.
  6546. (save): Rewritten.
  6547. (read): Rewritten.
  6548. (finished): Rewritten.
  6549. (getDownloadedSize): Removed.
  6550. (initBitfield): New function.
  6551. (FindSegmentEntryByIndex): New function object.
  6552. (FindSegmentEntryByCuid): New function object.
  6553. (checkoutSegment): New function.
  6554. (onNullBitfield): New function.
  6555. (getSegment): New function(overload).
  6556. (CancelSegment): New function object.
  6557. (cancelSegment): New function.
  6558. (completeSegment): New function.
  6559. (hasSegment): New function.
  6560. (getDownloadLength): New function.
  6561. * src/FtpInitiateConnectionCommand.cc
  6562. (executeInternal): Load .aria2 file after hostname resolution finishes.
  6563. * src/Segment.h: Rewritten.
  6564. * src/Segment.cc (operator<<): New function.
  6565. * src/HttpDownloadCommand.h
  6566. (prepareForNextSegment): New function.
  6567. * src/Request.cc
  6568. (resetUrl): Made segment null.
  6569. * src/DownloadEngine.cc
  6570. (~DownloadEngine): Call cleanQueue before deleting segmentMan.
  6571. * src/HttpProxyRequestCommand.h
  6572. (executeInternal): Pass the reference of segment.
  6573. * src/DownloadCommand.cc
  6574. (executeInternal): Rewritten the code related to Segment.
  6575. (prepareForRetry): Removed.
  6576. (prepareForNextSegment): Rewritten.
  6577. * src/FtpTunnelResponseCommand.h
  6578. (executeInternal): Pass the reference of segment.
  6579. To add HTTP 1.1 persistent connection support(experimental)
  6580. * src/HttpRequestCommand.cc
  6581. (executeInternal): Disable keep alive if it is disabled by
  6582. configuration.
  6583. * src/Request.h
  6584. (keepAlive): New variable.
  6585. (isKeepAlive): New function.
  6586. (setKeepAlive): New function.
  6587. * src/pref.h
  6588. (PREF_HTTP_KEEP_ALIVE): New definition.
  6589. * src/HttpResponseCommand.cc
  6590. (executeInternal): Check the remote server supports keep alive.
  6591. * src/HttpConnection.cc
  6592. (createRequest): Send "Connection: close" only if keep alive is
  6593. disabled.
  6594. * src/main.cc
  6595. (main):
  6596. Set the initial value(false) of PREF_KEEP_ALIVE to false.
  6597. To add max download speed limit:
  6598. * src/pref.h
  6599. (PREF_MAX_SPEED_LIMIT): New definition.
  6600. * src/PeerInteractionCommand.cc
  6601. (executeInternal): Added max download speed limit. Not tested yet.
  6602. * src/SegmentMan.h
  6603. (PeerStats): New type definition.
  6604. (peerStats): New variable.
  6605. (registerPeerStat): New function.
  6606. (FindPeerStat): New function object.
  6607. (getPeerStat): New function.
  6608. (calculateDownloadSpeed): New function.
  6609. * src/SpeedCalc.h: New class.
  6610. * src/SpeedCalc.cc: New class.
  6611. * src/main.cc
  6612. (main):
  6613. Set the initial value of PREF_MAX_SPEED_LIMIT to 0(which means the
  6614. download speed is not restricted).
  6615. * src/PeerStat.h: New class.
  6616. * src/SegmentMan.cc
  6617. (registerPeerStat): New function.
  6618. (calculateDownloadSpeed): New function.
  6619. * src/DownloadCommand.cc
  6620. (STARTUP_IDLE_TIME): New definition.
  6621. (DownloadCommand): Register peerStat to segmentMan. Call peerStat->
  6622. downloadStart.
  6623. (~DownloadCommand): Call peerStat->downloadStop.
  6624. (executeInternal): Added download speed limitter. Rewritten lowest
  6625. speed limitter.
  6626. * src/HttpConnection.cc
  6627. (receiveResponse): Fixed: eohIndex[headerBuf] -> headerBuf[eohIndex].
  6628. * src/AbstractCommand.cc
  6629. (resolveHostname): Throw DlAbortEx if a name resolution failes.
  6630. Added hostname to the error message.
  6631. * src/ConsoleDownloadEngine.cc
  6632. (calculateStatistics): Initialize psize with dlSize.
  6633. * src/PieceMessage.cc
  6634. (receivedAction): Do not call peerInteraction->abortPiece here.
  6635. (onGotWrongPiece): Call peerInteraction->abortPiece here.
  6636. * src/BitfieldMan.h
  6637. (clearAllUseBit): New function.
  6638. (setAllUseBit): New function.
  6639. * src/BitfieldMan.cc
  6640. (clearAllBit): Do not clear useBitfield here.
  6641. (clearAllUseBit): New function.
  6642. (setAllUseBit): New function.
  6643. * src/Piece.cc
  6644. (clearAllBlock): Call bitfield->clearAllUseBit().
  6645. 2006-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6646. To make filename URL-decoded:
  6647. * src/HttpResponseCommand.h: Updated doc.
  6648. * src/HttpResponseCommand.cc
  6649. (determinFilename): Made filename URL-decoded.
  6650. * src/FtpInitiateConnectionCommand.cc
  6651. (executeInternal): Made filename URL-decoded.
  6652. * src/Util.h (urldecode): New function.
  6653. * src/Util.cc (urldecode): New function.
  6654. To fix a bug that caused assertion failure in ares_strerror:
  6655. * src/NameResolver.cc (callback): Fixed the bug.
  6656. * Release 0.7.3
  6657. 2006-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6658. To add --seed-time and --seed-ratio command-line option:
  6659. * src/Option.h (getAsDouble): New function.
  6660. * src/Option.cc (getAsDouble): New function.
  6661. * src/SeedCheckCommand.h: New class.
  6662. * src/SeedCheckCommand.cc: New class.
  6663. * src/DownloadEngineFactory.cc
  6664. (SeedCheckCommand.h): Included.
  6665. (UnionSeedCriteria.h): Included.
  6666. (TimeSeedCriteria.h): Included.
  6667. (ShareRatioSeedCriteria.h): Included.
  6668. (newTorrentConsoleEngine): Added the processing of seed option.
  6669. * src/SeedCriteria.h: New class.
  6670. * src/ShareRatioSeedCriteria.h: New class.
  6671. * src/TimeSeedCriteria.h: New class.
  6672. * src/UnionSeedCriteria.h: New class.
  6673. * src/prefs.h
  6674. (PREF_SEED_TIME): New definition.
  6675. (PREF_SEED_RATIO): New definition.
  6676. * src/main.cc
  6677. (showUsage): Added --seed-time and --seed-ratio option.
  6678. (main): Added --seed-time and --seed-ratio option.
  6679. Made default log file name "/dev/null".
  6680. * src/SharedHandle.h
  6681. (SharedHandle): Copy constructor. Made it assignable from the
  6682. SharedHandle of the subclasses.
  6683. (operator=): Made it assignable from the SharedHandle of the
  6684. subclasses.
  6685. (getRefCount): New function.
  6686. To add notice log level and the switch to write log to stdout. This
  6687. switch is configurable per log level.
  6688. * src/Logger.h
  6689. (notice): New function.
  6690. (LEVEL): Added NOTICE. Assigned an explicit value to each log level
  6691. constant.
  6692. * src/LogFactory.cc
  6693. (getInstance): The use of NullLogger was removed. A log message with
  6694. notice log level was made written to stdout along with log file.
  6695. * src/NullLogger.h
  6696. (notice): New function.
  6697. * src/SimpleLogger.h
  6698. (writeHeader): Added the 'file' argument.
  6699. (writeLog): Added the 'file' argument.
  6700. (writeFile): New function.
  6701. (stdoutField): New variable.
  6702. (SimpleLogger): Removed the default constructor.
  6703. (SimpleLogger): Made the default value of logfile 0.
  6704. (debug): Added 'virtual' keyword.
  6705. (info): Added 'virtual' keyword.
  6706. (warn): Added 'virtual' keyword.
  6707. (error): Added 'virtual' keyword.
  6708. (notice): New function.
  6709. (setStdout): New function.
  6710. * src/SimpleLogger.cc
  6711. (WRITE_LOG): Replaced writeLog with writeFile.
  6712. (WRITE_LOG_EX): Replaced writeLog with writeFile.
  6713. (SimpleLogger): Removed the default constructor.
  6714. (setStdout): New function.
  6715. (writeLog): Added the handling of NOTICE log level.
  6716. (writeFile): New function.
  6717. (notice): New function.
  6718. * src/TorrentMan.h: Updated doc.
  6719. * src/BitfieldMan.h: Updated doc.
  6720. * src/TrackerWatcherCommand.cc
  6721. (execute): Return true if error occurred in the request to the tracker
  6722. and halt is requested.
  6723. * src/TrackerUpdateCommand.cc
  6724. (execute): Return true if error occurred in the request to the tracker
  6725. and halt is requested.
  6726. To call onDownloadComplete from TorrentMan::completePiece(), not from
  6727. DownloadEngine:
  6728. * src/TorrentConsoleDownloadEngine.h
  6729. (onSelectiveDownloadingCompletes): Removed.
  6730. * src/TorrentConsoleDownloadEngine.cc
  6731. (onSelectiveDownloadingCompletes): Removed.
  6732. * src/TorrentDownloadEngine.h
  6733. (onEndOfRun): Added 'virtual' keyword.
  6734. (afterEachIteration): Removed.
  6735. (onSelectiveDownloadingCompletes): Removed.
  6736. * src/TorrentDownloadEngine.cc
  6737. (onEndOfRun): Removed filenameFixed.
  6738. (afterEachIteration): Removed.
  6739. * src/TorrentMan.cc
  6740. (completePiece): Call onDownloadComplete here.
  6741. (onDownloadComplete): Added 2 log messages.
  6742. 2006-08-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6743. To fix compilation problem on gcc4.1.1(patch#1542283 by tizianomueller)
  6744. * src/NameResolver.h: Added the prototype declaration of callback().
  6745. To support c-ares library:
  6746. * src/AbstractCommand.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6747. * src/FeatureConfig.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6748. * src/FtpInitiateConnectionCommand.h:
  6749. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6750. * src/AbstractCommand.h: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6751. * src/HttpInitiateConnectionCommand.h:
  6752. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6753. * src/NameResolver.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS.
  6754. Added thes upport of c-ares's ares_strerror(the idea came from patch
  6755. #1542285 by tizianomueller)
  6756. * src/HttpInitiateConnectionCommand.cc:
  6757. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6758. * src/FtpInitiateConnectionCommand.cc:
  6759. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6760. * src/DownloadEngine.h:
  6761. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6762. * src/DownloadEngine.cc:
  6763. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6764. To fix the bug that causes compilation failure with metalink-support
  6765. disabled(bug#1543587):
  6766. * src/main.cc: Fixed with the patch by tizianomueller.
  6767. * Release 0.7.2
  6768. 2006-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6769. * src/main.cc
  6770. (main): Added a message to inform users that aria2 is starting to
  6771. verify checksum.
  6772. * src/RequestInfo.cc
  6773. (printDownloadAbortMessage): Added a message to inform users that
  6774. transfer can be resumed.
  6775. * src/FeatureConfig.cc
  6776. (FEATURE_ASYNC_DNS): New definition.
  6777. (FeatureConfig): Added aysnc DNS entry.
  6778. To replace CommandUuid with Command* in SocketEntry and
  6779. NameResolverEntry:
  6780. * src/DownloadEngine.h
  6781. (CommandUuids): Removed.
  6782. (SocketEntry::commandUuid): Removed.
  6783. (SocketEntry::command): New variable.
  6784. (SocketEntry::SocketEntry): Updated.
  6785. (SocketEntry::operator==): Updated.
  6786. (NameResolverEntry::commandUuid): Removed.
  6787. (NameResolverEntry::command): New variable.
  6788. (NameResolverEntry::NameResolverEntry): Updated.
  6789. (NameResolverEntry::operator==): Updated.
  6790. (waitData): Changed the argument type.
  6791. (addSocketForReadCheck): Changed the argument type.
  6792. (deleteSocketForReadCheck): Changed the argument type.
  6793. (addSocketForWriteCheck): Changed the argument type.
  6794. (deleteSocketForWriteCheck): Changed the argument type.
  6795. (addNameResolverCheck): Changed the argument type.
  6796. (deleteNameResolverCheck): Changed the argument type.
  6797. * src/DownloadEngine.cc
  6798. (FindCommand): Removed.
  6799. (run): Removed activeUuid. Added activeCommands instead.
  6800. (AccumulateActiveUuid): Renamed as AccumulateActiveCommand.
  6801. (AccumulateActiveCommand): New function object.
  6802. (waitData): Use AccumulateActiveCommand.
  6803. (addSocketForReadCheck): Use Command instead of CommandUuid.
  6804. (deleteSocketForReadCheck): Use Command instead of CommandUuid.
  6805. (addSocketForWriteCheck): Use Command instead of CommandUuid.
  6806. (deleteSocketForWriteCheck): Use Command instead of CommandUuid.
  6807. (addNameResolverCheck): Use Command instead of CommandUuid.
  6808. (deleteNameResolverCheck): Use Command instead of CommandUuid.
  6809. * src/AbstractCommand.cc
  6810. (disableReadCheckSocket): Updated according to the changes in
  6811. DownloadEngine.
  6812. (setReadCheckSocket): Updated according to the changes in
  6813. DownloadEngine.
  6814. (disableWriteCheckSocket): Updated according to the changes in
  6815. DownloadEngine.
  6816. (setWriteCheckSocket): Updated according to the changes in
  6817. DownloadEngine.
  6818. (setNameResolverCheck): Updated according to the changes in
  6819. DownloadEngine.
  6820. (disableNameResolverCheck): Updated according to the changes in
  6821. DownloadEngine.
  6822. * src/AbstractCommand.cc
  6823. (disableReadCheckSocket): Updated according to the changes in
  6824. DownloadEngine.
  6825. (setReadCheckSocket): Updated according to the changes in
  6826. DownloadEngine.
  6827. (disableWriteCheckSocket): Updated according to the changes in
  6828. DownloadEngine.
  6829. (setWriteCheckSocket): Updated according to the changes in
  6830. DownloadEngine.
  6831. * release 0.7.1
  6832. 2006-08-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6833. To handle the case where some BitTorrent tracker requires all letters
  6834. except for [A-Za-z0-9] is URL encoded.
  6835. * src/Util.h
  6836. (torrentUrlencode): New function.
  6837. * src/Util.cc
  6838. (ctype.h): Included.
  6839. (torrentUrlencode): New function.
  6840. * src/TrackerWatcherCommand.cc
  6841. (execute): Use Util::torrentUrlencode() instead of Util::urlencode().
  6842. 2006-08-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6843. To add asynchronous DNS support(libares):
  6844. * src/AbstractCommand.h
  6845. (setNameResolverCheck): New function.
  6846. (disableNameResolverCheck): New function
  6847. (resolveHostname): New function.
  6848. * src/AbstractCommand.cc
  6849. (setNameResolverCheck): New function.
  6850. (disableNameResolverCheck): New function
  6851. (resolveHostname): New function.
  6852. * src/FtpInitiateConnectionCommand.h
  6853. (nameResolver): New function.
  6854. * src/FtpInitiateConnectionCommand.cc
  6855. (Util.h): Included.
  6856. (FtpInitiateConnectionCommand): Call disableReadCheckSocket,
  6857. disableWriteCheckSocket.
  6858. (~FtpInitiateConnectionCommand): Call disableNameResolverCheck.
  6859. (executeInternal): Added async DNS support.
  6860. * src/HttpInitiateConnectionCommand.h
  6861. (nameResolver): New function.
  6862. * src/HttpInitiateConnectionCommand.cc
  6863. (DlRetryEx.h): Included.
  6864. (HttpInitiateConnectionCommand): Call disableReadCheckSocket,
  6865. disableWriteCheckSocket.
  6866. (~HttpInitiateConnectionCommand): Call disableNameResolverCheck.
  6867. (executeInternal): Added async DNS support.
  6868. * src/NameResolver.h: New class. Note: #include <ares.h> is surrounded
  6869. by extern "C" declaration.
  6870. * src/NameResolver.cc: New class.
  6871. * src/Util.h:
  6872. (isNumberAndDotsNotation): New function
  6873. * src/Util.cc
  6874. (isNumberAndDotsNotation): New function.
  6875. * src/DownloadEngine.h
  6876. (NameResolver.h): Included.
  6877. (NameResolverEntry): New class.
  6878. (NameResolverEntries): New type definition.
  6879. (addNameResolverCheck): New function.
  6880. (deleteNameResolverCheck): New function.
  6881. * src/DownloadEngine.cc
  6882. (run): Initialize cp with 0.
  6883. (SetDescriptor::operator()): Added for NameResolverEntry.
  6884. (AccumulateActiveUuid::operator()): Added for NameResolverEntry.
  6885. (waitData): Check nameResolver entries.
  6886. (updateFdSet): Update fds in nameResolver entries.
  6887. (addNameResolverCheck): New function.
  6888. (deleteNameResolverCheck): new function.
  6889. * src/PeerInteractionCommand.cc
  6890. (executeInternal): Fixed wrong socket handling.
  6891. * src/main.cc
  6892. (main): Fixed the initial value of PREF_LOWEST_SPEED_LIMIT option to 0.
  6893. * src/Util.cc
  6894. (fileChecksum): Removed the call to ctx.digestReset().
  6895. 2006-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6896. * po/ru.po: Azamat sent me Russian translation.
  6897. * src/FtpNegotiateCommand.cc
  6898. (recvGreeting): Call disableWriteCheckSocket just after
  6899. socket->setBlockingMode(). This avoids unnecessary CPU-hog loop.
  6900. (recvRetr): Recognized status code 125 as a acceptable response code.
  6901. Rename Time.h to TimeA2.h to avoid compilation ploblem on
  6902. case-insesitive filesystem(BUG#1531057).
  6903. * src/Time.h: Renamed as TimeA2.h.
  6904. * src/Time.cc: Renamed as TimeA2.cc.
  6905. * src/TimeA2.h: New class.
  6906. * src/TimeA2.cc: New class.
  6907. * src/PeerChokeCommand.h: Replaced Time.h with TimeA2.h.
  6908. * src/TrackerWatcherCommand.h: Replaced Time.h with TimeA2.h.
  6909. * src/PeerAbstractCommand.h: Replaced Time.h with TimeA2.h.
  6910. * src/AbstractCommand.h: Replaced Time.h with TimeA2.h.
  6911. * src/PeerInteractionCommand.h: Replaced Time.h with TimeA2.h.
  6912. * src/ConsoleDownloadEngine.h: Replaced Time.h with TimeA2.h.
  6913. * src/TorrentAutoSaveCommand.h: Replaced Time.h with TimeA2.h.
  6914. * src/DownloadCommand.h: Replaced Time.h with TimeA2.h.
  6915. * src/TorrentMan.h: Replaced Time.h with TimeA2.h.
  6916. * src/TorrentDownloadEngine.h: Replaced Time.h with TimeA2.h.
  6917. * src/RequestSlot.h: Replaced Time.h with TimeA2.h.
  6918. * src/SleepCommand.h: Replaced Time.h with TimeA2.h.
  6919. * src/DownloadEngine.cc: Replaced Time.h with TimeA2.h.
  6920. * release 0.7.0
  6921. 2006-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6922. * src/PeerChokeCommand.h
  6923. (PeerChokeCommand): Rearranged the arguments.
  6924. * src/PeerChokeCommand.cc
  6925. (PeerChokeCommand): Rearranged the arguments.
  6926. * src/MetalinkEntry.h
  6927. (Checksum.h): Included.
  6928. (md5): Removed.
  6929. (sha1): Removed.
  6930. (checksum): New variable.
  6931. (operator=): Updated.
  6932. (check): Removed.
  6933. * src/prefs.h
  6934. (PREF_LOWEST_SPEED_LIMIT): New definition.
  6935. (PREF_FOLLOW_TORRENT): New definition.
  6936. (PREF_SELECT_FILE): New definition.
  6937. (PREF_FOLLOW_METALINK): New definition.
  6938. * src/MetalinkResource.h
  6939. (TYPE_HTTPS): Added to enum TYPE.
  6940. * src/TorrentMan.cc
  6941. (~TorrentMan): Rewritten.
  6942. * src/MultiDiskWriter.cc
  6943. (MultiDiskAdaptor): Updated according to the changes in
  6944. MessageDigestContext.
  6945. (~MultiDiskAdaptor): Updated according to the changes in
  6946. MessageDigestContext.
  6947. (hashUpdate): Updated according to the changes in MessageDigestContext.
  6948. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6949. * src/Util.h
  6950. (fileChecksum): Updated according to the changes in
  6951. MessageDigestContext.
  6952. * src/Util.cc
  6953. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6954. (fileChecksum): Updated according to the changes in
  6955. MessageDigestContext.
  6956. * src/messageDigest.h: Rewritten.
  6957. * src/MetalinkEntry.cc
  6958. (check): Removed.
  6959. (Supported): Updated.
  6960. (dropUnsupportedResource): Fixed a memory leak.
  6961. * src/ShaVisitor.cc
  6962. (ShaVisitor): Updated according to the changes in MessageDigestContext.
  6963. (~ShaVisitor): Updated according to the changes in
  6964. MessageDigestContext.
  6965. (visit): Updated according to the changes in MessageDigestContext.
  6966. * src/main.cc
  6967. (main): Rewritten the portion of download loop. --lowest-speed-limit
  6968. command-line option added.
  6969. * src/DownloadEngine.h
  6970. (SocketEntry): New class.
  6971. (SocketEntries): New definition.
  6972. (PairFind): Removed.
  6973. (SockCmdMap): Removed.
  6974. * src/DownloadEngine.cc
  6975. (DownloadEngine): Rewritten.
  6976. (~DownloadEngine): Rewritten.
  6977. (run): Renamed activeCommandUuids as activeUuids.
  6978. (SetDescriptor): Rewritten.
  6979. (AccumulateActiveCommandUuid): Removed.
  6980. (AccumulateActiveUuid): New function object.
  6981. (waitData): Rewritten.
  6982. (updateFdSet): Rewritten.
  6983. (addSocket): Rewritten.
  6984. (deleteSocket): Rewritten.
  6985. (addSocketForReadCheck): Rewritten.
  6986. (deleteSocketForReadCheck): Rewritten.
  6987. (addSocketForWriteCheck): Rewritten.
  6988. (deleteSocketForWriteCheck): Rewritten.
  6989. * src/Xml2MetalinkProcessor.cc
  6990. (getEntry): Rewritten the portion of MetalinkEntry creation.
  6991. * src/DownloadCommand.cc
  6992. (executeInternal): Added the check routine for lowest speed limit.
  6993. * src/AbstractDiskWriter.cc
  6994. (AbstractDiskWriter): Updated according to the changes in
  6995. MessageDigestContext.
  6996. (~AbstractDiskWriter): Updated according to the changes in
  6997. MessageDigestContext.
  6998. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6999. * src/RequestInfo.h: New class.
  7000. * src/UrlRequestInfo.h: New class.
  7001. * src/UrlRequestInfo.cc: New class.
  7002. * src/TorrentRequestInfo.h: New class.
  7003. * src/TorrentRequestInfo.cc: New class.
  7004. * src/MetalinkRequestInfo.h: New class.
  7005. * src/MetalinkRequestInfo.cc: New class.
  7006. * src/Checksum.h: New class.
  7007. * src/DownloadEngineFactory.h: New class.
  7008. * src/DownloadEngineFactory.cc: New class.
  7009. 2006-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7010. * src/Option.h
  7011. (getAsBool): New function.
  7012. * src/Option.cc
  7013. (prefs.h): Included.
  7014. (defined): 0-length value is now recognized as undefined.
  7015. (getAsInt): Rewritten.
  7016. (getAsLLInt): Rewritten.
  7017. (getAsBool): New function.
  7018. * src/FeatureConfig.h: Rewritten.
  7019. * src/FeatureConfig.cc: Rewritten.
  7020. * src/prefs.h
  7021. (PREF_STDOUT_LOG): New definition.
  7022. (PREF_LOG): New definition.
  7023. (PREF_DIR): New definition.
  7024. (PREF_OUT): New definition.
  7025. (PREF_SPLIT): New definition.
  7026. (PREF_DAEMON): New definition.
  7027. (PREF_REFERER): New definition.
  7028. (PREF_TORRENT_FILE): New definition.
  7029. (PREF_LISTEN_PORT): New definition.
  7030. (PREF_METALINK_FILE): New definition.
  7031. (PREF_METALINK_VERSION): New definition.
  7032. (PREF_METALINK_LANGUAGE): New definition.
  7033. (PREF_METALINK_OS): New definition.
  7034. (PREF_METALINK_SERVERS): New definition.
  7035. * src/main.cc
  7036. (main): Following command-line parameters are now put into Option
  7037. class: stdoutLog, logfile, dir, ufilename, split, daemonMode,
  7038. referer, torrentFile, metalinkFile, listenPort, metalinkVersion,
  7039. metalinkLanguage, metalinkOs, metalinkServers
  7040. To fix the bug that aria2 can not handle http response header properly.
  7041. * src/HttpHeader.cc
  7042. (put): Made name lowercased.
  7043. (defined): Made name lowercased.
  7044. (getFirst): Made name lowercased.
  7045. (get): Made name lowercased.
  7046. (getFirstAsInt): Rewritten.
  7047. (getFirstAsLLInt): Rewritten.
  7048. 2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7049. * src/TorrentMan.h:
  7050. (advertisePiece): Updated doc.
  7051. (getAdvertisedPieceIndexes): Updated doc.
  7052. (removeAdvertisedPiece); New function.
  7053. * src/TorrentMan.cc
  7054. (FindElapsedHave): New function object.
  7055. (removeAdvertisedPiece): New function.
  7056. * src/HaveEraseCommand.h: New class.
  7057. * src/HaveEraseCommand.cc: New class.
  7058. * src/FeatureConfig.h: New class.
  7059. * src/FeatureConfig.cc: New class.
  7060. * src/Request.h
  7061. (defaultPorts): Removed.
  7062. * src/Request.cc
  7063. (FeatureConfig.h): Included.
  7064. (Request): Removed the statements related to defaultPorts.
  7065. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead.
  7066. A default port number is now retrieved from FeatureConfig.
  7067. * src/main.cc
  7068. (HaveEraseCommand.h): Included.
  7069. (showVersion): Added the output of feature list.
  7070. (main): Added HaveEraseCommand to command queue in BitTorrent
  7071. downloading.
  7072. * src/PeerInteractionCommand.h
  7073. (chokeCheckPoint): Commented out.
  7074. (periodicExecPoint): New variable.
  7075. * src/PeerInteractionCommand.cc
  7076. (executeInternal): Following methods are now called in at least every
  7077. 0.5 seconds to reduce CPU usage:
  7078. detectMessageFlooding(), peerInteraction->checkRequestSlot(),
  7079. checkHave(), sendKeepAlive().
  7080. (checkLongTimePeerChoking): Commented out.
  7081. * src/BitfieldMan.h
  7082. (getNthBitIndex): Changed the method signature.
  7083. (getMissingIndexRandomly): Changed the method signature.
  7084. * src/BitfieldMan.cc
  7085. (getNthBitIndex): Rewritten
  7086. (getMissingIndexRandomly): Rewritten.
  7087. (hasMissingPiece): Rewritten.
  7088. (getMissingIndex): Refactored.
  7089. (getMissingUnusedIndex); Refactored.
  7090. (getMissingIndex): Refactored.
  7091. 2006-07-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7092. * src/PeerMessage.h
  7093. (Piece.h): Included.
  7094. (SharedHandle.h): Included.
  7095. (invalidate): New variable.
  7096. (uploading): New variable.
  7097. (isInvalidate): New function.
  7098. (isUploading): New function.
  7099. (onPush): New function.
  7100. (onChoked): New function.
  7101. (onCanceled): New function.
  7102. (onAbortPiece): New function.
  7103. (PeerMessageHandle): New type definition.
  7104. * src/PeerMessage.cc
  7105. (PeerMessage): Added the initialization for invalidate and uploading.
  7106. * src/CancelMessage.h
  7107. (CancelMessage): Rewritten.
  7108. * src/RejectMessage.h
  7109. (RejectMessage): Rewritten.
  7110. * src/Metalinker.h
  7111. (operator=): Defined.
  7112. * src/MetaEntry.h
  7113. (operator=): Defined.
  7114. * src/MetalinkResource.h
  7115. (operator=): Defined.
  7116. * src/AllowedFastMessage.h
  7117. (AllowedFastMessage): Rewritten.
  7118. * src/HandshakeMessage.h
  7119. (HandshakeMessage): New function(overload).
  7120. * src/HandshakeMessage.cc
  7121. (HandshakeMessage): Rewritten.
  7122. (init): New function.
  7123. * src/HaveMessage.h
  7124. (HaveMessage): Rewritten.
  7125. * src/Time.h
  7126. (operator=): Defined the function body here.
  7127. * src/Time.cc
  7128. (operator=): Removed.
  7129. * src/SocketCore.h
  7130. (operator==): Defined here.
  7131. (operator!=): Defined here.
  7132. (operator<): Defined here.
  7133. * src/SocketCore.cc
  7134. (operator==): Removed.
  7135. (operator<): Removed.
  7136. * src/BitfieldMan.h
  7137. (operator=): Defined the function body here.
  7138. * src/BitfieldMan.cc
  7139. (operator=): Removed.
  7140. * src/TorrentMan.h
  7141. (deleteErrorPeer): Removed.
  7142. (deleteUnusedPeer); New function.
  7143. * src/TorrentMan.cc
  7144. (addPeer): Call deleteUnusedPeer.
  7145. (deleteErrorPeer): Removed.
  7146. (deleteUnusedPeer): New function.
  7147. * src/PeerAbstractCommand.h
  7148. (setNoCheck): New function.
  7149. (noCheck): New variable.
  7150. * src/PeerAbstractCommand.cc
  7151. (PeerAbstractCommand): Added the initialization of noCheck.
  7152. (execute): Added a check for noCheck.
  7153. (setNoCheck): New function.
  7154. * src/Util.h
  7155. (stdio.h): Included.
  7156. * src/Util.cc
  7157. (unistd.h): Included.
  7158. * src/DefaultDiskWriter.cc
  7159. (unistd.h): Included.
  7160. * src/Peer.h
  7161. (operator==): Defined the function body here.
  7162. (operator!=): Defined the function body here.
  7163. * src/Peer.cc
  7164. (operator==): Removed.
  7165. (operator!=): Removed.
  7166. * src/Piece.h
  7167. (Piece): Defined the function body here(copy constructor).
  7168. (operator=): Defined the function body here.
  7169. (operator==): Defined the function body here.
  7170. * src/Piece.cc
  7171. (Piece): Removed(copy constructor).
  7172. (operator=): Removed.
  7173. (operator==): Removed.
  7174. * src/PeerMessageUtil.h
  7175. (ChokeMessage.h): Removed.
  7176. (UnchokeMessage.h): Removed.
  7177. (InterestedMessage.h): Removed.
  7178. (NotInterestedMessage.h): Removed.
  7179. (HaveMessage.h): Removed.
  7180. (BitfieldMessage.h): Removed.
  7181. (RequestMessage.h): Removed.
  7182. (CancelMessage.h): Removed.
  7183. (PieceMessage.h): Removed.
  7184. (HandshakeMessage.h): Removed.
  7185. (KeepAliveMessage.h): Removed.
  7186. (PortMessage.h): Removed.
  7187. (HaveAllMessage.h): Removed.
  7188. (HaveNoneMessage.h): Removed.
  7189. (PeerConnection.h): Removed.
  7190. (HandshakeMessage.h): Included.
  7191. * src/BitfieldMessage.h
  7192. (init): New function.
  7193. (BitfieldMessage): Rewritten.
  7194. (BitfieldMessage): New function(overload).
  7195. * src/RequestSlot.h
  7196. (operator=): Defined the function body here.
  7197. (operator==): Defined the function body here.
  7198. * src/RequestSlot.cc
  7199. (operator=): Removed.
  7200. (operator==): Removed.
  7201. To remove the dependency on the PeerMessage subclass from
  7202. PeerInteraction:
  7203. * src/PeerMessageFactory.h: New class.
  7204. * src/PeerMessageFactory.cc: New class.
  7205. * src/SimplePeerMessage.cc
  7206. (send): If invalidate is true then do nothing.
  7207. * src/PeerInteractionCommand.cc
  7208. (HandshakeMessage.h): Included.
  7209. (KeepAliveMessage.h): Included.
  7210. (ChokeMessage.h): Included.
  7211. (UnchokeMessage.h): Included.
  7212. (HaveMessage.h): Included.
  7213. (executeInternal): Call setNoCheck().
  7214. Removed setWriteCheckSocket(socket).
  7215. * src/PeerInteraction.h
  7216. (ChokeMessage.h): Removed.
  7217. (UnchokeMessage.h): Removed.
  7218. (InterestedMessage.h): Removed.
  7219. (NotInterestedMessage.h): Removed.
  7220. (HaveMessage.h): Removed.
  7221. (BitfieldMessage.h): Removed.
  7222. (RequestMessage.h): Removed.
  7223. (CancelMessage.h): Removed.
  7224. (PieceMessage.h): Removed.
  7225. (HandshakeMessage.h): Removed.
  7226. (KeepAliveMessage.h): Removed.
  7227. (PortMessage.h): Removed.
  7228. (HaveAllMessage.h): Removed.
  7229. (HaveNoneMessage.h): Removed.
  7230. (RejectMessage.h): Removed.
  7231. (AllowedFastMessage.h): Removed.
  7232. (SuggestPieceMessage.h): Removed.
  7233. (PeerMessageFactory.h): Included.
  7234. (PeerMessageHandle): Removed typedef of PeerMessageHandle.
  7235. (HandshakeMessageHandle): Removed typedef of HandshakeMessageHandle.
  7236. (PeerMessageFactory): New variable.
  7237. (createPeerMessage): Removed.
  7238. (createHandshakeMessage): Removed.
  7239. (setPeerMessageCommonProperty): Removed.
  7240. (addRequestSlot): New function.
  7241. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  7242. (getPeerMessageFactory): New function.
  7243. (createRequestMessage): Removed.
  7244. (createCancelMessage): Removed.
  7245. (createPieceMessage): Removed.
  7246. (createHaveMessage): Removed.
  7247. (createChokeMessage): Removed.
  7248. (createUnchokeMessage): Removed.
  7249. (createInterestedMessage): Removed.
  7250. (createNotInterestedMessage): Removed.
  7251. (createBitfieldMessage): Removed.
  7252. (createKeepAliveMessage): Removed.
  7253. (createHaveAllMessage): Removed.
  7254. (createHaveNoneMessage): Removed.
  7255. (createRejectMessage): Removed.
  7256. (createAllowedFastMessage): Removed.
  7257. * src/PeerInteraction.cc
  7258. (PeerInteraction): Allocate PeerMessageFactory here.
  7259. (~PeerInteraction): Deallocate PeerMessageFactory here.
  7260. (sendMessages): Use msg->isUploading() instead of msg->getId() ==
  7261. PieceMessage::ID.
  7262. (addMessage): Simplified by using PeerMessage::onPush().
  7263. (addRequestSlot): New function.
  7264. (rejectAllPieceMessageInQueue): Simplified by using
  7265. PeerMessage::onChoked().
  7266. (rejectPieceMessageInQueue): Simplified by using
  7267. PeerMessage::onCanceled().
  7268. (abortPiece): Simplified by using PeerMessage::abortPiece().
  7269. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  7270. (createHandshakeMessage): Removed.
  7271. (createPeerMessage): Removed.
  7272. (sendHandshake): Call PeerMessageFactory::createHandshakeMessage().
  7273. (setPeerMessageCommonProperty): Removed.
  7274. (createRequestMessage): Removed.
  7275. (createCancelMessage): Removed.
  7276. (createPieceMessage): Removed.
  7277. (createHaveMessage): Removed.
  7278. (createChokeMessage): Removed.
  7279. (createUnchokeMessage): Removed.
  7280. (createInterestedMessage): Removed.
  7281. (createNotInterestedMessage): Removed.
  7282. (createBitfieldMessage): Removed.
  7283. (createKeepAliveMessage): Removed.
  7284. (createHaveAllMessage): Removed.
  7285. (createHaveNoneMessage): Removed.
  7286. (createRejectMessage): Removed.
  7287. (createAllowedFastMessage): Removed.
  7288. * src/PieceMessage.h
  7289. (createRejectMessage): New function.
  7290. (PieceMessage): Rewritten.
  7291. (onChoked): New function.
  7292. (onCanceled): New function.
  7293. * src/PieceMessage.cc
  7294. (send): If invalidate is true then do nothing, just return.
  7295. (createRejectMessage): New function.
  7296. (onChoked): New function.
  7297. (onCanceled): New function.
  7298. * src/RequestMessage.h
  7299. (RequestMessage): Rewritten.
  7300. (onPush): New function.
  7301. (onAbortPiece): New function.
  7302. * src/RequestMessage.cc
  7303. (onPush): New function.
  7304. (onAbortPiece): New function.
  7305. Update fd_set when a socket is added or deleted in order to improve
  7306. performance:
  7307. * src/DownloadEngine.h
  7308. (rfdset): New variable.
  7309. (wfdset): New variable.
  7310. (updateFdSet): New function.
  7311. * src/DownloadEngine.cc
  7312. (SetDescriptor::operator()): Use SockCmdMap::value_type.
  7313. (AccumulateActiveCommandUuid::operator()): Use SockCmdMap::value_type.
  7314. (waitData): Copy rfdset and wfdset.
  7315. (updateFdSet): New function.
  7316. (addSocket): Call updateFdSet.
  7317. (deleteSocket): Call updateFdSet.
  7318. 2006-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7319. To add the support for Metalink3.0 backward compatible links:
  7320. * src/Request.h
  7321. (SAFE_CHARS): Added '#'.
  7322. (METALINK_MARK): New definition.
  7323. * src/Request.cc
  7324. (parseUrl): Added the support for Metalink3.0 backward compatible
  7325. links.
  7326. etc
  7327. * src/PeerInteraction.cc
  7328. (MsgPushBack): Removed.
  7329. (sendMessages): Use STL copy and back_inserter.
  7330. (rejectAllPieceMessageInQueue): Use STL copy and back_inserter.
  7331. (rejectPieceMessageInQueue): Use STL copy and back_inserter.
  7332. * src/TorrentMan.h
  7333. (MAX_PEER_LIST_SIZE): Changed to 100 from 250.
  7334. 2006-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7335. * src/SharedHandle.h: New class.
  7336. To wrap Socket, Command, PeerMessage and Peer with SharedHandle:
  7337. * src/HttpResponseCommand.h
  7338. (HttpResponseCommand): Wrapped Socket.
  7339. * src/SocketCore.h
  7340. (operator==): New function.
  7341. (operator!=): New function.
  7342. (operator<): New function.
  7343. (getSockfd): New function.
  7344. (isOpen): New function.
  7345. (writeData): New function.
  7346. * src/SocketCore.cc
  7347. (operator==): New function.
  7348. (operator!=): New function.
  7349. (operator<): New function.
  7350. * src/AbstractCommand.h
  7351. (socket): Changed its type to SocketHandle.
  7352. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7353. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7354. (disableReadCheckSocket): New function.
  7355. (disableWriteCheckSocket): New function.
  7356. (readCheckTarget): Changed its type to SocketHandle.
  7357. (writeCheckTarget): Changed its type to SocketHandle.
  7358. (AbstractCommand): Replaced Socket with SocketHandle.
  7359. * src/AbstractCommand.cc
  7360. (AbstractCommand): Replaced Socket with SocketHandle.
  7361. (~AbstractCommand): Removed the deallocation for Socket object.
  7362. (disableReadCheckSocket): New function.
  7363. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7364. (disableWriteCheckSocket): New function.
  7365. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7366. * src/HttpDownloadCommand.cc
  7367. (DownloadCommand): Replaced Socket with SocketHandle.
  7368. * src/PeerAbstractCommand.h
  7369. (socket): Changed its type to SocketHandle.
  7370. (peer): Changed its type to PeerHandle.
  7371. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7372. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7373. (disableReadCheckSocket): New function.
  7374. (disableWriteCheckSocket): New function.
  7375. (readCheckTarget): Changed its type to SocketHandle.
  7376. (writeCheckTarget): Changed its type to SocketHandle.
  7377. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  7378. Replaced Peer with PeerHandle.
  7379. * src/HttpRequestCommand.cc
  7380. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7381. Use disableReadCheckSocket.
  7382. * src/PeerInitiateConnectionCommand.h
  7383. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7384. * src/PeerChokeCommand.cc
  7385. (UploadFaster::operator()): Replaced Peer with PeerHandle.
  7386. (DownloadFaster::operator()): Replaced Peer with PeerHandle.
  7387. (execute): Use PeerHandle.
  7388. * src/PeerConnection.h
  7389. (HandshakeMessage.h): Removed include of HandshakeMessage.h.
  7390. (socket): Changed its type to SocketHandle.
  7391. (PeerConnection): Replaced Socket with SocketHandle.
  7392. * src/PeerConnection.cc
  7393. (PeerConnection): Replaced Socket with SocketHandle.
  7394. * src/PeerInteractionCommand.h
  7395. (PeerInteractionCommand): Replaced socket with SocketHandle.
  7396. Replaced Peer with PeerHandle.
  7397. * src/PeerInteractionCommand.cc
  7398. (PeerInteractionCommand): Replaced Socket with SocketHandle.
  7399. Replaced Peer with PeerHandle.
  7400. (executeInternal): Use disableWriteCheckSocket.
  7401. Use HandshakeMessageHandle.
  7402. (receiveMessages): Use PeerMessageHandle.
  7403. (prepareForNextPeer): Use PeerHandle.
  7404. * src/HttpProxyRequestCommand.h
  7405. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7406. * src/HttpResponseCommand.cc
  7407. (HttpResponseCommand): Replaced Socket with SocketHandle.
  7408. * src/TorrentMan.cc
  7409. (nullPeer): Added external reference.
  7410. (~TorrentMan): Removed the deallocation of the elements of peers.
  7411. (addPeer): Rewritten.
  7412. (isPeerAvailable): Use nullPeer.
  7413. (deleteOldpeers): Replaced with deleteErrorPeer.
  7414. (deleteErrorPeer): New function.
  7415. (getPeer): Use PeerHandle and nullPeer.
  7416. (hasMissingPiece): Replaced Peer with PeerHandle.
  7417. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7418. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7419. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7420. (getMissingPiece): Replaced Peer with PeerHandle.
  7421. * src/FtpNegotiateCommand.cc
  7422. (FtpNegotiationCommand): Replaced Peer with PeerHandle.
  7423. (~FtpNegotiationCommand): Removed the deallocation of Sockets.
  7424. (recvGreeting): Use disableWriteCheckSocket.
  7425. (recvPasv): Removed the allocation of Socket.
  7426. Use disableReadCheckSocket.
  7427. (sendRestPasv): Use disableWriteCheckSocket.
  7428. (recvRetr): Changed assertion.
  7429. * src/PeerInteraction.h
  7430. (SharedHandle.h): Included SharedHandle.h.
  7431. (PeerMessageHandle): New type definition.
  7432. (HandshakeMessageHandle): New type definition.
  7433. (MessageQueue): Changed. Now its element is of type PeerMessageHandle.
  7434. (peer): Changed its type to PeerHandle.
  7435. (createHandshakeMessage): Replaced HandshakeMessage with
  7436. HandshakeMessageHandle.
  7437. (createPeerMessage): Replaced PeerMessageHandle with PeerMessage.
  7438. (PeerInteraction): Replaced Peer with PeerHandle.
  7439. Replaced Socket with SocketHandle.
  7440. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  7441. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  7442. (receiveHandshake): Replaced HandshakeMessage with
  7443. HandshakeMessageHandle.
  7444. * src/PeerInteraction.cc
  7445. (PeerInteraction): Replaced Peer with PeerHandle.
  7446. Replaced Socket with SocketHandle.
  7447. (~PeerInteraction): Removed the deallocation of the elements of
  7448. messageQueue.
  7449. (MsgPushBack::operator()): Replaced PeerMessage with PeerMessageHandle.
  7450. (isSendingMessageInProgress): Replaced PeerMessage with
  7451. PeerMessageHandle.
  7452. (sendMessages): Use PeerMessageHandle. Removed try-catch block.
  7453. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  7454. (rejectAllPieceMessageInQueue): Use PeerMessageHandle.
  7455. (rejectPieceMessageInQueue): Use PeerMessageHandle.
  7456. (abortPiece): Use PeerMessageHandle.
  7457. (receiveHandshake): Replaced HandshakeMessage with
  7458. HandshakeMessageHandle. Removed try-catch block.
  7459. (createHandshakeMessage): Replaced HandshakeMessage with
  7460. HandshakeMessageHandle.
  7461. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  7462. Removed try-catch block.
  7463. (createPeerMessage): Replaced PeerMessage with PeerMessageHandle.
  7464. * src/HttpProxyResponseCommand.cc
  7465. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7466. * src/FtpTunnelResponseCommand.h
  7467. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7468. * src/HttpConnection.cc
  7469. (HttpConnection): Replaced Socket with SocketHandle.
  7470. * src/PeerAbstractCommand.cc
  7471. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  7472. (~PeerAbstractCommand): Removed the deallocation of socket.
  7473. Use disableReadCheckSocket, disableWriteCheckSocket.
  7474. (disableReadCheckSocket): New function.
  7475. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7476. (disableWriteCheckSocket): New function.
  7477. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7478. * src/InitiateConnectionCommandFactory.h: Corrected indentation.
  7479. * src/FtpTunnelRequestCommand.cc
  7480. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7481. (~FtpTunnelRequestCommand): Corrected indentation.
  7482. * src/DownloadCommand.h
  7483. (DownloadCommand): Replaced Socket with SocketHandle.
  7484. * src/PeerListenCommand.cc
  7485. (PeerListenCommand): Removed the initialization of socket.
  7486. (~PeerListenCommand): Removed the deallocation of socket.
  7487. (bindPort): Use SocketHandle.
  7488. (execute): Use SocketHandle and PeerHandle.
  7489. * src/FtpDowndloadCommand.cc
  7490. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7491. (~FtpDownloadCommand): Removed the deallocation of ctrlSocket.
  7492. * src/main.cc
  7493. (main): Corrected indentation.
  7494. * src/HttpInitiateConnectionCommand.cc
  7495. (HttpInitiateConnectionCommand): Replaced Socket with SocketHandle.
  7496. (executeInternal): Removed the allocation of socket.
  7497. * src/HttpRequestCommand.h
  7498. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7499. * src/FtpNegotiationCommand.h
  7500. (dataSocket): Changed its type to SocketHandle.
  7501. (serverSocket): Changed its type to SocketHandle.
  7502. (FtpNegotiationCommand): Replaced Socket with SocketHandle.
  7503. * src/TorrentMan.h
  7504. (MAX_PEER_UPDATE): Removed.
  7505. (MAX_PEERS): New definition.
  7506. (Peers): The element is now of type PeerHandle.
  7507. (addPeer): Replaced Peer with PeerHandle. Removed 'duplicate' argument.
  7508. (getPeer): Replaced Peer with PeerHandle.
  7509. (deleteOldErrorPeers): Removed.
  7510. (deleteErrorPeer): New function.
  7511. (hasMissingPiece): Replaced Peer with PeerHandle.
  7512. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7513. (getMissingPiece): Replaced Peer with PeerHandle.
  7514. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7515. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7516. (addActivePeer): Replaced Peer with PeerHandle.
  7517. (deleteActivePeer): Replaced Peer with PeerHandle.
  7518. Added a check for the return value of find.
  7519. * src/FtpTunnelResponseCommand.cc
  7520. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7521. * src/FtpInitiateConnectionCommand.cc
  7522. (executeInternal): Removed the allocation of socket.
  7523. * src/DownloadEngine.h
  7524. (Sockets): An element is now of type SocketHandle.
  7525. (SockCmdMap): A key is of type SocketHandle, a value is of type int.
  7526. (CommandUuids): New type definition.
  7527. (rsockets): Changed its type to SockCmdMap.
  7528. (wsockets): Changed its type to SockCmdMap.
  7529. (addSocket): Rewritten.
  7530. (deleteSocket): Rewritten.
  7531. (addSocketForReadCheck): Rewritten.
  7532. (deleteSocketForReadCheck): Rewritten.
  7533. (addSocketForWriteCheck): Rewritten.
  7534. (deleteSocketForWriteCheck): Rewritten.
  7535. (PairFind): New template class.
  7536. * src/HttpDownloadCommand.h
  7537. (HttpDownloadCommand): Replaced Socket with SocketHandle.
  7538. * src/FtpConnection.cc
  7539. (FtpConnection): Replaced Socket with SocketHandle.
  7540. (sendPort): Removed the allocation of serverSocket. Removed try-catch
  7541. block.
  7542. * src/InitiateConnectionCommandFactory.cc
  7543. (DlAbortEx.h): Included DlAbortEx.h.
  7544. (createInitiateConnectionCommand): Throw exception if the protocol of
  7545. requested URI is not supported.
  7546. * src/Peer.cc
  7547. (nullPeer): Changed its type to PeerHandle.
  7548. (operator==): New function.
  7549. (operator!=): New function.
  7550. * src/Peer.h
  7551. (SharedHandle.h): Included SharedHandle.h.
  7552. (operator==): New function.
  7553. (operator!=): New function.
  7554. (Peer): Added the default constructor.
  7555. Use resetStatus() to initialize member variables.
  7556. (nullPeer): Removed.
  7557. * src/TrackerUpdateCommand.cc
  7558. (execute): Brushed up using SharedHandle. Replaced MAX_PEER_UPDATE
  7559. with MIN_PEERS.
  7560. * src/PeerListenCommand.h
  7561. (socket): Changed its type to SocketHandle.
  7562. * src/Command.h
  7563. (CommandUuid): New type definition.
  7564. (uuid): New variable.
  7565. (uuidGen): New variable.
  7566. (Command): Added the initialization of uuid.
  7567. (getUuid): New function.
  7568. * src/Socket.h
  7569. (Socket): Removed.
  7570. (SocketHandle): New type definition.
  7571. * src/DownloadEngine.h
  7572. (FindCommand): New function object.
  7573. (run): The portion of socket check was rewritten.
  7574. (SetDescriptor): New function object.
  7575. (AccumulateActiveCommandUuid): New function object.
  7576. (waitData): Rewritten.
  7577. (addSocket): Rewritten.
  7578. (deleteSocket): Rewritten.
  7579. (addSocketForReadCheck): Rewritten.
  7580. (addSocketForWriteCheck): Rewritten.
  7581. (deleteSocketForReadCheck): Rewritten.
  7582. (deleteSocketForWriteCheck): Rewritten.
  7583. * src/HttpProxyResponseCommand.h
  7584. (HttpProxyResponseCommand): Replaced Socket with SocketHandle.
  7585. * src/HttpConnection.h
  7586. (socket): Changed its type to SocketHandle.
  7587. (HttpConnection): Replaced Socket with SocketHandle.
  7588. * src/PeerInitiateConnectionCommand.cc
  7589. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7590. (executeInternal): Removed the allocation of socket.
  7591. (prepareForNextPeer): Use PeerHandle.
  7592. * src/PeerMessage.h
  7593. (peer): Changed its type to PeerHandle.
  7594. (getPeer): Replaced Peer with PeerHandle.
  7595. (setPeer): Replaced Peer with PeerHandle.
  7596. * src/DownloadCommand.cc
  7597. (DownloadCommand): Replaced Socket with SocketHandle.
  7598. * src/FtpConnection.h
  7599. (socket): Changed its type to SocketHandle.
  7600. (FtpConnection): Replaced Socket with SocketHandle.
  7601. (sendPort); Replaced Socket with SocketHandle.
  7602. * src/FtpDowndloadCommand.h
  7603. (ctrlSocket): Changed its type to SocketHandle.
  7604. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7605. * src/HttpProxyRequestCommand.cc
  7606. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7607. * src/FtpTunnelRequestCommand.h
  7608. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7609. etc
  7610. * src/PeerChokeCommand.h
  7611. (setAllPeerChoked): Removed.
  7612. (setAllPeerResetDelta): Removed.
  7613. * src/PeerChokeCommand.cc
  7614. (setAllPeerChoked): Removed.
  7615. (ChokePeer): New function object.
  7616. (setAllPeerResetDelta): Removed.
  7617. (ResetDelta): New function object.
  7618. (orderByDownloadRate): Fixed a bug: use DowloadFaster, not UploadFaster
  7619. (execute): Show download speed when the local node is a seeder.
  7620. setAllPeerChoked and setAllPeerResetDelta were rewritten
  7621. using STL.
  7622. * src/TrackerWatcherCommand.h
  7623. (MIN_PEERS): Removed.
  7624. * src/TorrentMan.cc
  7625. (getPeer): Replaced MAX_PEER_UPDATE with MIN_PEERS.
  7626. 2006-07-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7627. To fix the bug that .aria2 file is not saved if downloading is stopped
  7628. by the errors:it results that aria2 can not resume downloading:
  7629. * src/main.cc
  7630. (normalDownload): Added the call to save().
  7631. (main): Added the deletion of the elements in 'reserved'.
  7632. To fix log:
  7633. * src/PeerInteraction.cc
  7634. (receiveHandshake): Fixed log.
  7635. 2006-07-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7636. To improve download performance in BitTorrent:
  7637. * src/TorrentMan.cc
  7638. (getPeer): Check the number of connections. Return nullPeer if
  7639. it is greater than MAX_PEER_UPDATE.
  7640. This code was originally here, but was removed in 0.5.1.
  7641. 2006-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7642. To improve the conditional compilation:
  7643. * src/MultiDiskWriter.h:
  7644. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7645. * src/MultiDiskWriter.cc:
  7646. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7647. * src/Util.h:
  7648. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7649. Added ENABLE_BITTORRENT around computeFastSet().
  7650. * src/Util.cc:
  7651. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7652. Added ENABLE_BITTORRENT around computeFastSet().
  7653. * src/messageDigest.h:
  7654. Replaced ENABLE_BITTORRENT with ENABLE_SSL.
  7655. * src/ShaVisitor.h:
  7656. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7657. * src/ShaVisitor.cc:
  7658. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7659. * src/main.cc:
  7660. Added ENABLE_BITTORRENT around includes and blocks related to
  7661. BitTorrent.
  7662. Added ENABLE_MESSAGE_DIGEST to skip checksum checking when the message
  7663. digest support is not available.
  7664. * src/AbstractDiskWriter.h:
  7665. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7666. * src/AbstractDiskWriter.cc:
  7667. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7668. * src/MetalinkEntry.cc
  7669. (check): Added ENABLE_MESSAGE_DIGEST. Return true if the message digest
  7670. support is not available.
  7671. To add command-line options for Metalink:
  7672. * src/main.cc:
  7673. Added metalink-version, metalink-language, metalink-os,
  7674. follow-metalink.
  7675. To use EXIT_SUCCESS and EXIT_FAILURE with exit():
  7676. * src/main.cc: Use these definition.
  7677. * Release 0.6.0
  7678. 2006-07-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7679. To add Metalink support(http/ftp only):
  7680. * src/AbstractCommand.h
  7681. (tryReserved): New function.
  7682. * src/AbstractCommand.cc
  7683. (execute): Call tryReserved().
  7684. (tryReserved): New function.
  7685. * src/Request.h
  7686. (Requests): New type definition.
  7687. * src/SegmentMan.h
  7688. (reserved): New variable.
  7689. * src/Util.h
  7690. (fileChecksum): New function.
  7691. (toUpper): New function.
  7692. (toLower): New function.
  7693. * src/Util.cc
  7694. (messageDigest.h): Included.
  7695. (trim): Trim \r\n\t.
  7696. (fileChecksum): New function.
  7697. (toUpper): New function.
  7698. (toLower): New function.
  7699. * src/main.cc
  7700. (normalDownload): New function.
  7701. (main): Added 2 command-line options: metalink-file,
  7702. metalink-connection. Their usage has not been written yet.
  7703. * src/MetalinkProcessor.h: New class.
  7704. * src/Xml2MetalinkProcessor.h: New class.
  7705. * src/Xml2MetalinkProcessor.cc: New class.
  7706. * src/MetalinkEntry.h: New class.
  7707. * src/MetalinkEntry.cc: New class.
  7708. * src/MetalinkResource.h: New class.
  7709. * src/MetalinkResource.cc: New class.
  7710. To add md5 message digest checking:
  7711. * src/messageDigest.h: Rewritten.
  7712. * src/MultiDiskWriter.cc: Updated according to the changes in
  7713. messageDigest.h.
  7714. * src/ShaVisitor.cc: Updated according to the changes in
  7715. messageDigest.h.
  7716. * src/Util.cc: Updated according to the changes in messageDigest.h.
  7717. * src/AbstractDiskWriter.cc: Updated according to the changes in
  7718. messageDigest.h.
  7719. To fix a bug that causes segfault when the payload length in peer
  7720. message is less than 0:
  7721. * src/PeerConnection.cc:
  7722. (receiveMessage): Fixed the bug.
  7723. * src/PeerMessageUtil.cc
  7724. (checkLength): Throw an exception if length is less than or equals to
  7725. 0.
  7726. To add new interfaces to Base64 encoding/decoding:
  7727. * src/Base64.h
  7728. (part_encode): Changed the method signature.
  7729. (encode): New function(overload).
  7730. (decode): New function(overload).
  7731. * src/Base64.cc
  7732. (part_encode): Rewritten.
  7733. (encode): Rewritten.
  7734. (encode): New function(overload).
  7735. To prevent a peer to download same piece if there is an error in
  7736. checksum:
  7737. * src/PieceMessage.cc
  7738. (receivedAction): Call peerInteraction->abortPiece().
  7739. 2006-06-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7740. To fix the bug that causes same have message is sent many times to
  7741. a single peer.
  7742. * src/Time.cc
  7743. (isNewer): Use Util::difftv().
  7744. * src/Util.cc
  7745. (difftv): Added a cast to (long long int).
  7746. * src/TorrentMan.cc
  7747. (advertisePiece): Use push_front.
  7748. (getAdvertisedPieceIndexes): A performance improvement was made.
  7749. To fix the bug that sends tracker requests without a sleep interval
  7750. when the number of connections is less than 15.
  7751. * src/TrackerWatcherCommand.cc
  7752. (execute): Now the number of connections is not a factor to decide
  7753. whether or not a tracker request should be sent or not.
  7754. * src/Time.h
  7755. (setTimeInSec): New function.
  7756. * src/Time.cc
  7757. (setTimeInSec): New function.
  7758. etc.
  7759. * src/ChokeMessage.cc
  7760. (receivedAction): Removed peer->snubbing = false
  7761. * src/PeerConnection.h
  7762. (receiveHandshake): Updated doc.
  7763. * src/TorrentMan.h
  7764. (getAdvertisedPieceIndexes): Updated the method signature.
  7765. * src/TorrentMan.cc
  7766. (getAdvertisedPieceIndexes): Updated the method signature.
  7767. * src/Time.h
  7768. (getTimeInMicros): Added a cast to (long long int).
  7769. (getTimeInMillis): Added a cast to (long long int).
  7770. * Release 0.5.2
  7771. 2006-06-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7772. To make a listening socket non-block:
  7773. * src/SocketCore.h
  7774. (setNonBlockingMode): New function.
  7775. * src/SocketCore.cc
  7776. (setNonBlockingMode): New function.
  7777. (beginListen): Added a call to setNonBlockingMode().
  7778. (acceptConnection): Call setNonBlockingMode().
  7779. (setBlockingMode): Updated.
  7780. To handle tracker's NAT-checking:
  7781. * src/PeerConnection.cc
  7782. (receiveHandshake): 'msg' param is filled with received data and
  7783. its length is assigned to 'length' param, even if all handshake
  7784. message is not yet received.
  7785. * src/PeerInteractionCommand.cc
  7786. (executeInternal): Use peerInteraction->receiveHandshake(true) when
  7787. a new peer connects to localhost.
  7788. A call to peerInteraction->sendHandshake() was removed because
  7789. it is called from peerInteraction->receiveHandshake(true).
  7790. * src/PeerInteraction.h
  7791. (quickReplied): New variable.
  7792. (receiveHandshake): Added an argument.
  7793. * src/PeerInteraction.cc
  7794. (PeerInteraction): Added the initialization of quickReplied.
  7795. (receiveHandshake): Send handshake message as soon as the info hash
  7796. in a handshake message from a peer is correct.
  7797. To change the random part of peer id and key parameter:
  7798. * src/TorrentMan.h
  7799. (key): New variable.
  7800. * src/TorrentMan.cc
  7801. (setupInternal1): Use Util::randomAlpha() to generate random part
  7802. of peer id, which is now "-aria2-"+13 alphabet characters([A-Za-z]).
  7803. key is also generated by Util::randomAlpha() and it is now 8 character
  7804. long.
  7805. * src/Util.h
  7806. (randomAlpha): New function.
  7807. * src/Util.cc
  7808. (randomAlpha): New function.
  7809. * src/TrackerWatcherCommand.cc
  7810. (execute): In a tracker request: Use torrentMan->key as key parameter.
  7811. Added no_peer_id=1.
  7812. Set snubbing flag to false when a choke message is received from a
  7813. snubbed peer.
  7814. * src/ChokeMessage.cc
  7815. (receivedAction): Set snubbing flag to false.
  7816. 2006-06-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7817. * src/TorrentMan.cc (setupInternal1): Fixed peerId generation bug.
  7818. * src/SimpleLogger.h (writeHeader): New function.
  7819. * src/SimpleLogger.cc (writeHeader): New function.
  7820. (writeLog): Fixed the bug that causes segfaults if exception message
  7821. contains an unescaped "%" character.
  7822. * src/TrackerWatcherCommand.cc (execute): Added a short sleep
  7823. when a tracker request fails.
  7824. * src/Request.cc (parseUrl): Query string is now handled properly.
  7825. * Release 0.5.1
  7826. 2006-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7827. To add Time class which represents a specific instant in time and
  7828. its precision is microseconds. Time checking procedures were rewritten
  7829. using this object.
  7830. * src/Time.h: New class.
  7831. * src/Time.cc: New class.
  7832. * src/AbstractCommand.h
  7833. (updateCheckPoint): Removed.
  7834. (isTimeoutDetected): Removed.
  7835. (checkPoint): Changed the type to Time.
  7836. (timeout): New variable.
  7837. (setTimeout): New function.
  7838. * src/AbstractCommand.cc
  7839. (AbstractCommand): Removed the initialization of checkPoint.
  7840. Added the initialization of timeout.
  7841. (updateCheckPoint): Removed.
  7842. (isTimeoutDetected): Removed.
  7843. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  7844. * src/PeerChokeCommand.h
  7845. (checkPoint): Changed the type to Time.
  7846. * src/PeerChokeCommand.cc
  7847. (PeerChokeCommand): Removed the initialization of checkPoint.
  7848. (execute): Rewritten using Time object.
  7849. * src/TrackerWatcherCommand.h
  7850. (checkPoint): Changed the type to Time.
  7851. * src/TrackerWatcherCommand.cc
  7852. (TrackerWatcherCommand): Removed the initialization of checkPoint.
  7853. (execute): Rewritten.
  7854. * src/ConsoleDownloadEngine.h
  7855. (cp): Changed the type to Time.
  7856. (startup): Changed the type to Time.
  7857. * src/ConsoleDownloadEngine.cc
  7858. (initStatistics): Use cp.reset(), startup.reset().
  7859. (calculateStatistics): Rewritten using Time object.
  7860. * src/PeerAbstractCommand.h
  7861. (updateCheckPoint): Removed.
  7862. (isTimeoutDetected): Removed.
  7863. (checkPoint): Changed the type to Time.
  7864. * src/PeerAbstractCommand.cc
  7865. (PeerAbstractCommand): Removed the initialization of checkPoint.
  7866. (updateCheckPoint): Removed.
  7867. (isTimeoutDetected): Removed.
  7868. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  7869. * src/PeerInteractionCommand.cc
  7870. (PeerInteractionCommand): Removed the initializations of struct
  7871. timeval variables.
  7872. * src/PeerInteractionCommand.h
  7873. (keepAliveCheckPoint): Changed the type to Time.
  7874. (chokeCheckPoint): Changed the type to Time.
  7875. (freqCheckPoint): Changed the type to Time.
  7876. (haveCheckTime): Changed the type to Time.
  7877. * src/PeerInteractionCommand.cc
  7878. (executeInternal): Rewritten using Time object.
  7879. (detectMessageFlooding): Rewritten using Time object.
  7880. (checkLongTimePeerChoking): Rewritten using Time object.
  7881. (sendKeepAlive): Rewritten using Time object.
  7882. (checkHave): Rewritten using Time object.
  7883. * src/SleepCommand.h
  7884. (checkPoint): Changed the type to Time.
  7885. * src/SleepCommand.cc
  7886. (SleepCommand): Removed the initialization of checkPoint.
  7887. (execute): Rewritten using Time object.
  7888. * src/TorrentAutoSaveCommand.h
  7889. (checkPoint): Changed the type to Time.
  7890. * src/TorrentAutoSaveCommand.cc
  7891. (TorrentAutoSaveCommand): Removed the initialization of checkPoint.
  7892. (execute): Rewritten.
  7893. * src/DownloadCommand.h
  7894. (sw): Changed the type to Time.
  7895. * src/DownloadCommand.cc
  7896. (DownloadCommand): Removed the initialization of sw.
  7897. (executeInternal): Rewritten.
  7898. * src/RequestSlot.h
  7899. (dispatchedTime): Changed the type to Time.
  7900. * src/RequestSlot.cc
  7901. (RequestSlot): Removed the call to setDispatchedTime().
  7902. (setDispatchedTime): Rewirtten.
  7903. (isTimeout): Rewritten.
  7904. (getLatencyInMillis): Rewritten.
  7905. * src/TorrentDownloadEngine.h
  7906. (cp): Changed the type to Time[2].
  7907. (startup): Changed the type to Time.
  7908. * src/TorrentDownloadEngine.cc
  7909. (initStatistics): Rewritten.
  7910. (calculateStatistics): Rewritten.
  7911. * src/DownloadEngine.cc
  7912. (run): Rewritten.
  7913. To detect all attempts to connect to the tracker are failed:
  7914. * src/AbstractCommand.cc
  7915. (execute): Increment e->segmentMan->errors if a command aborted.
  7916. * src/SegmentMan.h
  7917. (errors): New variable.
  7918. * src/SegmentMan.cc
  7919. (SegmentMan): Added the initialization of errors.
  7920. (init): Added the initialization of errors.
  7921. * src/TrackerWatcherCommand.cc
  7922. (execute): If e->segmentMan->errors > 0 then assume that the tracker
  7923. request was failed.
  7924. To handle snubbed peers:
  7925. * src/PeerChokeCommand.cc
  7926. (optUnchokingPeer): Snubbed peers don't get unchoked.
  7927. (execute): Snubbed peers don't get unchoked.
  7928. * src/PeerInteraction.h
  7929. (REQUEST_TIME_OUT): Changed the value from 120 to 60.
  7930. * src/PeerInteraction.cc
  7931. (checkRequestSlot): A peer get marked as "snubbed" if it doesn't send
  7932. back the requested 16k block in 60 seconds.
  7933. * src/PieceMessage.cc
  7934. (receivedAction): A peer's snubbed state is cleard if it sends
  7935. the requested 16k block in 60 seconds.
  7936. * src/Peer.h
  7937. (snubbing): New variable.
  7938. * src/Peer.cc
  7939. (resetStatus): Added snubbed = false.
  7940. To fix the bug that causes have message is not sent:
  7941. * src/PeerInteractionCommand.cc
  7942. (~PeerInteractionCommand): Removed e->torrentMan->unadvertisePiece().
  7943. (FLOODING_CHECK_INTERVAL): New definition(temporal).
  7944. (detectMessageFlooding): Use FLOODING_CHECK_INTERVAL.
  7945. * src/TorrentMan.h
  7946. (HaveEntry): New class.
  7947. (advertisePiece): Rewritten.
  7948. (getAdvertisedPieceIndexes): Rewritten.
  7949. (Haves): Changed the type.
  7950. (getAdvertisedPieceIndexes): Added an argument.
  7951. Others:
  7952. * src/TorrentMan.h
  7953. (DEFAULT_ANNOUNCE_INTERVAL): Changed the value to 1800.
  7954. (DEFAULT_ANNOUNCE_MIN_INTERVAL): Changed the value to 1800.
  7955. * src/TorrentMan.cc
  7956. (getPeer): Don't check the number of connections here.
  7957. (setupInternal1): Changed peerId.
  7958. * src/PeerInteractionCommand.h
  7959. (KEEP_ALIVE_INTERVAL): New definition.
  7960. (sendKeepAlive): Use KEEP_ALIVE_INTERVAL.
  7961. * src/main.cc
  7962. (main): SA_ONESHOT was replaced with SA_RESETHAND.
  7963. * src/DownloadEngine.h: Removed unnecessary header includes.
  7964. 2006-05-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7965. To fix the bug that causes segfaults if a tracker returns a zero-length
  7966. list as "peers":
  7967. * src/TrackerUpdateCommand.cc
  7968. (execute): Added a check to see wether the type of peers is Data*.
  7969. 2006-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7970. * Release 0.5.0
  7971. To fix compile issue with gcc3:
  7972. * src/CancelMessage.h
  7973. (ID): Renamed as ID_t
  7974. (ID_t): New enum.
  7975. * src/RejectMessage.h
  7976. (ID): Renamed as ID_t
  7977. (ID_t): New enum.
  7978. * src/SuggestPieceMessage.h
  7979. (ID): Renamed as ID_t
  7980. (ID_t): New enum.
  7981. * src/AllowedFastMessage.h
  7982. (ID): Renamed as ID_t
  7983. (ID_t): New enum.
  7984. * src/PortMessage.h
  7985. (ID): Renamed as ID_t
  7986. (ID_t): New enum.
  7987. * src/HaveNoneMessage.h
  7988. (ID): Renamed as ID_t
  7989. (ID_t): New enum.
  7990. * src/KeepAliveMessage.h
  7991. (ID): Renamed as ID_t
  7992. (ID_t): New enum.
  7993. * src/HaveAllMessage.h
  7994. (ID): Renamed as ID_t
  7995. (ID_t): New enum.
  7996. * src/UnchokeMessage.h
  7997. (ID): Renamed as ID_t
  7998. (ID_t): New enum.
  7999. * src/BitfieldMessage.h
  8000. (ID): Renamed as ID_t
  8001. (ID_t): New enum.
  8002. * src/PieceMessage.h
  8003. (ID): Renamed as ID_t
  8004. (ID_t): New enum.
  8005. * src/RequestMessage.h
  8006. (ID): Renamed as ID_t
  8007. (ID_t): New enum.
  8008. * src/NotInterestedMessage.h
  8009. (ID): Renamed as ID_t
  8010. (ID_t): New enum.
  8011. * src/ChokeMessage.h
  8012. (ID): Renamed as ID_t
  8013. (ID_t): New enum.
  8014. * src/InterestedMessage.h
  8015. (ID): Renamed as ID_t
  8016. (ID_t): New enum.
  8017. * src/HaveMessage.h
  8018. (ID): Renamed as ID_t
  8019. (ID_t): New enum.
  8020. 2006-05-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8021. * src/PeerAbstractCommand.h
  8022. (beforeSocketCheck): Removed.
  8023. * src/PeerAbstractCommand.cc
  8024. Modified in order to call executeInternal() even if socket check
  8025. and upload limit check fail.
  8026. * src/PeerInteractionCommand.h
  8027. (keepAlive): Removed.
  8028. (sendKeepAlive): New function.
  8029. (checkHave): New function.
  8030. (beforeSocketCheck): Removed.
  8031. * src/PeerInteractionCommand.cc
  8032. (executeInternal): Use peerInteraction->checkRequestSlot(). Added
  8033. calls to checkHave() and sendKeepAlive().
  8034. (keepAlive): Renamed to sendKeepAlive().
  8035. (sendKeepAlive): New function.
  8036. (beforeSocketCheck): Removed.
  8037. (checkHave): New function.
  8038. * src/BitfieldMan.cc
  8039. (getMissingIndex): Don't call getMissingIndexRandomly() if max is 0.
  8040. (getMissingUnusedIndex): Don't call getMissingIndexRandomly() if max is
  8041. 0.
  8042. (getMissingIndex): Dont't call getMissingIndexRandomly() if max is 0.
  8043. * src/TorrentMan.h
  8044. (UsedPieces): Removed.
  8045. (Pieces): New type definition.
  8046. * src/Piece.h: Updated doc.
  8047. * src/Peer.h
  8048. (totalLength): Removed.
  8049. * src/Peer.cc
  8050. (updateLatency): Fixed the latency calculation.
  8051. * src/TorrentMan.cc
  8052. (addPeer): Call deleteOldErrorPeers() only if peers.size() is higher
  8053. than or equal to MAX_PEER_LIST_SIZE.
  8054. If duplicate is false and peer.size() >= MAX_PEER_LIST_SIZE,
  8055. then return false.
  8056. (deleteOldErrorPeers): Rewritten.
  8057. (deleteUsedPiece): Fixed the miss use of STL remove.
  8058. * src/PeerInteraction.h
  8059. (Pieces): Removed.
  8060. (deleteTimeoutRequestSlot): Removed.
  8061. (deleteCompletedRequestSlot): Removed.
  8062. (checkRequestSlot): New function.
  8063. * src/PeerInteraction.cc
  8064. (deleteTimeoutRequestSlot): Merged to checkRequestSlot().
  8065. (deleteCompletedRequestSlot): Merged to checkRequestSlot().
  8066. (checkRequestSlot): New function.
  8067. * src/DownloadEngine.cc
  8068. (run): Clear activeSockets before calling waitData().
  8069. (waitData): Removed a call to activeSockets.clear().
  8070. 2006-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8071. To attempt to handle EINTR:
  8072. * src/SocketCore.cc
  8073. (isReadable): Added EINTR handling.
  8074. (isWritable): Added EINTR handling.
  8075. To improve the performance:
  8076. * src/AbstractCommand.cc
  8077. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  8078. * src/PeerInteractionCommand.h
  8079. (receiveMessage): Renamed as receiveMessages().
  8080. (receiveMessages): New function.
  8081. * src/PeerInteractionCommand.cc
  8082. (executeInternal): receiveMessage loop is moved to new receiveMessages
  8083. () function. detectMessageFlooding() is moved here.
  8084. (detectMessageFlooding): Use Util::difftvsec() instead of Util::difftv
  8085. (). The flooding detection for have message is comment out.
  8086. (checkLongTimePeerChoking): Use Util::difftvsec() instead of
  8087. Util::difftv().
  8088. (receiveMessage): Renamed as receiveMessages().
  8089. (receiveMessages): New function.
  8090. (keepAlive): Use Util::difftvsec() instead of Util::difftv().
  8091. (beforeSocketCheck): Commented out checkLongTimePeerChoking().
  8092. * src/SleepCommand.cc
  8093. (execute): Use Util::difftvsec() instead of Util::difftv().
  8094. * src/BitfieldMan.h
  8095. (getNthBitIndex): New function.
  8096. (hasMissingPiece): New function.
  8097. (getAllMissingIndexes): New function.
  8098. * src/BitfieldMan.cc
  8099. (countSetBit): Rewritten.
  8100. (getNthBitIndex): New function.
  8101. (getMissingIndexRandomly): Rewritten.
  8102. (hasMissingPiece): New function.
  8103. (getAllMissingIndexes): New function.
  8104. * src/TorrentMan.cc
  8105. (hasMissingPiece): New function.
  8106. (deleteUsedPiece): Rewritten using STL.
  8107. * src/PeerInteraction.cc
  8108. (getNewPieceAndSendInterest): Use TorrentMan::hasMissingPiece(), which
  8109. is a little bit faster then TorrentMan::getMissingPieceIndex().
  8110. (addRequests): Updated the number of pending requests.
  8111. * src/PeerAbstractCommand.cc
  8112. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  8113. (execute): Returns true if TorrentMan::isHalt() is true.
  8114. Corrected the condition of upload limit checking.
  8115. * src/Util.h
  8116. (countBit): New function.
  8117. * src/Util.cc
  8118. (nbits): New variable.
  8119. (countBit): New function.
  8120. * src/DownloadEngine.h
  8121. (SockCmdMap): New type definition.
  8122. (waitData): Added an argument.
  8123. (addSocket): Added an argument.
  8124. (addSocketForReadCheck): Added an argument.
  8125. (addSocketForWriteCheck): Added an argument.
  8126. * src/DownloadEngine.cc
  8127. (run): Executes only commands whose sockets are ready to read or write.
  8128. All commands are executed in every 1 second.
  8129. (waitData): Calls select() again if it returned
  8130. EINTR.
  8131. (addSocket): Saves socket and command object pair to the map.
  8132. (deleteSocket): Deletes socket and command object pair from the map.
  8133. (addSocketForReadCheck): Added an argument.
  8134. (addSocketForWriteCheck): Added an argument.
  8135. * src/DownloadCommand.cc
  8136. (executeInternal): Use Util::difftvsec() instead of Util::difftv().
  8137. To send "event=stopped" to the tracker when the application finishes:
  8138. * src/PeerChokeCommand.h
  8139. (checkPoint): New variable.
  8140. * src/PeerChokeCommand.cc
  8141. (PeerChokeCommand): Added the initialization of checkPoint.
  8142. (execute): The interval check is now done by checkPoint, not
  8143. SleepCommand. Return true if TorrentMan::isHalt() is true.
  8144. * src/TorrentMan.h
  8145. (halt): New function.
  8146. (hasMissingPiece): New function.
  8147. (isHalt): New function.
  8148. (setHalt): New function.
  8149. * src/TorrentMan.cc
  8150. (TorrentMan): Added the initialization of halt.
  8151. * src/TorrentAutoSaveCommand.h
  8152. (checkPoint): New variable.
  8153. * src/PeerListenCommand.cc
  8154. (execute): Returns true if TorrentMan::isHalt() is true.
  8155. * src/main.cc
  8156. (setSignalHander): Added flags argument.
  8157. (torrentHandler): Just calls TorrentMan::setHalt(true) and returns.
  8158. (main): Set SA_ONESHOT flag of the signal hander of SIGINT and SIGTERM.
  8159. Removed printDownloadAbortMessage() after torrent downloading loop.
  8160. * src/TorrentAutoSaveCommand.cc
  8161. (TorrentAutoSaveCommand): Added the initialization of checkPoint.
  8162. (execute): Returns true if TorrentMan::isHalt() is true.
  8163. The interval check is now done by checkPoint, not SleepCommand.
  8164. * src/TrackerWatcherCommand.cc
  8165. (execute): If TorrentMan::isHalt(), then create a tracker request with
  8166. event=stopped.
  8167. * src/TrackerUpdateCommand.cc
  8168. (prepareForRetry): Do not use SleepCommand here.
  8169. (execute): Returns true if TorrentMan::isHalt() is true.
  8170. Others:
  8171. * src/TorrentMan.cc
  8172. (getMissingPieceIndex): Updated log message.
  8173. * src/PeerInteraction.cc
  8174. (createPeerMessag): Updated log message.
  8175. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8176. To add the ability to download several pieces in mix in a command and
  8177. increase the number of request slots according to request-cancel
  8178. latency:
  8179. * src/PeerInteractionCommand.cc
  8180. (executeInternal): The number of messages to be received at a time
  8181. is increased from 10 to 50.
  8182. * src/LogFactory
  8183. (getInstance): Added NullLogger.
  8184. * src/NullLogger.h: New class.
  8185. * src/BitfieldMan.h
  8186. (getMissingIndex): New function.
  8187. * src/BitfieldMan.cc
  8188. (getMissingIndex): New function.
  8189. * src/TorrentMan.h
  8190. (checkOutPiece): New function.
  8191. (getMissingPieceIndex): New function.
  8192. (getMissingFastPieceIndex): New function.
  8193. (getMissingFastPiece): New function.
  8194. * src/TorrentMan.cc
  8195. (updatePiece): Rewritten using STL.
  8196. (syncPiece): Rewritten using STL.
  8197. (getMissingPiece): Rewritten using getMissingPieceIndex() and
  8198. checkOutPiece().
  8199. (getMissingPieceIndex): New function.
  8200. (getMissingFastPieceIndex): New function.
  8201. (getMissingFastPiece): New function.
  8202. (checkOutPiece): New function.
  8203. * src/PeerInteraction.h
  8204. (Pieces): New type definition.
  8205. (piece): Removed.
  8206. (pieces): New variable.
  8207. (getNewPieceAndSendInterest): Added the "piece" argument.
  8208. (abortPiece): Added the "piece" argument.
  8209. (abortAllPieces): New function.
  8210. (isInRequestSlot): New function.
  8211. (hasDownloadPiece): Added the "index" argument.
  8212. (setDownloadPiece): Removed.
  8213. (getDownloadPiece): Added the "index" argument.
  8214. (updatePiece): New function.
  8215. (createRequestMessage): Added the "index" argument.
  8216. * src/PeerInteraction.cc
  8217. (onChoked): Rewritten.
  8218. (abortPiece): Rewirtten.
  8219. (abortAllPieces): New function.
  8220. (deleteTimeoutRequestSlot): Rewritten.
  8221. Clarified code a little bit.
  8222. (deleteCompletedRequestSlot): Rewritten.
  8223. (isInRequestSlot): New function.
  8224. (syncPiece): Rewritten.
  8225. (updatePiece): New function.
  8226. (getNewPieceAndSendInterest): Rewritten.
  8227. (addRequests): Rewritten.
  8228. (getDownloadPiece): Rewritten.
  8229. (hasDownloadPiece): Rewritten.
  8230. (createRequestMessage): Added the "index" argument.
  8231. * src/common.h
  8232. (BITFIELD_LEN_FROM_PIECES): Enclosed the variable in parentheses.
  8233. (DIV_FLOOR): New definition.
  8234. * src/PieceMessage.cc
  8235. (receivedAction): Update request-piece latency here.
  8236. * src/RequestSlot.h
  8237. (getLatencyInMillis): New function.
  8238. * src/RequestSlot.cc
  8239. (isTimeout): Rewritten using getLatencyInMillis.
  8240. (getLatencyInMillis): New function.
  8241. * src/Piece.h
  8242. (operator==): New function.
  8243. (getMissingBlockIndex): New function.
  8244. * src/Piece.cc
  8245. (operator==): New function.
  8246. (getMissingBlockIndex): New function.
  8247. * src/Peer.h
  8248. (DEFAULT_LATENCY): New definition.
  8249. (latency): New variable.
  8250. (updateLatency): New function.
  8251. (getLatency): New function.
  8252. * src/Peer.cc
  8253. (resetStatus): Reset latecy.
  8254. (updateLatency): New function.
  8255. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8256. * src/SocketCore.cc
  8257. (isReadable): Added secure to the condition.
  8258. * src/HttpConnection.cc
  8259. (receiveResponse): Fixed a bug that causes no response header
  8260. exception.
  8261. * src/Peer.h
  8262. (getFastSet): Fixed the return value type.
  8263. 2006-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8264. To remove a wait from download loop:
  8265. * src/DownloadEngine.cc
  8266. (run): Comment out shortSleep.
  8267. To rewrite the message handling:
  8268. * src/SimplePeerMessage.h: New class.
  8269. * src/SimplePeerMessage.cc: New class.
  8270. * src/CancelMessage.h: Derived from SimplePeerMessage.
  8271. (msg): New variable.
  8272. (create): New function.
  8273. (send): Removed.
  8274. (getMessage): New function.
  8275. (getMessageLength): New function.
  8276. * src/CancelMessage.cc
  8277. (create): New function.
  8278. (receivedAction): Replaced deleteRequestMessageInQueue with
  8279. rejectPieceMessageInQueue.
  8280. (send): Removed.
  8281. (getMessage): New function.
  8282. (getMessageLength): New function.
  8283. * src/BitfieldMessage.h: Derived from SimplePeerMessage.
  8284. (msg): New variable.
  8285. (msgLength): New variable.
  8286. (~BitfieldMessage): Deleted msg.
  8287. (send): Removed.
  8288. (getMessage): New function.
  8289. (getMessageLength): New function.
  8290. * src/BitfieldMessage.cc
  8291. (create): New function.
  8292. (send): Removed.
  8293. (getMessage): New function.
  8294. (getMessageLength): New function.
  8295. * src/ChokeMessage.h: Derived from SimplePeerMessage.
  8296. (msg): New variable.
  8297. (sendPredicate): New function.
  8298. (onSendComplete): New function.
  8299. (send): Removed.
  8300. (getMessage): New function.
  8301. (getMessageLength): New function.
  8302. (create): New function.
  8303. * src/ChokeMessage.cc
  8304. (create): New function.
  8305. (send): Removed.
  8306. (sendPredicate): New function.
  8307. (getMessage): New function.
  8308. (getMessageLength): New function.
  8309. (onSendComplete): New function.
  8310. * src/KeepAliveMessage.h: Derived from SimplePeerMessage.
  8311. (msg): New variable.
  8312. (send): Removed.
  8313. (getMessage): New function.
  8314. (getMessageLength): New function.
  8315. * src/KeepAliveMessage.cc
  8316. (send): Removed.
  8317. (getMessage): New function.
  8318. (getMessageLength): New function.
  8319. * src/PortMessage.h
  8320. (create): New function.
  8321. (receivedAction): Updated log message.
  8322. * src/PortMessage.cc: New file.
  8323. * src/UnchokeMessage.h: Derived from SimplePeerMessage.
  8324. (msg): New variable.
  8325. (sendPredicate): New function.
  8326. (onSendComplete): New function.
  8327. (create): New function.
  8328. (send): Removed.
  8329. (getMessage): New function.
  8330. (getMessageLength): New function.
  8331. * src/UnchokeMessage.cc
  8332. (create): New function.
  8333. (send): Removed.
  8334. (sendPredicate): New function.
  8335. (getMessage): New function.
  8336. (getMessageLength): New function.
  8337. (onSendComplete): New function.
  8338. * src/PieceMessage.h
  8339. (leftPieceDataLength): Removed.
  8340. (leftDataLength): New variable.
  8341. (headerSend): New variable.
  8342. (pendingCount): New variable.
  8343. (msgHeader): New variable.
  8344. (sendPieceData): New function.
  8345. (incrementPendingCount): New function.
  8346. (isPendingCountMax): New function.
  8347. (create): New function.
  8348. (getMessageHeader): New function.
  8349. (getMessageHeaderLength): New function.
  8350. * src/PieceMessage.cc
  8351. (create): New function.
  8352. (getMessageHeader): New function.
  8353. (getMessageHeaderLength): New function.
  8354. (send): Rewritten.
  8355. (sendPieceData): New function.
  8356. * src/HaveMessage.h: Derived from SimplePeerMessage.
  8357. (msg): New variable.
  8358. (create): New function.
  8359. (getMessage): New function.
  8360. (getMessageLength): New function.
  8361. * src/HaveMessage.cc
  8362. (create): New function.
  8363. (send): Removed.
  8364. (sendPieceData): New function.
  8365. (getMessage): New function.
  8366. (getMessageLength): New function.
  8367. * src/RequestMessage.h: Derived from SimplePeerMessage.
  8368. (msg): New variable.
  8369. (create): New function.
  8370. (send): Removed.
  8371. (getMessage): New function.
  8372. (getMessageLength): New function.
  8373. * src/RequestMessage.cc
  8374. (create): New function.
  8375. (receivedAction): Added the handling of fast extension.
  8376. Deleted torrentMan->addUploadLength, torrentMan->addDeltaUploadLength.
  8377. (send): Removed.
  8378. (getMessage): New function.
  8379. (getMessageLength): New function.
  8380. * src/InterestedMessage.h: Derived from SimplePeerMessage.
  8381. (msg): New variable.
  8382. (sendPredicate): New function.
  8383. (onSendComplete): New function.
  8384. (create): New function.
  8385. (getMessage): New function.
  8386. (getMessageLength): New function.
  8387. * src/InterestedMessage.cc
  8388. (create): New function.
  8389. (send): Removed.
  8390. (sendPieceData): New function.
  8391. (getMessage): New function.
  8392. (getMessageLength): New function.
  8393. (onSendComplete): New function.
  8394. * src/NotInterestedMessage.h: Derived from SimplePeerMessage.
  8395. (msg): New variable.
  8396. (sendPieceData): New function.
  8397. (onSendComplete): New function.
  8398. (create): New function.
  8399. (send): Removed.
  8400. (getMessage): New function.
  8401. (getMessageLength): New function.
  8402. * src/NotInterestedMessage.cc
  8403. (create): New function.
  8404. (send): Removed.
  8405. (sendPredicate): New function.
  8406. (getMessage): New function.
  8407. (getMessageLength): New function.
  8408. (onSendComplete): New function.
  8409. * src/AllowedFastMessage.h: New class.
  8410. * src/AllowedFastMessage.cc: New class.
  8411. * src/RejectMessage.h: New class.
  8412. * src/RejectMessage.cc: New class.
  8413. * src/SuggestPieceMessage.h: New class.
  8414. * src/SuggestPieceMessage.cc: New class.
  8415. * src/HaveAllMessage.h: New class.
  8416. * src/HaveAllMessage.cc: New class.
  8417. * src/HaveNoneMessage.h: New class.
  8418. * src/HaveNoneMessage.cc: New class.
  8419. * src/HandshakeMessage.h: Derived from SimplePeerMessage.
  8420. (msg): New variable.
  8421. (reserved): New variable.
  8422. (create): New function.
  8423. (getId): New function.
  8424. (receivedAction): New function.
  8425. (getMessage): New function.
  8426. (getMessageLength): New function.
  8427. (isFastExtensionSupported): New function.
  8428. * src/HandshakeMessage.cc
  8429. (HandshakeMessage): Moved here from HandshakeMessage.h.
  8430. (create): New function.
  8431. (getMessage): New function.
  8432. (getMessageLength): New function.
  8433. (toString): Added the output of reserved field.
  8434. (check): Added const qualifier.
  8435. (isFastExtensionSupported): New function.
  8436. * src/PeerMessageUtil.h
  8437. (createChokeMessage): Removed.
  8438. (createUnchokeMessage): Removed.
  8439. (createInterestedMessage): Removed.
  8440. (createNotInterestedMessage): Removed.
  8441. (createHaveMessage): Removed.
  8442. (createBitfieldMessage): Removed.
  8443. (createRequestMessage): Removed.
  8444. (createCancelMessage): Removed.
  8445. (createPieceMessage): Removed.
  8446. (createPortMessage): Removed.
  8447. (createChokeMessage): Removed.
  8448. (createUnchokeMessage): Removed.
  8449. (createInterestedMessage): Removed.
  8450. (createNotInterestedMessage): Removed.
  8451. (createHaveMessage): Removed.
  8452. (createBitfieldMessage): Removed.
  8453. (createRequestMessage): Removed.
  8454. (createCancelMessage): Removed.
  8455. (createPieceMessage): Removed.
  8456. (createKeepAliveMessage): Removed.
  8457. (createHandshakeMessage): Removed.
  8458. (setIntParam): New function.
  8459. (createPeerMessageString): New function.
  8460. * src/PeerMessageUtil.cc
  8461. (createChokeMessage): Removed.
  8462. (createUnchokeMessage): Removed.
  8463. (createInterestedMessage): Removed.
  8464. (createNotInterestedMessage): Removed.
  8465. (createHaveMessage): Removed.
  8466. (createBitfieldMessage): Removed.
  8467. (createRequestMessage): Removed.
  8468. (createCancelMessage): Removed.
  8469. (createPieceMessage): Removed.
  8470. (createPortMessage): Removed.
  8471. (createRequestMessage): Removed.
  8472. (createCancelMessage): Removed.
  8473. (createPieceMessage): Removed.
  8474. (createHaveMessage): Removed.
  8475. (createChokeMessage): Removed.
  8476. (createUnchokeMessage): Removed.
  8477. (createInterestedMessage): Removed.
  8478. (createNotInterestedMessage): Removed.
  8479. (createBitfieldMessage): Removed.
  8480. (createKeepAliveMessage): Removed.
  8481. (createHandshakeMessage): Removed.
  8482. (setIntParam): New function.
  8483. (createPeerMessageString): New function.
  8484. * src/PeerConnection.h
  8485. (peer): Removed.
  8486. (torrentMan): Removed.
  8487. (createNLengthMessage): Removed.
  8488. (setIntParam): Removed.
  8489. (writeOutgoingMessageLog): Removed all overloaded functions.
  8490. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8491. (sendMessage): New function.
  8492. (sendHandshake): Removed.
  8493. (sendKeepAlive): Removed.
  8494. (sendChoke): Removed.
  8495. (sendUnchoke): Removed.
  8496. (sendInterested): Removed.
  8497. (sendNotInterested): Removed.
  8498. (sendHave): Removed.
  8499. (sendBitfield): Removed.
  8500. (sendRequest): Removed.
  8501. (sendPiece): Removed.
  8502. (sendPieceHeader): Removed.
  8503. (sendPieceData): Removed.
  8504. (sendCancel): Removed.
  8505. (getPeer): Removed.
  8506. * src/PeerConnection.cc
  8507. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8508. (sendHandshake): Removed.
  8509. (sendKeepAlive): Removed.
  8510. (createNLengthMessage): Removed.
  8511. (setIntParam): Removed.
  8512. (writeOutgoingMessageLog): Removed all overloaded functions.
  8513. (sendChoke): Removed.
  8514. (sendUnchoke): Removed.
  8515. (sendInterested): Removed.
  8516. (sendNotInterested): Removed.
  8517. (sendHave): Removed.
  8518. (sendBitfield): Removed.
  8519. (sendRequest): Removed.
  8520. (sendPiece): Removed.
  8521. (sendPieceHeader): Removed.
  8522. (sendPieceData): Removed.
  8523. (sendMessage): New function.
  8524. (sendCancel): Removed.
  8525. * src/PeerInteractionCommand.cc
  8526. (PeerInteractionCommand): Call setUploadLimit.
  8527. (executeInternal): Call setUploadLimit.
  8528. Added the handling of "inProgress" state of handshake message.
  8529. Call sendBitfield() or sendAllowdFast() instead of deprecated
  8530. sendNow().
  8531. (keepAlive): Call addMessage and sendMessage instead of deprecated
  8532. sendNow().
  8533. (beforeSocketCheck): Call addMessage instead of deprecated trySendNow()
  8534. * src/TorrentMan.h
  8535. (PEER_ID_LENGTH): New definition.
  8536. (hasAllPieces): New function.
  8537. * src/TorrentMan.cc
  8538. (getMissingPiece): Added the handling of fast extension.
  8539. (cancelPiece): Call updatePiece().
  8540. (hasAllPieces): New function.
  8541. * src/PeerInteraction.h
  8542. (fastSet): New variable.
  8543. (getNewPieceAndSendInterest): Changed the return type to void.
  8544. (send): Renamed as sendMessages.
  8545. (deleteAllRequestSlot): Removed.
  8546. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8547. (cancelAllRequest): Removed all overloaded functions.
  8548. (deleteAllRequestSlot): Removed.
  8549. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8550. (rejectPieceMessageInQueue): New function.
  8551. (rejectAllPieceMessageInQueue): New function.
  8552. (onChoked): New function.
  8553. (isSendingMessageInProgress): New function.
  8554. (getCorrespondingRequestSlot): Changed its arguments.
  8555. (isInFastSet): New function.
  8556. (addFastSetIndex): New function.
  8557. (addRequests): New function.
  8558. (sendNow): Removed.
  8559. (trySendNow): Removed.
  8560. (sendBitfield): New function.
  8561. (sendAllowdFast): New function.
  8562. (createHaveAllMessage): New function.
  8563. (createHaveNoneMessage): New function.
  8564. (createRejectMessage): New function.
  8565. (createAllowedFastMessage): New function.
  8566. * src/PeerInteraction.cc
  8567. (send): Renamed as sendMessages.
  8568. (sendMessages): New function.
  8569. (MsgPushBack): New class.
  8570. (isSendingMessageInProgress): New function.
  8571. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8572. (rejectAllPieceMessageInQueue): New function.
  8573. Added the handling of fast extension.
  8574. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8575. (rejectPieceMessageInQueue): New function.
  8576. Added the handling of fast extension.
  8577. (deleteRequestSlot): Replaced for loop with std::find.
  8578. (onChoked): New function.
  8579. (deleteAllRequestSlot): Removed.
  8580. (abortPiece): Rewirtten.
  8581. (deleteTimeoutRequestSlot): Updated log messages.
  8582. (getCorrespondingRequestSlot): Changed its arguments.
  8583. (cancelAllRequest): Removed all overloaded functions.
  8584. (receiveHandshake): Added the check to see whether an incoming peer
  8585. supports fast extension.
  8586. (createHandshakeMessage): Use HandshakeMessage::create instead of
  8587. PeerMessageUtil.
  8588. (createPeerMessage): Use create() of each message class instead of
  8589. PeerMessageUtil.
  8590. HaveAllMessage, HaveNoneMessage, RejectMessage, SuggestPieceMessage,
  8591. AllowedFastMessage were added.
  8592. (getNewPieceAndSendInterest): Changed its return value type to void.
  8593. Added the handling of fast extension.
  8594. (addRequests): New function.
  8595. (sendNow): Removed.
  8596. (sendHandshake): Rewritten.
  8597. (trySendNow): Removed.
  8598. (sendBitfield): New function.
  8599. (sendAllowdFast): New function.
  8600. (isInFastSet): New function.
  8601. (addFastSetIndex): New function.
  8602. (createRequestMessage): Use RequestMessage::create instead of
  8603. PeerMessageUtil.
  8604. (createCancelMessage): Use CancelMessage::create instead of
  8605. PeerMessageUtil.
  8606. (createPieceMessage): Use PieceMessage::create instead of
  8607. PeerMessageUtil.
  8608. (createHaveMessage): Use HaveMessage::create instead of
  8609. PeerMessageUtil.
  8610. (createChokeMessage): Use ChokeMessage::create instead of
  8611. PeerMessageUtil.
  8612. (createUnchokeMessage): Use UnchokeMessage::create instead of
  8613. PeerMessageUtil.
  8614. (createInterestedMessage): Use InterestedMessage::create instead of
  8615. PeerMessageUtil.
  8616. (createNotInterestedMessage): Use NotInterestedMessage::create instead
  8617. of PeerMessageUtil.
  8618. (createBitfieldMessage): Use BitfieldMessage::create instead of
  8619. PeerMessageUtil.
  8620. (createKeepAliveMessage): Use KeepAliveMessage::create instead of
  8621. PeerMessageUtil.
  8622. (createHaveAllMessage): New function.
  8623. (createHaveNoneMessage): New function.
  8624. (createRejectMessage): New function.
  8625. (createAllowedFastMessage: New function.
  8626. * src/Util.h
  8627. (sha1Sum): New function.
  8628. (computeFastSet): New function.
  8629. * src/Util.cc
  8630. (sha1Sum): New function.
  8631. (computeFastSet): New function.
  8632. * src/Peer.h
  8633. (fastExtensionEnabled): New variable.
  8634. (fastSet): New variable.
  8635. (setAllBitfield): New function.
  8636. (setFastExtensionEnabled): New function.
  8637. (isFastExtensionEnabled): New function.
  8638. (addFastSetIndex): New function.
  8639. (getFastSet): New function.
  8640. (isInFastSet): New function.
  8641. (countFastSet): New function.
  8642. * src/Peer.cc
  8643. (isInFastSet): New function.
  8644. (addFastSetIndex): New function.
  8645. (setAllBitfield): New function.
  8646. * src/AbstractCommand.cc (execute): Changed the procedure of checking
  8647. sockets.
  8648. * src/PeerAbstractCommand.cc
  8649. (PeerAbstractCommand): Added the initialization for uploadLimitCheck
  8650. and uploadLimit.
  8651. (execute): Changed the procedure of checking sockets. The upload speed
  8652. checking were added.
  8653. (setUploadLimit): New function.
  8654. (setUploadLimitCheck): New function.
  8655. * src/PeerAbstractCommand.h
  8656. (setUploadLimit): New function.
  8657. (setUploadLimitCheck): New function.
  8658. (uploadLimit): New variable.
  8659. (uploadLimitCheck): New variable.
  8660. To contact a tracker regularly:
  8661. * src/TrackerWatcherCommand.h (interval): New variable.
  8662. (checkPoint): New variable.
  8663. (TrackerWatcherCommand): Added interval argument.
  8664. * src/TrackerWatcherCommand.cc
  8665. (TrackerWatcherCommand): Initialized checkPoint.
  8666. (execute): Now a tracker is contacted in every specified period.
  8667. If peer list is not needed, send request with numwant=0.
  8668. * src/TrackerUpdateCommand.cc
  8669. (execute): Updated log messages.
  8670. * src/DownloadEngine.cc
  8671. (~DownloadEngine): Removed two asserts.
  8672. (waitData): Uncommented wfds. May be a bug fix.
  8673. 2006-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8674. * src/PeerInteractionCommand.h
  8675. (checkInactiveConnection): Removed.
  8676. * src/PeerInteractionCommand.cc
  8677. (executeInternal): Removed following function calls:
  8678. detectMessageFlooding(), checkLongTimePeerChoking and
  8679. checkInactiveConnection().
  8680. (checkInactiveConnection): Removed.
  8681. (detectMessageFlooding): Removed function call to
  8682. checkInactiveConnection().
  8683. * src/PeerMessageUtil.h
  8684. (createChokeMessage): New function. Overload.
  8685. (createUnchokeMessage): New function. Overload.
  8686. (createInterestedMessage): New function. Overload.
  8687. (createNotInterestedMessage): New function. Overload.
  8688. (createHaveMessage): New function. Overload.
  8689. (createBitfieldMessage): New function. Overload.
  8690. (createRequestMessage): New function. Overload.
  8691. (createCancelMessage): New function. Overload.
  8692. (createPieceMessage): New function. Overload.
  8693. (createKeepAliveMessage): New function. Overload.
  8694. * src/PeerMessageUtil.cc
  8695. (createChokeMessage): New function. Overload.
  8696. (createUnchokeMessage): New function. Overload.
  8697. (createInterestedMessage): New function. Overload.
  8698. (createNotInterestedMessage): New function. Overload.
  8699. (createHaveMessage): New function. Overload.
  8700. (createBitfieldMessage): New function. Overload.
  8701. (createRequestMessage): New function. Overload.
  8702. (createCancelMessage): New function. Overload.
  8703. (createPieceMessage): New function. Overload.
  8704. (createKeepAliveMessage): New function. Overload.
  8705. * src/SendMessageQueue.cc
  8706. (createRequestMessage): Use PeerMessageUtil.
  8707. (createCancelMessage): Use PeerMessageUtil.
  8708. (createPieceMessage): Use PeerMessageUtil.
  8709. (createHaveMessage): Use PeerMessageUtil.
  8710. (createChokeMessage): Use PeerMessageUtil.
  8711. (createUnchokeMessage): Use PeerMessageUtil.
  8712. (createInterestedMessage): Use PeerMessageUtil.
  8713. (createNotInterestedMessage): Use PeerMessageUtil.
  8714. (createBitfieldMessage): Use PeerMessageUtil.
  8715. (createKeepAliveMessage): Use PeerMessageUtil.
  8716. * src/SendMessageQueue.h: Renamed to PeerInteraction.h
  8717. * src/SendMessageQueue.cc: Renamed to PeerInteraction.cc
  8718. * src/PeerInteraction.h: New class.
  8719. * src/PeerInteraction.cc: New class.
  8720. 2006-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8721. Each peer message has its own class.
  8722. * src/PendingMessages.h: Removed.
  8723. * src/PendingMessages.cc: Removed. The sending process was moved to
  8724. each message class.
  8725. * src/RequestSlotMan.h: Removed.
  8726. * src/RequestSlotMan.cc: Removed. All functionarities were moved to
  8727. SendMessageQueue.
  8728. * src/RequestMessage.h: New class.
  8729. * src/RequestMessage.cc: New class.
  8730. * src/CancelMessage.h: New class.
  8731. * src/CancelMessage.cc: New class.
  8732. * src/BitfieldMessage.h: New class.
  8733. * src/BitfieldMessage.cc: New class.
  8734. * src/ChokeMessage.h: New class.
  8735. * src/ChokeMessage.cc: New class.
  8736. * src/KeepAliveMessage.h: New class.
  8737. * src/KeepAliveMessage.cc: New class.
  8738. * src/PortMessage.h: New class.
  8739. * src/UnchokeMessage.h: New class.
  8740. * src/UnchokeMessage.cc: New class.
  8741. * src/PieceMessage.h: New class.
  8742. * src/PieceMessage.cc: New class.
  8743. * src/HaveMessage.h: New class.
  8744. * src/HaveMessage.cc: New class.
  8745. * src/BitfieldMessage.h: New class.
  8746. * src/BitfieldMessage.cc: New class.
  8747. * src/NotInterestedMessage.h: New class.
  8748. * src/NotInterestedMessage.cc: New class.
  8749. * src/InterestedMessage.h: New class.
  8750. * src/InterestedMessage.cc: New class.
  8751. * src/HandshakeMessage.h (sendMessageQueue): New variable.
  8752. (getSendMessageQueue): New function.
  8753. (setSendMessageQueue): New function.
  8754. * src/HandshakeMessage.cc: New class.
  8755. * src/PeerConnection.h (receiveMessage): Changed return value and
  8756. arguments.
  8757. (receiveHandshake): Changed return value and arguments.
  8758. * src/PeerConnection.cc (receiveMessage): Do not create message class
  8759. here.
  8760. (receiveHandshake): Do not create handshake class here.
  8761. * src/PeerInteractionCommand.h (peerConnection): Removed.
  8762. (piece): Removed.
  8763. (syncPiece): Removed.
  8764. (sendInterest): Removed.
  8765. (sendMessages): Removed.
  8766. (createRequestPendingMessage): Removed.
  8767. (checkPieceHash): Removed.
  8768. (erasePieceOnDisk): Removed.
  8769. (getNewPieceAndSendInterest): Removed.
  8770. (onGotNewPice): Removed.
  8771. (onGotWrongPiece): Removed.
  8772. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  8773. Removed peerConnection, piece.
  8774. (~PeerInteractionCommand): Removed peerConnection.
  8775. (executeInternal): Use sendMessageQueue instead of peerConnection.
  8776. (syncPiece): Moved to SendMessageQueue.
  8777. (decideChoking): Removed PendingMessage.
  8778. (receiveMessage): Use sendMessageQueue instead of peerConnection.
  8779. The action after receiving peer message was moved to each message
  8780. class.
  8781. (onGotNewPice): Moved to SendMessageQueue.
  8782. (onGotWrongPiece): Moved to SendMessageQueue.
  8783. (getNewPieceAndSendInterest): Moved to SendMessageQueue.
  8784. (sendInterest): Moved to SendMessageQueue.
  8785. (createRequestPendingMessage): Removed.
  8786. (sendMessages): Moved to SendMessageQueue.
  8787. (onAbort): Use SendMessageQueue::abortPiece()
  8788. (keepAlive): Use sendMessageQueue instead of peerConnection.
  8789. (beforeSocketCheck): Use sendMessageQueue instead of peerConnection.
  8790. (checkPieceHash): Moved to SendMessageQueue.
  8791. (erasePieceOnDisk): Moved to SendMessageQueue.
  8792. * src/PeerMessageUtil.h
  8793. (createBitfieldMessage): Removed.
  8794. (createHaveMessage): Changed return value and arguments.
  8795. (createBitfieldMessage): Changed return value and arguments.
  8796. (createRequestCancelMessage): Removed.
  8797. (createPieceMessage): Changed return value and arguments.
  8798. (getShortIntParam): New function.
  8799. (checkIndex): Changed arguments.
  8800. (checkBegin): Changed arguments.
  8801. (checkLength): Changed arguments.
  8802. (checkPieceOffset): Removed.
  8803. (checkRange): New function.
  8804. (checkBitfield): Changed arguments.
  8805. (createPeerMessage): Removed.
  8806. (checkIntegrity): Removed.
  8807. (createHandshakeMessage): Changed arguments.
  8808. (createChokeMessage): New function.
  8809. (createUnchokeMessage): New function.
  8810. (createInterestedMessage): New function.
  8811. (createNotInterestedMessage): New function.
  8812. (createRequestMessage): New function.
  8813. (createCancelMessage): New function.
  8814. (createPortMessage): New function.
  8815. * src/PeerMessageUtil.cc
  8816. (createBitfieldMessage): Removed.
  8817. (createHaveMessage): Changed return value and arguments.
  8818. (createBitfieldMessage): Changed return value and arguments.
  8819. (createRequestCancelMessage): Removed.
  8820. (createPieceMessage): Changed return value and arguments.
  8821. (getShortIntParam): New function.
  8822. (checkIndex): Changed arguments.
  8823. (checkBegin): Changed arguments.
  8824. (checkLength): Changed arguments.
  8825. (checkPieceOffset): Removed.
  8826. (checkRange): New function.
  8827. (checkBitfield): Changed arguments.
  8828. (createPeerMessage): Removed.
  8829. (checkIntegrity): Removed.
  8830. (createHandshakeMessage): Changed arguments.
  8831. (createChokeMessage): New function.
  8832. (createUnchokeMessage): New function.
  8833. (createInterestedMessage): New function.
  8834. (createNotInterestedMessage): New function.
  8835. (createRequestMessage): New function.
  8836. (createCancelMessage): New function.
  8837. (createPortMessage): New function.
  8838. * src/PeerMessage.h
  8839. (id): Removed.
  8840. (index): Removed.
  8841. (begin): Removed.
  8842. (length): Removed.
  8843. (bitfield): Removed.
  8844. (bitfieldLength): Removed.
  8845. (block): Removed.
  8846. (blockLength): Removed.
  8847. (inProgress): New variable.
  8848. (cuid): New variable.
  8849. (peer): New variable.
  8850. (sendMessageQueue): New variable.
  8851. (logger): New variable.
  8852. (setBitfield): Removed.
  8853. (getBitfield): Removed.
  8854. (setBlock): Removed.
  8855. (getBlock): Removed.
  8856. (getBitfieldLength): Removed.
  8857. (getBlockLength): Removed.
  8858. (isInProgress): New function.
  8859. (toString): Made pure virtual.
  8860. (check): New function.
  8861. (send): New function.
  8862. (receivedAction): New function.
  8863. (getId): Made pure virtual.
  8864. (setId): Removed.
  8865. (getIndex): Removed.
  8866. (setIndex): Removed.
  8867. (getBegin): Removed.
  8868. (setBegin): Removed.
  8869. (getLength): Removed.
  8870. (setLength): Removed.
  8871. (getCuid): New function.
  8872. (setCuid): New function.
  8873. (getPeer): New function.
  8874. (setPeer): New function.
  8875. (getSendMessageQueue): New function.
  8876. (setSendMessageQueue): New function.
  8877. (ID): Removed.
  8878. * src/PeerMessage.cc
  8879. (setBitfield): Removed.
  8880. (setBlock): Removed.
  8881. (toString): Removed.
  8882. * src/TorrentMan.h
  8883. (getPieceLength): New function.
  8884. (getPieceLength): New function.
  8885. * src/SendMessageQueue.h
  8886. (REQUEST_TIME_OUT): New definition.
  8887. (RequestSlots): New definition.
  8888. (MessageQueue): New definition.
  8889. (requestSlotMan): Removed.
  8890. (pendingMessages): Removed.
  8891. (requestSlots): New variable.
  8892. (messageQueue): New variable.
  8893. (torrentMan): New variable.
  8894. (peerConnection): New variable.
  8895. (peer): New variable.
  8896. (piece): New variable.
  8897. (getNewPieceAndSendInterest): New function.
  8898. (createPeerMessage): New function.
  8899. (createHandshakeMessage): New function.
  8900. (send): Made private.
  8901. (setPeerMessageCommonProperty): New function.
  8902. (deleteAllRequestSlot): New function.
  8903. (deleteRequestMessageInQueue): New function.
  8904. (cancelAllRequest): Made private.
  8905. (cancelAllRequest): Made private.
  8906. (countRequestSlot): Made private.
  8907. (addPendingMessage): Removed.
  8908. (deletePendingPieceMessage): Removed.
  8909. (deletePendingRequestMessage): Removed.
  8910. (addMessage): New function.
  8911. (deletePieceMessageInQueue): New function.
  8912. (deleteTimeoutRequestSlot): Changed argument.
  8913. (deleteCompletedRequestSlot): Changed argument.
  8914. (getCorrespoindingRequestSlot): Renamed to getCorrespondingRequestSlot.
  8915. (getCorrespondingRequestSlot): New function.
  8916. (countPendingMessage): Removed.
  8917. (countMessageInQueue): New function.
  8918. (getTorrentMan): New function.
  8919. (getPeerConnection): New function.
  8920. (hasDownloadPiece): New function.
  8921. (getDownloadPiece): New function.
  8922. (setDownloadPiece): New function.
  8923. (syncPiece): New function.
  8924. (sendMessages): New function.
  8925. (sendNow): New function.
  8926. (trySendNow): New function.
  8927. (abortPiece): New function.
  8928. (sendHandshake): New function.
  8929. (receiveMessage): New function.
  8930. (receiveHandshake): New function.
  8931. (createRequestMessage): New function.
  8932. (createCancelMessage): New function.
  8933. (createPieceMessage): New function.
  8934. (createHaveMessage): New function.
  8935. (createChokeMessage): New function.
  8936. (createUnchokeMessage): New function.
  8937. (createInterestedMessage): New function.
  8938. (createNotInterestedMessage): New function.
  8939. (createBitfieldMessage): New function.
  8940. (createKeepAliveMessage): New function.
  8941. * src/SendMessageQueue.cc
  8942. (SendMessageQueue): Removed requestSlotMan.
  8943. Instantiated peerConnection here.
  8944. (~SendMessageQueue): Removed requestSlotMan.
  8945. Added deletion of peerConnection and the contents of messageQueue.
  8946. (send): Updated according to the change of messageQueue.
  8947. (addPendingMessage): Renamed to addMessage.
  8948. (addMessage): New function.
  8949. (deletePendingPieceMessage): Renamed to deletePieceMessageInQueue.
  8950. (deletePieceMessageInQueue): New function.
  8951. (deletePendingRequestMessage): Renamed to deleteRequestMessageInQueue.
  8952. (deleteRequestMessageInQueue): New function.
  8953. (deleteRequestSlot): RequestSlotMan::deleteRequestSlot(...) was moved
  8954. here.
  8955. (deleteTimeoutRequestSlot): RequestSlotMan::deleteTimeoutRequestSlot
  8956. (...) was moved here.
  8957. (deleteAllRequestSlot): RequestSlotMan::deleteAllRequestSlot(...) was
  8958. moved here.
  8959. (deleteCompletedRequestSlot):
  8960. RequestSlotMan::deleteCompletedRequestSlot(...) was moved here.
  8961. (getCorrespondingRequestSlot):
  8962. RequestSlotMan::getCorrespoindingRequestSlot(...) was moved here.
  8963. And renamed to getCorrespondingRequestSlot, correcting a typo.
  8964. (countPendingMessage): Renamed to countMessageInQueue.
  8965. (countMessageInQueue): New function.
  8966. (countRequestSlot): RequestSlotMan::countRequestSlot() was moved here.
  8967. (receiveHandshake): New function.
  8968. (createHandshakeMessage): New function.
  8969. (receiveMessage): New function.
  8970. (createPeerMessage): New function.
  8971. (syncPiece): New function.
  8972. (getNewPieceAndSendInterest): New function.
  8973. (sendMessages): New function.
  8974. (sendNow): New function.
  8975. (trySendNow): New function.
  8976. (sendHandshake): New function.
  8977. (abortPiece): New function.
  8978. (getDownloadPiece): New function.
  8979. (getPeerMessageCommonProperty): New function.
  8980. (createRequestMessage): New function.
  8981. (createCancelMessage): New function.
  8982. (createPieceMessage): New function.
  8983. (createHaveMessage): New function.
  8984. (createChokeMessage): New function.
  8985. (createUnchokeMessage): New function.
  8986. (createInterestedMessage): New function.
  8987. (createNotInterestedMessage): New function.
  8988. (createBitfieldMessage): New function.
  8989. (createKeepAliveMessage): New function.
  8990. To add simple Content-Disposition support:
  8991. * src/HttpResponseCommand.h (determinFilename): New function.
  8992. * src/HttpResponseCommand.cc (executeInternal):
  8993. Use determinFilename(headers) instead of req->getFile() when comparing
  8994. filename.
  8995. (determinFilename): New function.
  8996. (handleDefaultEncoding): Use determinFilename(headers) instead of
  8997. req->getFile().
  8998. (handleOtherEncoding): Use determinFilename(headers) instead of
  8999. req->getFile().
  9000. * src/Util.h (getContentDispositionFilename): New function.
  9001. * src/Util.cc (getContentDispositionFilename): New function.
  9002. * src/LogFactory.h (release): New function.
  9003. * src/LogFactory.cc (release): New function.
  9004. To fix a bug that causes out-of-bound exception when HTTP status
  9005. line is wrong:
  9006. * src/HttpConnection.cc (receiveResponse): Added a check for header
  9007. size.
  9008. * src/common.h (Deleter): New class.
  9009. * src/SegmentMan.cc
  9010. (~SegmentMan): Added deletion of splitter and diskWriter.
  9011. * src/DownloadEngine.h
  9012. (Commands): Use deque.
  9013. (clearQueue): New function.
  9014. * src/DownloadEngine.cc
  9015. (~DownloadEngine): Added deletion of segmentMan.
  9016. (cleanQueue): New function.
  9017. * src/TorrentDownloadEngine.h
  9018. (TorrentDownloadEngine): The implementation was moved to
  9019. TorrentDownloadEngine.cc.
  9020. (~TorrentDownloadEngine): The implementation was moved to
  9021. TorrentDownloadEngine.cc.
  9022. * src/TorrentDownloadEngine.cc
  9023. (~TorrentDownloadEngine): Added deletion of torrentMan.
  9024. * src/main.cc
  9025. (clearRequest): Removed.
  9026. (handler): Added deletion of e.
  9027. (torrentHandler): Added deletion of te.
  9028. (main): Do not share splitter.
  9029. Use Deleter instead of clearRequest.
  9030. Deletion of classes were updated.
  9031. 2006-05-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9032. * src/main.cc (main): Fixed typo.
  9033. * src/message.h: Fixed typo.
  9034. * po/de.po: Added German translation, thanks to Hermann J. Beckers.
  9035. 2006-04-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9036. To add --select-file command-line option:
  9037. * src/Util.cc
  9038. (unfoldRange): New function.
  9039. (getNum): New function.
  9040. (unfoldSubRange): New function
  9041. * src/main.cc
  9042. (showUsage): Added help message.
  9043. (main): Added --select-file command-line option. Updated the layout of
  9044. file listing.
  9045. * src/common.h
  9046. (Integers): New definition.
  9047. * src/SocketCore.cc
  9048. (writeData): Removed timeout argument.
  9049. (readData): Removed timeout argument.
  9050. (peekData): Removed timeout argument.
  9051. * src/Socket.cc
  9052. (writeData): Removed timeout argument.
  9053. (readData): Removed timeout argument.
  9054. (peekData): Removed timeout argument.
  9055. * Release 0.4.1
  9056. 2006-04-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9057. To deploy upload rate based choking algorithm:
  9058. * src/PeerInteractionCommand.cc
  9059. (PeerInteractionCommand): Add peer to TorrentMan::activePeers to track
  9060. peer currently used.
  9061. (decideChoking): Deleted the choke/unchoke decision algorithm when
  9062. download completes. Simplified.
  9063. (receiveMessage): Updated.
  9064. * src/TorrentMan.h
  9065. (activePeers): New variable.
  9066. (addActivePeer): New function.
  9067. (getActivePeers): New function.
  9068. (deleteActivePeer): New function.
  9069. * src/TorrentMan.cc
  9070. (addPeer): deleteOldErrorPeers is moved to the begining of the function
  9071. * src/PeerAbstractCommand.cc
  9072. (onAbort): Use peer->resetStatus().
  9073. * src/main.cc
  9074. (PeerChokeCommand.h): Included.
  9075. (main): Added the instance of ChokingCommand to the command queue.
  9076. * src/Peer.h
  9077. (amChoking): Renamed from amChocking
  9078. (chokingRequired): New variable.
  9079. (optUnchoking): New variable.
  9080. (deltaUpload): New variable.
  9081. (deltaDownload): New variable.
  9082. (addDeltaUpload): New function.
  9083. (resetDeltaUpload): New function.
  9084. (addDeltaDownload): New function.
  9085. (resetDeltaDownload): New function.
  9086. (addPeerUpload): Added a call to addDeltaUpload.
  9087. (addPeerDownload): Added a call to addDeltaDownload.
  9088. * src/Peer.cc
  9089. (shouldBeChoking): Renamed from shouldChoke.
  9090. (resetStatus): New function.
  9091. * src/PeerChokeCommand.h: New class.
  9092. * src/PeerChokeCommand.cc: New class.
  9093. To add lazy upload speed limiter:
  9094. * src/TorrentConsoleDownloadEngine.h: Moved the variables for
  9095. statistics calculation to TorrentDownloadEngine.
  9096. * src/TorrentConsoleDownloadEngine.cc
  9097. (sendStatistics): Renamed from printStatistics.
  9098. (initStatistics): Removed. Moved to TorrentDownloadEngine.
  9099. (calculateSpeed): Removed. Moved to TorrentDownloadEngine.
  9100. (calculateStatistics): Removed. Moved to TorrentDownloadEngine.
  9101. * src/TorrentDownloadEngine.h: Added the variables for statistics
  9102. calculation.
  9103. (sendStatistics): New function as pure virtual function.
  9104. (getUploadSpeed): New function.
  9105. * src/TorrentDownloadEngine.cc
  9106. (initStatistics): New function.
  9107. (calculateSpeed): New function.
  9108. (calculateStatistics): New function.
  9109. * src/SendMessageQueue.h
  9110. (uploadLength): New variable.
  9111. (send): Added an argument.
  9112. (setUploadLimit): New function.
  9113. (getUploadLimit): New function.
  9114. * src/SendMessageQueue.cc
  9115. (send): Added upload speed limiter.
  9116. * src/prefs.h
  9117. (PREF_UPLOAD_LIMIT): New definition.
  9118. * src/PeerInteractionCommand.cc
  9119. (PeerInteractionCommand): Set upload speed limit to sendMessageQueue.
  9120. * src/main.cc
  9121. (main): Added --upload-limit option
  9122. For bug fixes:
  9123. * src/main.cc
  9124. (showUsage): Corrected --listen-port help
  9125. Other changes:
  9126. * src/TorrentMan.cc
  9127. (getPeer): Return nullPeer if connection is grather than
  9128. MAX_PEER_UPDATE(15) in order to leave space for incoming peers.
  9129. 2006-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9130. To add some useful information to the exception message:
  9131. * src/SocketCore.cc : Updated messages.
  9132. * src/SegmentMan.cc :
  9133. * src/TorrentMan.cc : Updated messages.
  9134. * src/MultiDiskWriter.cc : Updated messages.
  9135. * src/Util.cc : Updated messages.
  9136. * src/AbstractDiskWriter.cc : Updated messages.
  9137. * src/PreAllocationDiskWriter.cc : Updated messages.
  9138. * src/message.cc : Added new messages. Updated some messages.
  9139. * src/TrackerWatcherCommand.h (MIN_PEERS): New definition.
  9140. * src/TrackerWatcherCommand.cc (execute): Use MIN_PEERS.
  9141. Updated threshold from 30 to 15.
  9142. * src/AbstractDiskWriter.h (filename): New variable.
  9143. * src/AbstractDiskWriter.cc (openExistingFile): Assigned filename.
  9144. (createFile): Assigned filename.
  9145. * src/main.cc: Updated the help message for http-auth-scheme.
  9146. * Release 0.4.0
  9147. 2006-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9148. To add TrackerUpdateCommand with which replaces
  9149. CompactTrackerResponseProcessor:
  9150. * src/TrackerWatcherCommand.h (req): Removed.
  9151. * src/TrackerWatcherCommand.cc (execute): Send a request to tracker
  9152. if the number of peer connections are less than 30.
  9153. * src/ByteArrayDiskWriter.h (readData): Implemented.
  9154. * src/SegmentMan.h (diskWriter): New function.
  9155. * src/SegmentMan.cc (init): Added a call to diskWriter->closeFile()
  9156. * src/main.cc : Removed #include "CompactTrackerResponseProcessor.h"
  9157. (main): Use TrackerUpdateCommand.
  9158. * src/TorrentMan.h (CompactTrackerResponseProcessor): Removed.
  9159. (req): New variable.
  9160. (setTrackerResponseProcessor): Removed.
  9161. (getTrackerResponseProcessor): Removed.
  9162. (processTrackerResponse): Removed.
  9163. * src/DownloadEngine.h (diskWriter): Removed.
  9164. * src/TorrentDownloadEngine.cc (afterEachIteration): Removed a call
  9165. to torrentMan->processTrackerResponse().
  9166. To add Util::expandBuffer:
  9167. * src/ByteArrayDiskWriter.h (expandBuffer): Removed.
  9168. * src/ByteArrayDiskWriter.cc (writeData): Use Util::expandBuffer().
  9169. * src/Util.h (expandBuffer): New function.
  9170. To fix the bug that causes segmentation fault when "-l ." is specified
  9171. in command-line option:
  9172. * src/SimpleLogger.h (SimpleLogger): Removed "filename" argument.
  9173. (openFile): New function.
  9174. (closeFile): New function.
  9175. * src/SimpleLogger.cc (SimpleLogger): Removed fopen.
  9176. (~SimpleLogger): Call closeFile();
  9177. * src/LogFactory.cc (getInstance): Added a call to slogger->openFile().
  9178. * src/main.cc (main): Added a check to see logger is configured
  9179. properly.
  9180. To enable HTTP authentication without specifying "--http-auth-scheme"
  9181. * src/prefs.h (PREF_HTTP_AUTH_ENABLED): New definition.
  9182. * src/HttpConnection.cc (createRequest): Send Authorization header
  9183. if PREF_HTTP_AUTH_ENABLED == V_TRUE.
  9184. * src/main.cc (main): Preset PREF_HTTP_AUTH_SCHEME to V_TRUE
  9185. If "--http-user" is specified, set PREF_HTTP_AUTH_ENABLED to V_TRUE
  9186. * src/Peer.cc (shouldChoke): Updated algorithm.
  9187. * src/message.h (EX_AUTH_FAILED): New definition.
  9188. (EX_FILE_OPEN): New definition.
  9189. * src/HttpResponseCommand.cc (checkResponse): Throw DlAbortEx
  9190. if status == 401.
  9191. (handleDefaultEncoding): Added a call to diskWriter->initAndOpenFile()
  9192. if req->isTorrent == true.
  9193. * src/main.cc (handler): Removed the check to see e->diskWriter != NULL
  9194. (torrentHandler): Removed the check to see diskAdaptor != NULL.
  9195. * src/AbstractDiskWriter.cc (openExistingFile): Updated messsage.
  9196. (createFile): Updated message.
  9197. 2006-04-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9198. To add a readout of estimated remaining time to normal HTTP/FTP
  9199. downloads:
  9200. * src/ConsoleDownloadEngine.h (startup): New variable.
  9201. (startupLength): New variable.
  9202. (isStartupLengthSet): New variable.
  9203. (avgSpeed): New variable.
  9204. (eta): New variable.
  9205. * src/ConsoleDownloadEngine.cc (sendStatistics): Added a readout of
  9206. estimated remaining time.
  9207. (initStatistics): Initialized newly added variables.
  9208. (calculateStatistics): Calculate average speed and estimated remaining
  9209. time.
  9210. To decouple TorrentDownloadEngine from HttpResponseCommand:
  9211. * src/TrackerDownloadCommand.h: Removed.
  9212. * src/TrackerDownloadCommand.cc: Removed.
  9213. * src/TrackerInitCommand.h: Removed.
  9214. * src/TrackerInitCommand.cc: Removed.
  9215. * src/TrackerUpdateCommand.h: Removed.
  9216. * src/TrackerUpdateCommand.cc: Removed.
  9217. * src/TrackerWatcherCommand.cc (execute): The construction of request
  9218. url written in TrackerInitCommand was moved here. Do not create
  9219. tracker request command if torrentMan->trackers != 0.
  9220. * src/CompactTrackerResponseProcessor.h: New class.
  9221. * src/CompactTrackerResponseProcessor.cc: New class.
  9222. * src/message.h (MSG_TRACKER_WARNING_MESSAGE): Updated.
  9223. * src/HttpResponseCommand.cc (createHttpDownloadCommand):
  9224. Decoupled TorrentDownloadEngine from this.
  9225. * src/SegmentMan.h (init): New function.
  9226. * src/SegmentMan.cc (init): New function.
  9227. * src/TorrentMan.h (responseProcessor): New variable.
  9228. (trackers): New variable.
  9229. (setTrackerResponseProcessor): New function.
  9230. (getTrackerResponseProcessor): New function.
  9231. (processTrackerResponse): New function.
  9232. * src/TorrentMan.cc (Constructor): Initialized new variable trackers.
  9233. (processTrackerResponse): New function.
  9234. * src/main.cc (main): Use ByteArrayDiskWriter and
  9235. CompactTrackerResponseProcessor.
  9236. * src/TorrentDownloadEngine.cc (afterEachIteration): Call torrentMan->
  9237. processTrackerResponse().
  9238. * src/TorrentConsoleDownloadEngine.cc (printStatistics): Updated a
  9239. readout.
  9240. * src/TorrentDownloadEngine.cc (afterEachIteration): Added log message
  9241. which indicates download has completed.
  9242. * src/AbstractDiskWriter.cc (Destructor): fd >= 0, not fd >0
  9243. (closeFile): fd >= 0, not fd > 0
  9244. * src/main.cc (main): Added short cut for show-files.
  9245. Added short cut for torrent-file.
  9246. Added new command-line option listen-port.
  9247. Updated i18n messages.
  9248. 2006-04-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9249. To add LogFactory which creates singleton logger:
  9250. * src/LogFactory.h: New class.
  9251. * src/LogFactory.cc: New class.
  9252. * src/Command.h (logger): New variable.
  9253. (Constructor): Use LogFactory.
  9254. * src/AbstractCommand.cc: Use Command::logger
  9255. * src/PeerConnection.cc (Constructor): Deleted the argument logger.
  9256. Use LogFactory.
  9257. * src/SegmentSplitter.h : Made logger protected.
  9258. * src/SegmentSplitter.cc (Constructor): Use LogFactory.
  9259. * src/SegmentMan.cc (Constructor): Use LogFactory.
  9260. * src/DownloadEngine.h : Made logger protected.
  9261. * src/DownloadEngine.cc (Constructor): Use LogFactory.
  9262. * src/PeerInteractionCommand.cc : Use Command::logger.
  9263. * src/HttpResponseCommand.cc : Use Command::logger.
  9264. * src/SegmentMan.h : Made logger private.
  9265. * src/TorrentMan.h : Made logger private.
  9266. * src/TorrentMan.cc : Use LogFactory.
  9267. * src/FtpNegotiateCommand.cc : Use Command::logger.
  9268. * src/HttpConnection.h (Constructor): Deleted the argument logger.
  9269. * src/HttpConnection.cc (Constructor): Deleted the argument logger.
  9270. Use LogFactory.
  9271. * src/FtpConnection.h (Constructor): Deleted the argument logger.
  9272. * src/FtpConnection.cc (Constructor): Deleted the argument logger.
  9273. Use LogFactory.
  9274. * src/DownloadCommand.cc : Use Command::logger.
  9275. * src/PeerAbstractCommand.cc : Use Command::logger.
  9276. * src/PeerListenCommand.cc : Use Command::logger.
  9277. * src/PeerInitiateConnectionCommand.cc : Use Command::logger.
  9278. * src/HttpInitiateConnectionCommand.cc : Use Command::logger.
  9279. * src/FtpInitiateConnectionCommand.cc : Use Command::logger.
  9280. * src/TrackerWatcherCommand.cc : Use Command::logger.
  9281. * src/TrackerUpdateCommand.cc : Use Command::logger.
  9282. * src/TrackerDownloadCommand.cc : Use Command::logger.
  9283. * src/RequestSlotMan.cc (Constructor): Deleted the argument logger.
  9284. Use LogFactory.
  9285. * src/SendMessageQueue.h (Constructor): Deleted the argument logger.
  9286. * src/SendMessageQueue.cc (Constructor): Deleted the argument logger.
  9287. Use LogFactory.
  9288. * src/main.cc (main): Use LogFactory.
  9289. * src/DiskAdaptor.h (logger): New variable.
  9290. * src/DiskAdaptor.cc (Constructor): Use LogFactory.
  9291. * src/CopyDiskAdaptor.cc (fixFilename): Added a log message.
  9292. 2006-04-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9293. * src/TrackerInitCommand.cc (TrackerInitCommand): Added a "key"
  9294. parameter to a tracker request.
  9295. * src/TorrentMan.cc (readFileEntryFromMetaInfoFile): Bug fix.
  9296. * src/TrackerWatcherCommand.cc (execute): Call req->resetTryCount().
  9297. * src/main.cc (setSignalHander): New function.
  9298. (main): Added a handler for SIGTERM.
  9299. (handler): Updated message.
  9300. (torrentHandler): Updated message.
  9301. 2006-04-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9302. * src/TorrentConsoleDownloadEngine.cc
  9303. (onPartialDownloadingCompletes): Renamed as
  9304. onSelectiveDownloadingCompletes.
  9305. (onSelectiveDownloadingCompletes): Updated message.
  9306. To add DiskAdaptor which abstract DiskWriter family:
  9307. * src/PeerConnection.cc: Use diskAdaptor instead of diskWriter.
  9308. * src/PeerInteractionCommand.cc: Use diskAdaptor instead of diskWriter.
  9309. * src/BitfieldMan.cc (isAllBitSet): bug fix.
  9310. * src/TorrentMan.cc : Included CopyDiskAdaptor.h, DirectDiskAdaptor.h,
  9311. MultiDiskAdaptor.h.
  9312. (readFileEntry): Changed its arguments.
  9313. (setup): setupDiskWriter is merged into this function.
  9314. (setupDiskWriter): Removed.
  9315. (setFileFilter): New function.
  9316. (readFileEntryFromMetaInfoFile): Updated according to the changes
  9317. made in readFileEntry.
  9318. (getFilePath): Removed.
  9319. (getTempFilePath): Removed.
  9320. (getSegmentFilePath): Updated due to the removal of getFilePath.
  9321. (fixFilename): Removed.
  9322. (copySingleFile): Removed.
  9323. (splitMultiFile): Removed.
  9324. (deleteTempFile): Removed.
  9325. (setFileEntriesToDownload): Removed.
  9326. (isPartialDownloadingMode): Renamed as isSelectiveDownloadingMode.
  9327. (isSelectiveDownloadingMode): New function.
  9328. (setAllMultiFileRequestedState): Removed.
  9329. (finishPartialDownloadingMode): Renamed as
  9330. finishSelectiveDownloadingMode.
  9331. (finishSelectiveDownloadingMode): New function.
  9332. (getPartialTotalLength): Renamed as getSelectedTotalLength.
  9333. (getSelectedTotalLength): New function.
  9334. (onDownloadComplete): Use diskAdaptor.
  9335. * src/MultiDiskWriter.cc (Constructor): Added the argument pieceLength
  9336. (Range): Removed.
  9337. (setMultiFileEntries): Renamed as setFileEntries.
  9338. (setFileEntries): New function.
  9339. * src/MultiDiskWriter.h [DiskWriterEntry](enabled): Removed.
  9340. (pieceLength): New variable.
  9341. * src/main.cc (printDownloadCompeleteMessage): New function.
  9342. (torrentHandler): Use diskAdaptor instead of diskWriter.
  9343. (main): Renamed torrent-show-files to show-files.
  9344. Rewritten file contents listing.
  9345. * src/TorrentMan.h (FileEntry): Removed.
  9346. (multiFileTopDir): Removed.
  9347. (multiFileEntries): Removed.
  9348. (diskWriter): Removed.
  9349. (diskAdaptor): New variable.
  9350. * src/DefaultDiskWriter.h (totalLength): New variable.
  9351. * src/DefaultDiskWriter.cc (initAndOpenFile): Added ftruncate.
  9352. * src/TorrentDownloadEngine.cc (onEndOfRun): Use diskAdaptor instead of
  9353. diskWriter.
  9354. * src/TorrentConsoleDownloadEngine.h
  9355. (partialDownloadLengthDiff): Renamed as selectedDownloadLengthDiff.
  9356. (partialTotalLength): Renamed as selectedTotalLength.
  9357. * src/AbstractDiskWriter.cc (openFile): If file exists, call
  9358. openExistingFile, otherwise call initAndOpenFile.
  9359. (closeFile): fd > 0, not fd != 0.
  9360. * src/DirectDiskAdaptor.h: New class.
  9361. * src/DirectDiskAdaptor.cc: New class.
  9362. * src/MultiDiskAdaptor.h: New class.
  9363. * src/MultiDiskAdaptor.cc: New class.
  9364. * src/CopyDiskAdaptor.h: New class.
  9365. * src/CopyDiskAdaptor.cc: New class.
  9366. * src/DiskAdaptor.h: New class.
  9367. * src/DiskAdaptor.cc: New class.
  9368. * src/prefs.h (PREF_TORRENT_SHOW_FILES): Renamed as PREF_SHOW_FILES
  9369. (PREF_SHOW_FILES): New definition.
  9370. 2006-04-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9371. To add the ability to download multi torrent into respective files
  9372. directly:
  9373. * src/DiskWriter.h (openFile): New function.
  9374. (seek): Removed.
  9375. * src/MultiDiskWriter.h: New class.
  9376. * src/MultiDiskWriter.cc: New class.
  9377. * src/AbstractDiskWriter.h (seek): Changed its scope from public to
  9378. protected.
  9379. (openFile): New function.
  9380. * src/AbstractDiskWriter.cc (openFile): New function.
  9381. * src/prefs.h (V_FALSE): New definition.
  9382. (PREF_DIRECT_FILE_MAPPING): New definition.
  9383. * src/TorrentMan.h (setupDiskWriter): New function.
  9384. (setAllMultiFileRequestedState): New function.
  9385. (onDownloadComplete): New function.
  9386. * src/TorrentMan.cc : Included MultiDiskWriter.h
  9387. (setupDiskWriter): New function.
  9388. (getFilePath): Updated.
  9389. (getTempFilePath): Updated.
  9390. (getSegmentFilePath): Updated.
  9391. (fixFilename): Updated.
  9392. (deleteTempFile): Updated.
  9393. (setAllMultiFileRequestedState): New function.
  9394. (setFileEntriesToDownload): Use setAllMultiFileRequestedState().
  9395. (finishPartialDownloadingMode): Reset requested flags.
  9396. (onDownloadComplete): New function.
  9397. * src/main.cc: Added --direct-file-mapping option.
  9398. Use TorrentMan::setupDiskWriter().
  9399. * src/TorrentDownloadEngine.cc (afterEachIteration): Use TorrentMan::
  9400. onDownloadComplete().
  9401. To fix ETA bug:
  9402. * src/Util.h (difftvsec): New function.
  9403. * src/Util.cc (difftvsec): New function.
  9404. * src/TorrentConsoleDownloadEngine.cc (calculateSpeed): Use int for the
  9405. type of "elapsed" instead of long long int.
  9406. (calculateStatistics): Use Util::difftvsec instead of Util::difftv.
  9407. The updates of statistics takes place every 1 seconds.
  9408. * src/TorrentConsoleDownloadEngine.h (lastElapsed): Changed its type.
  9409. (calculateSpeed): Changed its argument signature.
  9410. * src/PeerMessage.cc (toString): Fixed message.
  9411. 2006-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9412. To print ETA:
  9413. * src/TorrentDownloadEngine.cc (afterEachIteration): Added download
  9414. completion handling when dealing with
  9415. TorrentMan::isPartialDownloadingMode() == true.
  9416. * src/TorrentDownloadEngine.h (onPartialDownloadingCompletes):
  9417. New function.
  9418. * src/TorrentConsoleDownloadEngine.h (startup): New variable.
  9419. (sessionDownloadLength): New variable.
  9420. (avgSpeed): New variable.
  9421. (eta): New variable.
  9422. * src/TorrentConsoleDownloadEngine.cc (initStatistics): Initialized
  9423. new variables: eta, avgSpeed, startup.
  9424. (calculateSpeed): Calculate average speed and ETA.
  9425. (printStatistics): Added ETA.
  9426. * src/Util.h (secfmt): New function.
  9427. * src/Util.cc (secfmt): New function.
  9428. 2006-04-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9429. To detect "keep alive" flooding:
  9430. * src/PeerInteractionCommand.h (keepAliveCount): New variable
  9431. * src/PeerInteractionCommand.cc (Constructor): Initialized new
  9432. variable: keepAliveCount.
  9433. (detectMessageFlooding): Added "keep alive" flooding detection.
  9434. (receiveMessage): Increase keepAliveCount when "keep alive" message
  9435. received.
  9436. To add the ability to download only specified files in multi-file
  9437. torrent:
  9438. * src/BitfieldMan.h (filterBitfield): New variable.
  9439. (filterEnabled): New variable.
  9440. (setFilterBit): New function.
  9441. (enableFilter): New function.
  9442. (disableFilter): New function.
  9443. (isFilterEnabled): New function.
  9444. (getFilteredTotalLength): New function.
  9445. (getCompletedLength): New function.
  9446. * src/BitfieldMan.cc (Constructor): Initialized new variable:
  9447. filterBitfield, filterEnabled.
  9448. (CopyConstructor): Added filterBitfield and filterEnabled.
  9449. (operator==): Added filterBitfield and filterEnabled.
  9450. (Destructor): Added filterBitfield.
  9451. (getMissingIndex): Use filterBitfield.
  9452. (getMissingUnusedIndex): Use filterBitfield.
  9453. (getFirstMissingUnusedIndex): Use filterBitfield.
  9454. (getFirstMissingUnusedIndex): Use filterBitfield.
  9455. (getAllMissingIndexes): Use filterBitfield.
  9456. (countMissingBlock): Use filterBitfield.
  9457. (countBlock): Use filterBitfield.
  9458. (setBitInternal): Added new argument on.
  9459. (setUseBit): Use setBitInternal.
  9460. (unsetUseBit): Use setBitInternal.
  9461. (setBit): Use setBitInternal.
  9462. (unsetBit): Use setBitInternal.
  9463. (isAllBitSet): Use filterBitfield.
  9464. (setFilterBit): New function.
  9465. (addFilter): New function.
  9466. (enableFilter): New function.
  9467. (disableFilter): New function.
  9468. (clearFilter): New function.
  9469. (isFilterEnabled): New function.
  9470. (getFilteredTotalLength): New function.
  9471. (getCompletedLength): New function.
  9472. * src/TorrentMan.h [FileEntry](Constructor): Updated signature.
  9473. Initalized newly added variables.
  9474. [FileEntry](offset): New variable.
  9475. [FileEntry](extracted): New variable.
  9476. [FileEntry](requested): New variable.
  9477. (readFileEntry): New function.
  9478. (option): New variable.
  9479. (splitMultiFile): Removed const qualifier.
  9480. (fixFilename): Removed const qualifier.
  9481. (readFileEntryFromMetaInfoFile): New function.
  9482. (finishPartialDownloadingMode): New function.
  9483. (isPartialDownloadingMode): New function.
  9484. (setFileEntriesToDownload): New function.
  9485. (getCompletedLength): New function.
  9486. (getPartialTotalLength): New function.
  9487. * src/TorrentMan.cc (readFileEntry): New function.
  9488. (setup): Use readFileEntry. If no-preallocation option is specified,
  9489. use DefaultDiskWriter.
  9490. (readFileEntryFromMetaInfoFile): New function.
  9491. (fixFilename): Removed const qualifier.
  9492. (splitMultiFile): Removed const qualifier.
  9493. (setFileEntriesToDownload): New function.
  9494. (isPartialDownloadingMode): New function.
  9495. (finishPartialDownloadingMode): New function.
  9496. (getCompletedLength): New function.
  9497. (getPartialTotalLength): New function.
  9498. * src/TorrentConsoleDownloadEngine.h (partialDownloadLengthDiff):
  9499. New variable.
  9500. (partialTotalLength): New variable.
  9501. (downloadLength): New variable.
  9502. (totalLength): New variable.
  9503. * src/TorrentConsoleDownloadEngine.cc (onPartialDownloadingCompletes):
  9504. Added log.
  9505. (initStatistics): Initialized new variables: partialDownloadLengthDiff,
  9506. partialTotalLength, downloadLength, totalLength.
  9507. (calculate): Calculate downloadLength and totalLength.
  9508. * src/prefs.h :New definition PREF_NO_PREALLOCATION
  9509. * src/main.cc (addCommand): Changed argument signature.
  9510. (main): Added new variable: args. Added new option "torrent-show-files"
  9511. "no-preallocation". Usage is not updated yet.
  9512. 2006-04-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9513. * src/PeerMessage.cc (setBitfield): Fixed invalid memory de-allocation.
  9514. 2006-04-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9515. Attempt to add the ability to listing file entries in a .torrent file.
  9516. This feature is not yet complete.
  9517. * src/prefs.h (PREF_TORRENT_SHOW_FILES): New definition
  9518. * src/TorrentMan.cc (getMultiFileEntries): New function.
  9519. (getName): New function.
  9520. * src/TorrentMan.h (getMultiFileEntries): New function.
  9521. (getName): New function.
  9522. * src/main.cc (main): Use above 2 funtion.
  9523. * Release 0.3.2
  9524. 2006-03-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9525. * src/PeerInteractionCommand.cc (checkInactiveConnection): New function
  9526. (detectMessageFlooding): Updated threshold value.
  9527. (checkLongTimePeerChoking): Updated timeout value.
  9528. (getNewPieceAndSendInterest): Added debug log.
  9529. * src/PeerInteractionCommand.h (checkInactiveConnection): New function
  9530. * src/TorrentMan.cc (deleteOldErrorPeers): Updated.
  9531. (getPeer): Updated.
  9532. * src/TorrentMan.h: Added MAX_PEER_ERROR.
  9533. * src/PeerAbstractCommand.cc (onAbort): Increment error counter.
  9534. * src/PeerListenCommand.cc (execute): Close connection if incoming peer
  9535. is localhost.
  9536. * src/main.cc (main): Updated PREF_PEER_CONNECTION_TIMEOUT to 60.
  9537. * src/PendingMessage.cc (processMessage): Not to send piece message
  9538. if peer is not interested in the pieces localhost has.
  9539. * src/Peer.cc (shouldChoke): Updated.
  9540. * src/SendMessageQueue.cc (cancelAllRequest): Fixed.
  9541. * src/Util.cc (isPowerOf): New function.
  9542. * src/Util.h (isPowerOf): New function.
  9543. * src/PeerMessageUtil.cc (checkLength): Added a check for length
  9544. whether or not it is power of 2.
  9545. 2006-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9546. Added new class SendMessageQueue that includes PendingMessages and
  9547. RequestSlotMan.
  9548. * src/SendMessageQueue.h: New class.
  9549. * src/SendMessageQueue.cc: New class.
  9550. * src/PendingMessage.h: Added new member variable blockIndex and its
  9551. accessors.
  9552. (createRequestMessage): Updated.
  9553. * src/PendingMessage.cc (createRequestMessage): Updated.
  9554. * src/PeerInteractionCommand.cc (executeInternal): Updated with
  9555. SendMessageQueue.
  9556. (checkLongTimePeerChoking): Updated with SendMessageQueue.
  9557. (receiveMessage): Updated with SendMessageQueue.
  9558. (deletePendingPieceMessage): Removed.
  9559. (getNewPieceAndSendInterest): Updated with SendMessageQueue.
  9560. (sendInterest): Updated with SendMessageQueue.
  9561. (createRequestPendingMessage): Updated with SendMessageQueue.
  9562. (sendMessages): Updated with SendMessageQueue.
  9563. (onAbort): Updated with SendMessageQueue.
  9564. (keepAlive): Updated with SendMessageQueue.
  9565. (beforeSocketCheck): Updated SendMessageQueue.
  9566. * src/PeerInteractionCommand (sendMessages): Shuffle
  9567. missingBLockIndexes before using it.
  9568. Added its own timeout for peer connection.
  9569. * src/PeerAbstractCommand.h: Added member variable timeout and its
  9570. setter.
  9571. * src/prefs.h: Added PREF_PEER_CONNECTION_TIMEOUT.
  9572. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  9573. Added setTimeout() call.
  9574. (executeInternal): Added setTimeout() call.
  9575. * src/PeerAbstractCommand.cc (PeerAbstractCommand):
  9576. Added timeout.
  9577. (isTimeoutDetected): Updated.
  9578. * src/main.cc (main): Added PREF_PEER_CONNECTION_TIMEOUT entry to
  9579. option.
  9580. Added *simple* message flooding checker.
  9581. * src/PeerInteractionCommand.cc (executeInternal):
  9582. Added detectMessageFlooding() call.
  9583. (detectMessageFlooding): New function.
  9584. (receiveMessage): Count up CHOKE, UNCHOKE, HAVE message.
  9585. (beforeSocketCheck): Added detectMessageFlooding() call.
  9586. * src/PeerInteractionCommand.h: Added sendMessageQueue,
  9587. chokeUnchokeCount, haveCount, detectMessageFlooding().
  9588. Removed deletePendingPieceMessage(), getRequestSlot(),
  9589. deleteRequestSlot(), deleteAllRequestSlot().
  9590. * src/PeerInteractionCommand.cc (beforeSocketCheck):
  9591. Added checkLongTimePeerChoking() call.
  9592. * src/RequestSlotMan.h: Renamed deleteTimeoutRequestSlot().
  9593. * src/TorrentMan.cc (addPeer): Delete at most MAX_PEER_LIST_SIZE peers
  9594. if duplicate == false.
  9595. The parameter "uploaded" and "downloaded" in the tracker request are
  9596. the size since the client sent the "started" event to the tracker.
  9597. * src/TorrentMan.cc (setup): Assigned saved downloaded Size and
  9598. uploaded size to preDownloadedSize, preUploadedSize respectively.
  9599. * src/TorrentMan.h: Added preDownloadedSize, preUploadedSize,
  9600. getSessionDownloadedSize(), getSessionUploadedSize().
  9601. * src/TrackerInitCommand.cc (execute): Use getSessionDownloadedSize(),
  9602. getSessionUploadedSize() instead of getDownloadedSize(),
  9603. getUploadedSize().
  9604. * src/PendingMessage.cc (processMessage): Do not send request message
  9605. if the peer is choking the client.
  9606. * src/TrackerUpdateCommand.cc (execute): Check wtheher minInterval is
  9607. less than interval.
  9608. 2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9609. * configure.in: Added gnutls support. Added several CPP macros.
  9610. * m4/openssl.m4: Added.
  9611. * src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
  9612. readData(), peekData(). Added gnutls support.
  9613. * src/HttpDownloadCommand.cc: Removed SleepCommand.h
  9614. * src/TrackerWatcherCommand.{h,cc}: Added. This command creates
  9615. TrackerInitCommand periodicaly(TorrentMan::minInterval).
  9616. * src/TorrentMan.cc: Remove downloadedSize == 0 check from save().
  9617. Instead, added a check for whether setup method has executed
  9618. successfully.
  9619. * src/TorrentMan.h: Added member vaiable setupComplete. Updated
  9620. DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to 300.
  9621. * src/Makefile.am: Updated.
  9622. * src/messageDigest.h: Added. This is a macro calculating SHA1 digest
  9623. using whether OpenSSL or gcrypt, depending on the result of configure
  9624. script.
  9625. * src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by using
  9626. messageDigest.h.
  9627. * src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
  9628. * src/PeerListenCommand.cc: Added log about port binded successfully.
  9629. Fixed memory leak.
  9630. * src/main.cc: Added gnutls support. Replaced LIB_SSL with
  9631. ENABLE_BITTORRENT where they are not related to OpenSSL but BitTorrent.
  9632. Removed instantiation of TrackerInitCommand. Instead,
  9633. TrackerWatcherCommand is instantiated and pushed to the command queue.
  9634. * src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL with
  9635. ENABLE_SSL.
  9636. * src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
  9637. * src/RequestSlotMan.cc (deleteCompletedRequestSlot):
  9638. If a piece is already acquired by another command, delete the request
  9639. slots for the piece.
  9640. * src/TrackerUpdateCommand.cc (execute):
  9641. Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to warn.
  9642. Added a check whether peer list is null.
  9643. Fixed the bug that causes sending completed event to the tracker
  9644. several times.
  9645. * src/TrackerInitCommand.cc (execute):
  9646. Fixed the bug that causes sending completed event to the tracker
  9647. several times.
  9648. * src/AbstractDiskWriter.{h,cc}: Removed direct dependency on OpenSSL
  9649. by using messageDigest.h.
  9650. 2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9651. * PeerConnection.cc: Replaced log message "keep-alive" with
  9652. "keep alive".
  9653. * PeerInteractionCommand.{h,cc}: Close connection if peer is choking
  9654. localhost long time.
  9655. * TorrentMan.cc: When adding new peer with duplicate = true, if the
  9656. number of peer list is equal to or grater than MAX_PEER_LIST, delete
  9657. at most 100 failure entry from the list. If with duplicate = false,
  9658. MAX_PEER_LIST is not checked.
  9659. * PeerListenCommand.cc: Fixed the argument order of log message.
  9660. 2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9661. * Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
  9662. Added warn().
  9663. * SimpleLogger.h: Moved enum LEVEL to Logger.h.
  9664. Implemented warn().
  9665. Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated code.
  9666. 2006-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9667. * Request.h: Added AFTER_COMPLETED event.
  9668. * TorrentDownloadEngine.cc: Prints "Download complete" message
  9669. instead of downloaded size and progress(%) after download completes.
  9670. * PeerInteractionCommand.cc: After download completes, sends unchoke
  9671. message to the peer if it is interested in what localhost has
  9672. downloaded.
  9673. * TorrentMan.cc: In single-file mode, copy temporary file to the final
  9674. destination instead of just renaming it.
  9675. * TorrentMan.cc: Added deleteTempFile().
  9676. * PeerAbstractCommand.cc: do not stop execution after download
  9677. completes. This makes localhost a seeder.
  9678. * Util.{h,cc}: Added fileCopy().
  9679. * PeerListenCommand.cc: do not stop execution after download completes.
  9680. This makes localhost a seeder.
  9681. * main.cc: Do not call TorrentMan::fixFilename() in torrentHandler.
  9682. Added TorrentMan::deleteTempFile() to torrentHandler.
  9683. Initialized the variable dir as ".".
  9684. * TorrentMan.h: Changed DEFAULT_ANNOUNCE_INTERVAL to 120 seconds.
  9685. Deleted renameSingleFile().
  9686. Added copySingleFile(), deleteTempFile().
  9687. * DownloadEngine.h: Added virtual function afterEachIteration().
  9688. * TorrentDownloadEngine.cc: Move a call to TorrentMan::fixFilename()
  9689. in onEndOfRun() to afterEachIteration().
  9690. In onEndOfRun(), changed if condition to check whether filenameFixed is
  9691. true.
  9692. * Util.cc: Implemented fileCopy() using rangedFileCopy().
  9693. In rangedFileCopy(), added try-catch block to properly close file
  9694. descriptors.
  9695. * TorrentDownloadEngine.cc: Added a member variable filenameFixed.
  9696. Added afterEachIteration(), isFilenameFixed().
  9697. * Peer.cc: Changed choking strategy.
  9698. * PreAllocationDiskWriter.cc: Drop O_DIRECT flag.
  9699. * TrackerInitCommand.cc: Send completed event only once.
  9700. * DownloadEngine.cc: Added a call to afterEachIteration().
  9701. * TrackerUpdateCommand.cc: Do not stop execution after download
  9702. completes.
  9703. * TorrentMan.h: Defined MAX_PEER_UPDATE as 15. aria2 attempts to
  9704. connect the peers at most MAX_PEER_UPDATE when a peer list is
  9705. received from a tracker.
  9706. * TrackerUpdateCommand.cc: Implemented above mentioned behavior.
  9707. Decreased the number of failure peers to delete to 0(just comment out
  9708. the line).
  9709. * Release 0.3.1
  9710. 2006-03-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9711. * PeerInteractionCommand.cc: added a call to
  9712. TorrentMan::unadvertisePiece in Destructor.
  9713. * PeerInteractionCommand.cc: make have message sent immediately
  9714. if the size of pending message queue is zero.
  9715. * TorrentMan.cc: set the maximum size of peer list to 250.
  9716. * TorrentMan.h: changed the container type of Peers and UsedPieces
  9717. to deque.
  9718. * Util.cc: fixed rangedFileCopy.
  9719. * AbstractDiskWriter.{h,cc}: moved digest context initialization
  9720. to Constructor. Also, moved digest cleanup to Destructor.
  9721. * MetaFileUtil.cc: fixed memory leak
  9722. * replaced std::vector with std::deque.
  9723. * AbstractCommand.cc: casted timeout value to long long int.
  9724. * ChunkedEncoding.cc: fixed memory leak.
  9725. * PeerInteractionCommand.cc: casted timeout value to long long int.
  9726. * SleepCommand.cc: casted timeout value to long long int.
  9727. * Data.cc: fixed memory leak.
  9728. * Data.cc: fixed toLLInt().
  9729. * BitfieldMan.cc: fixed memory leak.
  9730. * TorrentMan.cc: initialized storeDir to ".".
  9731. * TorrentMan.cc: fixed memory leak.
  9732. * TorrentMan.cc: corrected file paths of splitted files.
  9733. * PeerAbstractCommand.cc: casted timeout to long long int.
  9734. * main.cc: added delete(req) and delete(te->diskWriter).
  9735. * RequestSlot.cc: casted timeout value to long long int.
  9736. * Request.cc: fixed memory leak.
  9737. * PendingMessage.cc: make HAVE messages sent only when peer does not
  9738. have the piece.
  9739. * Peer.{h,cc}: added hasPiece(int index).
  9740. * main.cc: corrected addCommand.
  9741. 2006-03-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9742. * BitTorrent protocol support added.
  9743. * Release 0.3.0
  9744. 2006-03-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9745. * SocketCore.cc: remove the assignment of addrinfo.ai_addr.
  9746. 2006-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9747. * ChunkedEncoding.{h,cc}: fixed the bug that if chunk data is binary,
  9748. decoding did not work properly.
  9749. 2006-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9750. * DownloadEngine.h: included sys/time.h
  9751. * DownloadEngine.cc: remove sys/time.h
  9752. * Makefile.am (SUBDIRS): Add intl.
  9753. * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
  9754. 2006-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9755. * main.cc: correct help message for --http-auth-scheme.
  9756. * main.cc: changed e-mail address for bug reports.
  9757. * ja.po: added japanese translation.
  9758. 2006-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9759. * SimpleLogger.cc: flush log file instead of stdout.
  9760. 2006-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9761. * main.cc: Fixed command-line option: max-tries
  9762. * HttpResponseCommand.cc: Make the request re-sent only if req->seg.sp
  9763. does not equal to seg.sp.
  9764. * DownloadCommand.cc: If EOF is got from the server and the total size
  9765. of file is not zero, then throw DlRetryEx.
  9766. * main.cc: Set the minium value of min-segment-size to 1024.
  9767. * HttpResponseCommand.cc: Fixed the bug that http segmented downloading
  9768. fails because of a regression since 0.2.0 release.
  9769. 2006-03-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9770. * HttpConnection.cc:
  9771. * common.h: defined the user agent name as macro
  9772. * DownloadEngine.{h, cc}:
  9773. * ConsoleDownloadEngine.{h, cc}: Console output message(size, speed)
  9774. is now generated by ConsoleDownloadEngine not by DownloadEngine.
  9775. * main.cc: Download complete/abort message is now generated by main.
  9776. * Makefile.am (SUBDIRS): Add m4.
  9777. (ACLOCAL_AMFLAGS): New variable.
  9778. (EXTRA_DIST): New variable.
  9779. * configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
  9780. * gettext: added gettext functionality
  9781. 2006-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9782. * AbstractCommand.cc:
  9783. * DownloadCommand.{h, cc}: Aborted downloading commands now properly
  9784. unregister its cuid from SegmentMan.
  9785. * DownloadEngine.cc: .aria2 file was written when a downloading
  9786. failed with errors.
  9787. * HttpConnection.cc: Added "Proxy-Connection" header to proxy request.
  9788. Added "User-Agent" header to CONNECT proxy request.
  9789. Fixed "Proxy-Authorization" header. Now proxy authorization works
  9790. properly.
  9791. * Logger.h:
  9792. * SimpleLogger.{h,cc}: Changed the type of msg to const char*.
  9793. * ChunkedEncoding.cc: Added #include directive for strings.h
  9794. * Release 0.2.1
  9795. 2006-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9796. * Util.{h,cc}: added startsWith().
  9797. * CookieBox.cc: rewrited criteriaFind() using Util::startsWith() and
  9798. Util::endsWith().
  9799. * SocketCore.cc: struct addrinfo is now zero-initialized.
  9800. * common.h: added #include directive of limit.h.
  9801. * DownloadEngine.cc: added #include directive of sys/time.h and
  9802. algorithm.
  9803. * Exception.h: added #include directive of stdio.h.
  9804. * AbstractCommand.h: added #include directive of sys/time.h.
  9805. * DownloadCommand.h: added #include directive of sys/time.h.
  9806. * *.h: added #include directive of common.h to all base classes.
  9807. subclasses' one was removed.
  9808. * common.h: defined LONG_LONG_MAX and LONG_LONG_MIN if a compiler
  9809. does not define these macros.
  9810. 2006-02-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9811. * Release 0.2.0
  9812. * main.cc:
  9813. * HttpInitiateConnectionCommand.{h,cc}:
  9814. * prefs.h:
  9815. * HttpConnection.{h,cc}: added --http-proxy-method option.
  9816. We can now use GET command in http proxy.
  9817. 2006-02-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9818. * SplitSlowestSegmentSplitter.{h,cc}: This class provies algorithm
  9819. that splits slowest segment of SegmentMan::commands vector.
  9820. This is the default split algorithm of aria2.
  9821. * SplitFirstSegmentSplitter.{h,cc}: This class provides algorithm
  9822. that splits first segment of SegmentMan::commands vector.
  9823. * SegmentSplitter.{h,cc}: Added. This class provides split algorithm.
  9824. * DownloadCommand.{h,cc}: Added downloading speed calculation.
  9825. * Segment.h:
  9826. * SegmentMan.cc: Added speed field to Segment.h
  9827. * main.cc: -s option now affects all URLs in command-line arguemtns.
  9828. * HttpResponseCommand.cc: Fixed bug that segment file is not loaded.
  9829. * message.h: Change file size related %d to %lld.
  9830. 2006-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9831. * FtpInitiateConnectionCommand.{h,cc}:
  9832. * FtpNegotiationCommand.{h,cc}:
  9833. * FtpDownloadCommand.{h,cc}:
  9834. * FtpConnection.{h,cc}: Added FTP support
  9835. * SimpleLogger.cc: Log message now includes time information.
  9836. * main.cc: The value of --http-auth-scheme option is chagned from
  9837. 'BASIC' to 'basic'
  9838. * main.cc: Added --timeout command-line option.
  9839. * main.cc: Added --min-segment-size command-line option.
  9840. * main.cc: Added --max-retries command-line option.
  9841. * prefs.h: option string constants are now defined in prefs.h
  9842. 2006-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9843. * AbstractCommand.cc: Fixed timeout bug in AbstractCommand
  9844. * SegmentMan.cc: Added totalSize entry to .aria2 file. No compatibility
  9845. with version 0.1.0's one.
  9846. 2006-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9847. * configure.in: Added --enable-ssl option to configure script.
  9848. * HttpConnection.cc: Make Request-URI an absolute path. Some servers
  9849. cannot permit absoluteURI as Request-URI.
  9850. * HttpConnection.cc: Added Referer support.
  9851. * main.cc: Added referer command-line option.
  9852. * main.cc: Added rety-wait command-line option.
  9853. * Exception.h: Fixed formating bug in Exception::setMsg()
  9854. * SocketCore.{h,cc}:
  9855. * Socket.{h, cc}:
  9856. * Request.cc:
  9857. * InitiateConnectionCommandFactory.cc:
  9858. * HttpRequestCommand.cc: Added HTTPS support.
  9859. * SocketCore.{h,cc}: Added SocketCore. Socket becomes a handle class
  9860. for SocketCore.
  9861. * ChunkedEncoding.cc: Fixed bug in ChunkedEncoding: expanding buffer
  9862. size is wrong
  9863. * DownloadCommand.cc: Fixed bug in DownloadCommand: In Chunked
  9864. Encoding, it wrongly adds to Segment.ds buff length from the socket.
  9865. 2006-02-17 Tatsuhiro Tsujikawa <tsujikawa at rednoah dot com>
  9866. * Release 0.1.0