ChangeLog 351 KB

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