ChangeLog 379 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559
  1. 2008-06-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2. Disabled getting size from the response of RETR.
  3. If SIZE command failed, then disable resuming and segmented downloading.
  4. * src/FtpConnection.cc
  5. * src/FtpConnection.h
  6. * src/FtpNegotiationCommand.cc
  7. * src/FtpNegotiationCommand.h
  8. 2008-06-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9. Use digits to find first byte of file size, which makes the intention
  10. of the code clearer.
  11. * src/FtpConnection.cc
  12. Don't call validateTotalLength() when size is 0.
  13. * src/FtpNegotiationCommand.cc
  14. 2008-06-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  15. Updated po files.
  16. * po/aria2c.pot
  17. * po/*.gmo
  18. * po/*.po
  19. 2008-06-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  20. Clarified usage text for --split option.
  21. * src/usage_text.h
  22. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  23. Bump up version number to 0.15.0dev. "dev" means "development"
  24. version, which means I started the development of the next release!
  25. * src/configure.ac
  26. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  27. If FTP server returns negative response with REST raw command and
  28. requested range is not 0, throw exception. If requested range is 0,
  29. continue download a file from 0 byte.
  30. * src/FtpNegotiationCommand.cc
  31. * src/FtpNegotiationCommand.h
  32. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  33. Supported FTP server which don't recognize SIZE raw command.
  34. If SIZE raw command is failed, aria2 will try to get file size
  35. from the response of RETR raw command. If both attempts are failed,
  36. then resuming and segmented downloading are disabled.
  37. * src/FtpConnection.cc
  38. * src/FtpConnection.h
  39. * src/FtpNegotiationCommand.cc
  40. * src/FtpNegotiationCommand.h
  41. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  42. * Release 0.14.0+1
  43. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  44. Bump up version number to 0.14.0+1
  45. * src/configure.ac
  46. 2008-06-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  47. Fixed the code that refers static member variable from non-static
  48. context.
  49. * src/DefaultPeerStorage.cc
  50. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  51. * Release 0.14.0
  52. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  53. Added build test script
  54. * build_test.sh
  55. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  56. Updated ja.po
  57. * src/ja.po
  58. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  59. Bump up version number to 0.14.0
  60. * src/configure.ac
  61. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  62. Updated ja.po and fr.po. Great thanks for french translators and
  63. Sebastien WILLEMIJNS.
  64. * po/fr.po
  65. * po/ja.po
  66. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  67. Added configure option to enable/disable epoll support.
  68. * configure.ac
  69. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  70. Updated man page.
  71. * doc/aria2c.1.txt
  72. * doc/aria2c.1
  73. * doc/aria2c.1.html
  74. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  75. Added missing default value '5' to the usage of --split option.
  76. * src/HelpItemFactory.cc
  77. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  78. Filled up pieces based on the number of missing blocks, rather than
  79. simplay the number of piece * block length.
  80. * src/BtRequestFactory.h
  81. * src/DefaultBtInteractive.cc
  82. * src/DefaultBtInteractive.h
  83. * src/DefaultBtRequestFactory.cc
  84. * src/DefaultBtRequestFactory.h
  85. * src/Piece.cc
  86. * src/Piece.h
  87. * test/BitfieldManTest.cc
  88. * test/DefaultBtRequestFactoryTest.cc
  89. * test/MockBtRequestFactory.h
  90. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  91. Made _epEvents a member variable.
  92. * src/DownloadEngine.cc
  93. * src/DownloadEngine.h
  94. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  95. Cancel download if http redirect is bounded more than 20 times.
  96. * src/AbstractCommand.cc
  97. * src/HttpSkipResponseCommand.cc
  98. * src/Request.cc
  99. * src/Request.h
  100. * test/RequestTest.cc
  101. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  102. Fixed unhandled exception(removed keyword `new').
  103. * src/SocketCore.cc (initEPOLL)
  104. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  105. Removed visit(const MetaEntry*)
  106. * src/MetaEntryVisitor.h:
  107. Added visit(const Data*),visit(const Dictionary*),visit(const List*)
  108. and made them virtual.
  109. * src/BencodeVisitor.h
  110. * src/BencodeVisitor.cc
  111. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  112. Updated po files.
  113. * po/aria2c.pot
  114. * po/*.po
  115. * po/*.gmo
  116. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  117. Moved the call setWriteCheckSocket inside the previous clause to reduce
  118. the number of socket to watch out.
  119. * src/PeerInteractionCommand.cc
  120. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  121. When there is not enough space in disk when writing a chunk of data,
  122. aria2 now prints the message to the console to warn user and aborts
  123. its download. Not all downloads are canceled because some downloads
  124. may use another disk or partition. BUG#1640332
  125. * src/AbstractDiskWriter.cc
  126. * src/PeerAbstractCommand.cc
  127. * src/PeerAbstractCommand.h: Added onFailure() function for override.
  128. * src/PeerInteractionCommand.cc: In onFailure(), call RequestGroup::
  129. setHaltRequested(true) to cancel download.
  130. * src/PeerInteractionCommand.h
  131. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  132. Applied Ross's aria2-0.13.2+1-mingw-5.patch, which changes the type of
  133. socket from int to sock_t as sockets are unsigned in Windows.
  134. For AsyncNameResolver, DownloadEngine, I did additional modification
  135. for the portion of the code changed according to epoll support.
  136. I defined sock_t in a2netcompat.h to use sock_t without including
  137. SocketCore.h.
  138. * src/AsyncNameResolver.cc
  139. * src/AsyncNameResolver.h
  140. * src/DownloadEngine.cc
  141. * src/DownloadEngine.h
  142. * src/SocketCore.cc
  143. * src/SocketCore.h
  144. * src/a2netcompat.h
  145. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  146. Applied Ross's aria2-0.13.2+1-mingw-4.patch. With this change, all
  147. changes in the patch were applied.
  148. * test/DHTConnectionImplTest.cc: Fixed unit test error in MinGW.
  149. * test/DefaultPieceStorageTest.cc: Fixed unit test error in MinGW.
  150. * test/PeerMessageUtilTest.cc: Fixed unit test error in MinGW.
  151. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  152. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this change,
  153. a2io.h and common.h were modified.
  154. * src/a2io.h: Changed seek/stat/tell calls to use 64 bit versions in
  155. MinGW.
  156. * src/common.h: Changed off_t to 64 bit in MinGW.
  157. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  158. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
  159. only a2netcompat.h is modified.
  160. * src/a2netcompat.h: Removed unused getaddrinfo related #define
  161. directives.
  162. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  163. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
  164. only gai_strerror.h is modified.
  165. * src/gai_strerror.h: Fixed gai_strerror() function to report all
  166. winsock errors in MinGW.
  167. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  168. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit, only the
  169. follow sources are applied.
  170. * src/Platform.h: I removed HAVE_WINSOCK2_H directive from Platform.h.
  171. * src/Platform.cc: Moved common setup/teardown code to Platform class.
  172. I moved #endif // HAVE_WINSOCK2_H to the front of #include "DlAbortEx.h"
  173. I included locale.h from Platform.cc.
  174. * src/main.cc: Moved common setup/teardown code to Platform class.
  175. * test/AllTest.cc: Use Platform class.
  176. Set locale to C in AllTest.cc to prevent the messages to be localized.
  177. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  178. Applied Ross's aria2-0.13.2+1-mingw-3.patch.
  179. * test/HttpHeaderTest.cc: Casted to off_t where it should.
  180. * test/HttpRequestTest.cc: Casted to off_t where it should.
  181. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  182. Applied Ross's aria2-0.13.2+1-mingw.patch and
  183. aria2-0.13.2+1-mingw-2.patch.
  184. * src/ConsoleStatCalc.cc: Added HAVE_TERMIOUS_H directive for the
  185. systems which don't have termious.h. I moved the directive inside of
  186. if(isTTY) { ... clause so that line is wiped out without termious.h.
  187. I also removed HAVE_ASCTIME_R clause because asctime_r is provided
  188. anyway.
  189. * src/asctime_r.h
  190. * src/asctime_r.c: Added for the systems don't have asctime_r function.
  191. I added 2nd argument to the prototype declaration.
  192. * src/StringFormat.cc: Get rid of vasprintf.
  193. * src/getaddrinfo.h: Fixed constants.
  194. * configure.ac: Added the check for asctime_r function.
  195. * src/Makefile.am: Added conditional based on HAVE_ASCTIME_R
  196. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  197. Added writable test for Socket when the sending message is in progress.
  198. Usually the sending message is piece message. Without wriable check,
  199. upload latency is dropped to more than 1sec.
  200. * src/PeerInteractionCommand.cc
  201. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  202. Create only requested files and files which shares a piece with
  203. requested file in multi-torrent downloads. Directory structures are
  204. also created in the same rule.
  205. MultiDiskAdaptor::fileExists() now uses FileEntry instead of
  206. DiskWriterEntry as in the previous implementation.
  207. * src/MultiDiskWriter.cc
  208. * src/MultiFileAllocationIterator.cc
  209. * src/MultiFileAllocationIterator.h
  210. * test/MultiFileAllocationIteratorTest.cc
  211. 2008-06-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  212. Commented out -lprofiler
  213. * src/Makefile.am
  214. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  215. Bump up version number to 0.14.0b.
  216. * src/configure.ac
  217. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  218. Actively establish connection to peers in seeding, when peer cache
  219. is not full and max upload speed limit is not reached.
  220. * src/ActivePeerConnectionCommand.cc
  221. * src/ActivePeerConnectionCommand.h
  222. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  223. Always remove a peer from cache in DefaultPeerStorage::returnPeer(),
  224. to make room more fleshy, recently found peers.
  225. Peer::_badConditionStartTime is not used anymore. Consider to remove
  226. it.
  227. * src/DefaultPeerStorage.cc
  228. * test/DefaultPeerStorageTest.cc
  229. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  230. Returns cached data only when the previous receiveHandshake() is called
  231. with peek = true.
  232. * src/PeerConnection.cc (receiveHandshake)
  233. * src/PeerConnection.h (receiveHandshake)
  234. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  235. Changed default value of -s option from 1 to 5.
  236. Also max value of -s option is changed from 5 to 16.
  237. * src/HelpItemFactory.cc
  238. * src/OptionHandlerFactory.cc
  239. * src/option_processing.cc
  240. * src/usage_text.h
  241. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  242. Changed -s options behavior. Now it means the number of connections
  243. made simultaneously in each http/ftp download.
  244. If 1 URL is specified, the behavior is the same with old implementation.
  245. If -s N is given and more than N URLs are specified, first N URLs are
  246. used and remaining URLs are used for backup. If less than N URLs are
  247. specified, some of URLs are used more than once so that totally N
  248. connections are made simultaneously.
  249. * src/main.cc
  250. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  251. Included missing iosfwd or ostream header.
  252. * src/RequestGroupMan.cc
  253. * src/TaggedItem.cc
  254. * src/TaggedItem.h
  255. * src/Util.cc
  256. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  257. * src/HttpHeaderProcessor.cc: Rewritten using std::string as a buffer.
  258. * src/HttpHeaderProcessor.h: Rewritten using std::string as a buffer.
  259. * src/HttpConnection.cc: Included missing sstream.
  260. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  261. Added --bt-max-open-files option.
  262. * src/DefaultPieceStorage.cc
  263. * src/HelpItemFactory.cc
  264. * src/MultiDiskAdaptor.cc
  265. * src/MultiDiskAdaptor.h
  266. * src/OptionHandlerFactory.cc
  267. * src/option_processing.cc
  268. * src/prefs.cc
  269. * src/prefs.h
  270. * src/usage_text.h
  271. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  272. Fixed the bug that aria2 aborts when a path to a directory is given
  273. in command-line.
  274. * src/ProtocolDetector.cc
  275. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  276. Limited the number files opened in each BitTorrent download. The default
  277. value is 100. The option to change this value will be added.
  278. * src/MultiDiskAdaptor.cc
  279. * src/MultiDiskAdaptor.h
  280. * src/MultiFileAllocationIterator.cc
  281. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  282. Fixed the bug that HTTP downloads don't start with old libraries.
  283. * src/HttpHeaderProcessor.cc
  284. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  285. Use empty() instead of size() > 0.
  286. * src/HttpConnection.cc
  287. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  288. Drop connection if the incoming peer ID is the same with localhost's
  289. one. The previous implementation drops connection when incoming peer's
  290. IP address is the same with localhost's one.
  291. * src/PeerListenCommand.cc
  292. * src/DefaultBtInteractive.cc
  293. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  294. Returns cached data without checking whether socket is readable
  295. if the cache is available.
  296. * src/PeerConnection.cc (receiveHandshake)
  297. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  298. Included stdint.h
  299. * src/common.h
  300. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  301. Removed duplicate HAVE_GETTIMEOFDAY
  302. * src/Makefile.am
  303. * src/Makefile.in
  304. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  305. Use interval as a minInterval when minInterval is not supplied.
  306. * src/DefaultBtAnnounce.cc
  307. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  308. Made DEFAULT_ANNOUNCE_INTERVAL 120, so that if first tracker request
  309. attempt is failed, then 2nd attempt get kicked out more quickly.
  310. And it is now static const member of DefaultBtAnnounce.
  311. * src/DefaultBtAnnounce.h
  312. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  313. Renamed BtRuntime::lessThanMinPeers() and BtRuntime::lessThanEqMinPeers.
  314. Made MAX_PEERS and MIN_PEERS static const members of BtRuntime.
  315. * src/ActivePeerConnectionCommand.cc
  316. * src/BtConstants.h
  317. * src/BtRuntime.h
  318. * src/DHTGetPeersCommand.cc
  319. * src/DefaultBtAnnounce.cc
  320. * src/DefaultPeerStorage.cc: Calculate maxPeerListSize based on
  321. BtRuntime::MAX_PEERS.
  322. * src/DefaultPeerStorage.h
  323. * src/InitiatorMSEHandshakeCommand.cc
  324. * src/PeerInitiateConnectionCommand.cc
  325. * src/PeerInteractionCommand.cc
  326. * src/PeerReceiveHandshakeCommand.cc
  327. * src/TrackerWatcherCommand.cc
  328. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  329. Always Connect to _numNewConnection
  330. * src/ActivePeerConnectionCommand.cc
  331. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  332. Made `begin' unsigned int.
  333. * src/GrowSegment.h
  334. * src/Piece.cc
  335. * src/Piece.h
  336. * src/PiecedSegment.cc
  337. * src/PiecedSegment.h
  338. * src/Segment.h
  339. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  340. Calculate piece hash when data is arrived if the data is arrived in
  341. order. This removes additional read operation for hash calculation.
  342. If the data is arrived in out of order, the hash is calucated when the
  343. piece is completed. This is the same behavior as the old implementation.
  344. * src/BtPieceMessage.cc
  345. * src/DefaultBtProgressInfoFile.cc
  346. * src/DefaultPieceStorage.cc
  347. * src/DownloadCommand.cc
  348. * src/DownloadCommand.h
  349. * src/DownloadEngine.cc
  350. * src/GrowSegment.cc
  351. * src/GrowSegment.h
  352. * src/Piece.cc
  353. * src/Piece.h
  354. * src/PiecedSegment.cc
  355. * src/PiecedSegment.h
  356. * src/Segment.h
  357. * test/PieceTest.cc
  358. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  359. Try to keep the ordering of outgoing piece message.
  360. * src/DefaultBtMessageDispatcher.cc
  361. (DefaultBtMessageDispatcher::sendMessages)
  362. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  363. Fixed busy loop when error/hup epoll events occur.
  364. * src/AbstractCommand.cc
  365. * src/PeerAbstractCommand.cc
  366. 2008-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  367. Added --bt-request-peer-speed-limit option, which was a constant
  368. SLOW_SPEED_THRESHOLD.
  369. * src/ActivePeerConnectionCommand.cc
  370. * src/ActivePeerConnectionCommand.h
  371. * src/BtConstants.h
  372. * src/HelpItemFactory.cc
  373. * src/OptionHandlerFactory.cc
  374. * src/PeerReceiveHandshakeCommand.cc
  375. * src/option_processing.cc
  376. * src/prefs.cc
  377. * src/prefs.h
  378. * src/usage_text.h
  379. 2008-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  380. Removed repeated call of getTopDirPath(). Instead, call it once and
  381. cache the result.
  382. * src/MultiDiskAdaptor.cc
  383. * src/MultiDiskAdaptor.h
  384. (mkdir, openFile, initAndOpenFile, openExistingFile)
  385. 2008-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  386. Fixed compile error on debian etch.
  387. The libc6 shipped with debian etch doesn't define ULLONG_MAX properly
  388. even if _GNU_SOURCE is defined. So define ULLONG_MAX in case when
  389. it is undefined.
  390. * src/Util.cc (ULLONG_MAX)
  391. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  392. Added epoll support. Use epoll if it is available. If not, use select.
  393. When async dns is enabled in compile time, epoll support is enabled
  394. only when aria2 is built with c-ares. This condition statement is
  395. defined in a2io.h.
  396. Currently aria2 supports both c-ares and ares, but ares is maintained
  397. for quite a while and debian already has c-ares package, ares support
  398. will be dropped in the future version.
  399. * configure.ac
  400. * src/AbstractCommand.cc
  401. * src/AsyncNameResolver.cc
  402. * src/AsyncNameResolver.h
  403. * src/Command.cc
  404. * src/Command.h
  405. * src/DownloadEngine.cc
  406. * src/DownloadEngine.h
  407. * src/PeerAbstractCommand.cc
  408. * src/SocketCore.cc
  409. * src/SocketCore.h
  410. * src/a2io.h
  411. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  412. * test/MetalinkEntryTest.cc: Added missing `defined' keyword to #if
  413. directive.
  414. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  415. Do not do write operation to /dev/null file.
  416. * src/LogFactory.cc
  417. * src/SimpleLogger.cc
  418. Replaced vasprintf with vsnprintf
  419. * src/SimpleLogger.cc (SimpleLogger::writeLog)
  420. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  421. * src/BtRequestMessage.cc
  422. (BtRequestMessage::onQueue): Given piece to RequestSlot. This is a fix
  423. for segmentation fault caused by previous commit.
  424. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  425. Reduced the usage of gettimeofday().
  426. * src/DefaultBtMessageDispatcher.cc
  427. (DefaultBtMessageDispatcher::checkRequestSlotAndDoNecessaryThing)
  428. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  429. * src/RequestSlot.cc
  430. * src/RequestSlot.h
  431. (RequestSlot::isTimeout)
  432. Made RequestSlot have a reference to Piece object to avoid find
  433. Piece repeatedly.
  434. * src/DefaultBtMessageDispatcher.cc
  435. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  436. * src/RequestSlot.cc
  437. * src/RequestSlot.h
  438. (RequestSlot::getPiece)
  439. * test/DefaultBtMessageDispatcherTest.cc
  440. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  441. * src/TimeA2.cc
  442. * src/TimeA2.h
  443. (Time::difference): New function.
  444. (Time::elapsed): Done optimization.
  445. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  446. * src/HelpItemFactory.cc: Added missing `defined' keyword to #if
  447. directive.
  448. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  449. * src/option_processing.cc: Added missing `defined' keyword to #if
  450. directive.
  451. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  452. Bump up version number to 0.13.2+1
  453. * src/configure.ac
  454. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  455. Refactored broken outstanding piece handling.
  456. * src/DefaultPieceStorage.cc
  457. * src/DefaultPieceStorage.h
  458. * src/Piece.cc
  459. * src/Piece.h
  460. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  461. Fixed compile error on Mac OS X 10.3.9. This error was caused by the
  462. name collision of static variable and predefined macro.
  463. * src/BtContext.cc
  464. * src/BtContext.h
  465. * src/CookieBoxFactory.cc
  466. * src/CookieBoxFactory.h
  467. * src/CookieParser.cc
  468. * src/CookieParser.h
  469. * src/DefaultBtContext.cc
  470. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  471. * src/RequestGroup.cc
  472. (RequestGroup::createInitialCommand): Use empty() instead of size().
  473. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  474. * Release 0.13.2
  475. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  476. Updated fr.po(thanks to Sebastien) and ja.po. ThanksDone make update-po
  477. * po/fr.po
  478. * po/ja.po
  479. * po/aria2c.pot
  480. * po/*.po
  481. * po/*.gmo
  482. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  483. Bump up version number to 0.13.2
  484. * src/configure.ac
  485. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  486. Refactord.
  487. * src/RequestGroupMan.cc
  488. (removeStoppedGroup)
  489. (fillRequestGroupFromReserver)
  490. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  491. Fixed compile error on Ubuntu.
  492. * src/BtPieceMessage.cc
  493. * src/MessageDigestHelper.cc
  494. * src/Util.cc
  495. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  496. Fixed compile error when configured with --disable-bittorrent
  497. * test/DownloadHandlerFactoryTest.cc
  498. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  499. Done make update-po
  500. * po/aria2c.pot
  501. * po/*.po
  502. * po/*.gmo
  503. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  504. Bump up version number to 0.13.2rc.
  505. * src/configure.ac
  506. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  507. Made option name bold. Updated SYNOPSIS to make it more readable.
  508. * doc/aria2c.1.txt
  509. * doc/aria2c.1
  510. * doc/aria2c.1.html
  511. * src/version_usage.cc
  512. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  513. Refactored. Use std::string instead of size and char*.
  514. * Data.cc
  515. * Data.h
  516. * test/Data.cc
  517. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  518. Added trimSelf(). Rewritten trim() to use trimSelf().
  519. * Util.cc
  520. * Util.h
  521. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  522. * src/ChunkChecksum.h (getChecksum): Return const reference.
  523. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  524. Fixed compile error when configured with --disable-metalink.
  525. Also moved test/DownloadHandlerFactoryTest.cc to SRC in Makefile.am.
  526. * test/FeatureConfigTest.cc
  527. * test/DownloadHandlerFactoryTest.cc
  528. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  529. Fixed compile error when configured with --without-gnutls
  530. --without-openssl
  531. * src/main.cc
  532. * test/DefaultBtProgressInfoFileTest.cc
  533. * test/SegmentManTest.cc
  534. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  535. Fixed compile error with OpenSSL.
  536. * src/IteratableChunkChecksumValidator.cc
  537. * src/LibsslDHKeyExchange.h
  538. * src/MessageDigestHelper.cc
  539. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  540. Revert the default value of --max-concurrent-downloads to 5.
  541. Revert the default value of --metalink-servers to 5.
  542. Man pages was also updated.
  543. * src/option_processing.cc
  544. * doc/aria2c.1.txt
  545. * doc/aria2c.1.html
  546. * doc/aria2c.1
  547. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  548. Returns const reference:
  549. DownloadContext::getPieceHash, DownloadContext::getName,
  550. DownloadContext::getPieceHashAlgo, DownloadContext::getDir,
  551. BtContext::getInfoHashAsString,
  552. * src/BtContext.h
  553. * src/DefaultBtContext.cc
  554. * src/DefaultBtContext.h
  555. * src/DownloadContext.h
  556. * src/SingleFileDownloadContext.h
  557. * test/MockBtContext.h
  558. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  559. * src/RequestGroup.h (getDir): Removed.
  560. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  561. Returns const reference. The internal urlencode function was optimized
  562. a little bit.
  563. * src/Request.cc
  564. * src/Request.h
  565. * src/HttpRequest.cc
  566. * src/HttpRequest.h
  567. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  568. Defined option name and possible values as std::string to reduce
  569. temporary string object creation in runtime.
  570. * src/HelpItemFactory.cc
  571. * src/LogFactory.cc
  572. * src/Option.cc
  573. * src/OptionHandlerFactory.cc
  574. * src/option_processing.cc
  575. * src/prefs.cc
  576. * src/prefs.h
  577. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  578. Return const reference.
  579. * src/DownloadHandlerConstants.cc
  580. * src/DownloadHandlerConstants.h
  581. (getMetalinkExtensions)
  582. (getMetalinkContentTypes)
  583. (getBtExtensions)
  584. (getBtContentTypes)
  585. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  586. * src/HttpHeader.cc (get): Rewritten.
  587. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  588. Make HttpHeader::getFirst(...) return const reference.
  589. * src/HttpHeader.cc
  590. * src/HttpHeader.h
  591. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  592. Use Option::getAsBool(...) instead of Option::get(...) and compare
  593. it with V_TRUE.
  594. * src/DefaultPieceStorage.cc
  595. * src/DownloadCommand.cc
  596. * src/FtpNegotiationCommand.cc
  597. * src/HttpRequest.cc
  598. * src/InitiateConnectionCommand.cc
  599. * src/RequestGroup.cc
  600. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  601. Made Option::get(...) return const reference of std::string.
  602. * src/Option.cc
  603. * src/Option.h
  604. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  605. Replaced std:copy with insert.
  606. * src/DefaultBtMessageDispatcher.cc
  607. * src/DefaultPieceStorage.cc
  608. * src/DownloadEngineFactory.cc
  609. * src/RequestGroup.cc
  610. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  611. Included SocketCore.h to fix compiler warning.
  612. * src/InitiateConnectionCommand.cc
  613. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  614. Put piece selection strategy algorithm to RarestPieceSelector class,
  615. Added a switch to choose whether randomized selection so that unit
  616. tests emit same results in, possibly, win32.
  617. * src/DefaultPieceStorage.cc
  618. * src/DefaultPieceStorage.h
  619. * src/RarestPieceSelector.cc
  620. * src/RarestPieceSelector.h
  621. * test/DefaultPieceStorageTest.cc
  622. * test/RarestPieceSelectorTest.cc
  623. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  624. Don't pool connection if HTTP proxy is enabled.
  625. * src/FtpFinishDownloadCommand.cc
  626. * src/FtpNegotiationCommand.cc
  627. * src/HttpSkipResponseCommand.cc
  628. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  629. Don't add closed socket to DownloadEngine::addSocketForReadCheck()
  630. * src/AbstractCommand.cc
  631. * src/AbstractCommand.h
  632. * src/ActivePeerConnectionCommand.cc
  633. * src/FtpInitiateConnectionCommand.cc
  634. * src/HttpInitiateConnectionCommand.cc
  635. * src/InitiateConnectionCommandFactory.cc
  636. * src/PeerAbstractCommand.cc
  637. * src/PeerAbstractCommand.h
  638. * src/PeerInitiateConnectionCommand.cc
  639. * src/TrackerWatcherCommand.cc
  640. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  641. Sort RequestSlot in ascending order and manipulate them using
  642. lower_bound.
  643. * src/DefaultBtMessageDispatcher.cc
  644. * src/DefaultBtMessageDispatcher.h
  645. (getMessageQueue): Added const qualifier.
  646. (getRequestSlots): Added const qualifier.
  647. (sendMessages): Use empty() instead of size().
  648. (doCancelSendingPieceAction): Use HandleEvent object.
  649. (doAbortOutstandingRequestAction): Rewritten.
  650. (doChokedAction): Rewritten.
  651. (checkRequestSlotAndDoNecessaryThing): Rewritten.
  652. (isOutstandingRequest): Rewritten.
  653. (getOutstandingRequest): Rewritten.
  654. (removeOutstandingRequest): Rewritten.
  655. (addOutstandingRequest): Rewritten.
  656. * src/RequestSlot.cc
  657. * src/RequestSlot.h
  658. (operator=): Rewritten.
  659. (operator!=): New function.
  660. (operator<): New function.
  661. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  662. * src/DefaultBtRequestFactory.cc
  663. (doChokedAction): Rewritten.
  664. (removeCompletedPiece): Rewritten.
  665. (removeTargetPiece): Rewritten.
  666. (createRequestMessages): Added the debug log.
  667. (createRequestMessagesOnEndGame: Added the debug log.
  668. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  669. Added the debug log message.
  670. * src/BtPieceMessage.cc (doReceivedAction)
  671. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  672. Sorted DHTPeerAnnounceEntry in a ascending order of info hash and
  673. used lower_bound to process them rather than linear search.
  674. * src/DHTPeerAnnounceStorage.cc
  675. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  676. Call subtractPieceStats from ~PeerInteractionCommand only when the
  677. peer has at least one completed piece.
  678. * src/Peer.cc
  679. * src/Peer.h
  680. * src/PeerInteractionCommand.cc
  681. * src/PeerSessionResource.cc
  682. * src/PeerSessionResource.h
  683. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  684. Removed unnecessary sorting
  685. * src/DefaultPieceStorage (DefaultPieceStorage)
  686. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  687. Rewritten the portion of the code that mangaes allowed fast indexes.
  688. * src/PeerSessionResource.cc
  689. * src/PeerSessionResource.h
  690. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  691. Removed the invalid string including '\r' from ru.po and
  692. did make update-po.
  693. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  694. Added --log-level and --summary-interval to man page.
  695. * doc/aria2c.1.txt
  696. * doc/aria2c.1.html
  697. * doc/aria2c.1
  698. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  699. Added --log-level option to specify log level. Log messages under
  700. the specified level are not output. Default value is `debug'.
  701. * src/HelpItemFactory.cc
  702. * src/LogFactory.cc
  703. * src/LogFactory.h
  704. * src/Logger.h
  705. * src/OptionHandlerFactory.cc
  706. * src/SimpleLogger.cc
  707. * src/SimpleLogger.h
  708. * src/main.cc
  709. * src/option_processing.cc
  710. * src/prefs.h
  711. * src/usage_text.h
  712. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  713. Print download progress summary of all parallel downloads in specified
  714. interval, default 60 secs. While aria2 could download several files
  715. in parallel (see -j option), it displayed just first download progress,
  716. and the other downloads are hidden from the users. This new feature
  717. prints all downloads currently in-progress to the console so that you
  718. can check the status of all downloads. The interval can be adjusted
  719. by --summary-interval option.
  720. The progress readout is now cut so that all fits in the one line of
  721. console.
  722. * src/ConsoleStatCalc.cc
  723. * src/ConsoleStatCalc.h
  724. * src/HelpItemFactory.cc
  725. * src/OptionHandlerFactory.cc
  726. * src/RequestGroupMan.cc
  727. * src/RequestGroupMan.h
  728. * src/main.cc
  729. * src/option_processing.cc
  730. * src/prefs.h
  731. * src/usage_text.h
  732. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  733. Call updateFdSet() to initialize rfdset, wfdset fdmax.
  734. * src/DownloadEngine.cc (DownloadEngine)
  735. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  736. Use free() to deallocate memory for _buffer if HAVE_POSIX_MEMALIGN is
  737. defined.
  738. * src/SingleFileAllocationIterator.cc (~SingleFileAllocationIterator)
  739. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  740. Use erase+lower_bound+insert instead of sort.
  741. * src/DefaultPieceStorage.cc (addPieceStats)
  742. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  743. Use A2STR::SHARP_C and A2STR::EQUAL_C.
  744. * src/A2STR.cc
  745. * src/A2STR.h
  746. * src/OptionParser.cc (parse)
  747. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  748. Defined fake filename `[tracker.announce]' as static const std::string.
  749. * src/TrackerWatcherCommand.cc (createRequestGroup)
  750. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  751. Defined default filename `index.html' as static const std::string
  752. * src/SingleFileDownloadContext.cc
  753. * src/SingleFileDownloadContext.h
  754. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  755. Defined "[MEMORY]" as static const std::string.
  756. * src/MemoryBufferPreDownloadHandler.cc (execute)
  757. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  758. Defined control file's version number as static const std::string.
  759. * src/DefaultBtProgressInfoFile.cc
  760. * src/DefaultBtProgressInfoFile.h
  761. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  762. Use Request::METHOD_GET
  763. * src/RequestGroup.cc (createNextCommandWithAdj)
  764. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  765. Defined "OK", "ERR", "INPR" as static const std::string
  766. * src/RequestGroupMan.cc (showDownloadResults)
  767. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  768. Defined default client used in extended handshake as static const
  769. std::string
  770. * src/DefaultBtInteractive.cc (addHandshakeExtendedMessageToQueue)
  771. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  772. Defined AUTH_HEADER, PROXY_AUTH_HEADER as static const std::string
  773. * src/HttpConnection.cc (eraseConfidentialInfo)
  774. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  775. Defined default ftp user and password as static const std::string
  776. * src/AuthConfigFactory.cc
  777. * src/AuthConfigFactory.h
  778. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  779. Defined strings used in netrc as static const std::string
  780. * src/Netrc.cc
  781. * src/Netrc.h
  782. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  783. Defined HTTP status as static const std::string
  784. * src/AbstractProxyResponseCommand.cc
  785. * src/HttpHeader.cc
  786. * src/HttpHeader.h
  787. * src/HttpResponse.cc
  788. * src/HttpResponseCommand.cc
  789. * src/HttpSkipResponseCommand.cc
  790. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  791. Defined "\r\n", "A", "I" as static const std::string
  792. * src/A2STR.cc
  793. * src/A2STR.h
  794. * src/FtpConnection.cc
  795. * src/FtpConnection.h
  796. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  797. Added COLON_C(".") and used it in Request::parseUrl()
  798. * src/A2STR.cc
  799. * src/A2STR.h
  800. * src/Request.cc (parseUrl)
  801. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  802. Changed the type of padName from `const std::string&' to `const char*'.
  803. * src/MSEHandshake.cc (verifyPadLength)
  804. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  805. Defined "sha1" as static const std::string.
  806. * src/MetalinkParserController.cc
  807. * src/MetalinkParserController.h
  808. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  809. Defined message digest algorithm name as static const std::string
  810. * src/DHTTokenTracker.cc
  811. * src/DHTUtil.cc
  812. * src/DefaultBtContext.cc
  813. * src/MSEHandshake.cc
  814. * src/MessageDigestHelper.cc
  815. * src/Peer.cc
  816. * src/messageDigest.cc
  817. * src/messageDigest.h
  818. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  819. Made string literals used in SAX parser static const std::string.
  820. * src/FileMetalinkParserState.cc
  821. * src/FileMetalinkParserState.h
  822. * src/FilesMetalinkParserState.cc
  823. * src/FilesMetalinkParserState.h
  824. * src/InitialMetalinkParserState.cc
  825. * src/InitialMetalinkParserState.h
  826. * src/MetalinkMetalinkParserState.cc
  827. * src/MetalinkMetalinkParserState.h
  828. * src/PiecesMetalinkParserState.cc
  829. * src/PiecesMetalinkParserState.h
  830. * src/ResourcesMetalinkParserState.cc
  831. * src/ResourcesMetalinkParserState.h
  832. * src/VerificationMetalinkParserState.cc
  833. * src/VerificationMetalinkParserState.h
  834. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  835. Use A2STR::SLASH_C, A2STR::DOT_C instead of "/", "." respectively.
  836. * src/A2STR.cc
  837. * src/A2STR.h
  838. * src/File.cc
  839. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  840. Defined static const std::string IP("ip"), PORT("port") and use them
  841. instead of string literals.
  842. * src/DefaultPeerListProcessor.cc
  843. * src/DefaultPeerListProcessor.h
  844. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  845. Made string literals for torrent file processing static const
  846. std::string.
  847. * src/BtContext.cc
  848. * src/BtContext.h
  849. * src/DefaultBtContext.cc
  850. * src/DefaultBtContext.h
  851. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  852. Made string literal for tracker response static const std::string
  853. * src/BtAnnounce.cc
  854. * src/BtAnnounce.h
  855. * src/DefaultBtAnnounce.cc
  856. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  857. Use DHTMessage::T instead of "t".
  858. * src/DHTMessageTracker.cc (messageArrived)
  859. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  860. Made keyName static const. Made trimmed charset static const
  861. std::string.
  862. * src/Util.cc (getContentDispositionFilename)
  863. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  864. Made USER_AGENT const. Made "/" static const std::string.
  865. * src/A2STR.cc
  866. * src/A2STR.h
  867. * src/HttpRequest.cc
  868. * src/HttpRequest.h
  869. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  870. Made string listeral to static const std::string:
  871. "Content-Range", "Content-Length"
  872. * src/HttpHeader.cc
  873. * src/HttpHeader.h
  874. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  875. Made string listeral to static const std::string.
  876. * src/HttpConnection.cc
  877. * src/HttpHeader.cc
  878. * src/HttpHeader.h
  879. * src/HttpResponse.cc
  880. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  881. Made string listeral to static const std::string.
  882. * src/A2STR.cc
  883. * src/A2STR.h
  884. * src/SimpleLogger.cc
  885. * src/SimpleLogger.h
  886. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  887. Made string literal to static const std::string.
  888. Rewritten CookieParser::setField.
  889. * src/A2STR.cc
  890. * src/A2STR.h
  891. * src/CookieBoxFactory.cc
  892. * src/CookieBoxFactory.h
  893. * src/CookieParser.cc
  894. * src/CookieParser.h
  895. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  896. Made string literal to static const std::string
  897. * src/DHTAbstractMessage.cc
  898. * src/DHTAnnouncePeerMessage.cc
  899. * src/DHTAnnouncePeerMessage.h
  900. * src/DHTAnnouncePeerReplyMessage.cc
  901. * src/DHTAnnouncePeerReplyMessage.h
  902. * src/DHTFindNodeMessage.cc
  903. * src/DHTFindNodeMessage.h
  904. * src/DHTFindNodeReplyMessage.cc
  905. * src/DHTFindNodeReplyMessage.h
  906. * src/DHTGetPeersMessage.cc
  907. * src/DHTGetPeersMessage.h
  908. * src/DHTGetPeersReplyMessage.cc
  909. * src/DHTGetPeersReplyMessage.h
  910. * src/DHTMessage.cc
  911. * src/DHTMessage.h
  912. * src/DHTMessageFactoryImpl.cc
  913. * src/DHTMessageReceiver.cc
  914. * src/DHTPingMessage.cc
  915. * src/DHTPingMessage.h
  916. * src/DHTPingReplyMessage.cc
  917. * src/DHTPingReplyMessage.h
  918. * src/DHTQueryMessage.cc
  919. * src/DHTQueryMessage.h
  920. * src/DHTResponseMessage.cc
  921. * src/DHTResponseMessage.h
  922. * src/DHTUnknownMessage.cc
  923. * src/DHTUnknownMessage.h
  924. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  925. Made string literal to static const std::string
  926. * src/BtChokeMessage.cc (toString)
  927. * src/BtHaveAllMessage.cc (toString)
  928. * src/BtHaveNoneMessage.cc (toString)
  929. * src/BtInterestedMessage.cc (toString)
  930. * src/BtNotInterestedMessage.cc (toString)
  931. * src/BtUnchokeMessage.cc (toString)
  932. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  933. Replaced "" with static const variable A2STR::NIL.
  934. Replaced string comparison against "" with std::string::empty().
  935. Added PROTO_* to Request class and use them as a protocol string
  936. constant.
  937. Made "started", "stopped", "completed" static const variable in
  938. AnnounceList class.
  939. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  940. Updated translations. Great thanks to translators.
  941. * po/ca.po
  942. * po/de.po
  943. * po/fr.po
  944. * po/it.po
  945. * po/ja.po
  946. * po/ru.po
  947. * po/zh_CN.po
  948. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  949. Updated man page; categorized options and fixed typo.
  950. * doc/aria2c.1.txt
  951. * doc/aria2c.1.html
  952. * doc/aria2c.1
  953. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  954. Removed const ref
  955. * src/MetalinkEntry.cc (AddProtocolPreference)
  956. * src/RequestGroup.cc (FindServerHostByHostname)
  957. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  958. Rewritten Accept-Features handling.
  959. * src/HttpRequestCommand.cc (createHttpRequest)
  960. * src/a2functional.h
  961. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  962. Changed method signature:
  963. DHTAbstractNodeLookupTask::toEntries
  964. * src/DHTAbstractNodeLookupTask.cc
  965. * src/DHTAbstractNodeLookupTask.h
  966. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  967. Changed method signature:
  968. BtContext::computeFastSet, DefaultBtContext::extractUrlList
  969. * src/BtContext.h
  970. * src/DefaultBtContext.cc
  971. * src/DefaultBtContext.h
  972. * src/DefaultBtInteractive.cc
  973. * test/DefaultBtContextTest.cc
  974. * test/MockBtContext.h
  975. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  976. Changed method signature:
  977. MultiFileAllocationIterator::makeDiskWriterEntries
  978. * src/MultiFileAllocationIterator.cc
  979. * src/MultiFileAllocationIterator.h
  980. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  981. Changed method sinature:
  982. MetalinkEntry::toFileEntry,
  983. MetalinkHelper::query, MetalinkHelper::parseAndQuery,
  984. Metalinker::queryEntry
  985. * src/Metalink2RequestGroup.cc
  986. * src/MetalinkEntry.cc
  987. * src/MetalinkEntry.h
  988. * src/MetalinkHelper.cc
  989. * src/MetalinkHelper.h
  990. * src/Metalinker.cc
  991. * src/Metalinker.h
  992. * src/main.cc
  993. * test/MetalinkHelperTest.cc
  994. * test/MetalinkerTest.cc
  995. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  996. Changed method sinature:
  997. RequestGroup::getURIs
  998. * src/RequestGroup.cc
  999. * src/RequestGroup.h
  1000. * test/Metalink2RequestGroupTest.cc
  1001. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1002. Changed method signature:
  1003. PeerListProcessor::extractPeer
  1004. * src/CompactPeerListProcessor.cc
  1005. * src/CompactPeerListProcessor.h
  1006. * src/DefaultBtAnnounce.cc
  1007. * src/DefaultPeerListProcessor.cc
  1008. * src/DefaultPeerListProcessor.h
  1009. * src/DelegatingPeerListProcessor.cc
  1010. * src/DelegatingPeerListProcessor.h
  1011. * src/PeerListProcessor.h
  1012. * src/UTPexExtensionMessage.cc
  1013. * test/DefaultPeerListProcessorTest.cc
  1014. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1015. Changed method signature:
  1016. BtRequestFactory::createRequestMessages,
  1017. BtRequestFactory::createRequestMessagesOnEndGame
  1018. * src/BtRequestFactory.h
  1019. * src/DefaultBtInteractive.cc
  1020. * src/DefaultBtRequestFactory.cc
  1021. * src/DefaultBtRequestFactory.h
  1022. * test/DefaultBtRequestFactoryTest.cc
  1023. * test/MockBtRequestFactory.h
  1024. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1025. Changed method signature:
  1026. PieceStorage::getInFlightPieces
  1027. * src/DefaultBtProgressInfoFile.cc
  1028. * src/DefaultPieceStorage.cc
  1029. * src/DefaultPieceStorage.h
  1030. * src/PieceStorage.h
  1031. * src/UnknownLengthPieceStorage.cc
  1032. * src/UnknownLengthPieceStorage.h
  1033. * test/DefaultBtProgressInfoFileTest.cc
  1034. * test/MockPieceStorage.h
  1035. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1036. Changed method signature:
  1037. PostDownloadHandler::getNextRequestGroups
  1038. Metalink2RequestGroup::generate
  1039. RequestGroup::postDownloadProcessing
  1040. * src/BtPostDownloadHandler.cc
  1041. * src/BtPostDownloadHandler.h
  1042. * src/Metalink2RequestGroup.cc
  1043. * src/Metalink2RequestGroup.h
  1044. * src/MetalinkPostDownloadHandler.cc
  1045. * src/MetalinkPostDownloadHandler.h
  1046. * src/PostDownloadHandler.h
  1047. * src/RequestGroup.cc
  1048. * src/RequestGroup.h
  1049. * src/RequestGroupMan.cc
  1050. * src/main.cc
  1051. * test/BtPostDownloadHandlerTest.cc
  1052. * test/Metalink2RequestGroupTest.cc
  1053. * test/MetalinkPostDownloadHandlerTest.cc
  1054. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1055. Rewritten AccRequestGroup
  1056. * src/main.cc
  1057. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1058. Rewritten.
  1059. * src/TaggedItem.cc (toTagString)
  1060. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1061. Rewritten Accept-Features handling.
  1062. * src/HttpRequestCommand.cc (createHttpRequest)
  1063. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1064. Rewritten accept types handling.
  1065. * HttpRequest.cc (createRequest)
  1066. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1067. Rewritten
  1068. * src/FeatureConfig.cc (featureSummary)
  1069. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1070. Changed method signature:
  1071. PeerStorage::getActivePeers
  1072. * src/DHTPeerAnnounceEntry.cc
  1073. * src/DefaultPeerStorage.cc
  1074. * src/DefaultPeerStorage.h
  1075. * src/PeerStorage.h
  1076. * test/DefaultPeerStorageTest.cc
  1077. * test/MockPeerStorage.h
  1078. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1079. Changed method signature:
  1080. DHTPeerAnnounceStorage::getPeers,
  1081. DHTPeerAnnounceEntry::getPeers
  1082. * src/DHTGetPeersMessage.cc
  1083. * src/DHTPeerAnnounceEntry.cc
  1084. * src/DHTPeerAnnounceEntry.h
  1085. * src/DHTPeerAnnounceStorage.cc
  1086. * src/DHTPeerAnnounceStorage.h
  1087. * test/DHTAnnouncePeerMessageTest.cc
  1088. * test/DHTPeerAnnounceEntryTest.cc
  1089. * test/DHTPeerAnnounceStorageTest.cc
  1090. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1091. Changed method signature:
  1092. NameResolver::resolve
  1093. * src/DHTEntryPointNameResolveCommand.cc
  1094. * src/InitiateConnectionCommand.cc
  1095. * src/NameResolver.cc
  1096. * src/NameResolver.h
  1097. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1098. Changed method signature:
  1099. PieceStorage::getAdvertisedPieceIndexes
  1100. * src/DefaultBtInteractive.cc
  1101. * src/DefaultPieceStorage.cc
  1102. * src/DefaultPieceStorage.h
  1103. * src/PieceStorage.h
  1104. * src/UnknownLengthPieceStorage.h
  1105. * test/MockPieceStorage.h
  1106. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1107. Changed method signature:
  1108. SegmentMan::getInFlightSegment
  1109. * src/AbstractCommand.cc
  1110. * src/SegmentMan.cc
  1111. * src/SegmentMan.h
  1112. * test/SegmentManTest.cc
  1113. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1114. Changed method signature:
  1115. DHTAbstractNodeLookupTask::getNodesFromMessage
  1116. * src/DHTAbstractNodeLookupTask.cc
  1117. * src/DHTAbstractNodeLookupTask.h
  1118. * src/DHTNodeLookupTask.cc
  1119. * src/DHTNodeLookupTask.h
  1120. * src/DHTPeerLookupTask.cc
  1121. * src/DHTPeerLookupTask.h
  1122. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1123. Pass std::deque<Command*> by reference to avoid unnecessary coping.
  1124. * src/AbstractCommand.cc
  1125. * src/BtCheckIntegrityEntry.cc
  1126. * src/BtCheckIntegrityEntry.h
  1127. * src/BtFileAllocationEntry.cc
  1128. * src/BtFileAllocationEntry.h
  1129. * src/BtSetup.cc
  1130. * src/BtSetup.h
  1131. * src/CheckIntegrityCommand.cc
  1132. * src/CheckIntegrityEntry.h
  1133. * src/ChecksumCheckIntegrityEntry.cc
  1134. * src/ChecksumCheckIntegrityEntry.h
  1135. * src/DHTSetup.cc
  1136. * src/DHTSetup.h
  1137. * src/DownloadEngine.cc
  1138. * src/FileAllocationCommand.cc
  1139. * src/FileAllocationEntry.h
  1140. * src/RequestGroup.cc
  1141. * src/RequestGroup.h
  1142. * src/RequestGroupMan.cc
  1143. * src/RequestGroupMan.h
  1144. * src/StreamCheckIntegrityEntry.cc
  1145. * src/StreamCheckIntegrityEntry.h
  1146. * src/StreamFileAllocationEntry.cc
  1147. * src/StreamFileAllocationEntry.h
  1148. * src/TrackerWatcherCommand.cc
  1149. * src/a2functional.h
  1150. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1151. Changed method signature:
  1152. BNode::findClosestKNodes, BNode:: enumerateBucket,
  1153. DHTBucket::getGoodNodes,
  1154. DHTRoutingTable::getClosestKNodes, DHTRoutingTable::getBuckets
  1155. * src/BNode.cc
  1156. * src/BNode.h
  1157. * src/DHTAbstractNodeLookupTask.cc
  1158. * src/DHTAutoSaveCommand.cc
  1159. * src/DHTBucket.cc
  1160. * src/DHTBucket.h
  1161. * src/DHTBucketRefreshTask.cc
  1162. * src/DHTFindNodeMessage.cc
  1163. * src/DHTGetPeersMessage.cc
  1164. * src/DHTRoutingTable.cc
  1165. * src/DHTRoutingTable.h
  1166. * test/BNodeTest.cc
  1167. * test/DHTBucketTest.cc
  1168. * test/DHTRoutingTableTest.cc
  1169. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1170. In piece selection functions, Pass std::deque<...> by reference rather
  1171. than returning it.
  1172. * src/BitfieldMan.cc
  1173. * src/BitfieldMan.h
  1174. * src/DefaultBtRequestFactory.cc
  1175. * src/DefaultPieceStorage.cc
  1176. * src/Piece.cc
  1177. * src/Piece.h
  1178. * test/BitfieldManTest.cc
  1179. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1180. Implemented rarest piece first piece selection strategy.
  1181. * src/AbstractBtMessage.cc
  1182. * src/AbstractBtMessage.h
  1183. * src/BitfieldMan.cc
  1184. * src/BitfieldMan.h
  1185. * src/BtBitfieldMessage.cc
  1186. * src/BtHaveAllMessage.cc
  1187. * src/BtHaveMessage.cc
  1188. * src/DefaultPieceStorage.cc
  1189. * src/DefaultPieceStorage.h
  1190. * src/PeerInteractionCommand.cc
  1191. * src/PieceStorage.h
  1192. * src/UnknownLengthPieceStorage.h
  1193. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1194. Rewritten readData and writeData.
  1195. * src/MultiDiskAdaptor.cc
  1196. * src/MultiDiskAdaptor.h
  1197. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1198. Move \n out of the message "Usage: ...".
  1199. * src/version_usage.cc
  1200. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1201. Bump up version number to 0.13.2b.
  1202. * configure.ac
  1203. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1204. Added const qualifier to argument Exception& e.
  1205. * src/Logger.h
  1206. * src/SimpleLogger.cc
  1207. * src/SimpleLogger.h
  1208. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1209. Pool connection when CWD, SIZE command fails.
  1210. * src/FtpNegotiationCommand.cc
  1211. * src/FtpNegotiationCommand.h
  1212. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1213. Renamed HttpNullDownloadCommand as HttpSkipResponseCommand
  1214. * src/HttpResponseCommand.cc
  1215. * src/HttpSkipResponseCommand.cc
  1216. * src/HttpSkipResponseCommand.h
  1217. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1218. Pool connection when a server returns 4xx, 5xx responses.
  1219. * src/HttpNullDownloadCommand.cc
  1220. * src/HttpNullDownloadCommand.h
  1221. * src/HttpResponse.cc
  1222. * src/HttpResponse.h
  1223. * src/HttpResponseCommand.cc
  1224. * src/HttpResponseCommand.h
  1225. * test/HttpResponseTest.cc
  1226. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1227. Print usage when no URL is specifed or bad command-line option is
  1228. specified.
  1229. * src/HelpItemFactory.cc
  1230. * src/help_tags.h
  1231. * src/option_processing.cc
  1232. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1233. Removed duplicate log message.
  1234. * src/AbstractCommand.cc (asyncResolveHostname)
  1235. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1236. Updated man page: --async-dns and --ftp-reuse-connection were added.
  1237. Changed -j option's default value from 5 to 1.
  1238. Added new examples using protocol auto detection feature.
  1239. Removed -T, -M usage where it can be omitted.
  1240. * doc/aria2c.1.txt
  1241. * doc/aria2c.1.html
  1242. * doc/aria2c.1.txt
  1243. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1244. Updated command-line usage text, so that it tells users that they
  1245. can specify any number of torrent files and metalink files in
  1246. command-line.
  1247. * src/version_usage.cc
  1248. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1249. Changed the default value of -j option to 1.
  1250. * src/HelpItemFactory.cc
  1251. * src/option_processing.cc
  1252. * src/usage_text.h
  1253. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1254. Added the ability to reuse connection in FTP and it is enabled by
  1255. default. It can be disabled by --ftp-reuse-connection=false option.
  1256. * src/Command.cc
  1257. * src/DownloadCommand.cc
  1258. * src/FtpDownloadCommand.cc
  1259. * src/FtpDownloadCommand.h
  1260. * src/FtpFinishDownloadCommand.cc
  1261. * src/FtpFinishDownloadCommand.h
  1262. * src/FtpInitiateConnectionCommand.cc
  1263. * src/FtpNegotiationCommand.cc
  1264. * src/FtpNegotiationCommand.h
  1265. * src/HelpItemFactory.cc
  1266. * src/Makefile.am
  1267. * src/Makefile.in
  1268. * src/OptionHandlerFactory.cc
  1269. * src/option_processing.cc
  1270. * src/prefs.h
  1271. * src/usage_text.h
  1272. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1273. Call Command::transitStatus() before calling Command::execute(),
  1274. so that the status change made in execute() is not cleared.
  1275. * src/DownloadEngine.cc
  1276. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1277. Removed forward declaration of SocketCore class.
  1278. * src/HttpDownloadCommand.h
  1279. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1280. Set Request::setKeepAliveHint() and Request::setPipeliningHint()
  1281. in InitiateConnectionCommandFactory. They should be set only when
  1282. the protocol is HTTP or HTTPS.
  1283. * src/InitiateConnectionCommandFactory.cc
  1284. * src/RequestGroup.cc
  1285. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1286. Fixed infinite loop in checksum checking.
  1287. * src/IteratableChecksumValidator.cc
  1288. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1289. Set _supportsPersistentConnection to true by default.
  1290. * src/Request.cc
  1291. * src/RequestGroup.cc
  1292. * test/HttpRequestTest.cc
  1293. * test/RequestTest.cc
  1294. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1295. Added timeout to socket pool. The default timeout is 15 seconds,
  1296. which is the same value Apache uses.
  1297. * src/DownloadEngine.cc
  1298. * src/DownloadEngine.h
  1299. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1300. Fixed misuse of multimap::find()
  1301. * src/HttpHeader.cc
  1302. * test/HttpHeaderTest.cc
  1303. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1304. Rewritten name resolver. Now async DNS can be disabled by --async-dns
  1305. option.
  1306. The asynchronous DNS is not capable of IPv6 yet.
  1307. By disabling asynchronous DNS, aria2 is IPv6 enabled application, at
  1308. least for HTTP download.
  1309. * src/AbstractCommand.cc
  1310. * src/AbstractCommand.h
  1311. * src/AsyncNameResolver.cc
  1312. * src/AsyncNameResolver.h
  1313. * src/DHTEntryPointNameResolveCommand.cc
  1314. * src/DHTEntryPointNameResolveCommand.h
  1315. * src/DownloadEngine.cc
  1316. * src/DownloadEngine.h
  1317. * src/FtpInitiateConnectionCommand.cc
  1318. * src/FtpInitiateConnectionCommand.h
  1319. * src/HelpItemFactory.cc
  1320. * src/HttpInitiateConnectionCommand.cc
  1321. * src/HttpInitiateConnectionCommand.h
  1322. * src/InitiateConnectionCommand.cc
  1323. * src/InitiateConnectionCommand.h
  1324. * src/Makefile.am
  1325. * src/Makefile.in
  1326. * src/NameResolver.cc
  1327. * src/NameResolver.h
  1328. * src/OptionHandlerFactory.cc
  1329. * src/SocketCore.cc
  1330. * src/SocketCore.h
  1331. * src/Util.cc
  1332. * src/Util.h
  1333. * src/option_processing.cc
  1334. * src/prefs.h
  1335. * src/usage_text.h
  1336. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1337. Updated man page: --quiet, --header were added.
  1338. --metalink-servers and --enable-http-keep-alive option were updated.
  1339. * doc/aria2c.1
  1340. * doc/aria2c.1.html
  1341. * doc/aria2c.1.txt
  1342. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1343. Enable HTTP keep-alive by default.
  1344. * src/HelpItemFactory.cc
  1345. * src/option_processing.cc
  1346. * src/usage_text.h
  1347. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1348. Disable http keep-alive if the remote server is not HTTP/1.1.
  1349. * src/HttpConnection.cc
  1350. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1351. Receive content body of 302 response so that the connection can be
  1352. reused later when http keep-alive is enabled.
  1353. * src/HttpNullDownloadCommand.cc
  1354. * src/HttpNullDownloadCommand.h
  1355. * src/HttpResponseCommand.cc
  1356. * src/HttpResponseCommand.h
  1357. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1358. const SharedHandle<Request> -> const SharedHandle<Request>&
  1359. * src/FtpDowndloadCommand.cc
  1360. * src/FtpDowndloadCommand.h
  1361. * src/HttpDownloadCommand.cc
  1362. * src/HttpDownloadCommand.h
  1363. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1364. Fixed the bug that the control file(.aria2 file) is not renamed
  1365. according to tryAutoFileRenaming().
  1366. tryAutoFileRenaming() was rewritten so that if both renamed file and
  1367. its control file exist, use them and continue download.
  1368. The old implementation didn't take into account of control file's
  1369. existence, so basically you couldn't continue download of renamed file.
  1370. * src/BtProgressInfoFile.h
  1371. * src/DefaultBtProgressInfoFile.cc
  1372. * src/DefaultBtProgressInfoFile.h
  1373. * src/NullProgressInfoFile.h
  1374. * src/RequestGroup.cc
  1375. * test/DefaultBtProgressInfoFileTest.cc
  1376. * test/MockBtProgressInfoFile.h
  1377. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1378. Change the default value of --metalink-servers option from `5' to `1'.
  1379. * src/HelpItemFactory.cc
  1380. * src/option_processing.cc
  1381. * src/usage_text.h
  1382. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1383. Reimplemented transparent metalink using Accept request header.
  1384. * src/HttpRequest.cc
  1385. * src/HttpRequest.h
  1386. * src/HttpRequestCommand.cc
  1387. * src/Metalink2RequestGroup.cc
  1388. * src/RequestGroup.cc
  1389. * src/RequestGroup.h
  1390. * test/HttpRequestTest.cc
  1391. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1392. Bump up version number to 0.13.2a
  1393. * configure.ac
  1394. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1395. Updated configure.ac using the result of autoscan.
  1396. * configure.ac
  1397. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1398. Fixed compilation error without gcrypt/openssl.
  1399. * src/DownloadCommand.cc
  1400. * src/DownloadCommand.h
  1401. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1402. Reorganized version information so that it can be displayed in a
  1403. standard terminal screen without scrolling.
  1404. Removed http, ftp from Configuration section, because they are always
  1405. enabled.
  1406. * src/FeatureConfig.cc
  1407. * src/FeatureConfig.h
  1408. * src/main.cc
  1409. * src/messageDigest.cc
  1410. * src/messageDigest.h
  1411. * src/version_usage.cc
  1412. * test/FeatureConfigTest.cc
  1413. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1414. Masked user ID in log.
  1415. * src/FtpConnection.cc (sendUser)
  1416. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1417. Removed query part from filename in HTTP download. The query part means
  1418. the substring after "?" in URL. Firefox seems do the same thing.
  1419. A query part is sometimes very long and not suitable to filename,
  1420. so I think it is better to remove it from filename.
  1421. * src/HttpRequest.cc
  1422. * src/HttpRequest.h
  1423. * src/Request.cc
  1424. * src/Request.h
  1425. * test/HttpRequestTest.cc
  1426. * test/RequestTest.cc
  1427. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1428. Rewritten Exception class. Throw exception object, not its pointer and
  1429. catch by reference, so that remove problematic delete operator for
  1430. catched exception.
  1431. * src/Exception.cc
  1432. * src/Exception.h
  1433. * test/ExceptionTest.cc
  1434. * src/*: All files throwing/catching exception.
  1435. * test/*: All files throwing/catching exception.
  1436. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1437. Now auto protocol detection is enabled without -Z option.
  1438. But there is a important difference between with/without -Z optoin.
  1439. For example, if you type:
  1440. aria2c http://host/file file1.torrent file2.metalink http://mirror/file
  1441. then, aria2 interprets there are 3 request groups:
  1442. (1) http://host/file, http://mirror/file <-- multi-source download
  1443. (2) file1.torrent
  1444. (3) file2.metalink
  1445. On the other hand, if you invoke above command with -Z option, it is
  1446. interpreted as 4 request groups:
  1447. (1) http://host/file
  1448. (2) file1.torrent
  1449. (3) file2.metalink
  1450. (4) http://mirror/file
  1451. I think usually user don't mix multi-source URLs and torrent files, so
  1452. there is no big problem here.
  1453. * src/main.cc
  1454. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1455. Fixed the bug that causes segmentaion fault when reading XML containing
  1456. unescapsed character like '&'.
  1457. Also a modification was made which avoids adding unnecessary
  1458. characters stack and appending unused string.
  1459. * src/ExpatMetalinkProcessor.cc
  1460. * src/FileMetalinkParserState.h
  1461. * src/FilesMetalinkParserState.h
  1462. * src/FinMetalinkParserState.h
  1463. * src/HashMetalinkParserState.h
  1464. * src/InitialMetalinkParserState.h
  1465. * src/LanguageMetalinkParserState.h
  1466. * src/MetalinkMetalinkParserState.h
  1467. * src/MetalinkParserState.h
  1468. * src/MetalinkParserStateMachine.cc
  1469. * src/MetalinkParserStateMachine.h
  1470. * src/OSMetalinkParserState.h
  1471. * src/PieceHashMetalinkParserState.h
  1472. * src/PiecesMetalinkParserState.h
  1473. * src/ResourcesMetalinkParserState.h
  1474. * src/SizeMetalinkParserState.h
  1475. * src/SkipTagMetalinkParserState.h
  1476. * src/URLMetalinkParserState.h
  1477. * src/VerificationMetalinkParserState.h
  1478. * src/VersionMetalinkParserState.h
  1479. * src/XML2SAXMetalinkProcessor.cc
  1480. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1481. Added StringFormat class, which internally calls vasprintf.
  1482. operator<< is defined for this class, so it can be used with iostream
  1483. classes nicely. SimpleLogger and following functions are rewritten
  1484. using StringFormat class.
  1485. Besides, now Logger class's methods are non-const, many classes
  1486. that has a const Logger* as a member variable are modified to remove
  1487. const qualifier from the variable declaration.
  1488. * src/HelpItemFactory.cc
  1489. * src/Request.cc
  1490. * src/SimpleLogger.cc
  1491. * src/StringFormat.cc
  1492. * src/StringFormat.h
  1493. * src/Util.cc
  1494. * src/option_processing.cc
  1495. * src/version_usage.cc
  1496. * test/StringFormatTest.cc
  1497. * src/*.h: The classes that has const Logger* as a member variable.
  1498. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1499. Log error in AccRequestGroup when reading BitTorrent/Metalink file is
  1500. failed. Also fixed memory link when exception is thrown there.
  1501. * src/main.cc (AccRequestGroup)
  1502. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1503. Added build-in "Accept-Features" support. For now only "metalink" is
  1504. used in this header field.
  1505. This "metalink" value is removed from the list when connecting URLs
  1506. fed by metalink file to avoid loop in "transparent" metlaink.
  1507. * src/HttpRequest.cc
  1508. * src/HttpRequest.h: Renamed _userHeaders as _headers. Accept-Features
  1509. header is also held in this variable. Also renamed setUserHeaders as
  1510. addHeader and it was rewritten to add header not just to clear the old
  1511. value.
  1512. * src/HttpRequestCommand.cc
  1513. * src/Metalink2RequestGroup.cc: Added the code to remove "metalink"
  1514. from "Accept-Features" list.
  1515. * src/RequestGroup.cc: Added "metalink" to "Accept-Features" by
  1516. default.
  1517. * src/RequestGroup.h
  1518. * src/TaggedItem.cc: Moved Concat class to a2functional.h.
  1519. * src/a2functional.h: Included <string> because Concat class depends on
  1520. it.
  1521. * test/HttpRequestTest.cc
  1522. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1523. Added comment
  1524. * src/RequestGroup.cc (createNextCommand)
  1525. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1526. Capitalized METHOD_GET and METHOD_HEAD
  1527. * src/Request.cc
  1528. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1529. Added getDownloadResults() method
  1530. * src/RequestGroupMan.cc
  1531. * src/RequestGroupMan.h
  1532. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1533. Fixed the bug that aria2 exits when commands is empty() but
  1534. _routineCommands are not.
  1535. * src/DownloadEngine.cc
  1536. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1537. Use the default value pulled from Option object in HelpItemFactory.
  1538. except options whose defualt value is embedded in a usage text.
  1539. * src/HelpItemFactory.cc
  1540. * src/HelpItemFactory.h
  1541. * src/option_processing.cc
  1542. * src/version_usage.cc
  1543. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1544. Added --quiet option to make aria2 quiet (no console output).
  1545. --quiet option is tagged with ADVANCED.
  1546. * src/HelpItemFactory.cc
  1547. * src/LogFactory.cc
  1548. * src/LogFactory.h
  1549. * src/MultiUrlRequestInfo.cc
  1550. * src/MultiUrlRequestInfo.h
  1551. * src/NullStatCalc.h: New class. This class prints nothing.
  1552. * src/OptionHandlerFactory.cc
  1553. * src/main.cc
  1554. * src/option_processing.cc
  1555. * src/prefs.h
  1556. * src/usage_text.h
  1557. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1558. Add HTTP tag to --header option. Removed ADVANCED tag instead.
  1559. * src/HelpItemFactory.cc (createHelpItems):
  1560. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1561. Fixed compilation error in ExpatMetalinkProcessor.cc
  1562. * src/ExpatMetalinkProcessor.cc
  1563. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1564. Reuse socket if the origin server supports HTTP keep-alive and
  1565. --enable-http-keep-alive or --enable-http-pipelining is given.
  1566. The current implementation doesn't reuse the connections established
  1567. against proxy server.
  1568. * src/AbstractCommand.cc
  1569. * src/DownloadEngine.cc
  1570. * src/DownloadEngine.h
  1571. * src/HttpDownloadCommand.cc
  1572. * src/HttpInitiateConnectionCommand.cc
  1573. * src/HttpResponseCommand.cc
  1574. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1575. Rewritten HTTP keep-alive and pipelining routine.
  1576. * src/AbstractCommand.cc
  1577. * src/HttpConnection.cc
  1578. * src/HttpDownloadCommand.cc
  1579. * src/HttpRequest.cc
  1580. * src/HttpRequestCommand.cc
  1581. * src/HttpResponseCommand.cc
  1582. * src/Request.cc
  1583. * src/Request.h
  1584. * src/RequestGroup.cc
  1585. * test/HttpRequestTest.cc
  1586. * test/HttpResponseTest.cc
  1587. * test/RequestTest.cc
  1588. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1589. Added missing setUserHeaders call
  1590. * src/HttpRequestCommand.cc
  1591. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1592. Call FileAllocationMan::nextFileAllocationEntryExists() first.
  1593. Calling FileAllocationMan::isFileAllocationBeingExecuted() is somwhat
  1594. waste of time because it is more likey false.
  1595. * src/FileAllocationDispatcherCommand.cc (execute)
  1596. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1597. Now HTTP status and version are a member variable of HttpHeader.
  1598. HTTP status is processed as a string, not integer.
  1599. * src/AbstractProxyResponseCommand.cc
  1600. * src/HttpConnection.cc
  1601. * src/HttpHeader.cc
  1602. * src/HttpHeader.h
  1603. * src/HttpHeaderProcessor.cc
  1604. * src/HttpHeaderProcessor.h
  1605. * src/HttpResponse.cc
  1606. * src/HttpResponse.h
  1607. * test/HttpHeaderProcessorTest.cc
  1608. * test/HttpResponseTest.cc
  1609. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1610. Added --header option. You can specify any number of additional HTTP headers
  1611. like:
  1612. aria2 --header="X-A: 300" --header="X-B: 900" http://host/file
  1613. Unlike other commad-line option, you can use --header option multiple times.
  1614. * src/HelpItemFactory.cc
  1615. * src/HttpRequest.{cc, h}
  1616. * src/HttpRequestCommand.cc
  1617. * src/OptionHandlerFactory.cc
  1618. * src/OptionHandlerImpl.h
  1619. * src/option_processing.cc
  1620. * src/prefs.h
  1621. * src/usage_text.h
  1622. * test/HttpRequestTest.cc (testUserHeaders)
  1623. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1624. Eliminates the time lag between sequential downloads and commands in
  1625. the same RequestGroup.
  1626. In old implementation, aria2 occasionally waits 1 seconds before
  1627. executing next command or RequestGroup.
  1628. This is really a waste of time, and new implementation eliminates
  1629. this unnecessary time lag.
  1630. * src/AbstractCommand.cc
  1631. * src/AutoSaveCommand.cc
  1632. * src/CheckIntegrityCommand.cc
  1633. * src/Command.{cc, h}
  1634. * src/DownloadEngine.{cc, h}
  1635. * src/DownloadEngineFactory.cc
  1636. * src/FileAllocationCommand.cc
  1637. * src/FileAllocationDispatcherCommand.cc
  1638. * src/FillRequestGroupCommand.cc
  1639. * src/FtpInitiateConnectionCommand.cc
  1640. * src/HaveEraseCommand.cc
  1641. * src/HttpInitiateConnectionCommand.cc
  1642. * src/HttpResponseCommand.cc
  1643. * src/RealtimeCommand.cc
  1644. * src/RequestGroup.cc
  1645. * src/RequestGroupMan.cc
  1646. * src/StreamFileAllocationEntry.cc
  1647. * src/TimeBasedCommand.{cc, h}
  1648. * src/TimedHaltCommand.cc
  1649. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1650. Rewritten SharedHandle. Now copy constructor taking raw pointer has
  1651. keyword explicit and SharedHandle's default constructor initializes
  1652. its internal obj to null, old implementation initializes it using
  1653. obj's default constructor.
  1654. To assign null, write SharedHandle<T> x(...); x.reset();
  1655. TODO: test/SharedHandleTest.cc needs more tests.
  1656. * src/SharedHandle.h
  1657. 2008-04-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1658. Fixed type in man page.
  1659. * doc/aria2c.1.txt
  1660. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1661. Merged Ross's 0.13.1+1 Cygwin compile fix patch.
  1662. * src/SimpleLogger.{cc, h}
  1663. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1664. Implemented auto protocol detection.
  1665. Now you can do:
  1666. aria2c -Z http://host/file file1.torrent file2.metalink
  1667. (Note: -Z option is required for auto protcol detection.)
  1668. Then aria2c downloads 3 files simultaneously:
  1669. 1. http://host/file
  1670. 2. file1.torrent <-- read local torrent file
  1671. 3. file2.metalink <-- read local Metalink file.
  1672. Same thing goes with -i option. Assume your uris.txt contans:
  1673. http://host/file
  1674. file1.torrent
  1675. file2.metalink
  1676. Then you can do: aria2c -i uris.txt
  1677. (Note: -Z option is not needed if -i option is given.)
  1678. * src/main.cc
  1679. * src/ProtocolDetector.{cc, h}
  1680. * test/ProtocolDetectorTest.cc
  1681. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1682. Fixed compile error without gnutls/libgcrypt/libgpg-error and openSSL
  1683. installed
  1684. * src/ARC4Encryptor.h
  1685. * src/ARC4Decryptor.h
  1686. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1687. Renamed argument from 'errno' to 'err', since errno is confused with
  1688. errno defined in errno.h.
  1689. * src/LibgcryptARC4Decryptor.h
  1690. * src/LibgcryptARC4Context.h
  1691. * src/LibgcryptDHKeyExchange.h
  1692. * src/LibgcryptARC4Encryptor.h
  1693. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1694. Rewritten choking algorithm.
  1695. * src/PeerChokeCommand.{cc, h}
  1696. * src/BtInterestedMessage.cc
  1697. * src/PeerSessionResource.{cc, h}
  1698. * src/DefaultPeerStorage.{cc, h}
  1699. * src/BtNotInterestedMessage.cc
  1700. * src/DefaultBtMessageDispatcher.{cc, h}
  1701. * src/BtMessageDispatcher.h
  1702. * src/Peer.{cc, h}
  1703. * src/BtLeecherStateChoke.{cc, h}
  1704. * src/BtSetup.cc
  1705. * src/BtSeederStateChoke.{cc, h}
  1706. * src/PeerStorage.h
  1707. * test/MockPeerStorage.h
  1708. * test/MockBtMessageDispatcher.h
  1709. 2008-04-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1710. Fixed compilation error on x84-64 platform.
  1711. * src/AuthConfig.cc: Included ostream.
  1712. 2008-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1713. Rewritten getBasename() and getDirname(), without standard library
  1714. basename(), dirname().
  1715. * src/File.cc
  1716. * test/FileTest.cc
  1717. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1718. Added Simplified Chinese translation. Also updated the following
  1719. translations: Polish, Dutch, German. Great thanks to all translators.
  1720. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1721. Suppress content-range error when 'Content-Range' response header
  1722. doesn't contains bytes-unit specifier 'bytes'
  1723. * src/HttpHeader.cc (getRange)
  1724. * test/HttpHeaderTest.cc
  1725. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1726. Fixed compilation error with g++-4.3
  1727. 2008-03-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1728. Added missing include files for MinGW
  1729. * test/HttpHeaderProcessorTest.cc
  1730. * test/DHTRoutingTableSerializerTest.cc
  1731. * test/DHTRoutingTableDeserializerTest.cc
  1732. * test/UriListParserTest.cc
  1733. 2008-03-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1734. Now download line is printed nicely with no garbage at the end of
  1735. line. I use ioctl to get the columns of terminal.
  1736. If stdout is redirected to another device, instead of carriage return,
  1737. end of line '\n' character is used. This is feature request#1909659
  1738. * src/ConsoleStatCalc.cc (calculateStat)
  1739. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1740. Included a2time.h
  1741. * src/DHTMessageDispatcher.h
  1742. * src/DHTMessageEntry.h
  1743. * src/DHTReplaceNodeTask.h
  1744. * src/DHTMessageTracker.h
  1745. * src/Util.h
  1746. * src/CookieBox.h
  1747. * src/SocketCore.h
  1748. * src/DefaultBtMessageDispatcher.h
  1749. * src/SocketCore.cc
  1750. * src/Util.cc
  1751. * src/DHTPingTask.h
  1752. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1753. Fixed high memory footprint when DHT is enabled.
  1754. This is not a memory leak, but DHTReplaceNodeTask is more frequently
  1755. queued than it is processed and the queue is getting longer. As a
  1756. consequence, momory usage is increased.
  1757. As for a fix, instead of issuing DHTReplaceNodeTask, I've implemented
  1758. replacement cache in DHTBucket which is described in Kademlia paper.
  1759. * src/DHTRoutingTable.cc (addNode): Removed the issuing of
  1760. DHTReplaceNodeTask.
  1761. * src/DHTBucket.{h, cc}
  1762. (cacheNode): New function.
  1763. (getCachedNodes): New function.
  1764. (dropNode): Push back cached node to _nodes.
  1765. * test/DHTBucketTest.cc
  1766. (testCacheNode): New test
  1767. (testDropNode): New test
  1768. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1769. Allocate memory for peekBuf in initiateSecureConnection() to avoid
  1770. the unused 4KB memory when ssl is not used.
  1771. * src/SocketCore.cc
  1772. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1773. Added summary log for peer announce storage.
  1774. * src/DHTPeerAnnounceStorage.cc (handleTimeout)
  1775. Removed cast
  1776. * src/DefaultPeerStorage.cc (addPeer)
  1777. Log exception message
  1778. * src/DHTMessageTracker.cc (handleTimeout)
  1779. Fixed casting
  1780. * test/HttpRequestTest.cc
  1781. * test/MetalinkProcessorTest.cc
  1782. * test/PieceTest.cc
  1783. * test/MetalinkEntryTest.cc
  1784. * test/SequenceTest.cc
  1785. 2008-03-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1786. * src/ParameterizedStringParser.cc (createLoop):
  1787. Removed unused variable sstep.
  1788. * src/AlphaNumberDecorator.h (decode): Rewritten.
  1789. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1790. * src/Util.{h, cc}
  1791. (parseUInt): New function.
  1792. (alphaToNum): Now returns unsigned int and 0 when overflow detected.
  1793. The actual range is uint32_t.
  1794. * test/UtilTest.cc
  1795. * src/ParameterizedStringParser.cc:
  1796. Use Util::parseUInt() for loop variables.
  1797. * test/ParameterizedStringParserTest.cc
  1798. * src/PStringNumLoop.h: Make _startValue and _endValue unsigned int.
  1799. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1800. Rewritten the functions for binding port.
  1801. * src/DHTConnectionImpl.{h, cc}
  1802. * src/PeerListenCommand.{h, cc}
  1803. * src/DHTSetup.cc
  1804. * src/BtSetup.cc
  1805. * test/DHTConnectionImplTest.cc
  1806. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1807. type cleanup for allmost all remaining files.
  1808. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1809. Type clarification
  1810. * src/PeerSessionResource.{h, cc}
  1811. * src/DefaultPieceStorage.{h, cc}
  1812. * src/Peer.{h, cc}
  1813. * test/PeerSessionResourceTest.cc
  1814. Use div function
  1815. * src/BtPieceMessage.cc (erasePieceOnDisk)
  1816. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1817. Type clarification
  1818. * src/DefaultPeerStorage.{h, cc}
  1819. * test/DefaultPeerStorageTest.cc
  1820. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1821. Type clarification: size_t for length or size, uint64_t for file
  1822. length, off_t for file offset.
  1823. * src/DefaultBtProgressInfoFile.cc
  1824. * src/DefaultBtContext.{h, cc}
  1825. * src/DefaultBtInteractive.cc
  1826. * src/DownloadCommand.{h, cc}
  1827. * src/IteratableChunkChecksumValidator.{h, cc}
  1828. * src/SegmentMan.{h, cc}
  1829. * src/SingleFileDownloadContext.{h, cc}
  1830. * src/IteratableChecksumValidator.{h, cc}
  1831. * src/BtContext.h
  1832. * src/IteratableValidator.h
  1833. * src/DownloadContext.h
  1834. * test/SingleFileDownloadContextTest.cc
  1835. * test/DefaultBtContextTest.cc
  1836. * test/MockBtContext.h
  1837. * test/Metalink2RequestGroupTest.cc
  1838. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1839. Type clarification: size_t for length or size, uint64_t for file
  1840. length, off_t for file offset.
  1841. * src/PiecedSegment.cc
  1842. * src/GrowSegment.h
  1843. * src/DefaultBtRequestFactory.h
  1844. * src/DefaultBtProgressInfoFile.cc
  1845. * src/UnknownLengthPieceStorage.h
  1846. * src/DefaultPieceStorage.cc
  1847. * src/UnknownLengthPieceStorage.cc
  1848. * src/DefaultBtInteractive.cc
  1849. * src/GrowSegment.cc
  1850. * src/BitfieldMan.h
  1851. * src/DownloadCommand.cc
  1852. * src/BtRequestFactory.h
  1853. * src/PiecedSegment.h
  1854. * src/DefaultPieceStorage.h
  1855. * src/Piece.cc
  1856. * src/DefaultBtRequestFactory.cc
  1857. * src/PieceStorage.h
  1858. * src/Segment.h
  1859. * src/Piece.h
  1860. * src/BitfieldMan.cc
  1861. * src/Util.cc
  1862. * test/DefaultBtProgressInfoFileTest.cc
  1863. * test/DefaultPieceStorageTest.cc
  1864. * test/MockPieceStorage.h
  1865. * test/BtRequestMessageTest.cc
  1866. * test/DefaultBtMessageDispatcherTest.cc
  1867. * test/BitfieldManTest.cc
  1868. * test/GrowSegmentTest.cc
  1869. * test/PieceTest.cc
  1870. * test/SegmentTest.cc
  1871. * test/SegmentManTest.cc
  1872. * test/DefaultBtRequestFactoryTest.cc
  1873. * test/MockBtRequestFactory.h
  1874. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1875. Fixed compilation error with --disable-nls
  1876. It seems that defining gettext(Msgid) to ((const char *) (Msgid))
  1877. in gettext.h causes the problem.
  1878. * src/common.h
  1879. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1880. Removed subPiece related functions.
  1881. * src/Piece.{h, cc} : Also rewritten getCompletedLength().
  1882. * src/DefaultPieceStorage.{h, cc}
  1883. * test/PieceTest.cc
  1884. * test/DefaultPieceStorageTest.cc
  1885. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1886. Use unsigned char for data store.
  1887. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1888. Bump up version number to 0.13.0+1
  1889. * configure.ac
  1890. * Release 0.13.0+1
  1891. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1892. Changed inactive connection timeout to 120.
  1893. To accept more mulually interested peers, disconnect peer when there
  1894. is no interest between us after certain time passed.
  1895. * src/DefaultBtInteractive.cc (checkActiveInteraction)
  1896. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1897. Fixed the bug that aria2 only uses first dns server in resolv.conf
  1898. when compiled with async DNS support.
  1899. * src/DownloadEngine.cc
  1900. * src/option_processing.cc: Lengthened DNS timeout to 30. I think old
  1901. value '10' will be a little bit short when some DNS servers are
  1902. offline and several DNS servers are tried. It should be configured
  1903. by command-line option.
  1904. 2008-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1905. Merged Ross's mingw patch.
  1906. * src/DHTRoutingTableDeserializer.cc
  1907. * src/DHTRoutingTableSerializer.cc
  1908. * src/Platform.{h, cc}
  1909. * src/timegm.h
  1910. * src/gettimeofday.h
  1911. * src/getaddrinfo.h
  1912. * src/SocketCore.h
  1913. * src/common.h
  1914. * src/inet_aton.h
  1915. * src/DownloadEngine.h
  1916. * src/gai_strerror.h
  1917. * src/a2netcompat.h
  1918. * configure.ac
  1919. * configure
  1920. * aclocal.m4
  1921. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1922. Included missing iostream.
  1923. * test/AllTest.cc
  1924. * test/BtDependencyTest.cc
  1925. * test/BtExtendedMessageTest.cc
  1926. * test/DHTConnectionImplTest.cc
  1927. * test/DHTMessageFactoryImplTest.cc
  1928. * test/DHTMessageTrackerEntryTest.cc
  1929. * test/DHTNodeTest.cc
  1930. * test/DHTRoutingTableSerializerTest.cc
  1931. * test/DefaultBtAnnounceTest.cc
  1932. * test/DefaultBtContextTest.cc
  1933. * test/DefaultBtMessageFactoryTest.cc
  1934. * test/DefaultExtensionMessageFactoryTest.cc
  1935. * test/HandshakeExtensionMessageTest.cc
  1936. * test/HttpResponseTest.cc
  1937. * test/MetalinkProcessorTest.cc
  1938. * test/MultiFileAllocationIteratorTest.cc
  1939. * test/SocketCoreTest.cc
  1940. * test/UTPexExtensionMessageTest.cc
  1941. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1942. Reorganized includes.
  1943. * src/NameResolver.cc
  1944. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1945. Fixed compilation error without ares/c-ares
  1946. * src/NameResolver.h:
  1947. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1948. Added a test for large file.
  1949. * test/MetalinkProcessorTest.cc (testLargeFileSize):
  1950. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1951. Fixed the bug that file size is ignored if size > INT32_MAX
  1952. * src/SizeMetalinkParserState.cc (endElement):
  1953. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1954. Bump up version number to 0.13.0
  1955. * configure.ac
  1956. * Release 0.13.0
  1957. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1958. Updated Makfefile.am to make 'make dist' work.
  1959. Now packaged filename is aria2c-VERSION.tar.bz2.
  1960. Added README, README.html, and aria2c.1.html to dist_doc_DATA.
  1961. Added LICENSE.OpenSSL to dist_noinst_DATA.
  1962. Large file support is now configured by configure script.
  1963. * configure.ac
  1964. Removed unsused source files
  1965. * src/
  1966. * test/
  1967. Removed PeerDecl.h and BtContextDecl.h. typedefs are removed to
  1968. Peer.h and BtContext.h respectively.
  1969. * src/Peer.h
  1970. * src/BtContext.h
  1971. Updated translations.
  1972. Added Polish, Thai, Indonesian, Norwegian Nynorsk, Hungarian
  1973. translations. Great thanks to all translators!;)
  1974. * po/*.{po, gmo}
  1975. 2008-02-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1976. Create MessageDigestHelper::staticSHA1DigestInit() which uses
  1977. statically declared sha1 MessageDigestContext.
  1978. * src/BtPieceMessage.cc: Use staticSHA1DigestInit() to avoid
  1979. initialization of short-lived MessageDigestContext.
  1980. * src/MessageDigestHelper.{h, cc}
  1981. * src/main.cc
  1982. Now DownloadCommand has a reference to MessageDigestContext to avoid
  1983. the initialization of MessageDigestContext every time in validating
  1984. chunk checksum.
  1985. * src/DownloadCommand.{h, cc}
  1986. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1987. Add a file descriptor which connected to fast peer(latency<1500) to
  1988. select(). This change reduced CPU load.
  1989. * src/PeerInteractionCommand.cc
  1990. * src/DefaultBtInteractive.{h, cc}
  1991. * src/BtInteractive.h
  1992. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1993. Fixed the previous insufficient fix for possible busy loop.
  1994. * src/MSEHandshake.cc (identifyHandshakeType)
  1995. Removed unused functions.
  1996. * src/MSEHandshake.{h, cc} (readDataAndDecrypt)
  1997. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1998. Fixed possible busy loop if first 20 bytes are not received for a few
  1999. minutes.
  2000. * src/MSEHandshake.{h, cc} (identifyHandshakeType)
  2001. * src/ReceiverMSEHandshakeCommand.cc
  2002. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2003. Fixed compilation error
  2004. * src/ExpatMetalinkProcessor.cc
  2005. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2006. Fixed compile error on Mac OS X, on 64Bit OS maybe.
  2007. * src/DHTBucket.cc
  2008. Removed unnecessary cast.
  2009. * src/HandshakeExtensionMessage.cc
  2010. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2011. Fixed the bug that option handler for PREF_METALINK_ENABLE_UNIQUE_PROTOCOL.
  2012. is missing.
  2013. * src/OptionHandlerFactory.cc
  2014. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2015. Fixed the bug that HAVE message is not sent for a piece they are
  2016. downloaded fom http/ftp server before any BitTorrent handshake is done
  2017. with peers.
  2018. * src/DefaultBtInteractive.cc
  2019. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2020. Removed RequestInfo.h and FileAllocator.h since they have been removed.
  2021. * src/Makefile.am
  2022. * src/Makefile.in
  2023. 2008-02-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2024. Updated README. Added html version of README and man page.
  2025. * README
  2026. * README.html
  2027. * readme2html: Shell script to generate README.html from README using
  2028. asciidoc.
  2029. * doc/aria2c.1.html
  2030. * doc/makeman: Added the line to generate aria2c.1.html
  2031. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2032. Fixed offset calculation.
  2033. * src/LibgcryptDHKeyExchange.h (computeSecret)
  2034. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2035. Rewritten itos and uitos using template. llitos and ullitos are
  2036. replaced with itos and uitos respectively.
  2037. * src/Util.{h, cc}
  2038. * test/UtilTest.cc
  2039. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2040. Fixed the bug that DH key exchange sometimes fails due to bad handling
  2041. of the number of bytes required for storing public key and shared
  2042. secret.
  2043. * src/LibgcryptDHKeyExchange.h
  2044. * src/LibsslDHKeyExchange.h: Also added function name to handleError.
  2045. * src/MSEHandshake.cc
  2046. * test/DHKeyExchangeTest.cc
  2047. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2048. Removed since they are not used.
  2049. * src/Xml2MetalinkProcessor.{h, cc}
  2050. * src/Socket.cc
  2051. * src/SegmentSplitter.{h, cc}
  2052. * test/Xml2MetalinkProcessorTest.cc
  2053. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2054. Fixed the bug that prevents aria2 from stopping other than by pressing
  2055. Ctrl-C in BitTorrent download. It is reproducible using --seed-time
  2056. option. aria2 doesn't stop even after --seed-time is satisfied and
  2057. continues to output blank lines in the console.
  2058. * src/ReceiverMSEHandshakeCommand.cc
  2059. * src/PeerReceiveHandshakeCommand.cc
  2060. * src/PeerListenCommand.cc
  2061. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2062. Bump up version number to 0.13.0rc
  2063. * configure.ac
  2064. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2065. Updated man page and some usage text.
  2066. * doc/aria2c.1.txt
  2067. * src/usage_text.h
  2068. * po/*.{po, gmo}
  2069. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2070. Updated translations. Added Finnish and Hebrew translations.
  2071. Great thanks to all translators!
  2072. * po/*.{po, gmo}
  2073. * po/LINGUAS
  2074. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2075. Log more detailed information about each message.
  2076. * src/DHTQueryMessage.{h, cc}
  2077. * src/DHTGetPeersMessage.{h, cc}
  2078. * src/DHTFindNodeReplyMessage.{h, cc}
  2079. * src/DHTGetPeersReplyMessage.{h, cc}
  2080. * src/DHTAnnouncePeerMessage.{h, cc}
  2081. * src/DHTResponseMessage.{h, cc}
  2082. * src/DHTFindNodeMessage.{h, cc}
  2083. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2084. Use constants defined in prefs.h
  2085. * src/option_processing.cc
  2086. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2087. * test/AllTest.cc: Added OpenSSL, GNUTLS initialization code.
  2088. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2089. Make room for future enchancements for IPv6 addresses.
  2090. Bump up version number of dht.dat file format to 2.
  2091. Not compatible with previous version.
  2092. * src/DHTRoutingTableSerializer.cc
  2093. * src/DHTRoutingTableDeserializer.cc
  2094. * test/DHTRoutingTableSerializerTest.cc
  2095. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2096. Added handling for the return values from
  2097. PeerMessageUtil::createcompact().
  2098. * src/DefaultBtContext.cc (computeFastSet):
  2099. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2100. Fixed abort when peer's ip address is IPv4-mapped address.
  2101. * src/DefaultBtContext.cc (computeFastSet)
  2102. Removed number-and-dots criteria, since Util::isNumberAndDotsNotation()
  2103. cannot handle IPv4-mapped addresses.
  2104. * src/DefaultBtInteractive.cc (addPeerExchangeMessage)
  2105. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2106. Proper return value handling for OpenSSL functions.
  2107. * src/LibsslDHKeyExchange.h
  2108. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2109. Random bytes generation using libgcrypt and OpenSSL.
  2110. * src/DHTUtil.{h, cc}
  2111. * test/DHTUtilTest.cc
  2112. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2113. Fixed segmentation fault when a DHT message which doesn't have 'y' key
  2114. received.
  2115. * src/DHTMessageReceiver.cc (receiveMessage)
  2116. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2117. Fixed the bug that a return code is always 0. BUG#1897704
  2118. If error occurred during the download or there exist unfinished
  2119. downloads, aria2 returns with code 1.
  2120. * src/RequestGroupMan.{h, cc}
  2121. * src/MultiUrlRequestInfo.{h, cc}
  2122. * src/main.cc
  2123. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2124. IPv6 support for SocketCore class.
  2125. TODO: In SocketCore::establishConnection(), this is insufficient to
  2126. determin the failure of connect() here because the socket is
  2127. non-blocking state. The next addresses should be tried after select().
  2128. TODO: NameResolver still uses c-ares(<= 1.4) ares_gethostbyname().
  2129. If c-ares 1.5 or newer is installed, ares_getaddrinfo() should be used
  2130. instead which address family independent.
  2131. TODO: DHTRoutingTable{Deserializer,Serializer} currently saves peer
  2132. information in a compact peer format which is for IPv4 only.
  2133. Some BitTorrent functions in PeerMessageUtil still depends on IPv4 but
  2134. this is a spec of BitTorrent protocol.
  2135. * src/SocketCore.{h, cc}
  2136. * src/PeerMessageUtil.cc
  2137. * test/SocketCoreTest.cc
  2138. * test/PeerMessageUtilTest.cc
  2139. * test/DHTConnectionImplTest.cc
  2140. Handle IPv4-mapped addresses.
  2141. * src/DHTNode.cc: Now identity is determined by node id.
  2142. * src/DHTMessageTrackerEntry.cc
  2143. Because now PeerMessageUtil::unpackcompact() could fail, the caller
  2144. should handle it.
  2145. * src/DHTRoutingTableDeserializer.cc
  2146. * src/DHTMessageFactoryImpl.cc
  2147. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2148. Change the unit of --stop option from a minute to a second.
  2149. * src/usage_text.h
  2150. * src/DownloadEngineFactory.cc
  2151. * src/OptionHandlerFactory.cc
  2152. * src/message.h
  2153. * src/TimedHaltCommand.cc
  2154. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2155. Make listening socket non-block mode.
  2156. * src/FtpConnection.cc
  2157. * src/FtpNegotiationCommand.{h, cc}
  2158. * src/PeerListenCommand.cc
  2159. Fixed the bug that cause slow ftp negotiation.
  2160. * src/FtpNegotiationCommand.{h, cc}
  2161. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2162. Added basic tag to --enable-dht, --dht-listen-port option.
  2163. * src/HelpItemFactory.cc (createHelpItems)
  2164. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2165. Updated text.
  2166. * src/usage_text.h
  2167. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2168. * src/MSEHandshake.cc (encryptAndSendData): Use std::min().
  2169. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2170. Determin _threadtholdSpeed in each constructor for
  2171. ActivePeerConnectionCommand and PeerReceiveHandshakeCommand.
  2172. * src/ActivePeerConnectionCommand.{h, cc}
  2173. * src/PeerReceiveHandshakeCommand.{h, cc}
  2174. * src/BtSetup.cc
  2175. * src/BtConstants.h
  2176. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2177. Added --bt-min-crypto-level and --bt-require-crypto options.
  2178. * src/OptionHandlerFactory.cc
  2179. * src/MSEHandshake.cc
  2180. * src/HelpItemFactory.cc
  2181. * src/option_processing.cc
  2182. * src/ReceiverMSEHandshakeCommand.cc
  2183. * src/prefs.h
  2184. * src/DefaultBtAnnounce.cc
  2185. * src/InitiatorMSEHandshakeCommand.cc
  2186. * src/usage_text.h
  2187. * test/MSEHandshakeTest.cc
  2188. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2189. Bump version number to 0.13.0b
  2190. * configure.ac
  2191. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2192. Updated doc.
  2193. * src/MessageDigestHelper.h:
  2194. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2195. Use raw message digest as a token instead of its hexadecimal
  2196. representation.
  2197. * src/DHTTokenTracker.cc (generateToken)
  2198. 2008-02-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2199. Added Message Stream Encryption(MSE) support.
  2200. Currently, aria2 accepts incoming connections with Obfuscation Header
  2201. and legacy BitTorrent Header and establishes connections with
  2202. Obfuscation Header first and if failed then retry with legacy
  2203. BitTorrent header. If plain text and ARC4 is provided, aria2 always
  2204. choose ARC4. The new option to change the default behavior is planned.
  2205. For tracker extension, "supportcrypto=1" is added statically.
  2206. * src/PeerInitiateConnectionCommand.{h, cc}
  2207. * src/PeerConnection.{h, cc}
  2208. * src/HandleRegistry.h
  2209. * src/SocketCore.h
  2210. * src/PeerReceiveHandshakeCommand.{h, cc}
  2211. * src/BtRegistry.{h, cc}
  2212. * src/PeerListenCommand.cc
  2213. * src/InitiatorMSEHandshakeCommand.{h, cc}
  2214. * src/ReceiverMSEHandshakeCommand.{h, cc}
  2215. * src/MSEHandshake.{h, cc}
  2216. * src/ARC4Encryptor.h
  2217. * src/ARC4Decryptor.h
  2218. * src/LibgcryptARC4Encryptor.h
  2219. * src/LibgcryptARC4Decryptor.h
  2220. * src/LibgcryptARC4Context.h
  2221. * src/LibsslARC4Encryptor.h
  2222. * src/LibsslARC4Decryptor.h
  2223. * src/LibsslARC4Context.h
  2224. * src/DHKeyExchange.h
  2225. * src/LibgcryptDHKeyExchange.h
  2226. * src/LibsslDHKeyExchange.h
  2227. * src/DefaultBtAnnounce.cc: Just added "supportcrypto=1" parameter.
  2228. * test/DefaultBtAnnounceTest.cc
  2229. * test/ARC4Test.cc
  2230. * test/DHKeyExchangeTest.cc
  2231. Removed prepareForRetry() because it is not used.
  2232. * src/PeerAbstractCommand.{h, cc}
  2233. * src/PeerInteractionCommand.{h, cc}
  2234. * src/PeerInitiateConnectionCommand.{h, cc}
  2235. 2008-02-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2236. Added the ability to load nodes from torrent file. These nodes are
  2237. added to the routing table when downloading that torrent.
  2238. * src/BtContext.h
  2239. * src/DefaultBtContext.{h, cc}
  2240. * src/DHTSetup.cc
  2241. * src/DHTEntryPointNameResolveCommand.{h, cc}: Now accepts list of
  2242. hostname and port pair, and resolves all of them.
  2243. * src/NameResolver.{h, cc}: Added reset().
  2244. * src/RequestGroup.cc
  2245. * test/DefaultBtContextTest.cc
  2246. * test/MockBtContext.h
  2247. Removed assert() from DefaultBtContext and throw exception instead.
  2248. * src/DefaultBtContext.cc
  2249. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2250. Fixed segmentation fault bug when exiting if dht is disabled.
  2251. * src/RequestGroup.cc
  2252. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2253. Fixed typo in log message and define the message in message.h
  2254. * src/TimedHaltCommand.cc
  2255. * src/message.h
  2256. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2257. Included RecoverableException.h to fix compilation error.
  2258. * test/DHTMessageFactoryImplTest.cc
  2259. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2260. Added test 'testDoReceivedAction' for DHTQueryMessage subclasses.
  2261. * test/DHTPingMessageTest.cc
  2262. * test/DHTGetPeersMessageTest.cc
  2263. * test/DHTFindNodeMessageTest.cc
  2264. * test/DHTAnnouncePeerMessageTest.cc
  2265. * test/MockDHTMessage.h
  2266. * test/MockDHTMessageFactory.h
  2267. * test/MockDHTMessageDispatcher.h: New class.
  2268. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2269. Added DHTMessageDispatcherImpl. Now DHTMessageDispatcher is pure
  2270. virtual.
  2271. * src/DHTMessageDispatcher.h
  2272. * src/DHTMessageDispatcherImpl.{h, cc}
  2273. * src/DHTSetup.cc
  2274. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2275. Adding handling of DHT error message. Just log error message and
  2276. throw exception.
  2277. * src/DHTMessageFactoryImpl.cc
  2278. * test/DHTMessageFactoryImplTest.cc
  2279. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2280. Added handling of dynamic cast failure.
  2281. * src/DHTNodeLookupTask.cc
  2282. * src/DHTPeerLookupTask.cc
  2283. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2284. Added the ability to stop aria2 itself when given time has passed
  2285. from start. Use --stop option to specify time in minutes.
  2286. When 0 is given, this feature is disabled.
  2287. * src/OptionHandlerFactory.cc
  2288. * src/TimeBasedCommand.h: Make _interval protected scope.
  2289. * src/HelpItemFactory.cc
  2290. * src/option_processing.cc
  2291. * src/prefs.h
  2292. * src/FillRequestGroupCommand.cc: Evaluate _e->isHaltRequested()
  2293. before calling RequestGroupMan::fillRequestGroupFromReserver().
  2294. Without this modification, the result list shows "ERR" when aria2 is
  2295. stopped by --stop option. It should be "INPR".
  2296. * src/DownloadEngine.{h, cc}
  2297. * src/DownloadEngineFactory.cc
  2298. * src/usage_text.h
  2299. * src/TimedHaltCommand.{h, cc}: New class.
  2300. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2301. Bootstrap through node added by port message.
  2302. Currently bootstrap is executed if the number of buckets in routing
  2303. table is 1.
  2304. * src/BtPortMessage.{h, cc}
  2305. * src/DefaultBtMessageFactory.{h, cc}
  2306. * src/PeerInteractionCommand.cc
  2307. * test/BtPortMessageTest.cc
  2308. * test/MockDHTTask.h
  2309. 2008-02-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2310. Extract the Peer class's member variables, which are only needed after
  2311. PeerInteractionCommand, into PeerSessionResource class.
  2312. This class is instantiated in PeerInteractionCommand class's ctor and
  2313. released in its dtor.
  2314. This will make Peer class lightweight and uses less memory for peers
  2315. which are not connected and wait in the queue.
  2316. * src/PeerChokeCommand.cc
  2317. * src/PeerSessionResource.{h, cc}
  2318. * src/PeerInteractionCommand.cc
  2319. * src/PeerAbstractCommand.cc: Note: 0 is given to onAbort() function.
  2320. * src/DefaultBtInteractive.cc
  2321. * src/BtPieceMessage.cc
  2322. * src/BtInterestedMessage.cc
  2323. * src/BtUnchokeMessage.cc
  2324. * src/DefaultPeerStorage.{h, cc}
  2325. * src/PeerInitiateConnectionCommand.cc
  2326. * src/ActivePeerConnectionCommand.cc
  2327. * src/BtNotInterestedMessage.cc
  2328. * src/DefaultBtMessageDispatcher.cc
  2329. * src/BtChokeMessage.cc
  2330. * src/BtRequestMessage.cc
  2331. * src/Peer.{h, cc}
  2332. * src/BtRegistry.h
  2333. * src/TrackerWatcherCommand.cc
  2334. * src/PeerReceiveHandshakeCommand.cc
  2335. * test/BtExtendedMessageTest.cc
  2336. * test/BtAllowedFastMessageTest.cc
  2337. * test/BtCancelMessageTest.cc
  2338. * test/DefaultPieceStorageTest.cc
  2339. * test/BtBitfieldMessageTest.cc
  2340. * test/BtHaveMessageTest.cc
  2341. * test/BtNotInterestedMessageTest.cc
  2342. * test/BtRequestMessageTest.cc
  2343. * test/PeerSessionResourceTest.cc
  2344. * test/DefaultBtMessageDispatcherTest.cc
  2345. * test/PeerTest.cc
  2346. * test/BtInterestedMessageTest.cc
  2347. * test/BtRejectMessageTest.cc
  2348. * test/BtChokeMessageTest.cc
  2349. * test/DefaultPeerStorageTest.cc
  2350. * test/BtHaveNoneMessageTest.cc
  2351. * test/BtHaveAllMessageTest.cc
  2352. * test/DefaultExtensionMessageFactoryTest.cc
  2353. * test/BtUnchokeMessageTest.cc
  2354. * test/DefaultBtMessageFactoryTest.cc
  2355. * test/HandshakeExtensionMessageTest.cc
  2356. * test/UTPexExtensionMessageTest.cc
  2357. * test/DefaultBtRequestFactoryTest.cc
  2358. * test/BtPieceMessageTest.cc
  2359. Removed typedef PeerStats.
  2360. * src/PeerStat.h
  2361. * src/SegmentMan.cc
  2362. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2363. Added std namespace to copy, remove_copy, back_inserter,
  2364. front_inserter.
  2365. * src/RequestGroupMan.cc
  2366. * src/DefaultPieceStorage.cc
  2367. * src/StreamFileAllocationEntry.cc
  2368. * src/BtFileAllocationEntry.cc
  2369. * src/RequestGroup.cc
  2370. * src/MetalinkEntry.cc
  2371. * src/DelegatingPeerListProcessor.cc
  2372. * src/DefaultBtRequestFactory.cc
  2373. * src/DefaultBtMessageDispatcher.cc
  2374. * src/version_usage.cc: Included <algorithm>
  2375. * src/main.cc
  2376. * src/MetalinkParserController.cc
  2377. * src/DefaultBtContext.cc
  2378. * src/DownloadEngineFactory.cc
  2379. * src/a2algo.h
  2380. Removed.
  2381. * test/StreamUriListParserTest.cc
  2382. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2383. Use PREF_MAX_DOWNLOAD_LIMIT as a threshold for
  2384. ActivePeerConnectionCommand when it is given and
  2385. PREF_MAX_DOWNLOAD_LIMIT < default threshold.
  2386. * src/ActivePeerConnectionCommand.{h, cc}
  2387. * src/BtSetup.cc
  2388. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2389. Only add socket to DownloadEngine's select routine when peer or
  2390. localhost is unchoked and interested. This lowers CPU usage a
  2391. little bit.
  2392. * src/PeerInteractionCommand.cc
  2393. * src/PeerAbstractCommand.{h, cc}
  2394. * src/BtInteractive.h
  2395. * src/DefaultBtInteractive.{h, cc}
  2396. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2397. Revert previous change because get_peers message is needed for
  2398. announce_peer anyway.
  2399. * src/DHTGetPeersCommand.cc
  2400. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2401. Request peers thought DHT only when download hasn't finished.
  2402. * src/DHTGetPeersCommand.cc
  2403. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2404. Force refresh bucket when startup if certain time has passed(currently 15 minutes).
  2405. * src/DHTBucketRefreshTask.{h, cc}
  2406. * src/DHTSetup.cc
  2407. 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2408. Removed "using namespace std;" from all sources. Appended std:: prefix to c++
  2409. standard classes.
  2410. Included string.h where mem* function are used.
  2411. Added namespace aria2.
  2412. 2008-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2413. Create directory before saving DHT routing table.
  2414. Now ios::failure is now handled properly.
  2415. * src/DHTAutoSaveCommand.cc
  2416. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2417. Removed unnecessary cerr.
  2418. * src/DownloadEngine.cc
  2419. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2420. Catch exception inside DHTMessageReceiver::receiveMessage().
  2421. Log unknown message.
  2422. * src/DHTMessageReceiver.{h, cc}
  2423. * src/DHTMessageFactory.h
  2424. * src/DHTMessageFactoryImpl.{h, cc}
  2425. * src/DHTMessageTracker.cc (handleTimeout): Catch and handle exception.
  2426. * src/DHTInteractionCommand.cc
  2427. * src/DHTUnknownMessage.{h, cc}
  2428. * test/DHTUnknownMessageTest.cc
  2429. * test/MockDHTMessageFactory.h
  2430. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2431. Commented out ip address comparison because a host can have multiple
  2432. ip addresses and it is hard to predict the hostname is resolved into
  2433. which one.
  2434. * test/SocketCoreTest.cc (testWriteAndReadDatagram)
  2435. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2436. * po/Makefile.in: Removed since this is generated by configure.
  2437. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2438. Fixed compiler warning about redefinition of SIZE_MAX.
  2439. Use common.h instead of config.h directly here.
  2440. * src/Platform.{h, cc}
  2441. The check of ENABLE_NLS is made in gettext.h, so it is not required
  2442. here.
  2443. * common.h
  2444. 2008-02-02 gettextize <bug-gnu-gettext@gnu.org>
  2445. Updated gettext related files.
  2446. * configure.ac (AC_CONFIG_FILES): Add intl/Makefile.
  2447. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17.
  2448. 2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2449. Added DHT functionality, compatible with mainline.
  2450. DHT is disabled by default. To enable it, give --enable-dht to aria2c.
  2451. You may need to specify entry point to DHT network using
  2452. --dht-entry-point. DHT uses UDP port to listen incoming message.
  2453. Use --dht-listen-port to specify port number. Make sure that your
  2454. firewall configuration can pass through UDP traffic to the port.
  2455. The routing table is saved in $HOME/.aria2/dht.dat.
  2456. * src/DHT*
  2457. * src/BNode.{h, cc}
  2458. * src/PeerInteractionCommand.cc: enable DHT functionality for a
  2459. particular torrent.
  2460. * src/Data.cc: Rewritten ctor.
  2461. * src/OptionHandlerFactory.cc: Added --enable-dht, --dht-listen-port,
  2462. --dht-entry-point.
  2463. * src/DefaultBtInteractive.cc: Send port message if dht is enabled.
  2464. * src/RequestGroup.cc: Initialize DHT functionality. When download
  2465. ends, remove BtContext from DHTPeerAnnounceStorage.
  2466. * src/BtPortMessage.{h, cc}: Rewritten.
  2467. * src/message.h
  2468. * src/OptionHandlerImpl.cc
  2469. * src/option_processing.cc: Added --enable-dht, --dht-listen-port,
  2470. --dht-entry-point.
  2471. * src/Dictionary.{h, cc} (remove): New function.
  2472. * src/prefs.h
  2473. * src/DefaultBtMessageFactory.h
  2474. * src/BtHandshakeMessage.cc
  2475. * src/ActivePeerConnectionCommand.cc
  2476. * src/SocketCore.{h, cc}: Added datagram socket support.
  2477. * src/DefaultBtMessageFactory.cc
  2478. * src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
  2479. Create DHT commands.
  2480. * src/BtMessageFactory.h
  2481. * src/PeerMessageUtil.{h, cc}
  2482. 2008-01-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2483. Fixed the bug that log file is not written when configuration file doesn't exist.
  2484. This is caused by using Logger class before LogFactory is not configured.
  2485. BUG #1875079
  2486. * src/option_processing.cc
  2487. Warning message "configuration doesn't exist" is only printed when --conf is
  2488. given.
  2489. * src/option_processing.cc
  2490. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2491. Use BencodeVisitor and MessageDigestHelper instead of ShaVisitor.
  2492. ShaVisitor is now deprecated and slated to be removed.
  2493. * src/DefaultBtContext.cc
  2494. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2495. Externalize message to message.h
  2496. * src/Platform.cc
  2497. * src/message.h
  2498. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2499. Set default domain and default path to cookie.
  2500. * src/HttpResponse.cc
  2501. * src/CookieBox.{h, cc}
  2502. * src/CookieParser.{h, cc}
  2503. * test/CookieParserTest.cc
  2504. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2505. Added --no-conf and --conf-path command-line option.
  2506. --no-conf option disables loading aria2.conf file.
  2507. --conf-path option changes the configuration file path. The default
  2508. file path is $HOME/.aria2/aria2.conf
  2509. Added a warning message when the configuration file is not found.
  2510. * src/HelpItemFactory.cc
  2511. * src/option_processing.cc
  2512. * src/prefs.h
  2513. * src/usage_text.h
  2514. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2515. Added the message to inform users that other help categories are
  2516. available in -h option.
  2517. * src/version_usage.cc
  2518. * src/TagContainer.{h, cc}
  2519. * test/TagContainerTest.cc
  2520. * src/TaggedItem.{h, cc}
  2521. * test/TaggedItemTest.cc
  2522. * src/HelpItem.h
  2523. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2524. Added Piece::getFirstMissingBlockIndexWithoutLock() and it is called
  2525. from PiecedSegment's ctor.
  2526. Previously Piece::getAllMissingBlockIndexes() is called from
  2527. PiecedSegment() but it is rather expensive since only first element is
  2528. used.
  2529. * src/PiecedSegment.cc
  2530. * src/Piece.{h, cc}
  2531. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2532. Rewritten get*Missing*Index functions. Now no need to allocate memory
  2533. each time these functions are called.
  2534. * src/BitfieldMan.{h, cc}
  2535. * test/BitfieldManTest.cc
  2536. * src/array_fun.h
  2537. * test/array_funTest.cc
  2538. Now BitfieldMan::countBlock() returns BitfieldMan::blocks.
  2539. Added new BitfieldMan::countFilteredBlock() to get the number of blocks
  2540. filtered. Removed unnecessary cast to int32_t.
  2541. * src/BitfieldMan.{h, cc}
  2542. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2543. Fixed the bug that EX_TOO_LONG_PAYLOAD exception is thrown if just
  2544. payload length(4bytes) are received. This happens because lenbufLength
  2545. is not updated in this particular case and successive call of
  2546. receiveMessage() overwrites payload length with bytes recieved which
  2547. are payload body.
  2548. * src/PeerConnection.{h, cc}
  2549. * src/message.h
  2550. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2551. Fixed the bug that DefaultPeerStorage::returnPeer() may delete wrong
  2552. peer if there are peers that have same ipaddr and port.
  2553. I've experiened segmentation fault and "pure virtual function was
  2554. called" error.
  2555. * src/Peer.h
  2556. * test/PeerTest.cc
  2557. * src/DefaultPeerStorage.cc
  2558. * test/DefaultPeerStorageTest.cc
  2559. 2008-01-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2560. Removed a call to isPowerOf() because it is no longer necessary here
  2561. and a request block is not always power of 2.
  2562. BUG#1866924
  2563. * src/PeerMessageUtil.cc (checkLength)
  2564. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2565. Fixed the bug that always first found Segment is removed from
  2566. usedSegmentEntries. Removed unused functions.
  2567. * src/SegmentMan.{h, cc}
  2568. * test/SegmentManTest.cc
  2569. Fixed the bug that ServerHost is not removed.
  2570. * src/RequestGroup.cc
  2571. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2572. Fixed the bug that SegmentMan::completeSegment() is not called
  2573. even if Segment is complete when --lowest-speed-limit is enabled.
  2574. BUG#1864525
  2575. * src/DownloadCommand.{h, cc}
  2576. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2577. Fixed: hash algorithm 'sha1' is always used.
  2578. * src/DownloadCommand.cc (validatePieceHash)
  2579. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2580. Added --enable-peer-exchange command-line option.
  2581. * src/OptionHandlerFactory.cc
  2582. * src/HelpItemFactory.cc
  2583. * src/option_processing.cc
  2584. * src/usage_text.h
  2585. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2586. Move extension from BtRuntime to ExtensionMessageFactory, because
  2587. extension can be specified per peer, not per torrent.
  2588. * src/DefaultBtInteractive.cc
  2589. * src/BtRuntime.h
  2590. * src/ExtendedMessagingAware.h
  2591. * src/ExtensionMessageFactory.h
  2592. * src/DefaultExtensionMessageFactory.cc
  2593. * test/DefaultExtensionMessageFactoryTest.cc
  2594. 2008-01-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2595. Added categorized option help. Specify category using --help option.
  2596. Also added the ability to search options in forward match.
  2597. * src/HelpItem.{h, cc}
  2598. * test/HelpItemTest.cc
  2599. * src/HelpItemFactory.{h, cc}
  2600. * src/TagContainer.{h, cc}
  2601. * test/TagContainerTest.cc
  2602. * src/option_processing.cc
  2603. * src/prefs.h
  2604. * src/TaggedItem.{h, cc}
  2605. * test/TaggedItemTest.cc
  2606. * src/version_usage.cc
  2607. * src/help_tags.h
  2608. * src/usage_text.h
  2609. 2008-01-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2610. Fixed segmentation fault when bad torrent metainfo is parsed.
  2611. Added dynamic_cast properly to detect the misconfiguration of metainfo
  2612. and then throw exception or skip it.
  2613. * src/DefaultBtContext.{h, cc}
  2614. * test/DefaultBtContextTest.cc
  2615. * src/AnnounceList.cc
  2616. * src/CompactPeerListProcessor.cc
  2617. * src/message.h
  2618. * src/DefaultBtAnnounce.{h, cc}
  2619. * test/DefaultBtAnnounceTest.cc
  2620. * src/BencodeVisitor.cc
  2621. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2622. Added missing "B"(=Byte). So now the message looks like this:
  2623. Your share ratio was 1.0, uploaded/downloaded=12MiB/12MiB
  2624. * src/message.h (MSG_SHARE_RATIO_REPORT)
  2625. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2626. Show the seed ratio after torrent downloads.
  2627. For example, after torrent download completed and --seed-time and
  2628. --seed-ratio conditions are fulfilled, following message is printed
  2629. right after "Download complete: .....":
  2630. Your share ratio was 1.0, uploaded/downloaded=12M/12M
  2631. * src/RequestGroupMan.cc
  2632. * src/RequestGroup.{h, cc}
  2633. * src/message.h
  2634. 2007-12-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2635. Remove a defunct control file. A defunct control file means that while
  2636. it exists, but the corresponding download file is missing.
  2637. After its removal, a download restarts from the beginning.
  2638. * src/RequestGroup.cc
  2639. * src/message.h
  2640. 2007-12-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2641. Allocate bitfield in Peer when it is really used. More specifically,
  2642. bitfield in Peer is allocated after the connection is established and
  2643. deallocated when the connection is dropped.
  2644. Since 2 parameters(piece length and total length) was removed from the
  2645. constructor of Peer class, many test classes were modified accordingly.
  2646. See svn log for more detailed information.
  2647. * src/PeerInteractionCommand.cc
  2648. * src/CompactPeerListProcessor.cc
  2649. * src/Peer.cc
  2650. * src/DefaultPeerListProcessor.cc
  2651. * src/PeerListenCommand.cc
  2652. * src/PeerReceiveHandshakeCommand.cc
  2653. Fixed memory leak
  2654. * src/Piece.cc
  2655. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2656. Changed the default value of PREF_PEER_CONNECTION_TIMEOUT and
  2657. lowestSpeedLimit in ActivePeerConnectionCommand. TODO: Make them
  2658. command-line options.
  2659. * src/option_processing.cc
  2660. * src/ActivePeerConnectionCommand.cc
  2661. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2662. Send have message to peer if it already has the piece.
  2663. * src/BtHaveMessage.{h, cc}
  2664. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2665. Removed incomingPeer. Set 0 to peer's port if it is not a listening
  2666. port.
  2667. * src/DefaultPeerStorage.{h, cc}
  2668. * test/DefaultPeerStorageTest.cc
  2669. * src/HandshakeExtensionMessage.cc
  2670. * test/HandshakeExtensionMessageTest.cc
  2671. * src/Peer.{h, cc}: Added ipaddr and port to identity comparison.
  2672. * src/PeerStorage.h
  2673. * test/MockPeerStorage.h
  2674. * src/PeerListenCommand.cc
  2675. * src/PeerReceiveHandshakeCommand.cc
  2676. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2677. Added --metalink-enable-unique-protocol option.
  2678. * src/Metalink2RequestGroup.cc
  2679. * src/option_processing.cc
  2680. * src/prefs.h
  2681. * src/version_usage.cc
  2682. * doc/aria2c.1.txt
  2683. * doc/aria2c.1
  2684. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2685. Allow a peer in incomingPeer to be added peers.
  2686. * src/DefaultPeerStorage.cc
  2687. * test/DefaultPeerStorageTest.cc
  2688. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2689. Fixed the bug that causes aria2 not to finish download. BUG#1855875.
  2690. I could reproduce this bug in following procedure:
  2691. 1. Stop the download at the very beginning(1% or 100KB downloaded).
  2692. 2. Restart aria2.
  2693. 3. You see the download stopped around 99%.
  2694. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  2695. * src/StreamFileAllocationEntry.cc: Removed the timeout handling.
  2696. If timeout is reached, then _nextCommand is unused and it may contains
  2697. segments and they won't be canceled. Actually, timeout is not needed
  2698. here because if the server dropped connection, then retry is made.
  2699. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2700. Added uTorrent compatible Peer Exchange.
  2701. * src/BencodeVisitor.{h, cc}
  2702. * test/BencodeVisitorTest.cc
  2703. * src/BtConstants.h
  2704. * src/BtContext.h: Added 'private' flag.
  2705. * src/BtExtendedMessage.{h, cc}
  2706. * test/BtExtendedMessageTest.cc
  2707. * src/BtHandshakeMessage.{h, cc}: Set extended messaging bit in
  2708. reserved field.
  2709. * test/BtHandshakeMessageTest.cc
  2710. * src/BtMessageFactory.h
  2711. * src/BtRegistry.h
  2712. * src/BtRuntime.h: This class holds default extension message IDs for
  2713. aria2. By default, aria2 uses ID 8 for ut_pex.
  2714. * src/DefaultBtContext.cc
  2715. * src/DefaultBtInteractive.{h, cc}: This class holds _utPexEnabled.
  2716. When it is true, aria2 enables ut_pex. This value is set by
  2717. PeerInteractionCommand.
  2718. * src/DefaultBtMessageFactory.{h, cc}
  2719. * test/DefaultBtMessageFactoryTest.cc
  2720. * src/DefaultBtMessageReceiver.cc: Moved the code of fast extension
  2721. handling to DefaultBtInteractive class.
  2722. * src/DefaultExtensionMessageFactory.{h, cc}
  2723. * test/DefaultExtensionMessageFactoryTest.cc
  2724. * src/DefaultPeerStorage.cc: Returns false if a peer is already in
  2725. the container(peers and incomingPeers. The equality is determined by
  2726. Peer::id).
  2727. * test/DefaultPeerStorageTest.cc
  2728. * src/ExtensionMessage.h
  2729. * test/MockExtensionMessage.h
  2730. * src/ExtensionMessageFactory.h
  2731. * test/MockExtensionMessageFactory.h
  2732. * src/HandshakeExtensionMessage.{h, cc}
  2733. * test/HandshakeExtensionMessageTest.cc
  2734. * src/MetaEntry.h
  2735. * src/Peer.{h, cc}
  2736. * src/PeerInteractionCommand.cc
  2737. * src/PeerReceiveHandshakeCommand.cc: Evaluate the return value of
  2738. addIncomingPeer.
  2739. * src/PeerMessageUtil.{h, cc}
  2740. * src/PeerObject.h
  2741. * src/UTPexExtensionMessage.{h, cc}
  2742. * test/UTPexExtensionMessageTest.cc
  2743. * src/message.h
  2744. * src/prefs.h
  2745. Fixed the bug that returns incomplete data when it contains null
  2746. character. A convenient constructor was also added.
  2747. * src/Data.{h, cc}
  2748. Rewritten.
  2749. * src/CompactPeerListProcessor.cc
  2750. Fixed typos.
  2751. * src/message.h
  2752. * src/MetaFileUtil.cc
  2753. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2754. Added "Status Legend" label to the explanation text of 'stat' in
  2755. download result and moved it to the last. BUG#1848214
  2756. * src/RequestGroupMan.cc
  2757. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2758. Fixed the bug that -lexpat is always added to aria2c_LDADD.
  2759. * src/Makefie.am
  2760. * test/Makefile.am
  2761. 2007-12-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2762. Fixed the bug that prevents aria2 from loading cookie file when expire
  2763. value is greater than 2^31-1. BUG#1851066
  2764. * src/CookieBoxFactory.cc
  2765. * test/CookieBoxFactoryTest.cc
  2766. 2007-12-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2767. Fixed possible memory leak when an exception is thrown.
  2768. * src/XML2SAXMetalinkProcessor.cc
  2769. Added Expat support. If both libxml2 and Expat are installed, then
  2770. libxml2 is used by default.
  2771. MetalinkProcessorFactory chooses from XML2SAXMetalinkProcessor and
  2772. ExpatMetalinkProcessor according to the configuration.
  2773. * src/ExpatMetalinkProcessor.{h, cc}
  2774. * src/main.cc: Removed libxml2 specific header and init/free function.
  2775. * src/MetalinkProcessorFactory.{h, cc}
  2776. * src/MetalinkHelper.cc
  2777. * src/Metalinker.h: Removed unnecessary libxml2 header.
  2778. * src/MetalinkProcessor.h
  2779. * test/XML2SAXMetalinkProcessorTest.cc: Removed because
  2780. MetalinkProcessorTest is used instead.
  2781. * test/MetalinkProcessorTest.cc: Added. It is actually the same with
  2782. XML2SAXMetalinkProcessor, replaced XML2SAXMetalinkProcessor with
  2783. MetalinkProcessorFactory::newInstance().
  2784. * m4/libexpat.m4
  2785. * configure.ac: Added configuration options for libexpat.
  2786. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2787. Disabled -s option in metalink download.
  2788. * src/Metalink2RequestGroup.cc
  2789. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2790. If several protocols are available for a mirror in metalink file,
  2791. aria2 now use one of them. --metalink-preferred-protocol option was
  2792. added to specify the preference of protocol.
  2793. * src/AbstractCommand.cc
  2794. * src/OptionHandlerFactory.cc
  2795. * src/ServerHost.{h, cc}
  2796. * src/Metalink2RequestGroup.cc
  2797. * src/RequestGroup.{h, cc}
  2798. * test/RequestGroupTest.cc
  2799. * src/option_processing.cc
  2800. * src/prefs.h
  2801. * src/HttpResponseCommand.cc
  2802. * src/MetalinkResource.{h, cc}
  2803. * src/FtpNegotiationCommand.cc
  2804. * src/MetalinkEntry.{h, cc}
  2805. * src/MetalinkEntryTest.cc
  2806. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2807. Code cleanup and added debug log.
  2808. * src/PeerConnection.cc
  2809. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2810. Compiler error fix: applied the patch by Tiziano Mueller
  2811. * src/RequestGroup.cc
  2812. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2813. Fixed the bug: only first announce URL is tried in AnnounceTier,
  2814. in stopped and completed event.
  2815. * src/AnnounceList.{h, cc}
  2816. * test/AnnounceListTest.cc
  2817. * src/DefaultBtAnnounce.cc
  2818. * test/DefaultBtAnnounceTest.cc
  2819. Sorted URLs.
  2820. * test/Metalink2RequestGroupTest.cc
  2821. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2822. Removed unnecessary string copy. Updated doc and corrected indentation.
  2823. * src/Base64.cc
  2824. Fixed compilation warnings
  2825. * test/DataTest.cc
  2826. * test/HttpRequestTest.cc
  2827. * test/MetaFileUtilTest.cc
  2828. * test/RequestTest.cc
  2829. * Release 0.12.0
  2830. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2831. Updated translations
  2832. * po/{de,fr,ja,nl,ru}.po
  2833. Added Brazilian Portuguese, Catalan, Italian, Spanish, Swedish
  2834. translations. Many thanks to translators.
  2835. * po/{ca,es,it,pt_BR,sv}.po
  2836. * po/LINGUAS
  2837. 2007-12-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2838. Added a notice about URL
  2839. * src/version_usage.cc
  2840. 2007-12-07 Tatsuhiro Tsujikawa <tujikawa at rednoah com>
  2841. Fixed the bug#1845750; CTRL+C does not stop torrent.
  2842. aria2 repeatedly sends stopped request when tracker returns error code.
  2843. * src/AnnounceList.cc
  2844. * test/AnnounceListTest.cc
  2845. * src/AnnounceTier.h
  2846. Added a message when ctrl-c is hit.
  2847. Now second ctrl-c is also handled in signal handler.
  2848. * src/RequestGroupMan.{h, cc}
  2849. * src/RequestGroup.{h, cc}
  2850. * src/MultiUrlRequestInfo.cc
  2851. * src/DownloadEngine.cc
  2852. * src/TrackerWatcherCommand.cc
  2853. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2854. Code cleanup
  2855. * src/Base64.cc (encode)
  2856. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2857. Changed Direct/IO enable/disable procesure in file allocation routine.
  2858. * src/SingleFileAllocationIterator.cc
  2859. (SingleFileAllocationIterator):
  2860. Disable directIO if offset is not multiple of 512.
  2861. (~SingleFileAllocationIterator): Removed a call to disableDirectIO.
  2862. * src/MultiFileAllocationIterator.cc (allocateChunk):
  2863. Enable created SingleFileAllocationIterator's directIO.
  2864. * src/FileAllocationEntry.cc
  2865. (FileAllocationEntry): Enable directIO here.
  2866. (~FileAllocationEntry): Disable directIO here.
  2867. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2868. Fixed the bug: aria2 doesn't utilize fast set index offered by peer.
  2869. * src/Peer.{h, cc}
  2870. * src/DefaultPieceStorage.cc
  2871. * test/DefaultPieceStorageTest.cc
  2872. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2873. Rewritten direct I/O support routine
  2874. * src/SingleFileAllocationIterator.cc
  2875. * src/MultiDiskAdaptor.{h, cc}
  2876. * src/ByteArrayDiskWriter.h
  2877. * src/AbstractSingleDiskAdaptor.h
  2878. * src/AbstractDiskWriter.cc
  2879. * src/DefaultPieceStorage.cc
  2880. * src/DiskWriter.h
  2881. * src/BinaryStream.h
  2882. * src/IteratableChunkChecksumValidator.cc
  2883. * src/IteratableChecksumValidator.cc
  2884. * src/CheckIntegrityEntry.cc
  2885. * src/FileAllocationEntry.cc
  2886. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2887. Fixed typo
  2888. * src/version_usage.cc
  2889. Updated doc
  2890. * doc/aria2c.1.txt
  2891. * doc/aria2c.1
  2892. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2893. Fixed compile error without message digest support.
  2894. * src/FileMetalinkParserState.cc
  2895. * src/MetalinkParserController.{h, cc}
  2896. * test/XML2SAXMetalinkProcessorTest.cc
  2897. * test/MetalinkParserControllerTest.cc
  2898. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2899. Enable direct I/O support in checksum checking.
  2900. * src/IteratableChunkChecksumValidator.{h, cc}
  2901. * test/IteratableChunkChecksumValidatorTest.cc
  2902. * src/CheckIntegrityEntry.cc
  2903. * src/PieceHashCheckIntegrityEntry.cc
  2904. * src/IteratableChecksumValidator.{h, cc}
  2905. * src/BtCheckIntegrityEntry.cc: Added doc.
  2906. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2907. Added --allow-piece-length-change option.
  2908. * src/DefaultBtProgressInfoFile.cc
  2909. * test/DefaultBtProgressInfoFileTest.cc
  2910. * src/OptionHandlerFactory.cc
  2911. * src/option_processing.cc
  2912. * src/prefs.h
  2913. * src/version_usage.cc
  2914. * doc/aria2c.1.txt
  2915. * doc/aria2c.1
  2916. Fixed: duplicated result entry appears when exception is thrown in
  2917. RequestGroup::createInitiateConnectionCommand().
  2918. * src/RequestGroupMan.cc (fillRequestGroupFromReserver):
  2919. Add RequestGroup to _requestGroup after RequetGroup::
  2920. createInitiateConnectionCommand() succeeds.
  2921. Externalized message
  2922. * src/XML2SAXMetalinkProcessor.cc
  2923. * src/message.h
  2924. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2925. Forced download abort when received negative response from http/ftp
  2926. server.
  2927. * src/HttpResponseCommand.cc
  2928. * src/FtpNegotiationCommand.cc
  2929. * src/HttpResponse.cc
  2930. * src/FtpConnection.cc
  2931. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2932. Added XML2SAXMetalinkProcessor class, which is a lot faster than
  2933. the predecessor, Xml2MetalinkParser class.
  2934. I tested them against 94KB metalink file with 1234 chunk checksums.
  2935. The new one parsed it in 22msec, while it took 6000msec with old one.
  2936. * src/XML2SAXMetalinkProcessor.{h, cc}
  2937. * test/XML2SAXMetalinkProcessorTest.cc
  2938. * src/MetalinkParserController.{h, cc}
  2939. * test/MetalinkParserControllerTest.cc
  2940. * src/MetalinkParserState.h: Also added 16 subclasses.
  2941. * src/main.cc
  2942. * src/Metalink2RequestGroup.cc
  2943. * src/MetalinkHelper.cc
  2944. * src/MetalinkEntry.cc
  2945. * src/ChunkChecksum.h
  2946. Rewritten Base64 class for better performance.
  2947. * src/Base64.{h, cc}
  2948. * test/Base64Test.cc
  2949. * src/HttpRequest.cc
  2950. 2007-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2951. Fixed the bug#1841757: aria2 will connect to server to only get
  2952. file size.
  2953. * src/StreamFileAllocationEntry.cc
  2954. * src/option_processing.cc
  2955. * src/HttpResponseCommand.cc: Now reuse connection in segmented
  2956. downloads.
  2957. * src/FtpNegotiationCommand.cc
  2958. Suppressed wrong message when finding PreDownloadHandler
  2959. * src/RequestGroup.cc
  2960. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2961. Updated usage
  2962. * src/version_usage.cc
  2963. Updated man page
  2964. * doc/aria2c.1.txt
  2965. * doc/aria2c.1
  2966. Updated po files
  2967. * po/aria2c.pot
  2968. * po/*.po
  2969. * po/*.gmo
  2970. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2971. Eliminated g++-4.2 warning
  2972. * src/DownloadHandlerConstants.{h, cc}
  2973. * src/Util.cc
  2974. * test/MetaFileUtilTest.cc
  2975. * test/PStringBuildVisitorTest.cc
  2976. Fixed bug: --check-integrity doesn't work for multi file torrent.
  2977. * src/RequestGroup.cc
  2978. * src/BtCheckIntegrityEntry.cc
  2979. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2980. Fixed a2io.h
  2981. * src/a2io.h
  2982. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2983. Added direct I/O support. The current implementation uses O_DIRECT,
  2984. which is not posix standard and is tested on linux 2.6.21.
  2985. Currently only file allocation uses direct I/O.
  2986. * src/SingleFileAllocationIterator.{h, cc}
  2987. * test/SingleFileAllocationIteratorTest.cc
  2988. * src/MultiFileAllocationIterator.{h, cc}
  2989. * test/MultiFileAllocationIteratorTest.cc
  2990. * src/BinaryStream.h
  2991. * src/DiskWriter.h
  2992. * src/AbstractDiskWriter.{h, cc}
  2993. * src/ByteArrayDiskWriter.h
  2994. * src/DiskAdaptor.h
  2995. * src/AbstractSingleDiskAdaptor.{h, cc}
  2996. * src/MultiDiskAdaptor.{h, cc}
  2997. * src/FileAllocationEntry.cc
  2998. * src/Util.{h, cc}
  2999. * src/OptionHandlerFactory.cc
  3000. * src/prefs.h
  3001. * src/version_usage.cc
  3002. * src/option_processing.cc
  3003. Moved FileAllocationMan::markCurrentFileAllocationEntryDone() to
  3004. handleException.
  3005. * src/MultiFileAllocationIterator.cc
  3006. Added EINTR handling
  3007. * src/SocketCore.cc
  3008. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3009. Updated usage
  3010. * src/version_usage.cc
  3011. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3012. Applied Ross's patch for MinGW port.
  3013. * src/DownloadEngine.h
  3014. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3015. Set Content-Type to SingleFileDownloadContext when http response is
  3016. received.
  3017. * src/HttpResponseCommand.cc
  3018. * src/HttpResponse.{h, cc}
  3019. * test/HttpResponseTest.cc
  3020. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3021. Rewritten to add content-type support.
  3022. * src/DownloadHandler.{h, cc}
  3023. * src/BtPostDownloadHandler.{h, cc}
  3024. * test/BtPostDownloadHandlerTest.cc
  3025. * src/MetalinkPostDownloadHandler.{h, cc}
  3026. * test/MetalinkPostDownloadHandlerTest.cc
  3027. * src/PostDownloadHandler.{h, cc}
  3028. * src/DownloadHandlerConstants.{h, cc}
  3029. * src/RequestGroup.cc
  3030. * src/HttpResponseCommand.cc
  3031. * src/FtpNegotiationCommand.cc
  3032. * src/SingleFileDownloadContext.{h, cc}
  3033. * src/RequestGroup.h
  3034. * src/RequestGroupCriteria.h
  3035. * src/ContentTypeRequestGroupCriteria.h
  3036. Added 'mem' option value for --follow-metalink, --follow-torrent.
  3037. If it is give, metalink/torrent file is not written to the disk, but
  3038. just is kept in memory. Parsing is occurred on memory.
  3039. * src/MetalinkHelper.{h, cc}
  3040. * src/MetalinkProcessor.h
  3041. * src/Xml2MetalinkProcessor.{h, cc}
  3042. * test/Xml2MetalinkProcessorTest.cc
  3043. * src/DownloadHandlerFactory.{h, cc}
  3044. * test/DownloadHandlerFactoryTest.cc
  3045. * src/PreDownloadHandler.{h, cc}
  3046. * src/OptionHandlerFactory.cc
  3047. * src/DefaultBtContext.{h, cc}
  3048. * test/DefaultBtContextTest.cc
  3049. * src/version_usage.cc
  3050. * src/Metalink2RequestGroup.{h, cc}
  3051. * src/RequestGroup.{h, cc}
  3052. * src/a2functional.h
  3053. * test/a2functionalTest.cc
  3054. * src/MemoryBufferPreDownloadHandler.{h, cc}
  3055. * src/OptionHandlerImpl.h
  3056. * src/prefs.h
  3057. * src/Util.{h, cc}
  3058. * test/UtilTest.cc
  3059. Keep DownloadResult rather than RequestGroup after downloads to reduce
  3060. memory usage.
  3061. * src/RequestGroupMan.{h, cc}
  3062. * src/DownloadEngine.cc
  3063. * src/BtDependency.{h, cc}: Changed the type of dependee from
  3064. WeakHandle to SharedHandle because WeakHandle could be null.
  3065. * src/RequestGroup.{h, cc}
  3066. * src/DownloadEngineFactory.cc
  3067. * src/DownloadResult.h
  3068. Set totalLength after download finished
  3069. * src/UnknownLengthPieceStorage.{h, cc}
  3070. Keep torrent file specified in metalink in memory.
  3071. * src/Metalink2RequestGroup.cc
  3072. * src/BtDependency.cc
  3073. * src/TrueRequestGroupCriteria.h
  3074. Fixed the bug: seekg is used where seekp should be used.
  3075. * src/ByteArrayDiskWriter.cc
  3076. * test/ByteArraydiskWriterTest.cc
  3077. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3078. Fixed syntax error
  3079. * test/SequenceTest.cc
  3080. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3081. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  3082. * src/RequestGroupMan.cc (isSameFileBeingDownloaded)
  3083. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  3084. * src/RequestGroup.cc (downloadFinishedByFileLength)
  3085. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3086. Added the check to see whether ares_host_callback accepts timeouts
  3087. with c-ares; only c-ares 1.5.0 or newer accepts it.
  3088. * src/NameResolver.{h, cc}
  3089. * m4/libcares.m4
  3090. * configure.ac: Set C++ for language choice.
  3091. 2007-11-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3092. Fixed: compilation fails without c-ares/ares
  3093. * src/DownloadEngine.cc (addCommand): Moved outside #ifdef
  3094. Generate http/ftp commands only when download is incomplete.
  3095. * src/BtFileAllocationEntry.cc (prepareForNextAction)
  3096. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3097. Corrected typo. Examples are removed since they are available in man
  3098. page.
  3099. * src/version_usage.cc
  3100. Updated man page.
  3101. * doc/aria2c.1
  3102. * doc/aria2c.1.txt
  3103. * doc/makeman: Commented out sed command.
  3104. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3105. Throw DlAbortEx when a remote file is not found.
  3106. * src/HttpResponse.cc
  3107. * src/FtpNegotiationCommand.cc
  3108. * src/message.h
  3109. Overwrite an existing file if --allow-overwrite=true is given.
  3110. * src/RequestGroup.cc
  3111. Removed unused functions
  3112. * src/AbstractCommand.h
  3113. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3114. Removed 'extern' from 'extern typedef ...' in src/*.h
  3115. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3116. Updated usage
  3117. * src/version_usage.cc
  3118. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3119. Trim announce URL
  3120. * src/DefaultBtContext.cc
  3121. * test/ShaVisitorTest.cc
  3122. Trim argument s. Give trimed s to exception constructor.
  3123. * src/Util.cc (parseInt)(parseLLInt)
  3124. * test/UtilTest.cc
  3125. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3126. Set precision back to 1.
  3127. * src/ConsoleStatCalc.cc (calculateStat)
  3128. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3129. Replaced strtol with Util::parseInt
  3130. * src/ChunkedEncoding.cc
  3131. * src/HttpConnection.cc
  3132. * src/CookieBoxFactory.cc
  3133. * src/ParameterizedStringParser.cc
  3134. * src/Util.cc
  3135. * test/UtilTest.cc
  3136. * test/OptionHandlerTest.cc
  3137. * src/Request.cc
  3138. Throw exception when empty string is given. The message for exception
  3139. changed.
  3140. * src/Util.cc (parseInt)(parseLLInt)
  3141. * src/message.h
  3142. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3143. Set precision to 2 because share ratio is rounded into 1.0 if precision
  3144. set to 1.
  3145. * src/ConsoleStatCalc.cc (calculateStat)
  3146. 2007-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3147. Preallocate non-requested file which is adjacent forward to requested
  3148. file('requested' files means the files given in --select-file option)
  3149. if they share a same piece.
  3150. This fixes long pause in the file system which doesn't support sparse
  3151. files like FAT32 while downloading.
  3152. * src/MultiFileAllocationIterator.{h, cc}
  3153. * test/MultiFileAllocationIteratorTest.cc
  3154. * src/FileEntry.{h, cc}
  3155. Removed unused _option.
  3156. * src/MultiDiskAdaptor.h
  3157. * test/MultiDiskAdaptorTest.cc
  3158. * src/DefaultPieceStorage.cc
  3159. Set the default value of --seed-ratio to 1.0.
  3160. If 0.0 is given, then seeding continues regardless of share ratio.
  3161. * src/version_usage.cc
  3162. * src/option_processing.cc
  3163. * src/BtSetup.cc
  3164. * doc/aria2c.1.txt
  3165. * doc/aria2c.1
  3166. Fixed: Selective download is not working in BitTorrent
  3167. * src/RequestGroup.cc
  3168. Introduced Sequence class. Use this instead of Util::unfoldRange()
  3169. * src/PieceStorage.h
  3170. * test/MockPieceStorage.h
  3171. * src/UnknownLengthPieceStorage.h
  3172. * src/DefaultPieceStorage.{h, cc}
  3173. * src/Metalink2RequestGroup.cc
  3174. * src/RequestGroup.cc
  3175. * src/Sequence.h
  3176. * test/SequenceTest.cc
  3177. * src/IntSequence.h
  3178. * src/message.h
  3179. * src/Util.{h, cc}
  3180. * test/UtilTest.cc
  3181. Added new function 'parse' to catch exception thrown by subclass's
  3182. parseArg
  3183. * src/OptionHandler.h
  3184. * src/OptionParser.cc
  3185. * src/NameMatchOptionHandler.h
  3186. * src/OptionHandlerImpl.h
  3187. * test/OptionHandlerTest.cc
  3188. Added IntegerRangeOptionHandler. Used for --listen-port and
  3189. --select-file. Now --listen-port accepts range of port.
  3190. * src/OptionHandlerFactory.cc
  3191. * src/version_usage.cc
  3192. * src/OptionHandlerImpl.h
  3193. * src/option_processing.cc
  3194. * src/BtSetup.cc
  3195. * src/PeerListenCommand.{h, cc}
  3196. * doc/aria2c.1.txt
  3197. * doc/aria2c.1
  3198. Implemented operator< for Exception class to provide easy way to print
  3199. exception stack trace.
  3200. * src/Exception.{h, cc}
  3201. * src/main.cc
  3202. * src/option_processing.cc
  3203. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3204. * src/version_usage.cc
  3205. (showVersion): Reworked.
  3206. (showUsage): Added examples.
  3207. Removed Hint for total length and file name.
  3208. * src/Metalink2RequestGroup.cc
  3209. * src/RequestGroup.{h, cc}
  3210. * src/HttpResponseCommand.cc
  3211. * src/FtpNegotiationCommand.cc
  3212. Now --follow-torrent and --follow-metalink option work properly.
  3213. * src/RequestGroup.cc
  3214. Updated man page
  3215. * doc/aria2c.1.txt
  3216. * doc/aria2c.1
  3217. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3218. Removed.
  3219. * src/PiecedSegment.{h, cc} (operator==)(operator!=)
  3220. Use Segment::operator==()
  3221. * src/HttpConnection.cc
  3222. * src/Segment.h
  3223. Updated usage
  3224. * src/version_usage.cc
  3225. Added EINTR treatment.
  3226. * src/SocketCore.cc
  3227. * src/AbstractDiskWriter.cc
  3228. Rewritten.
  3229. * src/Util.cc (rangedFileCopy)
  3230. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3231. Fixed typo.
  3232. * src/version_usage.cc
  3233. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3234. Implemented. Now -c option works fine.
  3235. * src/DefaultPieceStorage.cc (markPiecesDone)
  3236. * test/DefaultPieceStorageTest.cc
  3237. Removed.
  3238. * src/SegmentMan.{h, cc}
  3239. (markAllPiecesDone)
  3240. (markPieceDone)
  3241. Synchronized po files with
  3242. https://translations.launchpad.net/aria2/trunk/+pots/aria2c
  3243. * src/fr.po
  3244. * src/ru.po
  3245. * src/de.po
  3246. * src/ja.po
  3247. 2007-11-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3248. Added ifdef and some modifications to compile without BitTorrent,
  3249. Metalink, MessageDigest
  3250. support.
  3251. * src/PieceHashCheckIntegrityEntry.cc
  3252. * src/MetalinkEntry.h
  3253. * src/version_usage.cc
  3254. * src/main.cc
  3255. * src/DownloadEngine.{h, cc}
  3256. * src/Metalink2RequestGroup.cc
  3257. * src/Peer.cc
  3258. * src/RequestGroup.cc
  3259. * src/MetalinkHelper.cc
  3260. * test/DefaultPieceStorageTest.cc
  3261. * test/MetalinkPostDownloadHandlerTest.cc
  3262. * test/Metalink2RequestGroupTest.cc
  3263. Hide TOTAL SPD when all downloads complete.
  3264. * src/ConsoleStatCalc.cc
  3265. Log target system information.
  3266. * src/main.cc
  3267. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3268. Now --metalink-location accepts a comma-deliminated list of locations.
  3269. * src/MetalinkEntry.{h, cc}
  3270. * test/MetalinkEntryTest.cc
  3271. * src/version_usage.cc
  3272. * src/Metalink2RequestGroup.cc
  3273. * src/Xml2MetalinkProcessor.cc
  3274. * test/Xml2MetalinkProcessorTest.cc
  3275. * doc/aria2c.1.txt
  3276. * doc/aria2c.1
  3277. * src/Util.cc (toUpper)(toLower): Rewritten.
  3278. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3279. Added the ability to detect duplicate download entry which is about to
  3280. download the same file other RequestGroup is downloading.
  3281. * src/RequestGroup.cc
  3282. * src/HttpResponseCommand.cc
  3283. * src/FtpNegotiationCommand.cc
  3284. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3285. Recalculates download progress when loading a control file,
  3286. if the piece length of DownloadContext is different from the one saved
  3287. in the control file. Currently in-flight pieces are ignored.
  3288. * src/DefaultBtProgressInfoFile.cc
  3289. * test/DefaultBtProgressInfoFileTest.cc
  3290. * src/Util.{h, cc}
  3291. * test/UtilTest.cc
  3292. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3293. Do not rotate tiers in announce-list.
  3294. * src/DefaultBtAnnounce.{h, cc}: Removed trackerNumTry.
  3295. AnnounceList::allTiersFailed() used instead to detect whether all
  3296. tiers are tried and failed.
  3297. * test/DefaultBtAnnounceTest.cc
  3298. * src/AnnounceList.{h, cc}: If all tiers are tried and failed then
  3299. allTiersFailed() returns true. To reset tier pointer, call resetTier();
  3300. * test/AnnounceListTest.cc
  3301. * src/TrackerWatcherCommand.cc (execute): Removed DlAbortEx catch
  3302. clause. Catch RecoverableException instead of DlRetryEx instead.
  3303. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3304. Implemented checksum validation feature(1 checksum for each file)
  3305. The validation takes place after the download.
  3306. * src/PieceHashCheckIntegrityEntry.{h, cc}: New class.
  3307. * src/IteratableChecksumValidator.{h, cc}: Rewritten.
  3308. * src/CheckIntegrityCommand.cc: Changed log message.
  3309. * src/Metalink2RequestGroup.cc: Set checksum to
  3310. SingleFileDownloadContext.
  3311. * src/StreamCheckIntegrityEntry.{h, cc}: Now derived from
  3312. PieceHashCheckIntegrity class.
  3313. * src/BtCheckIntegrityEntry.{h, cc}: Now derived from
  3314. PieceHashCheckIntegrity class.
  3315. * src/ChecksumCheckIntegrityEntry.{h, cc}: New class.
  3316. * src/IteratableValidator.h: New class.
  3317. * src/message.h
  3318. * src/CheckIntegrityEntry.{h, cc}
  3319. * src/IteratableChunkChecksumValidator.{h, cc}
  3320. * src/SingleFileDownloadContext.h
  3321. * src/DownloadCommand.cc
  3322. --allow-overwrite=true is no longer needed to check file integrity
  3323. before download in BitTorrent download.
  3324. * src/RequestGroup.cc (getInitialCommand)
  3325. Removed RequestGroup from queue when RequestGroup::getInitialCommand()
  3326. throws exception.
  3327. * src/RequestGroupMan.cc (getInitialCommands)
  3328. 2007-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3329. urlencode the given url inside Request::parseUrl(...)
  3330. * src/Request.{h, cc}
  3331. * src/Util.{h, cc}
  3332. * test/RequestTest.cc
  3333. Removed #!metalink3! notation support because it is deleted from
  3334. the metalink specification.
  3335. * src/Request.{h, cc}
  3336. * test/RequestTest.cc
  3337. 2007-11-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3338. Don't connect server before checking file integrity at startup, if
  3339. filesize and output file path are known.
  3340. * src/AbstractCommand.cc
  3341. * src/StreamFileAllocationEntry.cc
  3342. * src/Metalink2RequestGroup.cc
  3343. * src/RequestGroup.{h, cc}
  3344. * src/HttpResponseCommand.cc
  3345. * src/FtpNegotiationCommand.cc
  3346. Added DownloadFailureException. If it is thrown, RequestGroup should
  3347. halt.
  3348. * src/AbstractCommand.cc
  3349. * src/DownloadFailureException.h
  3350. * src/RequestGroup.cc
  3351. Catch RecoverableException, instead of DlAbortEx.
  3352. * src/RequestGroupMan.cc
  3353. * src/FillRequestGroupCommand.cc
  3354. * src/MetaFileUtil.cc
  3355. * src/IteratableChunkChecksumValidator.cc
  3356. Now first parameter of MSG_DOWNLOAD_ABORTED is gid(RequestGroup::
  3357. getGID())
  3358. * src/CheckIntegrityCommand.cc
  3359. * src/message.h
  3360. Print gid instead of idx.
  3361. * src/RequestGroupMan.cc
  3362. Removed exception throwers declaration.
  3363. * src/DirectDiskAdaptor.{h, cc}
  3364. * src/SocketCore.{h, cc}
  3365. * src/MultiDiskAdaptor.{h, cc}
  3366. * src/HttpConnection.{h, cc}
  3367. * src/HttpResponse.{h, cc}
  3368. * src/DiskAdaptor.{h, cc}
  3369. * src/CopyDiskAdaptor.{h, cc}
  3370. * src/MultiDiskAdaptor.{h, cc}
  3371. * src/HttpHeaderProcessor.{h, cc}
  3372. * src/AbstractSingleDiskAdaptor.{h, cc}
  3373. * src/Util.{h, cc}
  3374. * test/UtilTest.cc
  3375. * src/DefaultDiskWriter.{h, cc}
  3376. * src/FtpConnection.{h, cc}
  3377. * src/AbstractDiskWriter.{h, cc}
  3378. Removed duplicate code.
  3379. * src/StreamCheckIntegrityEntry.cc
  3380. Removed unnecessary include.
  3381. * src/DiskWriter.h
  3382. Included Exception.h
  3383. * src/option_processing.cc
  3384. Included 2 files and added doc
  3385. * src/TrackerWatcherCommand.cc
  3386. * src/SocketCore.cc (writeData): Fixed send error with GnuTLS.
  3387. 2007-11-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3388. Changed CheckIntegrityEntry interface so that it can define
  3389. the action when all the chunk checksums are valid.
  3390. * src/CheckIntegrityEntry.h
  3391. * src/StreamCheckIntegrityEntry.{h, cc}
  3392. * src/BtCheckIntegrityEntry.{h, cc}: Currently,when all the checksums
  3393. are valid, then aira2 goes to seeding mode. Sometimes it is better
  3394. to exit rather than doing seeding. So, it would be good to toggle this
  3395. behavior.
  3396. * src/CheckIntegrityCommand.cc
  3397. * src/AbstractCommand.cc
  3398. * src/RequestGroup.cc
  3399. 2007-11-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3400. Reflect the download length of in-flight pieces.
  3401. It makes the download length readout more precise.
  3402. * src/DefaultPieceStorage.{h, cc}
  3403. * test/DefaultPieceStorageTest.cc
  3404. * src/a2functional.h
  3405. * test/a2functionalTest.cc
  3406. Lower CPU load when --max-download-limit is used.
  3407. There is up and down in speed indicator when enabling
  3408. http-pipelining but a download goes well. I think the problem is that
  3409. because http-pipelining is enabled, DownloadCommand is created for
  3410. each segment and in its constructor, PeerStat::downloadStart() is
  3411. called. In PeerStat::downloadStart(), speed calculation object is
  3412. reseted, which makes download speed zero.
  3413. * src/DownloadCommand.cc
  3414. Rewritten using accumulate.
  3415. * src/RequestGroupMan.cc (calculateStat)
  3416. Code clearnup.
  3417. * src/FtpNegotiationCommand.cc
  3418. * src/HttpResponseCommand.cc
  3419. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3420. Fixed: Can not resume: aria2 reports download already finished.
  3421. * src/AbstractCommand.{h, cc}
  3422. * src/HttpResponseCommand.cc
  3423. * src/FtpNegotiateCommand.cc
  3424. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3425. Now a file is stored in the directory specified in .metalnk file
  3426. (file[@name]).
  3427. * src/Metalink2RequestGroup.cc
  3428. Create the directory structure when opening the file if it doesn't
  3429. exist.
  3430. * src/AbstractDiskWriter.cc
  3431. * src/Util.{h, cc}
  3432. * src/File.h
  3433. * test/UtilTest.cc
  3434. Removed file name comparison
  3435. * src/Metalink2RequestGroup.cc
  3436. * src/HttpResponseCommand.cc
  3437. Rewritten using Util::mkdirs()
  3438. * src/FileEntry.cc (setupDir)
  3439. * test/FileEntryTest.cc
  3440. Updated doc
  3441. * src/SingleFileDownloadContext.h
  3442. 2007-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3443. Now SleepCommand dispatches nextCommand when halt is requested.
  3444. It avoids a possible long wait after hitting CTRL-C.
  3445. * src/SleepCommand.{h, cc}
  3446. * src/RequestGroupAware.{h, cc}
  3447. 2007-11-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3448. Fixed: the listen port sent to the tracker is wrong. If aria2 fails
  3449. to open listen port, then remove the port number from the tracker
  3450. request.
  3451. * src/DefaultBtAnnounce.cc
  3452. * test/DefaultBtAnnounceTest.cc
  3453. * test/MockPieceStorage.h
  3454. Inject randomizer to DefaultBtAnnounce and DefaultBtContext to make
  3455. them more testable.
  3456. * src/DefaultBtAnnounce.{h, cc}
  3457. * src/DefaultBtContext.{h, cc}
  3458. * src/Util.{h, cc}
  3459. * test/DefaultBtAnnounceTest.cc
  3460. * test/DefaultBtContextTest.cc
  3461. * test/UtilTest.cc
  3462. Added 'B' to upload bytes readout.
  3463. * src/ConsoleStatCalc.cc
  3464. Now the listen port for BitTorrent download is opened when it is
  3465. needed.
  3466. * src/DownloadEngineFactory.cc
  3467. * src/BtSetup.{h, cc}
  3468. * src/PeerListenCommand.{h, cc}
  3469. Now an exception thrown while parsing tracker response is now logged.
  3470. If DlAbortEx is catched, then btAnnounce->resetAnnounce() immediately
  3471. called, which means no retry is made in this case, assuming a tracker
  3472. has a problem.
  3473. * src/TrackerWatcherCommand.cc
  3474. Fixed: downloading a file whose length is unkown fails.
  3475. * src/DownloadCommand.cc
  3476. Simplified prepareForNextSegment()
  3477. * src/DownloadCommand.cc
  3478. Updated
  3479. * po/POTFILES.in
  3480. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3481. Re-implemented a file listing for Metalink, which was dropped while
  3482. http/ftp/torrent integration was being implemented.
  3483. * src/MetalinkHelper.{h, cc}: New class.
  3484. * test/MetalinkHelperTest.cc
  3485. * src/main.cc
  3486. * src/Metalink2RequestGroup.cc
  3487. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3488. Added the ability to display the detailed torrent file information.
  3489. Now -S option gives not only a file listing, but also total download
  3490. length, info hash, announce URI, piece length, the number of pieces,
  3491. and mode(single or multi-torrent).
  3492. * src/DefaultBtContext.{h, cc} (operator<<): New function.
  3493. * src/Util.cc (toStream): Show file length in a abbreviated form(like
  3494. KiB)
  3495. * test/UtilTest.cc
  3496. * src/main.cc
  3497. 2007-10-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3498. Added ftp://USER:PASSWD@Servername automatic parsing.
  3499. * src/Request.{h, cc}: Removed AuthResolvers. Added _username and
  3500. _password. Recognize username and password in URI.
  3501. * src/main.cc: Use AuthConfigFactory instead of RequestFactory.
  3502. * src/RequestGroup.cc: Use AuthConfigFactory instead of RequestFactory.
  3503. * src/RequestFactory.{h, cc}: Removed.
  3504. * src/AuthConfigFactory.{h, cc}: New class.
  3505. * src/FtpConnection.cc: Use AuthConfigFactory.
  3506. * src/HttpRequest.cc: Use AuthConfigFactory.
  3507. * test/HttpRequestTest.cc: Updated.
  3508. * test/RequestTest.cc: Updated.
  3509. * test/AuthConfigFactoryTest.cc: New class.
  3510. * test/RequestFactoryTest.cc: Removed.
  3511. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3512. Use RequestGroup::allDownloadFinished() to decide whether the control
  3513. file should be removed or saved.
  3514. * src/RequestGroup.{h, cc} (allDownloadFinished): New function.
  3515. * src/RequestGroupMan.cc (removeStoppedGroup) (save)
  3516. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3517. Use File::renameTo()
  3518. * src/DefaultBtProgressInfoFile.cc
  3519. Added --no-file-allocation-limit command-line option.
  3520. * src/version_usage.cc
  3521. * src/option_processing.cc
  3522. * src/OptionHandlerFactory.cc
  3523. * src/RequestGroup.{h, cc}
  3524. * src/BtCheckIntegrityEntry.cc
  3525. * src/StreamCheckIntegrityEntry.cc
  3526. * src/prefs.h
  3527. * doc/aria2c.1.txt
  3528. * doc/aria2c.1
  3529. Now prealloc is the default value for --file-allocation option.
  3530. * src/version_usage.cc
  3531. * src/option_processing.cc
  3532. * doc/aria2c.1.txt
  3533. * doc/aria2c.1
  3534. Don't URL-encode user-agent.
  3535. * src/HttpRequest.cc
  3536. Updated translations
  3537. * po/LINGUAS: Added nl for Dutch translation.
  3538. * po/nl.po: Added Dutch translation, thanks to A. Bram Neijt.
  3539. * po/de.po: Updated German translation, thanks to Patrick Ruckstuhl.
  3540. * po/POTFILES.in: Updated.
  3541. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3542. Added the ability to recognize url-list in a torrent file.
  3543. The retrieved URLs are attached to the corresponding FileEntry.
  3544. * src/DefaultBtContext.{h, cc}
  3545. * src/FileEntry.{h, cc}
  3546. * test/DefaultBtContextTest.cc
  3547. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3548. * src/ConsoleStatCalc.cc: Let the user know that aria2 is now seeding
  3549. after the download finishes.
  3550. 2007-10-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3551. * src/Piece.{h, cc}: Added SubPiece infrastructure to track down
  3552. the data smaller than block length.
  3553. A block length can be specified by constructor's argument.
  3554. * src/DefaultPieceStorage.{h, cc} (getMissingPiece):
  3555. Get a missing piece in the range of given FileEntry. This function is
  3556. not used in the program yet.
  3557. * src/Util.h: Added some macros.
  3558. 2007-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3559. Added HTTP/1.1 keep alive and pipelining support.
  3560. See --enable-http-keep-alive and --enable-http-pipelining option.
  3561. * src/AbstractCommand.{h, cc}: Now it has one-to-many relation to
  3562. Segment.
  3563. * src/HttpDownloadCommand.{h, cc}
  3564. * src/OptionHandlerFactory.cc
  3565. * src/HttpConnection.{h, cc}
  3566. * src/version_usage.cc
  3567. * src/HttpInitiateConnectionCommand.cc
  3568. * src/FtpInitiateConnectionCommand.cc
  3569. * src/Segment.h
  3570. * src/HttpRequestCommand.{h, cc}
  3571. * src/option_processing.cc
  3572. * src/prefs.h
  3573. * src/HttpResponseCommand.cc
  3574. * src/SegmentMan.{h, cc}
  3575. * src/FtpNegotiateCommand.cc
  3576. * src/HttpProxyResponseCommand.cc
  3577. * src/Request.cc
  3578. * src/HttpRequest.cc
  3579. * src/DownloadCommand.cc
  3580. * test/HttpRequestTest.cc
  3581. * test/RequestTest.cc
  3582. 2007-10-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3583. * src/ConsoleCalc.cc (calculateStat): Hide SPD after the download
  3584. finished.
  3585. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3586. * src/Metalink2RequestGroup.cc (generate): Throw exception instead of
  3587. catching it inside the method.
  3588. When no file entry is found in a metalink without querying user
  3589. preferences, throw the exception with the error message that suggests
  3590. metalink file is probably broken.
  3591. * src/RequestGroup.cc (postDownloadProcessing): Catch exception here.
  3592. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3593. Fixed the bug that prevents remote Metalink/Torrent file from begin
  3594. processed.
  3595. * src/RequestGroupMan.cc (removeStoppedGroup)
  3596. Added debug message.
  3597. * src/BtPostDownloadHandler.cc
  3598. * src/MetalinkPostDownloadHandler.cc
  3599. * src/PostDownloadHandler.{h, cc}
  3600. * src/RequestGroup.cc
  3601. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3602. * src/Request.cc (parseUrl): Removed unnecessary slashes around dir.
  3603. 2007-10-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3604. * src/MultiUrlRequestInfo.h: Updated the message shown when program
  3605. stops and there are any unfinished or in-progress downloads.
  3606. Added the legend of "stat".
  3607. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3608. Throw exception when chunck checksum verification fails.
  3609. * src/DownloadCommand.cc (validatePieceHash): New function.
  3610. * src/PiecedSegment.{h, cc} (clear): New function.
  3611. * src/GrowSegment.{h, cc} (clear): New function.
  3612. * src/Segment.h (clear): New function.
  3613. * src/SegmentMan.{h, cc} (validatePieceHash): Removed.
  3614. * test/SegmentTest.cc
  3615. * test/GrowSegmentTest.cc
  3616. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3617. Do not send referer when redirected.
  3618. * src/Request.cc (redirectUrl)
  3619. * test/RequestTest.cc
  3620. * test/HttpRequestTest.cc
  3621. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3622. Implemented BitTorrent/http/ftp integrated download.
  3623. I've rewritten lots of files and now some headers have forward
  3624. class declarations to reduce compile time.
  3625. The implementation is extremely alpha stage, I recommend to use this
  3626. for testing purpose only.
  3627. 2007-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3628. Fixed the compilation error on 64bit platform.
  3629. * test/HttpHeaderProcessorTest.cc
  3630. 2007-09-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3631. Merged Ross's patch that fixes compilation problem in MinGW
  3632. * test/DefaultBtProgressInfoFileTest.cc
  3633. 2007-09-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3634. Updated fr.po by sebone
  3635. * po/fr.po
  3636. Updated man page.
  3637. * doc/aria2c.1.txt
  3638. * Release 0.11.3
  3639. 2007-09-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3640. * src/MetalinkRequestInfo.cc (execute): Fixed BitTorrent download
  3641. failure in Metalink.
  3642. 2007-09-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3643. Automatically save *.aria2 control file of http/ftp download in every
  3644. 60 seconds.
  3645. * src/AutoSaveCommand.{h, cc}: New class.
  3646. * src/TimeBasedCommand.{h, cc}: New class.
  3647. * src/DownloadEngineFactory.cc (newConsoleEngine)
  3648. Disable parameterized URI support by default. Added -P option to
  3649. enable the feature.
  3650. * src/prefs.h: Added PREF_PARAMETERIZED_URI
  3651. * src/OptionHandlerFactory.cc
  3652. * src/main.cc: Also updated usages for -Z and --auto-file-renaming
  3653. Updated Japanese translation.
  3654. * po/ja.po
  3655. Updated man page.
  3656. * doc/aria2c.1.txt
  3657. * Release 0.11.3-rc
  3658. 2007-09-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3659. Now *.aria2 contorol file is first saved to *.aria2__temp and if
  3660. it is successful, then renamed to *.aria2.
  3661. This prevents *.aria2 file from being truncated or corrupted when
  3662. file system becomes out of space.
  3663. * src/DefaultBtProgressInfoFile.cc (save)
  3664. * src/SegmentMan.cc (save)
  3665. * test/DefaultBtProgressInfoFileTest.cc (testSave): Implemented.
  3666. 2007-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3667. Reduced the fragmentation of bitfield in http/ftp download.
  3668. * src/BitfieldMan.cc (getSparseMissingUnusedIndex)
  3669. * test/BitfieldManTest.cc
  3670. 2007-08-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3671. Added the ability to disable segmented download in .metalink.
  3672. aria2 can now recognize 'maxconnections' attribute in 'resources' and
  3673. 'url' tag.
  3674. * src/MetalinkEntry.{h, cc}
  3675. * src/RequestResource.{h, cc}
  3676. * src/MetalinkRequestInfo.cc
  3677. * src/Xml2MetalinkProcessor.cc
  3678. * test/Xml2MetalinkProcessorTest.cc
  3679. 2007-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3680. Added parameterized URI support.
  3681. * src/main.cc: -Z option added.
  3682. * src/OptionHandlerFactory.cc
  3683. * src/prefs.h: Added PREF_FORCE_SEQUENTIAL.
  3684. * src/PStringDatum.h: New class.
  3685. * src/PStringSegment.{h,cc}: New class.
  3686. * src/PStringNumLoop.h: New class.
  3687. * src/PStringSelect.h: New class.
  3688. * src/NumberDecorator.h: New class.
  3689. * src/FixedWidthNumberDecorator.h: New class.
  3690. * src/AlphaNumberDecorator.h: New class.
  3691. * src/PStringVisitor.h: New class.
  3692. * src/PStringBuildVisitor.{h,cc}: New class.
  3693. * src/ParameterizedStringParser.{h,cc}: New class.
  3694. * src/Util.{h,cc}
  3695. (isNumber): New function.
  3696. (isLowercase): New function.
  3697. (isUppercase): New function.
  3698. (alphaToNum): New function.
  3699. * test/ParameterizedStringParserTest.cc: New class.
  3700. * test/AlphaNumberDecoratorTest.cc: New class.
  3701. * test/PStringBuildVisitorTest.cc: New class.
  3702. * test/UtilTest.cc
  3703. (testIsNumber): New function.
  3704. (testIsLowercase): New function.
  3705. (testIsUppercase): New function.
  3706. (testAlphaToNum): New function.
  3707. Added '\n' after the error message
  3708. * src/RequestInfo.h (printDownloadAbortMessage)
  3709. Added auto file renaming feature in http(s)/ftp download.
  3710. * src/main.cc: Added --auto-file-renaming command-line option.
  3711. * src/OptionHandlerFactory.cc
  3712. * src/prefs.h: Added PREF_AUTO_FILE_RENAMING
  3713. * src/RequestGroup.{h, cc}
  3714. (shouldCancelDownloadForSafety): Rewritten
  3715. (tryAutoFileRenaming): New function.
  3716. * src/SegmentMan.{h, cc} (shouldCancelDownloadForSafety): Removed.
  3717. * src/HttpResponseCommand.cc
  3718. (executeInternal): Removed the call to RequestGroupMan::
  3719. isSameFileBeingDownloaded()
  3720. * src/FtpNegotiateCommand.cc
  3721. (recvSize): Removed the call to RequestGroupMan::
  3722. isSameFileBeingDownloaded()
  3723. * test/RequestGroupTest.cc: New class.
  3724. 2007-08-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3725. Merged Ross's patch: Removed setmode(). Use _CRT_fmode to enable binary
  3726. IO.
  3727. * src/DefaultBtProgressInfoFile.cc
  3728. * src/MetaFileUtil.cc
  3729. * src/SimpleLogger.cc
  3730. * src/SegmentMan.cc
  3731. * src/Util.cc
  3732. * src/Platform.cc
  3733. 2007-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3734. * src/Xml2MetalinkProcessor.cc (getPieceHash): Added missing .c_str().
  3735. 2007-08-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3736. Avoid sparse files if possible, because VFAT32 doesn't support it.
  3737. * src/DefaultDiskWriter.cc (initAndOpenFile)
  3738. Fixed the bug that prevents file allocation is not done when
  3739. dowloading multi-torrent file.
  3740. * src/AbstractDiskWriter.cc (openFile)
  3741. Increase the maximum number of -j option from 15 to 45.
  3742. * src/OptionHandlerFactory.cc (createOptionHandlers)
  3743. Added fr.po, thanks to Charles Landemaine.
  3744. * po/fr.po
  3745. * po/LINGUAS
  3746. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  3747. gcc 3.4.4 support:
  3748. * src/DefaultBtContext.cc: int32_t -> int
  3749. * src/main.cc: int -> int32_t, int32_t -> int
  3750. * src/messageDigest.h: uint32_t -> unsigned int
  3751. * src/NameResolver.h: int32_t -> int
  3752. * src/PeerConnection.cc: int -> int32_t
  3753. * src/SpeedCalc.cc: int32_t -> int
  3754. * src/TrackerUpdateCommand.h: int -> int32_t
  3755. * src/Util.cc: int32_t -> int
  3756. * src/Util.h: int32_t -> int
  3757. * src/Xml2MetalinkProcessor.cc: int -> uint32_t, int64_t -> uint64_t
  3758. * test/AnnounceListTest.cc: int -> int32_t
  3759. * test/ChunkedEncodingTest.cc: int -> int32_t
  3760. * test/DataTest.cc: int -> int32_t
  3761. * test/DefaultBtRequestFactoryTest.cc: int -> int32_t
  3762. * test/DefaultPeerListProcessorTest.cc: int -> int32_t
  3763. * test/DefaultPieceStorageTest.cc: int -> int32_t
  3764. * test/FeatureConfigTest.cc: int -> int32_t
  3765. * test/MetalinkEntryTest.cc: int -> int32_t
  3766. * test/MockBtRequestFactory.h: int -> int32_t
  3767. * test/MockPieceStorage.h: int -> int32_t
  3768. * test/OptionTest.cc: int -> int32_t
  3769. * test/RequestTest.cc: int -> int32_t
  3770. * test/SegmentManTest.cc: int -> int32_t
  3771. * test/Xml2MetalinkProcessorTest.cc: int -> int32_t
  3772. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  3773. Move sleep functions to Util class:
  3774. * src/Util.cc
  3775. (sleep): New function.
  3776. (usleep): New function.
  3777. * src/DownloadCommand.cc: sleep -> Util::sleep
  3778. * test/TimeSeedCriteriaTest.cc: sleep -> Util::sleep
  3779. MinGW build enhancements. The following files are added:
  3780. * src/timegm.{c,h}
  3781. Changes to support the above new files:
  3782. * configure.ac
  3783. * src/Makefile.am
  3784. * src/a2time.h
  3785. * src/Util.cc:
  3786. * src/strptime.c: Added support for %Z option.
  3787. Fixed MinGW non-blocking bug.
  3788. * src/SocketCore.cc
  3789. * src/HttpRequestCommand.cc
  3790. Miscellenous build fixes/enhancements.
  3791. * configure.ac: Added summary report.
  3792. * src/Platform.h: Tweaked #include's.
  3793. * src/a2netcompat.h: Tweaked #include's.
  3794. * src/strptime.h: Tweaked #include's.
  3795. * src/gai_strerror.c: Tweaked #include's.
  3796. * src/gai_strerror.h: _D_GETADDRINFO_H -> _D_GAI_STRERROR_H
  3797. * src/getaddrinfo.h: Moved #ifndef __MINGW32__
  3798. * src/gettimeofday.h: Added HAVE_CONFIG_H
  3799. 2007-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3800. Increased the initial connection size in BitTorrent download to 40.
  3801. * src/BtRuntime.h
  3802. Added the usage message of --peer-id-prefix option.
  3803. * src/main.cc
  3804. * Release 0.11.2
  3805. 2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3806. MessageDigestHelper is introduced in order to simplify the use
  3807. of message digest. Removed repeated code.
  3808. The message digest algorithm is now specified by string, like "sha1",
  3809. "md5".
  3810. * src/messageDigest.{h, cc}
  3811. * src/MessageDigestHelper.{h, cc}: New class.
  3812. * src/DefaultPieceStorage.cc
  3813. * src/DefaultBtContext.{h, cc}
  3814. (computeFastSet): New function.
  3815. (setInfoHash): Added for unit testing.
  3816. (setNumPieces): Added for unit testing.
  3817. * src/DefaultBtInteractive.cc
  3818. * src/BtPieceMessage.cc
  3819. * src/Peer.cc
  3820. * src/Checksum.h
  3821. * src/message.h
  3822. * src/IteratableChecksumValidator.h
  3823. * src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator
  3824. inside it.
  3825. * src/SegmentMan.{h, cc}
  3826. (checkIntegrity): Removed.
  3827. * src/IteratableChunkChecksumValidator.{h, cc}
  3828. * src/Util.h
  3829. (sha1Sum): Removed.
  3830. (simpleMessageDigest): Removed.
  3831. (fileChecksum): Removed.
  3832. (computeFastSet): Removed.
  3833. * src/ShaVisitor.cc
  3834. * src/ChunkChecksum.h
  3835. * src/DownloadCommand.cc
  3836. Removed messageDigest virtual functions.
  3837. * src/MultiDiskAdaptor.{h, cc}
  3838. * src/DiskAdaptor.h
  3839. * src/ByteArrayDiskWriter.h
  3840. * src/DiskWriter.h
  3841. * src/DiskAdaptorWriter.h
  3842. * src/AbstractSingleDiskAdaptor.{h, cc}
  3843. * src/AbstractDiskWriter.{h, cc}
  3844. Fixed comilation error when message digest is disabled.
  3845. * src/MetalinkEntry.{h, cc}
  3846. * src/MetalinkRequestInfo.cc
  3847. Removed srandom and random.
  3848. * src/SimpleRandomizer.h
  3849. Added size() virtual function to DiskAdaptor
  3850. * src/MultiDiskAdaptor.h
  3851. Fixed the bug that causes that files are not opened correctly in
  3852. multi-file torrent.
  3853. * src/TorrentRequestInfo.cc
  3854. * src/MultiDiskAdaptor.cc
  3855. Added SHA256 support
  3856. * src/messageDigest.cc
  3857. * src/Xml2MetalinkProcessor.cc
  3858. Show supported message digest algorithms
  3859. * src/main.cc
  3860. Updated contact info.
  3861. * src/main.cc
  3862. Applied Ross's patch
  3863. * src/a2netcompat.h
  3864. * src/main.cc
  3865. Fixed the bug that prevents a remote metalink from not being processed
  3866. even if '-o foo.metalink' is specified.
  3867. * src/MetalinkRequestInfo.cc
  3868. 2007-08-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3869. Merged Dan's patch:
  3870. * src/ByteArrayDiskWriter.cc: ios_base -> ios
  3871. Use va_copy to avoid core dump on amd64:
  3872. * src/SimpleLogger.cc
  3873. Updated contact info.
  3874. * src/main.cc
  3875. Added #ifdef ENABLE_MESSAGE_DIGEST to fix test errors when message
  3876. digest is not available.
  3877. * src/MetalinkEntry.h
  3878. 2007-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3879. Make a2netcompat.h include a2io.h to fix compilation error:
  3880. * src/a2netcompat.h
  3881. * src/SocketCore.cc: Removed include of a2io.h
  3882. * src/Util.cc: Removed include of a2io.h
  3883. Gather time related functions to a2time.h:
  3884. * src/a2time.h: New file.
  3885. * src/DefaultPeerStorage.cc
  3886. * src/SimpleLogger.cc
  3887. * src/Util.{h, cc}
  3888. * src/SimpleRandomizer.h
  3889. * src/TimeA2.{h,cc}
  3890. * src/DownloadCommand.cc
  3891. * src/main.cc
  3892. Removed #ifdef __MINGW32__ since gai_strerror is included in
  3893. a2netcompat.h:
  3894. * src/NameResolver.cc
  3895. Fixed compilation error without openssl:
  3896. * src/SocketCore.{h,cc}: Moved include of openssl/err.h to SocketCore.h
  3897. Added default block to suppress compiler warnings:
  3898. * src/MetalinkRequestInfo.cc (AccumulateNonP2PUrl::operator())
  3899. 2007-07-26 Ross Smith II <aria2spam at smithii dot com>
  3900. MinGW build enhancements. The following files are added:
  3901. * src/gai_strerror.{c,h}
  3902. * src/gettimeofday.{c,h}
  3903. Changes to support the above new files:
  3904. * configure.ac
  3905. * src/Makefile.am
  3906. * src/a2netcompat.h
  3907. * src/TimeA2.cc
  3908. * src/DefaultPeerStorage.cc
  3909. * src/NameResolver.cc: removed mingw_strerror() function.
  3910. * src/SocketCore.cc: removed mingw_strerror() function.
  3911. Miscellaneous MinGW build fixes.
  3912. * src/a2io.h: Use _lseeki64() instead of lseek()
  3913. * src/common.h
  3914. * src/DefaultFileAllocator.cc
  3915. * src/GlowFileAllocator.cc
  3916. * src/main.cc: Moved #include "prefs.h" to quiet compile error.
  3917. * src/NameResolver.cc
  3918. (callback): Changed int32_t to int.
  3919. (resolve): Changed int32_t to int.
  3920. * src/Platform.cc
  3921. * src/Platform.h
  3922. * test/MultiDiskWriterTest.cc
  3923. * test/PeerMessageUtilTest.cc
  3924. * src/localtime_r.c: Add DeleteCriticalSection() and at exit().
  3925. Other enhancements and fixes.
  3926. * src/HttpRequestCommand.cc
  3927. (executeInternal) Use non-blocking socket for HTTPS (MinGW only).
  3928. * src/SocketCore.cc:
  3929. (error): New function to abstract errno/WSAGetLastError().
  3930. (errorMsg): New function to abstract errno/WSAGetLastError().
  3931. (initiateSecureConnection): Added more detailed error reporting.
  3932. * src/SocketCore.h: Added private variable blocking, to allow
  3933. proper handling of OpenSSL psuedo-errors.
  3934. * src/message.h
  3935. (EX_SSL_INIT_FAILURE)
  3936. (EX_SSL_IO_ERROR)
  3937. (EX_SSL_PROTOCOL_ERROR)
  3938. (EX_SSL_UNKNOWN_ERROR)
  3939. (EX_SSL_CONNECT_ERROR)
  3940. (EX_SOCKET_BLOCKING)
  3941. (EX_SOCKET_NONBLOCKING)
  3942. (EX_SOCKET_UNKNOWN_ERROR)
  3943. * src/Util.cc
  3944. (setGlobalSignalHandler): Renamed signal to sig as signal is a
  3945. reserved name.
  3946. (httpGMT): Fixed typo.
  3947. 2007-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3948. Merged Ross's win32 patch(manually)
  3949. In the course of merging, following files are added.
  3950. * src/strptime.{h,c}
  3951. * src/libgen.{h,c}
  3952. * src/inet_aton.{h,c}
  3953. * src/Platform.{h,cc}
  3954. * src/localtime_r.{h,c}
  3955. * src/getaddrinfo.{h,c}
  3956. I've gethered network related things, and put them to following file:
  3957. * src/a2netcompat.h
  3958. Also io related things are put to following file:
  3959. * src/a2io.h
  3960. Changed %lld to %s because mingw32 doesn't recognize %lld.
  3961. * src/message.h
  3962. (MSG_ALLOCATION_COMPLETED)
  3963. (EX_TOO_LARGE_FILE)
  3964. (EX_SIZE_MISMATCH)
  3965. (EX_FILE_OFFSET_OUT_OF_RANGE)
  3966. (EX_INVALID_CHUNK_CHECKSUM)
  3967. (EX_INVALID_RANGE_HEADER)
  3968. * src/FileAllocationCommand.cc
  3969. * src/HttpResponse.cc
  3970. * src/RequestGroup.cc
  3971. * src/MultiDiskAdaptor.cc
  3972. * src/OptionHandlerImpl.h
  3973. * src/HttpResponseCommand.cc
  3974. * src/FtpNegotiateCommand.cc
  3975. * src/IteratableChecksumValidator.cc
  3976. * src/SegmentMan.cc
  3977. * src/ChunkChecksumValidator.cc
  3978. Added Randomizer::getRandomNumber(long int)
  3979. * src/Randomizer.h (getRandomNumber)
  3980. * src/SimpleRandomizer.h (getRandomNumber)
  3981. * src/BitfieldMan.cc (getMissingIndexRandomly): Use this new function.
  3982. * src/Util.cc (randomAlpha): Use this new function.
  3983. 2007-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3984. Converted int's to in32_t. long long int's are also converted to
  3985. int64_t
  3986. 2007-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3987. Fixed the bug that prevents cookies from being sent to the server
  3988. if the domain of cookie is FQDN and starts with ".".
  3989. * src/Cookie.cc (match)
  3990. To add the ability to change peer id.
  3991. * src/DefaultBtContext.h
  3992. (_peerIdPrefix): New variable
  3993. (setPeerIdPrefix): New function.
  3994. * src/torrentRequestInfo.cc
  3995. (execute): Set the option value of PREF_PEER_ID_PREFIX to
  3996. DefaultBtContext.
  3997. * src/main.cc (main): Added peer-id-prefix command-line option.
  3998. The usage message is not added yet.
  3999. * src/DefaultBtContext.cc
  4000. (generatePeerId): Use _peerIdPrefix.
  4001. * src/prefs.h (PREF_PEER_ID_PREFIX): New definition.
  4002. 2007-07-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4003. Fixed the bug that prevents filename in content-disposition from
  4004. being retrieved when filename is not quoted.
  4005. * src/Util.cc (getContentDispositionFilename)
  4006. Fixed the bug that causes infinate loop and memory leak when file open
  4007. operation failed.
  4008. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  4009. 2007-07-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4010. Fixed the bug that causes segfault when all URIs specified are
  4011. unsupported.
  4012. * src/RequestGroupMan.cc (getInitialCommands)
  4013. Check if RequestGroup::createNextCommand() returns empty list of
  4014. commands.
  4015. * src/RequestGroup.cc (createNextCommand)
  4016. Change log level from info to error so that users can notice that
  4017. an error occurred.
  4018. Fixed the bug that causes segfault when a zero-sized file is
  4019. downloaded.
  4020. * src/BitfieldMan.cc (isAllBitSet)
  4021. Return true if bitfieldLength is 0.
  4022. 2007-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4023. * src/main.cc
  4024. (showUsage): Added 3 usage examples for metalink download.
  4025. Replace MetalinkChunkChecksum with ChunkChecksum.
  4026. * src/MetalinkChunkChecksum.h: Removed.
  4027. * src/MetalinkEntry.h: MetalinkChunkChecksum -> ChunkChecksum.
  4028. * src/Xml2MetalinkProcessor.h: MetalinkChunkChecksum -> ChunkChecksum.
  4029. * src/Xml2MetalinkProcessor.cc
  4030. (getPieceHash): Use ChunkChecksum instead of MetalinkChunkChecksum.
  4031. * src/MetalinkRequestInfo.cc (execute)
  4032. * Release 0.11.1
  4033. 2007-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4034. Reads URIs from stdin when "-i -" is specified.
  4035. * src/UriFileListParser.h, src/UriFileListParser.cc: Removed.
  4036. * src/UriListParser.h, src/UriListParser.cc: New class.
  4037. * src/StreamUriListParser.h: New class.
  4038. * src/FileUriListParser.h: New class.
  4039. * src/main.cc (main): Use StreamUriListParser and FileUriListParser
  4040. instead of UriFileListParser.
  4041. 2007-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4042. Made console readout more readable.
  4043. * src/ConsoleDownloadEngine.cc (sendStatistics)
  4044. 2007-07-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4045. Fix the bug that causes -s option not to work.
  4046. * src/main.cc (main)
  4047. * src/a2algo.h: New file.
  4048. 2007-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4049. Create directory structure specified in metalink file.
  4050. * src/RequestGroup.h, src/RequestGroup.cc
  4051. (initAndOpenFile): Create a directory to store files if it does not
  4052. exist.
  4053. (getDir): New function.
  4054. Added ETA and download speed for an individual file to readout.
  4055. * src/ConsoleDownloadEngine.cc (sendStatistics)
  4056. * src/RequestGroup.h
  4057. (calculateDownloadSpeed): New function.
  4058. 2007-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4059. Made -S option work with metalink file and provided selective download
  4060. to metalink.
  4061. * src/MetalinkEntry.h, src/MetalinkEntry.cc
  4062. (filename): Removed.
  4063. (file): New variable.
  4064. (size): Removed.
  4065. (operator=): Updated.
  4066. (getPath): New function.
  4067. (getLength): New function.
  4068. (toFileEntry): New function.
  4069. * src/TorrentRequestInfo.h, src/TorrentRequestInfo.cc
  4070. (execute): Use toStream.
  4071. (showFileEntry): Removed.
  4072. * src/MetalinkRequestInfo.h
  4073. (targetFiles): New variable.
  4074. (setTargetFiles): New variable.
  4075. * src/MetalinkRequestInfo.cc
  4076. (execute): Added the ability to print file information included in
  4077. a metalink file.
  4078. Added selective download mode to metalink.
  4079. * src/main.cc
  4080. (showUsage): Updated to denote that -S and --select-file options are
  4081. applicable to metalink.
  4082. * src/FileEntry.h
  4083. (operator=): New function.
  4084. (getBasename): New function.
  4085. (getDirname): New function.
  4086. * src/Util.h, src/Util.cc
  4087. (toStream): New function.
  4088. * src/Xml2MetalinkProcessor.cc: Updated.
  4089. Made aria2 work with metalink with directory structure.
  4090. * src/File.h, src/File.cc
  4091. (getBasename): New function.
  4092. (getDirname): New function.
  4093. * src/RequestGroup.h, src/RequestGroup.cc
  4094. (_topDir): New variable.
  4095. (setTopDir): New function.
  4096. (initSegmentMan): A directory structure is added to _segmentMan->dir.
  4097. Rewrote HTTP header parsing with stringstream.
  4098. * src/HttpConnection.h, src/HttpConnection.cc
  4099. (HttpRequestEntry): New class.
  4100. (headerBuf): Removed.
  4101. (headerBufLength): Removed.
  4102. (outstandingHttpRequests): Now its element type is
  4103. HttpRequestEntryHandle.
  4104. (findEndOfHeader): Removed.
  4105. (receiveResponse): Rewritten.
  4106. * src/HttpHeaderProcessor.h, src/HttpHeaderProcessor.cc: New class.
  4107. Updated doc for -j option to notice that it should be used with -i
  4108. option.
  4109. * src/main.cc (showUsage)
  4110. Removed unused classes.
  4111. * src/RequestInfo.h
  4112. (FileInfo): Removed.
  4113. (checksum): Removed.
  4114. (fileInfo): Removed.
  4115. (setChecksum): Removed.
  4116. (getChecksum): Removed.
  4117. (getFileInfo): Removed.
  4118. Use ISO units.
  4119. * src/ConsoleDownloadEngine.cc
  4120. * src/TorrentConsoleDownloadEngine.cc
  4121. * src/Util.cc (abbrevSize)
  4122. 2007-06-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4123. Added the default listening ports to the help message.
  4124. * src/main.cc (showUsage)
  4125. 2007-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4126. Reduce the number of calls to gettimeofday to lower CPU load.
  4127. * src/TimeA2.h, src/TimeA2.cc (differenceInMillis): New function.
  4128. * src/SpeedCalc.h, src/SpeedCalc.cc (calculateSpeed): New function.
  4129. * src/Peer.h (calculateUploadSpeed): New function.
  4130. (calculateDownloadSpeed): New function.
  4131. * src/DefaultPeerStorage.cc
  4132. (CalculateStat): Added _now variable.
  4133. In operator(), call Peer::calculateDownloadSpeed(const struct timeval&)
  4134. and Peer::calculateUploadSpeed(const struct timeval&)
  4135. Drop connection if no request or piece message is exchanged in
  4136. a certain interval.
  4137. * src/DefaultBtInteractive.h
  4138. (btRuntime): New variable.
  4139. (inactiveCheckPoint): New variable.
  4140. (checkActiveInteraction): New function.
  4141. * src/DefaultBtInteractive.cc (receiveMessages): Reset timer when
  4142. request or piece message is received.
  4143. (checkActiveInteraction): New function.
  4144. (doInteractionProcessing): Call checkActiveInteraction.
  4145. Fixed the bug that causes remote Metalink and Torrent files are not
  4146. processed.
  4147. * src/MultiUrlRequestInfo.cc (createNextRequestInfo): Fixed the bug.
  4148. 2007-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4149. Changed format of log file.
  4150. * src/SimpleLogger.cc
  4151. * Release 0.11.0
  4152. 2007-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4153. * src/AbstractCommand.cc
  4154. (execute): Changed log level of MSG_RESTARTING_DOWNLOAD and
  4155. MSG_MAX_TRY from error to info.
  4156. Added MSG_DOWNLOAD_ABORTED after MSG_MAX_TRY.
  4157. * src/message.h
  4158. (MSG_TORRENT_DOWNLOAD_ABORTED): New definition.
  4159. (MSG_DOWNLOAD_ABORTED): Added %s.
  4160. (MSG_RESTARTING_DOWNLOAD): Added %s.
  4161. (MSG_DOWNLOAD_ALREADY_COMPLETED): Updated.
  4162. * src/PeerAbstractCommand.cc
  4163. (execute): MSG_DOWNLOAD_ABORTED -> MSG_TORRENT_DOWNLOAD_ABORTED
  4164. * src/Request.h
  4165. (cookieBox): Made ShardHandle.
  4166. * src/RequestGroup.h, src/RequestGroup.cc
  4167. (createNextCommandWithAdj): New function.
  4168. * src/FileAllocationCommand.cc
  4169. (executeInternal): Use createNextCommandWithAdj().
  4170. * src/CheckIntegrityCommand.cc
  4171. (executeInternal): Use createNextCommandWithAdj().
  4172. Added --load-cookies command-option.
  4173. * src/OptionHandlerFactory.cc
  4174. (createOptionHandlers): Added PREF_LOAD_COOKIES.
  4175. * src/CookieBox.h, src/CookieBox.cc: Rwritten using CookieParser.
  4176. Now aria2 can handle cookie's expiration date.
  4177. * src/Cookie.h (expires): Changed its type to time_t.
  4178. * src/main.cc: Added --load-cookies command-line option.
  4179. * src/prefs.h (PREF_LOAD_COOKIES): New definition.
  4180. * src/Util.h, src/Util.cc (httpGMT): New function.
  4181. * src/Request.cc (Request): Initialize cookieBox using
  4182. CookieBoxFactory.
  4183. * src/CookieBoxFactory.h, src/CookieBoxFactory.cc: New class.
  4184. * src/CookieParser.h, src/CookieParser.cc: New class.
  4185. * src/main.cc: Chagned the default value of --metalink-servers to 5.
  4186. * src/HttpResponseCommand.cc
  4187. (handleOtherEncoding): Call RequestGroup::shouldCancelDownloadForSafety
  4188. * src/MetalinkRequestInfo.cc: Now -s option is ignored in Metalink
  4189. download.
  4190. 2007-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4191. Added -j command-line option.
  4192. * src/OptionHandlerFactory.cc (createOptionHandlers)
  4193. * src/main.cc
  4194. * src/ByteArrayDiskWriter.h, src/ByteArrayDiskWriter.cc
  4195. Rewritten using stringstream.
  4196. * src/TrackerUpdateCommand.h, src/TrackerUpdateCommand.cc
  4197. Rewritten using stringstream.
  4198. 2007-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4199. Make download size shown in MB, KB.
  4200. * src/ConsoleDownloadEngine.h (sendStatistics)
  4201. * src/Util.h, srcUtil.cc (abbrevSize): New function.
  4202. 2007-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4203. Accept incoming connections if download rate is low.
  4204. * src/PeerListenCommand.h, src/PeerListenCommand.cc:
  4205. (_lowestSpeedLimit): New variable.
  4206. (setLowestSpeedLimit): New function.
  4207. (execute): Accept incoming connections if download rate is low.
  4208. MAX_PEERS is ignored in this case.
  4209. Disable PREF_OUT in multiple concurrent download:
  4210. * src/RequestGroup.h, src/RequestGroup.cc
  4211. (setUserDefinedFilename): New function.
  4212. * src/DownloadEngineFactory.cc
  4213. (newConsoleEngine): Do not set PREF_OUT to requestGroup in multiple
  4214. concurrent download.
  4215. * src/DefaultSegmentManFactory.cc
  4216. (createNewInstance): Comment out the line: segmentMan->ufilename = ...
  4217. 2007-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4218. RequestGroup::getNextCommand() was renamed to createNextCommand().
  4219. Added its overloaded method.
  4220. * src/RequestGroup.h
  4221. (_numConcurrentCommand): New variable.
  4222. (setNumConcurrentCommand): New function.
  4223. * src/RequestGroup.cc
  4224. Abort download if same file is being downloaded concurrently.
  4225. * src/RequestGroup.h, src/RequestGroupMan.cc
  4226. (isSameFileBeingDownloaded): New function.
  4227. * src/HttpResponseCommand.cc (executeInternal)
  4228. * src/FtpNegotiateCommand.cc (recvSize)
  4229. * src/message.h (EX_DUPLICATE_FILE_DOWNLOAD): New definition.
  4230. * main.cc: Added help message for -i option.
  4231. 2007-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4232. * src/FileAllocationCommand.cc: Derived from RealtimeCommand.
  4233. * src/CheckIntegrityCommand.cc: Derived from RealtimeCommand.
  4234. * src/MetalinkEntry.h
  4235. (checksum): Changed to ChecksumHandle
  4236. * src/MetalinkRequestInfo.cc
  4237. (checksum): Changed to ChecksumHandle
  4238. * src/File.cc
  4239. (mkdirs): OPEN_MODE -> DIR_OPEN_MODE
  4240. * src/common.h
  4241. (DIR_OPEN_MODE): New definition
  4242. * src/RequestGroup.cc
  4243. (prepareForNextAction): Added an argument.
  4244. * src/message.h
  4245. (MSG_GOOD_CHECKSUM): New definition
  4246. (MSG_BAD_CHECKSUM): New definition
  4247. * src/HttpResponseCommand.cc
  4248. (handleDefaultEncoding): Continue download sequence in new
  4249. non-segmented download.
  4250. * src/FileAllocationEntry.h
  4251. (_nextDownloadCommand): New variable.
  4252. * src/DownloadCommand.cc
  4253. (prepareForNextSegment): Create ChecksumCommand if checksum is
  4254. available.
  4255. * src/RealtimeCommand.h, src/RealtimeCommand.cc: New class.
  4256. * src/IteratableChecksumValidator.h,
  4257. src/IteratableChecksumValidator.cc: New class.
  4258. * src/ChecksumCommand.h, src/ChecksumCommand.cc: New class.
  4259. 2007-05-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4260. Change file mode to 666:
  4261. * src/common.h (OPEN_MODE): New definition.
  4262. * src/File.cc
  4263. * src/Util.cc
  4264. * src/Directry.cc
  4265. * src/AbstractDiskWriter.cc
  4266. Change the level of log message "download aborted" to debug:
  4267. * src/PeerAbstractCommand.cc (execute)
  4268. * src/RequestGroup.h (RequestGroup): Initialized _hintTotalLength to 0.
  4269. * src/TrackerWatcherCommand.cc
  4270. (createCommand): Sleep some seconds after request failed.
  4271. If tracker request fails more than value of PREF_TRACKER_MAX_TRIES,
  4272. then abort tracker request.
  4273. 2007-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4274. * Added the simultaneous download feature.
  4275. * src/main.cc: Print "Exception caught: " when exception is caught.
  4276. Use CUIDCounter instead of BtRuntime::getNewCuid():
  4277. * src/ActivePeerConnectionCommand.cc
  4278. * src/PeerInteractionCommand.cc
  4279. * src/BtRuntime.h
  4280. (cuidCounter): Removed.
  4281. (getNewCuid): Removed.
  4282. * src/DownloadEngineFactory.cc
  4283. * src/PeerListenCommand.cc
  4284. * src/TrackerUpdateCommand.cc
  4285. * src/PeerInitiateConnectionCommand.cc
  4286. 2007-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4287. * src/PeerAbstractCommand.cc
  4288. (onAbort): Call PeerStorage::returnPeer()
  4289. * src/DefaultPeerStorage.h, src/DefaultPeerStorage.cc
  4290. (incomingPeers): New variable.
  4291. (addIncomingPeer): New function.
  4292. (returnPeer): New function.
  4293. (onErasingPeer): New function.
  4294. (addPeer): push_back -> push_front
  4295. (getActivePeers): Rewritten.
  4296. (calculateStat): Rewritten.
  4297. * src/PeerStorage.h
  4298. (TransferStat::copy): New function.
  4299. (TransferStat::TransferStat): New function.
  4300. (TransferStat::operator=): New function.
  4301. (addIncomingPeer): New function.
  4302. (returnPeer): New function.
  4303. * src/PeerListenCommand.cc
  4304. (execute): Use PeerStorage::addIncomingPeer() instead of
  4305. Peer::addPeer().
  4306. 2007-04-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4307. Connect to a peer actively when download speed is lower than specified
  4308. speed in torrent download:
  4309. * src/ActivePeerConnectionCommand.h: New class.
  4310. 2007-03-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4311. * src/HttpRequest.cc (createRequest): url-encode user-agent
  4312. * src/main.cc: Fixed the bug that prevents download if .netrc
  4313. doesn't exist.
  4314. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4315. To cache resolved hostname:
  4316. * src/AbstractCommand.h, src/AbstractCommand.cc
  4317. (resolveHostname): Put outside #ifdef ENABLE_ASYNC_DNS clause.
  4318. Added dns cache.
  4319. * src/FtpInitiateConnectionCommand.cc
  4320. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS.
  4321. * src/NameResolver.h, src/NameResolver.cc: Added synchronized
  4322. NameResolver working without ares.
  4323. * src/TorrentRequestInfo.cc
  4324. (execute): Don't cache dns in torrent download.
  4325. * src/HttpInitiateConnectionCommand.cc
  4326. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS
  4327. * src/DNSCache.h: New class.
  4328. * src/UrlRequestInfo.cc
  4329. (execute): Use dns cache.
  4330. In http request, suppress port number in http request header if port
  4331. is 80 or 443:
  4332. * src/HttpRequest.cc (getHostText): Suppress port number in http
  4333. request header if port is 80 or 443.
  4334. (createProxyRequest): Allways send port number.
  4335. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4336. To add the command-line option which disables netrc support:
  4337. * src/OptionHandlerFactory.cc
  4338. (createOptionHandlers): Added PREF_NO_NETRC.
  4339. * src/main.cc: Added -n option.
  4340. * src/prefs.h (PREF_NO_NETRC): New definition.
  4341. * src/RequestFactory.cc: Do not use netrc in ftp if PREF_NO_NETRC is
  4342. V_TRUE.
  4343. Note that netrc is not used in http, http proxy even if PREF_NO_NETRC
  4344. is V_FALSE. This may get configurable in the future release.
  4345. To clear peer's error status by time basis:
  4346. * src/PeerAbstractCommand.cc
  4347. (onAbort): Call Peer::startBadCondition().
  4348. * src/Peer.h, src/Peer.cc
  4349. (error): Removed.
  4350. (_badConditionStartTime): New variable.
  4351. (_badConditionInterval): New variable. Initialized to 10 seconds.
  4352. (startBadCondition): New function.
  4353. (isGood): New function.
  4354. * src/DefaultPeerStorage.cc
  4355. (addPeer): Use Peer::isGood().
  4356. (FindFinePeer): Use Peer::isGood().
  4357. Always include port number in http request header:
  4358. * src/HttpRequest.cc (getHostText): Always include port number in
  4359. http request header.
  4360. 2007-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4361. To the ability to read options from a config file:
  4362. * src/main.cc: Command-line parameter validation is delegated to
  4363. OptionHandler class.
  4364. * src/OptionHandlerFactory.h, src/OptionHandlerFactory.cc: New class.
  4365. * src/Option.h, src/Option.cc (clear): New function.
  4366. * src/OptionParser.h, src/OptionParser.cc: New class.
  4367. * src/OptionHandler.h: New class.
  4368. * src/NameMatchOptionHandler.h: New class.
  4369. * src/OptionHandlerImpl.h: New classes.
  4370. * src/prefs.h: '_' -> '-'
  4371. (FTP_PASV_ENABLED): Renamed to FTP_PASV.
  4372. (FTP_PASV): New definition.
  4373. * src/Util.h, src/Util.cc (getRealSize): New function.
  4374. To disable netrc support if .netrc file does not have correct
  4375. permissions:
  4376. * src/File.h, src/File.cc (mode): New function.
  4377. To prevent confidential information to be logged:
  4378. * src/HttpConnection.h, src/HttpConnection.cc
  4379. (eraseConfidentialInfo): New function.
  4380. (sendRequest): Call eraseConfidentialInfo().
  4381. (sendProxyRequest): Call eraseConfidentialInfo().
  4382. * src/main.cc: Validate permissions of .netrc file.
  4383. To add --user-agent command-line option:
  4384. * src/main.cc: Added new command line option: --user-agent
  4385. * src/prefs.h (PREF_USER_AGENT): New definition.
  4386. * src/HttpRequestCommand.cc (executeInternal): Set user-agent option
  4387. parameter to HttpRequest object.
  4388. * src/AbstractProxyRequestCommand.cc
  4389. (executeInternal): Set user-agent option parameter to HttpRequest
  4390. object.
  4391. Marged the patches from Dan Fandrich.
  4392. 2007-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4393. Use filename and size from Metalink file instead of sending HEAD
  4394. request:
  4395. * src/UrlRequestInfo.h
  4396. (_filename): New variable.
  4397. (_totalLength): New variable.
  4398. (setTotalLength): New variable.
  4399. (setFilename): New variable.
  4400. * src/MetalinkRequestInfo.cc
  4401. (execute): Set filename and size to UrlRequestInfo
  4402. * src/UrlRequestInfo.cc
  4403. (execute): Use filename and size from Metalink instead of seding
  4404. HEAD request to servers.
  4405. 2007-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4406. To add the ability to resume downloading a partially downloaded file
  4407. which is downloaded from the beginning:
  4408. * src/FileAllocator.h: Made abstract class. New DefaultFileAllocator
  4409. takes this role.
  4410. * src/main.cc: Added -c option.
  4411. * src/BitfieldMan.h, src/BitfieldMan.cc (setBitRange): New function.
  4412. * src/DiskWriter.h (openExistingFile): Added totalLength argument.
  4413. * src/prefs.h (PREF_CONTINUE): New definition.
  4414. * src/SegmentMan.h, src/SegmentMan.cc (markPieceDone): New function.
  4415. * src/DefaultDiskWriter.cc
  4416. (createNewDiskWriter): Add GlowFileAllocator to the new object.
  4417. * src/AbstractDiskWriter.h
  4418. (glowFileAllocator): New variable.
  4419. * src/AbstractDiskWriter.cc
  4420. (openExistingFile): Now preallocate file space from the end of the
  4421. existing file if totalLength argument is specified and grater than 0.
  4422. * src/UrlRequestInfo.cc: If -c option is specified and the file
  4423. to download exists in local, continue the download of the file.
  4424. --allow-overwrite=true is assumed in this context.
  4425. * src/DefaultFileAllocator.h, src/DefaultFileAllocator.cc: New class.
  4426. * src/GlowFileAllocator.h, src/GlowFileAllocator.cc: New class.
  4427. Throw exception if --check-integrity=true is specified but chunk
  4428. checksums are not provided:
  4429. * src/UrlRequestInfo.cc
  4430. Do not print URLs to stdout:
  4431. * src/UrlRequestInfo.cc
  4432. 2007-03-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4433. * src/Request.h: Use AuthResolver to get authentication information.
  4434. * src/main.cc: Made RequestFactory a singleton object. Netrc is now
  4435. set to RequestFactory object.
  4436. * src/AuthConfigItem.h, src/AuthConfigItem.cc: Removed.
  4437. * src/AuthConfig.h, src/AuthConfig.cc: Rewritten.
  4438. * src/TrackerWatcherComand.cc: Use RequestFactorySingletonHolder to
  4439. create Request object.
  4440. 2007-03-19 Tatsuhiro Tsujikawa <tujikawa at valkyrie dot rednoah com>
  4441. To integrate Netrc into exsiting classes:
  4442. * src/Request.h
  4443. (_userDefinedAuthConfig): New variable.
  4444. (findNetrcAuthenticator): New function.
  4445. (segment): Removed.
  4446. (setUserDefinedAuthConfig): New function.
  4447. (resolveHttpAuthConfigItem): New function.
  4448. (resolveFtpAuthConfigItem): New function.
  4449. (resolveHttpProxyAuthConfigItem): New function.
  4450. * src/HttpRequest.h
  4451. (authConfig): Removed.
  4452. (proxyAuthConfig): Removed.
  4453. (setAuthConfig): Removed.
  4454. (setProxyAuthConfig): Removed.
  4455. * src/UrlRequest.h
  4456. (getHeadResult): Added a parameter: authConfigHandle
  4457. * src/common.h
  4458. (SingletonHolder.h): New include.
  4459. * src/main.cc
  4460. (Netrc.h): New include.
  4461. (main): Removed initial values of PREF_FTP_USER, PREF_FTP_PASSWD.
  4462. Added initial value of PREF_NETRC_PATH.
  4463. Added the initialization of netrc.
  4464. * src/AuthConfig.h: New class.
  4465. * src/prefs.h
  4466. (PREF_NETRC_PATH): New definition.
  4467. * src/HttpAuthConfig.h: Removed.
  4468. * src/Netrc.cc
  4469. (getRequiredNextToken): New function.
  4470. (skipMacdef): New function.
  4471. (parse): Rewritten.
  4472. * src/Netrc.h
  4473. (getRequiredNextToken): New function.
  4474. (skipMacdef): New function.
  4475. * src/Util.h, src/Util.cc
  4476. (getHomeDir): New function.
  4477. * src/TrackerWatcherComand.cc
  4478. (createRequestCommand): Use AuthConfig.
  4479. * src/FtpConnection.cc
  4480. (sendUser): Use Request::resolveFtpAuthConfigItem().
  4481. (sendPass): Use Request::resolveFtpAuthConfigItem().
  4482. * src/Request.cc
  4483. (findNetrcAuthenticator): New function.
  4484. (resolveHttpAuthConfigItem): New function.
  4485. (resolveFtpAuthConfigItem): New function.
  4486. (resolveHttpProxyAuthConfigItem): New function.
  4487. * src/UrlRequestInfo.cc: Use AuthConfig.
  4488. * src/HttpRequest.cc
  4489. (createRequest): Use authConfig.
  4490. (getProxyAuthString): Use authConfig.
  4491. (configure): Removed PREF_HTTP_USER, PREF_HTTP_PASSWD,
  4492. PREF_HTTP_PROXY_USER, PREF_HTTP_PROXY_PASSWD.
  4493. 2007-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4494. To reduce overhead to find commands whose socket is either
  4495. readable or writable in the download engine loop:
  4496. * src/Command.h, src/Command.cc
  4497. (STATUS): New enum.
  4498. (status): New variable.
  4499. (statusMatch): New function.
  4500. (setStatusActive): New function.
  4501. (setStatusInactive): New function.
  4502. * src/DownloadEngine.h, src/DownloadEngine.cc
  4503. (executeCommand): New function.
  4504. (run): Simplified.
  4505. (waitData): Call Command::setStatusActive() when command's socket is
  4506. readable or writable.
  4507. 2007-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4508. To handle Segment as SegmentHandle:
  4509. * src/AbstractCommand.cc (execute): Rewritten.
  4510. * src/SegmentMan.h: Segment -> SegmentHandle
  4511. Introducded HttpResponse class, HttpRequest class to improve code
  4512. extensiveness and make it clear:
  4513. * src/HttpDownloadCommand.cc: transfer encoders are now managed by
  4514. HttpResponse class.
  4515. * src/HttpRequest.h, src/HttpRequest.cc: New class.
  4516. * src/HttpResponse.h, src/HttpResponse.cc: New class.
  4517. * src/HttpConnection.cc: Contruction of http request were moved to
  4518. HttpRequest class.
  4519. * src/HttpResponseCommand.h, src/HttpResponseCommand.cc: Refactored.
  4520. * src/HttpRequestCommand.cc (executeInternal): Rewritten.
  4521. * src/HttpAuthConfig.h: New class.
  4522. * src/Range.h: New class.
  4523. To make FtpTunnel{Request, Response}Command and
  4524. HttpProxy{Request, Response}Command derived from
  4525. AbstractProxy{Request, Response}Command:
  4526. * src/FtpTunnelResponseCommand.h, src/FtpTunnelResponseCommand.cc:
  4527. Derived from AbstractProxyRequestCommand class.
  4528. * src/FtpTunnelRequestCommand.h, src/FtpTunnelRequestCommand.cc:
  4529. Derived from AbstractProxyResponseCommand class.
  4530. * src/HttpProxyRequestCommand.h, src/HttpProxyRequestCommand.cc:
  4531. Derived from AbstractProxyRequestCommand class.
  4532. * src/HttpProxyResponseCommand.h, src/HttpProxyResponseCommand.cc:
  4533. Derived from AbstractProxyResponseCommand class.
  4534. * src/AbstractProxyRequestCommand.h, src/AbstractProxyRequestCommand.cc
  4535. : New class.
  4536. * src/AbstractProxyResponseCommand.h,
  4537. src/AbstractProxyResponseCommand.cc: New class.
  4538. To add netrc support:
  4539. * src/Netrc.h, src/Netrc.cc: New class.
  4540. * src/Util.h, src/Util.cc (split): New function.
  4541. * src/HttpHeader.cc (getRange): Fixed so that it inspects
  4542. "Content-Range" header instead of "Range" header.
  4543. * src/HttpHeader.h
  4544. (getStatus): Removed.
  4545. (setStatus): Removed.
  4546. * src/Segment.h
  4547. (getPositionToWrite): New function.
  4548. 2007-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4549. * src/HttpHeader.h
  4550. (Range.h): New include.
  4551. (status): New variable.
  4552. (HttpHeader): Initialized status with 0.
  4553. (getStatus): New function.
  4554. (setStatus): New function.
  4555. (getRange): New function.
  4556. (HttpHeaderHandle): New function.
  4557. * src/HttpHeader.cc
  4558. (getRange): New function.
  4559. * src/Request.h
  4560. (RequestWeakHandle): New definition.
  4561. * src/HttpConnection.h
  4562. (HttpConnectionHandle): New type definition.
  4563. * src/HttpConnection.cc
  4564. (receiveResponse): Set HTTP status to headers.
  4565. * src/main.cc
  4566. (showUsage): Fixed typo.
  4567. * src/Segment.h
  4568. (SegmentHandle): New type definition.
  4569. * src/BitfieldMan.h
  4570. (getMissingUnusedLength): New function.
  4571. * src/BitfieldMan.cc
  4572. (getMissingUnusedLength): New function.
  4573. 2007-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4574. To fix static initialization order problem:
  4575. * src/BitfieldManFactory.h
  4576. (defaultRandomizer): Removed.
  4577. (factory): New variable.
  4578. (getNewFactory): Removed.
  4579. (getFactoryInstance): New function.
  4580. (setDefaultRandomizer): Rewritten.
  4581. (getDefaultRandomizer): Rewritten.
  4582. * src/BitfieldManFactory.cc
  4583. (defaultRandomizer): Removed.
  4584. (factory): Initialized to 0.
  4585. (BitfieldManFactory): Initialized randomizer to 0.
  4586. * src/DefaultPieceStorage.cc
  4587. (DefaultPieceStorage): getNewFactory() -> getFactoryInstance()
  4588. * src/Peer.cc
  4589. (Peer): getNewFactory() -> getFactoryInstance()
  4590. * src/SegmentMan.cc
  4591. (initBitfield): getNewFactory() -> getFactoryInstance()
  4592. * src/Piece.cc
  4593. (Piece): getNewFactory() -> getFactoryInstance()
  4594. 2007-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4595. To fix the bug that causes crash on Max OS X:
  4596. * src/SimpleRandomizer.h
  4597. (getInstance): Create new instance if the static variable is null.
  4598. * src/SimpleRandomizer.cc
  4599. (randomizer): Initialized to 0.
  4600. * src/BitfieldManFactory.h
  4601. (getNewFactory): Removed the call to setRandomizer().
  4602. To fix the miscalculation of the range of checksum:
  4603. * src/BitfieldMan.h
  4604. (isBitSetOffsetRange): New function.
  4605. * src/BitfieldMan.cc
  4606. (isBitSetOffsetRange): New function.
  4607. * src/SegmentMan.cc
  4608. (tryChunkChecksumValidation): Use BitfieldMan::isBitSetOffsetRange().
  4609. Use bitfield->getBlockLength() instead of segment.segmentLength.
  4610. * Release 0.10.1
  4611. 2007-02-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4612. To lower CPU usage in BitTorrent download when --max-upload-limit
  4613. command-line option specified:
  4614. * src/DefaultBtMessageDispatcher.cc
  4615. (sendMessages): Calculate uploading speed only when current message
  4616. is uploading data and is not sent yet.
  4617. * src/DefaultPeerStorage.h
  4618. (MAX_PEER_LIST_SIZE): 100 -> 60, because 60 is well enough.
  4619. * src/HttpResponseCommand.cc
  4620. (handleDefaultEncoding): Added the cast to int32_t to itos.
  4621. This fixes compile error in Soralis 10.
  4622. 2007-01-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4623. To fix segfault in Metalink download:
  4624. * src/UrlRequestInfo.h
  4625. (filename): Removed.
  4626. (totalLength): Removed.
  4627. (setTotalLength): Removed.
  4628. (setFilename): Removed.
  4629. * src/MetalinkRequestInfo.cc
  4630. (execute): Do not set filename and totalLength to reqInfo.
  4631. Set chunk checksum to reqInfo if it is not null.
  4632. * src/HttpResponseCommand.cc
  4633. (executeInternal): Fixed filename in log.
  4634. (handleDefaultEncoding): Removed the call to initBitfield() and
  4635. markAllPiecesDone().
  4636. (handleOtherEncoding): Added HEAD method handling.
  4637. * src/FtpNegotiateCommand.cc
  4638. (executeInternal): Added SEQ_HEAD_OK handling.
  4639. (recvSize): In HEAD handling, set sequence to SEQ_HEAD_OK and
  4640. return false.
  4641. * src/FtpNegotiateCommand.h
  4642. (SEQ_HEAD_OK): New definition.
  4643. * src/SegmentMan.cc
  4644. (initBitfield): Delete bitfield.
  4645. (isChunkChecksumValidationReady): Fixed the condition.
  4646. * src/UrlRequestInfo.cc: Fixed so that Metalink and Torrent download
  4647. works fine.
  4648. 2007-01-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4649. * src/Xml2MetalinkProcessor.h
  4650. (xpathExists): New function.
  4651. * src/Xml2MetalinkProcessor.cc
  4652. (xpathExists): New function.
  4653. Not to send HEAD request if filename and size are available in Metalink
  4654. file:
  4655. * src/UrlRequestInfo.h
  4656. (filename): New variable.
  4657. (totalLength): New variable.
  4658. (setTotalLength): New function.
  4659. (setFilename): New function.
  4660. * src/MetalinkRequestInfo.cc
  4661. (execute): Set filename and size to UrlRequestInfo.
  4662. * src/MetalinkEntry.cc
  4663. (MetalinkEntry): Initialize size with 0.
  4664. * src/UrlRequestInfo.cc
  4665. (execute): Set filename and size to SegmentMan.
  4666. Not to download rest of the files after selected files are downloaded
  4667. in BitTorrent:
  4668. * src/PieceStorage.h
  4669. (allDownloadFinished): New function.
  4670. * src/DefaultBtAnnounce.cc
  4671. (isCompleteAnnounceReady): Use allDownloadFinished instead of
  4672. downloadFinished.
  4673. (getAnnounceUrl): Use allDownloadFinished instead of downloadFinished.
  4674. * src/DefaultPieceStorage.cc
  4675. (completePiece): Use allDownloadFinished instead of downloadFinished.
  4676. Commented out the call to finishSelectiveDownloadingMode().
  4677. (downloadFinished): Call isFilteredAllBitSet() instead of
  4678. isAllBitSet().
  4679. (allDownloadFinished): New function.
  4680. * src/DefaultBtInteractive.cc
  4681. (addBitfieldMessageToQueue): Call allDownloadFinished() instead of
  4682. downloadFinished().
  4683. (checkHave): Call allDownloadFinished() instead of downloadFinished().
  4684. * src/TorrentDownloadEngine.cc
  4685. (onEndOfRun): Call allDownloadFinished() instead of downloadFinished().
  4686. * src/BitfieldMan.h
  4687. (isFilteredAllBitSet): New function.
  4688. * src/ShareRatioSeedCriteria.h
  4689. (PieceStorage.h): New include.
  4690. (pieceStorage): New variable.
  4691. (evaluate):
  4692. btContext->getTotalLength() -> pieceStorage->getCompletedLength()
  4693. * src/BitfieldMan.cc
  4694. (isFilteredAllBitSet): New function.
  4695. (isAllBitSet): Filter is not took into account.
  4696. Rename --force-truncate as --allow-overwrite:
  4697. * src/TorrentRequestInfo.cc
  4698. (execute): PREF_FORCE_TRUNCATE -> PREF_ALLOW_OVERWRITE
  4699. * src/main.cc
  4700. (showUsage): --force-truncate -> --allow-overwrite
  4701. * src/message.h
  4702. (EX_FILE_ALREADY_EXISTS): --force-truncate -> --allow-overwrite
  4703. * src/prefs.h
  4704. (PREF_FORCE_TRUNCATE): Removed.
  4705. (PREF_ALLOW_OVERWRITE): New definition.
  4706. * src/SegmentMan.cc
  4707. (shouldCancelDownloadForSafety): --force-truncate -> --allow-overwrite
  4708. * src/MetalinkRequestInfo.cc
  4709. (execute): Queueing message are now logged in info level.
  4710. * src/common.h
  4711. (LONG_LONG_MAX): Removed.
  4712. (LONG_LONG_MIN): Removed.
  4713. * src/HttpResponseCommand.cc
  4714. (handleDefaultEncoding): LONG_LONG_MAX -> INT64_MAX
  4715. * src/FtpNegotiateCommand.cc
  4716. (recvSize): LONG_LONG_MAX -> INT64_MAX
  4717. * src/main.cc
  4718. (showUsage): Added --check-integriy and --realtime-chunk-checksum
  4719. command-line option.
  4720. (main): Added --check-integriy and --realtime-chunk-checksum
  4721. command-line option.
  4722. --force-truncate -> --allow-overwrite
  4723. Set initial value of --check-integrity option to false.
  4724. Don't show usage when error occurs while persing command-line options.
  4725. Removed deprecated --upload-limit option.
  4726. 2007-01-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4727. * src/message.h: Added EX_INVALID_PAYLOAD_SIZE and
  4728. EX_INVALID_BT_MESSAGE_ID. Following source files affected.
  4729. * src/BtAllowedFastMessage.cc:
  4730. * src/BtBitfieldMessage.cc
  4731. * src/BtCancelMessage.cc
  4732. * src/BtChokeMessage.cc
  4733. * src/BtHaveAllMessage.cc
  4734. * src/BtHaveMessage.cc
  4735. * src/BtHaveNoneMessage.cc
  4736. * src/BtInterestedMessage.cc
  4737. * src/BtNotInterestedMessage.cc
  4738. * src/BtPieceMessage.cc
  4739. * src/BtPortMessage.cc
  4740. * src/BtRejectMessage.cc
  4741. * src/BtRequestMessage.cc
  4742. * src/BtSuggestPieceMessage.cc
  4743. * src/BtUnchokeMessage.cc
  4744. * src/message.h: Added EX_INVALID_CHUNK_CHECKSUM. Following source
  4745. files are affected.
  4746. * src/ChunkChecksumValidator.cc
  4747. * src/SegmentMan.cc
  4748. 2007-01-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4749. To add chunk checksum validation:
  4750. * src/MetalinkEntry.h
  4751. (MetalinkChunkChecksum.h): New include.
  4752. (chunkChecksum): New variable.
  4753. * src/Request.h
  4754. (method): New variable.
  4755. (setMethod): New function.
  4756. (getMethod): New function.
  4757. (METHOD_GET): New static constant.
  4758. (METHOD_HEAD): New static constant.
  4759. * src/Xml2MetalinkProcessor.h
  4760. (getPieceHash): New function.
  4761. * src/PieceStorage.h
  4762. (markAllPiecesDone): New function.
  4763. (checkIntegrity): New function.
  4764. * src/FileAllocator.h
  4765. (NullFileAllocationMonitor.h): New include.
  4766. (FileAllocator): Initialize fileAllocationMonitor with new
  4767. NullFileAllocationMonitor().
  4768. * src/MultiDiskAdaptor.h
  4769. (messageDigest.h): Remove include.
  4770. (ctx): Removed.
  4771. (hashUpdate): Added ctx.
  4772. (MultiDiskAdaptor): Removed ctx.
  4773. (sha1Sum): Renamed as messageDigest.
  4774. (messageDigest): New function.
  4775. * src/UrlRequestInfo.h
  4776. (HeadResult): New class.
  4777. (digestAlgo): New variable.
  4778. (chunkChecksumLength): New variable.
  4779. (chunkChecksums): New variable.
  4780. (getHeadResult): New function.
  4781. (UrlRequestInfo): Added digestAlgo, chunkChecksumLength.
  4782. (setDigestAlgo): New function.
  4783. (setChunkChecksumLength): New function.
  4784. (setChunkChecksums): New function.
  4785. * src/DefaultPieceStorage.cc
  4786. (DiskAdaptorWriter.h): New include.
  4787. (ChunkChecksumValidator.h): New include.
  4788. (markAllPiecesDone): New function.
  4789. (checkIntegrity): New function.
  4790. * src/DefaultBtContext.h
  4791. (getPieceHashes): New function.
  4792. * src/TorrentRequestInfo.cc
  4793. (execute): Try to validate chunk checksum if file already exists and
  4794. .aria2 file doesn't there and user allows aria2 to overwrite it.
  4795. * src/messageDigest.h
  4796. (~MessageDigestContext): Added digestFree().
  4797. * src/MetalinkRequestInfo.cc
  4798. (execute): Set digestAlgo, chunkChecksum, chunkChecksums to reqInfo.
  4799. * src/DiskAdaptor.h
  4800. (messageDigest.h): New include.
  4801. (sha1Sum): Renamed as messageDigest.
  4802. (messageDigest): New function.
  4803. * src/DownloadCommand.h
  4804. (PeerStat.h): New include.
  4805. (maxDownloadSpeedLimit): New variable.
  4806. (startupIdleTime): New variable.
  4807. (lowestDownloadSpeedLimit): New variable.
  4808. (peerStat): New variable.
  4809. (setMaxDownloadSpeedLimit): New function.
  4810. (setStartupIdleTime): New function.
  4811. (setLowestDownloadSPeedLimit): New function.
  4812. * src/BtContext.h
  4813. (getPieceHashes): New function.
  4814. * src/main.cc
  4815. (main): Set PREF_REALTIME_CHUNK_CHECKSUM and PREF_CHECK_INTEGRITY
  4816. option to true for testing purpose.
  4817. * src/BtPieceMessage.cc
  4818. (checkPieceHash): Use messageDigest
  4819. * src/DownloadEngine.cc
  4820. (SetDescriptor): Removed.
  4821. (AccumulateActiveCommand): Removed.
  4822. (waitData): Rewritten.
  4823. (updateFdSet): Rewritten.
  4824. * src/MultiDiskAdaptor.cc
  4825. (hashUpdate): Added ctx.
  4826. (sha1Sum): Renamed as messageDigest.
  4827. (messageDigest): New function.
  4828. * src/BitfieldMan.h
  4829. (isBitRangeSet): New function.
  4830. (unsetBitRange): New function.
  4831. * src/ByteArrayDiskWriter.h
  4832. (sha1Sum): Renamed as messageDigest.
  4833. (messageDigest): New function.
  4834. * src/ConsoleDownloadEngine.cc
  4835. (calculateStatistics): If nspeed < 0 then set nspeed to 0.
  4836. * src/DiskWriter.h
  4837. (messageDigest.h): New include.
  4838. (sha1Sum): Renamed as messageDigest.
  4839. (messageDigest): New function.
  4840. * src/ChunkChecksumValidator.h: New class.
  4841. * src/DiskAdaptorWriter.h: New class.
  4842. * src/prefs.h
  4843. (PREF_REALTIME_CHUNK_CHECKSUM): New definition.
  4844. (PREF_CHECK_INTEGRITY): New definition.
  4845. * src/HttpResponseCommand.cc
  4846. (handleDefaultEncoding): Added method "HEAD" handling.
  4847. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  4848. (handleOtherEncoding):
  4849. Added the call to e->segmentMan->shouldCancelDownloadForSafety().
  4850. (createHttpDownloadCommand): Set maxDownloadSpeedLimit,
  4851. startupIdleTime, lowestDownloadSpeedLimit to command.
  4852. * src/SegmentMan.h
  4853. (getSegmentEntryByIndex): New function.
  4854. (getSegmentEntryByCuid): New function.
  4855. (getSegmentEntryIteratorByCuid): New function.
  4856. (diskWriter): DiskWriter -> DiskWriterHandle
  4857. (pieceHashes): New variable.
  4858. (chunkHashLength): New variable.
  4859. (digestAlgo): New variable.
  4860. (FindPeerStat): Removed.
  4861. (getPeerStat): Rewritten.
  4862. (markAllPiecesDone): New function.
  4863. (checkIntegrity): New function.
  4864. (tryChunkChecksumValidation): New function.
  4865. (isChunkChecksumValidationReady): New function.
  4866. * src/BitfieldMan.cc
  4867. (BitfieldMan): Initialized bitfieldLength, blocks to 0.
  4868. (BitfieldMan): Initialized blockLength, totalLength, bitfieldLength,
  4869. blocks to 0.
  4870. (isBitRangeSet): New function.
  4871. (unsetBitRange): New function.
  4872. * src/FtpNegotiateCommand.cc
  4873. (executeInternal): Set maxDownloadSpeedLimit,
  4874. startupIdleTime, lowestDownloadSpeedLimit to command.
  4875. (recvSize): Added method "HEAD" handling.
  4876. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  4877. * src/AbstractSingleDiskAdaptor.cc
  4878. (sha1Sum): Renamed as messageDigest.
  4879. (messageDigest): New function.
  4880. * src/AbstractSingleDiskAdaptor.h
  4881. (sha1Sum): Renamed as messageDigest.
  4882. (messageDigest): New function.
  4883. * src/Util.h
  4884. (indexRange): New function.
  4885. * src/MetalinkEntry.cc
  4886. (MetalinkEntry): Initialized chunkChecksum to 0.
  4887. * src/ShaVisitor.cc
  4888. (~ShaVisitor): Removed the call to ctx.digestFree().
  4889. * src/SegmentMan.cc
  4890. (ChunkChecksumValidator.h): New include.
  4891. (SegmentMan): Initialized chunkHashLength to 0. Initialized digestAlgo
  4892. to DIGEST_ALGO_SHA1.
  4893. (~SegmentMan): Removed diskWriter.
  4894. (FindSegmentEntryByIndex): Removed.
  4895. (FindSegmentEntryByCuid): Removed.
  4896. (checkoutSegment): Rewritten.
  4897. (findSlowerSegmentEntry): Rewritten.
  4898. (getSegment): Rewritten.
  4899. (updateSegment): Rewritten.
  4900. (completeSegment): Rewritten.
  4901. (markAllPiecesDone): New function.
  4902. (checkIntegrity): New function.
  4903. (isChunkChecksumValidationReady): New function.
  4904. (tryChunkChecksumValidation): New function.
  4905. * src/Xml2MetalinkProcessor.cc
  4906. (getEntry): Get size and set it to entry.
  4907. Get chunk checksum and set it to entry.
  4908. (getPieceHash): New function.
  4909. * src/Util.cc
  4910. (sha1Sum): Removed ctx.digestFree()
  4911. (fileChecksum): Removed ctx.digestFree()
  4912. (indexRange): New function.
  4913. * src/Request.cc
  4914. (METHOD_GET): New variable.
  4915. (METHOD_HEAD): New variable.
  4916. (Request): Added method.
  4917. * src/UrlRequestInfo.cc
  4918. (FatalException.h): New include.
  4919. (message.h): New include.
  4920. (operator<<): Added operator<< for class HeadResult.
  4921. (getHeadResult): New function.
  4922. (execute): Get filename and size in separate download engine.
  4923. * src/ChunkChecksumValidator.cc: New class.
  4924. * src/DownloadCommand.cc:
  4925. (DownloadCommand): Added peerStat.
  4926. (executeInternal): Use maxDownloadSpeedLimit member instead of getting
  4927. the value from Option.
  4928. The buffer size is now 16KB.
  4929. Use peerStat member instead of getting it from SegmentMan.
  4930. Use startupIdleTime member instead of gettingit from Option.
  4931. Added chunk checksum validation.
  4932. * src/AbstractDiskWriter.cc
  4933. (AbstractDiskWriter): Removed ctx.
  4934. (~AbstractDiskWriter): Removed ctx.digestFree()
  4935. (writeDataInternal): Returns the return value of write.
  4936. (readDataInternal): Returns the return value of read.
  4937. (sha1Sum): Renamed as messageDigest
  4938. (messageDigest): New function.
  4939. * src/AbstractDiwkWriter.h
  4940. (messageDigest.h): Removed include.
  4941. (ctx): Removed.
  4942. (sha1Sum): Renamed as messageDigest
  4943. (messageDigest): New function.
  4944. * src/DefaultPieceStorage.h
  4945. (markAllPiecesDone): New function.
  4946. (checkIntegrity): New function.
  4947. * src/NullFileAllocationMonitor.h: New class.
  4948. * src/MetalinkChunkChecksum.h: New class.
  4949. 2007-01-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4950. To decrease CPU usage in bittorrent download, calculation results in
  4951. BitfieldMan were cached and realtime fetching PeerObject was removed
  4952. with WeakHandle introduced. Option values are set to the objects
  4953. by setter before download begins.
  4954. * src/DefaultBtRequestFactory.cc: Use messageFactory member.
  4955. * src/DefaultBtRequestFactory.h
  4956. (dispatcher): BtMessageDispatcherHandle ->
  4957. BtMessageDispatcherWeakHandle.
  4958. (messageFactory): New variable.
  4959. (setBtMessageDispatcher): BtMessageDispatcherHandle ->
  4960. BtMessageDispatcherWeakHandle.
  4961. (setBtMessageFactory): New function.
  4962. * src/DefaultBtMessageDispatcher.cc:
  4963. (sendMessages): Use maxUploadSpeedLimit instead of fetching the value
  4964. from Option.
  4965. (checkRequestSlotAndDoNecessaryThing): Use requestTimeout instead of
  4966. feating the value from Option.
  4967. Use messageFactory member.
  4968. * src/PeerInteractionCommand.cc
  4969. (PeerInteractionCommand): Added maxDownloadSpeedLimit.
  4970. Add reverse dependencies to factory object.
  4971. Set maxUploadSpeedLimit and requestTimeout and messageFactory to
  4972. dispatcher.
  4973. Set messageFactory to receiver.
  4974. Set keepAliveInterval and maxDownloadSpeedLimit and messageFactory to
  4975. btInteractive.
  4976. Set receiver to peerObject.
  4977. Set maxDownloadSpeedLimit to this.
  4978. (executeInternal): Use maxDownloadSpeedLimit member.
  4979. * src/BtChokeMessage.cc
  4980. (doReceivedAction): Use dispatcher, requestFactory member.
  4981. (onSendComplete): Use dispatcher member.
  4982. * src/PeerInteractionCommand.h
  4983. (maxDownloadSpeedLimit): New variable.
  4984. * src/DefaultBtMessageReceiver.h
  4985. (peerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  4986. (dispatcher):
  4987. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  4988. (messageFactory): New variable.
  4989. (setPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  4990. (getPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  4991. (setDispatcher):
  4992. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  4993. (setBtMessageFactory): New function.
  4994. * src/DefaultBtInteractive.cc
  4995. (initiateHandshake): Use messageFactory member.
  4996. (addBitfieldMessageToQueue): Use messageFactory member.
  4997. (addAllowedFastMessageToQueue): Use messageFactory member.
  4998. (decideChoking): Use messageFactory member.
  4999. (checkHave): Use messageFactory member.
  5000. (sendKeepAlive): Use keepAliveInterval, messageFactory member.
  5001. (receiveMessages): Use maxDownloadSpeedLimit member.
  5002. (decideInterest): Use messageFactory member.
  5003. * src/BtRequestMessage.cc
  5004. (doReceivedAction): Use messageFactory, dispatcher member.
  5005. (onQueued): Use dispatcher member.
  5006. * src/BtPieceMessage.cc
  5007. (doReceivedAction): Use dispatcher member.
  5008. (send): Use peerConnection member.
  5009. (onWrongPiece): Use requestFactory member.
  5010. (handleChokingEvent): Use messageFactory, dispatcher member.
  5011. (handleCancelSendingPieceEvent): Use messageFactory, dispatcher member.
  5012. * src/BtMessageDispatcher.h
  5013. (BtMessageDispatcherWeakHandle): New type definition.
  5014. * src/SimpleBtMessage.cc
  5015. (send): Use peerConnection member.
  5016. * src/BtRejectMessage.cc
  5017. (doReceivedAction): Use dispatcher member.
  5018. * src/DefaultBtMessageDispatcher.h
  5019. (Option.h): Removed include.
  5020. (messageFactory): New variable.
  5021. (option): Removed.
  5022. (maxUploadSpeedLimit): New variable.
  5023. (requestTimeout): New variable.
  5024. (DefaultBtMessageDispatcher): Removed option.
  5025. Added maxUploadSpeedLimit, requestTimeout.
  5026. (setOption): Removed.
  5027. (getOption): Removed.
  5028. (setMaxUploadSpeedLimit): New function.
  5029. (setRequestTimeout): New function.
  5030. (setBtMessageFactory): New function.
  5031. * src/DefaultBtInteractive.h
  5032. (btMessageReceiver):
  5033. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  5034. (dispatcher):
  5035. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  5036. (btRequestFactory):
  5037. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  5038. (peerConnection):
  5039. PeerConnectionHandle -> PeerConnectionWeakHandle
  5040. (messageFactory): New variable.
  5041. (option): Removed.
  5042. (keepAliveInterval): New variable.
  5043. (maxDownloadSpeedLimit): New variable.
  5044. (DefaultBtInteractive): Added keepAliveInterval, maxDownloadSpeedLimit.
  5045. (setBtMessageReceiver):
  5046. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  5047. (setDispatcher):
  5048. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  5049. (setBtRequestFactory):
  5050. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  5051. (setPeerConnection):
  5052. PeerConnectionHandle -> PeerConnectionWeakHandle
  5053. (setOption): Removed.
  5054. (setKeepAliveInterval): New function.
  5055. (setMaxDownloadSpeedLimit): New function.
  5056. (setBtMessageFactory): New function.
  5057. * src/BitfieldMan.h
  5058. (cachedNumMissingBlock): New variable.
  5059. (cachedNumFilteredBlock): New variable.
  5060. (cachedCompletedLength): New variable.
  5061. (cachedFilteredComletedLength): New variable.
  5062. (cachedFilteredTotalLength): New variable.
  5063. (countMissingBlockNow): New function.
  5064. (countFilteredBlockNow): New function.
  5065. (getFilteredTotalLengthNow): New function.
  5066. (getCompletedLengthNow): New function.
  5067. (getFilteredCompletedLengthNow): New function.
  5068. (updateCache): New function.
  5069. * src/AbstractBtMessage.h
  5070. (BtMessageDispatcher.h): New include.
  5071. (PeerConnection.h): New include.
  5072. (BtRequestFactory.h): New include
  5073. (BtMessageFactory.h): New include.
  5074. (dispatcher): New variable.
  5075. (messageFactory): New variable.
  5076. (peerConnection: New variable.
  5077. (setBtMessageDispatcher): New function.
  5078. (setPeerConnection): New function.
  5079. (setBtMessageFactory): New function.
  5080. (setBtRequestFactory): New function.
  5081. * src/DefaultBtMessageFactory.cc
  5082. (setCommonProperty): Set dispatcher, requestFactory, this,
  5083. peerConnection to msg.
  5084. * src/BtRegistry.h
  5085. (BT_MESSAGE_RECEIVER): New macro.
  5086. * src/PeerConnection.h
  5087. (PeerConnectionWeakHandle): New type definition.
  5088. * src/BtMessageFactory.h
  5089. (BtMessageFactoryWeakHandle): New type definition.
  5090. * src/BitfieldMan.cc
  5091. (BitfieldMan): Added cachedNumMissingBlock, cachedNumFilteredBlock,
  5092. cachedCompletedLength, cachedFilteredComletedLength,
  5093. cachedFilteredTotalLength.
  5094. Call updateCache().
  5095. (countMissingBlock): Return cachedNumMissingBlock.
  5096. (countMissingBlockNow): New function.
  5097. (countBlock): Return cachedNumFilteredBlock if filterEnabled is true.
  5098. (countFilteredBlockNow): New function.
  5099. (setBit): Call updateCache().
  5100. (unsetBit): Call updateCache().
  5101. (setBitfield): Call updateCache().
  5102. (clearAllBit): Call updateCache().
  5103. (setAllBit): Use setBitInternal instead of setBit.
  5104. Call updateCache().
  5105. (addFilter): Call updateCache().
  5106. (enableFilter): Call updateCache().
  5107. (disableFilter): Call updateCache().
  5108. (clearFilter): Call updateCache().
  5109. (getFilteredTotalLength): Return cachedFilteredTotalLength.
  5110. (getFilteredTotalLengthNow): New function.
  5111. (getCompletedLength): Return cachedCompletedLength.
  5112. (getCompletedLengthNow): New function.
  5113. (getFilteredCompletedLength): Return cachedFilteredComletedLength.
  5114. (getFilteredCompletedLengthNow): New function.
  5115. (updateCache): New function.
  5116. * src/BtMessageReceiver.h
  5117. (BtMessageReceiverWeakHandle): New type definition.
  5118. * src/DefaultBtMessageReceiver.cc
  5119. (receiveHandshake): Use messageFactory member.
  5120. (sendHandshake): Use messageFactory member.
  5121. (receiveMessage): Use messageFactory member.
  5122. * src/DefaultBtMessageFactory.h
  5123. (dispatcher): New variable.
  5124. (requestFactory): New variable.
  5125. (peerConnection): New variablle.
  5126. (setBtMessageDispatcher): New function.
  5127. (setBtRequestFactory): New function.
  5128. (setPeerConnection): New function.
  5129. * src/SharedHandle.h
  5130. (RefCount): New class.
  5131. (WeakHandle): New class.
  5132. * src/PeerObject.h
  5133. (BtMessageReceiver.h): New include.
  5134. (PeerObject): Added btMessageReceiver.
  5135. (btMessageReceiver): New variable.
  5136. * src/Util.cc
  5137. (countBit): Simplified.
  5138. * src/BtCancelMessage.cc
  5139. (doReceivedAction): Use dispatcher member.
  5140. * src/BtRequestFactory.h
  5141. (BtRequestFactoryWeakHandle): New type definition.
  5142. * src/PeerStorage.h
  5143. (downloadSpeed): int -> uint32_t
  5144. (uploadSpeed): int -> uint32_t
  5145. (sessionDownloadLength): long long int -> uint64_t
  5146. (sessionUploadLength): long long int -> uint64_t
  5147. 2007-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5148. To add RecoverableException, FatalException:
  5149. * src/AbstractCommand.cc
  5150. (onAbort): Exception -> RecoverableException
  5151. * src/PeerAbstractCommand.h
  5152. (RecoverableException.h): New include.
  5153. (onAbort): Exception -> RecoverableException.
  5154. * src/PeerInteractionCommand.cc
  5155. (onAbort): Exception -> RecoverableException.
  5156. * src/PeerAbstractCommand.cc
  5157. (execute): Exception -> RecoverableException.
  5158. (onAbort): Exception -> RecoverableException.
  5159. * src/TorrentRequestInfo.cc
  5160. (execute): Exception -> RecoverableException.
  5161. * src/MetalinkRequestInfo.cc
  5162. (execute): Exception -> RecoverableException.
  5163. * src/MetaFileUtil.cc: RecoverableException.
  5164. * src/AbstractCommand.h
  5165. (onAbort): Exception -> RecoverableException.
  5166. * src/DlRetryEx.h: Exception -> RecoverableException.
  5167. * src/DlAbortEx.h: Exception -> RecoverableException.
  5168. * src/PeerListenCommand.cc: Exception -> RecoverableException.
  5169. * src/Util.cc: Exception -> RecoverableException.
  5170. * src/DefauldDiskWriter.cc: Exception -> RecoverableException.
  5171. * src/TrackerUpdateCommand.cc: Exception -> RecoverableException.
  5172. * src/UrlRequestInfo.cc: Exception -> RecoverableException.
  5173. To make ID static const int
  5174. * src/BtInterestedMessage.h
  5175. (ID_t): Removed.
  5176. (ID): New variable.
  5177. (getId): Made non-const.
  5178. * src/BtPieceMessage.h
  5179. (ID_t): Removed.
  5180. (ID): New variable.
  5181. (getId): Made non-const.
  5182. * src/BtChokeMessage.h
  5183. (ID_t): Removed.
  5184. (ID): New variable.
  5185. (getId): Made non-const.
  5186. * src/BtHaveAllMessage.h
  5187. (ID_t): Removed.
  5188. (ID): New variable.
  5189. (getId): Made non-const.
  5190. * src/BtKeepAliveMessage.h
  5191. (ID_t): Removed.
  5192. (ID): New variable.
  5193. (getId): Made non-const.
  5194. * src/BtHandshakeMessage.h
  5195. (ID): New variable.
  5196. (getId): Made non-const.
  5197. * src/BtSuggestPieceMessage.h
  5198. (ID_t): Removed.
  5199. (ID): New variable.
  5200. (getId): Made non-const.
  5201. * src/BtPortMessage.h
  5202. (ID_t): Removed.
  5203. (ID): New variable.
  5204. (getId): Made non-const.
  5205. * src/AbstractBtMessage.h
  5206. (id): Removed.
  5207. (AbstractBtMessage): Removed id.
  5208. (getId): Removed.
  5209. * src/BtHaveMessage.h
  5210. (ID_t): Removed.
  5211. (ID): New variable.
  5212. (getId): Made non-const.
  5213. * src/BtAllowedFastMessage.h
  5214. (ID_t): Removed.
  5215. (ID): New variable.
  5216. (getId): Made non-const.
  5217. * src/BtCancelMessage.h
  5218. (ID_t): Removed.
  5219. (ID): New variable.
  5220. (getId): Made non-const.
  5221. * src/BtNotInterestedMessage.h
  5222. (ID_t): Removed.
  5223. (ID): New variable.
  5224. (getId): Made non-const.
  5225. * src/BtChokeMessage.h
  5226. (ID_t): Removed.
  5227. (ID): New variable.
  5228. (getId): Made non-const.
  5229. * src/BtRejectMessage.h
  5230. (ID_t): Removed.
  5231. (ID): New variable.
  5232. (getId): Made non-const.
  5233. * src/BtBitfieldMessage.h
  5234. (ID_t): Removed.
  5235. (ID): New variable.
  5236. (getId): Made non-const.
  5237. * src/BtUnchokeMessage.h
  5238. (ID_t): Removed.
  5239. (ID): New variable.
  5240. (getId): Made non-const.
  5241. * src/BtRequestMessage.h
  5242. (ID_t): Removed.
  5243. (ID): New variable.
  5244. (getId): Made non-const.
  5245. * src/BtHaveMessage.h
  5246. (ID_t): Removed.
  5247. (ID): New variable.
  5248. (getId): Made non-const.
  5249. To add --force-truncate command-line option and a check whether
  5250. the file already exists:
  5251. * src/DirectDiskAdaptor.h
  5252. (getFilePath): Made virtual public.
  5253. * src/MultiDiskAdaptor.h
  5254. (File.h): New include.
  5255. (DiskWriterEntry::fileEntry): Made private.
  5256. (DiskWriterEntry::fileExists): New function.
  5257. (DiskWriterEntry::getFileEntry): New function.
  5258. (fileExists): New function.
  5259. (getFilePath): New function.
  5260. * src/TorrentRequestInfo.cc
  5261. (FatalException.h): New include.
  5262. (message.h): New include.
  5263. (RecoverableException.h): New include.
  5264. (execute): Added a check whether file is already exists or not.
  5265. * src/DiskAdaptor.h
  5266. (fileExists): New function.
  5267. (getFilePath): New function.
  5268. * src/main.cc
  5269. (showUsage): Added an explanation of --force-truncate command-line
  5270. option.
  5271. (main): Added --force-truncate command-line option.
  5272. * src/Exception.h
  5273. (setMsg): buf[256] -> buf[1024]
  5274. * src/CopyDiskWriter.h
  5275. (getFilePath): Made public virtual.
  5276. * src/MultiDiskAdaptor.cc: fileEntry -> getFileEntry()
  5277. (fileExists): New function.
  5278. * src/DownloadEngineFactory.cc
  5279. (newTorrentConsoleEngine): Don't open file here.
  5280. * src/message.h
  5281. (EX_FILE_ALREADY_EXISTS): New definition.
  5282. * src/prefs.h
  5283. (PREF_FOECE_TRUNCATE): New definition.
  5284. * src/HttpResponseCommand.cc
  5285. (handleDefaultEncoding): Added a check whether the file already exists.
  5286. * src/SegmentMan.h
  5287. (fileExists): New function.
  5288. (shouldCancelDownloadForSafety): New function.
  5289. * src/FtpNegotiateCommand.cc
  5290. (recvSize): Added a check whether the file already exists.
  5291. * src/AbstractSingleDiskAdaptor.cc
  5292. (File.h): New include.
  5293. (fileExists): New function.
  5294. * src/AbstractSingleDiskAdaptor.h
  5295. (getFilePath): Removed.
  5296. (fileExists): New function.
  5297. * src/SegmentMan.cc
  5298. (fileExists): New function.
  5299. (shouldCancelDownloadForSafety): New function.
  5300. To fix regression bug in torrent downloading:
  5301. * src/DefaultBtRequestFactory.cc
  5302. (doChokedAction): New function.
  5303. * src/DefaultBtRequestFactory.h
  5304. (doChokedAction): New function.
  5305. * src/DefaultBtMessageDispatcher.cc
  5306. (doChokedAction): Do not delete request if its target is in allowed
  5307. fast set.
  5308. * src/DefaultBtInteractive.cc
  5309. (doPostHandshakeProcessing): Added a call to sendPendingMessage().
  5310. (sendKeepAlive): Send keep alive message even if the outgoing message
  5311. queue is not empty.
  5312. (decideInterest): Simplified the code.
  5313. (fillPiece): Remove a call to dispatcher->doChokedAction() because
  5314. it is already called when BtChokeMessage is received from a peer.
  5315. * src/BtRequestFactory.h
  5316. (doChokedAction): New function.
  5317. To clean up code:
  5318. * src/PeerInteractionCommand.h
  5319. (executeInternal): Added virtual keyword explicitly.
  5320. (prepareForRetry): Added virtual keyword explicitly.
  5321. (prepareForNextPeer): Added virtual keyword explicitly.
  5322. (onAbort): Added virtual keyword explicitly.
  5323. * src/RequestSlot.cc
  5324. (isTimeout): Use Time::elapsed() instead of differenceInMillis().
  5325. * src/BtPieceMessage.cc
  5326. (doReceivedAction): Added a debug log of piece's bitfield.
  5327. * src/Piece.h
  5328. (getBitfieldLength): New function.
  5329. * src/ByteArrayDiskWriter.cc
  5330. (clear): Added buf = 0 to avoid double free corruption.
  5331. * src/FileAllocator.cc
  5332. (allocate): Fixed an assignment of fileAllocationMonitor->currentValue.
  5333. Added cp.reset().
  5334. * src/BitfieldMan.h
  5335. (operator=): Rewritten.
  5336. * src/BitfieldMan.cc
  5337. (BitfieldMan): Initialized bitfield, useBitfield.
  5338. * src/PeerConnection.cc
  5339. (receiveMessage): Added a call to socket->readable() after getting
  5340. message length to avoid possible EOF.
  5341. * src/Util.cc
  5342. (torrentUrlencode): Fixed an encodeing bug. BUG#1629912
  5343. 2007-01-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5344. To add an ability to pre-allocate file space:
  5345. * src/DirectDiskAdaptor.h: Rewritten.
  5346. * src/PieceStorage.h: DiskAdaptor -> DiskAdaptorHandle
  5347. * src/MultiDiskAdaptor.h: Rewritten.
  5348. * src/DefaultPieceStorage.cc
  5349. (MultiDiskWriter.h): Removed include.
  5350. (PreAllocationDiskWriter.h): Removed include.
  5351. (FileAllocationMonitor.h): New include.
  5352. (~DefaultPieceStorage): Removed deletion of diskAdaptor.
  5353. (initStorage): Rewritten.
  5354. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5355. * src/FileAllocator.h: New class.
  5356. * src/FileAllocator.cc: New class.
  5357. * src/FileAllocationMonitor.h: New class.
  5358. * src/FileAllocationMonitor.cc: New class.
  5359. * src/ConsoleFileAllocationMonitor.h: New class.
  5360. * src/ConsoleFileAllocationMonitor.cc: New class.
  5361. * src/AbstractSingleDiskAdaptor.h: New class.
  5362. * src/AbstractSingleDiskAdaptor.cc: New class.
  5363. * src/DiskAdaptor.h
  5364. (Directory.h): Removed include.
  5365. (DiskWriter.h): Removed include.
  5366. (FileEntry.h): Removed include.
  5367. (diskWriter): Removed.
  5368. (DiskAdaptor): Removed diskWriter.
  5369. (openFile): Made pure virtual.
  5370. (closeFile): Made pure virtual.
  5371. (openExistingFile): Made pure virtual.
  5372. (initAndOpenFile): Made pure virtual.
  5373. (writeData): Made pure virtual.
  5374. (readData): Made pure virtual.
  5375. (sha1Sum): Made pure virtual.
  5376. (getStoreDir): Returns const reference of storeDir.
  5377. (DiskAdaptorHandle): New type definition.
  5378. * src/main.cc
  5379. (ConsoleFileAllocationMonitor.h): New include.
  5380. (showUsage): Added default value description of -s option.
  5381. Added the description of --file-allocation option.
  5382. (main): Set default value of --file-allocation option to 'none'.
  5383. Added --file-allocation command-line option.
  5384. Setup FileAllocationMonitorFactory.
  5385. * src/FtpInitiateConnectionCommand.cc
  5386. (executeInternal): Removed diskWriter related processing, which was
  5387. moved to FtpNegotiationCommand.cc.
  5388. * src/DirectDiskAdaptor.cc
  5389. (getFilePath): Made non-const.
  5390. * src/CopyDiskAdaptor.h
  5391. (DiskAdaptor.h): Removed include.
  5392. (DiskWriter.h): Removed include.
  5393. (AbstractSingleDiskAdaptor.h): New include.
  5394. (getFilePath): Made non-const. Added virtual keyword.
  5395. (CopyDiskAdaptor): Removed diskWriter.
  5396. (getTempFile): Returns const reference.
  5397. (CopyDiskAdaptorHandle): New type definition.
  5398. * src/ByteArrayDiskWriter.cc
  5399. (clear): Simplified.
  5400. (initAndOpenFile): Rewritten.
  5401. (openFile): Call initAndOpenFile()
  5402. * src/MultiDiskAdaptor.cc: Rewritten.
  5403. * src/DownloadEngineFactory.cc
  5404. (FileAllocator.h): New include.
  5405. (FileAllocationMonitor.h): New include.
  5406. (newConsoleEngine): Call DefaultDiskWriter::createNewDiskWriter() to
  5407. create DefaultDiskWriter with file allocator.
  5408. * src/DiskWriter.h
  5409. (initAndOpenFile): Added totalLength argument.
  5410. (openFile): Added totalLength argument.
  5411. * src/prefs.h
  5412. (PREF_FILE_ALLOCATION): New definition.
  5413. (V_PREALLOC): New definition.
  5414. (V_NONE): New definition.
  5415. * src/HttpResponseCommand.cc
  5416. (handleDefaultEncoding): Call DefaultDiskWriter::initAndOpenFile with
  5417. size.
  5418. * src/FtpNegotiateCommand.cc
  5419. (Util.h): New include.
  5420. (recvSize): Open file here.
  5421. * src/Util.h
  5422. (ullitos): New function.
  5423. * src/CopyDiskWriter.h
  5424. (getFilePath): Made non-const.
  5425. * src/DefaultDiskWriter.h
  5426. (Option.h): New include.
  5427. (totalLength): Removed.
  5428. (DefaultDiskWriter): Removed totalLength.
  5429. (initAndOpenFile): Added totalLength argument.
  5430. (DefaultDiskWriterHandle): New type definition.
  5431. (createNewDiskWriter): New function.
  5432. * src/Util.cc
  5433. (ullitos): New function.
  5434. * src/DefaultDiskWriter.cc
  5435. (message.h): New include.
  5436. (FileAllocator.h): New include.
  5437. (prefs.h): New include.
  5438. (Util.h): New include.
  5439. (DefaultDiskWriter): Removed totalLength.
  5440. (initAndOpenFile): Added file allocation.
  5441. (createNewDiskWriter): New function. Just for temporary solution.
  5442. It will be rewritten later.
  5443. * src/DiskAdaptor.cc
  5444. (DiskAdaptor): Removed diskWriter.
  5445. * src/AbstractDiskWriter.cc
  5446. (LogFactory.h): New include.
  5447. (AbstractDiskWriter): Added fileAllocator, logger.
  5448. (openFile): Added totalLength argument.
  5449. * src/AbstractDiskWriter.h
  5450. (FileAllocator.h): New include.
  5451. (Logger.h): New include.
  5452. (fileAllocator): New variable.
  5453. (logger): New variable.
  5454. (openFile): Added totalLength argument. Added virtual keyword
  5455. explicitly.
  5456. (openExistingFile): Added totalLength argument. Added virtual keyword
  5457. explicitly.
  5458. (closeFile): Added virtual keyword explicitly.
  5459. (sha1Sum): Added virtual keyword explicitly.
  5460. (writeData): Added virtual keyword explicitly.
  5461. (readData): Added virtual keyword explicitly.
  5462. (setFileAllocator): New function.
  5463. * src/DefaultPieceStorage.h
  5464. (FileAllocator.h): New include.
  5465. (diskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5466. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5467. * src/FileProgressMonitor.h: New class.
  5468. To compile aria2 on PC-BSD:
  5469. * src/DefaultBtContext.cc
  5470. (libgen.h): New include.
  5471. To fix memory leak:
  5472. * src/Exception.h
  5473. (~Exception): Delete cause. Fixed memory leak.
  5474. 2006-12-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5475. Rewritten a portion of bittorrent implementation:
  5476. * src/BtMessageValidator.h: New class.
  5477. * src/BtBitfieldMessageValidator.h: New class.
  5478. * src/BtHandshakeMessageValidator.h: New class.
  5479. * src/BtRequestMessageValidator.h: New class.
  5480. * src/BtSuggestPieceMessageValidator.h: New class.
  5481. * src/BtAllowedFastMessageValidator.h: New class.
  5482. * src/BtRejectMessageValidator.h: New class.
  5483. * src/BtCancelMessageValidator.h: New class.
  5484. * src/BtPieceMessageValidator.h: New class.
  5485. * src/BtHaveMessageValidator.h: New class.
  5486. * src/BtEventListener.h: New class.
  5487. * src/AbstractBtEventListener.h: New class.
  5488. * src/BtEvent.h: New class.
  5489. * src/BtChokingEvent.h: New class.
  5490. * src/BtChokedEvent.h: New class.
  5491. * src/BtCancelSendingPieceEvent.h: New class.
  5492. * src/BtAbortOutstandingRequestEvent.h: New class.
  5493. * src/Randomizer.h: New class.
  5494. * src/SimpleRandomizer.h: New class.
  5495. * src/BtMessage.h: New class.
  5496. * src/AbstractBtMessage.h: New class.
  5497. * src/SimpleBtMessage.h: New class.
  5498. * src/BtHaveMessage.h: New class.
  5499. * src/BtInterestedMessage.h: New class.
  5500. * src/BtAllowedFastMessage.h: New class.
  5501. * src/BtUnchokeMessage.h: New class.
  5502. * src/BtCancelMessage.h: New class.
  5503. * src/BtNotInterestedMessage.h: New class.
  5504. * src/BtChokeMessage.h: New class.
  5505. * src/BtHaveNoneMessage.h: New class.
  5506. * src/BtHandshakeMessage.h: New class.
  5507. * src/BtSuggestPieceMessage.h: New class.
  5508. * src/BtHaveMessage.h: New class.
  5509. * src/BtPieceMessage.h: New class.
  5510. * src/BtHaveAllMessage.h: New class.
  5511. * src/BtKeepAliveMessage.h: New class.
  5512. * src/BtPortMessage.h: New class.
  5513. * src/BtRejectMessage.h: New class.
  5514. * src/BtBitfieldMessage.h: New class.
  5515. * src/BtRequestMessage.h: New class.
  5516. * src/DefaultBtRequestFactory.h: New class.
  5517. * src/DefaultBtMessageReceiver.h: New class.
  5518. * src/BtInteractive.h: New class.
  5519. * src/BtMessageDispatcher.h: New class.
  5520. * src/DefaultBtMessageDispatcher.h: New class.
  5521. * src/DefaultBtInteractive.h: New class.
  5522. * src/BitfieldManFactory.h: New class.
  5523. * src/HandleRegistry.h: New class.
  5524. * src/BtMessageFactory.h: New class.
  5525. * src/BtMessageReceiver.h: New class.
  5526. * src/DefaultBtMessageFactory.h: New class.
  5527. * src/PeerObject.h: New class.
  5528. * src/BtRequestFactory.h: New class.
  5529. * src/SuggestPieceMessage.h: Removed.
  5530. * src/PortMessage.h: Removed.
  5531. * src/SuggestPieceMessage.h: Removed.
  5532. * src/KeepAliveMessage.h: Removed.
  5533. * src/HandshakeMessage.h: Removed.
  5534. * src/PeerInteraction.h: Removed.
  5535. * src/UnchokeMessage.h: Removed.
  5536. * src/PieceMessage.h: Removed.
  5537. * src/RequestMessage.h: Removed.
  5538. * src/InterestedMessage.h: Removed.
  5539. * src/HaveMessage.h: Removed.
  5540. * src/CancelMessage.h: Removed.
  5541. * src/RejectMessage.h: Removed.
  5542. * src/AllowedFastMessage.h: Removed.
  5543. * src/HaveNoneMessage.h: Removed.
  5544. * src/SimplePeerMessage.h: Removed.
  5545. * src/HaveAllMessage.h: Removed.
  5546. * src/BitfieldMessage.h: Removed.
  5547. * src/PeerMessageFactory.h: Removed.
  5548. * src/NotInterestedMessage.h: Removed.
  5549. * src/ChokeMessage.h: Removed.
  5550. * src/PeerMessage.h: Removed.
  5551. 2006-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5552. To know root cause of exception:
  5553. * src/Exception.h
  5554. (cause): New variable.
  5555. (Exception): Added a parameter.
  5556. (getMsg): Return const reference to msg.
  5557. (getCause): New function.
  5558. * src/DlRetryEx.h
  5559. (DlRetryEx): Added a parameter 'cause'.
  5560. Added an overloaded constructor.
  5561. (DlAbortEx): Added a parameter 'cause'.
  5562. Added an overloaded constructor.
  5563. * src/SimpleLogger.cc
  5564. (writeLog): Log nested exception messages recursively.
  5565. 2006-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5566. * src/DefaultBtProgressInfoFile.cc
  5567. (load): Fixed memory leak when the infohash doesn't match.
  5568. 2006-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5569. * src/DefaultPeerStorage.cc
  5570. (calculateStat): Simplified the code by combining 2 loops into 1.
  5571. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5572. Introduce new preference PREF_BT_TIMEOUT. This is the timeout value
  5573. for BitTorrent download:
  5574. * src/PeerAbstractCommand.cc
  5575. (PeerAbstractCommand): PREF_TIMEOUT -> PREF_BT_TIMEOUT
  5576. * src/main.cc:
  5577. (timeoutSpecified): Removed.
  5578. (main): Set the initial value of PREF_BT_TIMEOUT to 180.
  5579. Removed timeoutSpecified. TODO: Add --bt-timeout command line option.
  5580. * src/TorrentRequestInfo.cc
  5581. (timeoutSpecified): Removed.
  5582. (torrentHandler): Removed timeoutSpecified and the adjustment of
  5583. timeout value.
  5584. * src/prefs.h
  5585. (PREF_BT_TIMEOUT): New definition.
  5586. Delete unused variables:
  5587. * src/TorrentRequestInfo.cc
  5588. (requestInfo): Removed.
  5589. Move setSignalHander to Util::setGlobalSignalHandler:
  5590. * src/TorrentRequestInfo.cc:
  5591. setSignalHander -> Util::setGlobalSignalHandler
  5592. * src/main.cc
  5593. (setSignalHander): Removed.
  5594. (main): setSignalHander -> Util::setGlobalSignalHandler
  5595. * src/Util.h
  5596. (setGlobalSignalHandler): New function.
  5597. * src/Util.cc
  5598. (setGlobalSignalHandler): New function.
  5599. * src/UrlRequestInfo.cc:
  5600. setSignalHander -> Util::setGlobalSignalHandler
  5601. Reset peer status in order to exit gracefully:
  5602. * src/PeerAbstractCommand.cc
  5603. (execute): Call peer->resetStatus() when btRuntime->isHalt() is true.
  5604. To fix the bug that causes the number of bytes uploaded is not saved
  5605. to .aria2 file:
  5606. * src/DefaultPeerStorage.h
  5607. (removedPeerSessionDownloadLength): New variable.
  5608. (removedPeerSessionUploadLength): New variable.
  5609. * src/DefaultPeerStorage.cc
  5610. (DefaultPieceStorage): Added removedPeerSessionDownloadLength(0),
  5611. removedPeerSessionUploadLength(0).
  5612. (calculateStat): Calculate the number of bytes downloaded(uploaded)
  5613. through all peers, and then add removedPeerSessionDownloadLength(
  5614. removedPeerSessionUploadLength) to it.
  5615. (deleteUnusedPeer): Add the number of bytes downloaded(uploaded) from
  5616. (to) the peer to removedPeerSessionDownloadLength
  5617. (removedPeerSessionUploadLength).
  5618. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5619. To add Metalink location option:
  5620. * src/MetalinkRequestInfo.cc
  5621. (execute): Call MetalinkEntry::setLocationPreference()
  5622. * src/main.cc
  5623. (showUsage): Added the help message for --metalink-location option.
  5624. (main): Added --metalink-location option.
  5625. * src/prefs.h
  5626. (PREF_METALINK_LOCATION): New definition.
  5627. * src/MetalinkEntry.cc
  5628. (AddLocationPreference): New function object.
  5629. (setLocationPreference): New function.
  5630. * src/Xml2MetalinkProcessor.cc
  5631. (getResource): Set location attribute to MetalinkResource
  5632. To show URLs to download
  5633. * src/UrlRequestInfo.h
  5634. (printUrls): New function.
  5635. To add multiple <file> Metalink support:
  5636. * src/MetalinkEntry.h
  5637. (MetalinkResources): Removed.
  5638. (setLocationPreference): New function.
  5639. (MetalinkEntryHandle): New type definition.
  5640. (MetalinkEntries): New type definition.
  5641. * src/Xml2MetalinkProcessor.h
  5642. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  5643. (getResource): MetalinkResource* -> MetalinkResourceHandle
  5644. (parseFile): Metalinker* -> MetalinkerHandle
  5645. * src/UrlRequestInfo.h
  5646. (execute): RequestInfo* -> RequestInfos
  5647. * src/MetalinkRequestInfo.cc
  5648. (AccumulateNonP2PUrl): MetalinkResource* -> MetalinkResourceHandle
  5649. (FindBitTorrentUrl): MetalinkResource* -> MetalinkResourceHandle
  5650. (execute): RequestInfo* -> RequestInfos
  5651. Added multiple <file> support. Print filename when it is queued.
  5652. * src/MetalinkRequestInfo.h
  5653. (execute): RequestInfo* -> RequestInfos
  5654. (getDownloadEngine): Removed.
  5655. * src/RequestInfo.h
  5656. (RequestInfoHandle): New type definition.
  5657. (RequestInfos): New type definition.
  5658. (execute): RequestInfo* -> RequestInfos
  5659. (getDownloadEngine): Removed.
  5660. * src/MetalinkResource.h
  5661. (MetalinkResourceHandle): New type definition.
  5662. (MetalinkResources): New type definition.
  5663. * src/MetalinkEntry.cc
  5664. (~MetalinkEntry): Removed the deletion of the elements of resources,
  5665. because the element is now of type MetalinkResourceHandle.
  5666. (PrefOrder): MetalinkResource* -> MetalinkResourceHandle
  5667. (Supported): MetalinkResource* -> MetalinkResourceHandle
  5668. (dropUnsupportedResource): Removed the deletion of the elements of
  5669. resources because the element is now of type MetalinkResourceHandle.
  5670. * src/Xml2MetalinkProcessor.cc
  5671. (parseFile): Metalinker* -> MetalinkerHandle
  5672. MetalinkEntry* -> MetalinkEntryHandle
  5673. Removed try-catch block.
  5674. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  5675. MetalinkResource* -> MetalinkResourceHandle
  5676. Removed try-catch block.
  5677. (getResource): MetalinkResource* -> MetalinkResourceHandle
  5678. Free result by using xmlXPathFreeObject()
  5679. * src/Metalinker.cc
  5680. (~Metalinker): Removed the deletion of entries.
  5681. MetalinkEntry* -> MetalinkEntryHandle
  5682. (queryEntry): Add multiple <file> Metalink support.
  5683. * src/Metalinker.h
  5684. (MetalinkEntries): Removed.
  5685. (queryEntry): MetalinkEntry* -> MetalinkEntries
  5686. * src/MetalinkProcessor.h
  5687. (parseFile): Metalinker* -> MetalinkerHandle
  5688. Bug fixes:
  5689. * src/PeerChokeCommand.cc
  5690. (execute): cat01->cat02
  5691. * src/DefaultPieceStorage.cc
  5692. (DefaultPieceStorage): Added diskAdaptor(0)
  5693. * src/TrackerWatcherComand.cc:
  5694. (execute): Use btAnnounce->noMoreAnnounce()
  5695. to determin whether the function returns true or not.
  5696. * src/TrackerUpdateCommand.cc:
  5697. (execute): Use btAnnounce->noMoreAnnounce()
  5698. to determin whether the function returns true or not.
  5699. * src/FtpConnection.cc
  5700. (bulkReceiveResponse): Throw DlRetryEx if EOF got.
  5701. This is the fix of the busy loop bug.
  5702. * src/DownloadCommand.cc
  5703. (DownloadCommand): Reuse PeerStat. segmentMan->getPeerStat() returns
  5704. cached PeerStat.
  5705. The value of "name" entry in torrent file is now set by
  5706. *DiskAdaptor::setTopDir(...) methods.
  5707. * src/MultiDiskAdaptor.h
  5708. (topDir): New variable.
  5709. (setTopDir): New function.
  5710. (getTopDir): New function.
  5711. * src/MultiDiskAdaptor.cc
  5712. (getFilePath): Concat storDir, "/" and topDir.
  5713. (mkdir): Use getFilePath() to get the directory path for output.
  5714. * src/DefaultPieceStorage.cc
  5715. (initStorage): Set the value of "name" entry to MultiDiskAdaptor,
  5716. CopyDiskAdaptor.
  5717. * src/CopyDiskAdaptor.h
  5718. (topDir): New variable.
  5719. (setTopDir): New function.
  5720. (getTopDir): New function.
  5721. * src/CopyDiskAdaptor.cc
  5722. (fixFilename): Updated.
  5723. Misc
  5724. * src/UrlRequestInfo.h
  5725. (e): Removed.
  5726. (UrlRequestInfo): Removed e.
  5727. (getDownloadEngine): Removed.
  5728. * src/UrlRequestInfo.cc
  5729. (handler): Rewritten.
  5730. (printUrls): New function.
  5731. (execute): Call printUrls().
  5732. * src/HandshakeMessage.cc
  5733. (check): peerinteraction->getBtContext() -> btContext
  5734. * src/PeerInteraction.h
  5735. (getBtContext): Removed.
  5736. * src/TorrentRequestInfo.h
  5737. (execute): RequestInfo* -> RequestInfos
  5738. (getDownloadEngine): Removed.
  5739. * src/TorrentRequestInfo.cc
  5740. (haltRequested): Removed.
  5741. (btHaltRequested): New variable.
  5742. (torrentHandler): haltRequested -> btHaltRequested
  5743. (execute): RequestInfo* -> RequestInfos
  5744. * src/TorrentConsoleDownloadEngine.cc
  5745. (afterEachIteration): haltRequested -> btHaltRequested.
  5746. * src/ConsoleDownloadEngine.h
  5747. (initStatistics): Added virtual.
  5748. (calculateStatistics): Added virtual.
  5749. (onEndOfRun): Added virtual.
  5750. (afterEachIteration): Added virtual.
  5751. * src/ConsoleDownloadEngine.cc
  5752. (haltRequested): New variable.
  5753. (afterEachIteration): New function.
  5754. * src/main.cc
  5755. (requestInfo): Removed.
  5756. * src/SegmentMan.cc
  5757. (findSlowerSegmentEntry): Refactored.
  5758. * Release 0.9.0
  5759. 2006-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5760. To divide TorrentMan into 6 classes: BtContext, BtRuntime,
  5761. PeerStorage, PieceStorage, BtAnnounce and BtProgressInfoFile
  5762. * src/TorrentMan.h: Removed.
  5763. * src/TorrentMan.cc: Removed.
  5764. * src/TrackerWatcherComand.h: Made subclass of BtContextAwareCommand.
  5765. * src/SeedCheckCommand.cc: Use pieceStorage, btRuntime
  5766. * src/PeerAbstractCommand.h: Made subclass of BtContextAwareCommand.
  5767. * src/PeerAbstractCommand.cc: Use btRuntime.
  5768. * src/BtContextAwareCommand.h: New class.
  5769. * src/FileEntry.h: Added accessor methods for following variables.
  5770. (path): Made private.
  5771. (length): Made private.
  5772. (offset): Made private.
  5773. (extracted): Made private.
  5774. (requested): Made private.
  5775. (FileEntries): New definition.
  5776. (FileEntryHandle): New definition.
  5777. * src/FileEntry.cc: New file.
  5778. * src/HaveEraseCommand.h: Made subclass of BtContextAwareCommand.
  5779. * src/HaveEraseCommand.cc: Use btRuntime, pieceStorage.
  5780. * src/PeerChokeCommand.h: Made subclass of BtContextAwareCommand.
  5781. * src/PeerChokeCommand.cc: Use btRuntime, peerStorage, pieceStorage.
  5782. * src/PieceStorage.h: New file.
  5783. * src/PeerInteractionCommand.h: Use btContext.
  5784. * src/PeerInteractionCommand.cc: Use pieceStorage, peerStorage,
  5785. btRuntime.
  5786. * src/DefaultBtProgressInfoFile.h: New file.
  5787. * src/DefaultBtProgressInfoFile.cc: New file.
  5788. * src/File.cc
  5789. (Util.h): New include.
  5790. (mkdirs): New function.
  5791. * src/MultiDiskAdaptor.h
  5792. (mkdir): New function.
  5793. * src/PeerListProcessor.h
  5794. (Peers): Removed.
  5795. * src/PeerInteraction.h
  5796. (torrentMan): Removed.
  5797. (btContext): New variable.
  5798. (peerStorage): New variable.
  5799. (pieceStorage): New variable.
  5800. (btAnnounce): New variable.
  5801. (getTorrentMan): Removed.
  5802. (getBtContext): New function.
  5803. * src/PeerInteraction.cc: Use btContext, peerStorage, pieceStorage,
  5804. btAnnounce.
  5805. * src/HandshakeMessage.h
  5806. (TorrentMan.h): Removed.
  5807. * src/HandshakeMessage.cc: Use btContext.
  5808. * src/DefaultBtAnnounce.cc: New file.
  5809. * src/MultiDiskWriter.cc: Use the accessor methods of FileEntry.
  5810. * src/DefaultPieceStorage.cc: New file.
  5811. * src/DefaultBtContext.h: New file.
  5812. * src/TorrentRequestInfo.cc: Use btContext, pieceStorage.
  5813. Use the accessor methods of FileEntry.
  5814. * src/CookieBox.cc: Updated to use Util::slice().
  5815. * src/PieceMessage.cc: Use btContext, pieceStorage.
  5816. * src/common.h (SharedHandle.h): New include.
  5817. * src/PeerMessage.cc (PeerMessage): Added btContext, peerStorage,
  5818. pieceStorage.
  5819. * src/TorrentAutoSaveCommand.h: Made subclass of BtContextAwareCommand.
  5820. * src/DiskAdaptor.h
  5821. (topDir): Removed.
  5822. (getFileEntryFromPath): Changed the return type to FileEntryHandle.
  5823. (setTopDir): Removed.
  5824. (getTopDir): Removed.
  5825. * src/BtContext.h: New file.
  5826. * src/DefaultPeerStorage.h: New file.
  5827. * src/PieceMessage.h (TorrentMan.h): Removed.
  5828. * src/RequestMessage.h (TorrentMan.h): Removed.
  5829. * src/TorrentDownloadEngine.h
  5830. (uploadLength): New variable.
  5831. (btContext): New variable.
  5832. (btRuntime): New variable.
  5833. (pieceStorage): New variable.
  5834. (peerStorage): New variable.
  5835. (btAnnounce): New variable.
  5836. (btProgressInfoFile): New variable.
  5837. (torrentMan): Removed.
  5838. (setBtContext): New function.
  5839. * src/TorrentDownloadEngine.cc: Use BtContext, BtRuntime, pieceStorage,
  5840. peerStorage, btAnnounce, btProgressInfoFile.
  5841. * src/Piece.h
  5842. (toString): New function.
  5843. (Pieces): New type definition.
  5844. * src/Peer.h
  5845. (active): New variable.
  5846. (Peer): Added active.
  5847. (activate): Set active to true.
  5848. (deactivate): Set active to false.
  5849. (isActive): New function.
  5850. (Peers): New type definition.
  5851. * src/DirectDiskAdaptor.cc
  5852. (getFilePath): Use the accessor methods of FileEntry.
  5853. * src/TorrentConsoleDownloadEngine.h
  5854. (afterEachIteration): New function.
  5855. * src/TorrentConsoleDownloadEngine.cc
  5856. (haltRequested): New variable.
  5857. (sendStatistics): Use pieceStorage, btRuntime.
  5858. (afterEachIteration): New function.
  5859. * src/AnnounceList: AnnounceTier->AnnounceTierHandle.
  5860. * src/Directry.h
  5861. (Directory): New function.
  5862. (DirectoryHandle): New type definition.
  5863. * src/BtProgressInfoFile.h: New file.
  5864. * src/RequestMessage.cc: Use pieceStorage.
  5865. * src/BtRuntime.h: New file.
  5866. * src/DefaultBtContext.cc: New file.
  5867. * src/BitfieldMan.h
  5868. (getCompletedLength): New function(private).
  5869. (getCompletedLength): New function.
  5870. (getFilteredCompletedLength): New function.
  5871. * src/BitfieldMan.h
  5872. (getCompletedLength): New function(private).
  5873. (getCompletedLength): New function.
  5874. (getFilteredCompletedLength): New function.
  5875. * src/MultiDiskAdaptor.cc
  5876. (mkdir): New function.
  5877. (openFile): Call mkdir().
  5878. (initAndOpenFile): Call mkdir().
  5879. * src/CancelMessage.h
  5880. (TorrentMan.h): Removed.
  5881. * src/RejectMessage.h
  5882. (TorrentMan.h): Removed.
  5883. * src/DownloadEngineFactory.cc
  5884. (DefaultPieceStorage.h): New include.
  5885. (DefaultPeerStorage.h): New include.
  5886. (DefaultBtAnnounce.h): New include.
  5887. (DefaultBtProgressInfoFile.h): New include.
  5888. (newTorrentConsoleEngine): Rewritten.
  5889. * src/ShareRatioSeedCriteria.h
  5890. (torrentMan): Removed.
  5891. (btContext): New variable.
  5892. (peerStorage): New variable.
  5893. (btRuntime): New variable.
  5894. (evaluate): Use btContext, btRuntime, peerStorage.
  5895. * src/AnnounceTier.h: New file.
  5896. * src/BtAnnounce.h: New file.
  5897. * src/BtRegistry.h: New file.
  5898. * src/PeerInitiateConnectionCommand.h: Added btContext.
  5899. * src/PeerConnection.h (TorrentMan.h): Removed.
  5900. * src/PeerMessageFactory.cc: Use btContext, pieceStorage.
  5901. * src/Util.h
  5902. (slice): Added an argument.
  5903. * src/Util.cc
  5904. (slice): Added an argument to control whether trim is made or not.
  5905. * src/PeerStorage.h: New file.
  5906. * src/BtRegistry.cc: New file.
  5907. * src/TrackerUpdateCommand.h: Made subclass of BtContextAwareCommand.
  5908. * src/CopyDiskAdaptor.cc: Use the accessor methods of FileEntry.
  5909. * src/MultiDiskWriter.h: FileEntry -> FileEntryHandle
  5910. * src/PeerListenCommand.cc: Use btRuntime, peerStorage, btContext.
  5911. * src/TorrentRequestInfo.h
  5912. (e): Removed.
  5913. (showFileEntry): Added an argument.
  5914. (getDownloadEngine): Return 0.
  5915. * src/DefaultBtAnnounce.h: New file.
  5916. * src/TorrentAutoSaveCommand.cc: Use btRuntime, btProgressInfoFile.
  5917. * src/TrackerWatcherComand.cc: Use btRuntime, btAnnounce,
  5918. * src/PeerMessageFactory.h
  5919. (btContext): New variable.
  5920. (pieceStorage): New variable.
  5921. * src/TrackerUpdateCommand.cc: Use btRuntime, peerStorage, btContext,
  5922. btAnnounce.
  5923. * src/DiskAdaptor.cc
  5924. (DiskAdaptor): Removed topDir.
  5925. (~DiskAdaptor): Removed topDir.
  5926. * src/PeerListenCommand.h: Made subclass of BtContextAwareCommand.
  5927. * src/SeedCheckCommand.h: Made subclass of BtContextAwareCommand.
  5928. * src/File.h (mkdirs): New function.
  5929. * src/DefaultPeerStorage): New file.
  5930. * src/DownloadEngineFactory.h
  5931. (newTorrentConsoleEngine): Use btContext.
  5932. * src/BtContextAwareCommand.cc: New file.
  5933. * src/PeerInitiateConnectionCommand.cc: Use btRuntime, peerStorage.
  5934. * src/PeerMessage.h
  5935. (btContext): New variable.
  5936. (peerStorage): New variable.
  5937. (pieceStorage): New variable.
  5938. (setBtContext): New function.
  5939. * src/Directry.cc
  5940. (Directory): New function.
  5941. (createDir): Do nothing if name.size() == 0.
  5942. * src/AnnounceList.h
  5943. (AnnounceTier): Removed.
  5944. (AnnounceTiers): Removed.
  5945. * src/DefaultPieceStorage.h: New file.
  5946. * src/Piece.cc (toString): New function.
  5947. To fix typo:
  5948. * src/main.cc (showVersion): Fixed typo.
  5949. To fix compile warning:
  5950. * src/DelegatingPeerListProcessor.cc
  5951. (canHandle): Added "return false".
  5952. 2006-10-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5953. To simplify TrackerWatherCommand, TrackerUpdateCommand and
  5954. make the process of announce request testable.
  5955. * src/TrackerWatcherCommand.h
  5956. (TimeA2.h): Removed.
  5957. (interval): Removed.
  5958. (checkPoint): Removed.
  5959. (createRequestCommand): Added an argument 'url'.
  5960. (TrackerWatherCommand): Removed interval.
  5961. (createCommand): New function.
  5962. * src/DownloadEngineFactory.cc
  5963. (newTorrentConsoleEngine): Updated according to the changes in
  5964. TrackerWatherCommand.
  5965. * src/TorrentMan.cc
  5966. (DelegatingPeerListProcessor.h): New includes.
  5967. (TorrentMan): Added the initialization of announceInterval.
  5968. (isStoppedAnnounceReady): New function.
  5969. (isCompletedAnnounceReady): New function.
  5970. (isDefaultAnnounceReady): New function.
  5971. (isAnnounceReady): New function.
  5972. (getAnnounceUrl): New function.
  5973. (announceStart): New function.
  5974. (announceFailure): New function.
  5975. (announceSuccess): New function.
  5976. (isAllAnnounceFailed): New function.
  5977. (resetAnnounce): New function.
  5978. (processAnnounceResponse): New function.
  5979. (needMorePeerConnection): New function.
  5980. (noMoreAnnounce): New function.
  5981. * src/TrackerUpdateCommand.h
  5982. (getTrackerResponse): int->size_t
  5983. * src/TorrentMan.h
  5984. (isStoppedAnnounceReady): New function.
  5985. (isCompletedAnnounceReady): New function.
  5986. (isDefaultAnnounceReady): New function.
  5987. (announceInterval): New variable.
  5988. (isAnnounceReady): New function.
  5989. (getAnnounceUrl): New function.
  5990. (announceStart): New function.
  5991. (announceFailure): New function.
  5992. (announceSuccess): New function.
  5993. (isAllAnnounceFailed): New function.
  5994. (resetAnnounce): New function.
  5995. (processAnnounceResponse): New function.
  5996. (needMorePeerConnection): New function.
  5997. (noMoreAnnounce): New function.
  5998. * src/TrackerWatcherCommand.cc
  5999. (TrackerWatherCommand): Removed interval and checkPoint.
  6000. (execute): Rewritten.
  6001. (createCommand): New function.
  6002. (createRequestCommand): Rewritten.
  6003. * src/TrackerUpdateCommand.cc
  6004. (MetaFileUtil.h): Removed.
  6005. (DelegatingPeerListProcessor.h): Removed.
  6006. (getTrackerResponse): int->size_t. Use torrentMan's new functions.
  6007. 2006-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6008. Request -> RequestHandle:
  6009. * src/HttpResponseCommand.h: Request->RequestHandle
  6010. * src/AbstractCommand.cc: Request->RequestHandle
  6011. * src/HttpDownloadCommand.cc: Request->RequestHandle
  6012. * src/HttpRequestCommand.cc: Request->RequestHandle
  6013. * src/FtpInitiateConnectionCommand.h: Request->RequestHandle
  6014. * src/AbstractCommand.h: Request->RequestHandle
  6015. * src/HttpProxyRequestCommand.h: Request->RequestHandle
  6016. * src/HttpResponseCommand.cc: Request->RequestHandle
  6017. * src/HttpInitiateConnectionCommand.h: Request->RequestHandle
  6018. * src/FtpNegotiateCommand.cc: Request->RequestHandle
  6019. * src/FtpTunnelResponseCommand.h: Request->RequestHandle
  6020. * src/HttpConnection.h: Request->RequestHandle
  6021. * src/HttpProxyResponseCommand.cc: Request->RequestHandle
  6022. * src/InitiateConnectionCommandFactory.h: Request->RequestHandle
  6023. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  6024. * src/DownloadCommand.h: Request->RequestHandle
  6025. * src/FtpDowndloadCommand.cc: Request->RequestHandle
  6026. * src/HttpInitiateConnectionCommand.cc: Request->RequestHandle
  6027. * src/HttpRequestCommand.h: Request->RequestHandle
  6028. * src/FtpNegotiateCommand.h: Request->RequestHandle
  6029. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  6030. * src/FtpInitiateConnectionCommand.cc: Request->RequestHandle
  6031. * src/HttpDownloadCommand.h: Request->RequestHandle
  6032. * src/FtpConnection.cc: Request->RequestHandle
  6033. * src/InitiateConnectionCommandFactory.cc: Request->RequestHandle
  6034. * src/UrlRequestInfo.cc: Request->RequestHandle
  6035. * src/HttpProxyResponseCommand.h: Request->RequestHandle
  6036. * src/HttpConnection.h: Request->RequestHandle
  6037. * src/DownloadCommand.cc: Request->RequestHandle
  6038. * src/FtpConnection.h: Request->RequestHandle
  6039. * src/FtpDowndloadCommand.h: Request->RequestHandle
  6040. * src/HttpProxyRequestCommand.cc: Request->RequestHandle
  6041. * src/FtpTunnelRequestCommand.h: Request->RequestHandle
  6042. * src/Request.h
  6043. (SharedHandle.h): New include.
  6044. (RequestHandle): New type definition.
  6045. (Requests): Redefined.
  6046. To add MULTITRACKER support:
  6047. * src/TrackerWatcherCommand.h
  6048. (createRequestCommand): New function.
  6049. * src/DownloadEngineFactory.cc
  6050. (newTorrentConsoleEngine): Removed req.
  6051. * src/prefs.h
  6052. (PREF_TRACKER_MAX_TRIES): New definition.
  6053. * src/TorrentMan.cc
  6054. (TorrentMan): Removed req. Added trackerNumTry.
  6055. (~TorrentMan): Removed req.
  6056. (setupInternal1): Added announceList.
  6057. * src/TorrentRequestInfo.cc
  6058. (execute): Set PREF_MAX_TIRES to 1. The max number of tries for
  6059. announces is now specified by PREF_TRACKER_MAX_TRIES.
  6060. * src/main.cc
  6061. (main): Added PREF_TRACKER_MAX_TRIES.
  6062. * src/TorrentMan.h
  6063. (Request.h): Removed.
  6064. (AnnounceList.h): New include.
  6065. (trackerNumTry): New variable.
  6066. (req): Removed.
  6067. (announceList): New variable.
  6068. * src/TrackerWatcherCommand.cc
  6069. (execute): Rewritten.
  6070. (createRequestCommand): New function.
  6071. * src/TrackerUpdateCommand.cc
  6072. (execute): Updated with the use of AnnounceList.
  6073. * src/AnnounceList.cc: New class.
  6074. * src/AnnounceList.h: New class.
  6075. To fix typo:
  6076. * src/prefs.h
  6077. (PREF_MAX_TRIES): max_try->max_tries
  6078. To not to decode "+" as space in URL decode:
  6079. * src/Util.cc
  6080. (urldecode): Removed "+"->space decoding rule. Test case was updated.
  6081. 2006-10-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6082. To add timeout to async name resolution:
  6083. * src/AbstractCommand.h
  6084. (nameResolveFinished): New function. This is not elegant way. It needs
  6085. to be more refined.
  6086. (nameResolverCheck): New variable.
  6087. * src/AbstractCommand.cc
  6088. (AbstractCommand): Added nameResolverCheck.
  6089. (execute): Added the check whether the name resolution has finished.
  6090. (setNameResolverCheck): Set nameResolverCheck to true.
  6091. (disableNameResolverCheck): Set nameResolverCheck to false.
  6092. (nameResolverFinished): New function.
  6093. * src/FtpInitiateConnectionCommand.h
  6094. (nameResolverFinished): New function.
  6095. * src/FtpInitiateConnectionCommand.cc
  6096. (FtpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  6097. * src/HttpInitiateConnectionCommand.h
  6098. (nameResolverFinished): New function.
  6099. * src/HttpInitiateConnectionCommand.cc
  6100. (HttpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  6101. * src/prefs.h
  6102. (PREF_DNS_TIMEOUT): New definition.
  6103. * src/main.cc
  6104. (main): Added PREF_DNS_TIMEOUT.
  6105. To add the support for a non-compact response from a tracker:
  6106. * src/PeerListProcessor.h: New class.
  6107. * src/DefaultPeerListProcessor.h: New class.
  6108. * src/DefaultPeerListProcessor.cc: New class.
  6109. * src/CompactPeerListProcessor.h: New class.
  6110. * src/CompactPeerListProcessor.cc: New class.
  6111. * src/DelegatingPeerListProcessor.h: New class.
  6112. * src/DelegatingPeerListProcessor.cc: New class.
  6113. * src/TorrentMan.cc
  6114. (addPeer): New function(overload).
  6115. (addPeer): Delete unused peers only when new peer is added.
  6116. * src/TorrentMan.h
  6117. (PeerListProcessor.h): Included.
  6118. (Peers): Removed.
  6119. (addPeer): New function(overload).
  6120. * src/TrackerUpdateCommand.cc
  6121. (netinet/in.h): Removed.
  6122. (DelegatingPeerListProcessor.h): Included.
  6123. (execute): Updated to use DelegatingPeerListProcessor.
  6124. To fix the memory leak in TorrentMan::peers:
  6125. * src/PeerAbstractCommand.cc
  6126. (onAbort): Added peer->resetStatus().
  6127. * src/Peer.h
  6128. (resetStatus): Made public.
  6129. To improve the precision of the speed calculation:
  6130. * src/SpeedCalc.h
  6131. (nextInterval): New variable.
  6132. * src/SpeedCalc.cc
  6133. (reset): Added nextInterval.
  6134. (isIntervalOver): Use nextInterval instead of CHANGE_INTERVAL_SEC.
  6135. (changeSw): Set nextInterval to 15 seconds relative to the current
  6136. instant time.
  6137. * src/main.cc
  6138. (showVersion): Updated.
  6139. (showUsage): Updated.
  6140. * Release 0.8.1
  6141. 2006-09-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6142. * src/main.cc
  6143. (showUsage): Commented out --min-segment-size option.
  6144. (main): Commented out --min-segment-size option.
  6145. * Release 0.8.0
  6146. 2006-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6147. * src/*.{h,cc}:
  6148. Added an exception to the license which allows linking with OpenSSL.
  6149. 2006-09-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6150. * src/AbstractCommand.cc
  6151. (execute): Check whether the download has finished before checking
  6152. socket status.
  6153. Return true if peerStat->getStatus() == REQUEST_IDLE.
  6154. Do not exit even if no segment is available.
  6155. * src/prefs.h
  6156. (PREF_STARTUP_IDLE_TIME): New definition.
  6157. * src/PeerInteractionCommand.cc
  6158. (executeInternal): Removed max speed limit. Because it performs bad.
  6159. (receiveMessages): Added max speed limit. This was better than above,
  6160. but still a little bit to be desired. Sometimes the download speed
  6161. became much faster than I specified.
  6162. * src/SpeedCalc.h
  6163. (start): New variable.
  6164. (accumulatedLength): New variable.
  6165. (getAvgSpeed): New function.
  6166. * src/SpeedCalc.cc
  6167. (reset): Added start, accumulatedLength.
  6168. (update): Added calculation of an average speed.
  6169. (getAvgSpeed): New function.
  6170. * src/DownloadCommand.h
  6171. (sw): Removed.
  6172. * src/main.cc
  6173. (main): Added PREF_STARTUP_IDLE_TIME.
  6174. * src/PeerStat.h
  6175. (STATUS): Added REQUEST_IDLE.
  6176. (getMaxSpeed): Renamed as getMaxDownloadSpeed().
  6177. (getAvgDownloadSpeed): New function
  6178. (requestIdle): New function.
  6179. * src/SegmentMan.h
  6180. (SegmentEntryHandle): New type definition.
  6181. (SegmentEntries): Now holds SegmentEntryHandle.
  6182. (findSlowerSegmentEntry): New funtion.
  6183. * src/SegmentMan.cc
  6184. (save): Updated according to the changes in SegmentEntries.
  6185. (read): Updated according to the changes in SegmentEntries.
  6186. (FindSegmentEntryByIndex): Updated according to the changes in
  6187. SegmentEntries.
  6188. (FindSegmentEntryByCuid): Updated according to the changes in
  6189. SegmentEntries.
  6190. (checkoutSegment): Updated according to the changes in SegmentEntries.
  6191. (onNullBitfield): Updated according to the changes in SegmentEntries.
  6192. Renamed uitr as itr.
  6193. (findSlowerSegmentEntry): New function.
  6194. (getSegment): Updated according to the changes in SegmentEntries.
  6195. Added the feature that cancels the segment with slow server and fast
  6196. one takes it over.
  6197. (cancelSegment): Updated according to the changes in SegmentEntries.
  6198. (getDownloadLength): Updated according to the changes in
  6199. SegmentEntries.
  6200. (init): Assigned 0 to bitfield after deleting it.
  6201. * src/DownloadCommand.cc
  6202. (STARTUP_IDLE_TIME): Removed.
  6203. (executeInternal): Use PREF_STARTUP_IDLE_TIME.
  6204. * src/PeerChokeCommand.cc
  6205. (optUnchokingPeer): Updated according to the changes in Peer.
  6206. (ResetDelta): Removed.
  6207. (UploadFaster): Updated according to the changes in Peer.
  6208. (DownloadFaster): Updated according to the changes in Peer.
  6209. (execute): I clarify the meaning of "upload" and "download" here.
  6210. "upload" means the transfer from localhost to remote host.
  6211. "download" means the transfer from remote host to localhost.
  6212. Based on this rule, I swapped orderByUploadRate and
  6213. orderByDownloadRate.
  6214. * src/PeerInteractionCommand.cc
  6215. (PeerInteraction): Removed peerInteraction->setUploadLImit().
  6216. (executeInternal): Removed the argument of
  6217. peerInteraction->sendMessages().
  6218. (receiveMessages): Rewritten download speed limit.
  6219. (sendKeepAlive): Removed peerInteraction->sendMessages().
  6220. * src/HttpResponseCommand.cc
  6221. (handleDefaultEncoding): If file size is unknown in torrent request,
  6222. do not call segmentMan->initBitfield() here.
  6223. Disabled persistent connection feature in torrent request.
  6224. * src/UrlRequestInfo.h
  6225. (UrlRequestInfo): Removed const qualifier from option.
  6226. * src/TorrentMan.h
  6227. (TransferStat): New class.
  6228. (deltaDownloadLength): Removed.
  6229. (deltaUploadLength): Removed.
  6230. (addDeltaDownloadLength): Removed.
  6231. (getDeltaDownloadLength): Removed.
  6232. (resetDeltaDownloadLength): Removed.
  6233. (addDeltaUploadLength): Removed.
  6234. (getDeltaUploadLength): Removed.
  6235. (resetDeltaUploadLength): Removed.
  6236. (addActivePeer): Added peer->activate().
  6237. (deleteActivePeer): Added peer->deactivate().
  6238. (calculateStat): New function.
  6239. * src/TorrentMan.cc
  6240. (TorrentMan): Removed deltaDownloadLength and deltaUploadLength.
  6241. (calculateStat): New function.
  6242. * src/PeerInteraction.h
  6243. (uploadLimit): Removed.
  6244. (option): New variable.
  6245. (setUploadLimit): Removed.
  6246. (getUploadSpeed): Removed.
  6247. (sendMessages): Removed the argument "currentUploadSpeed".
  6248. * src/PeerInteraction.cc
  6249. (prefs.h): Included.
  6250. (PeerInteraction): Removed uploadLimit. Added option.
  6251. (sendMessages): Rewritten upload speed limit.
  6252. (sendHandshake): Removed the argument from sendMessages().
  6253. (sendBitfield): Removed the argument from sendMessages().
  6254. * src/PeerAbstractCommand.cc
  6255. (execute): Commented out the portion of upload limit.
  6256. (onAbort): Removed peer->resetStatus().
  6257. * src/TorrentRequestInfo.cc
  6258. (timeoutSpecified): Declared extern.
  6259. (execute): Set timeout to 180 if timeout is not specified by.
  6260. command-line.
  6261. * src/PieceMessage.cc
  6262. (receivedAction): Added peer->updateDownloadLength().
  6263. Removed peer->addPeerUpload().
  6264. Removed torrentMan->addDeltaDownloadLength().
  6265. (send): Added peer->updateUploadLength().
  6266. Removed peer->addPeerDownload().
  6267. Removed torrentMan->addDeltaUploadLength().
  6268. * src/main.cc
  6269. (timeoutSpecified): New variable.
  6270. (main): Set timeoutSpecified to false.
  6271. If the command-line option "--upload-limit" is specified, then
  6272. timeoutSpecified is set to true. This option will remain in the next
  6273. release, but be deprecated in the future release.
  6274. * src/TorrentRequestInfo.h
  6275. (TorrentRequestInfo): Removed const qualifier from op.
  6276. * src/PeerStat.h
  6277. (uploadSpeed): New variable.
  6278. (PeerStat): Added default value to cuid.
  6279. (calculateUploadSpeed): New function.
  6280. (updateUploadLength): New function.
  6281. (getMaxUploadSpeed): New function.
  6282. (getAvgUploadSpeed): New function.
  6283. (reset): Added uploadSpeed. Set status to IDLE.
  6284. * src/TorrentDownloadEngine.h
  6285. (cp): Declared as Time.
  6286. (sessionDownloadLengthArray): Removed.
  6287. (sessionUploadLengthArray): Removed.
  6288. (currentCp): Removed.
  6289. (lastCalcStat): New variable
  6290. (lastElapsed): Removed.
  6291. (sessionDownloadLength): Removed.
  6292. (calculateStat): New function.
  6293. * src/TorrentDownloadEngine.cc
  6294. (initStatistics): Removed lastElapsed, cp[],
  6295. sessionDownloadLengthArray[], sessionUploadLengthArray[],
  6296. currentCp, sessionDownloadLength.
  6297. Added cp.reset() and lastCalcStat.reset().
  6298. (calculateSpeed): Changed the name of the argument.
  6299. (calculateStatistics): Rewritten.
  6300. (calculateStat): New function.
  6301. * src/Peer.h
  6302. (PeerStat.h): Included.
  6303. (peerUpload): Removed.
  6304. (peerDownload): Removed.
  6305. (peerStat): New variable.
  6306. (sessionUploadLength): New variable.
  6307. (sessionDownloadLength): New variable.
  6308. (deltaUpload): Removed.
  6309. (deltaDownload): Removed.
  6310. (resetStatus): Made private.
  6311. (Peer): Added sessionUploadLength, sessionDownloadLength.
  6312. Removed peerUpload, peerDownload.
  6313. (updateUploadLength): New function.
  6314. (addDeltaUpload): Removed.
  6315. (updateDownloadLength): New function.
  6316. (resetDeltaUpload): Removed.
  6317. (getDeltaUpload): Removed.
  6318. (addDeltaDownload): Removed.
  6319. (calculateUploadSpeed): New function.
  6320. (resetDeltaDownload): Removed.
  6321. (getDeltaDownload): Removed.
  6322. (calculateDownloadSpeed): New function.
  6323. (getSessionUploadLength): New function.
  6324. (getSessionDownloadLength): New function.
  6325. (activate): New function.
  6326. (deactivate): New function.
  6327. (addPeerUpload): Removed.
  6328. (setPeerUpload): Removed.
  6329. (getPeerUpload): Removed.
  6330. (addPeerDownload): Removed.
  6331. (setPeerDownload): Removed.
  6332. (getPeerDownload): Removed.
  6333. * src/Peer.cc
  6334. (resetStatus): Removed resetDeltaUpload() and resetDeltaDownload().
  6335. * src/MetalinkRequestInfo.h
  6336. (MetalinkRequestInfo): Removed const qualifier from op.
  6337. * src/RequestInfo.h
  6338. (op): Removed const qualifier.
  6339. (RequestInfo): Removed const qualifier from op.
  6340. * src/prefs.h
  6341. (PREF_MAX_SPEED_LIMIT): Renamed as PREF_MAX_DOWNLOAD_LIMIT.
  6342. (PREF_UPLOAD_LIMIT): Renamed as PREF_MAX_UPLOAD_LIMIT.
  6343. * src/PeerInteractionCommand.cc
  6344. (PeerInteractionCommand): Use PREF_MAX_UPLOAD_LIMIT.
  6345. (receiveMessages): Use PREF_MAX_DOWNLOAD_LIMIT.
  6346. * src/PeerInteraction.cc
  6347. (sendMessages): Use PREF_MAX_UPLOAD_LIMIT.
  6348. * src/main.cc
  6349. (showUsage): Updated the description of "--lowest-speed-limit" option.
  6350. Added the description of "--max-download-limit" option.
  6351. Removed the description of "--upload-limit" option.
  6352. Added the description of "--max-upload-limit" option.
  6353. (main): Use PREF_MAX_UPLOAD_LIMIT, PREF_MAX_DOWNLOAD_LIMIT.
  6354. Added "--max-download-limit" option and "--max-upload-limit" option.
  6355. Added the warning message if "--upload-limit" option is used.
  6356. * src/DownloadCommand.cc
  6357. (executeInternal): Use PREF_MAX_DOWNLOAD_LIMIT.
  6358. 2006-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6359. To rewrite segment download mechanism for HTTP/FTP download.
  6360. Use BitfieldMan to manage segment download.
  6361. * src/HttpResponseCommand.h
  6362. (executeInternal): Pass the reference of segment.
  6363. * src/AbstractCommand.cc
  6364. (prepareForRetry): Call segmentMan->cancelSegment here.
  6365. (onAbort): Call segmentMan->cancelSegment here.
  6366. * src/HttpDownloadCommand.cc
  6367. (prepareForNextSegment): New function.
  6368. * src/DownloadEngineFactory.cc
  6369. (newConsoleEngine): Removed splitter.
  6370. (newTorrentConsoleEngine): Removed splitter.
  6371. * src/Request.h
  6372. (segment): Renamed from seg.
  6373. * src/FtpInitiateConnectionCommand.h
  6374. (executeInternal): Pass the reference of segment.
  6375. * src/AbstractCommand.h
  6376. (executeInternal): Pass the reference of segment.
  6377. * src/pref.h
  6378. (PREF_SEGMENT_SIZE): New definition.
  6379. * src/HttpProxyRequestCommand.h
  6380. (executeInternal): Pass the reference of segment.
  6381. * src/HttpResponseCommand.cc
  6382. (checkResponse): Allowed status 206 when a request range starts 0.
  6383. (handleDefaultEncoding): Rewritten the code related to Segment.
  6384. (handleOtherEncoding): Rewritten the code related to Segment.
  6385. * src/SegmentMan.h
  6386. (SegmentEntry): New class.
  6387. (SegmentEntries): New type definition.
  6388. (bitfield): New variable.
  6389. (usedSegmentEntries): New variable.
  6390. (onNullBitfield): New function.
  6391. (checkoutSegment): New function.
  6392. (segments): Removed.
  6393. (splitter): Removed.
  6394. (unregisterId): Removed.
  6395. (getSegment): New function(overload)
  6396. (getDownloadedSize): Removed.
  6397. (cancelSegment): New function.
  6398. (completeSegment): New function.
  6399. (initBitfield): New function.
  6400. (hasSegment): New function.
  6401. (getDownloadLength): New function.
  6402. * src/BitfieldMan.h
  6403. (getStartIndex): New function.
  6404. (getEndIndex): New function.
  6405. (getMissingUnusedIndex): New function(overload).
  6406. (getSparseMissingUnusedIndex): New function.
  6407. * src/BitfieldMan.cc
  6408. (getMissingIndexRandomly): Handle the last byte of bitfield properly.
  6409. (getMissingUnusedIndex): New function(overload).
  6410. (Range): New class.
  6411. (getStartIndex): New function.
  6412. (getEndIndex): New function.
  6413. (getSparseMissingUnusedIndex): New function.
  6414. (isBitSetInternal): Return false if the given index is less than 0.
  6415. * src/HttpInitiateConnectionCommand.h
  6416. (executeInternal): Pass the reference of segment.
  6417. * src/FtpNegotiateCommand.h
  6418. (executeInternal): Pass the reference of segment.
  6419. * src/FtpNegotiateCommand.cc
  6420. (recvSize): Initialize bitfield here.
  6421. * src/FtpTunnelResponseCommand.h
  6422. (executeInternal): Pass the reference of segment.
  6423. * src/HttpConnection.cc
  6424. (createRequest): Rewritten range header processing.
  6425. * src/DownloadCommand.h
  6426. (executeInternal): Pass the reference of segment.
  6427. (prepareForRetry): Removed.
  6428. (prepareForNextSegment): Added an argument segment. Made it a virtual
  6429. function.
  6430. * src/main.cc
  6431. (main): Set the initial value of PREF_SEGMENT_SIZE to 1MB.
  6432. * src/SegmentMan.cc
  6433. (SegmentMan): Added bitfield. Removed splitter.
  6434. (~SegmentMan): Added bitfield. Removed splitter.
  6435. (unregisterId): Removed.
  6436. (getSegment): Rewritten.
  6437. (updateSegment): Rewritten.
  6438. (save): Rewritten.
  6439. (read): Rewritten.
  6440. (finished): Rewritten.
  6441. (getDownloadedSize): Removed.
  6442. (initBitfield): New function.
  6443. (FindSegmentEntryByIndex): New function object.
  6444. (FindSegmentEntryByCuid): New function object.
  6445. (checkoutSegment): New function.
  6446. (onNullBitfield): New function.
  6447. (getSegment): New function(overload).
  6448. (CancelSegment): New function object.
  6449. (cancelSegment): New function.
  6450. (completeSegment): New function.
  6451. (hasSegment): New function.
  6452. (getDownloadLength): New function.
  6453. * src/FtpInitiateConnectionCommand.cc
  6454. (executeInternal): Load .aria2 file after hostname resolution finishes.
  6455. * src/Segment.h: Rewritten.
  6456. * src/Segment.cc (operator<<): New function.
  6457. * src/HttpDownloadCommand.h
  6458. (prepareForNextSegment): New function.
  6459. * src/Request.cc
  6460. (resetUrl): Made segment null.
  6461. * src/DownloadEngine.cc
  6462. (~DownloadEngine): Call cleanQueue before deleting segmentMan.
  6463. * src/HttpProxyRequestCommand.h
  6464. (executeInternal): Pass the reference of segment.
  6465. * src/DownloadCommand.cc
  6466. (executeInternal): Rewritten the code related to Segment.
  6467. (prepareForRetry): Removed.
  6468. (prepareForNextSegment): Rewritten.
  6469. * src/FtpTunnelResponseCommand.h
  6470. (executeInternal): Pass the reference of segment.
  6471. To add HTTP 1.1 persistent connection support(experimental)
  6472. * src/HttpRequestCommand.cc
  6473. (executeInternal): Disable keep alive if it is disabled by
  6474. configuration.
  6475. * src/Request.h
  6476. (keepAlive): New variable.
  6477. (isKeepAlive): New function.
  6478. (setKeepAlive): New function.
  6479. * src/pref.h
  6480. (PREF_HTTP_KEEP_ALIVE): New definition.
  6481. * src/HttpResponseCommand.cc
  6482. (executeInternal): Check the remote server supports keep alive.
  6483. * src/HttpConnection.cc
  6484. (createRequest): Send "Connection: close" only if keep alive is
  6485. disabled.
  6486. * src/main.cc
  6487. (main):
  6488. Set the initial value(false) of PREF_KEEP_ALIVE to false.
  6489. To add max download speed limit:
  6490. * src/pref.h
  6491. (PREF_MAX_SPEED_LIMIT): New definition.
  6492. * src/PeerInteractionCommand.cc
  6493. (executeInternal): Added max download speed limit. Not tested yet.
  6494. * src/SegmentMan.h
  6495. (PeerStats): New type definition.
  6496. (peerStats): New variable.
  6497. (registerPeerStat): New function.
  6498. (FindPeerStat): New function object.
  6499. (getPeerStat): New function.
  6500. (calculateDownloadSpeed): New function.
  6501. * src/SpeedCalc.h: New class.
  6502. * src/SpeedCalc.cc: New class.
  6503. * src/main.cc
  6504. (main):
  6505. Set the initial value of PREF_MAX_SPEED_LIMIT to 0(which means the
  6506. download speed is not restricted).
  6507. * src/PeerStat.h: New class.
  6508. * src/SegmentMan.cc
  6509. (registerPeerStat): New function.
  6510. (calculateDownloadSpeed): New function.
  6511. * src/DownloadCommand.cc
  6512. (STARTUP_IDLE_TIME): New definition.
  6513. (DownloadCommand): Register peerStat to segmentMan. Call peerStat->
  6514. downloadStart.
  6515. (~DownloadCommand): Call peerStat->downloadStop.
  6516. (executeInternal): Added download speed limitter. Rewritten lowest
  6517. speed limitter.
  6518. * src/HttpConnection.cc
  6519. (receiveResponse): Fixed: eohIndex[headerBuf] -> headerBuf[eohIndex].
  6520. * src/AbstractCommand.cc
  6521. (resolveHostname): Throw DlAbortEx if a name resolution failes.
  6522. Added hostname to the error message.
  6523. * src/ConsoleDownloadEngine.cc
  6524. (calculateStatistics): Initialize psize with dlSize.
  6525. * src/PieceMessage.cc
  6526. (receivedAction): Do not call peerInteraction->abortPiece here.
  6527. (onGotWrongPiece): Call peerInteraction->abortPiece here.
  6528. * src/BitfieldMan.h
  6529. (clearAllUseBit): New function.
  6530. (setAllUseBit): New function.
  6531. * src/BitfieldMan.cc
  6532. (clearAllBit): Do not clear useBitfield here.
  6533. (clearAllUseBit): New function.
  6534. (setAllUseBit): New function.
  6535. * src/Piece.cc
  6536. (clearAllBlock): Call bitfield->clearAllUseBit().
  6537. 2006-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6538. To make filename URL-decoded:
  6539. * src/HttpResponseCommand.h: Updated doc.
  6540. * src/HttpResponseCommand.cc
  6541. (determinFilename): Made filename URL-decoded.
  6542. * src/FtpInitiateConnectionCommand.cc
  6543. (executeInternal): Made filename URL-decoded.
  6544. * src/Util.h (urldecode): New function.
  6545. * src/Util.cc (urldecode): New function.
  6546. To fix a bug that caused assertion failure in ares_strerror:
  6547. * src/NameResolver.cc (callback): Fixed the bug.
  6548. * Release 0.7.3
  6549. 2006-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6550. To add --seed-time and --seed-ratio command-line option:
  6551. * src/Option.h (getAsDouble): New function.
  6552. * src/Option.cc (getAsDouble): New function.
  6553. * src/SeedCheckCommand.h: New class.
  6554. * src/SeedCheckCommand.cc: New class.
  6555. * src/DownloadEngineFactory.cc
  6556. (SeedCheckCommand.h): Included.
  6557. (UnionSeedCriteria.h): Included.
  6558. (TimeSeedCriteria.h): Included.
  6559. (ShareRatioSeedCriteria.h): Included.
  6560. (newTorrentConsoleEngine): Added the processing of seed option.
  6561. * src/SeedCriteria.h: New class.
  6562. * src/ShareRatioSeedCriteria.h: New class.
  6563. * src/TimeSeedCriteria.h: New class.
  6564. * src/UnionSeedCriteria.h: New class.
  6565. * src/prefs.h
  6566. (PREF_SEED_TIME): New definition.
  6567. (PREF_SEED_RATIO): New definition.
  6568. * src/main.cc
  6569. (showUsage): Added --seed-time and --seed-ratio option.
  6570. (main): Added --seed-time and --seed-ratio option.
  6571. Made default log file name "/dev/null".
  6572. * src/SharedHandle.h
  6573. (SharedHandle): Copy constructor. Made it assignable from the
  6574. SharedHandle of the subclasses.
  6575. (operator=): Made it assignable from the SharedHandle of the
  6576. subclasses.
  6577. (getRefCount): New function.
  6578. To add notice log level and the switch to write log to stdout. This
  6579. switch is configurable per log level.
  6580. * src/Logger.h
  6581. (notice): New function.
  6582. (LEVEL): Added NOTICE. Assigned an explicit value to each log level
  6583. constant.
  6584. * src/LogFactory.cc
  6585. (getInstance): The use of NullLogger was removed. A log message with
  6586. notice log level was made written to stdout along with log file.
  6587. * src/NullLogger.h
  6588. (notice): New function.
  6589. * src/SimpleLogger.h
  6590. (writeHeader): Added the 'file' argument.
  6591. (writeLog): Added the 'file' argument.
  6592. (writeFile): New function.
  6593. (stdoutField): New variable.
  6594. (SimpleLogger): Removed the default constructor.
  6595. (SimpleLogger): Made the default value of logfile 0.
  6596. (debug): Added 'virtual' keyword.
  6597. (info): Added 'virtual' keyword.
  6598. (warn): Added 'virtual' keyword.
  6599. (error): Added 'virtual' keyword.
  6600. (notice): New function.
  6601. (setStdout): New function.
  6602. * src/SimpleLogger.cc
  6603. (WRITE_LOG): Replaced writeLog with writeFile.
  6604. (WRITE_LOG_EX): Replaced writeLog with writeFile.
  6605. (SimpleLogger): Removed the default constructor.
  6606. (setStdout): New function.
  6607. (writeLog): Added the handling of NOTICE log level.
  6608. (writeFile): New function.
  6609. (notice): New function.
  6610. * src/TorrentMan.h: Updated doc.
  6611. * src/BitfieldMan.h: Updated doc.
  6612. * src/TrackerWatcherCommand.cc
  6613. (execute): Return true if error occurred in the request to the tracker
  6614. and halt is requested.
  6615. * src/TrackerUpdateCommand.cc
  6616. (execute): Return true if error occurred in the request to the tracker
  6617. and halt is requested.
  6618. To call onDownloadComplete from TorrentMan::completePiece(), not from
  6619. DownloadEngine:
  6620. * src/TorrentConsoleDownloadEngine.h
  6621. (onSelectiveDownloadingCompletes): Removed.
  6622. * src/TorrentConsoleDownloadEngine.cc
  6623. (onSelectiveDownloadingCompletes): Removed.
  6624. * src/TorrentDownloadEngine.h
  6625. (onEndOfRun): Added 'virtual' keyword.
  6626. (afterEachIteration): Removed.
  6627. (onSelectiveDownloadingCompletes): Removed.
  6628. * src/TorrentDownloadEngine.cc
  6629. (onEndOfRun): Removed filenameFixed.
  6630. (afterEachIteration): Removed.
  6631. * src/TorrentMan.cc
  6632. (completePiece): Call onDownloadComplete here.
  6633. (onDownloadComplete): Added 2 log messages.
  6634. 2006-08-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6635. To fix compilation problem on gcc4.1.1(patch#1542283 by tizianomueller)
  6636. * src/NameResolver.h: Added the prototype declaration of callback().
  6637. To support c-ares library:
  6638. * src/AbstractCommand.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6639. * src/FeatureConfig.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6640. * src/FtpInitiateConnectionCommand.h:
  6641. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6642. * src/AbstractCommand.h: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6643. * src/HttpInitiateConnectionCommand.h:
  6644. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6645. * src/NameResolver.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS.
  6646. Added thes upport of c-ares's ares_strerror(the idea came from patch
  6647. #1542285 by tizianomueller)
  6648. * src/HttpInitiateConnectionCommand.cc:
  6649. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6650. * src/FtpInitiateConnectionCommand.cc:
  6651. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6652. * src/DownloadEngine.h:
  6653. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6654. * src/DownloadEngine.cc:
  6655. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6656. To fix the bug that causes compilation failure with metalink-support
  6657. disabled(bug#1543587):
  6658. * src/main.cc: Fixed with the patch by tizianomueller.
  6659. * Release 0.7.2
  6660. 2006-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6661. * src/main.cc
  6662. (main): Added a message to inform users that aria2 is starting to
  6663. verify checksum.
  6664. * src/RequestInfo.cc
  6665. (printDownloadAbortMessage): Added a message to inform users that
  6666. transfer can be resumed.
  6667. * src/FeatureConfig.cc
  6668. (FEATURE_ASYNC_DNS): New definition.
  6669. (FeatureConfig): Added aysnc DNS entry.
  6670. To replace CommandUuid with Command* in SocketEntry and
  6671. NameResolverEntry:
  6672. * src/DownloadEngine.h
  6673. (CommandUuids): Removed.
  6674. (SocketEntry::commandUuid): Removed.
  6675. (SocketEntry::command): New variable.
  6676. (SocketEntry::SocketEntry): Updated.
  6677. (SocketEntry::operator==): Updated.
  6678. (NameResolverEntry::commandUuid): Removed.
  6679. (NameResolverEntry::command): New variable.
  6680. (NameResolverEntry::NameResolverEntry): Updated.
  6681. (NameResolverEntry::operator==): Updated.
  6682. (waitData): Changed the argument type.
  6683. (addSocketForReadCheck): Changed the argument type.
  6684. (deleteSocketForReadCheck): Changed the argument type.
  6685. (addSocketForWriteCheck): Changed the argument type.
  6686. (deleteSocketForWriteCheck): Changed the argument type.
  6687. (addNameResolverCheck): Changed the argument type.
  6688. (deleteNameResolverCheck): Changed the argument type.
  6689. * src/DownloadEngine.cc
  6690. (FindCommand): Removed.
  6691. (run): Removed activeUuid. Added activeCommands instead.
  6692. (AccumulateActiveUuid): Renamed as AccumulateActiveCommand.
  6693. (AccumulateActiveCommand): New function object.
  6694. (waitData): Use AccumulateActiveCommand.
  6695. (addSocketForReadCheck): Use Command instead of CommandUuid.
  6696. (deleteSocketForReadCheck): Use Command instead of CommandUuid.
  6697. (addSocketForWriteCheck): Use Command instead of CommandUuid.
  6698. (deleteSocketForWriteCheck): Use Command instead of CommandUuid.
  6699. (addNameResolverCheck): Use Command instead of CommandUuid.
  6700. (deleteNameResolverCheck): Use Command instead of CommandUuid.
  6701. * src/AbstractCommand.cc
  6702. (disableReadCheckSocket): Updated according to the changes in
  6703. DownloadEngine.
  6704. (setReadCheckSocket): Updated according to the changes in
  6705. DownloadEngine.
  6706. (disableWriteCheckSocket): Updated according to the changes in
  6707. DownloadEngine.
  6708. (setWriteCheckSocket): Updated according to the changes in
  6709. DownloadEngine.
  6710. (setNameResolverCheck): Updated according to the changes in
  6711. DownloadEngine.
  6712. (disableNameResolverCheck): Updated according to the changes in
  6713. DownloadEngine.
  6714. * src/AbstractCommand.cc
  6715. (disableReadCheckSocket): Updated according to the changes in
  6716. DownloadEngine.
  6717. (setReadCheckSocket): Updated according to the changes in
  6718. DownloadEngine.
  6719. (disableWriteCheckSocket): Updated according to the changes in
  6720. DownloadEngine.
  6721. (setWriteCheckSocket): Updated according to the changes in
  6722. DownloadEngine.
  6723. * release 0.7.1
  6724. 2006-08-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6725. To handle the case where some BitTorrent tracker requires all letters
  6726. except for [A-Za-z0-9] is URL encoded.
  6727. * src/Util.h
  6728. (torrentUrlencode): New function.
  6729. * src/Util.cc
  6730. (ctype.h): Included.
  6731. (torrentUrlencode): New function.
  6732. * src/TrackerWatcherCommand.cc
  6733. (execute): Use Util::torrentUrlencode() instead of Util::urlencode().
  6734. 2006-08-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6735. To add asynchronous DNS support(libares):
  6736. * src/AbstractCommand.h
  6737. (setNameResolverCheck): New function.
  6738. (disableNameResolverCheck): New function
  6739. (resolveHostname): New function.
  6740. * src/AbstractCommand.cc
  6741. (setNameResolverCheck): New function.
  6742. (disableNameResolverCheck): New function
  6743. (resolveHostname): New function.
  6744. * src/FtpInitiateConnectionCommand.h
  6745. (nameResolver): New function.
  6746. * src/FtpInitiateConnectionCommand.cc
  6747. (Util.h): Included.
  6748. (FtpInitiateConnectionCommand): Call disableReadCheckSocket,
  6749. disableWriteCheckSocket.
  6750. (~FtpInitiateConnectionCommand): Call disableNameResolverCheck.
  6751. (executeInternal): Added async DNS support.
  6752. * src/HttpInitiateConnectionCommand.h
  6753. (nameResolver): New function.
  6754. * src/HttpInitiateConnectionCommand.cc
  6755. (DlRetryEx.h): Included.
  6756. (HttpInitiateConnectionCommand): Call disableReadCheckSocket,
  6757. disableWriteCheckSocket.
  6758. (~HttpInitiateConnectionCommand): Call disableNameResolverCheck.
  6759. (executeInternal): Added async DNS support.
  6760. * src/NameResolver.h: New class. Note: #include <ares.h> is surrounded
  6761. by extern "C" declaration.
  6762. * src/NameResolver.cc: New class.
  6763. * src/Util.h:
  6764. (isNumberAndDotsNotation): New function
  6765. * src/Util.cc
  6766. (isNumberAndDotsNotation): New function.
  6767. * src/DownloadEngine.h
  6768. (NameResolver.h): Included.
  6769. (NameResolverEntry): New class.
  6770. (NameResolverEntries): New type definition.
  6771. (addNameResolverCheck): New function.
  6772. (deleteNameResolverCheck): New function.
  6773. * src/DownloadEngine.cc
  6774. (run): Initialize cp with 0.
  6775. (SetDescriptor::operator()): Added for NameResolverEntry.
  6776. (AccumulateActiveUuid::operator()): Added for NameResolverEntry.
  6777. (waitData): Check nameResolver entries.
  6778. (updateFdSet): Update fds in nameResolver entries.
  6779. (addNameResolverCheck): New function.
  6780. (deleteNameResolverCheck): new function.
  6781. * src/PeerInteractionCommand.cc
  6782. (executeInternal): Fixed wrong socket handling.
  6783. * src/main.cc
  6784. (main): Fixed the initial value of PREF_LOWEST_SPEED_LIMIT option to 0.
  6785. * src/Util.cc
  6786. (fileChecksum): Removed the call to ctx.digestReset().
  6787. 2006-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6788. * po/ru.po: Azamat sent me Russian translation.
  6789. * src/FtpNegotiateCommand.cc
  6790. (recvGreeting): Call disableWriteCheckSocket just after
  6791. socket->setBlockingMode(). This avoids unnecessary CPU-hog loop.
  6792. (recvRetr): Recognized status code 125 as a acceptable response code.
  6793. Rename Time.h to TimeA2.h to avoid compilation ploblem on
  6794. case-insesitive filesystem(BUG#1531057).
  6795. * src/Time.h: Renamed as TimeA2.h.
  6796. * src/Time.cc: Renamed as TimeA2.cc.
  6797. * src/TimeA2.h: New class.
  6798. * src/TimeA2.cc: New class.
  6799. * src/PeerChokeCommand.h: Replaced Time.h with TimeA2.h.
  6800. * src/TrackerWatcherCommand.h: Replaced Time.h with TimeA2.h.
  6801. * src/PeerAbstractCommand.h: Replaced Time.h with TimeA2.h.
  6802. * src/AbstractCommand.h: Replaced Time.h with TimeA2.h.
  6803. * src/PeerInteractionCommand.h: Replaced Time.h with TimeA2.h.
  6804. * src/ConsoleDownloadEngine.h: Replaced Time.h with TimeA2.h.
  6805. * src/TorrentAutoSaveCommand.h: Replaced Time.h with TimeA2.h.
  6806. * src/DownloadCommand.h: Replaced Time.h with TimeA2.h.
  6807. * src/TorrentMan.h: Replaced Time.h with TimeA2.h.
  6808. * src/TorrentDownloadEngine.h: Replaced Time.h with TimeA2.h.
  6809. * src/RequestSlot.h: Replaced Time.h with TimeA2.h.
  6810. * src/SleepCommand.h: Replaced Time.h with TimeA2.h.
  6811. * src/DownloadEngine.cc: Replaced Time.h with TimeA2.h.
  6812. * release 0.7.0
  6813. 2006-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6814. * src/PeerChokeCommand.h
  6815. (PeerChokeCommand): Rearranged the arguments.
  6816. * src/PeerChokeCommand.cc
  6817. (PeerChokeCommand): Rearranged the arguments.
  6818. * src/MetalinkEntry.h
  6819. (Checksum.h): Included.
  6820. (md5): Removed.
  6821. (sha1): Removed.
  6822. (checksum): New variable.
  6823. (operator=): Updated.
  6824. (check): Removed.
  6825. * src/prefs.h
  6826. (PREF_LOWEST_SPEED_LIMIT): New definition.
  6827. (PREF_FOLLOW_TORRENT): New definition.
  6828. (PREF_SELECT_FILE): New definition.
  6829. (PREF_FOLLOW_METALINK): New definition.
  6830. * src/MetalinkResource.h
  6831. (TYPE_HTTPS): Added to enum TYPE.
  6832. * src/TorrentMan.cc
  6833. (~TorrentMan): Rewritten.
  6834. * src/MultiDiskWriter.cc
  6835. (MultiDiskAdaptor): Updated according to the changes in
  6836. MessageDigestContext.
  6837. (~MultiDiskAdaptor): Updated according to the changes in
  6838. MessageDigestContext.
  6839. (hashUpdate): Updated according to the changes in MessageDigestContext.
  6840. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6841. * src/Util.h
  6842. (fileChecksum): Updated according to the changes in
  6843. MessageDigestContext.
  6844. * src/Util.cc
  6845. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6846. (fileChecksum): Updated according to the changes in
  6847. MessageDigestContext.
  6848. * src/messageDigest.h: Rewritten.
  6849. * src/MetalinkEntry.cc
  6850. (check): Removed.
  6851. (Supported): Updated.
  6852. (dropUnsupportedResource): Fixed a memory leak.
  6853. * src/ShaVisitor.cc
  6854. (ShaVisitor): Updated according to the changes in MessageDigestContext.
  6855. (~ShaVisitor): Updated according to the changes in
  6856. MessageDigestContext.
  6857. (visit): Updated according to the changes in MessageDigestContext.
  6858. * src/main.cc
  6859. (main): Rewritten the portion of download loop. --lowest-speed-limit
  6860. command-line option added.
  6861. * src/DownloadEngine.h
  6862. (SocketEntry): New class.
  6863. (SocketEntries): New definition.
  6864. (PairFind): Removed.
  6865. (SockCmdMap): Removed.
  6866. * src/DownloadEngine.cc
  6867. (DownloadEngine): Rewritten.
  6868. (~DownloadEngine): Rewritten.
  6869. (run): Renamed activeCommandUuids as activeUuids.
  6870. (SetDescriptor): Rewritten.
  6871. (AccumulateActiveCommandUuid): Removed.
  6872. (AccumulateActiveUuid): New function object.
  6873. (waitData): Rewritten.
  6874. (updateFdSet): Rewritten.
  6875. (addSocket): Rewritten.
  6876. (deleteSocket): Rewritten.
  6877. (addSocketForReadCheck): Rewritten.
  6878. (deleteSocketForReadCheck): Rewritten.
  6879. (addSocketForWriteCheck): Rewritten.
  6880. (deleteSocketForWriteCheck): Rewritten.
  6881. * src/Xml2MetalinkProcessor.cc
  6882. (getEntry): Rewritten the portion of MetalinkEntry creation.
  6883. * src/DownloadCommand.cc
  6884. (executeInternal): Added the check routine for lowest speed limit.
  6885. * src/AbstractDiskWriter.cc
  6886. (AbstractDiskWriter): Updated according to the changes in
  6887. MessageDigestContext.
  6888. (~AbstractDiskWriter): Updated according to the changes in
  6889. MessageDigestContext.
  6890. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6891. * src/RequestInfo.h: New class.
  6892. * src/UrlRequestInfo.h: New class.
  6893. * src/UrlRequestInfo.cc: New class.
  6894. * src/TorrentRequestInfo.h: New class.
  6895. * src/TorrentRequestInfo.cc: New class.
  6896. * src/MetalinkRequestInfo.h: New class.
  6897. * src/MetalinkRequestInfo.cc: New class.
  6898. * src/Checksum.h: New class.
  6899. * src/DownloadEngineFactory.h: New class.
  6900. * src/DownloadEngineFactory.cc: New class.
  6901. 2006-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6902. * src/Option.h
  6903. (getAsBool): New function.
  6904. * src/Option.cc
  6905. (prefs.h): Included.
  6906. (defined): 0-length value is now recognized as undefined.
  6907. (getAsInt): Rewritten.
  6908. (getAsLLInt): Rewritten.
  6909. (getAsBool): New function.
  6910. * src/FeatureConfig.h: Rewritten.
  6911. * src/FeatureConfig.cc: Rewritten.
  6912. * src/prefs.h
  6913. (PREF_STDOUT_LOG): New definition.
  6914. (PREF_LOG): New definition.
  6915. (PREF_DIR): New definition.
  6916. (PREF_OUT): New definition.
  6917. (PREF_SPLIT): New definition.
  6918. (PREF_DAEMON): New definition.
  6919. (PREF_REFERER): New definition.
  6920. (PREF_TORRENT_FILE): New definition.
  6921. (PREF_LISTEN_PORT): New definition.
  6922. (PREF_METALINK_FILE): New definition.
  6923. (PREF_METALINK_VERSION): New definition.
  6924. (PREF_METALINK_LANGUAGE): New definition.
  6925. (PREF_METALINK_OS): New definition.
  6926. (PREF_METALINK_SERVERS): New definition.
  6927. * src/main.cc
  6928. (main): Following command-line parameters are now put into Option
  6929. class: stdoutLog, logfile, dir, ufilename, split, daemonMode,
  6930. referer, torrentFile, metalinkFile, listenPort, metalinkVersion,
  6931. metalinkLanguage, metalinkOs, metalinkServers
  6932. To fix the bug that aria2 can not handle http response header properly.
  6933. * src/HttpHeader.cc
  6934. (put): Made name lowercased.
  6935. (defined): Made name lowercased.
  6936. (getFirst): Made name lowercased.
  6937. (get): Made name lowercased.
  6938. (getFirstAsInt): Rewritten.
  6939. (getFirstAsLLInt): Rewritten.
  6940. 2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6941. * src/TorrentMan.h:
  6942. (advertisePiece): Updated doc.
  6943. (getAdvertisedPieceIndexes): Updated doc.
  6944. (removeAdvertisedPiece); New function.
  6945. * src/TorrentMan.cc
  6946. (FindElapsedHave): New function object.
  6947. (removeAdvertisedPiece): New function.
  6948. * src/HaveEraseCommand.h: New class.
  6949. * src/HaveEraseCommand.cc: New class.
  6950. * src/FeatureConfig.h: New class.
  6951. * src/FeatureConfig.cc: New class.
  6952. * src/Request.h
  6953. (defaultPorts): Removed.
  6954. * src/Request.cc
  6955. (FeatureConfig.h): Included.
  6956. (Request): Removed the statements related to defaultPorts.
  6957. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead.
  6958. A default port number is now retrieved from FeatureConfig.
  6959. * src/main.cc
  6960. (HaveEraseCommand.h): Included.
  6961. (showVersion): Added the output of feature list.
  6962. (main): Added HaveEraseCommand to command queue in BitTorrent
  6963. downloading.
  6964. * src/PeerInteractionCommand.h
  6965. (chokeCheckPoint): Commented out.
  6966. (periodicExecPoint): New variable.
  6967. * src/PeerInteractionCommand.cc
  6968. (executeInternal): Following methods are now called in at least every
  6969. 0.5 seconds to reduce CPU usage:
  6970. detectMessageFlooding(), peerInteraction->checkRequestSlot(),
  6971. checkHave(), sendKeepAlive().
  6972. (checkLongTimePeerChoking): Commented out.
  6973. * src/BitfieldMan.h
  6974. (getNthBitIndex): Changed the method signature.
  6975. (getMissingIndexRandomly): Changed the method signature.
  6976. * src/BitfieldMan.cc
  6977. (getNthBitIndex): Rewritten
  6978. (getMissingIndexRandomly): Rewritten.
  6979. (hasMissingPiece): Rewritten.
  6980. (getMissingIndex): Refactored.
  6981. (getMissingUnusedIndex); Refactored.
  6982. (getMissingIndex): Refactored.
  6983. 2006-07-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6984. * src/PeerMessage.h
  6985. (Piece.h): Included.
  6986. (SharedHandle.h): Included.
  6987. (invalidate): New variable.
  6988. (uploading): New variable.
  6989. (isInvalidate): New function.
  6990. (isUploading): New function.
  6991. (onPush): New function.
  6992. (onChoked): New function.
  6993. (onCanceled): New function.
  6994. (onAbortPiece): New function.
  6995. (PeerMessageHandle): New type definition.
  6996. * src/PeerMessage.cc
  6997. (PeerMessage): Added the initialization for invalidate and uploading.
  6998. * src/CancelMessage.h
  6999. (CancelMessage): Rewritten.
  7000. * src/RejectMessage.h
  7001. (RejectMessage): Rewritten.
  7002. * src/Metalinker.h
  7003. (operator=): Defined.
  7004. * src/MetaEntry.h
  7005. (operator=): Defined.
  7006. * src/MetalinkResource.h
  7007. (operator=): Defined.
  7008. * src/AllowedFastMessage.h
  7009. (AllowedFastMessage): Rewritten.
  7010. * src/HandshakeMessage.h
  7011. (HandshakeMessage): New function(overload).
  7012. * src/HandshakeMessage.cc
  7013. (HandshakeMessage): Rewritten.
  7014. (init): New function.
  7015. * src/HaveMessage.h
  7016. (HaveMessage): Rewritten.
  7017. * src/Time.h
  7018. (operator=): Defined the function body here.
  7019. * src/Time.cc
  7020. (operator=): Removed.
  7021. * src/SocketCore.h
  7022. (operator==): Defined here.
  7023. (operator!=): Defined here.
  7024. (operator<): Defined here.
  7025. * src/SocketCore.cc
  7026. (operator==): Removed.
  7027. (operator<): Removed.
  7028. * src/BitfieldMan.h
  7029. (operator=): Defined the function body here.
  7030. * src/BitfieldMan.cc
  7031. (operator=): Removed.
  7032. * src/TorrentMan.h
  7033. (deleteErrorPeer): Removed.
  7034. (deleteUnusedPeer); New function.
  7035. * src/TorrentMan.cc
  7036. (addPeer): Call deleteUnusedPeer.
  7037. (deleteErrorPeer): Removed.
  7038. (deleteUnusedPeer): New function.
  7039. * src/PeerAbstractCommand.h
  7040. (setNoCheck): New function.
  7041. (noCheck): New variable.
  7042. * src/PeerAbstractCommand.cc
  7043. (PeerAbstractCommand): Added the initialization of noCheck.
  7044. (execute): Added a check for noCheck.
  7045. (setNoCheck): New function.
  7046. * src/Util.h
  7047. (stdio.h): Included.
  7048. * src/Util.cc
  7049. (unistd.h): Included.
  7050. * src/DefaultDiskWriter.cc
  7051. (unistd.h): Included.
  7052. * src/Peer.h
  7053. (operator==): Defined the function body here.
  7054. (operator!=): Defined the function body here.
  7055. * src/Peer.cc
  7056. (operator==): Removed.
  7057. (operator!=): Removed.
  7058. * src/Piece.h
  7059. (Piece): Defined the function body here(copy constructor).
  7060. (operator=): Defined the function body here.
  7061. (operator==): Defined the function body here.
  7062. * src/Piece.cc
  7063. (Piece): Removed(copy constructor).
  7064. (operator=): Removed.
  7065. (operator==): Removed.
  7066. * src/PeerMessageUtil.h
  7067. (ChokeMessage.h): Removed.
  7068. (UnchokeMessage.h): Removed.
  7069. (InterestedMessage.h): Removed.
  7070. (NotInterestedMessage.h): Removed.
  7071. (HaveMessage.h): Removed.
  7072. (BitfieldMessage.h): Removed.
  7073. (RequestMessage.h): Removed.
  7074. (CancelMessage.h): Removed.
  7075. (PieceMessage.h): Removed.
  7076. (HandshakeMessage.h): Removed.
  7077. (KeepAliveMessage.h): Removed.
  7078. (PortMessage.h): Removed.
  7079. (HaveAllMessage.h): Removed.
  7080. (HaveNoneMessage.h): Removed.
  7081. (PeerConnection.h): Removed.
  7082. (HandshakeMessage.h): Included.
  7083. * src/BitfieldMessage.h
  7084. (init): New function.
  7085. (BitfieldMessage): Rewritten.
  7086. (BitfieldMessage): New function(overload).
  7087. * src/RequestSlot.h
  7088. (operator=): Defined the function body here.
  7089. (operator==): Defined the function body here.
  7090. * src/RequestSlot.cc
  7091. (operator=): Removed.
  7092. (operator==): Removed.
  7093. To remove the dependency on the PeerMessage subclass from
  7094. PeerInteraction:
  7095. * src/PeerMessageFactory.h: New class.
  7096. * src/PeerMessageFactory.cc: New class.
  7097. * src/SimplePeerMessage.cc
  7098. (send): If invalidate is true then do nothing.
  7099. * src/PeerInteractionCommand.cc
  7100. (HandshakeMessage.h): Included.
  7101. (KeepAliveMessage.h): Included.
  7102. (ChokeMessage.h): Included.
  7103. (UnchokeMessage.h): Included.
  7104. (HaveMessage.h): Included.
  7105. (executeInternal): Call setNoCheck().
  7106. Removed setWriteCheckSocket(socket).
  7107. * src/PeerInteraction.h
  7108. (ChokeMessage.h): Removed.
  7109. (UnchokeMessage.h): Removed.
  7110. (InterestedMessage.h): Removed.
  7111. (NotInterestedMessage.h): Removed.
  7112. (HaveMessage.h): Removed.
  7113. (BitfieldMessage.h): Removed.
  7114. (RequestMessage.h): Removed.
  7115. (CancelMessage.h): Removed.
  7116. (PieceMessage.h): Removed.
  7117. (HandshakeMessage.h): Removed.
  7118. (KeepAliveMessage.h): Removed.
  7119. (PortMessage.h): Removed.
  7120. (HaveAllMessage.h): Removed.
  7121. (HaveNoneMessage.h): Removed.
  7122. (RejectMessage.h): Removed.
  7123. (AllowedFastMessage.h): Removed.
  7124. (SuggestPieceMessage.h): Removed.
  7125. (PeerMessageFactory.h): Included.
  7126. (PeerMessageHandle): Removed typedef of PeerMessageHandle.
  7127. (HandshakeMessageHandle): Removed typedef of HandshakeMessageHandle.
  7128. (PeerMessageFactory): New variable.
  7129. (createPeerMessage): Removed.
  7130. (createHandshakeMessage): Removed.
  7131. (setPeerMessageCommonProperty): Removed.
  7132. (addRequestSlot): New function.
  7133. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  7134. (getPeerMessageFactory): New function.
  7135. (createRequestMessage): Removed.
  7136. (createCancelMessage): Removed.
  7137. (createPieceMessage): Removed.
  7138. (createHaveMessage): Removed.
  7139. (createChokeMessage): Removed.
  7140. (createUnchokeMessage): Removed.
  7141. (createInterestedMessage): Removed.
  7142. (createNotInterestedMessage): Removed.
  7143. (createBitfieldMessage): Removed.
  7144. (createKeepAliveMessage): Removed.
  7145. (createHaveAllMessage): Removed.
  7146. (createHaveNoneMessage): Removed.
  7147. (createRejectMessage): Removed.
  7148. (createAllowedFastMessage): Removed.
  7149. * src/PeerInteraction.cc
  7150. (PeerInteraction): Allocate PeerMessageFactory here.
  7151. (~PeerInteraction): Deallocate PeerMessageFactory here.
  7152. (sendMessages): Use msg->isUploading() instead of msg->getId() ==
  7153. PieceMessage::ID.
  7154. (addMessage): Simplified by using PeerMessage::onPush().
  7155. (addRequestSlot): New function.
  7156. (rejectAllPieceMessageInQueue): Simplified by using
  7157. PeerMessage::onChoked().
  7158. (rejectPieceMessageInQueue): Simplified by using
  7159. PeerMessage::onCanceled().
  7160. (abortPiece): Simplified by using PeerMessage::abortPiece().
  7161. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  7162. (createHandshakeMessage): Removed.
  7163. (createPeerMessage): Removed.
  7164. (sendHandshake): Call PeerMessageFactory::createHandshakeMessage().
  7165. (setPeerMessageCommonProperty): Removed.
  7166. (createRequestMessage): Removed.
  7167. (createCancelMessage): Removed.
  7168. (createPieceMessage): Removed.
  7169. (createHaveMessage): Removed.
  7170. (createChokeMessage): Removed.
  7171. (createUnchokeMessage): Removed.
  7172. (createInterestedMessage): Removed.
  7173. (createNotInterestedMessage): Removed.
  7174. (createBitfieldMessage): Removed.
  7175. (createKeepAliveMessage): Removed.
  7176. (createHaveAllMessage): Removed.
  7177. (createHaveNoneMessage): Removed.
  7178. (createRejectMessage): Removed.
  7179. (createAllowedFastMessage): Removed.
  7180. * src/PieceMessage.h
  7181. (createRejectMessage): New function.
  7182. (PieceMessage): Rewritten.
  7183. (onChoked): New function.
  7184. (onCanceled): New function.
  7185. * src/PieceMessage.cc
  7186. (send): If invalidate is true then do nothing, just return.
  7187. (createRejectMessage): New function.
  7188. (onChoked): New function.
  7189. (onCanceled): New function.
  7190. * src/RequestMessage.h
  7191. (RequestMessage): Rewritten.
  7192. (onPush): New function.
  7193. (onAbortPiece): New function.
  7194. * src/RequestMessage.cc
  7195. (onPush): New function.
  7196. (onAbortPiece): New function.
  7197. Update fd_set when a socket is added or deleted in order to improve
  7198. performance:
  7199. * src/DownloadEngine.h
  7200. (rfdset): New variable.
  7201. (wfdset): New variable.
  7202. (updateFdSet): New function.
  7203. * src/DownloadEngine.cc
  7204. (SetDescriptor::operator()): Use SockCmdMap::value_type.
  7205. (AccumulateActiveCommandUuid::operator()): Use SockCmdMap::value_type.
  7206. (waitData): Copy rfdset and wfdset.
  7207. (updateFdSet): New function.
  7208. (addSocket): Call updateFdSet.
  7209. (deleteSocket): Call updateFdSet.
  7210. 2006-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7211. To add the support for Metalink3.0 backward compatible links:
  7212. * src/Request.h
  7213. (SAFE_CHARS): Added '#'.
  7214. (METALINK_MARK): New definition.
  7215. * src/Request.cc
  7216. (parseUrl): Added the support for Metalink3.0 backward compatible
  7217. links.
  7218. etc
  7219. * src/PeerInteraction.cc
  7220. (MsgPushBack): Removed.
  7221. (sendMessages): Use STL copy and back_inserter.
  7222. (rejectAllPieceMessageInQueue): Use STL copy and back_inserter.
  7223. (rejectPieceMessageInQueue): Use STL copy and back_inserter.
  7224. * src/TorrentMan.h
  7225. (MAX_PEER_LIST_SIZE): Changed to 100 from 250.
  7226. 2006-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7227. * src/SharedHandle.h: New class.
  7228. To wrap Socket, Command, PeerMessage and Peer with SharedHandle:
  7229. * src/HttpResponseCommand.h
  7230. (HttpResponseCommand): Wrapped Socket.
  7231. * src/SocketCore.h
  7232. (operator==): New function.
  7233. (operator!=): New function.
  7234. (operator<): New function.
  7235. (getSockfd): New function.
  7236. (isOpen): New function.
  7237. (writeData): New function.
  7238. * src/SocketCore.cc
  7239. (operator==): New function.
  7240. (operator!=): New function.
  7241. (operator<): New function.
  7242. * src/AbstractCommand.h
  7243. (socket): Changed its type to SocketHandle.
  7244. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7245. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7246. (disableReadCheckSocket): New function.
  7247. (disableWriteCheckSocket): New function.
  7248. (readCheckTarget): Changed its type to SocketHandle.
  7249. (writeCheckTarget): Changed its type to SocketHandle.
  7250. (AbstractCommand): Replaced Socket with SocketHandle.
  7251. * src/AbstractCommand.cc
  7252. (AbstractCommand): Replaced Socket with SocketHandle.
  7253. (~AbstractCommand): Removed the deallocation for Socket object.
  7254. (disableReadCheckSocket): New function.
  7255. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7256. (disableWriteCheckSocket): New function.
  7257. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7258. * src/HttpDownloadCommand.cc
  7259. (DownloadCommand): Replaced Socket with SocketHandle.
  7260. * src/PeerAbstractCommand.h
  7261. (socket): Changed its type to SocketHandle.
  7262. (peer): Changed its type to PeerHandle.
  7263. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7264. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7265. (disableReadCheckSocket): New function.
  7266. (disableWriteCheckSocket): New function.
  7267. (readCheckTarget): Changed its type to SocketHandle.
  7268. (writeCheckTarget): Changed its type to SocketHandle.
  7269. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  7270. Replaced Peer with PeerHandle.
  7271. * src/HttpRequestCommand.cc
  7272. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7273. Use disableReadCheckSocket.
  7274. * src/PeerInitiateConnectionCommand.h
  7275. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7276. * src/PeerChokeCommand.cc
  7277. (UploadFaster::operator()): Replaced Peer with PeerHandle.
  7278. (DownloadFaster::operator()): Replaced Peer with PeerHandle.
  7279. (execute): Use PeerHandle.
  7280. * src/PeerConnection.h
  7281. (HandshakeMessage.h): Removed include of HandshakeMessage.h.
  7282. (socket): Changed its type to SocketHandle.
  7283. (PeerConnection): Replaced Socket with SocketHandle.
  7284. * src/PeerConnection.cc
  7285. (PeerConnection): Replaced Socket with SocketHandle.
  7286. * src/PeerInteractionCommand.h
  7287. (PeerInteractionCommand): Replaced socket with SocketHandle.
  7288. Replaced Peer with PeerHandle.
  7289. * src/PeerInteractionCommand.cc
  7290. (PeerInteractionCommand): Replaced Socket with SocketHandle.
  7291. Replaced Peer with PeerHandle.
  7292. (executeInternal): Use disableWriteCheckSocket.
  7293. Use HandshakeMessageHandle.
  7294. (receiveMessages): Use PeerMessageHandle.
  7295. (prepareForNextPeer): Use PeerHandle.
  7296. * src/HttpProxyRequestCommand.h
  7297. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7298. * src/HttpResponseCommand.cc
  7299. (HttpResponseCommand): Replaced Socket with SocketHandle.
  7300. * src/TorrentMan.cc
  7301. (nullPeer): Added external reference.
  7302. (~TorrentMan): Removed the deallocation of the elements of peers.
  7303. (addPeer): Rewritten.
  7304. (isPeerAvailable): Use nullPeer.
  7305. (deleteOldpeers): Replaced with deleteErrorPeer.
  7306. (deleteErrorPeer): New function.
  7307. (getPeer): Use PeerHandle and nullPeer.
  7308. (hasMissingPiece): Replaced Peer with PeerHandle.
  7309. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7310. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7311. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7312. (getMissingPiece): Replaced Peer with PeerHandle.
  7313. * src/FtpNegotiateCommand.cc
  7314. (FtpNegotiationCommand): Replaced Peer with PeerHandle.
  7315. (~FtpNegotiationCommand): Removed the deallocation of Sockets.
  7316. (recvGreeting): Use disableWriteCheckSocket.
  7317. (recvPasv): Removed the allocation of Socket.
  7318. Use disableReadCheckSocket.
  7319. (sendRestPasv): Use disableWriteCheckSocket.
  7320. (recvRetr): Changed assertion.
  7321. * src/PeerInteraction.h
  7322. (SharedHandle.h): Included SharedHandle.h.
  7323. (PeerMessageHandle): New type definition.
  7324. (HandshakeMessageHandle): New type definition.
  7325. (MessageQueue): Changed. Now its element is of type PeerMessageHandle.
  7326. (peer): Changed its type to PeerHandle.
  7327. (createHandshakeMessage): Replaced HandshakeMessage with
  7328. HandshakeMessageHandle.
  7329. (createPeerMessage): Replaced PeerMessageHandle with PeerMessage.
  7330. (PeerInteraction): Replaced Peer with PeerHandle.
  7331. Replaced Socket with SocketHandle.
  7332. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  7333. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  7334. (receiveHandshake): Replaced HandshakeMessage with
  7335. HandshakeMessageHandle.
  7336. * src/PeerInteraction.cc
  7337. (PeerInteraction): Replaced Peer with PeerHandle.
  7338. Replaced Socket with SocketHandle.
  7339. (~PeerInteraction): Removed the deallocation of the elements of
  7340. messageQueue.
  7341. (MsgPushBack::operator()): Replaced PeerMessage with PeerMessageHandle.
  7342. (isSendingMessageInProgress): Replaced PeerMessage with
  7343. PeerMessageHandle.
  7344. (sendMessages): Use PeerMessageHandle. Removed try-catch block.
  7345. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  7346. (rejectAllPieceMessageInQueue): Use PeerMessageHandle.
  7347. (rejectPieceMessageInQueue): Use PeerMessageHandle.
  7348. (abortPiece): Use PeerMessageHandle.
  7349. (receiveHandshake): Replaced HandshakeMessage with
  7350. HandshakeMessageHandle. Removed try-catch block.
  7351. (createHandshakeMessage): Replaced HandshakeMessage with
  7352. HandshakeMessageHandle.
  7353. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  7354. Removed try-catch block.
  7355. (createPeerMessage): Replaced PeerMessage with PeerMessageHandle.
  7356. * src/HttpProxyResponseCommand.cc
  7357. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7358. * src/FtpTunnelResponseCommand.h
  7359. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7360. * src/HttpConnection.cc
  7361. (HttpConnection): Replaced Socket with SocketHandle.
  7362. * src/PeerAbstractCommand.cc
  7363. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  7364. (~PeerAbstractCommand): Removed the deallocation of socket.
  7365. Use disableReadCheckSocket, disableWriteCheckSocket.
  7366. (disableReadCheckSocket): New function.
  7367. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7368. (disableWriteCheckSocket): New function.
  7369. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7370. * src/InitiateConnectionCommandFactory.h: Corrected indentation.
  7371. * src/FtpTunnelRequestCommand.cc
  7372. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7373. (~FtpTunnelRequestCommand): Corrected indentation.
  7374. * src/DownloadCommand.h
  7375. (DownloadCommand): Replaced Socket with SocketHandle.
  7376. * src/PeerListenCommand.cc
  7377. (PeerListenCommand): Removed the initialization of socket.
  7378. (~PeerListenCommand): Removed the deallocation of socket.
  7379. (bindPort): Use SocketHandle.
  7380. (execute): Use SocketHandle and PeerHandle.
  7381. * src/FtpDowndloadCommand.cc
  7382. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7383. (~FtpDownloadCommand): Removed the deallocation of ctrlSocket.
  7384. * src/main.cc
  7385. (main): Corrected indentation.
  7386. * src/HttpInitiateConnectionCommand.cc
  7387. (HttpInitiateConnectionCommand): Replaced Socket with SocketHandle.
  7388. (executeInternal): Removed the allocation of socket.
  7389. * src/HttpRequestCommand.h
  7390. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7391. * src/FtpNegotiationCommand.h
  7392. (dataSocket): Changed its type to SocketHandle.
  7393. (serverSocket): Changed its type to SocketHandle.
  7394. (FtpNegotiationCommand): Replaced Socket with SocketHandle.
  7395. * src/TorrentMan.h
  7396. (MAX_PEER_UPDATE): Removed.
  7397. (MAX_PEERS): New definition.
  7398. (Peers): The element is now of type PeerHandle.
  7399. (addPeer): Replaced Peer with PeerHandle. Removed 'duplicate' argument.
  7400. (getPeer): Replaced Peer with PeerHandle.
  7401. (deleteOldErrorPeers): Removed.
  7402. (deleteErrorPeer): New function.
  7403. (hasMissingPiece): Replaced Peer with PeerHandle.
  7404. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7405. (getMissingPiece): Replaced Peer with PeerHandle.
  7406. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7407. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7408. (addActivePeer): Replaced Peer with PeerHandle.
  7409. (deleteActivePeer): Replaced Peer with PeerHandle.
  7410. Added a check for the return value of find.
  7411. * src/FtpTunnelResponseCommand.cc
  7412. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7413. * src/FtpInitiateConnectionCommand.cc
  7414. (executeInternal): Removed the allocation of socket.
  7415. * src/DownloadEngine.h
  7416. (Sockets): An element is now of type SocketHandle.
  7417. (SockCmdMap): A key is of type SocketHandle, a value is of type int.
  7418. (CommandUuids): New type definition.
  7419. (rsockets): Changed its type to SockCmdMap.
  7420. (wsockets): Changed its type to SockCmdMap.
  7421. (addSocket): Rewritten.
  7422. (deleteSocket): Rewritten.
  7423. (addSocketForReadCheck): Rewritten.
  7424. (deleteSocketForReadCheck): Rewritten.
  7425. (addSocketForWriteCheck): Rewritten.
  7426. (deleteSocketForWriteCheck): Rewritten.
  7427. (PairFind): New template class.
  7428. * src/HttpDownloadCommand.h
  7429. (HttpDownloadCommand): Replaced Socket with SocketHandle.
  7430. * src/FtpConnection.cc
  7431. (FtpConnection): Replaced Socket with SocketHandle.
  7432. (sendPort): Removed the allocation of serverSocket. Removed try-catch
  7433. block.
  7434. * src/InitiateConnectionCommandFactory.cc
  7435. (DlAbortEx.h): Included DlAbortEx.h.
  7436. (createInitiateConnectionCommand): Throw exception if the protocol of
  7437. requested URI is not supported.
  7438. * src/Peer.cc
  7439. (nullPeer): Changed its type to PeerHandle.
  7440. (operator==): New function.
  7441. (operator!=): New function.
  7442. * src/Peer.h
  7443. (SharedHandle.h): Included SharedHandle.h.
  7444. (operator==): New function.
  7445. (operator!=): New function.
  7446. (Peer): Added the default constructor.
  7447. Use resetStatus() to initialize member variables.
  7448. (nullPeer): Removed.
  7449. * src/TrackerUpdateCommand.cc
  7450. (execute): Brushed up using SharedHandle. Replaced MAX_PEER_UPDATE
  7451. with MIN_PEERS.
  7452. * src/PeerListenCommand.h
  7453. (socket): Changed its type to SocketHandle.
  7454. * src/Command.h
  7455. (CommandUuid): New type definition.
  7456. (uuid): New variable.
  7457. (uuidGen): New variable.
  7458. (Command): Added the initialization of uuid.
  7459. (getUuid): New function.
  7460. * src/Socket.h
  7461. (Socket): Removed.
  7462. (SocketHandle): New type definition.
  7463. * src/DownloadEngine.h
  7464. (FindCommand): New function object.
  7465. (run): The portion of socket check was rewritten.
  7466. (SetDescriptor): New function object.
  7467. (AccumulateActiveCommandUuid): New function object.
  7468. (waitData): Rewritten.
  7469. (addSocket): Rewritten.
  7470. (deleteSocket): Rewritten.
  7471. (addSocketForReadCheck): Rewritten.
  7472. (addSocketForWriteCheck): Rewritten.
  7473. (deleteSocketForReadCheck): Rewritten.
  7474. (deleteSocketForWriteCheck): Rewritten.
  7475. * src/HttpProxyResponseCommand.h
  7476. (HttpProxyResponseCommand): Replaced Socket with SocketHandle.
  7477. * src/HttpConnection.h
  7478. (socket): Changed its type to SocketHandle.
  7479. (HttpConnection): Replaced Socket with SocketHandle.
  7480. * src/PeerInitiateConnectionCommand.cc
  7481. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7482. (executeInternal): Removed the allocation of socket.
  7483. (prepareForNextPeer): Use PeerHandle.
  7484. * src/PeerMessage.h
  7485. (peer): Changed its type to PeerHandle.
  7486. (getPeer): Replaced Peer with PeerHandle.
  7487. (setPeer): Replaced Peer with PeerHandle.
  7488. * src/DownloadCommand.cc
  7489. (DownloadCommand): Replaced Socket with SocketHandle.
  7490. * src/FtpConnection.h
  7491. (socket): Changed its type to SocketHandle.
  7492. (FtpConnection): Replaced Socket with SocketHandle.
  7493. (sendPort); Replaced Socket with SocketHandle.
  7494. * src/FtpDowndloadCommand.h
  7495. (ctrlSocket): Changed its type to SocketHandle.
  7496. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7497. * src/HttpProxyRequestCommand.cc
  7498. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7499. * src/FtpTunnelRequestCommand.h
  7500. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7501. etc
  7502. * src/PeerChokeCommand.h
  7503. (setAllPeerChoked): Removed.
  7504. (setAllPeerResetDelta): Removed.
  7505. * src/PeerChokeCommand.cc
  7506. (setAllPeerChoked): Removed.
  7507. (ChokePeer): New function object.
  7508. (setAllPeerResetDelta): Removed.
  7509. (ResetDelta): New function object.
  7510. (orderByDownloadRate): Fixed a bug: use DowloadFaster, not UploadFaster
  7511. (execute): Show download speed when the local node is a seeder.
  7512. setAllPeerChoked and setAllPeerResetDelta were rewritten
  7513. using STL.
  7514. * src/TrackerWatcherCommand.h
  7515. (MIN_PEERS): Removed.
  7516. * src/TorrentMan.cc
  7517. (getPeer): Replaced MAX_PEER_UPDATE with MIN_PEERS.
  7518. 2006-07-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7519. To fix the bug that .aria2 file is not saved if downloading is stopped
  7520. by the errors:it results that aria2 can not resume downloading:
  7521. * src/main.cc
  7522. (normalDownload): Added the call to save().
  7523. (main): Added the deletion of the elements in 'reserved'.
  7524. To fix log:
  7525. * src/PeerInteraction.cc
  7526. (receiveHandshake): Fixed log.
  7527. 2006-07-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7528. To improve download performance in BitTorrent:
  7529. * src/TorrentMan.cc
  7530. (getPeer): Check the number of connections. Return nullPeer if
  7531. it is greater than MAX_PEER_UPDATE.
  7532. This code was originally here, but was removed in 0.5.1.
  7533. 2006-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7534. To improve the conditional compilation:
  7535. * src/MultiDiskWriter.h:
  7536. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7537. * src/MultiDiskWriter.cc:
  7538. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7539. * src/Util.h:
  7540. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7541. Added ENABLE_BITTORRENT around computeFastSet().
  7542. * src/Util.cc:
  7543. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7544. Added ENABLE_BITTORRENT around computeFastSet().
  7545. * src/messageDigest.h:
  7546. Replaced ENABLE_BITTORRENT with ENABLE_SSL.
  7547. * src/ShaVisitor.h:
  7548. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7549. * src/ShaVisitor.cc:
  7550. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7551. * src/main.cc:
  7552. Added ENABLE_BITTORRENT around includes and blocks related to
  7553. BitTorrent.
  7554. Added ENABLE_MESSAGE_DIGEST to skip checksum checking when the message
  7555. digest support is not available.
  7556. * src/AbstractDiskWriter.h:
  7557. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7558. * src/AbstractDiskWriter.cc:
  7559. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7560. * src/MetalinkEntry.cc
  7561. (check): Added ENABLE_MESSAGE_DIGEST. Return true if the message digest
  7562. support is not available.
  7563. To add command-line options for Metalink:
  7564. * src/main.cc:
  7565. Added metalink-version, metalink-language, metalink-os,
  7566. follow-metalink.
  7567. To use EXIT_SUCCESS and EXIT_FAILURE with exit():
  7568. * src/main.cc: Use these definition.
  7569. * Release 0.6.0
  7570. 2006-07-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7571. To add Metalink support(http/ftp only):
  7572. * src/AbstractCommand.h
  7573. (tryReserved): New function.
  7574. * src/AbstractCommand.cc
  7575. (execute): Call tryReserved().
  7576. (tryReserved): New function.
  7577. * src/Request.h
  7578. (Requests): New type definition.
  7579. * src/SegmentMan.h
  7580. (reserved): New variable.
  7581. * src/Util.h
  7582. (fileChecksum): New function.
  7583. (toUpper): New function.
  7584. (toLower): New function.
  7585. * src/Util.cc
  7586. (messageDigest.h): Included.
  7587. (trim): Trim \r\n\t.
  7588. (fileChecksum): New function.
  7589. (toUpper): New function.
  7590. (toLower): New function.
  7591. * src/main.cc
  7592. (normalDownload): New function.
  7593. (main): Added 2 command-line options: metalink-file,
  7594. metalink-connection. Their usage has not been written yet.
  7595. * src/MetalinkProcessor.h: New class.
  7596. * src/Xml2MetalinkProcessor.h: New class.
  7597. * src/Xml2MetalinkProcessor.cc: New class.
  7598. * src/MetalinkEntry.h: New class.
  7599. * src/MetalinkEntry.cc: New class.
  7600. * src/MetalinkResource.h: New class.
  7601. * src/MetalinkResource.cc: New class.
  7602. To add md5 message digest checking:
  7603. * src/messageDigest.h: Rewritten.
  7604. * src/MultiDiskWriter.cc: Updated according to the changes in
  7605. messageDigest.h.
  7606. * src/ShaVisitor.cc: Updated according to the changes in
  7607. messageDigest.h.
  7608. * src/Util.cc: Updated according to the changes in messageDigest.h.
  7609. * src/AbstractDiskWriter.cc: Updated according to the changes in
  7610. messageDigest.h.
  7611. To fix a bug that causes segfault when the payload length in peer
  7612. message is less than 0:
  7613. * src/PeerConnection.cc:
  7614. (receiveMessage): Fixed the bug.
  7615. * src/PeerMessageUtil.cc
  7616. (checkLength): Throw an exception if length is less than or equals to
  7617. 0.
  7618. To add new interfaces to Base64 encoding/decoding:
  7619. * src/Base64.h
  7620. (part_encode): Changed the method signature.
  7621. (encode): New function(overload).
  7622. (decode): New function(overload).
  7623. * src/Base64.cc
  7624. (part_encode): Rewritten.
  7625. (encode): Rewritten.
  7626. (encode): New function(overload).
  7627. To prevent a peer to download same piece if there is an error in
  7628. checksum:
  7629. * src/PieceMessage.cc
  7630. (receivedAction): Call peerInteraction->abortPiece().
  7631. 2006-06-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7632. To fix the bug that causes same have message is sent many times to
  7633. a single peer.
  7634. * src/Time.cc
  7635. (isNewer): Use Util::difftv().
  7636. * src/Util.cc
  7637. (difftv): Added a cast to (long long int).
  7638. * src/TorrentMan.cc
  7639. (advertisePiece): Use push_front.
  7640. (getAdvertisedPieceIndexes): A performance improvement was made.
  7641. To fix the bug that sends tracker requests without a sleep interval
  7642. when the number of connections is less than 15.
  7643. * src/TrackerWatcherCommand.cc
  7644. (execute): Now the number of connections is not a factor to decide
  7645. whether or not a tracker request should be sent or not.
  7646. * src/Time.h
  7647. (setTimeInSec): New function.
  7648. * src/Time.cc
  7649. (setTimeInSec): New function.
  7650. etc.
  7651. * src/ChokeMessage.cc
  7652. (receivedAction): Removed peer->snubbing = false
  7653. * src/PeerConnection.h
  7654. (receiveHandshake): Updated doc.
  7655. * src/TorrentMan.h
  7656. (getAdvertisedPieceIndexes): Updated the method signature.
  7657. * src/TorrentMan.cc
  7658. (getAdvertisedPieceIndexes): Updated the method signature.
  7659. * src/Time.h
  7660. (getTimeInMicros): Added a cast to (long long int).
  7661. (getTimeInMillis): Added a cast to (long long int).
  7662. * Release 0.5.2
  7663. 2006-06-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7664. To make a listening socket non-block:
  7665. * src/SocketCore.h
  7666. (setNonBlockingMode): New function.
  7667. * src/SocketCore.cc
  7668. (setNonBlockingMode): New function.
  7669. (beginListen): Added a call to setNonBlockingMode().
  7670. (acceptConnection): Call setNonBlockingMode().
  7671. (setBlockingMode): Updated.
  7672. To handle tracker's NAT-checking:
  7673. * src/PeerConnection.cc
  7674. (receiveHandshake): 'msg' param is filled with received data and
  7675. its length is assigned to 'length' param, even if all handshake
  7676. message is not yet received.
  7677. * src/PeerInteractionCommand.cc
  7678. (executeInternal): Use peerInteraction->receiveHandshake(true) when
  7679. a new peer connects to localhost.
  7680. A call to peerInteraction->sendHandshake() was removed because
  7681. it is called from peerInteraction->receiveHandshake(true).
  7682. * src/PeerInteraction.h
  7683. (quickReplied): New variable.
  7684. (receiveHandshake): Added an argument.
  7685. * src/PeerInteraction.cc
  7686. (PeerInteraction): Added the initialization of quickReplied.
  7687. (receiveHandshake): Send handshake message as soon as the info hash
  7688. in a handshake message from a peer is correct.
  7689. To change the random part of peer id and key parameter:
  7690. * src/TorrentMan.h
  7691. (key): New variable.
  7692. * src/TorrentMan.cc
  7693. (setupInternal1): Use Util::randomAlpha() to generate random part
  7694. of peer id, which is now "-aria2-"+13 alphabet characters([A-Za-z]).
  7695. key is also generated by Util::randomAlpha() and it is now 8 character
  7696. long.
  7697. * src/Util.h
  7698. (randomAlpha): New function.
  7699. * src/Util.cc
  7700. (randomAlpha): New function.
  7701. * src/TrackerWatcherCommand.cc
  7702. (execute): In a tracker request: Use torrentMan->key as key parameter.
  7703. Added no_peer_id=1.
  7704. Set snubbing flag to false when a choke message is received from a
  7705. snubbed peer.
  7706. * src/ChokeMessage.cc
  7707. (receivedAction): Set snubbing flag to false.
  7708. 2006-06-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7709. * src/TorrentMan.cc (setupInternal1): Fixed peerId generation bug.
  7710. * src/SimpleLogger.h (writeHeader): New function.
  7711. * src/SimpleLogger.cc (writeHeader): New function.
  7712. (writeLog): Fixed the bug that causes segfaults if exception message
  7713. contains an unescaped "%" character.
  7714. * src/TrackerWatcherCommand.cc (execute): Added a short sleep
  7715. when a tracker request fails.
  7716. * src/Request.cc (parseUrl): Query string is now handled properly.
  7717. * Release 0.5.1
  7718. 2006-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7719. To add Time class which represents a specific instant in time and
  7720. its precision is microseconds. Time checking procedures were rewritten
  7721. using this object.
  7722. * src/Time.h: New class.
  7723. * src/Time.cc: New class.
  7724. * src/AbstractCommand.h
  7725. (updateCheckPoint): Removed.
  7726. (isTimeoutDetected): Removed.
  7727. (checkPoint): Changed the type to Time.
  7728. (timeout): New variable.
  7729. (setTimeout): New function.
  7730. * src/AbstractCommand.cc
  7731. (AbstractCommand): Removed the initialization of checkPoint.
  7732. Added the initialization of timeout.
  7733. (updateCheckPoint): Removed.
  7734. (isTimeoutDetected): Removed.
  7735. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  7736. * src/PeerChokeCommand.h
  7737. (checkPoint): Changed the type to Time.
  7738. * src/PeerChokeCommand.cc
  7739. (PeerChokeCommand): Removed the initialization of checkPoint.
  7740. (execute): Rewritten using Time object.
  7741. * src/TrackerWatcherCommand.h
  7742. (checkPoint): Changed the type to Time.
  7743. * src/TrackerWatcherCommand.cc
  7744. (TrackerWatcherCommand): Removed the initialization of checkPoint.
  7745. (execute): Rewritten.
  7746. * src/ConsoleDownloadEngine.h
  7747. (cp): Changed the type to Time.
  7748. (startup): Changed the type to Time.
  7749. * src/ConsoleDownloadEngine.cc
  7750. (initStatistics): Use cp.reset(), startup.reset().
  7751. (calculateStatistics): Rewritten using Time object.
  7752. * src/PeerAbstractCommand.h
  7753. (updateCheckPoint): Removed.
  7754. (isTimeoutDetected): Removed.
  7755. (checkPoint): Changed the type to Time.
  7756. * src/PeerAbstractCommand.cc
  7757. (PeerAbstractCommand): Removed the initialization of checkPoint.
  7758. (updateCheckPoint): Removed.
  7759. (isTimeoutDetected): Removed.
  7760. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  7761. * src/PeerInteractionCommand.cc
  7762. (PeerInteractionCommand): Removed the initializations of struct
  7763. timeval variables.
  7764. * src/PeerInteractionCommand.h
  7765. (keepAliveCheckPoint): Changed the type to Time.
  7766. (chokeCheckPoint): Changed the type to Time.
  7767. (freqCheckPoint): Changed the type to Time.
  7768. (haveCheckTime): Changed the type to Time.
  7769. * src/PeerInteractionCommand.cc
  7770. (executeInternal): Rewritten using Time object.
  7771. (detectMessageFlooding): Rewritten using Time object.
  7772. (checkLongTimePeerChoking): Rewritten using Time object.
  7773. (sendKeepAlive): Rewritten using Time object.
  7774. (checkHave): Rewritten using Time object.
  7775. * src/SleepCommand.h
  7776. (checkPoint): Changed the type to Time.
  7777. * src/SleepCommand.cc
  7778. (SleepCommand): Removed the initialization of checkPoint.
  7779. (execute): Rewritten using Time object.
  7780. * src/TorrentAutoSaveCommand.h
  7781. (checkPoint): Changed the type to Time.
  7782. * src/TorrentAutoSaveCommand.cc
  7783. (TorrentAutoSaveCommand): Removed the initialization of checkPoint.
  7784. (execute): Rewritten.
  7785. * src/DownloadCommand.h
  7786. (sw): Changed the type to Time.
  7787. * src/DownloadCommand.cc
  7788. (DownloadCommand): Removed the initialization of sw.
  7789. (executeInternal): Rewritten.
  7790. * src/RequestSlot.h
  7791. (dispatchedTime): Changed the type to Time.
  7792. * src/RequestSlot.cc
  7793. (RequestSlot): Removed the call to setDispatchedTime().
  7794. (setDispatchedTime): Rewirtten.
  7795. (isTimeout): Rewritten.
  7796. (getLatencyInMillis): Rewritten.
  7797. * src/TorrentDownloadEngine.h
  7798. (cp): Changed the type to Time[2].
  7799. (startup): Changed the type to Time.
  7800. * src/TorrentDownloadEngine.cc
  7801. (initStatistics): Rewritten.
  7802. (calculateStatistics): Rewritten.
  7803. * src/DownloadEngine.cc
  7804. (run): Rewritten.
  7805. To detect all attempts to connect to the tracker are failed:
  7806. * src/AbstractCommand.cc
  7807. (execute): Increment e->segmentMan->errors if a command aborted.
  7808. * src/SegmentMan.h
  7809. (errors): New variable.
  7810. * src/SegmentMan.cc
  7811. (SegmentMan): Added the initialization of errors.
  7812. (init): Added the initialization of errors.
  7813. * src/TrackerWatcherCommand.cc
  7814. (execute): If e->segmentMan->errors > 0 then assume that the tracker
  7815. request was failed.
  7816. To handle snubbed peers:
  7817. * src/PeerChokeCommand.cc
  7818. (optUnchokingPeer): Snubbed peers don't get unchoked.
  7819. (execute): Snubbed peers don't get unchoked.
  7820. * src/PeerInteraction.h
  7821. (REQUEST_TIME_OUT): Changed the value from 120 to 60.
  7822. * src/PeerInteraction.cc
  7823. (checkRequestSlot): A peer get marked as "snubbed" if it doesn't send
  7824. back the requested 16k block in 60 seconds.
  7825. * src/PieceMessage.cc
  7826. (receivedAction): A peer's snubbed state is cleard if it sends
  7827. the requested 16k block in 60 seconds.
  7828. * src/Peer.h
  7829. (snubbing): New variable.
  7830. * src/Peer.cc
  7831. (resetStatus): Added snubbed = false.
  7832. To fix the bug that causes have message is not sent:
  7833. * src/PeerInteractionCommand.cc
  7834. (~PeerInteractionCommand): Removed e->torrentMan->unadvertisePiece().
  7835. (FLOODING_CHECK_INTERVAL): New definition(temporal).
  7836. (detectMessageFlooding): Use FLOODING_CHECK_INTERVAL.
  7837. * src/TorrentMan.h
  7838. (HaveEntry): New class.
  7839. (advertisePiece): Rewritten.
  7840. (getAdvertisedPieceIndexes): Rewritten.
  7841. (Haves): Changed the type.
  7842. (getAdvertisedPieceIndexes): Added an argument.
  7843. Others:
  7844. * src/TorrentMan.h
  7845. (DEFAULT_ANNOUNCE_INTERVAL): Changed the value to 1800.
  7846. (DEFAULT_ANNOUNCE_MIN_INTERVAL): Changed the value to 1800.
  7847. * src/TorrentMan.cc
  7848. (getPeer): Don't check the number of connections here.
  7849. (setupInternal1): Changed peerId.
  7850. * src/PeerInteractionCommand.h
  7851. (KEEP_ALIVE_INTERVAL): New definition.
  7852. (sendKeepAlive): Use KEEP_ALIVE_INTERVAL.
  7853. * src/main.cc
  7854. (main): SA_ONESHOT was replaced with SA_RESETHAND.
  7855. * src/DownloadEngine.h: Removed unnecessary header includes.
  7856. 2006-05-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7857. To fix the bug that causes segfaults if a tracker returns a zero-length
  7858. list as "peers":
  7859. * src/TrackerUpdateCommand.cc
  7860. (execute): Added a check to see wether the type of peers is Data*.
  7861. 2006-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7862. * Release 0.5.0
  7863. To fix compile issue with gcc3:
  7864. * src/CancelMessage.h
  7865. (ID): Renamed as ID_t
  7866. (ID_t): New enum.
  7867. * src/RejectMessage.h
  7868. (ID): Renamed as ID_t
  7869. (ID_t): New enum.
  7870. * src/SuggestPieceMessage.h
  7871. (ID): Renamed as ID_t
  7872. (ID_t): New enum.
  7873. * src/AllowedFastMessage.h
  7874. (ID): Renamed as ID_t
  7875. (ID_t): New enum.
  7876. * src/PortMessage.h
  7877. (ID): Renamed as ID_t
  7878. (ID_t): New enum.
  7879. * src/HaveNoneMessage.h
  7880. (ID): Renamed as ID_t
  7881. (ID_t): New enum.
  7882. * src/KeepAliveMessage.h
  7883. (ID): Renamed as ID_t
  7884. (ID_t): New enum.
  7885. * src/HaveAllMessage.h
  7886. (ID): Renamed as ID_t
  7887. (ID_t): New enum.
  7888. * src/UnchokeMessage.h
  7889. (ID): Renamed as ID_t
  7890. (ID_t): New enum.
  7891. * src/BitfieldMessage.h
  7892. (ID): Renamed as ID_t
  7893. (ID_t): New enum.
  7894. * src/PieceMessage.h
  7895. (ID): Renamed as ID_t
  7896. (ID_t): New enum.
  7897. * src/RequestMessage.h
  7898. (ID): Renamed as ID_t
  7899. (ID_t): New enum.
  7900. * src/NotInterestedMessage.h
  7901. (ID): Renamed as ID_t
  7902. (ID_t): New enum.
  7903. * src/ChokeMessage.h
  7904. (ID): Renamed as ID_t
  7905. (ID_t): New enum.
  7906. * src/InterestedMessage.h
  7907. (ID): Renamed as ID_t
  7908. (ID_t): New enum.
  7909. * src/HaveMessage.h
  7910. (ID): Renamed as ID_t
  7911. (ID_t): New enum.
  7912. 2006-05-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7913. * src/PeerAbstractCommand.h
  7914. (beforeSocketCheck): Removed.
  7915. * src/PeerAbstractCommand.cc
  7916. Modified in order to call executeInternal() even if socket check
  7917. and upload limit check fail.
  7918. * src/PeerInteractionCommand.h
  7919. (keepAlive): Removed.
  7920. (sendKeepAlive): New function.
  7921. (checkHave): New function.
  7922. (beforeSocketCheck): Removed.
  7923. * src/PeerInteractionCommand.cc
  7924. (executeInternal): Use peerInteraction->checkRequestSlot(). Added
  7925. calls to checkHave() and sendKeepAlive().
  7926. (keepAlive): Renamed to sendKeepAlive().
  7927. (sendKeepAlive): New function.
  7928. (beforeSocketCheck): Removed.
  7929. (checkHave): New function.
  7930. * src/BitfieldMan.cc
  7931. (getMissingIndex): Don't call getMissingIndexRandomly() if max is 0.
  7932. (getMissingUnusedIndex): Don't call getMissingIndexRandomly() if max is
  7933. 0.
  7934. (getMissingIndex): Dont't call getMissingIndexRandomly() if max is 0.
  7935. * src/TorrentMan.h
  7936. (UsedPieces): Removed.
  7937. (Pieces): New type definition.
  7938. * src/Piece.h: Updated doc.
  7939. * src/Peer.h
  7940. (totalLength): Removed.
  7941. * src/Peer.cc
  7942. (updateLatency): Fixed the latency calculation.
  7943. * src/TorrentMan.cc
  7944. (addPeer): Call deleteOldErrorPeers() only if peers.size() is higher
  7945. than or equal to MAX_PEER_LIST_SIZE.
  7946. If duplicate is false and peer.size() >= MAX_PEER_LIST_SIZE,
  7947. then return false.
  7948. (deleteOldErrorPeers): Rewritten.
  7949. (deleteUsedPiece): Fixed the miss use of STL remove.
  7950. * src/PeerInteraction.h
  7951. (Pieces): Removed.
  7952. (deleteTimeoutRequestSlot): Removed.
  7953. (deleteCompletedRequestSlot): Removed.
  7954. (checkRequestSlot): New function.
  7955. * src/PeerInteraction.cc
  7956. (deleteTimeoutRequestSlot): Merged to checkRequestSlot().
  7957. (deleteCompletedRequestSlot): Merged to checkRequestSlot().
  7958. (checkRequestSlot): New function.
  7959. * src/DownloadEngine.cc
  7960. (run): Clear activeSockets before calling waitData().
  7961. (waitData): Removed a call to activeSockets.clear().
  7962. 2006-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7963. To attempt to handle EINTR:
  7964. * src/SocketCore.cc
  7965. (isReadable): Added EINTR handling.
  7966. (isWritable): Added EINTR handling.
  7967. To improve the performance:
  7968. * src/AbstractCommand.cc
  7969. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  7970. * src/PeerInteractionCommand.h
  7971. (receiveMessage): Renamed as receiveMessages().
  7972. (receiveMessages): New function.
  7973. * src/PeerInteractionCommand.cc
  7974. (executeInternal): receiveMessage loop is moved to new receiveMessages
  7975. () function. detectMessageFlooding() is moved here.
  7976. (detectMessageFlooding): Use Util::difftvsec() instead of Util::difftv
  7977. (). The flooding detection for have message is comment out.
  7978. (checkLongTimePeerChoking): Use Util::difftvsec() instead of
  7979. Util::difftv().
  7980. (receiveMessage): Renamed as receiveMessages().
  7981. (receiveMessages): New function.
  7982. (keepAlive): Use Util::difftvsec() instead of Util::difftv().
  7983. (beforeSocketCheck): Commented out checkLongTimePeerChoking().
  7984. * src/SleepCommand.cc
  7985. (execute): Use Util::difftvsec() instead of Util::difftv().
  7986. * src/BitfieldMan.h
  7987. (getNthBitIndex): New function.
  7988. (hasMissingPiece): New function.
  7989. (getAllMissingIndexes): New function.
  7990. * src/BitfieldMan.cc
  7991. (countSetBit): Rewritten.
  7992. (getNthBitIndex): New function.
  7993. (getMissingIndexRandomly): Rewritten.
  7994. (hasMissingPiece): New function.
  7995. (getAllMissingIndexes): New function.
  7996. * src/TorrentMan.cc
  7997. (hasMissingPiece): New function.
  7998. (deleteUsedPiece): Rewritten using STL.
  7999. * src/PeerInteraction.cc
  8000. (getNewPieceAndSendInterest): Use TorrentMan::hasMissingPiece(), which
  8001. is a little bit faster then TorrentMan::getMissingPieceIndex().
  8002. (addRequests): Updated the number of pending requests.
  8003. * src/PeerAbstractCommand.cc
  8004. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  8005. (execute): Returns true if TorrentMan::isHalt() is true.
  8006. Corrected the condition of upload limit checking.
  8007. * src/Util.h
  8008. (countBit): New function.
  8009. * src/Util.cc
  8010. (nbits): New variable.
  8011. (countBit): New function.
  8012. * src/DownloadEngine.h
  8013. (SockCmdMap): New type definition.
  8014. (waitData): Added an argument.
  8015. (addSocket): Added an argument.
  8016. (addSocketForReadCheck): Added an argument.
  8017. (addSocketForWriteCheck): Added an argument.
  8018. * src/DownloadEngine.cc
  8019. (run): Executes only commands whose sockets are ready to read or write.
  8020. All commands are executed in every 1 second.
  8021. (waitData): Calls select() again if it returned
  8022. EINTR.
  8023. (addSocket): Saves socket and command object pair to the map.
  8024. (deleteSocket): Deletes socket and command object pair from the map.
  8025. (addSocketForReadCheck): Added an argument.
  8026. (addSocketForWriteCheck): Added an argument.
  8027. * src/DownloadCommand.cc
  8028. (executeInternal): Use Util::difftvsec() instead of Util::difftv().
  8029. To send "event=stopped" to the tracker when the application finishes:
  8030. * src/PeerChokeCommand.h
  8031. (checkPoint): New variable.
  8032. * src/PeerChokeCommand.cc
  8033. (PeerChokeCommand): Added the initialization of checkPoint.
  8034. (execute): The interval check is now done by checkPoint, not
  8035. SleepCommand. Return true if TorrentMan::isHalt() is true.
  8036. * src/TorrentMan.h
  8037. (halt): New function.
  8038. (hasMissingPiece): New function.
  8039. (isHalt): New function.
  8040. (setHalt): New function.
  8041. * src/TorrentMan.cc
  8042. (TorrentMan): Added the initialization of halt.
  8043. * src/TorrentAutoSaveCommand.h
  8044. (checkPoint): New variable.
  8045. * src/PeerListenCommand.cc
  8046. (execute): Returns true if TorrentMan::isHalt() is true.
  8047. * src/main.cc
  8048. (setSignalHander): Added flags argument.
  8049. (torrentHandler): Just calls TorrentMan::setHalt(true) and returns.
  8050. (main): Set SA_ONESHOT flag of the signal hander of SIGINT and SIGTERM.
  8051. Removed printDownloadAbortMessage() after torrent downloading loop.
  8052. * src/TorrentAutoSaveCommand.cc
  8053. (TorrentAutoSaveCommand): Added the initialization of checkPoint.
  8054. (execute): Returns true if TorrentMan::isHalt() is true.
  8055. The interval check is now done by checkPoint, not SleepCommand.
  8056. * src/TrackerWatcherCommand.cc
  8057. (execute): If TorrentMan::isHalt(), then create a tracker request with
  8058. event=stopped.
  8059. * src/TrackerUpdateCommand.cc
  8060. (prepareForRetry): Do not use SleepCommand here.
  8061. (execute): Returns true if TorrentMan::isHalt() is true.
  8062. Others:
  8063. * src/TorrentMan.cc
  8064. (getMissingPieceIndex): Updated log message.
  8065. * src/PeerInteraction.cc
  8066. (createPeerMessag): Updated log message.
  8067. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8068. To add the ability to download several pieces in mix in a command and
  8069. increase the number of request slots according to request-cancel
  8070. latency:
  8071. * src/PeerInteractionCommand.cc
  8072. (executeInternal): The number of messages to be received at a time
  8073. is increased from 10 to 50.
  8074. * src/LogFactory
  8075. (getInstance): Added NullLogger.
  8076. * src/NullLogger.h: New class.
  8077. * src/BitfieldMan.h
  8078. (getMissingIndex): New function.
  8079. * src/BitfieldMan.cc
  8080. (getMissingIndex): New function.
  8081. * src/TorrentMan.h
  8082. (checkOutPiece): New function.
  8083. (getMissingPieceIndex): New function.
  8084. (getMissingFastPieceIndex): New function.
  8085. (getMissingFastPiece): New function.
  8086. * src/TorrentMan.cc
  8087. (updatePiece): Rewritten using STL.
  8088. (syncPiece): Rewritten using STL.
  8089. (getMissingPiece): Rewritten using getMissingPieceIndex() and
  8090. checkOutPiece().
  8091. (getMissingPieceIndex): New function.
  8092. (getMissingFastPieceIndex): New function.
  8093. (getMissingFastPiece): New function.
  8094. (checkOutPiece): New function.
  8095. * src/PeerInteraction.h
  8096. (Pieces): New type definition.
  8097. (piece): Removed.
  8098. (pieces): New variable.
  8099. (getNewPieceAndSendInterest): Added the "piece" argument.
  8100. (abortPiece): Added the "piece" argument.
  8101. (abortAllPieces): New function.
  8102. (isInRequestSlot): New function.
  8103. (hasDownloadPiece): Added the "index" argument.
  8104. (setDownloadPiece): Removed.
  8105. (getDownloadPiece): Added the "index" argument.
  8106. (updatePiece): New function.
  8107. (createRequestMessage): Added the "index" argument.
  8108. * src/PeerInteraction.cc
  8109. (onChoked): Rewritten.
  8110. (abortPiece): Rewirtten.
  8111. (abortAllPieces): New function.
  8112. (deleteTimeoutRequestSlot): Rewritten.
  8113. Clarified code a little bit.
  8114. (deleteCompletedRequestSlot): Rewritten.
  8115. (isInRequestSlot): New function.
  8116. (syncPiece): Rewritten.
  8117. (updatePiece): New function.
  8118. (getNewPieceAndSendInterest): Rewritten.
  8119. (addRequests): Rewritten.
  8120. (getDownloadPiece): Rewritten.
  8121. (hasDownloadPiece): Rewritten.
  8122. (createRequestMessage): Added the "index" argument.
  8123. * src/common.h
  8124. (BITFIELD_LEN_FROM_PIECES): Enclosed the variable in parentheses.
  8125. (DIV_FLOOR): New definition.
  8126. * src/PieceMessage.cc
  8127. (receivedAction): Update request-piece latency here.
  8128. * src/RequestSlot.h
  8129. (getLatencyInMillis): New function.
  8130. * src/RequestSlot.cc
  8131. (isTimeout): Rewritten using getLatencyInMillis.
  8132. (getLatencyInMillis): New function.
  8133. * src/Piece.h
  8134. (operator==): New function.
  8135. (getMissingBlockIndex): New function.
  8136. * src/Piece.cc
  8137. (operator==): New function.
  8138. (getMissingBlockIndex): New function.
  8139. * src/Peer.h
  8140. (DEFAULT_LATENCY): New definition.
  8141. (latency): New variable.
  8142. (updateLatency): New function.
  8143. (getLatency): New function.
  8144. * src/Peer.cc
  8145. (resetStatus): Reset latecy.
  8146. (updateLatency): New function.
  8147. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8148. * src/SocketCore.cc
  8149. (isReadable): Added secure to the condition.
  8150. * src/HttpConnection.cc
  8151. (receiveResponse): Fixed a bug that causes no response header
  8152. exception.
  8153. * src/Peer.h
  8154. (getFastSet): Fixed the return value type.
  8155. 2006-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8156. To remove a wait from download loop:
  8157. * src/DownloadEngine.cc
  8158. (run): Comment out shortSleep.
  8159. To rewrite the message handling:
  8160. * src/SimplePeerMessage.h: New class.
  8161. * src/SimplePeerMessage.cc: New class.
  8162. * src/CancelMessage.h: Derived from SimplePeerMessage.
  8163. (msg): New variable.
  8164. (create): New function.
  8165. (send): Removed.
  8166. (getMessage): New function.
  8167. (getMessageLength): New function.
  8168. * src/CancelMessage.cc
  8169. (create): New function.
  8170. (receivedAction): Replaced deleteRequestMessageInQueue with
  8171. rejectPieceMessageInQueue.
  8172. (send): Removed.
  8173. (getMessage): New function.
  8174. (getMessageLength): New function.
  8175. * src/BitfieldMessage.h: Derived from SimplePeerMessage.
  8176. (msg): New variable.
  8177. (msgLength): New variable.
  8178. (~BitfieldMessage): Deleted msg.
  8179. (send): Removed.
  8180. (getMessage): New function.
  8181. (getMessageLength): New function.
  8182. * src/BitfieldMessage.cc
  8183. (create): New function.
  8184. (send): Removed.
  8185. (getMessage): New function.
  8186. (getMessageLength): New function.
  8187. * src/ChokeMessage.h: Derived from SimplePeerMessage.
  8188. (msg): New variable.
  8189. (sendPredicate): New function.
  8190. (onSendComplete): New function.
  8191. (send): Removed.
  8192. (getMessage): New function.
  8193. (getMessageLength): New function.
  8194. (create): New function.
  8195. * src/ChokeMessage.cc
  8196. (create): New function.
  8197. (send): Removed.
  8198. (sendPredicate): New function.
  8199. (getMessage): New function.
  8200. (getMessageLength): New function.
  8201. (onSendComplete): New function.
  8202. * src/KeepAliveMessage.h: Derived from SimplePeerMessage.
  8203. (msg): New variable.
  8204. (send): Removed.
  8205. (getMessage): New function.
  8206. (getMessageLength): New function.
  8207. * src/KeepAliveMessage.cc
  8208. (send): Removed.
  8209. (getMessage): New function.
  8210. (getMessageLength): New function.
  8211. * src/PortMessage.h
  8212. (create): New function.
  8213. (receivedAction): Updated log message.
  8214. * src/PortMessage.cc: New file.
  8215. * src/UnchokeMessage.h: Derived from SimplePeerMessage.
  8216. (msg): New variable.
  8217. (sendPredicate): New function.
  8218. (onSendComplete): New function.
  8219. (create): New function.
  8220. (send): Removed.
  8221. (getMessage): New function.
  8222. (getMessageLength): New function.
  8223. * src/UnchokeMessage.cc
  8224. (create): New function.
  8225. (send): Removed.
  8226. (sendPredicate): New function.
  8227. (getMessage): New function.
  8228. (getMessageLength): New function.
  8229. (onSendComplete): New function.
  8230. * src/PieceMessage.h
  8231. (leftPieceDataLength): Removed.
  8232. (leftDataLength): New variable.
  8233. (headerSend): New variable.
  8234. (pendingCount): New variable.
  8235. (msgHeader): New variable.
  8236. (sendPieceData): New function.
  8237. (incrementPendingCount): New function.
  8238. (isPendingCountMax): New function.
  8239. (create): New function.
  8240. (getMessageHeader): New function.
  8241. (getMessageHeaderLength): New function.
  8242. * src/PieceMessage.cc
  8243. (create): New function.
  8244. (getMessageHeader): New function.
  8245. (getMessageHeaderLength): New function.
  8246. (send): Rewritten.
  8247. (sendPieceData): New function.
  8248. * src/HaveMessage.h: Derived from SimplePeerMessage.
  8249. (msg): New variable.
  8250. (create): New function.
  8251. (getMessage): New function.
  8252. (getMessageLength): New function.
  8253. * src/HaveMessage.cc
  8254. (create): New function.
  8255. (send): Removed.
  8256. (sendPieceData): New function.
  8257. (getMessage): New function.
  8258. (getMessageLength): New function.
  8259. * src/RequestMessage.h: Derived from SimplePeerMessage.
  8260. (msg): New variable.
  8261. (create): New function.
  8262. (send): Removed.
  8263. (getMessage): New function.
  8264. (getMessageLength): New function.
  8265. * src/RequestMessage.cc
  8266. (create): New function.
  8267. (receivedAction): Added the handling of fast extension.
  8268. Deleted torrentMan->addUploadLength, torrentMan->addDeltaUploadLength.
  8269. (send): Removed.
  8270. (getMessage): New function.
  8271. (getMessageLength): New function.
  8272. * src/InterestedMessage.h: Derived from SimplePeerMessage.
  8273. (msg): New variable.
  8274. (sendPredicate): New function.
  8275. (onSendComplete): New function.
  8276. (create): New function.
  8277. (getMessage): New function.
  8278. (getMessageLength): New function.
  8279. * src/InterestedMessage.cc
  8280. (create): New function.
  8281. (send): Removed.
  8282. (sendPieceData): New function.
  8283. (getMessage): New function.
  8284. (getMessageLength): New function.
  8285. (onSendComplete): New function.
  8286. * src/NotInterestedMessage.h: Derived from SimplePeerMessage.
  8287. (msg): New variable.
  8288. (sendPieceData): New function.
  8289. (onSendComplete): New function.
  8290. (create): New function.
  8291. (send): Removed.
  8292. (getMessage): New function.
  8293. (getMessageLength): New function.
  8294. * src/NotInterestedMessage.cc
  8295. (create): New function.
  8296. (send): Removed.
  8297. (sendPredicate): New function.
  8298. (getMessage): New function.
  8299. (getMessageLength): New function.
  8300. (onSendComplete): New function.
  8301. * src/AllowedFastMessage.h: New class.
  8302. * src/AllowedFastMessage.cc: New class.
  8303. * src/RejectMessage.h: New class.
  8304. * src/RejectMessage.cc: New class.
  8305. * src/SuggestPieceMessage.h: New class.
  8306. * src/SuggestPieceMessage.cc: New class.
  8307. * src/HaveAllMessage.h: New class.
  8308. * src/HaveAllMessage.cc: New class.
  8309. * src/HaveNoneMessage.h: New class.
  8310. * src/HaveNoneMessage.cc: New class.
  8311. * src/HandshakeMessage.h: Derived from SimplePeerMessage.
  8312. (msg): New variable.
  8313. (reserved): New variable.
  8314. (create): New function.
  8315. (getId): New function.
  8316. (receivedAction): New function.
  8317. (getMessage): New function.
  8318. (getMessageLength): New function.
  8319. (isFastExtensionSupported): New function.
  8320. * src/HandshakeMessage.cc
  8321. (HandshakeMessage): Moved here from HandshakeMessage.h.
  8322. (create): New function.
  8323. (getMessage): New function.
  8324. (getMessageLength): New function.
  8325. (toString): Added the output of reserved field.
  8326. (check): Added const qualifier.
  8327. (isFastExtensionSupported): New function.
  8328. * src/PeerMessageUtil.h
  8329. (createChokeMessage): Removed.
  8330. (createUnchokeMessage): Removed.
  8331. (createInterestedMessage): Removed.
  8332. (createNotInterestedMessage): Removed.
  8333. (createHaveMessage): Removed.
  8334. (createBitfieldMessage): Removed.
  8335. (createRequestMessage): Removed.
  8336. (createCancelMessage): Removed.
  8337. (createPieceMessage): Removed.
  8338. (createPortMessage): Removed.
  8339. (createChokeMessage): Removed.
  8340. (createUnchokeMessage): Removed.
  8341. (createInterestedMessage): Removed.
  8342. (createNotInterestedMessage): Removed.
  8343. (createHaveMessage): Removed.
  8344. (createBitfieldMessage): Removed.
  8345. (createRequestMessage): Removed.
  8346. (createCancelMessage): Removed.
  8347. (createPieceMessage): Removed.
  8348. (createKeepAliveMessage): Removed.
  8349. (createHandshakeMessage): Removed.
  8350. (setIntParam): New function.
  8351. (createPeerMessageString): New function.
  8352. * src/PeerMessageUtil.cc
  8353. (createChokeMessage): Removed.
  8354. (createUnchokeMessage): Removed.
  8355. (createInterestedMessage): Removed.
  8356. (createNotInterestedMessage): Removed.
  8357. (createHaveMessage): Removed.
  8358. (createBitfieldMessage): Removed.
  8359. (createRequestMessage): Removed.
  8360. (createCancelMessage): Removed.
  8361. (createPieceMessage): Removed.
  8362. (createPortMessage): Removed.
  8363. (createRequestMessage): Removed.
  8364. (createCancelMessage): Removed.
  8365. (createPieceMessage): Removed.
  8366. (createHaveMessage): Removed.
  8367. (createChokeMessage): Removed.
  8368. (createUnchokeMessage): Removed.
  8369. (createInterestedMessage): Removed.
  8370. (createNotInterestedMessage): Removed.
  8371. (createBitfieldMessage): Removed.
  8372. (createKeepAliveMessage): Removed.
  8373. (createHandshakeMessage): Removed.
  8374. (setIntParam): New function.
  8375. (createPeerMessageString): New function.
  8376. * src/PeerConnection.h
  8377. (peer): Removed.
  8378. (torrentMan): Removed.
  8379. (createNLengthMessage): Removed.
  8380. (setIntParam): Removed.
  8381. (writeOutgoingMessageLog): Removed all overloaded functions.
  8382. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8383. (sendMessage): New function.
  8384. (sendHandshake): Removed.
  8385. (sendKeepAlive): Removed.
  8386. (sendChoke): Removed.
  8387. (sendUnchoke): Removed.
  8388. (sendInterested): Removed.
  8389. (sendNotInterested): Removed.
  8390. (sendHave): Removed.
  8391. (sendBitfield): Removed.
  8392. (sendRequest): Removed.
  8393. (sendPiece): Removed.
  8394. (sendPieceHeader): Removed.
  8395. (sendPieceData): Removed.
  8396. (sendCancel): Removed.
  8397. (getPeer): Removed.
  8398. * src/PeerConnection.cc
  8399. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8400. (sendHandshake): Removed.
  8401. (sendKeepAlive): Removed.
  8402. (createNLengthMessage): Removed.
  8403. (setIntParam): Removed.
  8404. (writeOutgoingMessageLog): Removed all overloaded functions.
  8405. (sendChoke): Removed.
  8406. (sendUnchoke): Removed.
  8407. (sendInterested): Removed.
  8408. (sendNotInterested): Removed.
  8409. (sendHave): Removed.
  8410. (sendBitfield): Removed.
  8411. (sendRequest): Removed.
  8412. (sendPiece): Removed.
  8413. (sendPieceHeader): Removed.
  8414. (sendPieceData): Removed.
  8415. (sendMessage): New function.
  8416. (sendCancel): Removed.
  8417. * src/PeerInteractionCommand.cc
  8418. (PeerInteractionCommand): Call setUploadLimit.
  8419. (executeInternal): Call setUploadLimit.
  8420. Added the handling of "inProgress" state of handshake message.
  8421. Call sendBitfield() or sendAllowdFast() instead of deprecated
  8422. sendNow().
  8423. (keepAlive): Call addMessage and sendMessage instead of deprecated
  8424. sendNow().
  8425. (beforeSocketCheck): Call addMessage instead of deprecated trySendNow()
  8426. * src/TorrentMan.h
  8427. (PEER_ID_LENGTH): New definition.
  8428. (hasAllPieces): New function.
  8429. * src/TorrentMan.cc
  8430. (getMissingPiece): Added the handling of fast extension.
  8431. (cancelPiece): Call updatePiece().
  8432. (hasAllPieces): New function.
  8433. * src/PeerInteraction.h
  8434. (fastSet): New variable.
  8435. (getNewPieceAndSendInterest): Changed the return type to void.
  8436. (send): Renamed as sendMessages.
  8437. (deleteAllRequestSlot): Removed.
  8438. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8439. (cancelAllRequest): Removed all overloaded functions.
  8440. (deleteAllRequestSlot): Removed.
  8441. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8442. (rejectPieceMessageInQueue): New function.
  8443. (rejectAllPieceMessageInQueue): New function.
  8444. (onChoked): New function.
  8445. (isSendingMessageInProgress): New function.
  8446. (getCorrespondingRequestSlot): Changed its arguments.
  8447. (isInFastSet): New function.
  8448. (addFastSetIndex): New function.
  8449. (addRequests): New function.
  8450. (sendNow): Removed.
  8451. (trySendNow): Removed.
  8452. (sendBitfield): New function.
  8453. (sendAllowdFast): New function.
  8454. (createHaveAllMessage): New function.
  8455. (createHaveNoneMessage): New function.
  8456. (createRejectMessage): New function.
  8457. (createAllowedFastMessage): New function.
  8458. * src/PeerInteraction.cc
  8459. (send): Renamed as sendMessages.
  8460. (sendMessages): New function.
  8461. (MsgPushBack): New class.
  8462. (isSendingMessageInProgress): New function.
  8463. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8464. (rejectAllPieceMessageInQueue): New function.
  8465. Added the handling of fast extension.
  8466. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8467. (rejectPieceMessageInQueue): New function.
  8468. Added the handling of fast extension.
  8469. (deleteRequestSlot): Replaced for loop with std::find.
  8470. (onChoked): New function.
  8471. (deleteAllRequestSlot): Removed.
  8472. (abortPiece): Rewirtten.
  8473. (deleteTimeoutRequestSlot): Updated log messages.
  8474. (getCorrespondingRequestSlot): Changed its arguments.
  8475. (cancelAllRequest): Removed all overloaded functions.
  8476. (receiveHandshake): Added the check to see whether an incoming peer
  8477. supports fast extension.
  8478. (createHandshakeMessage): Use HandshakeMessage::create instead of
  8479. PeerMessageUtil.
  8480. (createPeerMessage): Use create() of each message class instead of
  8481. PeerMessageUtil.
  8482. HaveAllMessage, HaveNoneMessage, RejectMessage, SuggestPieceMessage,
  8483. AllowedFastMessage were added.
  8484. (getNewPieceAndSendInterest): Changed its return value type to void.
  8485. Added the handling of fast extension.
  8486. (addRequests): New function.
  8487. (sendNow): Removed.
  8488. (sendHandshake): Rewritten.
  8489. (trySendNow): Removed.
  8490. (sendBitfield): New function.
  8491. (sendAllowdFast): New function.
  8492. (isInFastSet): New function.
  8493. (addFastSetIndex): New function.
  8494. (createRequestMessage): Use RequestMessage::create instead of
  8495. PeerMessageUtil.
  8496. (createCancelMessage): Use CancelMessage::create instead of
  8497. PeerMessageUtil.
  8498. (createPieceMessage): Use PieceMessage::create instead of
  8499. PeerMessageUtil.
  8500. (createHaveMessage): Use HaveMessage::create instead of
  8501. PeerMessageUtil.
  8502. (createChokeMessage): Use ChokeMessage::create instead of
  8503. PeerMessageUtil.
  8504. (createUnchokeMessage): Use UnchokeMessage::create instead of
  8505. PeerMessageUtil.
  8506. (createInterestedMessage): Use InterestedMessage::create instead of
  8507. PeerMessageUtil.
  8508. (createNotInterestedMessage): Use NotInterestedMessage::create instead
  8509. of PeerMessageUtil.
  8510. (createBitfieldMessage): Use BitfieldMessage::create instead of
  8511. PeerMessageUtil.
  8512. (createKeepAliveMessage): Use KeepAliveMessage::create instead of
  8513. PeerMessageUtil.
  8514. (createHaveAllMessage): New function.
  8515. (createHaveNoneMessage): New function.
  8516. (createRejectMessage): New function.
  8517. (createAllowedFastMessage: New function.
  8518. * src/Util.h
  8519. (sha1Sum): New function.
  8520. (computeFastSet): New function.
  8521. * src/Util.cc
  8522. (sha1Sum): New function.
  8523. (computeFastSet): New function.
  8524. * src/Peer.h
  8525. (fastExtensionEnabled): New variable.
  8526. (fastSet): New variable.
  8527. (setAllBitfield): New function.
  8528. (setFastExtensionEnabled): New function.
  8529. (isFastExtensionEnabled): New function.
  8530. (addFastSetIndex): New function.
  8531. (getFastSet): New function.
  8532. (isInFastSet): New function.
  8533. (countFastSet): New function.
  8534. * src/Peer.cc
  8535. (isInFastSet): New function.
  8536. (addFastSetIndex): New function.
  8537. (setAllBitfield): New function.
  8538. * src/AbstractCommand.cc (execute): Changed the procedure of checking
  8539. sockets.
  8540. * src/PeerAbstractCommand.cc
  8541. (PeerAbstractCommand): Added the initialization for uploadLimitCheck
  8542. and uploadLimit.
  8543. (execute): Changed the procedure of checking sockets. The upload speed
  8544. checking were added.
  8545. (setUploadLimit): New function.
  8546. (setUploadLimitCheck): New function.
  8547. * src/PeerAbstractCommand.h
  8548. (setUploadLimit): New function.
  8549. (setUploadLimitCheck): New function.
  8550. (uploadLimit): New variable.
  8551. (uploadLimitCheck): New variable.
  8552. To contact a tracker regularly:
  8553. * src/TrackerWatcherCommand.h (interval): New variable.
  8554. (checkPoint): New variable.
  8555. (TrackerWatcherCommand): Added interval argument.
  8556. * src/TrackerWatcherCommand.cc
  8557. (TrackerWatcherCommand): Initialized checkPoint.
  8558. (execute): Now a tracker is contacted in every specified period.
  8559. If peer list is not needed, send request with numwant=0.
  8560. * src/TrackerUpdateCommand.cc
  8561. (execute): Updated log messages.
  8562. * src/DownloadEngine.cc
  8563. (~DownloadEngine): Removed two asserts.
  8564. (waitData): Uncommented wfds. May be a bug fix.
  8565. 2006-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8566. * src/PeerInteractionCommand.h
  8567. (checkInactiveConnection): Removed.
  8568. * src/PeerInteractionCommand.cc
  8569. (executeInternal): Removed following function calls:
  8570. detectMessageFlooding(), checkLongTimePeerChoking and
  8571. checkInactiveConnection().
  8572. (checkInactiveConnection): Removed.
  8573. (detectMessageFlooding): Removed function call to
  8574. checkInactiveConnection().
  8575. * src/PeerMessageUtil.h
  8576. (createChokeMessage): New function. Overload.
  8577. (createUnchokeMessage): New function. Overload.
  8578. (createInterestedMessage): New function. Overload.
  8579. (createNotInterestedMessage): New function. Overload.
  8580. (createHaveMessage): New function. Overload.
  8581. (createBitfieldMessage): New function. Overload.
  8582. (createRequestMessage): New function. Overload.
  8583. (createCancelMessage): New function. Overload.
  8584. (createPieceMessage): New function. Overload.
  8585. (createKeepAliveMessage): New function. Overload.
  8586. * src/PeerMessageUtil.cc
  8587. (createChokeMessage): New function. Overload.
  8588. (createUnchokeMessage): New function. Overload.
  8589. (createInterestedMessage): New function. Overload.
  8590. (createNotInterestedMessage): New function. Overload.
  8591. (createHaveMessage): New function. Overload.
  8592. (createBitfieldMessage): New function. Overload.
  8593. (createRequestMessage): New function. Overload.
  8594. (createCancelMessage): New function. Overload.
  8595. (createPieceMessage): New function. Overload.
  8596. (createKeepAliveMessage): New function. Overload.
  8597. * src/SendMessageQueue.cc
  8598. (createRequestMessage): Use PeerMessageUtil.
  8599. (createCancelMessage): Use PeerMessageUtil.
  8600. (createPieceMessage): Use PeerMessageUtil.
  8601. (createHaveMessage): Use PeerMessageUtil.
  8602. (createChokeMessage): Use PeerMessageUtil.
  8603. (createUnchokeMessage): Use PeerMessageUtil.
  8604. (createInterestedMessage): Use PeerMessageUtil.
  8605. (createNotInterestedMessage): Use PeerMessageUtil.
  8606. (createBitfieldMessage): Use PeerMessageUtil.
  8607. (createKeepAliveMessage): Use PeerMessageUtil.
  8608. * src/SendMessageQueue.h: Renamed to PeerInteraction.h
  8609. * src/SendMessageQueue.cc: Renamed to PeerInteraction.cc
  8610. * src/PeerInteraction.h: New class.
  8611. * src/PeerInteraction.cc: New class.
  8612. 2006-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8613. Each peer message has its own class.
  8614. * src/PendingMessages.h: Removed.
  8615. * src/PendingMessages.cc: Removed. The sending process was moved to
  8616. each message class.
  8617. * src/RequestSlotMan.h: Removed.
  8618. * src/RequestSlotMan.cc: Removed. All functionarities were moved to
  8619. SendMessageQueue.
  8620. * src/RequestMessage.h: New class.
  8621. * src/RequestMessage.cc: New class.
  8622. * src/CancelMessage.h: New class.
  8623. * src/CancelMessage.cc: New class.
  8624. * src/BitfieldMessage.h: New class.
  8625. * src/BitfieldMessage.cc: New class.
  8626. * src/ChokeMessage.h: New class.
  8627. * src/ChokeMessage.cc: New class.
  8628. * src/KeepAliveMessage.h: New class.
  8629. * src/KeepAliveMessage.cc: New class.
  8630. * src/PortMessage.h: New class.
  8631. * src/UnchokeMessage.h: New class.
  8632. * src/UnchokeMessage.cc: New class.
  8633. * src/PieceMessage.h: New class.
  8634. * src/PieceMessage.cc: New class.
  8635. * src/HaveMessage.h: New class.
  8636. * src/HaveMessage.cc: New class.
  8637. * src/BitfieldMessage.h: New class.
  8638. * src/BitfieldMessage.cc: New class.
  8639. * src/NotInterestedMessage.h: New class.
  8640. * src/NotInterestedMessage.cc: New class.
  8641. * src/InterestedMessage.h: New class.
  8642. * src/InterestedMessage.cc: New class.
  8643. * src/HandshakeMessage.h (sendMessageQueue): New variable.
  8644. (getSendMessageQueue): New function.
  8645. (setSendMessageQueue): New function.
  8646. * src/HandshakeMessage.cc: New class.
  8647. * src/PeerConnection.h (receiveMessage): Changed return value and
  8648. arguments.
  8649. (receiveHandshake): Changed return value and arguments.
  8650. * src/PeerConnection.cc (receiveMessage): Do not create message class
  8651. here.
  8652. (receiveHandshake): Do not create handshake class here.
  8653. * src/PeerInteractionCommand.h (peerConnection): Removed.
  8654. (piece): Removed.
  8655. (syncPiece): Removed.
  8656. (sendInterest): Removed.
  8657. (sendMessages): Removed.
  8658. (createRequestPendingMessage): Removed.
  8659. (checkPieceHash): Removed.
  8660. (erasePieceOnDisk): Removed.
  8661. (getNewPieceAndSendInterest): Removed.
  8662. (onGotNewPice): Removed.
  8663. (onGotWrongPiece): Removed.
  8664. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  8665. Removed peerConnection, piece.
  8666. (~PeerInteractionCommand): Removed peerConnection.
  8667. (executeInternal): Use sendMessageQueue instead of peerConnection.
  8668. (syncPiece): Moved to SendMessageQueue.
  8669. (decideChoking): Removed PendingMessage.
  8670. (receiveMessage): Use sendMessageQueue instead of peerConnection.
  8671. The action after receiving peer message was moved to each message
  8672. class.
  8673. (onGotNewPice): Moved to SendMessageQueue.
  8674. (onGotWrongPiece): Moved to SendMessageQueue.
  8675. (getNewPieceAndSendInterest): Moved to SendMessageQueue.
  8676. (sendInterest): Moved to SendMessageQueue.
  8677. (createRequestPendingMessage): Removed.
  8678. (sendMessages): Moved to SendMessageQueue.
  8679. (onAbort): Use SendMessageQueue::abortPiece()
  8680. (keepAlive): Use sendMessageQueue instead of peerConnection.
  8681. (beforeSocketCheck): Use sendMessageQueue instead of peerConnection.
  8682. (checkPieceHash): Moved to SendMessageQueue.
  8683. (erasePieceOnDisk): Moved to SendMessageQueue.
  8684. * src/PeerMessageUtil.h
  8685. (createBitfieldMessage): Removed.
  8686. (createHaveMessage): Changed return value and arguments.
  8687. (createBitfieldMessage): Changed return value and arguments.
  8688. (createRequestCancelMessage): Removed.
  8689. (createPieceMessage): Changed return value and arguments.
  8690. (getShortIntParam): New function.
  8691. (checkIndex): Changed arguments.
  8692. (checkBegin): Changed arguments.
  8693. (checkLength): Changed arguments.
  8694. (checkPieceOffset): Removed.
  8695. (checkRange): New function.
  8696. (checkBitfield): Changed arguments.
  8697. (createPeerMessage): Removed.
  8698. (checkIntegrity): Removed.
  8699. (createHandshakeMessage): Changed arguments.
  8700. (createChokeMessage): New function.
  8701. (createUnchokeMessage): New function.
  8702. (createInterestedMessage): New function.
  8703. (createNotInterestedMessage): New function.
  8704. (createRequestMessage): New function.
  8705. (createCancelMessage): New function.
  8706. (createPortMessage): New function.
  8707. * src/PeerMessageUtil.cc
  8708. (createBitfieldMessage): Removed.
  8709. (createHaveMessage): Changed return value and arguments.
  8710. (createBitfieldMessage): Changed return value and arguments.
  8711. (createRequestCancelMessage): Removed.
  8712. (createPieceMessage): Changed return value and arguments.
  8713. (getShortIntParam): New function.
  8714. (checkIndex): Changed arguments.
  8715. (checkBegin): Changed arguments.
  8716. (checkLength): Changed arguments.
  8717. (checkPieceOffset): Removed.
  8718. (checkRange): New function.
  8719. (checkBitfield): Changed arguments.
  8720. (createPeerMessage): Removed.
  8721. (checkIntegrity): Removed.
  8722. (createHandshakeMessage): Changed arguments.
  8723. (createChokeMessage): New function.
  8724. (createUnchokeMessage): New function.
  8725. (createInterestedMessage): New function.
  8726. (createNotInterestedMessage): New function.
  8727. (createRequestMessage): New function.
  8728. (createCancelMessage): New function.
  8729. (createPortMessage): New function.
  8730. * src/PeerMessage.h
  8731. (id): Removed.
  8732. (index): Removed.
  8733. (begin): Removed.
  8734. (length): Removed.
  8735. (bitfield): Removed.
  8736. (bitfieldLength): Removed.
  8737. (block): Removed.
  8738. (blockLength): Removed.
  8739. (inProgress): New variable.
  8740. (cuid): New variable.
  8741. (peer): New variable.
  8742. (sendMessageQueue): New variable.
  8743. (logger): New variable.
  8744. (setBitfield): Removed.
  8745. (getBitfield): Removed.
  8746. (setBlock): Removed.
  8747. (getBlock): Removed.
  8748. (getBitfieldLength): Removed.
  8749. (getBlockLength): Removed.
  8750. (isInProgress): New function.
  8751. (toString): Made pure virtual.
  8752. (check): New function.
  8753. (send): New function.
  8754. (receivedAction): New function.
  8755. (getId): Made pure virtual.
  8756. (setId): Removed.
  8757. (getIndex): Removed.
  8758. (setIndex): Removed.
  8759. (getBegin): Removed.
  8760. (setBegin): Removed.
  8761. (getLength): Removed.
  8762. (setLength): Removed.
  8763. (getCuid): New function.
  8764. (setCuid): New function.
  8765. (getPeer): New function.
  8766. (setPeer): New function.
  8767. (getSendMessageQueue): New function.
  8768. (setSendMessageQueue): New function.
  8769. (ID): Removed.
  8770. * src/PeerMessage.cc
  8771. (setBitfield): Removed.
  8772. (setBlock): Removed.
  8773. (toString): Removed.
  8774. * src/TorrentMan.h
  8775. (getPieceLength): New function.
  8776. (getPieceLength): New function.
  8777. * src/SendMessageQueue.h
  8778. (REQUEST_TIME_OUT): New definition.
  8779. (RequestSlots): New definition.
  8780. (MessageQueue): New definition.
  8781. (requestSlotMan): Removed.
  8782. (pendingMessages): Removed.
  8783. (requestSlots): New variable.
  8784. (messageQueue): New variable.
  8785. (torrentMan): New variable.
  8786. (peerConnection): New variable.
  8787. (peer): New variable.
  8788. (piece): New variable.
  8789. (getNewPieceAndSendInterest): New function.
  8790. (createPeerMessage): New function.
  8791. (createHandshakeMessage): New function.
  8792. (send): Made private.
  8793. (setPeerMessageCommonProperty): New function.
  8794. (deleteAllRequestSlot): New function.
  8795. (deleteRequestMessageInQueue): New function.
  8796. (cancelAllRequest): Made private.
  8797. (cancelAllRequest): Made private.
  8798. (countRequestSlot): Made private.
  8799. (addPendingMessage): Removed.
  8800. (deletePendingPieceMessage): Removed.
  8801. (deletePendingRequestMessage): Removed.
  8802. (addMessage): New function.
  8803. (deletePieceMessageInQueue): New function.
  8804. (deleteTimeoutRequestSlot): Changed argument.
  8805. (deleteCompletedRequestSlot): Changed argument.
  8806. (getCorrespoindingRequestSlot): Renamed to getCorrespondingRequestSlot.
  8807. (getCorrespondingRequestSlot): New function.
  8808. (countPendingMessage): Removed.
  8809. (countMessageInQueue): New function.
  8810. (getTorrentMan): New function.
  8811. (getPeerConnection): New function.
  8812. (hasDownloadPiece): New function.
  8813. (getDownloadPiece): New function.
  8814. (setDownloadPiece): New function.
  8815. (syncPiece): New function.
  8816. (sendMessages): New function.
  8817. (sendNow): New function.
  8818. (trySendNow): New function.
  8819. (abortPiece): New function.
  8820. (sendHandshake): New function.
  8821. (receiveMessage): New function.
  8822. (receiveHandshake): New function.
  8823. (createRequestMessage): New function.
  8824. (createCancelMessage): New function.
  8825. (createPieceMessage): New function.
  8826. (createHaveMessage): New function.
  8827. (createChokeMessage): New function.
  8828. (createUnchokeMessage): New function.
  8829. (createInterestedMessage): New function.
  8830. (createNotInterestedMessage): New function.
  8831. (createBitfieldMessage): New function.
  8832. (createKeepAliveMessage): New function.
  8833. * src/SendMessageQueue.cc
  8834. (SendMessageQueue): Removed requestSlotMan.
  8835. Instantiated peerConnection here.
  8836. (~SendMessageQueue): Removed requestSlotMan.
  8837. Added deletion of peerConnection and the contents of messageQueue.
  8838. (send): Updated according to the change of messageQueue.
  8839. (addPendingMessage): Renamed to addMessage.
  8840. (addMessage): New function.
  8841. (deletePendingPieceMessage): Renamed to deletePieceMessageInQueue.
  8842. (deletePieceMessageInQueue): New function.
  8843. (deletePendingRequestMessage): Renamed to deleteRequestMessageInQueue.
  8844. (deleteRequestMessageInQueue): New function.
  8845. (deleteRequestSlot): RequestSlotMan::deleteRequestSlot(...) was moved
  8846. here.
  8847. (deleteTimeoutRequestSlot): RequestSlotMan::deleteTimeoutRequestSlot
  8848. (...) was moved here.
  8849. (deleteAllRequestSlot): RequestSlotMan::deleteAllRequestSlot(...) was
  8850. moved here.
  8851. (deleteCompletedRequestSlot):
  8852. RequestSlotMan::deleteCompletedRequestSlot(...) was moved here.
  8853. (getCorrespondingRequestSlot):
  8854. RequestSlotMan::getCorrespoindingRequestSlot(...) was moved here.
  8855. And renamed to getCorrespondingRequestSlot, correcting a typo.
  8856. (countPendingMessage): Renamed to countMessageInQueue.
  8857. (countMessageInQueue): New function.
  8858. (countRequestSlot): RequestSlotMan::countRequestSlot() was moved here.
  8859. (receiveHandshake): New function.
  8860. (createHandshakeMessage): New function.
  8861. (receiveMessage): New function.
  8862. (createPeerMessage): New function.
  8863. (syncPiece): New function.
  8864. (getNewPieceAndSendInterest): New function.
  8865. (sendMessages): New function.
  8866. (sendNow): New function.
  8867. (trySendNow): New function.
  8868. (sendHandshake): New function.
  8869. (abortPiece): New function.
  8870. (getDownloadPiece): New function.
  8871. (getPeerMessageCommonProperty): New function.
  8872. (createRequestMessage): New function.
  8873. (createCancelMessage): New function.
  8874. (createPieceMessage): New function.
  8875. (createHaveMessage): New function.
  8876. (createChokeMessage): New function.
  8877. (createUnchokeMessage): New function.
  8878. (createInterestedMessage): New function.
  8879. (createNotInterestedMessage): New function.
  8880. (createBitfieldMessage): New function.
  8881. (createKeepAliveMessage): New function.
  8882. To add simple Content-Disposition support:
  8883. * src/HttpResponseCommand.h (determinFilename): New function.
  8884. * src/HttpResponseCommand.cc (executeInternal):
  8885. Use determinFilename(headers) instead of req->getFile() when comparing
  8886. filename.
  8887. (determinFilename): New function.
  8888. (handleDefaultEncoding): Use determinFilename(headers) instead of
  8889. req->getFile().
  8890. (handleOtherEncoding): Use determinFilename(headers) instead of
  8891. req->getFile().
  8892. * src/Util.h (getContentDispositionFilename): New function.
  8893. * src/Util.cc (getContentDispositionFilename): New function.
  8894. * src/LogFactory.h (release): New function.
  8895. * src/LogFactory.cc (release): New function.
  8896. To fix a bug that causes out-of-bound exception when HTTP status
  8897. line is wrong:
  8898. * src/HttpConnection.cc (receiveResponse): Added a check for header
  8899. size.
  8900. * src/common.h (Deleter): New class.
  8901. * src/SegmentMan.cc
  8902. (~SegmentMan): Added deletion of splitter and diskWriter.
  8903. * src/DownloadEngine.h
  8904. (Commands): Use deque.
  8905. (clearQueue): New function.
  8906. * src/DownloadEngine.cc
  8907. (~DownloadEngine): Added deletion of segmentMan.
  8908. (cleanQueue): New function.
  8909. * src/TorrentDownloadEngine.h
  8910. (TorrentDownloadEngine): The implementation was moved to
  8911. TorrentDownloadEngine.cc.
  8912. (~TorrentDownloadEngine): The implementation was moved to
  8913. TorrentDownloadEngine.cc.
  8914. * src/TorrentDownloadEngine.cc
  8915. (~TorrentDownloadEngine): Added deletion of torrentMan.
  8916. * src/main.cc
  8917. (clearRequest): Removed.
  8918. (handler): Added deletion of e.
  8919. (torrentHandler): Added deletion of te.
  8920. (main): Do not share splitter.
  8921. Use Deleter instead of clearRequest.
  8922. Deletion of classes were updated.
  8923. 2006-05-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8924. * src/main.cc (main): Fixed typo.
  8925. * src/message.h: Fixed typo.
  8926. * po/de.po: Added German translation, thanks to Hermann J. Beckers.
  8927. 2006-04-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8928. To add --select-file command-line option:
  8929. * src/Util.cc
  8930. (unfoldRange): New function.
  8931. (getNum): New function.
  8932. (unfoldSubRange): New function
  8933. * src/main.cc
  8934. (showUsage): Added help message.
  8935. (main): Added --select-file command-line option. Updated the layout of
  8936. file listing.
  8937. * src/common.h
  8938. (Integers): New definition.
  8939. * src/SocketCore.cc
  8940. (writeData): Removed timeout argument.
  8941. (readData): Removed timeout argument.
  8942. (peekData): Removed timeout argument.
  8943. * src/Socket.cc
  8944. (writeData): Removed timeout argument.
  8945. (readData): Removed timeout argument.
  8946. (peekData): Removed timeout argument.
  8947. * Release 0.4.1
  8948. 2006-04-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8949. To deploy upload rate based choking algorithm:
  8950. * src/PeerInteractionCommand.cc
  8951. (PeerInteractionCommand): Add peer to TorrentMan::activePeers to track
  8952. peer currently used.
  8953. (decideChoking): Deleted the choke/unchoke decision algorithm when
  8954. download completes. Simplified.
  8955. (receiveMessage): Updated.
  8956. * src/TorrentMan.h
  8957. (activePeers): New variable.
  8958. (addActivePeer): New function.
  8959. (getActivePeers): New function.
  8960. (deleteActivePeer): New function.
  8961. * src/TorrentMan.cc
  8962. (addPeer): deleteOldErrorPeers is moved to the begining of the function
  8963. * src/PeerAbstractCommand.cc
  8964. (onAbort): Use peer->resetStatus().
  8965. * src/main.cc
  8966. (PeerChokeCommand.h): Included.
  8967. (main): Added the instance of ChokingCommand to the command queue.
  8968. * src/Peer.h
  8969. (amChoking): Renamed from amChocking
  8970. (chokingRequired): New variable.
  8971. (optUnchoking): New variable.
  8972. (deltaUpload): New variable.
  8973. (deltaDownload): New variable.
  8974. (addDeltaUpload): New function.
  8975. (resetDeltaUpload): New function.
  8976. (addDeltaDownload): New function.
  8977. (resetDeltaDownload): New function.
  8978. (addPeerUpload): Added a call to addDeltaUpload.
  8979. (addPeerDownload): Added a call to addDeltaDownload.
  8980. * src/Peer.cc
  8981. (shouldBeChoking): Renamed from shouldChoke.
  8982. (resetStatus): New function.
  8983. * src/PeerChokeCommand.h: New class.
  8984. * src/PeerChokeCommand.cc: New class.
  8985. To add lazy upload speed limiter:
  8986. * src/TorrentConsoleDownloadEngine.h: Moved the variables for
  8987. statistics calculation to TorrentDownloadEngine.
  8988. * src/TorrentConsoleDownloadEngine.cc
  8989. (sendStatistics): Renamed from printStatistics.
  8990. (initStatistics): Removed. Moved to TorrentDownloadEngine.
  8991. (calculateSpeed): Removed. Moved to TorrentDownloadEngine.
  8992. (calculateStatistics): Removed. Moved to TorrentDownloadEngine.
  8993. * src/TorrentDownloadEngine.h: Added the variables for statistics
  8994. calculation.
  8995. (sendStatistics): New function as pure virtual function.
  8996. (getUploadSpeed): New function.
  8997. * src/TorrentDownloadEngine.cc
  8998. (initStatistics): New function.
  8999. (calculateSpeed): New function.
  9000. (calculateStatistics): New function.
  9001. * src/SendMessageQueue.h
  9002. (uploadLength): New variable.
  9003. (send): Added an argument.
  9004. (setUploadLimit): New function.
  9005. (getUploadLimit): New function.
  9006. * src/SendMessageQueue.cc
  9007. (send): Added upload speed limiter.
  9008. * src/prefs.h
  9009. (PREF_UPLOAD_LIMIT): New definition.
  9010. * src/PeerInteractionCommand.cc
  9011. (PeerInteractionCommand): Set upload speed limit to sendMessageQueue.
  9012. * src/main.cc
  9013. (main): Added --upload-limit option
  9014. For bug fixes:
  9015. * src/main.cc
  9016. (showUsage): Corrected --listen-port help
  9017. Other changes:
  9018. * src/TorrentMan.cc
  9019. (getPeer): Return nullPeer if connection is grather than
  9020. MAX_PEER_UPDATE(15) in order to leave space for incoming peers.
  9021. 2006-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9022. To add some useful information to the exception message:
  9023. * src/SocketCore.cc : Updated messages.
  9024. * src/SegmentMan.cc :
  9025. * src/TorrentMan.cc : Updated messages.
  9026. * src/MultiDiskWriter.cc : Updated messages.
  9027. * src/Util.cc : Updated messages.
  9028. * src/AbstractDiskWriter.cc : Updated messages.
  9029. * src/PreAllocationDiskWriter.cc : Updated messages.
  9030. * src/message.cc : Added new messages. Updated some messages.
  9031. * src/TrackerWatcherCommand.h (MIN_PEERS): New definition.
  9032. * src/TrackerWatcherCommand.cc (execute): Use MIN_PEERS.
  9033. Updated threshold from 30 to 15.
  9034. * src/AbstractDiskWriter.h (filename): New variable.
  9035. * src/AbstractDiskWriter.cc (openExistingFile): Assigned filename.
  9036. (createFile): Assigned filename.
  9037. * src/main.cc: Updated the help message for http-auth-scheme.
  9038. * Release 0.4.0
  9039. 2006-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9040. To add TrackerUpdateCommand with which replaces
  9041. CompactTrackerResponseProcessor:
  9042. * src/TrackerWatcherCommand.h (req): Removed.
  9043. * src/TrackerWatcherCommand.cc (execute): Send a request to tracker
  9044. if the number of peer connections are less than 30.
  9045. * src/ByteArrayDiskWriter.h (readData): Implemented.
  9046. * src/SegmentMan.h (diskWriter): New function.
  9047. * src/SegmentMan.cc (init): Added a call to diskWriter->closeFile()
  9048. * src/main.cc : Removed #include "CompactTrackerResponseProcessor.h"
  9049. (main): Use TrackerUpdateCommand.
  9050. * src/TorrentMan.h (CompactTrackerResponseProcessor): Removed.
  9051. (req): New variable.
  9052. (setTrackerResponseProcessor): Removed.
  9053. (getTrackerResponseProcessor): Removed.
  9054. (processTrackerResponse): Removed.
  9055. * src/DownloadEngine.h (diskWriter): Removed.
  9056. * src/TorrentDownloadEngine.cc (afterEachIteration): Removed a call
  9057. to torrentMan->processTrackerResponse().
  9058. To add Util::expandBuffer:
  9059. * src/ByteArrayDiskWriter.h (expandBuffer): Removed.
  9060. * src/ByteArrayDiskWriter.cc (writeData): Use Util::expandBuffer().
  9061. * src/Util.h (expandBuffer): New function.
  9062. To fix the bug that causes segmentation fault when "-l ." is specified
  9063. in command-line option:
  9064. * src/SimpleLogger.h (SimpleLogger): Removed "filename" argument.
  9065. (openFile): New function.
  9066. (closeFile): New function.
  9067. * src/SimpleLogger.cc (SimpleLogger): Removed fopen.
  9068. (~SimpleLogger): Call closeFile();
  9069. * src/LogFactory.cc (getInstance): Added a call to slogger->openFile().
  9070. * src/main.cc (main): Added a check to see logger is configured
  9071. properly.
  9072. To enable HTTP authentication without specifying "--http-auth-scheme"
  9073. * src/prefs.h (PREF_HTTP_AUTH_ENABLED): New definition.
  9074. * src/HttpConnection.cc (createRequest): Send Authorization header
  9075. if PREF_HTTP_AUTH_ENABLED == V_TRUE.
  9076. * src/main.cc (main): Preset PREF_HTTP_AUTH_SCHEME to V_TRUE
  9077. If "--http-user" is specified, set PREF_HTTP_AUTH_ENABLED to V_TRUE
  9078. * src/Peer.cc (shouldChoke): Updated algorithm.
  9079. * src/message.h (EX_AUTH_FAILED): New definition.
  9080. (EX_FILE_OPEN): New definition.
  9081. * src/HttpResponseCommand.cc (checkResponse): Throw DlAbortEx
  9082. if status == 401.
  9083. (handleDefaultEncoding): Added a call to diskWriter->initAndOpenFile()
  9084. if req->isTorrent == true.
  9085. * src/main.cc (handler): Removed the check to see e->diskWriter != NULL
  9086. (torrentHandler): Removed the check to see diskAdaptor != NULL.
  9087. * src/AbstractDiskWriter.cc (openExistingFile): Updated messsage.
  9088. (createFile): Updated message.
  9089. 2006-04-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9090. To add a readout of estimated remaining time to normal HTTP/FTP
  9091. downloads:
  9092. * src/ConsoleDownloadEngine.h (startup): New variable.
  9093. (startupLength): New variable.
  9094. (isStartupLengthSet): New variable.
  9095. (avgSpeed): New variable.
  9096. (eta): New variable.
  9097. * src/ConsoleDownloadEngine.cc (sendStatistics): Added a readout of
  9098. estimated remaining time.
  9099. (initStatistics): Initialized newly added variables.
  9100. (calculateStatistics): Calculate average speed and estimated remaining
  9101. time.
  9102. To decouple TorrentDownloadEngine from HttpResponseCommand:
  9103. * src/TrackerDownloadCommand.h: Removed.
  9104. * src/TrackerDownloadCommand.cc: Removed.
  9105. * src/TrackerInitCommand.h: Removed.
  9106. * src/TrackerInitCommand.cc: Removed.
  9107. * src/TrackerUpdateCommand.h: Removed.
  9108. * src/TrackerUpdateCommand.cc: Removed.
  9109. * src/TrackerWatcherCommand.cc (execute): The construction of request
  9110. url written in TrackerInitCommand was moved here. Do not create
  9111. tracker request command if torrentMan->trackers != 0.
  9112. * src/CompactTrackerResponseProcessor.h: New class.
  9113. * src/CompactTrackerResponseProcessor.cc: New class.
  9114. * src/message.h (MSG_TRACKER_WARNING_MESSAGE): Updated.
  9115. * src/HttpResponseCommand.cc (createHttpDownloadCommand):
  9116. Decoupled TorrentDownloadEngine from this.
  9117. * src/SegmentMan.h (init): New function.
  9118. * src/SegmentMan.cc (init): New function.
  9119. * src/TorrentMan.h (responseProcessor): New variable.
  9120. (trackers): New variable.
  9121. (setTrackerResponseProcessor): New function.
  9122. (getTrackerResponseProcessor): New function.
  9123. (processTrackerResponse): New function.
  9124. * src/TorrentMan.cc (Constructor): Initialized new variable trackers.
  9125. (processTrackerResponse): New function.
  9126. * src/main.cc (main): Use ByteArrayDiskWriter and
  9127. CompactTrackerResponseProcessor.
  9128. * src/TorrentDownloadEngine.cc (afterEachIteration): Call torrentMan->
  9129. processTrackerResponse().
  9130. * src/TorrentConsoleDownloadEngine.cc (printStatistics): Updated a
  9131. readout.
  9132. * src/TorrentDownloadEngine.cc (afterEachIteration): Added log message
  9133. which indicates download has completed.
  9134. * src/AbstractDiskWriter.cc (Destructor): fd >= 0, not fd >0
  9135. (closeFile): fd >= 0, not fd > 0
  9136. * src/main.cc (main): Added short cut for show-files.
  9137. Added short cut for torrent-file.
  9138. Added new command-line option listen-port.
  9139. Updated i18n messages.
  9140. 2006-04-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9141. To add LogFactory which creates singleton logger:
  9142. * src/LogFactory.h: New class.
  9143. * src/LogFactory.cc: New class.
  9144. * src/Command.h (logger): New variable.
  9145. (Constructor): Use LogFactory.
  9146. * src/AbstractCommand.cc: Use Command::logger
  9147. * src/PeerConnection.cc (Constructor): Deleted the argument logger.
  9148. Use LogFactory.
  9149. * src/SegmentSplitter.h : Made logger protected.
  9150. * src/SegmentSplitter.cc (Constructor): Use LogFactory.
  9151. * src/SegmentMan.cc (Constructor): Use LogFactory.
  9152. * src/DownloadEngine.h : Made logger protected.
  9153. * src/DownloadEngine.cc (Constructor): Use LogFactory.
  9154. * src/PeerInteractionCommand.cc : Use Command::logger.
  9155. * src/HttpResponseCommand.cc : Use Command::logger.
  9156. * src/SegmentMan.h : Made logger private.
  9157. * src/TorrentMan.h : Made logger private.
  9158. * src/TorrentMan.cc : Use LogFactory.
  9159. * src/FtpNegotiateCommand.cc : Use Command::logger.
  9160. * src/HttpConnection.h (Constructor): Deleted the argument logger.
  9161. * src/HttpConnection.cc (Constructor): Deleted the argument logger.
  9162. Use LogFactory.
  9163. * src/FtpConnection.h (Constructor): Deleted the argument logger.
  9164. * src/FtpConnection.cc (Constructor): Deleted the argument logger.
  9165. Use LogFactory.
  9166. * src/DownloadCommand.cc : Use Command::logger.
  9167. * src/PeerAbstractCommand.cc : Use Command::logger.
  9168. * src/PeerListenCommand.cc : Use Command::logger.
  9169. * src/PeerInitiateConnectionCommand.cc : Use Command::logger.
  9170. * src/HttpInitiateConnectionCommand.cc : Use Command::logger.
  9171. * src/FtpInitiateConnectionCommand.cc : Use Command::logger.
  9172. * src/TrackerWatcherCommand.cc : Use Command::logger.
  9173. * src/TrackerUpdateCommand.cc : Use Command::logger.
  9174. * src/TrackerDownloadCommand.cc : Use Command::logger.
  9175. * src/RequestSlotMan.cc (Constructor): Deleted the argument logger.
  9176. Use LogFactory.
  9177. * src/SendMessageQueue.h (Constructor): Deleted the argument logger.
  9178. * src/SendMessageQueue.cc (Constructor): Deleted the argument logger.
  9179. Use LogFactory.
  9180. * src/main.cc (main): Use LogFactory.
  9181. * src/DiskAdaptor.h (logger): New variable.
  9182. * src/DiskAdaptor.cc (Constructor): Use LogFactory.
  9183. * src/CopyDiskAdaptor.cc (fixFilename): Added a log message.
  9184. 2006-04-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9185. * src/TrackerInitCommand.cc (TrackerInitCommand): Added a "key"
  9186. parameter to a tracker request.
  9187. * src/TorrentMan.cc (readFileEntryFromMetaInfoFile): Bug fix.
  9188. * src/TrackerWatcherCommand.cc (execute): Call req->resetTryCount().
  9189. * src/main.cc (setSignalHander): New function.
  9190. (main): Added a handler for SIGTERM.
  9191. (handler): Updated message.
  9192. (torrentHandler): Updated message.
  9193. 2006-04-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9194. * src/TorrentConsoleDownloadEngine.cc
  9195. (onPartialDownloadingCompletes): Renamed as
  9196. onSelectiveDownloadingCompletes.
  9197. (onSelectiveDownloadingCompletes): Updated message.
  9198. To add DiskAdaptor which abstract DiskWriter family:
  9199. * src/PeerConnection.cc: Use diskAdaptor instead of diskWriter.
  9200. * src/PeerInteractionCommand.cc: Use diskAdaptor instead of diskWriter.
  9201. * src/BitfieldMan.cc (isAllBitSet): bug fix.
  9202. * src/TorrentMan.cc : Included CopyDiskAdaptor.h, DirectDiskAdaptor.h,
  9203. MultiDiskAdaptor.h.
  9204. (readFileEntry): Changed its arguments.
  9205. (setup): setupDiskWriter is merged into this function.
  9206. (setupDiskWriter): Removed.
  9207. (setFileFilter): New function.
  9208. (readFileEntryFromMetaInfoFile): Updated according to the changes
  9209. made in readFileEntry.
  9210. (getFilePath): Removed.
  9211. (getTempFilePath): Removed.
  9212. (getSegmentFilePath): Updated due to the removal of getFilePath.
  9213. (fixFilename): Removed.
  9214. (copySingleFile): Removed.
  9215. (splitMultiFile): Removed.
  9216. (deleteTempFile): Removed.
  9217. (setFileEntriesToDownload): Removed.
  9218. (isPartialDownloadingMode): Renamed as isSelectiveDownloadingMode.
  9219. (isSelectiveDownloadingMode): New function.
  9220. (setAllMultiFileRequestedState): Removed.
  9221. (finishPartialDownloadingMode): Renamed as
  9222. finishSelectiveDownloadingMode.
  9223. (finishSelectiveDownloadingMode): New function.
  9224. (getPartialTotalLength): Renamed as getSelectedTotalLength.
  9225. (getSelectedTotalLength): New function.
  9226. (onDownloadComplete): Use diskAdaptor.
  9227. * src/MultiDiskWriter.cc (Constructor): Added the argument pieceLength
  9228. (Range): Removed.
  9229. (setMultiFileEntries): Renamed as setFileEntries.
  9230. (setFileEntries): New function.
  9231. * src/MultiDiskWriter.h [DiskWriterEntry](enabled): Removed.
  9232. (pieceLength): New variable.
  9233. * src/main.cc (printDownloadCompeleteMessage): New function.
  9234. (torrentHandler): Use diskAdaptor instead of diskWriter.
  9235. (main): Renamed torrent-show-files to show-files.
  9236. Rewritten file contents listing.
  9237. * src/TorrentMan.h (FileEntry): Removed.
  9238. (multiFileTopDir): Removed.
  9239. (multiFileEntries): Removed.
  9240. (diskWriter): Removed.
  9241. (diskAdaptor): New variable.
  9242. * src/DefaultDiskWriter.h (totalLength): New variable.
  9243. * src/DefaultDiskWriter.cc (initAndOpenFile): Added ftruncate.
  9244. * src/TorrentDownloadEngine.cc (onEndOfRun): Use diskAdaptor instead of
  9245. diskWriter.
  9246. * src/TorrentConsoleDownloadEngine.h
  9247. (partialDownloadLengthDiff): Renamed as selectedDownloadLengthDiff.
  9248. (partialTotalLength): Renamed as selectedTotalLength.
  9249. * src/AbstractDiskWriter.cc (openFile): If file exists, call
  9250. openExistingFile, otherwise call initAndOpenFile.
  9251. (closeFile): fd > 0, not fd != 0.
  9252. * src/DirectDiskAdaptor.h: New class.
  9253. * src/DirectDiskAdaptor.cc: New class.
  9254. * src/MultiDiskAdaptor.h: New class.
  9255. * src/MultiDiskAdaptor.cc: New class.
  9256. * src/CopyDiskAdaptor.h: New class.
  9257. * src/CopyDiskAdaptor.cc: New class.
  9258. * src/DiskAdaptor.h: New class.
  9259. * src/DiskAdaptor.cc: New class.
  9260. * src/prefs.h (PREF_TORRENT_SHOW_FILES): Renamed as PREF_SHOW_FILES
  9261. (PREF_SHOW_FILES): New definition.
  9262. 2006-04-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9263. To add the ability to download multi torrent into respective files
  9264. directly:
  9265. * src/DiskWriter.h (openFile): New function.
  9266. (seek): Removed.
  9267. * src/MultiDiskWriter.h: New class.
  9268. * src/MultiDiskWriter.cc: New class.
  9269. * src/AbstractDiskWriter.h (seek): Changed its scope from public to
  9270. protected.
  9271. (openFile): New function.
  9272. * src/AbstractDiskWriter.cc (openFile): New function.
  9273. * src/prefs.h (V_FALSE): New definition.
  9274. (PREF_DIRECT_FILE_MAPPING): New definition.
  9275. * src/TorrentMan.h (setupDiskWriter): New function.
  9276. (setAllMultiFileRequestedState): New function.
  9277. (onDownloadComplete): New function.
  9278. * src/TorrentMan.cc : Included MultiDiskWriter.h
  9279. (setupDiskWriter): New function.
  9280. (getFilePath): Updated.
  9281. (getTempFilePath): Updated.
  9282. (getSegmentFilePath): Updated.
  9283. (fixFilename): Updated.
  9284. (deleteTempFile): Updated.
  9285. (setAllMultiFileRequestedState): New function.
  9286. (setFileEntriesToDownload): Use setAllMultiFileRequestedState().
  9287. (finishPartialDownloadingMode): Reset requested flags.
  9288. (onDownloadComplete): New function.
  9289. * src/main.cc: Added --direct-file-mapping option.
  9290. Use TorrentMan::setupDiskWriter().
  9291. * src/TorrentDownloadEngine.cc (afterEachIteration): Use TorrentMan::
  9292. onDownloadComplete().
  9293. To fix ETA bug:
  9294. * src/Util.h (difftvsec): New function.
  9295. * src/Util.cc (difftvsec): New function.
  9296. * src/TorrentConsoleDownloadEngine.cc (calculateSpeed): Use int for the
  9297. type of "elapsed" instead of long long int.
  9298. (calculateStatistics): Use Util::difftvsec instead of Util::difftv.
  9299. The updates of statistics takes place every 1 seconds.
  9300. * src/TorrentConsoleDownloadEngine.h (lastElapsed): Changed its type.
  9301. (calculateSpeed): Changed its argument signature.
  9302. * src/PeerMessage.cc (toString): Fixed message.
  9303. 2006-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9304. To print ETA:
  9305. * src/TorrentDownloadEngine.cc (afterEachIteration): Added download
  9306. completion handling when dealing with
  9307. TorrentMan::isPartialDownloadingMode() == true.
  9308. * src/TorrentDownloadEngine.h (onPartialDownloadingCompletes):
  9309. New function.
  9310. * src/TorrentConsoleDownloadEngine.h (startup): New variable.
  9311. (sessionDownloadLength): New variable.
  9312. (avgSpeed): New variable.
  9313. (eta): New variable.
  9314. * src/TorrentConsoleDownloadEngine.cc (initStatistics): Initialized
  9315. new variables: eta, avgSpeed, startup.
  9316. (calculateSpeed): Calculate average speed and ETA.
  9317. (printStatistics): Added ETA.
  9318. * src/Util.h (secfmt): New function.
  9319. * src/Util.cc (secfmt): New function.
  9320. 2006-04-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9321. To detect "keep alive" flooding:
  9322. * src/PeerInteractionCommand.h (keepAliveCount): New variable
  9323. * src/PeerInteractionCommand.cc (Constructor): Initialized new
  9324. variable: keepAliveCount.
  9325. (detectMessageFlooding): Added "keep alive" flooding detection.
  9326. (receiveMessage): Increase keepAliveCount when "keep alive" message
  9327. received.
  9328. To add the ability to download only specified files in multi-file
  9329. torrent:
  9330. * src/BitfieldMan.h (filterBitfield): New variable.
  9331. (filterEnabled): New variable.
  9332. (setFilterBit): New function.
  9333. (enableFilter): New function.
  9334. (disableFilter): New function.
  9335. (isFilterEnabled): New function.
  9336. (getFilteredTotalLength): New function.
  9337. (getCompletedLength): New function.
  9338. * src/BitfieldMan.cc (Constructor): Initialized new variable:
  9339. filterBitfield, filterEnabled.
  9340. (CopyConstructor): Added filterBitfield and filterEnabled.
  9341. (operator==): Added filterBitfield and filterEnabled.
  9342. (Destructor): Added filterBitfield.
  9343. (getMissingIndex): Use filterBitfield.
  9344. (getMissingUnusedIndex): Use filterBitfield.
  9345. (getFirstMissingUnusedIndex): Use filterBitfield.
  9346. (getFirstMissingUnusedIndex): Use filterBitfield.
  9347. (getAllMissingIndexes): Use filterBitfield.
  9348. (countMissingBlock): Use filterBitfield.
  9349. (countBlock): Use filterBitfield.
  9350. (setBitInternal): Added new argument on.
  9351. (setUseBit): Use setBitInternal.
  9352. (unsetUseBit): Use setBitInternal.
  9353. (setBit): Use setBitInternal.
  9354. (unsetBit): Use setBitInternal.
  9355. (isAllBitSet): Use filterBitfield.
  9356. (setFilterBit): New function.
  9357. (addFilter): New function.
  9358. (enableFilter): New function.
  9359. (disableFilter): New function.
  9360. (clearFilter): New function.
  9361. (isFilterEnabled): New function.
  9362. (getFilteredTotalLength): New function.
  9363. (getCompletedLength): New function.
  9364. * src/TorrentMan.h [FileEntry](Constructor): Updated signature.
  9365. Initalized newly added variables.
  9366. [FileEntry](offset): New variable.
  9367. [FileEntry](extracted): New variable.
  9368. [FileEntry](requested): New variable.
  9369. (readFileEntry): New function.
  9370. (option): New variable.
  9371. (splitMultiFile): Removed const qualifier.
  9372. (fixFilename): Removed const qualifier.
  9373. (readFileEntryFromMetaInfoFile): New function.
  9374. (finishPartialDownloadingMode): New function.
  9375. (isPartialDownloadingMode): New function.
  9376. (setFileEntriesToDownload): New function.
  9377. (getCompletedLength): New function.
  9378. (getPartialTotalLength): New function.
  9379. * src/TorrentMan.cc (readFileEntry): New function.
  9380. (setup): Use readFileEntry. If no-preallocation option is specified,
  9381. use DefaultDiskWriter.
  9382. (readFileEntryFromMetaInfoFile): New function.
  9383. (fixFilename): Removed const qualifier.
  9384. (splitMultiFile): Removed const qualifier.
  9385. (setFileEntriesToDownload): New function.
  9386. (isPartialDownloadingMode): New function.
  9387. (finishPartialDownloadingMode): New function.
  9388. (getCompletedLength): New function.
  9389. (getPartialTotalLength): New function.
  9390. * src/TorrentConsoleDownloadEngine.h (partialDownloadLengthDiff):
  9391. New variable.
  9392. (partialTotalLength): New variable.
  9393. (downloadLength): New variable.
  9394. (totalLength): New variable.
  9395. * src/TorrentConsoleDownloadEngine.cc (onPartialDownloadingCompletes):
  9396. Added log.
  9397. (initStatistics): Initialized new variables: partialDownloadLengthDiff,
  9398. partialTotalLength, downloadLength, totalLength.
  9399. (calculate): Calculate downloadLength and totalLength.
  9400. * src/prefs.h :New definition PREF_NO_PREALLOCATION
  9401. * src/main.cc (addCommand): Changed argument signature.
  9402. (main): Added new variable: args. Added new option "torrent-show-files"
  9403. "no-preallocation". Usage is not updated yet.
  9404. 2006-04-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9405. * src/PeerMessage.cc (setBitfield): Fixed invalid memory de-allocation.
  9406. 2006-04-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9407. Attempt to add the ability to listing file entries in a .torrent file.
  9408. This feature is not yet complete.
  9409. * src/prefs.h (PREF_TORRENT_SHOW_FILES): New definition
  9410. * src/TorrentMan.cc (getMultiFileEntries): New function.
  9411. (getName): New function.
  9412. * src/TorrentMan.h (getMultiFileEntries): New function.
  9413. (getName): New function.
  9414. * src/main.cc (main): Use above 2 funtion.
  9415. * Release 0.3.2
  9416. 2006-03-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9417. * src/PeerInteractionCommand.cc (checkInactiveConnection): New function
  9418. (detectMessageFlooding): Updated threshold value.
  9419. (checkLongTimePeerChoking): Updated timeout value.
  9420. (getNewPieceAndSendInterest): Added debug log.
  9421. * src/PeerInteractionCommand.h (checkInactiveConnection): New function
  9422. * src/TorrentMan.cc (deleteOldErrorPeers): Updated.
  9423. (getPeer): Updated.
  9424. * src/TorrentMan.h: Added MAX_PEER_ERROR.
  9425. * src/PeerAbstractCommand.cc (onAbort): Increment error counter.
  9426. * src/PeerListenCommand.cc (execute): Close connection if incoming peer
  9427. is localhost.
  9428. * src/main.cc (main): Updated PREF_PEER_CONNECTION_TIMEOUT to 60.
  9429. * src/PendingMessage.cc (processMessage): Not to send piece message
  9430. if peer is not interested in the pieces localhost has.
  9431. * src/Peer.cc (shouldChoke): Updated.
  9432. * src/SendMessageQueue.cc (cancelAllRequest): Fixed.
  9433. * src/Util.cc (isPowerOf): New function.
  9434. * src/Util.h (isPowerOf): New function.
  9435. * src/PeerMessageUtil.cc (checkLength): Added a check for length
  9436. whether or not it is power of 2.
  9437. 2006-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9438. Added new class SendMessageQueue that includes PendingMessages and
  9439. RequestSlotMan.
  9440. * src/SendMessageQueue.h: New class.
  9441. * src/SendMessageQueue.cc: New class.
  9442. * src/PendingMessage.h: Added new member variable blockIndex and its
  9443. accessors.
  9444. (createRequestMessage): Updated.
  9445. * src/PendingMessage.cc (createRequestMessage): Updated.
  9446. * src/PeerInteractionCommand.cc (executeInternal): Updated with
  9447. SendMessageQueue.
  9448. (checkLongTimePeerChoking): Updated with SendMessageQueue.
  9449. (receiveMessage): Updated with SendMessageQueue.
  9450. (deletePendingPieceMessage): Removed.
  9451. (getNewPieceAndSendInterest): Updated with SendMessageQueue.
  9452. (sendInterest): Updated with SendMessageQueue.
  9453. (createRequestPendingMessage): Updated with SendMessageQueue.
  9454. (sendMessages): Updated with SendMessageQueue.
  9455. (onAbort): Updated with SendMessageQueue.
  9456. (keepAlive): Updated with SendMessageQueue.
  9457. (beforeSocketCheck): Updated SendMessageQueue.
  9458. * src/PeerInteractionCommand (sendMessages): Shuffle
  9459. missingBLockIndexes before using it.
  9460. Added its own timeout for peer connection.
  9461. * src/PeerAbstractCommand.h: Added member variable timeout and its
  9462. setter.
  9463. * src/prefs.h: Added PREF_PEER_CONNECTION_TIMEOUT.
  9464. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  9465. Added setTimeout() call.
  9466. (executeInternal): Added setTimeout() call.
  9467. * src/PeerAbstractCommand.cc (PeerAbstractCommand):
  9468. Added timeout.
  9469. (isTimeoutDetected): Updated.
  9470. * src/main.cc (main): Added PREF_PEER_CONNECTION_TIMEOUT entry to
  9471. option.
  9472. Added *simple* message flooding checker.
  9473. * src/PeerInteractionCommand.cc (executeInternal):
  9474. Added detectMessageFlooding() call.
  9475. (detectMessageFlooding): New function.
  9476. (receiveMessage): Count up CHOKE, UNCHOKE, HAVE message.
  9477. (beforeSocketCheck): Added detectMessageFlooding() call.
  9478. * src/PeerInteractionCommand.h: Added sendMessageQueue,
  9479. chokeUnchokeCount, haveCount, detectMessageFlooding().
  9480. Removed deletePendingPieceMessage(), getRequestSlot(),
  9481. deleteRequestSlot(), deleteAllRequestSlot().
  9482. * src/PeerInteractionCommand.cc (beforeSocketCheck):
  9483. Added checkLongTimePeerChoking() call.
  9484. * src/RequestSlotMan.h: Renamed deleteTimeoutRequestSlot().
  9485. * src/TorrentMan.cc (addPeer): Delete at most MAX_PEER_LIST_SIZE peers
  9486. if duplicate == false.
  9487. The parameter "uploaded" and "downloaded" in the tracker request are
  9488. the size since the client sent the "started" event to the tracker.
  9489. * src/TorrentMan.cc (setup): Assigned saved downloaded Size and
  9490. uploaded size to preDownloadedSize, preUploadedSize respectively.
  9491. * src/TorrentMan.h: Added preDownloadedSize, preUploadedSize,
  9492. getSessionDownloadedSize(), getSessionUploadedSize().
  9493. * src/TrackerInitCommand.cc (execute): Use getSessionDownloadedSize(),
  9494. getSessionUploadedSize() instead of getDownloadedSize(),
  9495. getUploadedSize().
  9496. * src/PendingMessage.cc (processMessage): Do not send request message
  9497. if the peer is choking the client.
  9498. * src/TrackerUpdateCommand.cc (execute): Check wtheher minInterval is
  9499. less than interval.
  9500. 2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9501. * configure.in: Added gnutls support. Added several CPP macros.
  9502. * m4/openssl.m4: Added.
  9503. * src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
  9504. readData(), peekData(). Added gnutls support.
  9505. * src/HttpDownloadCommand.cc: Removed SleepCommand.h
  9506. * src/TrackerWatcherCommand.{h,cc}: Added. This command creates
  9507. TrackerInitCommand periodicaly(TorrentMan::minInterval).
  9508. * src/TorrentMan.cc: Remove downloadedSize == 0 check from save().
  9509. Instead, added a check for whether setup method has executed
  9510. successfully.
  9511. * src/TorrentMan.h: Added member vaiable setupComplete. Updated
  9512. DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to 300.
  9513. * src/Makefile.am: Updated.
  9514. * src/messageDigest.h: Added. This is a macro calculating SHA1 digest
  9515. using whether OpenSSL or gcrypt, depending on the result of configure
  9516. script.
  9517. * src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by using
  9518. messageDigest.h.
  9519. * src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
  9520. * src/PeerListenCommand.cc: Added log about port binded successfully.
  9521. Fixed memory leak.
  9522. * src/main.cc: Added gnutls support. Replaced LIB_SSL with
  9523. ENABLE_BITTORRENT where they are not related to OpenSSL but BitTorrent.
  9524. Removed instantiation of TrackerInitCommand. Instead,
  9525. TrackerWatcherCommand is instantiated and pushed to the command queue.
  9526. * src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL with
  9527. ENABLE_SSL.
  9528. * src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
  9529. * src/RequestSlotMan.cc (deleteCompletedRequestSlot):
  9530. If a piece is already acquired by another command, delete the request
  9531. slots for the piece.
  9532. * src/TrackerUpdateCommand.cc (execute):
  9533. Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to warn.
  9534. Added a check whether peer list is null.
  9535. Fixed the bug that causes sending completed event to the tracker
  9536. several times.
  9537. * src/TrackerInitCommand.cc (execute):
  9538. Fixed the bug that causes sending completed event to the tracker
  9539. several times.
  9540. * src/AbstractDiskWriter.{h,cc}: Removed direct dependency on OpenSSL
  9541. by using messageDigest.h.
  9542. 2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9543. * PeerConnection.cc: Replaced log message "keep-alive" with
  9544. "keep alive".
  9545. * PeerInteractionCommand.{h,cc}: Close connection if peer is choking
  9546. localhost long time.
  9547. * TorrentMan.cc: When adding new peer with duplicate = true, if the
  9548. number of peer list is equal to or grater than MAX_PEER_LIST, delete
  9549. at most 100 failure entry from the list. If with duplicate = false,
  9550. MAX_PEER_LIST is not checked.
  9551. * PeerListenCommand.cc: Fixed the argument order of log message.
  9552. 2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9553. * Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
  9554. Added warn().
  9555. * SimpleLogger.h: Moved enum LEVEL to Logger.h.
  9556. Implemented warn().
  9557. Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated code.
  9558. 2006-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9559. * Request.h: Added AFTER_COMPLETED event.
  9560. * TorrentDownloadEngine.cc: Prints "Download complete" message
  9561. instead of downloaded size and progress(%) after download completes.
  9562. * PeerInteractionCommand.cc: After download completes, sends unchoke
  9563. message to the peer if it is interested in what localhost has
  9564. downloaded.
  9565. * TorrentMan.cc: In single-file mode, copy temporary file to the final
  9566. destination instead of just renaming it.
  9567. * TorrentMan.cc: Added deleteTempFile().
  9568. * PeerAbstractCommand.cc: do not stop execution after download
  9569. completes. This makes localhost a seeder.
  9570. * Util.{h,cc}: Added fileCopy().
  9571. * PeerListenCommand.cc: do not stop execution after download completes.
  9572. This makes localhost a seeder.
  9573. * main.cc: Do not call TorrentMan::fixFilename() in torrentHandler.
  9574. Added TorrentMan::deleteTempFile() to torrentHandler.
  9575. Initialized the variable dir as ".".
  9576. * TorrentMan.h: Changed DEFAULT_ANNOUNCE_INTERVAL to 120 seconds.
  9577. Deleted renameSingleFile().
  9578. Added copySingleFile(), deleteTempFile().
  9579. * DownloadEngine.h: Added virtual function afterEachIteration().
  9580. * TorrentDownloadEngine.cc: Move a call to TorrentMan::fixFilename()
  9581. in onEndOfRun() to afterEachIteration().
  9582. In onEndOfRun(), changed if condition to check whether filenameFixed is
  9583. true.
  9584. * Util.cc: Implemented fileCopy() using rangedFileCopy().
  9585. In rangedFileCopy(), added try-catch block to properly close file
  9586. descriptors.
  9587. * TorrentDownloadEngine.cc: Added a member variable filenameFixed.
  9588. Added afterEachIteration(), isFilenameFixed().
  9589. * Peer.cc: Changed choking strategy.
  9590. * PreAllocationDiskWriter.cc: Drop O_DIRECT flag.
  9591. * TrackerInitCommand.cc: Send completed event only once.
  9592. * DownloadEngine.cc: Added a call to afterEachIteration().
  9593. * TrackerUpdateCommand.cc: Do not stop execution after download
  9594. completes.
  9595. * TorrentMan.h: Defined MAX_PEER_UPDATE as 15. aria2 attempts to
  9596. connect the peers at most MAX_PEER_UPDATE when a peer list is
  9597. received from a tracker.
  9598. * TrackerUpdateCommand.cc: Implemented above mentioned behavior.
  9599. Decreased the number of failure peers to delete to 0(just comment out
  9600. the line).
  9601. * Release 0.3.1
  9602. 2006-03-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9603. * PeerInteractionCommand.cc: added a call to
  9604. TorrentMan::unadvertisePiece in Destructor.
  9605. * PeerInteractionCommand.cc: make have message sent immediately
  9606. if the size of pending message queue is zero.
  9607. * TorrentMan.cc: set the maximum size of peer list to 250.
  9608. * TorrentMan.h: changed the container type of Peers and UsedPieces
  9609. to deque.
  9610. * Util.cc: fixed rangedFileCopy.
  9611. * AbstractDiskWriter.{h,cc}: moved digest context initialization
  9612. to Constructor. Also, moved digest cleanup to Destructor.
  9613. * MetaFileUtil.cc: fixed memory leak
  9614. * replaced std::vector with std::deque.
  9615. * AbstractCommand.cc: casted timeout value to long long int.
  9616. * ChunkedEncoding.cc: fixed memory leak.
  9617. * PeerInteractionCommand.cc: casted timeout value to long long int.
  9618. * SleepCommand.cc: casted timeout value to long long int.
  9619. * Data.cc: fixed memory leak.
  9620. * Data.cc: fixed toLLInt().
  9621. * BitfieldMan.cc: fixed memory leak.
  9622. * TorrentMan.cc: initialized storeDir to ".".
  9623. * TorrentMan.cc: fixed memory leak.
  9624. * TorrentMan.cc: corrected file paths of splitted files.
  9625. * PeerAbstractCommand.cc: casted timeout to long long int.
  9626. * main.cc: added delete(req) and delete(te->diskWriter).
  9627. * RequestSlot.cc: casted timeout value to long long int.
  9628. * Request.cc: fixed memory leak.
  9629. * PendingMessage.cc: make HAVE messages sent only when peer does not
  9630. have the piece.
  9631. * Peer.{h,cc}: added hasPiece(int index).
  9632. * main.cc: corrected addCommand.
  9633. 2006-03-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9634. * BitTorrent protocol support added.
  9635. * Release 0.3.0
  9636. 2006-03-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9637. * SocketCore.cc: remove the assignment of addrinfo.ai_addr.
  9638. 2006-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9639. * ChunkedEncoding.{h,cc}: fixed the bug that if chunk data is binary,
  9640. decoding did not work properly.
  9641. 2006-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9642. * DownloadEngine.h: included sys/time.h
  9643. * DownloadEngine.cc: remove sys/time.h
  9644. * Makefile.am (SUBDIRS): Add intl.
  9645. * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
  9646. 2006-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9647. * main.cc: correct help message for --http-auth-scheme.
  9648. * main.cc: changed e-mail address for bug reports.
  9649. * ja.po: added japanese translation.
  9650. 2006-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9651. * SimpleLogger.cc: flush log file instead of stdout.
  9652. 2006-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9653. * main.cc: Fixed command-line option: max-tries
  9654. * HttpResponseCommand.cc: Make the request re-sent only if req->seg.sp
  9655. does not equal to seg.sp.
  9656. * DownloadCommand.cc: If EOF is got from the server and the total size
  9657. of file is not zero, then throw DlRetryEx.
  9658. * main.cc: Set the minium value of min-segment-size to 1024.
  9659. * HttpResponseCommand.cc: Fixed the bug that http segmented downloading
  9660. fails because of a regression since 0.2.0 release.
  9661. 2006-03-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9662. * HttpConnection.cc:
  9663. * common.h: defined the user agent name as macro
  9664. * DownloadEngine.{h, cc}:
  9665. * ConsoleDownloadEngine.{h, cc}: Console output message(size, speed)
  9666. is now generated by ConsoleDownloadEngine not by DownloadEngine.
  9667. * main.cc: Download complete/abort message is now generated by main.
  9668. * Makefile.am (SUBDIRS): Add m4.
  9669. (ACLOCAL_AMFLAGS): New variable.
  9670. (EXTRA_DIST): New variable.
  9671. * configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
  9672. * gettext: added gettext functionality
  9673. 2006-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9674. * AbstractCommand.cc:
  9675. * DownloadCommand.{h, cc}: Aborted downloading commands now properly
  9676. unregister its cuid from SegmentMan.
  9677. * DownloadEngine.cc: .aria2 file was written when a downloading
  9678. failed with errors.
  9679. * HttpConnection.cc: Added "Proxy-Connection" header to proxy request.
  9680. Added "User-Agent" header to CONNECT proxy request.
  9681. Fixed "Proxy-Authorization" header. Now proxy authorization works
  9682. properly.
  9683. * Logger.h:
  9684. * SimpleLogger.{h,cc}: Changed the type of msg to const char*.
  9685. * ChunkedEncoding.cc: Added #include directive for strings.h
  9686. * Release 0.2.1
  9687. 2006-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9688. * Util.{h,cc}: added startsWith().
  9689. * CookieBox.cc: rewrited criteriaFind() using Util::startsWith() and
  9690. Util::endsWith().
  9691. * SocketCore.cc: struct addrinfo is now zero-initialized.
  9692. * common.h: added #include directive of limit.h.
  9693. * DownloadEngine.cc: added #include directive of sys/time.h and
  9694. algorithm.
  9695. * Exception.h: added #include directive of stdio.h.
  9696. * AbstractCommand.h: added #include directive of sys/time.h.
  9697. * DownloadCommand.h: added #include directive of sys/time.h.
  9698. * *.h: added #include directive of common.h to all base classes.
  9699. subclasses' one was removed.
  9700. * common.h: defined LONG_LONG_MAX and LONG_LONG_MIN if a compiler
  9701. does not define these macros.
  9702. 2006-02-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9703. * Release 0.2.0
  9704. * main.cc:
  9705. * HttpInitiateConnectionCommand.{h,cc}:
  9706. * prefs.h:
  9707. * HttpConnection.{h,cc}: added --http-proxy-method option.
  9708. We can now use GET command in http proxy.
  9709. 2006-02-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9710. * SplitSlowestSegmentSplitter.{h,cc}: This class provies algorithm
  9711. that splits slowest segment of SegmentMan::commands vector.
  9712. This is the default split algorithm of aria2.
  9713. * SplitFirstSegmentSplitter.{h,cc}: This class provides algorithm
  9714. that splits first segment of SegmentMan::commands vector.
  9715. * SegmentSplitter.{h,cc}: Added. This class provides split algorithm.
  9716. * DownloadCommand.{h,cc}: Added downloading speed calculation.
  9717. * Segment.h:
  9718. * SegmentMan.cc: Added speed field to Segment.h
  9719. * main.cc: -s option now affects all URLs in command-line arguemtns.
  9720. * HttpResponseCommand.cc: Fixed bug that segment file is not loaded.
  9721. * message.h: Change file size related %d to %lld.
  9722. 2006-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9723. * FtpInitiateConnectionCommand.{h,cc}:
  9724. * FtpNegotiationCommand.{h,cc}:
  9725. * FtpDownloadCommand.{h,cc}:
  9726. * FtpConnection.{h,cc}: Added FTP support
  9727. * SimpleLogger.cc: Log message now includes time information.
  9728. * main.cc: The value of --http-auth-scheme option is chagned from
  9729. 'BASIC' to 'basic'
  9730. * main.cc: Added --timeout command-line option.
  9731. * main.cc: Added --min-segment-size command-line option.
  9732. * main.cc: Added --max-retries command-line option.
  9733. * prefs.h: option string constants are now defined in prefs.h
  9734. 2006-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9735. * AbstractCommand.cc: Fixed timeout bug in AbstractCommand
  9736. * SegmentMan.cc: Added totalSize entry to .aria2 file. No compatibility
  9737. with version 0.1.0's one.
  9738. 2006-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9739. * configure.in: Added --enable-ssl option to configure script.
  9740. * HttpConnection.cc: Make Request-URI an absolute path. Some servers
  9741. cannot permit absoluteURI as Request-URI.
  9742. * HttpConnection.cc: Added Referer support.
  9743. * main.cc: Added referer command-line option.
  9744. * main.cc: Added rety-wait command-line option.
  9745. * Exception.h: Fixed formating bug in Exception::setMsg()
  9746. * SocketCore.{h,cc}:
  9747. * Socket.{h, cc}:
  9748. * Request.cc:
  9749. * InitiateConnectionCommandFactory.cc:
  9750. * HttpRequestCommand.cc: Added HTTPS support.
  9751. * SocketCore.{h,cc}: Added SocketCore. Socket becomes a handle class
  9752. for SocketCore.
  9753. * ChunkedEncoding.cc: Fixed bug in ChunkedEncoding: expanding buffer
  9754. size is wrong
  9755. * DownloadCommand.cc: Fixed bug in DownloadCommand: In Chunked
  9756. Encoding, it wrongly adds to Segment.ds buff length from the socket.
  9757. 2006-02-17 Tatsuhiro Tsujikawa <tsujikawa at rednoah dot com>
  9758. * Release 0.1.0