ChangeLog 301 KB

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