ChangeLog 398 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223
  1. 2008-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2. Fixed: numCommand is less than the value specified in -C option.
  3. * src/RequestGroup.cc
  4. 2008-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5. Fixed occasional assertion failure in PieceSegment.
  6. Calling PieceStorage::getMissingPiece(size_t) was missing after
  7. canceling segments in SegmentMan::getSegment(int32_t). This resulted in
  8. creation of duplicate segments and one of the segment was finished then
  9. assertion failure was caused.
  10. * src/SegmentMan.cc
  11. * test/SegmentManTest.cc
  12. 2008-08-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  13. Added options to load/save the server's performance/status to a file
  14. and the timeout to drop their data.
  15. --server-stat-of=FILE specifies the file to which performance data
  16. is saved.
  17. --server-stat-if=FILE specifies the file to read previously saved
  18. by --server-stat-of option. Might be used with --uri-selector=feedback.
  19. --server-stat-timeout=TIMEOUT specifies timeout to invalidate the data.
  20. TIMEOUT is specified in seconds and the default value is 24hours.
  21. * src/MultiUrlRequestInfo.cc
  22. * src/OptionHandlerFactory.cc
  23. * src/RequestGroupMan.cc
  24. * src/RequestGroupMan.h
  25. * src/ServerStatMan.cc
  26. * src/ServerStatMan.h
  27. * src/option_processing.cc
  28. * src/prefs.cc
  29. * src/prefs.h
  30. * test/ServerStatManTest.cc
  31. 2008-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  32. Implemented ServerStatMan::removeStaleServerStat() and its test case.
  33. * src/ServerStatMan.cc
  34. * src/ServerStatMan.h
  35. * test/ServerStatManTest.cc
  36. 2008-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  37. Implemented ServerStatMan::load(...) function and its test case.
  38. * src/ServerStat.cc
  39. * src/ServerStat.h
  40. * src/ServerStatMan.cc
  41. * test/ServerStatManTest.cc
  42. * test/ServerStatTest.cc
  43. 2008-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  44. Use time_t instead of int32_t. Use int64_t where milli second is
  45. expected.
  46. * src/TimeA2.cc
  47. * src/TimeA2.h
  48. 2008-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  49. Implemented ServerStatMan::save(...) function and its test case.
  50. * src/ServerStat.cc
  51. * src/ServerStat.h
  52. * src/ServerStatMan.cc
  53. * src/ServerStatMan.h
  54. * test/ServerStatManTest.cc
  55. 2008-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  56. Now aria2 uses name attribute in Metalink as local filename in
  57. BitTorrent downloads. BUG#2033999
  58. * src/BtContext.h
  59. * src/BtDependency.cc
  60. * src/DefaultBtContext.cc
  61. * src/DefaultBtContext.h
  62. * src/SingleFileDownloadContext.cc
  63. * src/SingleFileDownloadContext.h
  64. * test/BtDependencyTest.cc
  65. * test/DefaultBtContextTest.cc
  66. * test/MockBtContext.h
  67. 2008-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  68. Added AC_C_BIGENDIAN
  69. * src/configure.ac
  70. 2008-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  71. Limited numCommand less than or equal to the number of piece.
  72. * src/RequestGroup.cc
  73. 2008-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  74. Eliminated randomness from the test case. Removed #ifdef __MINGW32
  75. directive.
  76. * test/DefaultPieceStorageTest.cc
  77. 2008-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  78. Fixed memory leak in test code
  79. * test/AnnounceListTest.cc
  80. * test/DefaultPeerListProcessorTest.cc
  81. * test/DefaultPeerStorageTest.cc
  82. * test/MetaFileUtilTest.cc
  83. 2008-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  84. Fixed wrong argument passing to BitfieldMan::isBitSet()
  85. * src/DefaultPieceStorage.cc
  86. 2008-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  87. Initialized _directIOAllowed
  88. * src/MultiDiskAdaptor.cc
  89. 2008-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  90. Fixed memory leak
  91. * src/GZipDecoder.cc
  92. 2008-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  93. Fixed memory leak
  94. * src/MetalinkParserStateMachine.cc
  95. 2008-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  96. Fixed memory leak
  97. * src/Dictionary.cc
  98. 2008-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  99. Fixed memory leak
  100. * src/IteratableChunkChecksumValidator.h
  101. 2008-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  102. Fixed unmatched malloc/free.
  103. * src/IteratableChunkChecksumValidator.cc
  104. * src/IteratableChecksumValidator.cc
  105. 2008-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  106. Removed max chunk size check. This change fixes BUG#2040169
  107. * src/ChunkedDecoder.cc
  108. * src/ChunkedDecoder.h
  109. * test/ChunkedDecoderTest.cc
  110. 2008-08-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  111. Implemented download speed based URI selection algorithm.
  112. Introduced new option --uri-selector.
  113. If --uri-selector=feedback is given, aria2 uses download speed observed
  114. in the previous downloads and chooses fastest server in the URI list.
  115. Currently at most 10 URIs are considered to introduce randomeness for
  116. finding better servers. The speed is average download speed in the
  117. downloads.
  118. On the other hand, if --uri-selector=inorder is given, which is default,
  119. URI is tried in order in URI list.
  120. The usage text for the new option has not been written yet.
  121. * src/AbstractCommand.cc
  122. * src/DownloadCommand.cc
  123. * src/DownloadEngine.cc
  124. * src/DownloadEngineFactory.cc
  125. * src/InOrderURISelector.cc
  126. * src/InOrderURISelector.h
  127. * src/OptionHandlerFactory.cc
  128. * src/PeerStat.h
  129. * src/RequestGroup.cc
  130. * src/RequestGroup.h
  131. * src/RequestGroupMan.cc
  132. * src/RequestGroupMan.h
  133. * src/SegmentMan.cc
  134. * src/SegmentMan.h
  135. * src/ServerStat.cc
  136. * src/ServerStat.h
  137. * src/ServerStatMan.cc
  138. * src/ServerStatMan.h
  139. * src/ServerStatURISelector.cc
  140. * src/ServerStatURISelector.h
  141. * src/URISelector.h
  142. * src/option_processing.cc
  143. * src/prefs.cc
  144. * src/prefs.h
  145. * test/InOrderURISelectorTest.cc
  146. * test/RequestGroupManTest.cc
  147. * test/ServerStatManTest.cc
  148. * test/ServerStatURISelectorTest.cc
  149. 2008-08-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  150. * Release 0.15.1+2
  151. 2008-08-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  152. Bump up version number to 0.15.1+2
  153. * configure.ac
  154. 2008-08-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  155. Fixed the bug that configure --enable-FEATURE actually disables FEATURE.
  156. * m4/aria2_arg.m4
  157. 2008-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  158. * Release 0.15.1+1
  159. 2008-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  160. Bump up version number to 0.15.1+1
  161. * configure.ac
  162. 2008-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  163. Fixed the bug that causes segmentaion fault when resuming download
  164. using metalink without size tag. Reproducible only using HTTP URI.
  165. * src/HttpResponseCommand.cc
  166. * src/FtpNegotiationCommand.cc
  167. 2008-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  168. * Release 0.15.1
  169. 2008-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  170. Updated Bulgarian and French translations, thanks to all translators.
  171. * po/bg.po
  172. * po/fr.po
  173. 2008-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  174. Bump up version number to 0.15.1
  175. * configure.ac
  176. 2008-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  177. Avoid repeated call of gettimeofday() when calculating speed.
  178. * src/SpeedCalc.cc
  179. * src/SpeedCalc.h
  180. 2008-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  181. Removed writable check when socket's send buffer is full in BitTorrent
  182. downloads to lower CPU usage.
  183. * src/PeerInteractionCommand.cc
  184. 2008-07-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  185. Fixed broken gzip inflation.
  186. Turn off segmented downloading if gzip content is smaller than or equal
  187. to 1MiB and inflate the data on the fly, because HTTP response header
  188. doesn't contain the length of inflated file we can't determin where
  189. the chunk of data should be written.
  190. On the other hand, if gzip content is larger than 1MB, then turn off
  191. on the fly inflation, because some servers returns "content-type: gzip"
  192. for *.tgz, *.gz files.
  193. * src/DownloadCommand.cc
  194. * src/HttpResponseCommand.cc
  195. * src/HttpResponseCommand.h
  196. 2008-07-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  197. Applied tizianomueller's patch to fix compile error.
  198. * test/BitfieldManTest.cc
  199. * test/BtRequestMessageTest.cc
  200. * test/DefaultBtContextTest.cc
  201. * test/DefaultDiskWriterTest.cc
  202. * test/DefaultPieceStorageTest.cc
  203. * test/HttpHeaderProcessorTest.cc
  204. * test/HttpResponseTest.cc
  205. * test/Metalink2RequestGroupTest.cc
  206. * test/MetalinkParserControllerTest.cc
  207. * test/MetalinkProcessorTest.cc
  208. * test/PeerSessionResourceTest.cc
  209. * test/UtilTest.cc
  210. 2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  211. * Release 0.15.0
  212. 2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  213. Reordered src files in POTFILES.in so that usage text appears first.
  214. * po/POTFILES.in
  215. 2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  216. Bump up version number to 0.15.0
  217. * configure.ac
  218. 2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  219. Added Bulgarian translation.
  220. Updated Catalan, Spanish, French and Japanese translations.
  221. Thanks to all translators.
  222. * po/LINGUAS
  223. * po/bg.po
  224. * po/ca.po
  225. * po/es.po
  226. * po/fr.po
  227. * po/ja.po
  228. 2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  229. Updated feature list. Added libz for dependency section.
  230. Added a description about unit testing using CppUnit.
  231. * README
  232. 2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  233. Added a test for libz. Quoted where it is necessary.
  234. * build_test.sh
  235. 2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  236. Added GZip to `Enabled Features' list.
  237. * src/FeatureConfig.cc
  238. * src/FeatureConfig.h
  239. * test/FeatureConfigTest.cc
  240. 2008-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  241. Now SegmentMan::findSlowerSegmentEntry() picks up the segment for which
  242. the transfer has not yet started.
  243. Rewritten SegmentMan::registerPeerStat() and SegmentMan::getPeerStat().
  244. * src/SegmentMan.cc
  245. * src/SegmentMan.h
  246. * test/SegmentManTest.cc
  247. 2008-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  248. Cache last calculated average download/upload speed.
  249. PeerStat::getAvgDownloadSpeed(), PeerStat::getAvgUploadSpeed() return
  250. cached value.
  251. Now SpeedCalc::changeSw() is called from SpeedCalc::calculateSpeed()
  252. * src/PeerStat.h
  253. * src/SpeedCalc.cc
  254. * src/SpeedCalc.h
  255. 2008-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  256. Call parseUrl directly.
  257. * src/Request.cc (resetUrl)
  258. 2008-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  259. Supported absolute/relative path in Location header field.
  260. * src/AbstractCommand.cc: Call resetUrl() when DlRetryEx is caught.
  261. * src/HttpHeader.cc
  262. * src/HttpHeader.h
  263. * src/HttpResponse.cc
  264. * src/HttpSkipResponseCommand.cc
  265. * src/Request.cc
  266. * test/HttpHeaderTest.cc
  267. * test/HttpResponseTest.cc
  268. * test/RequestTest.cc
  269. 2008-07-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  270. Changed help text for --load-cookie option.
  271. * doc/aria2c.1.txt
  272. * src/usage_text.h
  273. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  274. Regenerated test/Makefile.in to remove stale ChangeLog.
  275. * test/Makefile.in
  276. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  277. Updated po files.
  278. * po/aria2c.pot
  279. * po/*.po
  280. * po/*.gmo
  281. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  282. Bump up version number to 0.15.0b
  283. * configure.ac
  284. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  285. Externalize messages.
  286. * src/RequestGroupMan.cc
  287. * src/message.h: Added MSG_SIGNATURE_SAVED, MSG_SIGNATURE_NOT_SAVED.
  288. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  289. Use File::exists() instead of File::isFile() to allow non-regular file
  290. such as block special files.
  291. * src/AbstractDiskWriter.cc
  292. * src/MultiDiskWriter.cc
  293. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  294. Supplied missing EAI_SYSTEM. Thanks ggknauf for the patch.
  295. * src/gai_strerror.h
  296. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  297. Fixed compile error. Thanks gknauf for the patch.
  298. * src/asctime_r.c
  299. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  300. Included asctime_r.h from a2time.h.
  301. * src/a2time.h
  302. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  303. Added a message "aria2 doesn't verify signature" to log message when
  304. signature file is saved.
  305. * src/RequestGroupMan.cc
  306. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  307. Added the ability to save signature when download is completed if
  308. signature is available. The filename of signature file is the path to
  309. download file followed by ".sig". If it already exists, then signature
  310. will not be saved.
  311. * src/RequestGroupMan.cc
  312. * src/Signature.cc
  313. * test/SignatureTest.cc
  314. 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  315. Updated the descriptions for --bt-seed-unverified.
  316. * doc/aria2c.1
  317. * doc/aria2c.1.html
  318. * doc/aria2c.1.txt
  319. 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  320. Renamed --bt-seed option as --bt-seed-unverified so that it makes clear
  321. that this is not going to verify files using piece hashes.
  322. * src/HelpItemFactory.cc
  323. * src/OptionHandlerFactory.cc
  324. * src/RequestGroup.cc
  325. * src/option_processing.cc
  326. * src/prefs.cc
  327. * src/prefs.h
  328. * src/usage_text.h
  329. 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  330. Added the ability to retrieve signature from Metalink file.
  331. A retrieved signature is stored in Signature class and it is held by
  332. DownloadContext class. Note that aria2 doesn't verify signature.
  333. * src/DownloadContext.cc
  334. * src/DownloadContext.h
  335. * src/Makefile.am
  336. * src/Makefile.in
  337. * src/Metalink2RequestGroup.cc
  338. * src/MetalinkEntry.cc
  339. * src/MetalinkEntry.h
  340. * src/MetalinkParserController.cc
  341. * src/MetalinkParserController.h
  342. * src/MetalinkParserStateMachine.cc
  343. * src/MetalinkParserStateMachine.h
  344. * src/Signature.cc
  345. * src/Signature.h
  346. * src/SignatureMetalinkParserState.cc
  347. * src/SignatureMetalinkParserState.h
  348. * src/VerificationMetalinkParserState.cc
  349. * src/VerificationMetalinkParserState.h
  350. * test/Metalink2RequestGroupTest.cc
  351. * test/MetalinkParserControllerTest.cc
  352. * test/MetalinkProcessorTest.cc
  353. * test/test.xml
  354. 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  355. Close DiskAdaptor after renaming file.
  356. * src/RequestGroup.cc
  357. 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  358. Corrected indentation
  359. * src/DefaultBtProgressInfoFile.cc
  360. 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  361. Moved the calls of std::ios::exceptions() inside of try-catch block
  362. because if an error occurred in constructor of std::fstream, then
  363. exception is thrown immediately when std::ios::exceptions() is called
  364. which results unhandled exception and aria2c aborts.
  365. * src/DefaultBtProgressInfoFile.cc
  366. 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  367. Added the test for the previous change in DefaultBtContext.cc
  368. * test/DefaultBtContextTest.cc
  369. 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  370. Fixed the bug that causes infinite loop when the number of pieces are
  371. fewer than allowed fast set size which is 10 by default.
  372. * src/DefaultBtContext.cc
  373. 2008-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  374. Updated the descriptions for -j, -s. Added --bt-seed.
  375. * doc/aria2c.1
  376. * doc/aria2c.1.html
  377. * doc/aria2c.1.txt
  378. 2008-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  379. Added --bt-seed option. If --bt-seed=true is given at the command-line,
  380. aria2 seeds previously downloaded files without validating piece hashs.
  381. * src/HelpItemFactory.cc
  382. * src/OptionHandlerFactory.cc
  383. * src/RequestGroup.cc
  384. * src/option_processing.cc
  385. * src/prefs.cc
  386. * src/prefs.h
  387. * src/usage_text.h
  388. 2008-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  389. Updated DESCRIPTION of man page.
  390. * doc/aria2c.1
  391. * doc/aria2c.1.html
  392. * doc/aria2c.1.txt
  393. 2008-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  394. Fixed the compile error on Nexenta OS(GNU/Solaris OS).
  395. Don't define `struct addrinfo' when __sun is defined.
  396. * src/getaddrinfo.h
  397. 2008-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  398. Introduced a2_struct_stat. It is defined as `struct _stati64' if
  399. __MINGW32__ is defined, because under MinGW32, _stati64 is used and its
  400. second argument is of type `struct _stati64'. Otherwise it is defined as
  401. `struct stat'.
  402. * src/AbstractDiskWriter.cc
  403. * src/File.cc
  404. * src/File.h
  405. * src/a2io.h
  406. 2008-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  407. Fixed the compile error in hurd-i386
  408. See the original bug report:
  409. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488602
  410. * src/a2io.h
  411. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  412. Code cleanup.
  413. * src/PeerAbstractCommand.cc
  414. * src/PeerAbstractCommand.h
  415. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  416. Removed TransferEncoding.
  417. * src/DownloadCommand.cc
  418. * src/DownloadCommand.h
  419. * src/HttpResponseCommand.cc
  420. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  421. Updated po files.
  422. * po/aria2c.pot
  423. * po/*.po
  424. * po/*.gmo
  425. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  426. Rewritten ChunkedEncoding class as ChunkedDecoder class.
  427. * src/A2STR.cc
  428. * src/A2STR.h
  429. * src/ChunkedDecoder.cc
  430. * src/ChunkedDecoder.h
  431. * src/ChunkedEncoding.cc: Removed
  432. * src/ChunkedEncoding.h: Removed
  433. * src/DownloadCommand.cc
  434. * src/DownloadCommand.h
  435. * src/HttpDownloadCommand.cc
  436. * src/HttpResponse.cc
  437. * src/HttpResponse.h
  438. * src/HttpResponseCommand.cc
  439. * src/HttpSkipResponseCommand.cc
  440. * src/HttpSkipResponseCommand.h
  441. * src/Makefile.am
  442. * src/TransferEncoding.h: Removed
  443. * test/ChunkedDecoderTest.cc
  444. * test/ChunkedEncodingTest.cc: Removed
  445. * test/HttpResponseTest.cc
  446. * test/Makefile.am
  447. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  448. Use append instead of insert.
  449. * src/GZipDecoder.cc
  450. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  451. Updated doc
  452. * src/Decoder.h
  453. 2008-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  454. Updated usage text for -s option.
  455. * src/usage_text.h
  456. 2008-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  457. Fixed the bug that UTF-8 encoded URL is not URL-encoded properly.
  458. * src/Request.cc
  459. 2008-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  460. Cleaned up configure.ac.
  461. * configure.ac
  462. 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  463. Use ARIA2_ARG_WITH and ARIA2_ARG_ENABLE instead of AC_ARG_WITH and
  464. AC_ARG_ENABLE.
  465. * configure.ac
  466. 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  467. Added gzip, deflate decoding support in HTTP using libz. If compiled
  468. with this feature, aria2 sends "Accept-Encoding: deflate, gzip" header
  469. to a HTTP server. If a server returns "Content-Encoding: gzip" or
  470. "Content-Encoding: deflate" then, aria2 decodes the response body on the
  471. fly and writes decoded data to a local disk.
  472. * README
  473. * README.html
  474. * configure.ac
  475. * m4/aria2_arg.m4: Added ARIA2_ARG_WITH and ARIA2_ARG_ENABLE, they are
  476. wrapper function for AC_ARG_WITH and AC_ARG_ENABLE respectively.
  477. * m4/libz.m4
  478. * src/Decoder.h
  479. * src/DownloadCommand.cc
  480. * src/DownloadCommand.h
  481. * src/Exception.h
  482. * src/GZipDecoder.cc
  483. * src/GZipDecoder.h
  484. * src/HttpHeader.cc
  485. * src/HttpHeader.h
  486. * src/HttpRequest.cc
  487. * src/HttpRequest.h
  488. * src/HttpResponse.cc
  489. * src/HttpResponse.h
  490. * src/HttpResponseCommand.cc
  491. * src/Makefile.am
  492. * test/GZipDecoderTest.cc
  493. * test/HttpRequestTest.cc
  494. * test/HttpResponseTest.cc
  495. * test/Makefile.am
  496. * test/Makefile.in
  497. * test/gzip_decode_test.gz
  498. 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  499. Clarified usage of -j option.
  500. * src/usage_text.h
  501. 2008-06-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  502. Disabled getting size from the response of RETR.
  503. If SIZE command failed, then disable resuming and segmented downloading.
  504. * src/FtpConnection.cc
  505. * src/FtpConnection.h
  506. * src/FtpNegotiationCommand.cc
  507. * src/FtpNegotiationCommand.h
  508. 2008-06-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  509. Use digits to find first byte of file size, which makes the intention
  510. of the code clearer.
  511. * src/FtpConnection.cc
  512. Don't call validateTotalLength() when size is 0.
  513. * src/FtpNegotiationCommand.cc
  514. 2008-06-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  515. Updated po files.
  516. * po/aria2c.pot
  517. * po/*.gmo
  518. * po/*.po
  519. 2008-06-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  520. Clarified usage text for --split option.
  521. * src/usage_text.h
  522. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  523. Bump up version number to 0.15.0dev. "dev" means "development"
  524. version, which means I started the development of the next release!
  525. * src/configure.ac
  526. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  527. If FTP server returns negative response with REST raw command and
  528. requested range is not 0, throw exception. If requested range is 0,
  529. continue download a file from 0 byte.
  530. * src/FtpNegotiationCommand.cc
  531. * src/FtpNegotiationCommand.h
  532. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  533. Supported FTP server which don't recognize SIZE raw command.
  534. If SIZE raw command is failed, aria2 will try to get file size
  535. from the response of RETR raw command. If both attempts are failed,
  536. then resuming and segmented downloading are disabled.
  537. * src/FtpConnection.cc
  538. * src/FtpConnection.h
  539. * src/FtpNegotiationCommand.cc
  540. * src/FtpNegotiationCommand.h
  541. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  542. * Release 0.14.0+1
  543. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  544. Bump up version number to 0.14.0+1
  545. * src/configure.ac
  546. 2008-06-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  547. Fixed the code that refers static member variable from non-static
  548. context.
  549. * src/DefaultPeerStorage.cc
  550. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  551. * Release 0.14.0
  552. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  553. Added build test script
  554. * build_test.sh
  555. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  556. Updated ja.po
  557. * src/ja.po
  558. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  559. Bump up version number to 0.14.0
  560. * src/configure.ac
  561. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  562. Updated ja.po and fr.po. Great thanks for french translators and
  563. Sebastien WILLEMIJNS.
  564. * po/fr.po
  565. * po/ja.po
  566. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  567. Added configure option to enable/disable epoll support.
  568. * configure.ac
  569. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  570. Updated man page.
  571. * doc/aria2c.1.txt
  572. * doc/aria2c.1
  573. * doc/aria2c.1.html
  574. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  575. Added missing default value '5' to the usage of --split option.
  576. * src/HelpItemFactory.cc
  577. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  578. Filled up pieces based on the number of missing blocks, rather than
  579. simplay the number of piece * block length.
  580. * src/BtRequestFactory.h
  581. * src/DefaultBtInteractive.cc
  582. * src/DefaultBtInteractive.h
  583. * src/DefaultBtRequestFactory.cc
  584. * src/DefaultBtRequestFactory.h
  585. * src/Piece.cc
  586. * src/Piece.h
  587. * test/BitfieldManTest.cc
  588. * test/DefaultBtRequestFactoryTest.cc
  589. * test/MockBtRequestFactory.h
  590. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  591. Made _epEvents a member variable.
  592. * src/DownloadEngine.cc
  593. * src/DownloadEngine.h
  594. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  595. Cancel download if http redirect is bounded more than 20 times.
  596. * src/AbstractCommand.cc
  597. * src/HttpSkipResponseCommand.cc
  598. * src/Request.cc
  599. * src/Request.h
  600. * test/RequestTest.cc
  601. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  602. Fixed unhandled exception(removed keyword `new').
  603. * src/SocketCore.cc (initEPOLL)
  604. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  605. Removed visit(const MetaEntry*)
  606. * src/MetaEntryVisitor.h:
  607. Added visit(const Data*),visit(const Dictionary*),visit(const List*)
  608. and made them virtual.
  609. * src/BencodeVisitor.h
  610. * src/BencodeVisitor.cc
  611. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  612. Updated po files.
  613. * po/aria2c.pot
  614. * po/*.po
  615. * po/*.gmo
  616. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  617. Moved the call setWriteCheckSocket inside the previous clause to reduce
  618. the number of socket to watch out.
  619. * src/PeerInteractionCommand.cc
  620. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  621. When there is not enough space in disk when writing a chunk of data,
  622. aria2 now prints the message to the console to warn user and aborts
  623. its download. Not all downloads are canceled because some downloads
  624. may use another disk or partition. BUG#1640332
  625. * src/AbstractDiskWriter.cc
  626. * src/PeerAbstractCommand.cc
  627. * src/PeerAbstractCommand.h: Added onFailure() function for override.
  628. * src/PeerInteractionCommand.cc: In onFailure(), call RequestGroup::
  629. setHaltRequested(true) to cancel download.
  630. * src/PeerInteractionCommand.h
  631. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  632. Applied Ross's aria2-0.13.2+1-mingw-5.patch, which changes the type of
  633. socket from int to sock_t as sockets are unsigned in Windows.
  634. For AsyncNameResolver, DownloadEngine, I did additional modification
  635. for the portion of the code changed according to epoll support.
  636. I defined sock_t in a2netcompat.h to use sock_t without including
  637. SocketCore.h.
  638. * src/AsyncNameResolver.cc
  639. * src/AsyncNameResolver.h
  640. * src/DownloadEngine.cc
  641. * src/DownloadEngine.h
  642. * src/SocketCore.cc
  643. * src/SocketCore.h
  644. * src/a2netcompat.h
  645. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  646. Applied Ross's aria2-0.13.2+1-mingw-4.patch. With this change, all
  647. changes in the patch were applied.
  648. * test/DHTConnectionImplTest.cc: Fixed unit test error in MinGW.
  649. * test/DefaultPieceStorageTest.cc: Fixed unit test error in MinGW.
  650. * test/PeerMessageUtilTest.cc: Fixed unit test error in MinGW.
  651. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  652. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this change,
  653. a2io.h and common.h were modified.
  654. * src/a2io.h: Changed seek/stat/tell calls to use 64 bit versions in
  655. MinGW.
  656. * src/common.h: Changed off_t to 64 bit in MinGW.
  657. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  658. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
  659. only a2netcompat.h is modified.
  660. * src/a2netcompat.h: Removed unused getaddrinfo related #define
  661. directives.
  662. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  663. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
  664. only gai_strerror.h is modified.
  665. * src/gai_strerror.h: Fixed gai_strerror() function to report all
  666. winsock errors in MinGW.
  667. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  668. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit, only the
  669. follow sources are applied.
  670. * src/Platform.h: I removed HAVE_WINSOCK2_H directive from Platform.h.
  671. * src/Platform.cc: Moved common setup/teardown code to Platform class.
  672. I moved #endif // HAVE_WINSOCK2_H to the front of #include "DlAbortEx.h"
  673. I included locale.h from Platform.cc.
  674. * src/main.cc: Moved common setup/teardown code to Platform class.
  675. * test/AllTest.cc: Use Platform class.
  676. Set locale to C in AllTest.cc to prevent the messages to be localized.
  677. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  678. Applied Ross's aria2-0.13.2+1-mingw-3.patch.
  679. * test/HttpHeaderTest.cc: Casted to off_t where it should.
  680. * test/HttpRequestTest.cc: Casted to off_t where it should.
  681. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  682. Applied Ross's aria2-0.13.2+1-mingw.patch and
  683. aria2-0.13.2+1-mingw-2.patch.
  684. * src/ConsoleStatCalc.cc: Added HAVE_TERMIOUS_H directive for the
  685. systems which don't have termious.h. I moved the directive inside of
  686. if(isTTY) { ... clause so that line is wiped out without termious.h.
  687. I also removed HAVE_ASCTIME_R clause because asctime_r is provided
  688. anyway.
  689. * src/asctime_r.h
  690. * src/asctime_r.c: Added for the systems don't have asctime_r function.
  691. I added 2nd argument to the prototype declaration.
  692. * src/StringFormat.cc: Get rid of vasprintf.
  693. * src/getaddrinfo.h: Fixed constants.
  694. * configure.ac: Added the check for asctime_r function.
  695. * src/Makefile.am: Added conditional based on HAVE_ASCTIME_R
  696. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  697. Added writable test for Socket when the sending message is in progress.
  698. Usually the sending message is piece message. Without wriable check,
  699. upload latency is dropped to more than 1sec.
  700. * src/PeerInteractionCommand.cc
  701. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  702. Create only requested files and files which shares a piece with
  703. requested file in multi-torrent downloads. Directory structures are
  704. also created in the same rule.
  705. MultiDiskAdaptor::fileExists() now uses FileEntry instead of
  706. DiskWriterEntry as in the previous implementation.
  707. * src/MultiDiskWriter.cc
  708. * src/MultiFileAllocationIterator.cc
  709. * src/MultiFileAllocationIterator.h
  710. * test/MultiFileAllocationIteratorTest.cc
  711. 2008-06-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  712. Commented out -lprofiler
  713. * src/Makefile.am
  714. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  715. Bump up version number to 0.14.0b.
  716. * src/configure.ac
  717. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  718. Actively establish connection to peers in seeding, when peer cache
  719. is not full and max upload speed limit is not reached.
  720. * src/ActivePeerConnectionCommand.cc
  721. * src/ActivePeerConnectionCommand.h
  722. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  723. Always remove a peer from cache in DefaultPeerStorage::returnPeer(),
  724. to make room more fleshy, recently found peers.
  725. Peer::_badConditionStartTime is not used anymore. Consider to remove
  726. it.
  727. * src/DefaultPeerStorage.cc
  728. * test/DefaultPeerStorageTest.cc
  729. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  730. Returns cached data only when the previous receiveHandshake() is called
  731. with peek = true.
  732. * src/PeerConnection.cc (receiveHandshake)
  733. * src/PeerConnection.h (receiveHandshake)
  734. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  735. Changed default value of -s option from 1 to 5.
  736. Also max value of -s option is changed from 5 to 16.
  737. * src/HelpItemFactory.cc
  738. * src/OptionHandlerFactory.cc
  739. * src/option_processing.cc
  740. * src/usage_text.h
  741. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  742. Changed -s options behavior. Now it means the number of connections
  743. made simultaneously in each http/ftp download.
  744. If 1 URL is specified, the behavior is the same with old implementation.
  745. If -s N is given and more than N URLs are specified, first N URLs are
  746. used and remaining URLs are used for backup. If less than N URLs are
  747. specified, some of URLs are used more than once so that totally N
  748. connections are made simultaneously.
  749. * src/main.cc
  750. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  751. Included missing iosfwd or ostream header.
  752. * src/RequestGroupMan.cc
  753. * src/TaggedItem.cc
  754. * src/TaggedItem.h
  755. * src/Util.cc
  756. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  757. * src/HttpHeaderProcessor.cc: Rewritten using std::string as a buffer.
  758. * src/HttpHeaderProcessor.h: Rewritten using std::string as a buffer.
  759. * src/HttpConnection.cc: Included missing sstream.
  760. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  761. Added --bt-max-open-files option.
  762. * src/DefaultPieceStorage.cc
  763. * src/HelpItemFactory.cc
  764. * src/MultiDiskAdaptor.cc
  765. * src/MultiDiskAdaptor.h
  766. * src/OptionHandlerFactory.cc
  767. * src/option_processing.cc
  768. * src/prefs.cc
  769. * src/prefs.h
  770. * src/usage_text.h
  771. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  772. Fixed the bug that aria2 aborts when a path to a directory is given
  773. in command-line.
  774. * src/ProtocolDetector.cc
  775. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  776. Limited the number files opened in each BitTorrent download. The default
  777. value is 100. The option to change this value will be added.
  778. * src/MultiDiskAdaptor.cc
  779. * src/MultiDiskAdaptor.h
  780. * src/MultiFileAllocationIterator.cc
  781. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  782. Fixed the bug that HTTP downloads don't start with old libraries.
  783. * src/HttpHeaderProcessor.cc
  784. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  785. Use empty() instead of size() > 0.
  786. * src/HttpConnection.cc
  787. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  788. Drop connection if the incoming peer ID is the same with localhost's
  789. one. The previous implementation drops connection when incoming peer's
  790. IP address is the same with localhost's one.
  791. * src/PeerListenCommand.cc
  792. * src/DefaultBtInteractive.cc
  793. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  794. Returns cached data without checking whether socket is readable
  795. if the cache is available.
  796. * src/PeerConnection.cc (receiveHandshake)
  797. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  798. Included stdint.h
  799. * src/common.h
  800. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  801. Removed duplicate HAVE_GETTIMEOFDAY
  802. * src/Makefile.am
  803. * src/Makefile.in
  804. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  805. Use interval as a minInterval when minInterval is not supplied.
  806. * src/DefaultBtAnnounce.cc
  807. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  808. Made DEFAULT_ANNOUNCE_INTERVAL 120, so that if first tracker request
  809. attempt is failed, then 2nd attempt get kicked out more quickly.
  810. And it is now static const member of DefaultBtAnnounce.
  811. * src/DefaultBtAnnounce.h
  812. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  813. Renamed BtRuntime::lessThanMinPeers() and BtRuntime::lessThanEqMinPeers.
  814. Made MAX_PEERS and MIN_PEERS static const members of BtRuntime.
  815. * src/ActivePeerConnectionCommand.cc
  816. * src/BtConstants.h
  817. * src/BtRuntime.h
  818. * src/DHTGetPeersCommand.cc
  819. * src/DefaultBtAnnounce.cc
  820. * src/DefaultPeerStorage.cc: Calculate maxPeerListSize based on
  821. BtRuntime::MAX_PEERS.
  822. * src/DefaultPeerStorage.h
  823. * src/InitiatorMSEHandshakeCommand.cc
  824. * src/PeerInitiateConnectionCommand.cc
  825. * src/PeerInteractionCommand.cc
  826. * src/PeerReceiveHandshakeCommand.cc
  827. * src/TrackerWatcherCommand.cc
  828. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  829. Always Connect to _numNewConnection
  830. * src/ActivePeerConnectionCommand.cc
  831. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  832. Made `begin' unsigned int.
  833. * src/GrowSegment.h
  834. * src/Piece.cc
  835. * src/Piece.h
  836. * src/PiecedSegment.cc
  837. * src/PiecedSegment.h
  838. * src/Segment.h
  839. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  840. Calculate piece hash when data is arrived if the data is arrived in
  841. order. This removes additional read operation for hash calculation.
  842. If the data is arrived in out of order, the hash is calucated when the
  843. piece is completed. This is the same behavior as the old implementation.
  844. * src/BtPieceMessage.cc
  845. * src/DefaultBtProgressInfoFile.cc
  846. * src/DefaultPieceStorage.cc
  847. * src/DownloadCommand.cc
  848. * src/DownloadCommand.h
  849. * src/DownloadEngine.cc
  850. * src/GrowSegment.cc
  851. * src/GrowSegment.h
  852. * src/Piece.cc
  853. * src/Piece.h
  854. * src/PiecedSegment.cc
  855. * src/PiecedSegment.h
  856. * src/Segment.h
  857. * test/PieceTest.cc
  858. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  859. Try to keep the ordering of outgoing piece message.
  860. * src/DefaultBtMessageDispatcher.cc
  861. (DefaultBtMessageDispatcher::sendMessages)
  862. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  863. Fixed busy loop when error/hup epoll events occur.
  864. * src/AbstractCommand.cc
  865. * src/PeerAbstractCommand.cc
  866. 2008-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  867. Added --bt-request-peer-speed-limit option, which was a constant
  868. SLOW_SPEED_THRESHOLD.
  869. * src/ActivePeerConnectionCommand.cc
  870. * src/ActivePeerConnectionCommand.h
  871. * src/BtConstants.h
  872. * src/HelpItemFactory.cc
  873. * src/OptionHandlerFactory.cc
  874. * src/PeerReceiveHandshakeCommand.cc
  875. * src/option_processing.cc
  876. * src/prefs.cc
  877. * src/prefs.h
  878. * src/usage_text.h
  879. 2008-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  880. Removed repeated call of getTopDirPath(). Instead, call it once and
  881. cache the result.
  882. * src/MultiDiskAdaptor.cc
  883. * src/MultiDiskAdaptor.h
  884. (mkdir, openFile, initAndOpenFile, openExistingFile)
  885. 2008-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  886. Fixed compile error on debian etch.
  887. The libc6 shipped with debian etch doesn't define ULLONG_MAX properly
  888. even if _GNU_SOURCE is defined. So define ULLONG_MAX in case when
  889. it is undefined.
  890. * src/Util.cc (ULLONG_MAX)
  891. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  892. Added epoll support. Use epoll if it is available. If not, use select.
  893. When async dns is enabled in compile time, epoll support is enabled
  894. only when aria2 is built with c-ares. This condition statement is
  895. defined in a2io.h.
  896. Currently aria2 supports both c-ares and ares, but ares is maintained
  897. for quite a while and debian already has c-ares package, ares support
  898. will be dropped in the future version.
  899. * configure.ac
  900. * src/AbstractCommand.cc
  901. * src/AsyncNameResolver.cc
  902. * src/AsyncNameResolver.h
  903. * src/Command.cc
  904. * src/Command.h
  905. * src/DownloadEngine.cc
  906. * src/DownloadEngine.h
  907. * src/PeerAbstractCommand.cc
  908. * src/SocketCore.cc
  909. * src/SocketCore.h
  910. * src/a2io.h
  911. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  912. * test/MetalinkEntryTest.cc: Added missing `defined' keyword to #if
  913. directive.
  914. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  915. Do not do write operation to /dev/null file.
  916. * src/LogFactory.cc
  917. * src/SimpleLogger.cc
  918. Replaced vasprintf with vsnprintf
  919. * src/SimpleLogger.cc (SimpleLogger::writeLog)
  920. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  921. * src/BtRequestMessage.cc
  922. (BtRequestMessage::onQueue): Given piece to RequestSlot. This is a fix
  923. for segmentation fault caused by previous commit.
  924. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  925. Reduced the usage of gettimeofday().
  926. * src/DefaultBtMessageDispatcher.cc
  927. (DefaultBtMessageDispatcher::checkRequestSlotAndDoNecessaryThing)
  928. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  929. * src/RequestSlot.cc
  930. * src/RequestSlot.h
  931. (RequestSlot::isTimeout)
  932. Made RequestSlot have a reference to Piece object to avoid find
  933. Piece repeatedly.
  934. * src/DefaultBtMessageDispatcher.cc
  935. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  936. * src/RequestSlot.cc
  937. * src/RequestSlot.h
  938. (RequestSlot::getPiece)
  939. * test/DefaultBtMessageDispatcherTest.cc
  940. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  941. * src/TimeA2.cc
  942. * src/TimeA2.h
  943. (Time::difference): New function.
  944. (Time::elapsed): Done optimization.
  945. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  946. * src/HelpItemFactory.cc: Added missing `defined' keyword to #if
  947. directive.
  948. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  949. * src/option_processing.cc: Added missing `defined' keyword to #if
  950. directive.
  951. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  952. Bump up version number to 0.13.2+1
  953. * src/configure.ac
  954. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  955. Refactored broken outstanding piece handling.
  956. * src/DefaultPieceStorage.cc
  957. * src/DefaultPieceStorage.h
  958. * src/Piece.cc
  959. * src/Piece.h
  960. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  961. Fixed compile error on Mac OS X 10.3.9. This error was caused by the
  962. name collision of static variable and predefined macro.
  963. * src/BtContext.cc
  964. * src/BtContext.h
  965. * src/CookieBoxFactory.cc
  966. * src/CookieBoxFactory.h
  967. * src/CookieParser.cc
  968. * src/CookieParser.h
  969. * src/DefaultBtContext.cc
  970. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  971. * src/RequestGroup.cc
  972. (RequestGroup::createInitialCommand): Use empty() instead of size().
  973. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  974. * Release 0.13.2
  975. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  976. Updated fr.po(thanks to Sebastien) and ja.po. ThanksDone make update-po
  977. * po/fr.po
  978. * po/ja.po
  979. * po/aria2c.pot
  980. * po/*.po
  981. * po/*.gmo
  982. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  983. Bump up version number to 0.13.2
  984. * src/configure.ac
  985. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  986. Refactord.
  987. * src/RequestGroupMan.cc
  988. (removeStoppedGroup)
  989. (fillRequestGroupFromReserver)
  990. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  991. Fixed compile error on Ubuntu.
  992. * src/BtPieceMessage.cc
  993. * src/MessageDigestHelper.cc
  994. * src/Util.cc
  995. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  996. Fixed compile error when configured with --disable-bittorrent
  997. * test/DownloadHandlerFactoryTest.cc
  998. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  999. Done make update-po
  1000. * po/aria2c.pot
  1001. * po/*.po
  1002. * po/*.gmo
  1003. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1004. Bump up version number to 0.13.2rc.
  1005. * src/configure.ac
  1006. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1007. Made option name bold. Updated SYNOPSIS to make it more readable.
  1008. * doc/aria2c.1.txt
  1009. * doc/aria2c.1
  1010. * doc/aria2c.1.html
  1011. * src/version_usage.cc
  1012. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1013. Refactored. Use std::string instead of size and char*.
  1014. * Data.cc
  1015. * Data.h
  1016. * test/Data.cc
  1017. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1018. Added trimSelf(). Rewritten trim() to use trimSelf().
  1019. * Util.cc
  1020. * Util.h
  1021. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1022. * src/ChunkChecksum.h (getChecksum): Return const reference.
  1023. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1024. Fixed compile error when configured with --disable-metalink.
  1025. Also moved test/DownloadHandlerFactoryTest.cc to SRC in Makefile.am.
  1026. * test/FeatureConfigTest.cc
  1027. * test/DownloadHandlerFactoryTest.cc
  1028. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1029. Fixed compile error when configured with --without-gnutls
  1030. --without-openssl
  1031. * src/main.cc
  1032. * test/DefaultBtProgressInfoFileTest.cc
  1033. * test/SegmentManTest.cc
  1034. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1035. Fixed compile error with OpenSSL.
  1036. * src/IteratableChunkChecksumValidator.cc
  1037. * src/LibsslDHKeyExchange.h
  1038. * src/MessageDigestHelper.cc
  1039. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1040. Revert the default value of --max-concurrent-downloads to 5.
  1041. Revert the default value of --metalink-servers to 5.
  1042. Man pages was also updated.
  1043. * src/option_processing.cc
  1044. * doc/aria2c.1.txt
  1045. * doc/aria2c.1.html
  1046. * doc/aria2c.1
  1047. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1048. Returns const reference:
  1049. DownloadContext::getPieceHash, DownloadContext::getName,
  1050. DownloadContext::getPieceHashAlgo, DownloadContext::getDir,
  1051. BtContext::getInfoHashAsString,
  1052. * src/BtContext.h
  1053. * src/DefaultBtContext.cc
  1054. * src/DefaultBtContext.h
  1055. * src/DownloadContext.h
  1056. * src/SingleFileDownloadContext.h
  1057. * test/MockBtContext.h
  1058. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1059. * src/RequestGroup.h (getDir): Removed.
  1060. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1061. Returns const reference. The internal urlencode function was optimized
  1062. a little bit.
  1063. * src/Request.cc
  1064. * src/Request.h
  1065. * src/HttpRequest.cc
  1066. * src/HttpRequest.h
  1067. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1068. Defined option name and possible values as std::string to reduce
  1069. temporary string object creation in runtime.
  1070. * src/HelpItemFactory.cc
  1071. * src/LogFactory.cc
  1072. * src/Option.cc
  1073. * src/OptionHandlerFactory.cc
  1074. * src/option_processing.cc
  1075. * src/prefs.cc
  1076. * src/prefs.h
  1077. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1078. Return const reference.
  1079. * src/DownloadHandlerConstants.cc
  1080. * src/DownloadHandlerConstants.h
  1081. (getMetalinkExtensions)
  1082. (getMetalinkContentTypes)
  1083. (getBtExtensions)
  1084. (getBtContentTypes)
  1085. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1086. * src/HttpHeader.cc (get): Rewritten.
  1087. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1088. Make HttpHeader::getFirst(...) return const reference.
  1089. * src/HttpHeader.cc
  1090. * src/HttpHeader.h
  1091. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1092. Use Option::getAsBool(...) instead of Option::get(...) and compare
  1093. it with V_TRUE.
  1094. * src/DefaultPieceStorage.cc
  1095. * src/DownloadCommand.cc
  1096. * src/FtpNegotiationCommand.cc
  1097. * src/HttpRequest.cc
  1098. * src/InitiateConnectionCommand.cc
  1099. * src/RequestGroup.cc
  1100. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1101. Made Option::get(...) return const reference of std::string.
  1102. * src/Option.cc
  1103. * src/Option.h
  1104. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1105. Replaced std:copy with insert.
  1106. * src/DefaultBtMessageDispatcher.cc
  1107. * src/DefaultPieceStorage.cc
  1108. * src/DownloadEngineFactory.cc
  1109. * src/RequestGroup.cc
  1110. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1111. Included SocketCore.h to fix compiler warning.
  1112. * src/InitiateConnectionCommand.cc
  1113. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1114. Put piece selection strategy algorithm to RarestPieceSelector class,
  1115. Added a switch to choose whether randomized selection so that unit
  1116. tests emit same results in, possibly, win32.
  1117. * src/DefaultPieceStorage.cc
  1118. * src/DefaultPieceStorage.h
  1119. * src/RarestPieceSelector.cc
  1120. * src/RarestPieceSelector.h
  1121. * test/DefaultPieceStorageTest.cc
  1122. * test/RarestPieceSelectorTest.cc
  1123. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1124. Don't pool connection if HTTP proxy is enabled.
  1125. * src/FtpFinishDownloadCommand.cc
  1126. * src/FtpNegotiationCommand.cc
  1127. * src/HttpSkipResponseCommand.cc
  1128. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1129. Don't add closed socket to DownloadEngine::addSocketForReadCheck()
  1130. * src/AbstractCommand.cc
  1131. * src/AbstractCommand.h
  1132. * src/ActivePeerConnectionCommand.cc
  1133. * src/FtpInitiateConnectionCommand.cc
  1134. * src/HttpInitiateConnectionCommand.cc
  1135. * src/InitiateConnectionCommandFactory.cc
  1136. * src/PeerAbstractCommand.cc
  1137. * src/PeerAbstractCommand.h
  1138. * src/PeerInitiateConnectionCommand.cc
  1139. * src/TrackerWatcherCommand.cc
  1140. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1141. Sort RequestSlot in ascending order and manipulate them using
  1142. lower_bound.
  1143. * src/DefaultBtMessageDispatcher.cc
  1144. * src/DefaultBtMessageDispatcher.h
  1145. (getMessageQueue): Added const qualifier.
  1146. (getRequestSlots): Added const qualifier.
  1147. (sendMessages): Use empty() instead of size().
  1148. (doCancelSendingPieceAction): Use HandleEvent object.
  1149. (doAbortOutstandingRequestAction): Rewritten.
  1150. (doChokedAction): Rewritten.
  1151. (checkRequestSlotAndDoNecessaryThing): Rewritten.
  1152. (isOutstandingRequest): Rewritten.
  1153. (getOutstandingRequest): Rewritten.
  1154. (removeOutstandingRequest): Rewritten.
  1155. (addOutstandingRequest): Rewritten.
  1156. * src/RequestSlot.cc
  1157. * src/RequestSlot.h
  1158. (operator=): Rewritten.
  1159. (operator!=): New function.
  1160. (operator<): New function.
  1161. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1162. * src/DefaultBtRequestFactory.cc
  1163. (doChokedAction): Rewritten.
  1164. (removeCompletedPiece): Rewritten.
  1165. (removeTargetPiece): Rewritten.
  1166. (createRequestMessages): Added the debug log.
  1167. (createRequestMessagesOnEndGame: Added the debug log.
  1168. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1169. Added the debug log message.
  1170. * src/BtPieceMessage.cc (doReceivedAction)
  1171. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1172. Sorted DHTPeerAnnounceEntry in a ascending order of info hash and
  1173. used lower_bound to process them rather than linear search.
  1174. * src/DHTPeerAnnounceStorage.cc
  1175. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1176. Call subtractPieceStats from ~PeerInteractionCommand only when the
  1177. peer has at least one completed piece.
  1178. * src/Peer.cc
  1179. * src/Peer.h
  1180. * src/PeerInteractionCommand.cc
  1181. * src/PeerSessionResource.cc
  1182. * src/PeerSessionResource.h
  1183. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1184. Removed unnecessary sorting
  1185. * src/DefaultPieceStorage (DefaultPieceStorage)
  1186. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1187. Rewritten the portion of the code that mangaes allowed fast indexes.
  1188. * src/PeerSessionResource.cc
  1189. * src/PeerSessionResource.h
  1190. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1191. Removed the invalid string including '\r' from ru.po and
  1192. did make update-po.
  1193. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1194. Added --log-level and --summary-interval to man page.
  1195. * doc/aria2c.1.txt
  1196. * doc/aria2c.1.html
  1197. * doc/aria2c.1
  1198. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1199. Added --log-level option to specify log level. Log messages under
  1200. the specified level are not output. Default value is `debug'.
  1201. * src/HelpItemFactory.cc
  1202. * src/LogFactory.cc
  1203. * src/LogFactory.h
  1204. * src/Logger.h
  1205. * src/OptionHandlerFactory.cc
  1206. * src/SimpleLogger.cc
  1207. * src/SimpleLogger.h
  1208. * src/main.cc
  1209. * src/option_processing.cc
  1210. * src/prefs.h
  1211. * src/usage_text.h
  1212. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1213. Print download progress summary of all parallel downloads in specified
  1214. interval, default 60 secs. While aria2 could download several files
  1215. in parallel (see -j option), it displayed just first download progress,
  1216. and the other downloads are hidden from the users. This new feature
  1217. prints all downloads currently in-progress to the console so that you
  1218. can check the status of all downloads. The interval can be adjusted
  1219. by --summary-interval option.
  1220. The progress readout is now cut so that all fits in the one line of
  1221. console.
  1222. * src/ConsoleStatCalc.cc
  1223. * src/ConsoleStatCalc.h
  1224. * src/HelpItemFactory.cc
  1225. * src/OptionHandlerFactory.cc
  1226. * src/RequestGroupMan.cc
  1227. * src/RequestGroupMan.h
  1228. * src/main.cc
  1229. * src/option_processing.cc
  1230. * src/prefs.h
  1231. * src/usage_text.h
  1232. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1233. Call updateFdSet() to initialize rfdset, wfdset fdmax.
  1234. * src/DownloadEngine.cc (DownloadEngine)
  1235. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1236. Use free() to deallocate memory for _buffer if HAVE_POSIX_MEMALIGN is
  1237. defined.
  1238. * src/SingleFileAllocationIterator.cc (~SingleFileAllocationIterator)
  1239. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1240. Use erase+lower_bound+insert instead of sort.
  1241. * src/DefaultPieceStorage.cc (addPieceStats)
  1242. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1243. Use A2STR::SHARP_C and A2STR::EQUAL_C.
  1244. * src/A2STR.cc
  1245. * src/A2STR.h
  1246. * src/OptionParser.cc (parse)
  1247. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1248. Defined fake filename `[tracker.announce]' as static const std::string.
  1249. * src/TrackerWatcherCommand.cc (createRequestGroup)
  1250. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1251. Defined default filename `index.html' as static const std::string
  1252. * src/SingleFileDownloadContext.cc
  1253. * src/SingleFileDownloadContext.h
  1254. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1255. Defined "[MEMORY]" as static const std::string.
  1256. * src/MemoryBufferPreDownloadHandler.cc (execute)
  1257. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1258. Defined control file's version number as static const std::string.
  1259. * src/DefaultBtProgressInfoFile.cc
  1260. * src/DefaultBtProgressInfoFile.h
  1261. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1262. Use Request::METHOD_GET
  1263. * src/RequestGroup.cc (createNextCommandWithAdj)
  1264. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1265. Defined "OK", "ERR", "INPR" as static const std::string
  1266. * src/RequestGroupMan.cc (showDownloadResults)
  1267. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1268. Defined default client used in extended handshake as static const
  1269. std::string
  1270. * src/DefaultBtInteractive.cc (addHandshakeExtendedMessageToQueue)
  1271. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1272. Defined AUTH_HEADER, PROXY_AUTH_HEADER as static const std::string
  1273. * src/HttpConnection.cc (eraseConfidentialInfo)
  1274. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1275. Defined default ftp user and password as static const std::string
  1276. * src/AuthConfigFactory.cc
  1277. * src/AuthConfigFactory.h
  1278. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1279. Defined strings used in netrc as static const std::string
  1280. * src/Netrc.cc
  1281. * src/Netrc.h
  1282. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1283. Defined HTTP status as static const std::string
  1284. * src/AbstractProxyResponseCommand.cc
  1285. * src/HttpHeader.cc
  1286. * src/HttpHeader.h
  1287. * src/HttpResponse.cc
  1288. * src/HttpResponseCommand.cc
  1289. * src/HttpSkipResponseCommand.cc
  1290. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1291. Defined "\r\n", "A", "I" as static const std::string
  1292. * src/A2STR.cc
  1293. * src/A2STR.h
  1294. * src/FtpConnection.cc
  1295. * src/FtpConnection.h
  1296. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1297. Added COLON_C(".") and used it in Request::parseUrl()
  1298. * src/A2STR.cc
  1299. * src/A2STR.h
  1300. * src/Request.cc (parseUrl)
  1301. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1302. Changed the type of padName from `const std::string&' to `const char*'.
  1303. * src/MSEHandshake.cc (verifyPadLength)
  1304. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1305. Defined "sha1" as static const std::string.
  1306. * src/MetalinkParserController.cc
  1307. * src/MetalinkParserController.h
  1308. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1309. Defined message digest algorithm name as static const std::string
  1310. * src/DHTTokenTracker.cc
  1311. * src/DHTUtil.cc
  1312. * src/DefaultBtContext.cc
  1313. * src/MSEHandshake.cc
  1314. * src/MessageDigestHelper.cc
  1315. * src/Peer.cc
  1316. * src/messageDigest.cc
  1317. * src/messageDigest.h
  1318. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1319. Made string literals used in SAX parser static const std::string.
  1320. * src/FileMetalinkParserState.cc
  1321. * src/FileMetalinkParserState.h
  1322. * src/FilesMetalinkParserState.cc
  1323. * src/FilesMetalinkParserState.h
  1324. * src/InitialMetalinkParserState.cc
  1325. * src/InitialMetalinkParserState.h
  1326. * src/MetalinkMetalinkParserState.cc
  1327. * src/MetalinkMetalinkParserState.h
  1328. * src/PiecesMetalinkParserState.cc
  1329. * src/PiecesMetalinkParserState.h
  1330. * src/ResourcesMetalinkParserState.cc
  1331. * src/ResourcesMetalinkParserState.h
  1332. * src/VerificationMetalinkParserState.cc
  1333. * src/VerificationMetalinkParserState.h
  1334. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1335. Use A2STR::SLASH_C, A2STR::DOT_C instead of "/", "." respectively.
  1336. * src/A2STR.cc
  1337. * src/A2STR.h
  1338. * src/File.cc
  1339. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1340. Defined static const std::string IP("ip"), PORT("port") and use them
  1341. instead of string literals.
  1342. * src/DefaultPeerListProcessor.cc
  1343. * src/DefaultPeerListProcessor.h
  1344. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1345. Made string literals for torrent file processing static const
  1346. std::string.
  1347. * src/BtContext.cc
  1348. * src/BtContext.h
  1349. * src/DefaultBtContext.cc
  1350. * src/DefaultBtContext.h
  1351. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1352. Made string literal for tracker response static const std::string
  1353. * src/BtAnnounce.cc
  1354. * src/BtAnnounce.h
  1355. * src/DefaultBtAnnounce.cc
  1356. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1357. Use DHTMessage::T instead of "t".
  1358. * src/DHTMessageTracker.cc (messageArrived)
  1359. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1360. Made keyName static const. Made trimmed charset static const
  1361. std::string.
  1362. * src/Util.cc (getContentDispositionFilename)
  1363. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1364. Made USER_AGENT const. Made "/" static const std::string.
  1365. * src/A2STR.cc
  1366. * src/A2STR.h
  1367. * src/HttpRequest.cc
  1368. * src/HttpRequest.h
  1369. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1370. Made string listeral to static const std::string:
  1371. "Content-Range", "Content-Length"
  1372. * src/HttpHeader.cc
  1373. * src/HttpHeader.h
  1374. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1375. Made string listeral to static const std::string.
  1376. * src/HttpConnection.cc
  1377. * src/HttpHeader.cc
  1378. * src/HttpHeader.h
  1379. * src/HttpResponse.cc
  1380. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1381. Made string listeral to static const std::string.
  1382. * src/A2STR.cc
  1383. * src/A2STR.h
  1384. * src/SimpleLogger.cc
  1385. * src/SimpleLogger.h
  1386. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1387. Made string literal to static const std::string.
  1388. Rewritten CookieParser::setField.
  1389. * src/A2STR.cc
  1390. * src/A2STR.h
  1391. * src/CookieBoxFactory.cc
  1392. * src/CookieBoxFactory.h
  1393. * src/CookieParser.cc
  1394. * src/CookieParser.h
  1395. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1396. Made string literal to static const std::string
  1397. * src/DHTAbstractMessage.cc
  1398. * src/DHTAnnouncePeerMessage.cc
  1399. * src/DHTAnnouncePeerMessage.h
  1400. * src/DHTAnnouncePeerReplyMessage.cc
  1401. * src/DHTAnnouncePeerReplyMessage.h
  1402. * src/DHTFindNodeMessage.cc
  1403. * src/DHTFindNodeMessage.h
  1404. * src/DHTFindNodeReplyMessage.cc
  1405. * src/DHTFindNodeReplyMessage.h
  1406. * src/DHTGetPeersMessage.cc
  1407. * src/DHTGetPeersMessage.h
  1408. * src/DHTGetPeersReplyMessage.cc
  1409. * src/DHTGetPeersReplyMessage.h
  1410. * src/DHTMessage.cc
  1411. * src/DHTMessage.h
  1412. * src/DHTMessageFactoryImpl.cc
  1413. * src/DHTMessageReceiver.cc
  1414. * src/DHTPingMessage.cc
  1415. * src/DHTPingMessage.h
  1416. * src/DHTPingReplyMessage.cc
  1417. * src/DHTPingReplyMessage.h
  1418. * src/DHTQueryMessage.cc
  1419. * src/DHTQueryMessage.h
  1420. * src/DHTResponseMessage.cc
  1421. * src/DHTResponseMessage.h
  1422. * src/DHTUnknownMessage.cc
  1423. * src/DHTUnknownMessage.h
  1424. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1425. Made string literal to static const std::string
  1426. * src/BtChokeMessage.cc (toString)
  1427. * src/BtHaveAllMessage.cc (toString)
  1428. * src/BtHaveNoneMessage.cc (toString)
  1429. * src/BtInterestedMessage.cc (toString)
  1430. * src/BtNotInterestedMessage.cc (toString)
  1431. * src/BtUnchokeMessage.cc (toString)
  1432. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1433. Replaced "" with static const variable A2STR::NIL.
  1434. Replaced string comparison against "" with std::string::empty().
  1435. Added PROTO_* to Request class and use them as a protocol string
  1436. constant.
  1437. Made "started", "stopped", "completed" static const variable in
  1438. AnnounceList class.
  1439. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1440. Updated translations. Great thanks to translators.
  1441. * po/ca.po
  1442. * po/de.po
  1443. * po/fr.po
  1444. * po/it.po
  1445. * po/ja.po
  1446. * po/ru.po
  1447. * po/zh_CN.po
  1448. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1449. Updated man page; categorized options and fixed typo.
  1450. * doc/aria2c.1.txt
  1451. * doc/aria2c.1.html
  1452. * doc/aria2c.1
  1453. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1454. Removed const ref
  1455. * src/MetalinkEntry.cc (AddProtocolPreference)
  1456. * src/RequestGroup.cc (FindServerHostByHostname)
  1457. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1458. Rewritten Accept-Features handling.
  1459. * src/HttpRequestCommand.cc (createHttpRequest)
  1460. * src/a2functional.h
  1461. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1462. Changed method signature:
  1463. DHTAbstractNodeLookupTask::toEntries
  1464. * src/DHTAbstractNodeLookupTask.cc
  1465. * src/DHTAbstractNodeLookupTask.h
  1466. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1467. Changed method signature:
  1468. BtContext::computeFastSet, DefaultBtContext::extractUrlList
  1469. * src/BtContext.h
  1470. * src/DefaultBtContext.cc
  1471. * src/DefaultBtContext.h
  1472. * src/DefaultBtInteractive.cc
  1473. * test/DefaultBtContextTest.cc
  1474. * test/MockBtContext.h
  1475. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1476. Changed method signature:
  1477. MultiFileAllocationIterator::makeDiskWriterEntries
  1478. * src/MultiFileAllocationIterator.cc
  1479. * src/MultiFileAllocationIterator.h
  1480. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1481. Changed method sinature:
  1482. MetalinkEntry::toFileEntry,
  1483. MetalinkHelper::query, MetalinkHelper::parseAndQuery,
  1484. Metalinker::queryEntry
  1485. * src/Metalink2RequestGroup.cc
  1486. * src/MetalinkEntry.cc
  1487. * src/MetalinkEntry.h
  1488. * src/MetalinkHelper.cc
  1489. * src/MetalinkHelper.h
  1490. * src/Metalinker.cc
  1491. * src/Metalinker.h
  1492. * src/main.cc
  1493. * test/MetalinkHelperTest.cc
  1494. * test/MetalinkerTest.cc
  1495. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1496. Changed method sinature:
  1497. RequestGroup::getURIs
  1498. * src/RequestGroup.cc
  1499. * src/RequestGroup.h
  1500. * test/Metalink2RequestGroupTest.cc
  1501. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1502. Changed method signature:
  1503. PeerListProcessor::extractPeer
  1504. * src/CompactPeerListProcessor.cc
  1505. * src/CompactPeerListProcessor.h
  1506. * src/DefaultBtAnnounce.cc
  1507. * src/DefaultPeerListProcessor.cc
  1508. * src/DefaultPeerListProcessor.h
  1509. * src/DelegatingPeerListProcessor.cc
  1510. * src/DelegatingPeerListProcessor.h
  1511. * src/PeerListProcessor.h
  1512. * src/UTPexExtensionMessage.cc
  1513. * test/DefaultPeerListProcessorTest.cc
  1514. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1515. Changed method signature:
  1516. BtRequestFactory::createRequestMessages,
  1517. BtRequestFactory::createRequestMessagesOnEndGame
  1518. * src/BtRequestFactory.h
  1519. * src/DefaultBtInteractive.cc
  1520. * src/DefaultBtRequestFactory.cc
  1521. * src/DefaultBtRequestFactory.h
  1522. * test/DefaultBtRequestFactoryTest.cc
  1523. * test/MockBtRequestFactory.h
  1524. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1525. Changed method signature:
  1526. PieceStorage::getInFlightPieces
  1527. * src/DefaultBtProgressInfoFile.cc
  1528. * src/DefaultPieceStorage.cc
  1529. * src/DefaultPieceStorage.h
  1530. * src/PieceStorage.h
  1531. * src/UnknownLengthPieceStorage.cc
  1532. * src/UnknownLengthPieceStorage.h
  1533. * test/DefaultBtProgressInfoFileTest.cc
  1534. * test/MockPieceStorage.h
  1535. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1536. Changed method signature:
  1537. PostDownloadHandler::getNextRequestGroups
  1538. Metalink2RequestGroup::generate
  1539. RequestGroup::postDownloadProcessing
  1540. * src/BtPostDownloadHandler.cc
  1541. * src/BtPostDownloadHandler.h
  1542. * src/Metalink2RequestGroup.cc
  1543. * src/Metalink2RequestGroup.h
  1544. * src/MetalinkPostDownloadHandler.cc
  1545. * src/MetalinkPostDownloadHandler.h
  1546. * src/PostDownloadHandler.h
  1547. * src/RequestGroup.cc
  1548. * src/RequestGroup.h
  1549. * src/RequestGroupMan.cc
  1550. * src/main.cc
  1551. * test/BtPostDownloadHandlerTest.cc
  1552. * test/Metalink2RequestGroupTest.cc
  1553. * test/MetalinkPostDownloadHandlerTest.cc
  1554. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1555. Rewritten AccRequestGroup
  1556. * src/main.cc
  1557. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1558. Rewritten.
  1559. * src/TaggedItem.cc (toTagString)
  1560. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1561. Rewritten Accept-Features handling.
  1562. * src/HttpRequestCommand.cc (createHttpRequest)
  1563. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1564. Rewritten accept types handling.
  1565. * HttpRequest.cc (createRequest)
  1566. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1567. Rewritten
  1568. * src/FeatureConfig.cc (featureSummary)
  1569. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1570. Changed method signature:
  1571. PeerStorage::getActivePeers
  1572. * src/DHTPeerAnnounceEntry.cc
  1573. * src/DefaultPeerStorage.cc
  1574. * src/DefaultPeerStorage.h
  1575. * src/PeerStorage.h
  1576. * test/DefaultPeerStorageTest.cc
  1577. * test/MockPeerStorage.h
  1578. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1579. Changed method signature:
  1580. DHTPeerAnnounceStorage::getPeers,
  1581. DHTPeerAnnounceEntry::getPeers
  1582. * src/DHTGetPeersMessage.cc
  1583. * src/DHTPeerAnnounceEntry.cc
  1584. * src/DHTPeerAnnounceEntry.h
  1585. * src/DHTPeerAnnounceStorage.cc
  1586. * src/DHTPeerAnnounceStorage.h
  1587. * test/DHTAnnouncePeerMessageTest.cc
  1588. * test/DHTPeerAnnounceEntryTest.cc
  1589. * test/DHTPeerAnnounceStorageTest.cc
  1590. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1591. Changed method signature:
  1592. NameResolver::resolve
  1593. * src/DHTEntryPointNameResolveCommand.cc
  1594. * src/InitiateConnectionCommand.cc
  1595. * src/NameResolver.cc
  1596. * src/NameResolver.h
  1597. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1598. Changed method signature:
  1599. PieceStorage::getAdvertisedPieceIndexes
  1600. * src/DefaultBtInteractive.cc
  1601. * src/DefaultPieceStorage.cc
  1602. * src/DefaultPieceStorage.h
  1603. * src/PieceStorage.h
  1604. * src/UnknownLengthPieceStorage.h
  1605. * test/MockPieceStorage.h
  1606. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1607. Changed method signature:
  1608. SegmentMan::getInFlightSegment
  1609. * src/AbstractCommand.cc
  1610. * src/SegmentMan.cc
  1611. * src/SegmentMan.h
  1612. * test/SegmentManTest.cc
  1613. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1614. Changed method signature:
  1615. DHTAbstractNodeLookupTask::getNodesFromMessage
  1616. * src/DHTAbstractNodeLookupTask.cc
  1617. * src/DHTAbstractNodeLookupTask.h
  1618. * src/DHTNodeLookupTask.cc
  1619. * src/DHTNodeLookupTask.h
  1620. * src/DHTPeerLookupTask.cc
  1621. * src/DHTPeerLookupTask.h
  1622. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1623. Pass std::deque<Command*> by reference to avoid unnecessary coping.
  1624. * src/AbstractCommand.cc
  1625. * src/BtCheckIntegrityEntry.cc
  1626. * src/BtCheckIntegrityEntry.h
  1627. * src/BtFileAllocationEntry.cc
  1628. * src/BtFileAllocationEntry.h
  1629. * src/BtSetup.cc
  1630. * src/BtSetup.h
  1631. * src/CheckIntegrityCommand.cc
  1632. * src/CheckIntegrityEntry.h
  1633. * src/ChecksumCheckIntegrityEntry.cc
  1634. * src/ChecksumCheckIntegrityEntry.h
  1635. * src/DHTSetup.cc
  1636. * src/DHTSetup.h
  1637. * src/DownloadEngine.cc
  1638. * src/FileAllocationCommand.cc
  1639. * src/FileAllocationEntry.h
  1640. * src/RequestGroup.cc
  1641. * src/RequestGroup.h
  1642. * src/RequestGroupMan.cc
  1643. * src/RequestGroupMan.h
  1644. * src/StreamCheckIntegrityEntry.cc
  1645. * src/StreamCheckIntegrityEntry.h
  1646. * src/StreamFileAllocationEntry.cc
  1647. * src/StreamFileAllocationEntry.h
  1648. * src/TrackerWatcherCommand.cc
  1649. * src/a2functional.h
  1650. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1651. Changed method signature:
  1652. BNode::findClosestKNodes, BNode:: enumerateBucket,
  1653. DHTBucket::getGoodNodes,
  1654. DHTRoutingTable::getClosestKNodes, DHTRoutingTable::getBuckets
  1655. * src/BNode.cc
  1656. * src/BNode.h
  1657. * src/DHTAbstractNodeLookupTask.cc
  1658. * src/DHTAutoSaveCommand.cc
  1659. * src/DHTBucket.cc
  1660. * src/DHTBucket.h
  1661. * src/DHTBucketRefreshTask.cc
  1662. * src/DHTFindNodeMessage.cc
  1663. * src/DHTGetPeersMessage.cc
  1664. * src/DHTRoutingTable.cc
  1665. * src/DHTRoutingTable.h
  1666. * test/BNodeTest.cc
  1667. * test/DHTBucketTest.cc
  1668. * test/DHTRoutingTableTest.cc
  1669. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1670. In piece selection functions, Pass std::deque<...> by reference rather
  1671. than returning it.
  1672. * src/BitfieldMan.cc
  1673. * src/BitfieldMan.h
  1674. * src/DefaultBtRequestFactory.cc
  1675. * src/DefaultPieceStorage.cc
  1676. * src/Piece.cc
  1677. * src/Piece.h
  1678. * test/BitfieldManTest.cc
  1679. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1680. Implemented rarest piece first piece selection strategy.
  1681. * src/AbstractBtMessage.cc
  1682. * src/AbstractBtMessage.h
  1683. * src/BitfieldMan.cc
  1684. * src/BitfieldMan.h
  1685. * src/BtBitfieldMessage.cc
  1686. * src/BtHaveAllMessage.cc
  1687. * src/BtHaveMessage.cc
  1688. * src/DefaultPieceStorage.cc
  1689. * src/DefaultPieceStorage.h
  1690. * src/PeerInteractionCommand.cc
  1691. * src/PieceStorage.h
  1692. * src/UnknownLengthPieceStorage.h
  1693. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1694. Rewritten readData and writeData.
  1695. * src/MultiDiskAdaptor.cc
  1696. * src/MultiDiskAdaptor.h
  1697. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1698. Move \n out of the message "Usage: ...".
  1699. * src/version_usage.cc
  1700. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1701. Bump up version number to 0.13.2b.
  1702. * configure.ac
  1703. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1704. Added const qualifier to argument Exception& e.
  1705. * src/Logger.h
  1706. * src/SimpleLogger.cc
  1707. * src/SimpleLogger.h
  1708. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1709. Pool connection when CWD, SIZE command fails.
  1710. * src/FtpNegotiationCommand.cc
  1711. * src/FtpNegotiationCommand.h
  1712. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1713. Renamed HttpNullDownloadCommand as HttpSkipResponseCommand
  1714. * src/HttpResponseCommand.cc
  1715. * src/HttpSkipResponseCommand.cc
  1716. * src/HttpSkipResponseCommand.h
  1717. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1718. Pool connection when a server returns 4xx, 5xx responses.
  1719. * src/HttpNullDownloadCommand.cc
  1720. * src/HttpNullDownloadCommand.h
  1721. * src/HttpResponse.cc
  1722. * src/HttpResponse.h
  1723. * src/HttpResponseCommand.cc
  1724. * src/HttpResponseCommand.h
  1725. * test/HttpResponseTest.cc
  1726. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1727. Print usage when no URL is specifed or bad command-line option is
  1728. specified.
  1729. * src/HelpItemFactory.cc
  1730. * src/help_tags.h
  1731. * src/option_processing.cc
  1732. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1733. Removed duplicate log message.
  1734. * src/AbstractCommand.cc (asyncResolveHostname)
  1735. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1736. Updated man page: --async-dns and --ftp-reuse-connection were added.
  1737. Changed -j option's default value from 5 to 1.
  1738. Added new examples using protocol auto detection feature.
  1739. Removed -T, -M usage where it can be omitted.
  1740. * doc/aria2c.1.txt
  1741. * doc/aria2c.1.html
  1742. * doc/aria2c.1.txt
  1743. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1744. Updated command-line usage text, so that it tells users that they
  1745. can specify any number of torrent files and metalink files in
  1746. command-line.
  1747. * src/version_usage.cc
  1748. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1749. Changed the default value of -j option to 1.
  1750. * src/HelpItemFactory.cc
  1751. * src/option_processing.cc
  1752. * src/usage_text.h
  1753. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1754. Added the ability to reuse connection in FTP and it is enabled by
  1755. default. It can be disabled by --ftp-reuse-connection=false option.
  1756. * src/Command.cc
  1757. * src/DownloadCommand.cc
  1758. * src/FtpDownloadCommand.cc
  1759. * src/FtpDownloadCommand.h
  1760. * src/FtpFinishDownloadCommand.cc
  1761. * src/FtpFinishDownloadCommand.h
  1762. * src/FtpInitiateConnectionCommand.cc
  1763. * src/FtpNegotiationCommand.cc
  1764. * src/FtpNegotiationCommand.h
  1765. * src/HelpItemFactory.cc
  1766. * src/Makefile.am
  1767. * src/Makefile.in
  1768. * src/OptionHandlerFactory.cc
  1769. * src/option_processing.cc
  1770. * src/prefs.h
  1771. * src/usage_text.h
  1772. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1773. Call Command::transitStatus() before calling Command::execute(),
  1774. so that the status change made in execute() is not cleared.
  1775. * src/DownloadEngine.cc
  1776. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1777. Removed forward declaration of SocketCore class.
  1778. * src/HttpDownloadCommand.h
  1779. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1780. Set Request::setKeepAliveHint() and Request::setPipeliningHint()
  1781. in InitiateConnectionCommandFactory. They should be set only when
  1782. the protocol is HTTP or HTTPS.
  1783. * src/InitiateConnectionCommandFactory.cc
  1784. * src/RequestGroup.cc
  1785. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1786. Fixed infinite loop in checksum checking.
  1787. * src/IteratableChecksumValidator.cc
  1788. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1789. Set _supportsPersistentConnection to true by default.
  1790. * src/Request.cc
  1791. * src/RequestGroup.cc
  1792. * test/HttpRequestTest.cc
  1793. * test/RequestTest.cc
  1794. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1795. Added timeout to socket pool. The default timeout is 15 seconds,
  1796. which is the same value Apache uses.
  1797. * src/DownloadEngine.cc
  1798. * src/DownloadEngine.h
  1799. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1800. Fixed misuse of multimap::find()
  1801. * src/HttpHeader.cc
  1802. * test/HttpHeaderTest.cc
  1803. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1804. Rewritten name resolver. Now async DNS can be disabled by --async-dns
  1805. option.
  1806. The asynchronous DNS is not capable of IPv6 yet.
  1807. By disabling asynchronous DNS, aria2 is IPv6 enabled application, at
  1808. least for HTTP download.
  1809. * src/AbstractCommand.cc
  1810. * src/AbstractCommand.h
  1811. * src/AsyncNameResolver.cc
  1812. * src/AsyncNameResolver.h
  1813. * src/DHTEntryPointNameResolveCommand.cc
  1814. * src/DHTEntryPointNameResolveCommand.h
  1815. * src/DownloadEngine.cc
  1816. * src/DownloadEngine.h
  1817. * src/FtpInitiateConnectionCommand.cc
  1818. * src/FtpInitiateConnectionCommand.h
  1819. * src/HelpItemFactory.cc
  1820. * src/HttpInitiateConnectionCommand.cc
  1821. * src/HttpInitiateConnectionCommand.h
  1822. * src/InitiateConnectionCommand.cc
  1823. * src/InitiateConnectionCommand.h
  1824. * src/Makefile.am
  1825. * src/Makefile.in
  1826. * src/NameResolver.cc
  1827. * src/NameResolver.h
  1828. * src/OptionHandlerFactory.cc
  1829. * src/SocketCore.cc
  1830. * src/SocketCore.h
  1831. * src/Util.cc
  1832. * src/Util.h
  1833. * src/option_processing.cc
  1834. * src/prefs.h
  1835. * src/usage_text.h
  1836. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1837. Updated man page: --quiet, --header were added.
  1838. --metalink-servers and --enable-http-keep-alive option were updated.
  1839. * doc/aria2c.1
  1840. * doc/aria2c.1.html
  1841. * doc/aria2c.1.txt
  1842. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1843. Enable HTTP keep-alive by default.
  1844. * src/HelpItemFactory.cc
  1845. * src/option_processing.cc
  1846. * src/usage_text.h
  1847. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1848. Disable http keep-alive if the remote server is not HTTP/1.1.
  1849. * src/HttpConnection.cc
  1850. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1851. Receive content body of 302 response so that the connection can be
  1852. reused later when http keep-alive is enabled.
  1853. * src/HttpNullDownloadCommand.cc
  1854. * src/HttpNullDownloadCommand.h
  1855. * src/HttpResponseCommand.cc
  1856. * src/HttpResponseCommand.h
  1857. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1858. const SharedHandle<Request> -> const SharedHandle<Request>&
  1859. * src/FtpDowndloadCommand.cc
  1860. * src/FtpDowndloadCommand.h
  1861. * src/HttpDownloadCommand.cc
  1862. * src/HttpDownloadCommand.h
  1863. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1864. Fixed the bug that the control file(.aria2 file) is not renamed
  1865. according to tryAutoFileRenaming().
  1866. tryAutoFileRenaming() was rewritten so that if both renamed file and
  1867. its control file exist, use them and continue download.
  1868. The old implementation didn't take into account of control file's
  1869. existence, so basically you couldn't continue download of renamed file.
  1870. * src/BtProgressInfoFile.h
  1871. * src/DefaultBtProgressInfoFile.cc
  1872. * src/DefaultBtProgressInfoFile.h
  1873. * src/NullProgressInfoFile.h
  1874. * src/RequestGroup.cc
  1875. * test/DefaultBtProgressInfoFileTest.cc
  1876. * test/MockBtProgressInfoFile.h
  1877. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1878. Change the default value of --metalink-servers option from `5' to `1'.
  1879. * src/HelpItemFactory.cc
  1880. * src/option_processing.cc
  1881. * src/usage_text.h
  1882. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1883. Reimplemented transparent metalink using Accept request header.
  1884. * src/HttpRequest.cc
  1885. * src/HttpRequest.h
  1886. * src/HttpRequestCommand.cc
  1887. * src/Metalink2RequestGroup.cc
  1888. * src/RequestGroup.cc
  1889. * src/RequestGroup.h
  1890. * test/HttpRequestTest.cc
  1891. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1892. Bump up version number to 0.13.2a
  1893. * configure.ac
  1894. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1895. Updated configure.ac using the result of autoscan.
  1896. * configure.ac
  1897. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1898. Fixed compilation error without gcrypt/openssl.
  1899. * src/DownloadCommand.cc
  1900. * src/DownloadCommand.h
  1901. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1902. Reorganized version information so that it can be displayed in a
  1903. standard terminal screen without scrolling.
  1904. Removed http, ftp from Configuration section, because they are always
  1905. enabled.
  1906. * src/FeatureConfig.cc
  1907. * src/FeatureConfig.h
  1908. * src/main.cc
  1909. * src/messageDigest.cc
  1910. * src/messageDigest.h
  1911. * src/version_usage.cc
  1912. * test/FeatureConfigTest.cc
  1913. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1914. Masked user ID in log.
  1915. * src/FtpConnection.cc (sendUser)
  1916. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1917. Removed query part from filename in HTTP download. The query part means
  1918. the substring after "?" in URL. Firefox seems do the same thing.
  1919. A query part is sometimes very long and not suitable to filename,
  1920. so I think it is better to remove it from filename.
  1921. * src/HttpRequest.cc
  1922. * src/HttpRequest.h
  1923. * src/Request.cc
  1924. * src/Request.h
  1925. * test/HttpRequestTest.cc
  1926. * test/RequestTest.cc
  1927. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1928. Rewritten Exception class. Throw exception object, not its pointer and
  1929. catch by reference, so that remove problematic delete operator for
  1930. catched exception.
  1931. * src/Exception.cc
  1932. * src/Exception.h
  1933. * test/ExceptionTest.cc
  1934. * src/*: All files throwing/catching exception.
  1935. * test/*: All files throwing/catching exception.
  1936. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1937. Now auto protocol detection is enabled without -Z option.
  1938. But there is a important difference between with/without -Z optoin.
  1939. For example, if you type:
  1940. aria2c http://host/file file1.torrent file2.metalink http://mirror/file
  1941. then, aria2 interprets there are 3 request groups:
  1942. (1) http://host/file, http://mirror/file <-- multi-source download
  1943. (2) file1.torrent
  1944. (3) file2.metalink
  1945. On the other hand, if you invoke above command with -Z option, it is
  1946. interpreted as 4 request groups:
  1947. (1) http://host/file
  1948. (2) file1.torrent
  1949. (3) file2.metalink
  1950. (4) http://mirror/file
  1951. I think usually user don't mix multi-source URLs and torrent files, so
  1952. there is no big problem here.
  1953. * src/main.cc
  1954. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1955. Fixed the bug that causes segmentaion fault when reading XML containing
  1956. unescapsed character like '&'.
  1957. Also a modification was made which avoids adding unnecessary
  1958. characters stack and appending unused string.
  1959. * src/ExpatMetalinkProcessor.cc
  1960. * src/FileMetalinkParserState.h
  1961. * src/FilesMetalinkParserState.h
  1962. * src/FinMetalinkParserState.h
  1963. * src/HashMetalinkParserState.h
  1964. * src/InitialMetalinkParserState.h
  1965. * src/LanguageMetalinkParserState.h
  1966. * src/MetalinkMetalinkParserState.h
  1967. * src/MetalinkParserState.h
  1968. * src/MetalinkParserStateMachine.cc
  1969. * src/MetalinkParserStateMachine.h
  1970. * src/OSMetalinkParserState.h
  1971. * src/PieceHashMetalinkParserState.h
  1972. * src/PiecesMetalinkParserState.h
  1973. * src/ResourcesMetalinkParserState.h
  1974. * src/SizeMetalinkParserState.h
  1975. * src/SkipTagMetalinkParserState.h
  1976. * src/URLMetalinkParserState.h
  1977. * src/VerificationMetalinkParserState.h
  1978. * src/VersionMetalinkParserState.h
  1979. * src/XML2SAXMetalinkProcessor.cc
  1980. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1981. Added StringFormat class, which internally calls vasprintf.
  1982. operator<< is defined for this class, so it can be used with iostream
  1983. classes nicely. SimpleLogger and following functions are rewritten
  1984. using StringFormat class.
  1985. Besides, now Logger class's methods are non-const, many classes
  1986. that has a const Logger* as a member variable are modified to remove
  1987. const qualifier from the variable declaration.
  1988. * src/HelpItemFactory.cc
  1989. * src/Request.cc
  1990. * src/SimpleLogger.cc
  1991. * src/StringFormat.cc
  1992. * src/StringFormat.h
  1993. * src/Util.cc
  1994. * src/option_processing.cc
  1995. * src/version_usage.cc
  1996. * test/StringFormatTest.cc
  1997. * src/*.h: The classes that has const Logger* as a member variable.
  1998. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1999. Log error in AccRequestGroup when reading BitTorrent/Metalink file is
  2000. failed. Also fixed memory link when exception is thrown there.
  2001. * src/main.cc (AccRequestGroup)
  2002. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2003. Added build-in "Accept-Features" support. For now only "metalink" is
  2004. used in this header field.
  2005. This "metalink" value is removed from the list when connecting URLs
  2006. fed by metalink file to avoid loop in "transparent" metlaink.
  2007. * src/HttpRequest.cc
  2008. * src/HttpRequest.h: Renamed _userHeaders as _headers. Accept-Features
  2009. header is also held in this variable. Also renamed setUserHeaders as
  2010. addHeader and it was rewritten to add header not just to clear the old
  2011. value.
  2012. * src/HttpRequestCommand.cc
  2013. * src/Metalink2RequestGroup.cc: Added the code to remove "metalink"
  2014. from "Accept-Features" list.
  2015. * src/RequestGroup.cc: Added "metalink" to "Accept-Features" by
  2016. default.
  2017. * src/RequestGroup.h
  2018. * src/TaggedItem.cc: Moved Concat class to a2functional.h.
  2019. * src/a2functional.h: Included <string> because Concat class depends on
  2020. it.
  2021. * test/HttpRequestTest.cc
  2022. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2023. Added comment
  2024. * src/RequestGroup.cc (createNextCommand)
  2025. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2026. Capitalized METHOD_GET and METHOD_HEAD
  2027. * src/Request.cc
  2028. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2029. Added getDownloadResults() method
  2030. * src/RequestGroupMan.cc
  2031. * src/RequestGroupMan.h
  2032. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2033. Fixed the bug that aria2 exits when commands is empty() but
  2034. _routineCommands are not.
  2035. * src/DownloadEngine.cc
  2036. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2037. Use the default value pulled from Option object in HelpItemFactory.
  2038. except options whose defualt value is embedded in a usage text.
  2039. * src/HelpItemFactory.cc
  2040. * src/HelpItemFactory.h
  2041. * src/option_processing.cc
  2042. * src/version_usage.cc
  2043. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2044. Added --quiet option to make aria2 quiet (no console output).
  2045. --quiet option is tagged with ADVANCED.
  2046. * src/HelpItemFactory.cc
  2047. * src/LogFactory.cc
  2048. * src/LogFactory.h
  2049. * src/MultiUrlRequestInfo.cc
  2050. * src/MultiUrlRequestInfo.h
  2051. * src/NullStatCalc.h: New class. This class prints nothing.
  2052. * src/OptionHandlerFactory.cc
  2053. * src/main.cc
  2054. * src/option_processing.cc
  2055. * src/prefs.h
  2056. * src/usage_text.h
  2057. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2058. Add HTTP tag to --header option. Removed ADVANCED tag instead.
  2059. * src/HelpItemFactory.cc (createHelpItems):
  2060. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2061. Fixed compilation error in ExpatMetalinkProcessor.cc
  2062. * src/ExpatMetalinkProcessor.cc
  2063. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2064. Reuse socket if the origin server supports HTTP keep-alive and
  2065. --enable-http-keep-alive or --enable-http-pipelining is given.
  2066. The current implementation doesn't reuse the connections established
  2067. against proxy server.
  2068. * src/AbstractCommand.cc
  2069. * src/DownloadEngine.cc
  2070. * src/DownloadEngine.h
  2071. * src/HttpDownloadCommand.cc
  2072. * src/HttpInitiateConnectionCommand.cc
  2073. * src/HttpResponseCommand.cc
  2074. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2075. Rewritten HTTP keep-alive and pipelining routine.
  2076. * src/AbstractCommand.cc
  2077. * src/HttpConnection.cc
  2078. * src/HttpDownloadCommand.cc
  2079. * src/HttpRequest.cc
  2080. * src/HttpRequestCommand.cc
  2081. * src/HttpResponseCommand.cc
  2082. * src/Request.cc
  2083. * src/Request.h
  2084. * src/RequestGroup.cc
  2085. * test/HttpRequestTest.cc
  2086. * test/HttpResponseTest.cc
  2087. * test/RequestTest.cc
  2088. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2089. Added missing setUserHeaders call
  2090. * src/HttpRequestCommand.cc
  2091. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2092. Call FileAllocationMan::nextFileAllocationEntryExists() first.
  2093. Calling FileAllocationMan::isFileAllocationBeingExecuted() is somwhat
  2094. waste of time because it is more likey false.
  2095. * src/FileAllocationDispatcherCommand.cc (execute)
  2096. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2097. Now HTTP status and version are a member variable of HttpHeader.
  2098. HTTP status is processed as a string, not integer.
  2099. * src/AbstractProxyResponseCommand.cc
  2100. * src/HttpConnection.cc
  2101. * src/HttpHeader.cc
  2102. * src/HttpHeader.h
  2103. * src/HttpHeaderProcessor.cc
  2104. * src/HttpHeaderProcessor.h
  2105. * src/HttpResponse.cc
  2106. * src/HttpResponse.h
  2107. * test/HttpHeaderProcessorTest.cc
  2108. * test/HttpResponseTest.cc
  2109. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2110. Added --header option. You can specify any number of additional HTTP headers
  2111. like:
  2112. aria2 --header="X-A: 300" --header="X-B: 900" http://host/file
  2113. Unlike other commad-line option, you can use --header option multiple times.
  2114. * src/HelpItemFactory.cc
  2115. * src/HttpRequest.{cc, h}
  2116. * src/HttpRequestCommand.cc
  2117. * src/OptionHandlerFactory.cc
  2118. * src/OptionHandlerImpl.h
  2119. * src/option_processing.cc
  2120. * src/prefs.h
  2121. * src/usage_text.h
  2122. * test/HttpRequestTest.cc (testUserHeaders)
  2123. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2124. Eliminates the time lag between sequential downloads and commands in
  2125. the same RequestGroup.
  2126. In old implementation, aria2 occasionally waits 1 seconds before
  2127. executing next command or RequestGroup.
  2128. This is really a waste of time, and new implementation eliminates
  2129. this unnecessary time lag.
  2130. * src/AbstractCommand.cc
  2131. * src/AutoSaveCommand.cc
  2132. * src/CheckIntegrityCommand.cc
  2133. * src/Command.{cc, h}
  2134. * src/DownloadEngine.{cc, h}
  2135. * src/DownloadEngineFactory.cc
  2136. * src/FileAllocationCommand.cc
  2137. * src/FileAllocationDispatcherCommand.cc
  2138. * src/FillRequestGroupCommand.cc
  2139. * src/FtpInitiateConnectionCommand.cc
  2140. * src/HaveEraseCommand.cc
  2141. * src/HttpInitiateConnectionCommand.cc
  2142. * src/HttpResponseCommand.cc
  2143. * src/RealtimeCommand.cc
  2144. * src/RequestGroup.cc
  2145. * src/RequestGroupMan.cc
  2146. * src/StreamFileAllocationEntry.cc
  2147. * src/TimeBasedCommand.{cc, h}
  2148. * src/TimedHaltCommand.cc
  2149. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2150. Rewritten SharedHandle. Now copy constructor taking raw pointer has
  2151. keyword explicit and SharedHandle's default constructor initializes
  2152. its internal obj to null, old implementation initializes it using
  2153. obj's default constructor.
  2154. To assign null, write SharedHandle<T> x(...); x.reset();
  2155. TODO: test/SharedHandleTest.cc needs more tests.
  2156. * src/SharedHandle.h
  2157. 2008-04-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2158. Fixed type in man page.
  2159. * doc/aria2c.1.txt
  2160. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2161. Merged Ross's 0.13.1+1 Cygwin compile fix patch.
  2162. * src/SimpleLogger.{cc, h}
  2163. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2164. Implemented auto protocol detection.
  2165. Now you can do:
  2166. aria2c -Z http://host/file file1.torrent file2.metalink
  2167. (Note: -Z option is required for auto protcol detection.)
  2168. Then aria2c downloads 3 files simultaneously:
  2169. 1. http://host/file
  2170. 2. file1.torrent <-- read local torrent file
  2171. 3. file2.metalink <-- read local Metalink file.
  2172. Same thing goes with -i option. Assume your uris.txt contans:
  2173. http://host/file
  2174. file1.torrent
  2175. file2.metalink
  2176. Then you can do: aria2c -i uris.txt
  2177. (Note: -Z option is not needed if -i option is given.)
  2178. * src/main.cc
  2179. * src/ProtocolDetector.{cc, h}
  2180. * test/ProtocolDetectorTest.cc
  2181. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2182. Fixed compile error without gnutls/libgcrypt/libgpg-error and openSSL
  2183. installed
  2184. * src/ARC4Encryptor.h
  2185. * src/ARC4Decryptor.h
  2186. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2187. Renamed argument from 'errno' to 'err', since errno is confused with
  2188. errno defined in errno.h.
  2189. * src/LibgcryptARC4Decryptor.h
  2190. * src/LibgcryptARC4Context.h
  2191. * src/LibgcryptDHKeyExchange.h
  2192. * src/LibgcryptARC4Encryptor.h
  2193. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2194. Rewritten choking algorithm.
  2195. * src/PeerChokeCommand.{cc, h}
  2196. * src/BtInterestedMessage.cc
  2197. * src/PeerSessionResource.{cc, h}
  2198. * src/DefaultPeerStorage.{cc, h}
  2199. * src/BtNotInterestedMessage.cc
  2200. * src/DefaultBtMessageDispatcher.{cc, h}
  2201. * src/BtMessageDispatcher.h
  2202. * src/Peer.{cc, h}
  2203. * src/BtLeecherStateChoke.{cc, h}
  2204. * src/BtSetup.cc
  2205. * src/BtSeederStateChoke.{cc, h}
  2206. * src/PeerStorage.h
  2207. * test/MockPeerStorage.h
  2208. * test/MockBtMessageDispatcher.h
  2209. 2008-04-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2210. Fixed compilation error on x84-64 platform.
  2211. * src/AuthConfig.cc: Included ostream.
  2212. 2008-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2213. Rewritten getBasename() and getDirname(), without standard library
  2214. basename(), dirname().
  2215. * src/File.cc
  2216. * test/FileTest.cc
  2217. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2218. Added Simplified Chinese translation. Also updated the following
  2219. translations: Polish, Dutch, German. Great thanks to all translators.
  2220. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2221. Suppress content-range error when 'Content-Range' response header
  2222. doesn't contains bytes-unit specifier 'bytes'
  2223. * src/HttpHeader.cc (getRange)
  2224. * test/HttpHeaderTest.cc
  2225. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2226. Fixed compilation error with g++-4.3
  2227. 2008-03-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2228. Added missing include files for MinGW
  2229. * test/HttpHeaderProcessorTest.cc
  2230. * test/DHTRoutingTableSerializerTest.cc
  2231. * test/DHTRoutingTableDeserializerTest.cc
  2232. * test/UriListParserTest.cc
  2233. 2008-03-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2234. Now download line is printed nicely with no garbage at the end of
  2235. line. I use ioctl to get the columns of terminal.
  2236. If stdout is redirected to another device, instead of carriage return,
  2237. end of line '\n' character is used. This is feature request#1909659
  2238. * src/ConsoleStatCalc.cc (calculateStat)
  2239. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2240. Included a2time.h
  2241. * src/DHTMessageDispatcher.h
  2242. * src/DHTMessageEntry.h
  2243. * src/DHTReplaceNodeTask.h
  2244. * src/DHTMessageTracker.h
  2245. * src/Util.h
  2246. * src/CookieBox.h
  2247. * src/SocketCore.h
  2248. * src/DefaultBtMessageDispatcher.h
  2249. * src/SocketCore.cc
  2250. * src/Util.cc
  2251. * src/DHTPingTask.h
  2252. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2253. Fixed high memory footprint when DHT is enabled.
  2254. This is not a memory leak, but DHTReplaceNodeTask is more frequently
  2255. queued than it is processed and the queue is getting longer. As a
  2256. consequence, momory usage is increased.
  2257. As for a fix, instead of issuing DHTReplaceNodeTask, I've implemented
  2258. replacement cache in DHTBucket which is described in Kademlia paper.
  2259. * src/DHTRoutingTable.cc (addNode): Removed the issuing of
  2260. DHTReplaceNodeTask.
  2261. * src/DHTBucket.{h, cc}
  2262. (cacheNode): New function.
  2263. (getCachedNodes): New function.
  2264. (dropNode): Push back cached node to _nodes.
  2265. * test/DHTBucketTest.cc
  2266. (testCacheNode): New test
  2267. (testDropNode): New test
  2268. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2269. Allocate memory for peekBuf in initiateSecureConnection() to avoid
  2270. the unused 4KB memory when ssl is not used.
  2271. * src/SocketCore.cc
  2272. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2273. Added summary log for peer announce storage.
  2274. * src/DHTPeerAnnounceStorage.cc (handleTimeout)
  2275. Removed cast
  2276. * src/DefaultPeerStorage.cc (addPeer)
  2277. Log exception message
  2278. * src/DHTMessageTracker.cc (handleTimeout)
  2279. Fixed casting
  2280. * test/HttpRequestTest.cc
  2281. * test/MetalinkProcessorTest.cc
  2282. * test/PieceTest.cc
  2283. * test/MetalinkEntryTest.cc
  2284. * test/SequenceTest.cc
  2285. 2008-03-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2286. * src/ParameterizedStringParser.cc (createLoop):
  2287. Removed unused variable sstep.
  2288. * src/AlphaNumberDecorator.h (decode): Rewritten.
  2289. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2290. * src/Util.{h, cc}
  2291. (parseUInt): New function.
  2292. (alphaToNum): Now returns unsigned int and 0 when overflow detected.
  2293. The actual range is uint32_t.
  2294. * test/UtilTest.cc
  2295. * src/ParameterizedStringParser.cc:
  2296. Use Util::parseUInt() for loop variables.
  2297. * test/ParameterizedStringParserTest.cc
  2298. * src/PStringNumLoop.h: Make _startValue and _endValue unsigned int.
  2299. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2300. Rewritten the functions for binding port.
  2301. * src/DHTConnectionImpl.{h, cc}
  2302. * src/PeerListenCommand.{h, cc}
  2303. * src/DHTSetup.cc
  2304. * src/BtSetup.cc
  2305. * test/DHTConnectionImplTest.cc
  2306. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2307. type cleanup for allmost all remaining files.
  2308. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2309. Type clarification
  2310. * src/PeerSessionResource.{h, cc}
  2311. * src/DefaultPieceStorage.{h, cc}
  2312. * src/Peer.{h, cc}
  2313. * test/PeerSessionResourceTest.cc
  2314. Use div function
  2315. * src/BtPieceMessage.cc (erasePieceOnDisk)
  2316. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2317. Type clarification
  2318. * src/DefaultPeerStorage.{h, cc}
  2319. * test/DefaultPeerStorageTest.cc
  2320. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2321. Type clarification: size_t for length or size, uint64_t for file
  2322. length, off_t for file offset.
  2323. * src/DefaultBtProgressInfoFile.cc
  2324. * src/DefaultBtContext.{h, cc}
  2325. * src/DefaultBtInteractive.cc
  2326. * src/DownloadCommand.{h, cc}
  2327. * src/IteratableChunkChecksumValidator.{h, cc}
  2328. * src/SegmentMan.{h, cc}
  2329. * src/SingleFileDownloadContext.{h, cc}
  2330. * src/IteratableChecksumValidator.{h, cc}
  2331. * src/BtContext.h
  2332. * src/IteratableValidator.h
  2333. * src/DownloadContext.h
  2334. * test/SingleFileDownloadContextTest.cc
  2335. * test/DefaultBtContextTest.cc
  2336. * test/MockBtContext.h
  2337. * test/Metalink2RequestGroupTest.cc
  2338. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2339. Type clarification: size_t for length or size, uint64_t for file
  2340. length, off_t for file offset.
  2341. * src/PiecedSegment.cc
  2342. * src/GrowSegment.h
  2343. * src/DefaultBtRequestFactory.h
  2344. * src/DefaultBtProgressInfoFile.cc
  2345. * src/UnknownLengthPieceStorage.h
  2346. * src/DefaultPieceStorage.cc
  2347. * src/UnknownLengthPieceStorage.cc
  2348. * src/DefaultBtInteractive.cc
  2349. * src/GrowSegment.cc
  2350. * src/BitfieldMan.h
  2351. * src/DownloadCommand.cc
  2352. * src/BtRequestFactory.h
  2353. * src/PiecedSegment.h
  2354. * src/DefaultPieceStorage.h
  2355. * src/Piece.cc
  2356. * src/DefaultBtRequestFactory.cc
  2357. * src/PieceStorage.h
  2358. * src/Segment.h
  2359. * src/Piece.h
  2360. * src/BitfieldMan.cc
  2361. * src/Util.cc
  2362. * test/DefaultBtProgressInfoFileTest.cc
  2363. * test/DefaultPieceStorageTest.cc
  2364. * test/MockPieceStorage.h
  2365. * test/BtRequestMessageTest.cc
  2366. * test/DefaultBtMessageDispatcherTest.cc
  2367. * test/BitfieldManTest.cc
  2368. * test/GrowSegmentTest.cc
  2369. * test/PieceTest.cc
  2370. * test/SegmentTest.cc
  2371. * test/SegmentManTest.cc
  2372. * test/DefaultBtRequestFactoryTest.cc
  2373. * test/MockBtRequestFactory.h
  2374. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2375. Fixed compilation error with --disable-nls
  2376. It seems that defining gettext(Msgid) to ((const char *) (Msgid))
  2377. in gettext.h causes the problem.
  2378. * src/common.h
  2379. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2380. Removed subPiece related functions.
  2381. * src/Piece.{h, cc} : Also rewritten getCompletedLength().
  2382. * src/DefaultPieceStorage.{h, cc}
  2383. * test/PieceTest.cc
  2384. * test/DefaultPieceStorageTest.cc
  2385. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2386. Use unsigned char for data store.
  2387. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2388. Bump up version number to 0.13.0+1
  2389. * configure.ac
  2390. * Release 0.13.0+1
  2391. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2392. Changed inactive connection timeout to 120.
  2393. To accept more mulually interested peers, disconnect peer when there
  2394. is no interest between us after certain time passed.
  2395. * src/DefaultBtInteractive.cc (checkActiveInteraction)
  2396. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2397. Fixed the bug that aria2 only uses first dns server in resolv.conf
  2398. when compiled with async DNS support.
  2399. * src/DownloadEngine.cc
  2400. * src/option_processing.cc: Lengthened DNS timeout to 30. I think old
  2401. value '10' will be a little bit short when some DNS servers are
  2402. offline and several DNS servers are tried. It should be configured
  2403. by command-line option.
  2404. 2008-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2405. Merged Ross's mingw patch.
  2406. * src/DHTRoutingTableDeserializer.cc
  2407. * src/DHTRoutingTableSerializer.cc
  2408. * src/Platform.{h, cc}
  2409. * src/timegm.h
  2410. * src/gettimeofday.h
  2411. * src/getaddrinfo.h
  2412. * src/SocketCore.h
  2413. * src/common.h
  2414. * src/inet_aton.h
  2415. * src/DownloadEngine.h
  2416. * src/gai_strerror.h
  2417. * src/a2netcompat.h
  2418. * configure.ac
  2419. * configure
  2420. * aclocal.m4
  2421. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2422. Included missing iostream.
  2423. * test/AllTest.cc
  2424. * test/BtDependencyTest.cc
  2425. * test/BtExtendedMessageTest.cc
  2426. * test/DHTConnectionImplTest.cc
  2427. * test/DHTMessageFactoryImplTest.cc
  2428. * test/DHTMessageTrackerEntryTest.cc
  2429. * test/DHTNodeTest.cc
  2430. * test/DHTRoutingTableSerializerTest.cc
  2431. * test/DefaultBtAnnounceTest.cc
  2432. * test/DefaultBtContextTest.cc
  2433. * test/DefaultBtMessageFactoryTest.cc
  2434. * test/DefaultExtensionMessageFactoryTest.cc
  2435. * test/HandshakeExtensionMessageTest.cc
  2436. * test/HttpResponseTest.cc
  2437. * test/MetalinkProcessorTest.cc
  2438. * test/MultiFileAllocationIteratorTest.cc
  2439. * test/SocketCoreTest.cc
  2440. * test/UTPexExtensionMessageTest.cc
  2441. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2442. Reorganized includes.
  2443. * src/NameResolver.cc
  2444. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2445. Fixed compilation error without ares/c-ares
  2446. * src/NameResolver.h:
  2447. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2448. Added a test for large file.
  2449. * test/MetalinkProcessorTest.cc (testLargeFileSize):
  2450. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2451. Fixed the bug that file size is ignored if size > INT32_MAX
  2452. * src/SizeMetalinkParserState.cc (endElement):
  2453. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2454. Bump up version number to 0.13.0
  2455. * configure.ac
  2456. * Release 0.13.0
  2457. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2458. Updated Makfefile.am to make 'make dist' work.
  2459. Now packaged filename is aria2c-VERSION.tar.bz2.
  2460. Added README, README.html, and aria2c.1.html to dist_doc_DATA.
  2461. Added LICENSE.OpenSSL to dist_noinst_DATA.
  2462. Large file support is now configured by configure script.
  2463. * configure.ac
  2464. Removed unsused source files
  2465. * src/
  2466. * test/
  2467. Removed PeerDecl.h and BtContextDecl.h. typedefs are removed to
  2468. Peer.h and BtContext.h respectively.
  2469. * src/Peer.h
  2470. * src/BtContext.h
  2471. Updated translations.
  2472. Added Polish, Thai, Indonesian, Norwegian Nynorsk, Hungarian
  2473. translations. Great thanks to all translators!;)
  2474. * po/*.{po, gmo}
  2475. 2008-02-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2476. Create MessageDigestHelper::staticSHA1DigestInit() which uses
  2477. statically declared sha1 MessageDigestContext.
  2478. * src/BtPieceMessage.cc: Use staticSHA1DigestInit() to avoid
  2479. initialization of short-lived MessageDigestContext.
  2480. * src/MessageDigestHelper.{h, cc}
  2481. * src/main.cc
  2482. Now DownloadCommand has a reference to MessageDigestContext to avoid
  2483. the initialization of MessageDigestContext every time in validating
  2484. chunk checksum.
  2485. * src/DownloadCommand.{h, cc}
  2486. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2487. Add a file descriptor which connected to fast peer(latency<1500) to
  2488. select(). This change reduced CPU load.
  2489. * src/PeerInteractionCommand.cc
  2490. * src/DefaultBtInteractive.{h, cc}
  2491. * src/BtInteractive.h
  2492. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2493. Fixed the previous insufficient fix for possible busy loop.
  2494. * src/MSEHandshake.cc (identifyHandshakeType)
  2495. Removed unused functions.
  2496. * src/MSEHandshake.{h, cc} (readDataAndDecrypt)
  2497. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2498. Fixed possible busy loop if first 20 bytes are not received for a few
  2499. minutes.
  2500. * src/MSEHandshake.{h, cc} (identifyHandshakeType)
  2501. * src/ReceiverMSEHandshakeCommand.cc
  2502. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2503. Fixed compilation error
  2504. * src/ExpatMetalinkProcessor.cc
  2505. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2506. Fixed compile error on Mac OS X, on 64Bit OS maybe.
  2507. * src/DHTBucket.cc
  2508. Removed unnecessary cast.
  2509. * src/HandshakeExtensionMessage.cc
  2510. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2511. Fixed the bug that option handler for PREF_METALINK_ENABLE_UNIQUE_PROTOCOL.
  2512. is missing.
  2513. * src/OptionHandlerFactory.cc
  2514. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2515. Fixed the bug that HAVE message is not sent for a piece they are
  2516. downloaded fom http/ftp server before any BitTorrent handshake is done
  2517. with peers.
  2518. * src/DefaultBtInteractive.cc
  2519. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2520. Removed RequestInfo.h and FileAllocator.h since they have been removed.
  2521. * src/Makefile.am
  2522. * src/Makefile.in
  2523. 2008-02-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2524. Updated README. Added html version of README and man page.
  2525. * README
  2526. * README.html
  2527. * readme2html: Shell script to generate README.html from README using
  2528. asciidoc.
  2529. * doc/aria2c.1.html
  2530. * doc/makeman: Added the line to generate aria2c.1.html
  2531. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2532. Fixed offset calculation.
  2533. * src/LibgcryptDHKeyExchange.h (computeSecret)
  2534. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2535. Rewritten itos and uitos using template. llitos and ullitos are
  2536. replaced with itos and uitos respectively.
  2537. * src/Util.{h, cc}
  2538. * test/UtilTest.cc
  2539. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2540. Fixed the bug that DH key exchange sometimes fails due to bad handling
  2541. of the number of bytes required for storing public key and shared
  2542. secret.
  2543. * src/LibgcryptDHKeyExchange.h
  2544. * src/LibsslDHKeyExchange.h: Also added function name to handleError.
  2545. * src/MSEHandshake.cc
  2546. * test/DHKeyExchangeTest.cc
  2547. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2548. Removed since they are not used.
  2549. * src/Xml2MetalinkProcessor.{h, cc}
  2550. * src/Socket.cc
  2551. * src/SegmentSplitter.{h, cc}
  2552. * test/Xml2MetalinkProcessorTest.cc
  2553. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2554. Fixed the bug that prevents aria2 from stopping other than by pressing
  2555. Ctrl-C in BitTorrent download. It is reproducible using --seed-time
  2556. option. aria2 doesn't stop even after --seed-time is satisfied and
  2557. continues to output blank lines in the console.
  2558. * src/ReceiverMSEHandshakeCommand.cc
  2559. * src/PeerReceiveHandshakeCommand.cc
  2560. * src/PeerListenCommand.cc
  2561. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2562. Bump up version number to 0.13.0rc
  2563. * configure.ac
  2564. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2565. Updated man page and some usage text.
  2566. * doc/aria2c.1.txt
  2567. * src/usage_text.h
  2568. * po/*.{po, gmo}
  2569. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2570. Updated translations. Added Finnish and Hebrew translations.
  2571. Great thanks to all translators!
  2572. * po/*.{po, gmo}
  2573. * po/LINGUAS
  2574. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2575. Log more detailed information about each message.
  2576. * src/DHTQueryMessage.{h, cc}
  2577. * src/DHTGetPeersMessage.{h, cc}
  2578. * src/DHTFindNodeReplyMessage.{h, cc}
  2579. * src/DHTGetPeersReplyMessage.{h, cc}
  2580. * src/DHTAnnouncePeerMessage.{h, cc}
  2581. * src/DHTResponseMessage.{h, cc}
  2582. * src/DHTFindNodeMessage.{h, cc}
  2583. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2584. Use constants defined in prefs.h
  2585. * src/option_processing.cc
  2586. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2587. * test/AllTest.cc: Added OpenSSL, GNUTLS initialization code.
  2588. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2589. Make room for future enchancements for IPv6 addresses.
  2590. Bump up version number of dht.dat file format to 2.
  2591. Not compatible with previous version.
  2592. * src/DHTRoutingTableSerializer.cc
  2593. * src/DHTRoutingTableDeserializer.cc
  2594. * test/DHTRoutingTableSerializerTest.cc
  2595. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2596. Added handling for the return values from
  2597. PeerMessageUtil::createcompact().
  2598. * src/DefaultBtContext.cc (computeFastSet):
  2599. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2600. Fixed abort when peer's ip address is IPv4-mapped address.
  2601. * src/DefaultBtContext.cc (computeFastSet)
  2602. Removed number-and-dots criteria, since Util::isNumberAndDotsNotation()
  2603. cannot handle IPv4-mapped addresses.
  2604. * src/DefaultBtInteractive.cc (addPeerExchangeMessage)
  2605. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2606. Proper return value handling for OpenSSL functions.
  2607. * src/LibsslDHKeyExchange.h
  2608. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2609. Random bytes generation using libgcrypt and OpenSSL.
  2610. * src/DHTUtil.{h, cc}
  2611. * test/DHTUtilTest.cc
  2612. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2613. Fixed segmentation fault when a DHT message which doesn't have 'y' key
  2614. received.
  2615. * src/DHTMessageReceiver.cc (receiveMessage)
  2616. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2617. Fixed the bug that a return code is always 0. BUG#1897704
  2618. If error occurred during the download or there exist unfinished
  2619. downloads, aria2 returns with code 1.
  2620. * src/RequestGroupMan.{h, cc}
  2621. * src/MultiUrlRequestInfo.{h, cc}
  2622. * src/main.cc
  2623. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2624. IPv6 support for SocketCore class.
  2625. TODO: In SocketCore::establishConnection(), this is insufficient to
  2626. determin the failure of connect() here because the socket is
  2627. non-blocking state. The next addresses should be tried after select().
  2628. TODO: NameResolver still uses c-ares(<= 1.4) ares_gethostbyname().
  2629. If c-ares 1.5 or newer is installed, ares_getaddrinfo() should be used
  2630. instead which address family independent.
  2631. TODO: DHTRoutingTable{Deserializer,Serializer} currently saves peer
  2632. information in a compact peer format which is for IPv4 only.
  2633. Some BitTorrent functions in PeerMessageUtil still depends on IPv4 but
  2634. this is a spec of BitTorrent protocol.
  2635. * src/SocketCore.{h, cc}
  2636. * src/PeerMessageUtil.cc
  2637. * test/SocketCoreTest.cc
  2638. * test/PeerMessageUtilTest.cc
  2639. * test/DHTConnectionImplTest.cc
  2640. Handle IPv4-mapped addresses.
  2641. * src/DHTNode.cc: Now identity is determined by node id.
  2642. * src/DHTMessageTrackerEntry.cc
  2643. Because now PeerMessageUtil::unpackcompact() could fail, the caller
  2644. should handle it.
  2645. * src/DHTRoutingTableDeserializer.cc
  2646. * src/DHTMessageFactoryImpl.cc
  2647. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2648. Change the unit of --stop option from a minute to a second.
  2649. * src/usage_text.h
  2650. * src/DownloadEngineFactory.cc
  2651. * src/OptionHandlerFactory.cc
  2652. * src/message.h
  2653. * src/TimedHaltCommand.cc
  2654. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2655. Make listening socket non-block mode.
  2656. * src/FtpConnection.cc
  2657. * src/FtpNegotiationCommand.{h, cc}
  2658. * src/PeerListenCommand.cc
  2659. Fixed the bug that cause slow ftp negotiation.
  2660. * src/FtpNegotiationCommand.{h, cc}
  2661. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2662. Added basic tag to --enable-dht, --dht-listen-port option.
  2663. * src/HelpItemFactory.cc (createHelpItems)
  2664. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2665. Updated text.
  2666. * src/usage_text.h
  2667. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2668. * src/MSEHandshake.cc (encryptAndSendData): Use std::min().
  2669. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2670. Determin _threadtholdSpeed in each constructor for
  2671. ActivePeerConnectionCommand and PeerReceiveHandshakeCommand.
  2672. * src/ActivePeerConnectionCommand.{h, cc}
  2673. * src/PeerReceiveHandshakeCommand.{h, cc}
  2674. * src/BtSetup.cc
  2675. * src/BtConstants.h
  2676. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2677. Added --bt-min-crypto-level and --bt-require-crypto options.
  2678. * src/OptionHandlerFactory.cc
  2679. * src/MSEHandshake.cc
  2680. * src/HelpItemFactory.cc
  2681. * src/option_processing.cc
  2682. * src/ReceiverMSEHandshakeCommand.cc
  2683. * src/prefs.h
  2684. * src/DefaultBtAnnounce.cc
  2685. * src/InitiatorMSEHandshakeCommand.cc
  2686. * src/usage_text.h
  2687. * test/MSEHandshakeTest.cc
  2688. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2689. Bump version number to 0.13.0b
  2690. * configure.ac
  2691. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2692. Updated doc.
  2693. * src/MessageDigestHelper.h:
  2694. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2695. Use raw message digest as a token instead of its hexadecimal
  2696. representation.
  2697. * src/DHTTokenTracker.cc (generateToken)
  2698. 2008-02-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2699. Added Message Stream Encryption(MSE) support.
  2700. Currently, aria2 accepts incoming connections with Obfuscation Header
  2701. and legacy BitTorrent Header and establishes connections with
  2702. Obfuscation Header first and if failed then retry with legacy
  2703. BitTorrent header. If plain text and ARC4 is provided, aria2 always
  2704. choose ARC4. The new option to change the default behavior is planned.
  2705. For tracker extension, "supportcrypto=1" is added statically.
  2706. * src/PeerInitiateConnectionCommand.{h, cc}
  2707. * src/PeerConnection.{h, cc}
  2708. * src/HandleRegistry.h
  2709. * src/SocketCore.h
  2710. * src/PeerReceiveHandshakeCommand.{h, cc}
  2711. * src/BtRegistry.{h, cc}
  2712. * src/PeerListenCommand.cc
  2713. * src/InitiatorMSEHandshakeCommand.{h, cc}
  2714. * src/ReceiverMSEHandshakeCommand.{h, cc}
  2715. * src/MSEHandshake.{h, cc}
  2716. * src/ARC4Encryptor.h
  2717. * src/ARC4Decryptor.h
  2718. * src/LibgcryptARC4Encryptor.h
  2719. * src/LibgcryptARC4Decryptor.h
  2720. * src/LibgcryptARC4Context.h
  2721. * src/LibsslARC4Encryptor.h
  2722. * src/LibsslARC4Decryptor.h
  2723. * src/LibsslARC4Context.h
  2724. * src/DHKeyExchange.h
  2725. * src/LibgcryptDHKeyExchange.h
  2726. * src/LibsslDHKeyExchange.h
  2727. * src/DefaultBtAnnounce.cc: Just added "supportcrypto=1" parameter.
  2728. * test/DefaultBtAnnounceTest.cc
  2729. * test/ARC4Test.cc
  2730. * test/DHKeyExchangeTest.cc
  2731. Removed prepareForRetry() because it is not used.
  2732. * src/PeerAbstractCommand.{h, cc}
  2733. * src/PeerInteractionCommand.{h, cc}
  2734. * src/PeerInitiateConnectionCommand.{h, cc}
  2735. 2008-02-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2736. Added the ability to load nodes from torrent file. These nodes are
  2737. added to the routing table when downloading that torrent.
  2738. * src/BtContext.h
  2739. * src/DefaultBtContext.{h, cc}
  2740. * src/DHTSetup.cc
  2741. * src/DHTEntryPointNameResolveCommand.{h, cc}: Now accepts list of
  2742. hostname and port pair, and resolves all of them.
  2743. * src/NameResolver.{h, cc}: Added reset().
  2744. * src/RequestGroup.cc
  2745. * test/DefaultBtContextTest.cc
  2746. * test/MockBtContext.h
  2747. Removed assert() from DefaultBtContext and throw exception instead.
  2748. * src/DefaultBtContext.cc
  2749. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2750. Fixed segmentation fault bug when exiting if dht is disabled.
  2751. * src/RequestGroup.cc
  2752. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2753. Fixed typo in log message and define the message in message.h
  2754. * src/TimedHaltCommand.cc
  2755. * src/message.h
  2756. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2757. Included RecoverableException.h to fix compilation error.
  2758. * test/DHTMessageFactoryImplTest.cc
  2759. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2760. Added test 'testDoReceivedAction' for DHTQueryMessage subclasses.
  2761. * test/DHTPingMessageTest.cc
  2762. * test/DHTGetPeersMessageTest.cc
  2763. * test/DHTFindNodeMessageTest.cc
  2764. * test/DHTAnnouncePeerMessageTest.cc
  2765. * test/MockDHTMessage.h
  2766. * test/MockDHTMessageFactory.h
  2767. * test/MockDHTMessageDispatcher.h: New class.
  2768. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2769. Added DHTMessageDispatcherImpl. Now DHTMessageDispatcher is pure
  2770. virtual.
  2771. * src/DHTMessageDispatcher.h
  2772. * src/DHTMessageDispatcherImpl.{h, cc}
  2773. * src/DHTSetup.cc
  2774. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2775. Adding handling of DHT error message. Just log error message and
  2776. throw exception.
  2777. * src/DHTMessageFactoryImpl.cc
  2778. * test/DHTMessageFactoryImplTest.cc
  2779. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2780. Added handling of dynamic cast failure.
  2781. * src/DHTNodeLookupTask.cc
  2782. * src/DHTPeerLookupTask.cc
  2783. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2784. Added the ability to stop aria2 itself when given time has passed
  2785. from start. Use --stop option to specify time in minutes.
  2786. When 0 is given, this feature is disabled.
  2787. * src/OptionHandlerFactory.cc
  2788. * src/TimeBasedCommand.h: Make _interval protected scope.
  2789. * src/HelpItemFactory.cc
  2790. * src/option_processing.cc
  2791. * src/prefs.h
  2792. * src/FillRequestGroupCommand.cc: Evaluate _e->isHaltRequested()
  2793. before calling RequestGroupMan::fillRequestGroupFromReserver().
  2794. Without this modification, the result list shows "ERR" when aria2 is
  2795. stopped by --stop option. It should be "INPR".
  2796. * src/DownloadEngine.{h, cc}
  2797. * src/DownloadEngineFactory.cc
  2798. * src/usage_text.h
  2799. * src/TimedHaltCommand.{h, cc}: New class.
  2800. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2801. Bootstrap through node added by port message.
  2802. Currently bootstrap is executed if the number of buckets in routing
  2803. table is 1.
  2804. * src/BtPortMessage.{h, cc}
  2805. * src/DefaultBtMessageFactory.{h, cc}
  2806. * src/PeerInteractionCommand.cc
  2807. * test/BtPortMessageTest.cc
  2808. * test/MockDHTTask.h
  2809. 2008-02-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2810. Extract the Peer class's member variables, which are only needed after
  2811. PeerInteractionCommand, into PeerSessionResource class.
  2812. This class is instantiated in PeerInteractionCommand class's ctor and
  2813. released in its dtor.
  2814. This will make Peer class lightweight and uses less memory for peers
  2815. which are not connected and wait in the queue.
  2816. * src/PeerChokeCommand.cc
  2817. * src/PeerSessionResource.{h, cc}
  2818. * src/PeerInteractionCommand.cc
  2819. * src/PeerAbstractCommand.cc: Note: 0 is given to onAbort() function.
  2820. * src/DefaultBtInteractive.cc
  2821. * src/BtPieceMessage.cc
  2822. * src/BtInterestedMessage.cc
  2823. * src/BtUnchokeMessage.cc
  2824. * src/DefaultPeerStorage.{h, cc}
  2825. * src/PeerInitiateConnectionCommand.cc
  2826. * src/ActivePeerConnectionCommand.cc
  2827. * src/BtNotInterestedMessage.cc
  2828. * src/DefaultBtMessageDispatcher.cc
  2829. * src/BtChokeMessage.cc
  2830. * src/BtRequestMessage.cc
  2831. * src/Peer.{h, cc}
  2832. * src/BtRegistry.h
  2833. * src/TrackerWatcherCommand.cc
  2834. * src/PeerReceiveHandshakeCommand.cc
  2835. * test/BtExtendedMessageTest.cc
  2836. * test/BtAllowedFastMessageTest.cc
  2837. * test/BtCancelMessageTest.cc
  2838. * test/DefaultPieceStorageTest.cc
  2839. * test/BtBitfieldMessageTest.cc
  2840. * test/BtHaveMessageTest.cc
  2841. * test/BtNotInterestedMessageTest.cc
  2842. * test/BtRequestMessageTest.cc
  2843. * test/PeerSessionResourceTest.cc
  2844. * test/DefaultBtMessageDispatcherTest.cc
  2845. * test/PeerTest.cc
  2846. * test/BtInterestedMessageTest.cc
  2847. * test/BtRejectMessageTest.cc
  2848. * test/BtChokeMessageTest.cc
  2849. * test/DefaultPeerStorageTest.cc
  2850. * test/BtHaveNoneMessageTest.cc
  2851. * test/BtHaveAllMessageTest.cc
  2852. * test/DefaultExtensionMessageFactoryTest.cc
  2853. * test/BtUnchokeMessageTest.cc
  2854. * test/DefaultBtMessageFactoryTest.cc
  2855. * test/HandshakeExtensionMessageTest.cc
  2856. * test/UTPexExtensionMessageTest.cc
  2857. * test/DefaultBtRequestFactoryTest.cc
  2858. * test/BtPieceMessageTest.cc
  2859. Removed typedef PeerStats.
  2860. * src/PeerStat.h
  2861. * src/SegmentMan.cc
  2862. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2863. Added std namespace to copy, remove_copy, back_inserter,
  2864. front_inserter.
  2865. * src/RequestGroupMan.cc
  2866. * src/DefaultPieceStorage.cc
  2867. * src/StreamFileAllocationEntry.cc
  2868. * src/BtFileAllocationEntry.cc
  2869. * src/RequestGroup.cc
  2870. * src/MetalinkEntry.cc
  2871. * src/DelegatingPeerListProcessor.cc
  2872. * src/DefaultBtRequestFactory.cc
  2873. * src/DefaultBtMessageDispatcher.cc
  2874. * src/version_usage.cc: Included <algorithm>
  2875. * src/main.cc
  2876. * src/MetalinkParserController.cc
  2877. * src/DefaultBtContext.cc
  2878. * src/DownloadEngineFactory.cc
  2879. * src/a2algo.h
  2880. Removed.
  2881. * test/StreamUriListParserTest.cc
  2882. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2883. Use PREF_MAX_DOWNLOAD_LIMIT as a threshold for
  2884. ActivePeerConnectionCommand when it is given and
  2885. PREF_MAX_DOWNLOAD_LIMIT < default threshold.
  2886. * src/ActivePeerConnectionCommand.{h, cc}
  2887. * src/BtSetup.cc
  2888. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2889. Only add socket to DownloadEngine's select routine when peer or
  2890. localhost is unchoked and interested. This lowers CPU usage a
  2891. little bit.
  2892. * src/PeerInteractionCommand.cc
  2893. * src/PeerAbstractCommand.{h, cc}
  2894. * src/BtInteractive.h
  2895. * src/DefaultBtInteractive.{h, cc}
  2896. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2897. Revert previous change because get_peers message is needed for
  2898. announce_peer anyway.
  2899. * src/DHTGetPeersCommand.cc
  2900. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2901. Request peers thought DHT only when download hasn't finished.
  2902. * src/DHTGetPeersCommand.cc
  2903. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2904. Force refresh bucket when startup if certain time has passed(currently 15 minutes).
  2905. * src/DHTBucketRefreshTask.{h, cc}
  2906. * src/DHTSetup.cc
  2907. 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2908. Removed "using namespace std;" from all sources. Appended std:: prefix to c++
  2909. standard classes.
  2910. Included string.h where mem* function are used.
  2911. Added namespace aria2.
  2912. 2008-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2913. Create directory before saving DHT routing table.
  2914. Now ios::failure is now handled properly.
  2915. * src/DHTAutoSaveCommand.cc
  2916. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2917. Removed unnecessary cerr.
  2918. * src/DownloadEngine.cc
  2919. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2920. Catch exception inside DHTMessageReceiver::receiveMessage().
  2921. Log unknown message.
  2922. * src/DHTMessageReceiver.{h, cc}
  2923. * src/DHTMessageFactory.h
  2924. * src/DHTMessageFactoryImpl.{h, cc}
  2925. * src/DHTMessageTracker.cc (handleTimeout): Catch and handle exception.
  2926. * src/DHTInteractionCommand.cc
  2927. * src/DHTUnknownMessage.{h, cc}
  2928. * test/DHTUnknownMessageTest.cc
  2929. * test/MockDHTMessageFactory.h
  2930. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2931. Commented out ip address comparison because a host can have multiple
  2932. ip addresses and it is hard to predict the hostname is resolved into
  2933. which one.
  2934. * test/SocketCoreTest.cc (testWriteAndReadDatagram)
  2935. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2936. * po/Makefile.in: Removed since this is generated by configure.
  2937. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2938. Fixed compiler warning about redefinition of SIZE_MAX.
  2939. Use common.h instead of config.h directly here.
  2940. * src/Platform.{h, cc}
  2941. The check of ENABLE_NLS is made in gettext.h, so it is not required
  2942. here.
  2943. * common.h
  2944. 2008-02-02 gettextize <bug-gnu-gettext@gnu.org>
  2945. Updated gettext related files.
  2946. * configure.ac (AC_CONFIG_FILES): Add intl/Makefile.
  2947. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17.
  2948. 2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2949. Added DHT functionality, compatible with mainline.
  2950. DHT is disabled by default. To enable it, give --enable-dht to aria2c.
  2951. You may need to specify entry point to DHT network using
  2952. --dht-entry-point. DHT uses UDP port to listen incoming message.
  2953. Use --dht-listen-port to specify port number. Make sure that your
  2954. firewall configuration can pass through UDP traffic to the port.
  2955. The routing table is saved in $HOME/.aria2/dht.dat.
  2956. * src/DHT*
  2957. * src/BNode.{h, cc}
  2958. * src/PeerInteractionCommand.cc: enable DHT functionality for a
  2959. particular torrent.
  2960. * src/Data.cc: Rewritten ctor.
  2961. * src/OptionHandlerFactory.cc: Added --enable-dht, --dht-listen-port,
  2962. --dht-entry-point.
  2963. * src/DefaultBtInteractive.cc: Send port message if dht is enabled.
  2964. * src/RequestGroup.cc: Initialize DHT functionality. When download
  2965. ends, remove BtContext from DHTPeerAnnounceStorage.
  2966. * src/BtPortMessage.{h, cc}: Rewritten.
  2967. * src/message.h
  2968. * src/OptionHandlerImpl.cc
  2969. * src/option_processing.cc: Added --enable-dht, --dht-listen-port,
  2970. --dht-entry-point.
  2971. * src/Dictionary.{h, cc} (remove): New function.
  2972. * src/prefs.h
  2973. * src/DefaultBtMessageFactory.h
  2974. * src/BtHandshakeMessage.cc
  2975. * src/ActivePeerConnectionCommand.cc
  2976. * src/SocketCore.{h, cc}: Added datagram socket support.
  2977. * src/DefaultBtMessageFactory.cc
  2978. * src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
  2979. Create DHT commands.
  2980. * src/BtMessageFactory.h
  2981. * src/PeerMessageUtil.{h, cc}
  2982. 2008-01-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2983. Fixed the bug that log file is not written when configuration file doesn't exist.
  2984. This is caused by using Logger class before LogFactory is not configured.
  2985. BUG #1875079
  2986. * src/option_processing.cc
  2987. Warning message "configuration doesn't exist" is only printed when --conf is
  2988. given.
  2989. * src/option_processing.cc
  2990. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2991. Use BencodeVisitor and MessageDigestHelper instead of ShaVisitor.
  2992. ShaVisitor is now deprecated and slated to be removed.
  2993. * src/DefaultBtContext.cc
  2994. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2995. Externalize message to message.h
  2996. * src/Platform.cc
  2997. * src/message.h
  2998. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2999. Set default domain and default path to cookie.
  3000. * src/HttpResponse.cc
  3001. * src/CookieBox.{h, cc}
  3002. * src/CookieParser.{h, cc}
  3003. * test/CookieParserTest.cc
  3004. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3005. Added --no-conf and --conf-path command-line option.
  3006. --no-conf option disables loading aria2.conf file.
  3007. --conf-path option changes the configuration file path. The default
  3008. file path is $HOME/.aria2/aria2.conf
  3009. Added a warning message when the configuration file is not found.
  3010. * src/HelpItemFactory.cc
  3011. * src/option_processing.cc
  3012. * src/prefs.h
  3013. * src/usage_text.h
  3014. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3015. Added the message to inform users that other help categories are
  3016. available in -h option.
  3017. * src/version_usage.cc
  3018. * src/TagContainer.{h, cc}
  3019. * test/TagContainerTest.cc
  3020. * src/TaggedItem.{h, cc}
  3021. * test/TaggedItemTest.cc
  3022. * src/HelpItem.h
  3023. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3024. Added Piece::getFirstMissingBlockIndexWithoutLock() and it is called
  3025. from PiecedSegment's ctor.
  3026. Previously Piece::getAllMissingBlockIndexes() is called from
  3027. PiecedSegment() but it is rather expensive since only first element is
  3028. used.
  3029. * src/PiecedSegment.cc
  3030. * src/Piece.{h, cc}
  3031. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3032. Rewritten get*Missing*Index functions. Now no need to allocate memory
  3033. each time these functions are called.
  3034. * src/BitfieldMan.{h, cc}
  3035. * test/BitfieldManTest.cc
  3036. * src/array_fun.h
  3037. * test/array_funTest.cc
  3038. Now BitfieldMan::countBlock() returns BitfieldMan::blocks.
  3039. Added new BitfieldMan::countFilteredBlock() to get the number of blocks
  3040. filtered. Removed unnecessary cast to int32_t.
  3041. * src/BitfieldMan.{h, cc}
  3042. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3043. Fixed the bug that EX_TOO_LONG_PAYLOAD exception is thrown if just
  3044. payload length(4bytes) are received. This happens because lenbufLength
  3045. is not updated in this particular case and successive call of
  3046. receiveMessage() overwrites payload length with bytes recieved which
  3047. are payload body.
  3048. * src/PeerConnection.{h, cc}
  3049. * src/message.h
  3050. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3051. Fixed the bug that DefaultPeerStorage::returnPeer() may delete wrong
  3052. peer if there are peers that have same ipaddr and port.
  3053. I've experiened segmentation fault and "pure virtual function was
  3054. called" error.
  3055. * src/Peer.h
  3056. * test/PeerTest.cc
  3057. * src/DefaultPeerStorage.cc
  3058. * test/DefaultPeerStorageTest.cc
  3059. 2008-01-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3060. Removed a call to isPowerOf() because it is no longer necessary here
  3061. and a request block is not always power of 2.
  3062. BUG#1866924
  3063. * src/PeerMessageUtil.cc (checkLength)
  3064. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3065. Fixed the bug that always first found Segment is removed from
  3066. usedSegmentEntries. Removed unused functions.
  3067. * src/SegmentMan.{h, cc}
  3068. * test/SegmentManTest.cc
  3069. Fixed the bug that ServerHost is not removed.
  3070. * src/RequestGroup.cc
  3071. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3072. Fixed the bug that SegmentMan::completeSegment() is not called
  3073. even if Segment is complete when --lowest-speed-limit is enabled.
  3074. BUG#1864525
  3075. * src/DownloadCommand.{h, cc}
  3076. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3077. Fixed: hash algorithm 'sha1' is always used.
  3078. * src/DownloadCommand.cc (validatePieceHash)
  3079. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3080. Added --enable-peer-exchange command-line option.
  3081. * src/OptionHandlerFactory.cc
  3082. * src/HelpItemFactory.cc
  3083. * src/option_processing.cc
  3084. * src/usage_text.h
  3085. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3086. Move extension from BtRuntime to ExtensionMessageFactory, because
  3087. extension can be specified per peer, not per torrent.
  3088. * src/DefaultBtInteractive.cc
  3089. * src/BtRuntime.h
  3090. * src/ExtendedMessagingAware.h
  3091. * src/ExtensionMessageFactory.h
  3092. * src/DefaultExtensionMessageFactory.cc
  3093. * test/DefaultExtensionMessageFactoryTest.cc
  3094. 2008-01-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3095. Added categorized option help. Specify category using --help option.
  3096. Also added the ability to search options in forward match.
  3097. * src/HelpItem.{h, cc}
  3098. * test/HelpItemTest.cc
  3099. * src/HelpItemFactory.{h, cc}
  3100. * src/TagContainer.{h, cc}
  3101. * test/TagContainerTest.cc
  3102. * src/option_processing.cc
  3103. * src/prefs.h
  3104. * src/TaggedItem.{h, cc}
  3105. * test/TaggedItemTest.cc
  3106. * src/version_usage.cc
  3107. * src/help_tags.h
  3108. * src/usage_text.h
  3109. 2008-01-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3110. Fixed segmentation fault when bad torrent metainfo is parsed.
  3111. Added dynamic_cast properly to detect the misconfiguration of metainfo
  3112. and then throw exception or skip it.
  3113. * src/DefaultBtContext.{h, cc}
  3114. * test/DefaultBtContextTest.cc
  3115. * src/AnnounceList.cc
  3116. * src/CompactPeerListProcessor.cc
  3117. * src/message.h
  3118. * src/DefaultBtAnnounce.{h, cc}
  3119. * test/DefaultBtAnnounceTest.cc
  3120. * src/BencodeVisitor.cc
  3121. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3122. Added missing "B"(=Byte). So now the message looks like this:
  3123. Your share ratio was 1.0, uploaded/downloaded=12MiB/12MiB
  3124. * src/message.h (MSG_SHARE_RATIO_REPORT)
  3125. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3126. Show the seed ratio after torrent downloads.
  3127. For example, after torrent download completed and --seed-time and
  3128. --seed-ratio conditions are fulfilled, following message is printed
  3129. right after "Download complete: .....":
  3130. Your share ratio was 1.0, uploaded/downloaded=12M/12M
  3131. * src/RequestGroupMan.cc
  3132. * src/RequestGroup.{h, cc}
  3133. * src/message.h
  3134. 2007-12-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3135. Remove a defunct control file. A defunct control file means that while
  3136. it exists, but the corresponding download file is missing.
  3137. After its removal, a download restarts from the beginning.
  3138. * src/RequestGroup.cc
  3139. * src/message.h
  3140. 2007-12-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3141. Allocate bitfield in Peer when it is really used. More specifically,
  3142. bitfield in Peer is allocated after the connection is established and
  3143. deallocated when the connection is dropped.
  3144. Since 2 parameters(piece length and total length) was removed from the
  3145. constructor of Peer class, many test classes were modified accordingly.
  3146. See svn log for more detailed information.
  3147. * src/PeerInteractionCommand.cc
  3148. * src/CompactPeerListProcessor.cc
  3149. * src/Peer.cc
  3150. * src/DefaultPeerListProcessor.cc
  3151. * src/PeerListenCommand.cc
  3152. * src/PeerReceiveHandshakeCommand.cc
  3153. Fixed memory leak
  3154. * src/Piece.cc
  3155. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3156. Changed the default value of PREF_PEER_CONNECTION_TIMEOUT and
  3157. lowestSpeedLimit in ActivePeerConnectionCommand. TODO: Make them
  3158. command-line options.
  3159. * src/option_processing.cc
  3160. * src/ActivePeerConnectionCommand.cc
  3161. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3162. Send have message to peer if it already has the piece.
  3163. * src/BtHaveMessage.{h, cc}
  3164. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3165. Removed incomingPeer. Set 0 to peer's port if it is not a listening
  3166. port.
  3167. * src/DefaultPeerStorage.{h, cc}
  3168. * test/DefaultPeerStorageTest.cc
  3169. * src/HandshakeExtensionMessage.cc
  3170. * test/HandshakeExtensionMessageTest.cc
  3171. * src/Peer.{h, cc}: Added ipaddr and port to identity comparison.
  3172. * src/PeerStorage.h
  3173. * test/MockPeerStorage.h
  3174. * src/PeerListenCommand.cc
  3175. * src/PeerReceiveHandshakeCommand.cc
  3176. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3177. Added --metalink-enable-unique-protocol option.
  3178. * src/Metalink2RequestGroup.cc
  3179. * src/option_processing.cc
  3180. * src/prefs.h
  3181. * src/version_usage.cc
  3182. * doc/aria2c.1.txt
  3183. * doc/aria2c.1
  3184. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3185. Allow a peer in incomingPeer to be added peers.
  3186. * src/DefaultPeerStorage.cc
  3187. * test/DefaultPeerStorageTest.cc
  3188. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3189. Fixed the bug that causes aria2 not to finish download. BUG#1855875.
  3190. I could reproduce this bug in following procedure:
  3191. 1. Stop the download at the very beginning(1% or 100KB downloaded).
  3192. 2. Restart aria2.
  3193. 3. You see the download stopped around 99%.
  3194. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  3195. * src/StreamFileAllocationEntry.cc: Removed the timeout handling.
  3196. If timeout is reached, then _nextCommand is unused and it may contains
  3197. segments and they won't be canceled. Actually, timeout is not needed
  3198. here because if the server dropped connection, then retry is made.
  3199. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3200. Added uTorrent compatible Peer Exchange.
  3201. * src/BencodeVisitor.{h, cc}
  3202. * test/BencodeVisitorTest.cc
  3203. * src/BtConstants.h
  3204. * src/BtContext.h: Added 'private' flag.
  3205. * src/BtExtendedMessage.{h, cc}
  3206. * test/BtExtendedMessageTest.cc
  3207. * src/BtHandshakeMessage.{h, cc}: Set extended messaging bit in
  3208. reserved field.
  3209. * test/BtHandshakeMessageTest.cc
  3210. * src/BtMessageFactory.h
  3211. * src/BtRegistry.h
  3212. * src/BtRuntime.h: This class holds default extension message IDs for
  3213. aria2. By default, aria2 uses ID 8 for ut_pex.
  3214. * src/DefaultBtContext.cc
  3215. * src/DefaultBtInteractive.{h, cc}: This class holds _utPexEnabled.
  3216. When it is true, aria2 enables ut_pex. This value is set by
  3217. PeerInteractionCommand.
  3218. * src/DefaultBtMessageFactory.{h, cc}
  3219. * test/DefaultBtMessageFactoryTest.cc
  3220. * src/DefaultBtMessageReceiver.cc: Moved the code of fast extension
  3221. handling to DefaultBtInteractive class.
  3222. * src/DefaultExtensionMessageFactory.{h, cc}
  3223. * test/DefaultExtensionMessageFactoryTest.cc
  3224. * src/DefaultPeerStorage.cc: Returns false if a peer is already in
  3225. the container(peers and incomingPeers. The equality is determined by
  3226. Peer::id).
  3227. * test/DefaultPeerStorageTest.cc
  3228. * src/ExtensionMessage.h
  3229. * test/MockExtensionMessage.h
  3230. * src/ExtensionMessageFactory.h
  3231. * test/MockExtensionMessageFactory.h
  3232. * src/HandshakeExtensionMessage.{h, cc}
  3233. * test/HandshakeExtensionMessageTest.cc
  3234. * src/MetaEntry.h
  3235. * src/Peer.{h, cc}
  3236. * src/PeerInteractionCommand.cc
  3237. * src/PeerReceiveHandshakeCommand.cc: Evaluate the return value of
  3238. addIncomingPeer.
  3239. * src/PeerMessageUtil.{h, cc}
  3240. * src/PeerObject.h
  3241. * src/UTPexExtensionMessage.{h, cc}
  3242. * test/UTPexExtensionMessageTest.cc
  3243. * src/message.h
  3244. * src/prefs.h
  3245. Fixed the bug that returns incomplete data when it contains null
  3246. character. A convenient constructor was also added.
  3247. * src/Data.{h, cc}
  3248. Rewritten.
  3249. * src/CompactPeerListProcessor.cc
  3250. Fixed typos.
  3251. * src/message.h
  3252. * src/MetaFileUtil.cc
  3253. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3254. Added "Status Legend" label to the explanation text of 'stat' in
  3255. download result and moved it to the last. BUG#1848214
  3256. * src/RequestGroupMan.cc
  3257. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3258. Fixed the bug that -lexpat is always added to aria2c_LDADD.
  3259. * src/Makefie.am
  3260. * test/Makefile.am
  3261. 2007-12-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3262. Fixed the bug that prevents aria2 from loading cookie file when expire
  3263. value is greater than 2^31-1. BUG#1851066
  3264. * src/CookieBoxFactory.cc
  3265. * test/CookieBoxFactoryTest.cc
  3266. 2007-12-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3267. Fixed possible memory leak when an exception is thrown.
  3268. * src/XML2SAXMetalinkProcessor.cc
  3269. Added Expat support. If both libxml2 and Expat are installed, then
  3270. libxml2 is used by default.
  3271. MetalinkProcessorFactory chooses from XML2SAXMetalinkProcessor and
  3272. ExpatMetalinkProcessor according to the configuration.
  3273. * src/ExpatMetalinkProcessor.{h, cc}
  3274. * src/main.cc: Removed libxml2 specific header and init/free function.
  3275. * src/MetalinkProcessorFactory.{h, cc}
  3276. * src/MetalinkHelper.cc
  3277. * src/Metalinker.h: Removed unnecessary libxml2 header.
  3278. * src/MetalinkProcessor.h
  3279. * test/XML2SAXMetalinkProcessorTest.cc: Removed because
  3280. MetalinkProcessorTest is used instead.
  3281. * test/MetalinkProcessorTest.cc: Added. It is actually the same with
  3282. XML2SAXMetalinkProcessor, replaced XML2SAXMetalinkProcessor with
  3283. MetalinkProcessorFactory::newInstance().
  3284. * m4/libexpat.m4
  3285. * configure.ac: Added configuration options for libexpat.
  3286. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3287. Disabled -s option in metalink download.
  3288. * src/Metalink2RequestGroup.cc
  3289. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3290. If several protocols are available for a mirror in metalink file,
  3291. aria2 now use one of them. --metalink-preferred-protocol option was
  3292. added to specify the preference of protocol.
  3293. * src/AbstractCommand.cc
  3294. * src/OptionHandlerFactory.cc
  3295. * src/ServerHost.{h, cc}
  3296. * src/Metalink2RequestGroup.cc
  3297. * src/RequestGroup.{h, cc}
  3298. * test/RequestGroupTest.cc
  3299. * src/option_processing.cc
  3300. * src/prefs.h
  3301. * src/HttpResponseCommand.cc
  3302. * src/MetalinkResource.{h, cc}
  3303. * src/FtpNegotiationCommand.cc
  3304. * src/MetalinkEntry.{h, cc}
  3305. * src/MetalinkEntryTest.cc
  3306. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3307. Code cleanup and added debug log.
  3308. * src/PeerConnection.cc
  3309. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3310. Compiler error fix: applied the patch by Tiziano Mueller
  3311. * src/RequestGroup.cc
  3312. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3313. Fixed the bug: only first announce URL is tried in AnnounceTier,
  3314. in stopped and completed event.
  3315. * src/AnnounceList.{h, cc}
  3316. * test/AnnounceListTest.cc
  3317. * src/DefaultBtAnnounce.cc
  3318. * test/DefaultBtAnnounceTest.cc
  3319. Sorted URLs.
  3320. * test/Metalink2RequestGroupTest.cc
  3321. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3322. Removed unnecessary string copy. Updated doc and corrected indentation.
  3323. * src/Base64.cc
  3324. Fixed compilation warnings
  3325. * test/DataTest.cc
  3326. * test/HttpRequestTest.cc
  3327. * test/MetaFileUtilTest.cc
  3328. * test/RequestTest.cc
  3329. * Release 0.12.0
  3330. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3331. Updated translations
  3332. * po/{de,fr,ja,nl,ru}.po
  3333. Added Brazilian Portuguese, Catalan, Italian, Spanish, Swedish
  3334. translations. Many thanks to translators.
  3335. * po/{ca,es,it,pt_BR,sv}.po
  3336. * po/LINGUAS
  3337. 2007-12-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3338. Added a notice about URL
  3339. * src/version_usage.cc
  3340. 2007-12-07 Tatsuhiro Tsujikawa <tujikawa at rednoah com>
  3341. Fixed the bug#1845750; CTRL+C does not stop torrent.
  3342. aria2 repeatedly sends stopped request when tracker returns error code.
  3343. * src/AnnounceList.cc
  3344. * test/AnnounceListTest.cc
  3345. * src/AnnounceTier.h
  3346. Added a message when ctrl-c is hit.
  3347. Now second ctrl-c is also handled in signal handler.
  3348. * src/RequestGroupMan.{h, cc}
  3349. * src/RequestGroup.{h, cc}
  3350. * src/MultiUrlRequestInfo.cc
  3351. * src/DownloadEngine.cc
  3352. * src/TrackerWatcherCommand.cc
  3353. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3354. Code cleanup
  3355. * src/Base64.cc (encode)
  3356. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3357. Changed Direct/IO enable/disable procesure in file allocation routine.
  3358. * src/SingleFileAllocationIterator.cc
  3359. (SingleFileAllocationIterator):
  3360. Disable directIO if offset is not multiple of 512.
  3361. (~SingleFileAllocationIterator): Removed a call to disableDirectIO.
  3362. * src/MultiFileAllocationIterator.cc (allocateChunk):
  3363. Enable created SingleFileAllocationIterator's directIO.
  3364. * src/FileAllocationEntry.cc
  3365. (FileAllocationEntry): Enable directIO here.
  3366. (~FileAllocationEntry): Disable directIO here.
  3367. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3368. Fixed the bug: aria2 doesn't utilize fast set index offered by peer.
  3369. * src/Peer.{h, cc}
  3370. * src/DefaultPieceStorage.cc
  3371. * test/DefaultPieceStorageTest.cc
  3372. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3373. Rewritten direct I/O support routine
  3374. * src/SingleFileAllocationIterator.cc
  3375. * src/MultiDiskAdaptor.{h, cc}
  3376. * src/ByteArrayDiskWriter.h
  3377. * src/AbstractSingleDiskAdaptor.h
  3378. * src/AbstractDiskWriter.cc
  3379. * src/DefaultPieceStorage.cc
  3380. * src/DiskWriter.h
  3381. * src/BinaryStream.h
  3382. * src/IteratableChunkChecksumValidator.cc
  3383. * src/IteratableChecksumValidator.cc
  3384. * src/CheckIntegrityEntry.cc
  3385. * src/FileAllocationEntry.cc
  3386. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3387. Fixed typo
  3388. * src/version_usage.cc
  3389. Updated doc
  3390. * doc/aria2c.1.txt
  3391. * doc/aria2c.1
  3392. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3393. Fixed compile error without message digest support.
  3394. * src/FileMetalinkParserState.cc
  3395. * src/MetalinkParserController.{h, cc}
  3396. * test/XML2SAXMetalinkProcessorTest.cc
  3397. * test/MetalinkParserControllerTest.cc
  3398. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3399. Enable direct I/O support in checksum checking.
  3400. * src/IteratableChunkChecksumValidator.{h, cc}
  3401. * test/IteratableChunkChecksumValidatorTest.cc
  3402. * src/CheckIntegrityEntry.cc
  3403. * src/PieceHashCheckIntegrityEntry.cc
  3404. * src/IteratableChecksumValidator.{h, cc}
  3405. * src/BtCheckIntegrityEntry.cc: Added doc.
  3406. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3407. Added --allow-piece-length-change option.
  3408. * src/DefaultBtProgressInfoFile.cc
  3409. * test/DefaultBtProgressInfoFileTest.cc
  3410. * src/OptionHandlerFactory.cc
  3411. * src/option_processing.cc
  3412. * src/prefs.h
  3413. * src/version_usage.cc
  3414. * doc/aria2c.1.txt
  3415. * doc/aria2c.1
  3416. Fixed: duplicated result entry appears when exception is thrown in
  3417. RequestGroup::createInitiateConnectionCommand().
  3418. * src/RequestGroupMan.cc (fillRequestGroupFromReserver):
  3419. Add RequestGroup to _requestGroup after RequetGroup::
  3420. createInitiateConnectionCommand() succeeds.
  3421. Externalized message
  3422. * src/XML2SAXMetalinkProcessor.cc
  3423. * src/message.h
  3424. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3425. Forced download abort when received negative response from http/ftp
  3426. server.
  3427. * src/HttpResponseCommand.cc
  3428. * src/FtpNegotiationCommand.cc
  3429. * src/HttpResponse.cc
  3430. * src/FtpConnection.cc
  3431. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3432. Added XML2SAXMetalinkProcessor class, which is a lot faster than
  3433. the predecessor, Xml2MetalinkParser class.
  3434. I tested them against 94KB metalink file with 1234 chunk checksums.
  3435. The new one parsed it in 22msec, while it took 6000msec with old one.
  3436. * src/XML2SAXMetalinkProcessor.{h, cc}
  3437. * test/XML2SAXMetalinkProcessorTest.cc
  3438. * src/MetalinkParserController.{h, cc}
  3439. * test/MetalinkParserControllerTest.cc
  3440. * src/MetalinkParserState.h: Also added 16 subclasses.
  3441. * src/main.cc
  3442. * src/Metalink2RequestGroup.cc
  3443. * src/MetalinkHelper.cc
  3444. * src/MetalinkEntry.cc
  3445. * src/ChunkChecksum.h
  3446. Rewritten Base64 class for better performance.
  3447. * src/Base64.{h, cc}
  3448. * test/Base64Test.cc
  3449. * src/HttpRequest.cc
  3450. 2007-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3451. Fixed the bug#1841757: aria2 will connect to server to only get
  3452. file size.
  3453. * src/StreamFileAllocationEntry.cc
  3454. * src/option_processing.cc
  3455. * src/HttpResponseCommand.cc: Now reuse connection in segmented
  3456. downloads.
  3457. * src/FtpNegotiationCommand.cc
  3458. Suppressed wrong message when finding PreDownloadHandler
  3459. * src/RequestGroup.cc
  3460. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3461. Updated usage
  3462. * src/version_usage.cc
  3463. Updated man page
  3464. * doc/aria2c.1.txt
  3465. * doc/aria2c.1
  3466. Updated po files
  3467. * po/aria2c.pot
  3468. * po/*.po
  3469. * po/*.gmo
  3470. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3471. Eliminated g++-4.2 warning
  3472. * src/DownloadHandlerConstants.{h, cc}
  3473. * src/Util.cc
  3474. * test/MetaFileUtilTest.cc
  3475. * test/PStringBuildVisitorTest.cc
  3476. Fixed bug: --check-integrity doesn't work for multi file torrent.
  3477. * src/RequestGroup.cc
  3478. * src/BtCheckIntegrityEntry.cc
  3479. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3480. Fixed a2io.h
  3481. * src/a2io.h
  3482. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3483. Added direct I/O support. The current implementation uses O_DIRECT,
  3484. which is not posix standard and is tested on linux 2.6.21.
  3485. Currently only file allocation uses direct I/O.
  3486. * src/SingleFileAllocationIterator.{h, cc}
  3487. * test/SingleFileAllocationIteratorTest.cc
  3488. * src/MultiFileAllocationIterator.{h, cc}
  3489. * test/MultiFileAllocationIteratorTest.cc
  3490. * src/BinaryStream.h
  3491. * src/DiskWriter.h
  3492. * src/AbstractDiskWriter.{h, cc}
  3493. * src/ByteArrayDiskWriter.h
  3494. * src/DiskAdaptor.h
  3495. * src/AbstractSingleDiskAdaptor.{h, cc}
  3496. * src/MultiDiskAdaptor.{h, cc}
  3497. * src/FileAllocationEntry.cc
  3498. * src/Util.{h, cc}
  3499. * src/OptionHandlerFactory.cc
  3500. * src/prefs.h
  3501. * src/version_usage.cc
  3502. * src/option_processing.cc
  3503. Moved FileAllocationMan::markCurrentFileAllocationEntryDone() to
  3504. handleException.
  3505. * src/MultiFileAllocationIterator.cc
  3506. Added EINTR handling
  3507. * src/SocketCore.cc
  3508. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3509. Updated usage
  3510. * src/version_usage.cc
  3511. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3512. Applied Ross's patch for MinGW port.
  3513. * src/DownloadEngine.h
  3514. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3515. Set Content-Type to SingleFileDownloadContext when http response is
  3516. received.
  3517. * src/HttpResponseCommand.cc
  3518. * src/HttpResponse.{h, cc}
  3519. * test/HttpResponseTest.cc
  3520. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3521. Rewritten to add content-type support.
  3522. * src/DownloadHandler.{h, cc}
  3523. * src/BtPostDownloadHandler.{h, cc}
  3524. * test/BtPostDownloadHandlerTest.cc
  3525. * src/MetalinkPostDownloadHandler.{h, cc}
  3526. * test/MetalinkPostDownloadHandlerTest.cc
  3527. * src/PostDownloadHandler.{h, cc}
  3528. * src/DownloadHandlerConstants.{h, cc}
  3529. * src/RequestGroup.cc
  3530. * src/HttpResponseCommand.cc
  3531. * src/FtpNegotiationCommand.cc
  3532. * src/SingleFileDownloadContext.{h, cc}
  3533. * src/RequestGroup.h
  3534. * src/RequestGroupCriteria.h
  3535. * src/ContentTypeRequestGroupCriteria.h
  3536. Added 'mem' option value for --follow-metalink, --follow-torrent.
  3537. If it is give, metalink/torrent file is not written to the disk, but
  3538. just is kept in memory. Parsing is occurred on memory.
  3539. * src/MetalinkHelper.{h, cc}
  3540. * src/MetalinkProcessor.h
  3541. * src/Xml2MetalinkProcessor.{h, cc}
  3542. * test/Xml2MetalinkProcessorTest.cc
  3543. * src/DownloadHandlerFactory.{h, cc}
  3544. * test/DownloadHandlerFactoryTest.cc
  3545. * src/PreDownloadHandler.{h, cc}
  3546. * src/OptionHandlerFactory.cc
  3547. * src/DefaultBtContext.{h, cc}
  3548. * test/DefaultBtContextTest.cc
  3549. * src/version_usage.cc
  3550. * src/Metalink2RequestGroup.{h, cc}
  3551. * src/RequestGroup.{h, cc}
  3552. * src/a2functional.h
  3553. * test/a2functionalTest.cc
  3554. * src/MemoryBufferPreDownloadHandler.{h, cc}
  3555. * src/OptionHandlerImpl.h
  3556. * src/prefs.h
  3557. * src/Util.{h, cc}
  3558. * test/UtilTest.cc
  3559. Keep DownloadResult rather than RequestGroup after downloads to reduce
  3560. memory usage.
  3561. * src/RequestGroupMan.{h, cc}
  3562. * src/DownloadEngine.cc
  3563. * src/BtDependency.{h, cc}: Changed the type of dependee from
  3564. WeakHandle to SharedHandle because WeakHandle could be null.
  3565. * src/RequestGroup.{h, cc}
  3566. * src/DownloadEngineFactory.cc
  3567. * src/DownloadResult.h
  3568. Set totalLength after download finished
  3569. * src/UnknownLengthPieceStorage.{h, cc}
  3570. Keep torrent file specified in metalink in memory.
  3571. * src/Metalink2RequestGroup.cc
  3572. * src/BtDependency.cc
  3573. * src/TrueRequestGroupCriteria.h
  3574. Fixed the bug: seekg is used where seekp should be used.
  3575. * src/ByteArrayDiskWriter.cc
  3576. * test/ByteArraydiskWriterTest.cc
  3577. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3578. Fixed syntax error
  3579. * test/SequenceTest.cc
  3580. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3581. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  3582. * src/RequestGroupMan.cc (isSameFileBeingDownloaded)
  3583. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  3584. * src/RequestGroup.cc (downloadFinishedByFileLength)
  3585. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3586. Added the check to see whether ares_host_callback accepts timeouts
  3587. with c-ares; only c-ares 1.5.0 or newer accepts it.
  3588. * src/NameResolver.{h, cc}
  3589. * m4/libcares.m4
  3590. * configure.ac: Set C++ for language choice.
  3591. 2007-11-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3592. Fixed: compilation fails without c-ares/ares
  3593. * src/DownloadEngine.cc (addCommand): Moved outside #ifdef
  3594. Generate http/ftp commands only when download is incomplete.
  3595. * src/BtFileAllocationEntry.cc (prepareForNextAction)
  3596. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3597. Corrected typo. Examples are removed since they are available in man
  3598. page.
  3599. * src/version_usage.cc
  3600. Updated man page.
  3601. * doc/aria2c.1
  3602. * doc/aria2c.1.txt
  3603. * doc/makeman: Commented out sed command.
  3604. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3605. Throw DlAbortEx when a remote file is not found.
  3606. * src/HttpResponse.cc
  3607. * src/FtpNegotiationCommand.cc
  3608. * src/message.h
  3609. Overwrite an existing file if --allow-overwrite=true is given.
  3610. * src/RequestGroup.cc
  3611. Removed unused functions
  3612. * src/AbstractCommand.h
  3613. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3614. Removed 'extern' from 'extern typedef ...' in src/*.h
  3615. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3616. Updated usage
  3617. * src/version_usage.cc
  3618. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3619. Trim announce URL
  3620. * src/DefaultBtContext.cc
  3621. * test/ShaVisitorTest.cc
  3622. Trim argument s. Give trimed s to exception constructor.
  3623. * src/Util.cc (parseInt)(parseLLInt)
  3624. * test/UtilTest.cc
  3625. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3626. Set precision back to 1.
  3627. * src/ConsoleStatCalc.cc (calculateStat)
  3628. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3629. Replaced strtol with Util::parseInt
  3630. * src/ChunkedEncoding.cc
  3631. * src/HttpConnection.cc
  3632. * src/CookieBoxFactory.cc
  3633. * src/ParameterizedStringParser.cc
  3634. * src/Util.cc
  3635. * test/UtilTest.cc
  3636. * test/OptionHandlerTest.cc
  3637. * src/Request.cc
  3638. Throw exception when empty string is given. The message for exception
  3639. changed.
  3640. * src/Util.cc (parseInt)(parseLLInt)
  3641. * src/message.h
  3642. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3643. Set precision to 2 because share ratio is rounded into 1.0 if precision
  3644. set to 1.
  3645. * src/ConsoleStatCalc.cc (calculateStat)
  3646. 2007-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3647. Preallocate non-requested file which is adjacent forward to requested
  3648. file('requested' files means the files given in --select-file option)
  3649. if they share a same piece.
  3650. This fixes long pause in the file system which doesn't support sparse
  3651. files like FAT32 while downloading.
  3652. * src/MultiFileAllocationIterator.{h, cc}
  3653. * test/MultiFileAllocationIteratorTest.cc
  3654. * src/FileEntry.{h, cc}
  3655. Removed unused _option.
  3656. * src/MultiDiskAdaptor.h
  3657. * test/MultiDiskAdaptorTest.cc
  3658. * src/DefaultPieceStorage.cc
  3659. Set the default value of --seed-ratio to 1.0.
  3660. If 0.0 is given, then seeding continues regardless of share ratio.
  3661. * src/version_usage.cc
  3662. * src/option_processing.cc
  3663. * src/BtSetup.cc
  3664. * doc/aria2c.1.txt
  3665. * doc/aria2c.1
  3666. Fixed: Selective download is not working in BitTorrent
  3667. * src/RequestGroup.cc
  3668. Introduced Sequence class. Use this instead of Util::unfoldRange()
  3669. * src/PieceStorage.h
  3670. * test/MockPieceStorage.h
  3671. * src/UnknownLengthPieceStorage.h
  3672. * src/DefaultPieceStorage.{h, cc}
  3673. * src/Metalink2RequestGroup.cc
  3674. * src/RequestGroup.cc
  3675. * src/Sequence.h
  3676. * test/SequenceTest.cc
  3677. * src/IntSequence.h
  3678. * src/message.h
  3679. * src/Util.{h, cc}
  3680. * test/UtilTest.cc
  3681. Added new function 'parse' to catch exception thrown by subclass's
  3682. parseArg
  3683. * src/OptionHandler.h
  3684. * src/OptionParser.cc
  3685. * src/NameMatchOptionHandler.h
  3686. * src/OptionHandlerImpl.h
  3687. * test/OptionHandlerTest.cc
  3688. Added IntegerRangeOptionHandler. Used for --listen-port and
  3689. --select-file. Now --listen-port accepts range of port.
  3690. * src/OptionHandlerFactory.cc
  3691. * src/version_usage.cc
  3692. * src/OptionHandlerImpl.h
  3693. * src/option_processing.cc
  3694. * src/BtSetup.cc
  3695. * src/PeerListenCommand.{h, cc}
  3696. * doc/aria2c.1.txt
  3697. * doc/aria2c.1
  3698. Implemented operator< for Exception class to provide easy way to print
  3699. exception stack trace.
  3700. * src/Exception.{h, cc}
  3701. * src/main.cc
  3702. * src/option_processing.cc
  3703. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3704. * src/version_usage.cc
  3705. (showVersion): Reworked.
  3706. (showUsage): Added examples.
  3707. Removed Hint for total length and file name.
  3708. * src/Metalink2RequestGroup.cc
  3709. * src/RequestGroup.{h, cc}
  3710. * src/HttpResponseCommand.cc
  3711. * src/FtpNegotiationCommand.cc
  3712. Now --follow-torrent and --follow-metalink option work properly.
  3713. * src/RequestGroup.cc
  3714. Updated man page
  3715. * doc/aria2c.1.txt
  3716. * doc/aria2c.1
  3717. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3718. Removed.
  3719. * src/PiecedSegment.{h, cc} (operator==)(operator!=)
  3720. Use Segment::operator==()
  3721. * src/HttpConnection.cc
  3722. * src/Segment.h
  3723. Updated usage
  3724. * src/version_usage.cc
  3725. Added EINTR treatment.
  3726. * src/SocketCore.cc
  3727. * src/AbstractDiskWriter.cc
  3728. Rewritten.
  3729. * src/Util.cc (rangedFileCopy)
  3730. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3731. Fixed typo.
  3732. * src/version_usage.cc
  3733. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3734. Implemented. Now -c option works fine.
  3735. * src/DefaultPieceStorage.cc (markPiecesDone)
  3736. * test/DefaultPieceStorageTest.cc
  3737. Removed.
  3738. * src/SegmentMan.{h, cc}
  3739. (markAllPiecesDone)
  3740. (markPieceDone)
  3741. Synchronized po files with
  3742. https://translations.launchpad.net/aria2/trunk/+pots/aria2c
  3743. * src/fr.po
  3744. * src/ru.po
  3745. * src/de.po
  3746. * src/ja.po
  3747. 2007-11-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3748. Added ifdef and some modifications to compile without BitTorrent,
  3749. Metalink, MessageDigest
  3750. support.
  3751. * src/PieceHashCheckIntegrityEntry.cc
  3752. * src/MetalinkEntry.h
  3753. * src/version_usage.cc
  3754. * src/main.cc
  3755. * src/DownloadEngine.{h, cc}
  3756. * src/Metalink2RequestGroup.cc
  3757. * src/Peer.cc
  3758. * src/RequestGroup.cc
  3759. * src/MetalinkHelper.cc
  3760. * test/DefaultPieceStorageTest.cc
  3761. * test/MetalinkPostDownloadHandlerTest.cc
  3762. * test/Metalink2RequestGroupTest.cc
  3763. Hide TOTAL SPD when all downloads complete.
  3764. * src/ConsoleStatCalc.cc
  3765. Log target system information.
  3766. * src/main.cc
  3767. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3768. Now --metalink-location accepts a comma-deliminated list of locations.
  3769. * src/MetalinkEntry.{h, cc}
  3770. * test/MetalinkEntryTest.cc
  3771. * src/version_usage.cc
  3772. * src/Metalink2RequestGroup.cc
  3773. * src/Xml2MetalinkProcessor.cc
  3774. * test/Xml2MetalinkProcessorTest.cc
  3775. * doc/aria2c.1.txt
  3776. * doc/aria2c.1
  3777. * src/Util.cc (toUpper)(toLower): Rewritten.
  3778. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3779. Added the ability to detect duplicate download entry which is about to
  3780. download the same file other RequestGroup is downloading.
  3781. * src/RequestGroup.cc
  3782. * src/HttpResponseCommand.cc
  3783. * src/FtpNegotiationCommand.cc
  3784. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3785. Recalculates download progress when loading a control file,
  3786. if the piece length of DownloadContext is different from the one saved
  3787. in the control file. Currently in-flight pieces are ignored.
  3788. * src/DefaultBtProgressInfoFile.cc
  3789. * test/DefaultBtProgressInfoFileTest.cc
  3790. * src/Util.{h, cc}
  3791. * test/UtilTest.cc
  3792. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3793. Do not rotate tiers in announce-list.
  3794. * src/DefaultBtAnnounce.{h, cc}: Removed trackerNumTry.
  3795. AnnounceList::allTiersFailed() used instead to detect whether all
  3796. tiers are tried and failed.
  3797. * test/DefaultBtAnnounceTest.cc
  3798. * src/AnnounceList.{h, cc}: If all tiers are tried and failed then
  3799. allTiersFailed() returns true. To reset tier pointer, call resetTier();
  3800. * test/AnnounceListTest.cc
  3801. * src/TrackerWatcherCommand.cc (execute): Removed DlAbortEx catch
  3802. clause. Catch RecoverableException instead of DlRetryEx instead.
  3803. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3804. Implemented checksum validation feature(1 checksum for each file)
  3805. The validation takes place after the download.
  3806. * src/PieceHashCheckIntegrityEntry.{h, cc}: New class.
  3807. * src/IteratableChecksumValidator.{h, cc}: Rewritten.
  3808. * src/CheckIntegrityCommand.cc: Changed log message.
  3809. * src/Metalink2RequestGroup.cc: Set checksum to
  3810. SingleFileDownloadContext.
  3811. * src/StreamCheckIntegrityEntry.{h, cc}: Now derived from
  3812. PieceHashCheckIntegrity class.
  3813. * src/BtCheckIntegrityEntry.{h, cc}: Now derived from
  3814. PieceHashCheckIntegrity class.
  3815. * src/ChecksumCheckIntegrityEntry.{h, cc}: New class.
  3816. * src/IteratableValidator.h: New class.
  3817. * src/message.h
  3818. * src/CheckIntegrityEntry.{h, cc}
  3819. * src/IteratableChunkChecksumValidator.{h, cc}
  3820. * src/SingleFileDownloadContext.h
  3821. * src/DownloadCommand.cc
  3822. --allow-overwrite=true is no longer needed to check file integrity
  3823. before download in BitTorrent download.
  3824. * src/RequestGroup.cc (getInitialCommand)
  3825. Removed RequestGroup from queue when RequestGroup::getInitialCommand()
  3826. throws exception.
  3827. * src/RequestGroupMan.cc (getInitialCommands)
  3828. 2007-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3829. urlencode the given url inside Request::parseUrl(...)
  3830. * src/Request.{h, cc}
  3831. * src/Util.{h, cc}
  3832. * test/RequestTest.cc
  3833. Removed #!metalink3! notation support because it is deleted from
  3834. the metalink specification.
  3835. * src/Request.{h, cc}
  3836. * test/RequestTest.cc
  3837. 2007-11-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3838. Don't connect server before checking file integrity at startup, if
  3839. filesize and output file path are known.
  3840. * src/AbstractCommand.cc
  3841. * src/StreamFileAllocationEntry.cc
  3842. * src/Metalink2RequestGroup.cc
  3843. * src/RequestGroup.{h, cc}
  3844. * src/HttpResponseCommand.cc
  3845. * src/FtpNegotiationCommand.cc
  3846. Added DownloadFailureException. If it is thrown, RequestGroup should
  3847. halt.
  3848. * src/AbstractCommand.cc
  3849. * src/DownloadFailureException.h
  3850. * src/RequestGroup.cc
  3851. Catch RecoverableException, instead of DlAbortEx.
  3852. * src/RequestGroupMan.cc
  3853. * src/FillRequestGroupCommand.cc
  3854. * src/MetaFileUtil.cc
  3855. * src/IteratableChunkChecksumValidator.cc
  3856. Now first parameter of MSG_DOWNLOAD_ABORTED is gid(RequestGroup::
  3857. getGID())
  3858. * src/CheckIntegrityCommand.cc
  3859. * src/message.h
  3860. Print gid instead of idx.
  3861. * src/RequestGroupMan.cc
  3862. Removed exception throwers declaration.
  3863. * src/DirectDiskAdaptor.{h, cc}
  3864. * src/SocketCore.{h, cc}
  3865. * src/MultiDiskAdaptor.{h, cc}
  3866. * src/HttpConnection.{h, cc}
  3867. * src/HttpResponse.{h, cc}
  3868. * src/DiskAdaptor.{h, cc}
  3869. * src/CopyDiskAdaptor.{h, cc}
  3870. * src/MultiDiskAdaptor.{h, cc}
  3871. * src/HttpHeaderProcessor.{h, cc}
  3872. * src/AbstractSingleDiskAdaptor.{h, cc}
  3873. * src/Util.{h, cc}
  3874. * test/UtilTest.cc
  3875. * src/DefaultDiskWriter.{h, cc}
  3876. * src/FtpConnection.{h, cc}
  3877. * src/AbstractDiskWriter.{h, cc}
  3878. Removed duplicate code.
  3879. * src/StreamCheckIntegrityEntry.cc
  3880. Removed unnecessary include.
  3881. * src/DiskWriter.h
  3882. Included Exception.h
  3883. * src/option_processing.cc
  3884. Included 2 files and added doc
  3885. * src/TrackerWatcherCommand.cc
  3886. * src/SocketCore.cc (writeData): Fixed send error with GnuTLS.
  3887. 2007-11-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3888. Changed CheckIntegrityEntry interface so that it can define
  3889. the action when all the chunk checksums are valid.
  3890. * src/CheckIntegrityEntry.h
  3891. * src/StreamCheckIntegrityEntry.{h, cc}
  3892. * src/BtCheckIntegrityEntry.{h, cc}: Currently,when all the checksums
  3893. are valid, then aira2 goes to seeding mode. Sometimes it is better
  3894. to exit rather than doing seeding. So, it would be good to toggle this
  3895. behavior.
  3896. * src/CheckIntegrityCommand.cc
  3897. * src/AbstractCommand.cc
  3898. * src/RequestGroup.cc
  3899. 2007-11-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3900. Reflect the download length of in-flight pieces.
  3901. It makes the download length readout more precise.
  3902. * src/DefaultPieceStorage.{h, cc}
  3903. * test/DefaultPieceStorageTest.cc
  3904. * src/a2functional.h
  3905. * test/a2functionalTest.cc
  3906. Lower CPU load when --max-download-limit is used.
  3907. There is up and down in speed indicator when enabling
  3908. http-pipelining but a download goes well. I think the problem is that
  3909. because http-pipelining is enabled, DownloadCommand is created for
  3910. each segment and in its constructor, PeerStat::downloadStart() is
  3911. called. In PeerStat::downloadStart(), speed calculation object is
  3912. reseted, which makes download speed zero.
  3913. * src/DownloadCommand.cc
  3914. Rewritten using accumulate.
  3915. * src/RequestGroupMan.cc (calculateStat)
  3916. Code clearnup.
  3917. * src/FtpNegotiationCommand.cc
  3918. * src/HttpResponseCommand.cc
  3919. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3920. Fixed: Can not resume: aria2 reports download already finished.
  3921. * src/AbstractCommand.{h, cc}
  3922. * src/HttpResponseCommand.cc
  3923. * src/FtpNegotiateCommand.cc
  3924. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3925. Now a file is stored in the directory specified in .metalnk file
  3926. (file[@name]).
  3927. * src/Metalink2RequestGroup.cc
  3928. Create the directory structure when opening the file if it doesn't
  3929. exist.
  3930. * src/AbstractDiskWriter.cc
  3931. * src/Util.{h, cc}
  3932. * src/File.h
  3933. * test/UtilTest.cc
  3934. Removed file name comparison
  3935. * src/Metalink2RequestGroup.cc
  3936. * src/HttpResponseCommand.cc
  3937. Rewritten using Util::mkdirs()
  3938. * src/FileEntry.cc (setupDir)
  3939. * test/FileEntryTest.cc
  3940. Updated doc
  3941. * src/SingleFileDownloadContext.h
  3942. 2007-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3943. Now SleepCommand dispatches nextCommand when halt is requested.
  3944. It avoids a possible long wait after hitting CTRL-C.
  3945. * src/SleepCommand.{h, cc}
  3946. * src/RequestGroupAware.{h, cc}
  3947. 2007-11-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3948. Fixed: the listen port sent to the tracker is wrong. If aria2 fails
  3949. to open listen port, then remove the port number from the tracker
  3950. request.
  3951. * src/DefaultBtAnnounce.cc
  3952. * test/DefaultBtAnnounceTest.cc
  3953. * test/MockPieceStorage.h
  3954. Inject randomizer to DefaultBtAnnounce and DefaultBtContext to make
  3955. them more testable.
  3956. * src/DefaultBtAnnounce.{h, cc}
  3957. * src/DefaultBtContext.{h, cc}
  3958. * src/Util.{h, cc}
  3959. * test/DefaultBtAnnounceTest.cc
  3960. * test/DefaultBtContextTest.cc
  3961. * test/UtilTest.cc
  3962. Added 'B' to upload bytes readout.
  3963. * src/ConsoleStatCalc.cc
  3964. Now the listen port for BitTorrent download is opened when it is
  3965. needed.
  3966. * src/DownloadEngineFactory.cc
  3967. * src/BtSetup.{h, cc}
  3968. * src/PeerListenCommand.{h, cc}
  3969. Now an exception thrown while parsing tracker response is now logged.
  3970. If DlAbortEx is catched, then btAnnounce->resetAnnounce() immediately
  3971. called, which means no retry is made in this case, assuming a tracker
  3972. has a problem.
  3973. * src/TrackerWatcherCommand.cc
  3974. Fixed: downloading a file whose length is unkown fails.
  3975. * src/DownloadCommand.cc
  3976. Simplified prepareForNextSegment()
  3977. * src/DownloadCommand.cc
  3978. Updated
  3979. * po/POTFILES.in
  3980. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3981. Re-implemented a file listing for Metalink, which was dropped while
  3982. http/ftp/torrent integration was being implemented.
  3983. * src/MetalinkHelper.{h, cc}: New class.
  3984. * test/MetalinkHelperTest.cc
  3985. * src/main.cc
  3986. * src/Metalink2RequestGroup.cc
  3987. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3988. Added the ability to display the detailed torrent file information.
  3989. Now -S option gives not only a file listing, but also total download
  3990. length, info hash, announce URI, piece length, the number of pieces,
  3991. and mode(single or multi-torrent).
  3992. * src/DefaultBtContext.{h, cc} (operator<<): New function.
  3993. * src/Util.cc (toStream): Show file length in a abbreviated form(like
  3994. KiB)
  3995. * test/UtilTest.cc
  3996. * src/main.cc
  3997. 2007-10-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3998. Added ftp://USER:PASSWD@Servername automatic parsing.
  3999. * src/Request.{h, cc}: Removed AuthResolvers. Added _username and
  4000. _password. Recognize username and password in URI.
  4001. * src/main.cc: Use AuthConfigFactory instead of RequestFactory.
  4002. * src/RequestGroup.cc: Use AuthConfigFactory instead of RequestFactory.
  4003. * src/RequestFactory.{h, cc}: Removed.
  4004. * src/AuthConfigFactory.{h, cc}: New class.
  4005. * src/FtpConnection.cc: Use AuthConfigFactory.
  4006. * src/HttpRequest.cc: Use AuthConfigFactory.
  4007. * test/HttpRequestTest.cc: Updated.
  4008. * test/RequestTest.cc: Updated.
  4009. * test/AuthConfigFactoryTest.cc: New class.
  4010. * test/RequestFactoryTest.cc: Removed.
  4011. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4012. Use RequestGroup::allDownloadFinished() to decide whether the control
  4013. file should be removed or saved.
  4014. * src/RequestGroup.{h, cc} (allDownloadFinished): New function.
  4015. * src/RequestGroupMan.cc (removeStoppedGroup) (save)
  4016. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4017. Use File::renameTo()
  4018. * src/DefaultBtProgressInfoFile.cc
  4019. Added --no-file-allocation-limit command-line option.
  4020. * src/version_usage.cc
  4021. * src/option_processing.cc
  4022. * src/OptionHandlerFactory.cc
  4023. * src/RequestGroup.{h, cc}
  4024. * src/BtCheckIntegrityEntry.cc
  4025. * src/StreamCheckIntegrityEntry.cc
  4026. * src/prefs.h
  4027. * doc/aria2c.1.txt
  4028. * doc/aria2c.1
  4029. Now prealloc is the default value for --file-allocation option.
  4030. * src/version_usage.cc
  4031. * src/option_processing.cc
  4032. * doc/aria2c.1.txt
  4033. * doc/aria2c.1
  4034. Don't URL-encode user-agent.
  4035. * src/HttpRequest.cc
  4036. Updated translations
  4037. * po/LINGUAS: Added nl for Dutch translation.
  4038. * po/nl.po: Added Dutch translation, thanks to A. Bram Neijt.
  4039. * po/de.po: Updated German translation, thanks to Patrick Ruckstuhl.
  4040. * po/POTFILES.in: Updated.
  4041. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4042. Added the ability to recognize url-list in a torrent file.
  4043. The retrieved URLs are attached to the corresponding FileEntry.
  4044. * src/DefaultBtContext.{h, cc}
  4045. * src/FileEntry.{h, cc}
  4046. * test/DefaultBtContextTest.cc
  4047. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4048. * src/ConsoleStatCalc.cc: Let the user know that aria2 is now seeding
  4049. after the download finishes.
  4050. 2007-10-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4051. * src/Piece.{h, cc}: Added SubPiece infrastructure to track down
  4052. the data smaller than block length.
  4053. A block length can be specified by constructor's argument.
  4054. * src/DefaultPieceStorage.{h, cc} (getMissingPiece):
  4055. Get a missing piece in the range of given FileEntry. This function is
  4056. not used in the program yet.
  4057. * src/Util.h: Added some macros.
  4058. 2007-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4059. Added HTTP/1.1 keep alive and pipelining support.
  4060. See --enable-http-keep-alive and --enable-http-pipelining option.
  4061. * src/AbstractCommand.{h, cc}: Now it has one-to-many relation to
  4062. Segment.
  4063. * src/HttpDownloadCommand.{h, cc}
  4064. * src/OptionHandlerFactory.cc
  4065. * src/HttpConnection.{h, cc}
  4066. * src/version_usage.cc
  4067. * src/HttpInitiateConnectionCommand.cc
  4068. * src/FtpInitiateConnectionCommand.cc
  4069. * src/Segment.h
  4070. * src/HttpRequestCommand.{h, cc}
  4071. * src/option_processing.cc
  4072. * src/prefs.h
  4073. * src/HttpResponseCommand.cc
  4074. * src/SegmentMan.{h, cc}
  4075. * src/FtpNegotiateCommand.cc
  4076. * src/HttpProxyResponseCommand.cc
  4077. * src/Request.cc
  4078. * src/HttpRequest.cc
  4079. * src/DownloadCommand.cc
  4080. * test/HttpRequestTest.cc
  4081. * test/RequestTest.cc
  4082. 2007-10-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4083. * src/ConsoleCalc.cc (calculateStat): Hide SPD after the download
  4084. finished.
  4085. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4086. * src/Metalink2RequestGroup.cc (generate): Throw exception instead of
  4087. catching it inside the method.
  4088. When no file entry is found in a metalink without querying user
  4089. preferences, throw the exception with the error message that suggests
  4090. metalink file is probably broken.
  4091. * src/RequestGroup.cc (postDownloadProcessing): Catch exception here.
  4092. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4093. Fixed the bug that prevents remote Metalink/Torrent file from begin
  4094. processed.
  4095. * src/RequestGroupMan.cc (removeStoppedGroup)
  4096. Added debug message.
  4097. * src/BtPostDownloadHandler.cc
  4098. * src/MetalinkPostDownloadHandler.cc
  4099. * src/PostDownloadHandler.{h, cc}
  4100. * src/RequestGroup.cc
  4101. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4102. * src/Request.cc (parseUrl): Removed unnecessary slashes around dir.
  4103. 2007-10-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4104. * src/MultiUrlRequestInfo.h: Updated the message shown when program
  4105. stops and there are any unfinished or in-progress downloads.
  4106. Added the legend of "stat".
  4107. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4108. Throw exception when chunck checksum verification fails.
  4109. * src/DownloadCommand.cc (validatePieceHash): New function.
  4110. * src/PiecedSegment.{h, cc} (clear): New function.
  4111. * src/GrowSegment.{h, cc} (clear): New function.
  4112. * src/Segment.h (clear): New function.
  4113. * src/SegmentMan.{h, cc} (validatePieceHash): Removed.
  4114. * test/SegmentTest.cc
  4115. * test/GrowSegmentTest.cc
  4116. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4117. Do not send referer when redirected.
  4118. * src/Request.cc (redirectUrl)
  4119. * test/RequestTest.cc
  4120. * test/HttpRequestTest.cc
  4121. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4122. Implemented BitTorrent/http/ftp integrated download.
  4123. I've rewritten lots of files and now some headers have forward
  4124. class declarations to reduce compile time.
  4125. The implementation is extremely alpha stage, I recommend to use this
  4126. for testing purpose only.
  4127. 2007-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4128. Fixed the compilation error on 64bit platform.
  4129. * test/HttpHeaderProcessorTest.cc
  4130. 2007-09-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4131. Merged Ross's patch that fixes compilation problem in MinGW
  4132. * test/DefaultBtProgressInfoFileTest.cc
  4133. 2007-09-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4134. Updated fr.po by sebone
  4135. * po/fr.po
  4136. Updated man page.
  4137. * doc/aria2c.1.txt
  4138. * Release 0.11.3
  4139. 2007-09-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4140. * src/MetalinkRequestInfo.cc (execute): Fixed BitTorrent download
  4141. failure in Metalink.
  4142. 2007-09-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4143. Automatically save *.aria2 control file of http/ftp download in every
  4144. 60 seconds.
  4145. * src/AutoSaveCommand.{h, cc}: New class.
  4146. * src/TimeBasedCommand.{h, cc}: New class.
  4147. * src/DownloadEngineFactory.cc (newConsoleEngine)
  4148. Disable parameterized URI support by default. Added -P option to
  4149. enable the feature.
  4150. * src/prefs.h: Added PREF_PARAMETERIZED_URI
  4151. * src/OptionHandlerFactory.cc
  4152. * src/main.cc: Also updated usages for -Z and --auto-file-renaming
  4153. Updated Japanese translation.
  4154. * po/ja.po
  4155. Updated man page.
  4156. * doc/aria2c.1.txt
  4157. * Release 0.11.3-rc
  4158. 2007-09-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4159. Now *.aria2 contorol file is first saved to *.aria2__temp and if
  4160. it is successful, then renamed to *.aria2.
  4161. This prevents *.aria2 file from being truncated or corrupted when
  4162. file system becomes out of space.
  4163. * src/DefaultBtProgressInfoFile.cc (save)
  4164. * src/SegmentMan.cc (save)
  4165. * test/DefaultBtProgressInfoFileTest.cc (testSave): Implemented.
  4166. 2007-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4167. Reduced the fragmentation of bitfield in http/ftp download.
  4168. * src/BitfieldMan.cc (getSparseMissingUnusedIndex)
  4169. * test/BitfieldManTest.cc
  4170. 2007-08-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4171. Added the ability to disable segmented download in .metalink.
  4172. aria2 can now recognize 'maxconnections' attribute in 'resources' and
  4173. 'url' tag.
  4174. * src/MetalinkEntry.{h, cc}
  4175. * src/RequestResource.{h, cc}
  4176. * src/MetalinkRequestInfo.cc
  4177. * src/Xml2MetalinkProcessor.cc
  4178. * test/Xml2MetalinkProcessorTest.cc
  4179. 2007-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4180. Added parameterized URI support.
  4181. * src/main.cc: -Z option added.
  4182. * src/OptionHandlerFactory.cc
  4183. * src/prefs.h: Added PREF_FORCE_SEQUENTIAL.
  4184. * src/PStringDatum.h: New class.
  4185. * src/PStringSegment.{h,cc}: New class.
  4186. * src/PStringNumLoop.h: New class.
  4187. * src/PStringSelect.h: New class.
  4188. * src/NumberDecorator.h: New class.
  4189. * src/FixedWidthNumberDecorator.h: New class.
  4190. * src/AlphaNumberDecorator.h: New class.
  4191. * src/PStringVisitor.h: New class.
  4192. * src/PStringBuildVisitor.{h,cc}: New class.
  4193. * src/ParameterizedStringParser.{h,cc}: New class.
  4194. * src/Util.{h,cc}
  4195. (isNumber): New function.
  4196. (isLowercase): New function.
  4197. (isUppercase): New function.
  4198. (alphaToNum): New function.
  4199. * test/ParameterizedStringParserTest.cc: New class.
  4200. * test/AlphaNumberDecoratorTest.cc: New class.
  4201. * test/PStringBuildVisitorTest.cc: New class.
  4202. * test/UtilTest.cc
  4203. (testIsNumber): New function.
  4204. (testIsLowercase): New function.
  4205. (testIsUppercase): New function.
  4206. (testAlphaToNum): New function.
  4207. Added '\n' after the error message
  4208. * src/RequestInfo.h (printDownloadAbortMessage)
  4209. Added auto file renaming feature in http(s)/ftp download.
  4210. * src/main.cc: Added --auto-file-renaming command-line option.
  4211. * src/OptionHandlerFactory.cc
  4212. * src/prefs.h: Added PREF_AUTO_FILE_RENAMING
  4213. * src/RequestGroup.{h, cc}
  4214. (shouldCancelDownloadForSafety): Rewritten
  4215. (tryAutoFileRenaming): New function.
  4216. * src/SegmentMan.{h, cc} (shouldCancelDownloadForSafety): Removed.
  4217. * src/HttpResponseCommand.cc
  4218. (executeInternal): Removed the call to RequestGroupMan::
  4219. isSameFileBeingDownloaded()
  4220. * src/FtpNegotiateCommand.cc
  4221. (recvSize): Removed the call to RequestGroupMan::
  4222. isSameFileBeingDownloaded()
  4223. * test/RequestGroupTest.cc: New class.
  4224. 2007-08-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4225. Merged Ross's patch: Removed setmode(). Use _CRT_fmode to enable binary
  4226. IO.
  4227. * src/DefaultBtProgressInfoFile.cc
  4228. * src/MetaFileUtil.cc
  4229. * src/SimpleLogger.cc
  4230. * src/SegmentMan.cc
  4231. * src/Util.cc
  4232. * src/Platform.cc
  4233. 2007-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4234. * src/Xml2MetalinkProcessor.cc (getPieceHash): Added missing .c_str().
  4235. 2007-08-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4236. Avoid sparse files if possible, because VFAT32 doesn't support it.
  4237. * src/DefaultDiskWriter.cc (initAndOpenFile)
  4238. Fixed the bug that prevents file allocation is not done when
  4239. dowloading multi-torrent file.
  4240. * src/AbstractDiskWriter.cc (openFile)
  4241. Increase the maximum number of -j option from 15 to 45.
  4242. * src/OptionHandlerFactory.cc (createOptionHandlers)
  4243. Added fr.po, thanks to Charles Landemaine.
  4244. * po/fr.po
  4245. * po/LINGUAS
  4246. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  4247. gcc 3.4.4 support:
  4248. * src/DefaultBtContext.cc: int32_t -> int
  4249. * src/main.cc: int -> int32_t, int32_t -> int
  4250. * src/messageDigest.h: uint32_t -> unsigned int
  4251. * src/NameResolver.h: int32_t -> int
  4252. * src/PeerConnection.cc: int -> int32_t
  4253. * src/SpeedCalc.cc: int32_t -> int
  4254. * src/TrackerUpdateCommand.h: int -> int32_t
  4255. * src/Util.cc: int32_t -> int
  4256. * src/Util.h: int32_t -> int
  4257. * src/Xml2MetalinkProcessor.cc: int -> uint32_t, int64_t -> uint64_t
  4258. * test/AnnounceListTest.cc: int -> int32_t
  4259. * test/ChunkedEncodingTest.cc: int -> int32_t
  4260. * test/DataTest.cc: int -> int32_t
  4261. * test/DefaultBtRequestFactoryTest.cc: int -> int32_t
  4262. * test/DefaultPeerListProcessorTest.cc: int -> int32_t
  4263. * test/DefaultPieceStorageTest.cc: int -> int32_t
  4264. * test/FeatureConfigTest.cc: int -> int32_t
  4265. * test/MetalinkEntryTest.cc: int -> int32_t
  4266. * test/MockBtRequestFactory.h: int -> int32_t
  4267. * test/MockPieceStorage.h: int -> int32_t
  4268. * test/OptionTest.cc: int -> int32_t
  4269. * test/RequestTest.cc: int -> int32_t
  4270. * test/SegmentManTest.cc: int -> int32_t
  4271. * test/Xml2MetalinkProcessorTest.cc: int -> int32_t
  4272. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  4273. Move sleep functions to Util class:
  4274. * src/Util.cc
  4275. (sleep): New function.
  4276. (usleep): New function.
  4277. * src/DownloadCommand.cc: sleep -> Util::sleep
  4278. * test/TimeSeedCriteriaTest.cc: sleep -> Util::sleep
  4279. MinGW build enhancements. The following files are added:
  4280. * src/timegm.{c,h}
  4281. Changes to support the above new files:
  4282. * configure.ac
  4283. * src/Makefile.am
  4284. * src/a2time.h
  4285. * src/Util.cc:
  4286. * src/strptime.c: Added support for %Z option.
  4287. Fixed MinGW non-blocking bug.
  4288. * src/SocketCore.cc
  4289. * src/HttpRequestCommand.cc
  4290. Miscellenous build fixes/enhancements.
  4291. * configure.ac: Added summary report.
  4292. * src/Platform.h: Tweaked #include's.
  4293. * src/a2netcompat.h: Tweaked #include's.
  4294. * src/strptime.h: Tweaked #include's.
  4295. * src/gai_strerror.c: Tweaked #include's.
  4296. * src/gai_strerror.h: _D_GETADDRINFO_H -> _D_GAI_STRERROR_H
  4297. * src/getaddrinfo.h: Moved #ifndef __MINGW32__
  4298. * src/gettimeofday.h: Added HAVE_CONFIG_H
  4299. 2007-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4300. Increased the initial connection size in BitTorrent download to 40.
  4301. * src/BtRuntime.h
  4302. Added the usage message of --peer-id-prefix option.
  4303. * src/main.cc
  4304. * Release 0.11.2
  4305. 2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4306. MessageDigestHelper is introduced in order to simplify the use
  4307. of message digest. Removed repeated code.
  4308. The message digest algorithm is now specified by string, like "sha1",
  4309. "md5".
  4310. * src/messageDigest.{h, cc}
  4311. * src/MessageDigestHelper.{h, cc}: New class.
  4312. * src/DefaultPieceStorage.cc
  4313. * src/DefaultBtContext.{h, cc}
  4314. (computeFastSet): New function.
  4315. (setInfoHash): Added for unit testing.
  4316. (setNumPieces): Added for unit testing.
  4317. * src/DefaultBtInteractive.cc
  4318. * src/BtPieceMessage.cc
  4319. * src/Peer.cc
  4320. * src/Checksum.h
  4321. * src/message.h
  4322. * src/IteratableChecksumValidator.h
  4323. * src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator
  4324. inside it.
  4325. * src/SegmentMan.{h, cc}
  4326. (checkIntegrity): Removed.
  4327. * src/IteratableChunkChecksumValidator.{h, cc}
  4328. * src/Util.h
  4329. (sha1Sum): Removed.
  4330. (simpleMessageDigest): Removed.
  4331. (fileChecksum): Removed.
  4332. (computeFastSet): Removed.
  4333. * src/ShaVisitor.cc
  4334. * src/ChunkChecksum.h
  4335. * src/DownloadCommand.cc
  4336. Removed messageDigest virtual functions.
  4337. * src/MultiDiskAdaptor.{h, cc}
  4338. * src/DiskAdaptor.h
  4339. * src/ByteArrayDiskWriter.h
  4340. * src/DiskWriter.h
  4341. * src/DiskAdaptorWriter.h
  4342. * src/AbstractSingleDiskAdaptor.{h, cc}
  4343. * src/AbstractDiskWriter.{h, cc}
  4344. Fixed comilation error when message digest is disabled.
  4345. * src/MetalinkEntry.{h, cc}
  4346. * src/MetalinkRequestInfo.cc
  4347. Removed srandom and random.
  4348. * src/SimpleRandomizer.h
  4349. Added size() virtual function to DiskAdaptor
  4350. * src/MultiDiskAdaptor.h
  4351. Fixed the bug that causes that files are not opened correctly in
  4352. multi-file torrent.
  4353. * src/TorrentRequestInfo.cc
  4354. * src/MultiDiskAdaptor.cc
  4355. Added SHA256 support
  4356. * src/messageDigest.cc
  4357. * src/Xml2MetalinkProcessor.cc
  4358. Show supported message digest algorithms
  4359. * src/main.cc
  4360. Updated contact info.
  4361. * src/main.cc
  4362. Applied Ross's patch
  4363. * src/a2netcompat.h
  4364. * src/main.cc
  4365. Fixed the bug that prevents a remote metalink from not being processed
  4366. even if '-o foo.metalink' is specified.
  4367. * src/MetalinkRequestInfo.cc
  4368. 2007-08-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4369. Merged Dan's patch:
  4370. * src/ByteArrayDiskWriter.cc: ios_base -> ios
  4371. Use va_copy to avoid core dump on amd64:
  4372. * src/SimpleLogger.cc
  4373. Updated contact info.
  4374. * src/main.cc
  4375. Added #ifdef ENABLE_MESSAGE_DIGEST to fix test errors when message
  4376. digest is not available.
  4377. * src/MetalinkEntry.h
  4378. 2007-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4379. Make a2netcompat.h include a2io.h to fix compilation error:
  4380. * src/a2netcompat.h
  4381. * src/SocketCore.cc: Removed include of a2io.h
  4382. * src/Util.cc: Removed include of a2io.h
  4383. Gather time related functions to a2time.h:
  4384. * src/a2time.h: New file.
  4385. * src/DefaultPeerStorage.cc
  4386. * src/SimpleLogger.cc
  4387. * src/Util.{h, cc}
  4388. * src/SimpleRandomizer.h
  4389. * src/TimeA2.{h,cc}
  4390. * src/DownloadCommand.cc
  4391. * src/main.cc
  4392. Removed #ifdef __MINGW32__ since gai_strerror is included in
  4393. a2netcompat.h:
  4394. * src/NameResolver.cc
  4395. Fixed compilation error without openssl:
  4396. * src/SocketCore.{h,cc}: Moved include of openssl/err.h to SocketCore.h
  4397. Added default block to suppress compiler warnings:
  4398. * src/MetalinkRequestInfo.cc (AccumulateNonP2PUrl::operator())
  4399. 2007-07-26 Ross Smith II <aria2spam at smithii dot com>
  4400. MinGW build enhancements. The following files are added:
  4401. * src/gai_strerror.{c,h}
  4402. * src/gettimeofday.{c,h}
  4403. Changes to support the above new files:
  4404. * configure.ac
  4405. * src/Makefile.am
  4406. * src/a2netcompat.h
  4407. * src/TimeA2.cc
  4408. * src/DefaultPeerStorage.cc
  4409. * src/NameResolver.cc: removed mingw_strerror() function.
  4410. * src/SocketCore.cc: removed mingw_strerror() function.
  4411. Miscellaneous MinGW build fixes.
  4412. * src/a2io.h: Use _lseeki64() instead of lseek()
  4413. * src/common.h
  4414. * src/DefaultFileAllocator.cc
  4415. * src/GlowFileAllocator.cc
  4416. * src/main.cc: Moved #include "prefs.h" to quiet compile error.
  4417. * src/NameResolver.cc
  4418. (callback): Changed int32_t to int.
  4419. (resolve): Changed int32_t to int.
  4420. * src/Platform.cc
  4421. * src/Platform.h
  4422. * test/MultiDiskWriterTest.cc
  4423. * test/PeerMessageUtilTest.cc
  4424. * src/localtime_r.c: Add DeleteCriticalSection() and at exit().
  4425. Other enhancements and fixes.
  4426. * src/HttpRequestCommand.cc
  4427. (executeInternal) Use non-blocking socket for HTTPS (MinGW only).
  4428. * src/SocketCore.cc:
  4429. (error): New function to abstract errno/WSAGetLastError().
  4430. (errorMsg): New function to abstract errno/WSAGetLastError().
  4431. (initiateSecureConnection): Added more detailed error reporting.
  4432. * src/SocketCore.h: Added private variable blocking, to allow
  4433. proper handling of OpenSSL psuedo-errors.
  4434. * src/message.h
  4435. (EX_SSL_INIT_FAILURE)
  4436. (EX_SSL_IO_ERROR)
  4437. (EX_SSL_PROTOCOL_ERROR)
  4438. (EX_SSL_UNKNOWN_ERROR)
  4439. (EX_SSL_CONNECT_ERROR)
  4440. (EX_SOCKET_BLOCKING)
  4441. (EX_SOCKET_NONBLOCKING)
  4442. (EX_SOCKET_UNKNOWN_ERROR)
  4443. * src/Util.cc
  4444. (setGlobalSignalHandler): Renamed signal to sig as signal is a
  4445. reserved name.
  4446. (httpGMT): Fixed typo.
  4447. 2007-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4448. Merged Ross's win32 patch(manually)
  4449. In the course of merging, following files are added.
  4450. * src/strptime.{h,c}
  4451. * src/libgen.{h,c}
  4452. * src/inet_aton.{h,c}
  4453. * src/Platform.{h,cc}
  4454. * src/localtime_r.{h,c}
  4455. * src/getaddrinfo.{h,c}
  4456. I've gethered network related things, and put them to following file:
  4457. * src/a2netcompat.h
  4458. Also io related things are put to following file:
  4459. * src/a2io.h
  4460. Changed %lld to %s because mingw32 doesn't recognize %lld.
  4461. * src/message.h
  4462. (MSG_ALLOCATION_COMPLETED)
  4463. (EX_TOO_LARGE_FILE)
  4464. (EX_SIZE_MISMATCH)
  4465. (EX_FILE_OFFSET_OUT_OF_RANGE)
  4466. (EX_INVALID_CHUNK_CHECKSUM)
  4467. (EX_INVALID_RANGE_HEADER)
  4468. * src/FileAllocationCommand.cc
  4469. * src/HttpResponse.cc
  4470. * src/RequestGroup.cc
  4471. * src/MultiDiskAdaptor.cc
  4472. * src/OptionHandlerImpl.h
  4473. * src/HttpResponseCommand.cc
  4474. * src/FtpNegotiateCommand.cc
  4475. * src/IteratableChecksumValidator.cc
  4476. * src/SegmentMan.cc
  4477. * src/ChunkChecksumValidator.cc
  4478. Added Randomizer::getRandomNumber(long int)
  4479. * src/Randomizer.h (getRandomNumber)
  4480. * src/SimpleRandomizer.h (getRandomNumber)
  4481. * src/BitfieldMan.cc (getMissingIndexRandomly): Use this new function.
  4482. * src/Util.cc (randomAlpha): Use this new function.
  4483. 2007-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4484. Converted int's to in32_t. long long int's are also converted to
  4485. int64_t
  4486. 2007-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4487. Fixed the bug that prevents cookies from being sent to the server
  4488. if the domain of cookie is FQDN and starts with ".".
  4489. * src/Cookie.cc (match)
  4490. To add the ability to change peer id.
  4491. * src/DefaultBtContext.h
  4492. (_peerIdPrefix): New variable
  4493. (setPeerIdPrefix): New function.
  4494. * src/torrentRequestInfo.cc
  4495. (execute): Set the option value of PREF_PEER_ID_PREFIX to
  4496. DefaultBtContext.
  4497. * src/main.cc (main): Added peer-id-prefix command-line option.
  4498. The usage message is not added yet.
  4499. * src/DefaultBtContext.cc
  4500. (generatePeerId): Use _peerIdPrefix.
  4501. * src/prefs.h (PREF_PEER_ID_PREFIX): New definition.
  4502. 2007-07-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4503. Fixed the bug that prevents filename in content-disposition from
  4504. being retrieved when filename is not quoted.
  4505. * src/Util.cc (getContentDispositionFilename)
  4506. Fixed the bug that causes infinate loop and memory leak when file open
  4507. operation failed.
  4508. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  4509. 2007-07-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4510. Fixed the bug that causes segfault when all URIs specified are
  4511. unsupported.
  4512. * src/RequestGroupMan.cc (getInitialCommands)
  4513. Check if RequestGroup::createNextCommand() returns empty list of
  4514. commands.
  4515. * src/RequestGroup.cc (createNextCommand)
  4516. Change log level from info to error so that users can notice that
  4517. an error occurred.
  4518. Fixed the bug that causes segfault when a zero-sized file is
  4519. downloaded.
  4520. * src/BitfieldMan.cc (isAllBitSet)
  4521. Return true if bitfieldLength is 0.
  4522. 2007-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4523. * src/main.cc
  4524. (showUsage): Added 3 usage examples for metalink download.
  4525. Replace MetalinkChunkChecksum with ChunkChecksum.
  4526. * src/MetalinkChunkChecksum.h: Removed.
  4527. * src/MetalinkEntry.h: MetalinkChunkChecksum -> ChunkChecksum.
  4528. * src/Xml2MetalinkProcessor.h: MetalinkChunkChecksum -> ChunkChecksum.
  4529. * src/Xml2MetalinkProcessor.cc
  4530. (getPieceHash): Use ChunkChecksum instead of MetalinkChunkChecksum.
  4531. * src/MetalinkRequestInfo.cc (execute)
  4532. * Release 0.11.1
  4533. 2007-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4534. Reads URIs from stdin when "-i -" is specified.
  4535. * src/UriFileListParser.h, src/UriFileListParser.cc: Removed.
  4536. * src/UriListParser.h, src/UriListParser.cc: New class.
  4537. * src/StreamUriListParser.h: New class.
  4538. * src/FileUriListParser.h: New class.
  4539. * src/main.cc (main): Use StreamUriListParser and FileUriListParser
  4540. instead of UriFileListParser.
  4541. 2007-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4542. Made console readout more readable.
  4543. * src/ConsoleDownloadEngine.cc (sendStatistics)
  4544. 2007-07-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4545. Fix the bug that causes -s option not to work.
  4546. * src/main.cc (main)
  4547. * src/a2algo.h: New file.
  4548. 2007-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4549. Create directory structure specified in metalink file.
  4550. * src/RequestGroup.h, src/RequestGroup.cc
  4551. (initAndOpenFile): Create a directory to store files if it does not
  4552. exist.
  4553. (getDir): New function.
  4554. Added ETA and download speed for an individual file to readout.
  4555. * src/ConsoleDownloadEngine.cc (sendStatistics)
  4556. * src/RequestGroup.h
  4557. (calculateDownloadSpeed): New function.
  4558. 2007-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4559. Made -S option work with metalink file and provided selective download
  4560. to metalink.
  4561. * src/MetalinkEntry.h, src/MetalinkEntry.cc
  4562. (filename): Removed.
  4563. (file): New variable.
  4564. (size): Removed.
  4565. (operator=): Updated.
  4566. (getPath): New function.
  4567. (getLength): New function.
  4568. (toFileEntry): New function.
  4569. * src/TorrentRequestInfo.h, src/TorrentRequestInfo.cc
  4570. (execute): Use toStream.
  4571. (showFileEntry): Removed.
  4572. * src/MetalinkRequestInfo.h
  4573. (targetFiles): New variable.
  4574. (setTargetFiles): New variable.
  4575. * src/MetalinkRequestInfo.cc
  4576. (execute): Added the ability to print file information included in
  4577. a metalink file.
  4578. Added selective download mode to metalink.
  4579. * src/main.cc
  4580. (showUsage): Updated to denote that -S and --select-file options are
  4581. applicable to metalink.
  4582. * src/FileEntry.h
  4583. (operator=): New function.
  4584. (getBasename): New function.
  4585. (getDirname): New function.
  4586. * src/Util.h, src/Util.cc
  4587. (toStream): New function.
  4588. * src/Xml2MetalinkProcessor.cc: Updated.
  4589. Made aria2 work with metalink with directory structure.
  4590. * src/File.h, src/File.cc
  4591. (getBasename): New function.
  4592. (getDirname): New function.
  4593. * src/RequestGroup.h, src/RequestGroup.cc
  4594. (_topDir): New variable.
  4595. (setTopDir): New function.
  4596. (initSegmentMan): A directory structure is added to _segmentMan->dir.
  4597. Rewrote HTTP header parsing with stringstream.
  4598. * src/HttpConnection.h, src/HttpConnection.cc
  4599. (HttpRequestEntry): New class.
  4600. (headerBuf): Removed.
  4601. (headerBufLength): Removed.
  4602. (outstandingHttpRequests): Now its element type is
  4603. HttpRequestEntryHandle.
  4604. (findEndOfHeader): Removed.
  4605. (receiveResponse): Rewritten.
  4606. * src/HttpHeaderProcessor.h, src/HttpHeaderProcessor.cc: New class.
  4607. Updated doc for -j option to notice that it should be used with -i
  4608. option.
  4609. * src/main.cc (showUsage)
  4610. Removed unused classes.
  4611. * src/RequestInfo.h
  4612. (FileInfo): Removed.
  4613. (checksum): Removed.
  4614. (fileInfo): Removed.
  4615. (setChecksum): Removed.
  4616. (getChecksum): Removed.
  4617. (getFileInfo): Removed.
  4618. Use ISO units.
  4619. * src/ConsoleDownloadEngine.cc
  4620. * src/TorrentConsoleDownloadEngine.cc
  4621. * src/Util.cc (abbrevSize)
  4622. 2007-06-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4623. Added the default listening ports to the help message.
  4624. * src/main.cc (showUsage)
  4625. 2007-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4626. Reduce the number of calls to gettimeofday to lower CPU load.
  4627. * src/TimeA2.h, src/TimeA2.cc (differenceInMillis): New function.
  4628. * src/SpeedCalc.h, src/SpeedCalc.cc (calculateSpeed): New function.
  4629. * src/Peer.h (calculateUploadSpeed): New function.
  4630. (calculateDownloadSpeed): New function.
  4631. * src/DefaultPeerStorage.cc
  4632. (CalculateStat): Added _now variable.
  4633. In operator(), call Peer::calculateDownloadSpeed(const struct timeval&)
  4634. and Peer::calculateUploadSpeed(const struct timeval&)
  4635. Drop connection if no request or piece message is exchanged in
  4636. a certain interval.
  4637. * src/DefaultBtInteractive.h
  4638. (btRuntime): New variable.
  4639. (inactiveCheckPoint): New variable.
  4640. (checkActiveInteraction): New function.
  4641. * src/DefaultBtInteractive.cc (receiveMessages): Reset timer when
  4642. request or piece message is received.
  4643. (checkActiveInteraction): New function.
  4644. (doInteractionProcessing): Call checkActiveInteraction.
  4645. Fixed the bug that causes remote Metalink and Torrent files are not
  4646. processed.
  4647. * src/MultiUrlRequestInfo.cc (createNextRequestInfo): Fixed the bug.
  4648. 2007-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4649. Changed format of log file.
  4650. * src/SimpleLogger.cc
  4651. * Release 0.11.0
  4652. 2007-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4653. * src/AbstractCommand.cc
  4654. (execute): Changed log level of MSG_RESTARTING_DOWNLOAD and
  4655. MSG_MAX_TRY from error to info.
  4656. Added MSG_DOWNLOAD_ABORTED after MSG_MAX_TRY.
  4657. * src/message.h
  4658. (MSG_TORRENT_DOWNLOAD_ABORTED): New definition.
  4659. (MSG_DOWNLOAD_ABORTED): Added %s.
  4660. (MSG_RESTARTING_DOWNLOAD): Added %s.
  4661. (MSG_DOWNLOAD_ALREADY_COMPLETED): Updated.
  4662. * src/PeerAbstractCommand.cc
  4663. (execute): MSG_DOWNLOAD_ABORTED -> MSG_TORRENT_DOWNLOAD_ABORTED
  4664. * src/Request.h
  4665. (cookieBox): Made ShardHandle.
  4666. * src/RequestGroup.h, src/RequestGroup.cc
  4667. (createNextCommandWithAdj): New function.
  4668. * src/FileAllocationCommand.cc
  4669. (executeInternal): Use createNextCommandWithAdj().
  4670. * src/CheckIntegrityCommand.cc
  4671. (executeInternal): Use createNextCommandWithAdj().
  4672. Added --load-cookies command-option.
  4673. * src/OptionHandlerFactory.cc
  4674. (createOptionHandlers): Added PREF_LOAD_COOKIES.
  4675. * src/CookieBox.h, src/CookieBox.cc: Rwritten using CookieParser.
  4676. Now aria2 can handle cookie's expiration date.
  4677. * src/Cookie.h (expires): Changed its type to time_t.
  4678. * src/main.cc: Added --load-cookies command-line option.
  4679. * src/prefs.h (PREF_LOAD_COOKIES): New definition.
  4680. * src/Util.h, src/Util.cc (httpGMT): New function.
  4681. * src/Request.cc (Request): Initialize cookieBox using
  4682. CookieBoxFactory.
  4683. * src/CookieBoxFactory.h, src/CookieBoxFactory.cc: New class.
  4684. * src/CookieParser.h, src/CookieParser.cc: New class.
  4685. * src/main.cc: Chagned the default value of --metalink-servers to 5.
  4686. * src/HttpResponseCommand.cc
  4687. (handleOtherEncoding): Call RequestGroup::shouldCancelDownloadForSafety
  4688. * src/MetalinkRequestInfo.cc: Now -s option is ignored in Metalink
  4689. download.
  4690. 2007-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4691. Added -j command-line option.
  4692. * src/OptionHandlerFactory.cc (createOptionHandlers)
  4693. * src/main.cc
  4694. * src/ByteArrayDiskWriter.h, src/ByteArrayDiskWriter.cc
  4695. Rewritten using stringstream.
  4696. * src/TrackerUpdateCommand.h, src/TrackerUpdateCommand.cc
  4697. Rewritten using stringstream.
  4698. 2007-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4699. Make download size shown in MB, KB.
  4700. * src/ConsoleDownloadEngine.h (sendStatistics)
  4701. * src/Util.h, srcUtil.cc (abbrevSize): New function.
  4702. 2007-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4703. Accept incoming connections if download rate is low.
  4704. * src/PeerListenCommand.h, src/PeerListenCommand.cc:
  4705. (_lowestSpeedLimit): New variable.
  4706. (setLowestSpeedLimit): New function.
  4707. (execute): Accept incoming connections if download rate is low.
  4708. MAX_PEERS is ignored in this case.
  4709. Disable PREF_OUT in multiple concurrent download:
  4710. * src/RequestGroup.h, src/RequestGroup.cc
  4711. (setUserDefinedFilename): New function.
  4712. * src/DownloadEngineFactory.cc
  4713. (newConsoleEngine): Do not set PREF_OUT to requestGroup in multiple
  4714. concurrent download.
  4715. * src/DefaultSegmentManFactory.cc
  4716. (createNewInstance): Comment out the line: segmentMan->ufilename = ...
  4717. 2007-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4718. RequestGroup::getNextCommand() was renamed to createNextCommand().
  4719. Added its overloaded method.
  4720. * src/RequestGroup.h
  4721. (_numConcurrentCommand): New variable.
  4722. (setNumConcurrentCommand): New function.
  4723. * src/RequestGroup.cc
  4724. Abort download if same file is being downloaded concurrently.
  4725. * src/RequestGroup.h, src/RequestGroupMan.cc
  4726. (isSameFileBeingDownloaded): New function.
  4727. * src/HttpResponseCommand.cc (executeInternal)
  4728. * src/FtpNegotiateCommand.cc (recvSize)
  4729. * src/message.h (EX_DUPLICATE_FILE_DOWNLOAD): New definition.
  4730. * main.cc: Added help message for -i option.
  4731. 2007-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4732. * src/FileAllocationCommand.cc: Derived from RealtimeCommand.
  4733. * src/CheckIntegrityCommand.cc: Derived from RealtimeCommand.
  4734. * src/MetalinkEntry.h
  4735. (checksum): Changed to ChecksumHandle
  4736. * src/MetalinkRequestInfo.cc
  4737. (checksum): Changed to ChecksumHandle
  4738. * src/File.cc
  4739. (mkdirs): OPEN_MODE -> DIR_OPEN_MODE
  4740. * src/common.h
  4741. (DIR_OPEN_MODE): New definition
  4742. * src/RequestGroup.cc
  4743. (prepareForNextAction): Added an argument.
  4744. * src/message.h
  4745. (MSG_GOOD_CHECKSUM): New definition
  4746. (MSG_BAD_CHECKSUM): New definition
  4747. * src/HttpResponseCommand.cc
  4748. (handleDefaultEncoding): Continue download sequence in new
  4749. non-segmented download.
  4750. * src/FileAllocationEntry.h
  4751. (_nextDownloadCommand): New variable.
  4752. * src/DownloadCommand.cc
  4753. (prepareForNextSegment): Create ChecksumCommand if checksum is
  4754. available.
  4755. * src/RealtimeCommand.h, src/RealtimeCommand.cc: New class.
  4756. * src/IteratableChecksumValidator.h,
  4757. src/IteratableChecksumValidator.cc: New class.
  4758. * src/ChecksumCommand.h, src/ChecksumCommand.cc: New class.
  4759. 2007-05-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4760. Change file mode to 666:
  4761. * src/common.h (OPEN_MODE): New definition.
  4762. * src/File.cc
  4763. * src/Util.cc
  4764. * src/Directry.cc
  4765. * src/AbstractDiskWriter.cc
  4766. Change the level of log message "download aborted" to debug:
  4767. * src/PeerAbstractCommand.cc (execute)
  4768. * src/RequestGroup.h (RequestGroup): Initialized _hintTotalLength to 0.
  4769. * src/TrackerWatcherCommand.cc
  4770. (createCommand): Sleep some seconds after request failed.
  4771. If tracker request fails more than value of PREF_TRACKER_MAX_TRIES,
  4772. then abort tracker request.
  4773. 2007-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4774. * Added the simultaneous download feature.
  4775. * src/main.cc: Print "Exception caught: " when exception is caught.
  4776. Use CUIDCounter instead of BtRuntime::getNewCuid():
  4777. * src/ActivePeerConnectionCommand.cc
  4778. * src/PeerInteractionCommand.cc
  4779. * src/BtRuntime.h
  4780. (cuidCounter): Removed.
  4781. (getNewCuid): Removed.
  4782. * src/DownloadEngineFactory.cc
  4783. * src/PeerListenCommand.cc
  4784. * src/TrackerUpdateCommand.cc
  4785. * src/PeerInitiateConnectionCommand.cc
  4786. 2007-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4787. * src/PeerAbstractCommand.cc
  4788. (onAbort): Call PeerStorage::returnPeer()
  4789. * src/DefaultPeerStorage.h, src/DefaultPeerStorage.cc
  4790. (incomingPeers): New variable.
  4791. (addIncomingPeer): New function.
  4792. (returnPeer): New function.
  4793. (onErasingPeer): New function.
  4794. (addPeer): push_back -> push_front
  4795. (getActivePeers): Rewritten.
  4796. (calculateStat): Rewritten.
  4797. * src/PeerStorage.h
  4798. (TransferStat::copy): New function.
  4799. (TransferStat::TransferStat): New function.
  4800. (TransferStat::operator=): New function.
  4801. (addIncomingPeer): New function.
  4802. (returnPeer): New function.
  4803. * src/PeerListenCommand.cc
  4804. (execute): Use PeerStorage::addIncomingPeer() instead of
  4805. Peer::addPeer().
  4806. 2007-04-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4807. Connect to a peer actively when download speed is lower than specified
  4808. speed in torrent download:
  4809. * src/ActivePeerConnectionCommand.h: New class.
  4810. 2007-03-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4811. * src/HttpRequest.cc (createRequest): url-encode user-agent
  4812. * src/main.cc: Fixed the bug that prevents download if .netrc
  4813. doesn't exist.
  4814. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4815. To cache resolved hostname:
  4816. * src/AbstractCommand.h, src/AbstractCommand.cc
  4817. (resolveHostname): Put outside #ifdef ENABLE_ASYNC_DNS clause.
  4818. Added dns cache.
  4819. * src/FtpInitiateConnectionCommand.cc
  4820. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS.
  4821. * src/NameResolver.h, src/NameResolver.cc: Added synchronized
  4822. NameResolver working without ares.
  4823. * src/TorrentRequestInfo.cc
  4824. (execute): Don't cache dns in torrent download.
  4825. * src/HttpInitiateConnectionCommand.cc
  4826. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS
  4827. * src/DNSCache.h: New class.
  4828. * src/UrlRequestInfo.cc
  4829. (execute): Use dns cache.
  4830. In http request, suppress port number in http request header if port
  4831. is 80 or 443:
  4832. * src/HttpRequest.cc (getHostText): Suppress port number in http
  4833. request header if port is 80 or 443.
  4834. (createProxyRequest): Allways send port number.
  4835. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4836. To add the command-line option which disables netrc support:
  4837. * src/OptionHandlerFactory.cc
  4838. (createOptionHandlers): Added PREF_NO_NETRC.
  4839. * src/main.cc: Added -n option.
  4840. * src/prefs.h (PREF_NO_NETRC): New definition.
  4841. * src/RequestFactory.cc: Do not use netrc in ftp if PREF_NO_NETRC is
  4842. V_TRUE.
  4843. Note that netrc is not used in http, http proxy even if PREF_NO_NETRC
  4844. is V_FALSE. This may get configurable in the future release.
  4845. To clear peer's error status by time basis:
  4846. * src/PeerAbstractCommand.cc
  4847. (onAbort): Call Peer::startBadCondition().
  4848. * src/Peer.h, src/Peer.cc
  4849. (error): Removed.
  4850. (_badConditionStartTime): New variable.
  4851. (_badConditionInterval): New variable. Initialized to 10 seconds.
  4852. (startBadCondition): New function.
  4853. (isGood): New function.
  4854. * src/DefaultPeerStorage.cc
  4855. (addPeer): Use Peer::isGood().
  4856. (FindFinePeer): Use Peer::isGood().
  4857. Always include port number in http request header:
  4858. * src/HttpRequest.cc (getHostText): Always include port number in
  4859. http request header.
  4860. 2007-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4861. To the ability to read options from a config file:
  4862. * src/main.cc: Command-line parameter validation is delegated to
  4863. OptionHandler class.
  4864. * src/OptionHandlerFactory.h, src/OptionHandlerFactory.cc: New class.
  4865. * src/Option.h, src/Option.cc (clear): New function.
  4866. * src/OptionParser.h, src/OptionParser.cc: New class.
  4867. * src/OptionHandler.h: New class.
  4868. * src/NameMatchOptionHandler.h: New class.
  4869. * src/OptionHandlerImpl.h: New classes.
  4870. * src/prefs.h: '_' -> '-'
  4871. (FTP_PASV_ENABLED): Renamed to FTP_PASV.
  4872. (FTP_PASV): New definition.
  4873. * src/Util.h, src/Util.cc (getRealSize): New function.
  4874. To disable netrc support if .netrc file does not have correct
  4875. permissions:
  4876. * src/File.h, src/File.cc (mode): New function.
  4877. To prevent confidential information to be logged:
  4878. * src/HttpConnection.h, src/HttpConnection.cc
  4879. (eraseConfidentialInfo): New function.
  4880. (sendRequest): Call eraseConfidentialInfo().
  4881. (sendProxyRequest): Call eraseConfidentialInfo().
  4882. * src/main.cc: Validate permissions of .netrc file.
  4883. To add --user-agent command-line option:
  4884. * src/main.cc: Added new command line option: --user-agent
  4885. * src/prefs.h (PREF_USER_AGENT): New definition.
  4886. * src/HttpRequestCommand.cc (executeInternal): Set user-agent option
  4887. parameter to HttpRequest object.
  4888. * src/AbstractProxyRequestCommand.cc
  4889. (executeInternal): Set user-agent option parameter to HttpRequest
  4890. object.
  4891. Marged the patches from Dan Fandrich.
  4892. 2007-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4893. Use filename and size from Metalink file instead of sending HEAD
  4894. request:
  4895. * src/UrlRequestInfo.h
  4896. (_filename): New variable.
  4897. (_totalLength): New variable.
  4898. (setTotalLength): New variable.
  4899. (setFilename): New variable.
  4900. * src/MetalinkRequestInfo.cc
  4901. (execute): Set filename and size to UrlRequestInfo
  4902. * src/UrlRequestInfo.cc
  4903. (execute): Use filename and size from Metalink instead of seding
  4904. HEAD request to servers.
  4905. 2007-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4906. To add the ability to resume downloading a partially downloaded file
  4907. which is downloaded from the beginning:
  4908. * src/FileAllocator.h: Made abstract class. New DefaultFileAllocator
  4909. takes this role.
  4910. * src/main.cc: Added -c option.
  4911. * src/BitfieldMan.h, src/BitfieldMan.cc (setBitRange): New function.
  4912. * src/DiskWriter.h (openExistingFile): Added totalLength argument.
  4913. * src/prefs.h (PREF_CONTINUE): New definition.
  4914. * src/SegmentMan.h, src/SegmentMan.cc (markPieceDone): New function.
  4915. * src/DefaultDiskWriter.cc
  4916. (createNewDiskWriter): Add GlowFileAllocator to the new object.
  4917. * src/AbstractDiskWriter.h
  4918. (glowFileAllocator): New variable.
  4919. * src/AbstractDiskWriter.cc
  4920. (openExistingFile): Now preallocate file space from the end of the
  4921. existing file if totalLength argument is specified and grater than 0.
  4922. * src/UrlRequestInfo.cc: If -c option is specified and the file
  4923. to download exists in local, continue the download of the file.
  4924. --allow-overwrite=true is assumed in this context.
  4925. * src/DefaultFileAllocator.h, src/DefaultFileAllocator.cc: New class.
  4926. * src/GlowFileAllocator.h, src/GlowFileAllocator.cc: New class.
  4927. Throw exception if --check-integrity=true is specified but chunk
  4928. checksums are not provided:
  4929. * src/UrlRequestInfo.cc
  4930. Do not print URLs to stdout:
  4931. * src/UrlRequestInfo.cc
  4932. 2007-03-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4933. * src/Request.h: Use AuthResolver to get authentication information.
  4934. * src/main.cc: Made RequestFactory a singleton object. Netrc is now
  4935. set to RequestFactory object.
  4936. * src/AuthConfigItem.h, src/AuthConfigItem.cc: Removed.
  4937. * src/AuthConfig.h, src/AuthConfig.cc: Rewritten.
  4938. * src/TrackerWatcherComand.cc: Use RequestFactorySingletonHolder to
  4939. create Request object.
  4940. 2007-03-19 Tatsuhiro Tsujikawa <tujikawa at valkyrie dot rednoah com>
  4941. To integrate Netrc into exsiting classes:
  4942. * src/Request.h
  4943. (_userDefinedAuthConfig): New variable.
  4944. (findNetrcAuthenticator): New function.
  4945. (segment): Removed.
  4946. (setUserDefinedAuthConfig): New function.
  4947. (resolveHttpAuthConfigItem): New function.
  4948. (resolveFtpAuthConfigItem): New function.
  4949. (resolveHttpProxyAuthConfigItem): New function.
  4950. * src/HttpRequest.h
  4951. (authConfig): Removed.
  4952. (proxyAuthConfig): Removed.
  4953. (setAuthConfig): Removed.
  4954. (setProxyAuthConfig): Removed.
  4955. * src/UrlRequest.h
  4956. (getHeadResult): Added a parameter: authConfigHandle
  4957. * src/common.h
  4958. (SingletonHolder.h): New include.
  4959. * src/main.cc
  4960. (Netrc.h): New include.
  4961. (main): Removed initial values of PREF_FTP_USER, PREF_FTP_PASSWD.
  4962. Added initial value of PREF_NETRC_PATH.
  4963. Added the initialization of netrc.
  4964. * src/AuthConfig.h: New class.
  4965. * src/prefs.h
  4966. (PREF_NETRC_PATH): New definition.
  4967. * src/HttpAuthConfig.h: Removed.
  4968. * src/Netrc.cc
  4969. (getRequiredNextToken): New function.
  4970. (skipMacdef): New function.
  4971. (parse): Rewritten.
  4972. * src/Netrc.h
  4973. (getRequiredNextToken): New function.
  4974. (skipMacdef): New function.
  4975. * src/Util.h, src/Util.cc
  4976. (getHomeDir): New function.
  4977. * src/TrackerWatcherComand.cc
  4978. (createRequestCommand): Use AuthConfig.
  4979. * src/FtpConnection.cc
  4980. (sendUser): Use Request::resolveFtpAuthConfigItem().
  4981. (sendPass): Use Request::resolveFtpAuthConfigItem().
  4982. * src/Request.cc
  4983. (findNetrcAuthenticator): New function.
  4984. (resolveHttpAuthConfigItem): New function.
  4985. (resolveFtpAuthConfigItem): New function.
  4986. (resolveHttpProxyAuthConfigItem): New function.
  4987. * src/UrlRequestInfo.cc: Use AuthConfig.
  4988. * src/HttpRequest.cc
  4989. (createRequest): Use authConfig.
  4990. (getProxyAuthString): Use authConfig.
  4991. (configure): Removed PREF_HTTP_USER, PREF_HTTP_PASSWD,
  4992. PREF_HTTP_PROXY_USER, PREF_HTTP_PROXY_PASSWD.
  4993. 2007-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4994. To reduce overhead to find commands whose socket is either
  4995. readable or writable in the download engine loop:
  4996. * src/Command.h, src/Command.cc
  4997. (STATUS): New enum.
  4998. (status): New variable.
  4999. (statusMatch): New function.
  5000. (setStatusActive): New function.
  5001. (setStatusInactive): New function.
  5002. * src/DownloadEngine.h, src/DownloadEngine.cc
  5003. (executeCommand): New function.
  5004. (run): Simplified.
  5005. (waitData): Call Command::setStatusActive() when command's socket is
  5006. readable or writable.
  5007. 2007-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5008. To handle Segment as SegmentHandle:
  5009. * src/AbstractCommand.cc (execute): Rewritten.
  5010. * src/SegmentMan.h: Segment -> SegmentHandle
  5011. Introducded HttpResponse class, HttpRequest class to improve code
  5012. extensiveness and make it clear:
  5013. * src/HttpDownloadCommand.cc: transfer encoders are now managed by
  5014. HttpResponse class.
  5015. * src/HttpRequest.h, src/HttpRequest.cc: New class.
  5016. * src/HttpResponse.h, src/HttpResponse.cc: New class.
  5017. * src/HttpConnection.cc: Contruction of http request were moved to
  5018. HttpRequest class.
  5019. * src/HttpResponseCommand.h, src/HttpResponseCommand.cc: Refactored.
  5020. * src/HttpRequestCommand.cc (executeInternal): Rewritten.
  5021. * src/HttpAuthConfig.h: New class.
  5022. * src/Range.h: New class.
  5023. To make FtpTunnel{Request, Response}Command and
  5024. HttpProxy{Request, Response}Command derived from
  5025. AbstractProxy{Request, Response}Command:
  5026. * src/FtpTunnelResponseCommand.h, src/FtpTunnelResponseCommand.cc:
  5027. Derived from AbstractProxyRequestCommand class.
  5028. * src/FtpTunnelRequestCommand.h, src/FtpTunnelRequestCommand.cc:
  5029. Derived from AbstractProxyResponseCommand class.
  5030. * src/HttpProxyRequestCommand.h, src/HttpProxyRequestCommand.cc:
  5031. Derived from AbstractProxyRequestCommand class.
  5032. * src/HttpProxyResponseCommand.h, src/HttpProxyResponseCommand.cc:
  5033. Derived from AbstractProxyResponseCommand class.
  5034. * src/AbstractProxyRequestCommand.h, src/AbstractProxyRequestCommand.cc
  5035. : New class.
  5036. * src/AbstractProxyResponseCommand.h,
  5037. src/AbstractProxyResponseCommand.cc: New class.
  5038. To add netrc support:
  5039. * src/Netrc.h, src/Netrc.cc: New class.
  5040. * src/Util.h, src/Util.cc (split): New function.
  5041. * src/HttpHeader.cc (getRange): Fixed so that it inspects
  5042. "Content-Range" header instead of "Range" header.
  5043. * src/HttpHeader.h
  5044. (getStatus): Removed.
  5045. (setStatus): Removed.
  5046. * src/Segment.h
  5047. (getPositionToWrite): New function.
  5048. 2007-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5049. * src/HttpHeader.h
  5050. (Range.h): New include.
  5051. (status): New variable.
  5052. (HttpHeader): Initialized status with 0.
  5053. (getStatus): New function.
  5054. (setStatus): New function.
  5055. (getRange): New function.
  5056. (HttpHeaderHandle): New function.
  5057. * src/HttpHeader.cc
  5058. (getRange): New function.
  5059. * src/Request.h
  5060. (RequestWeakHandle): New definition.
  5061. * src/HttpConnection.h
  5062. (HttpConnectionHandle): New type definition.
  5063. * src/HttpConnection.cc
  5064. (receiveResponse): Set HTTP status to headers.
  5065. * src/main.cc
  5066. (showUsage): Fixed typo.
  5067. * src/Segment.h
  5068. (SegmentHandle): New type definition.
  5069. * src/BitfieldMan.h
  5070. (getMissingUnusedLength): New function.
  5071. * src/BitfieldMan.cc
  5072. (getMissingUnusedLength): New function.
  5073. 2007-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5074. To fix static initialization order problem:
  5075. * src/BitfieldManFactory.h
  5076. (defaultRandomizer): Removed.
  5077. (factory): New variable.
  5078. (getNewFactory): Removed.
  5079. (getFactoryInstance): New function.
  5080. (setDefaultRandomizer): Rewritten.
  5081. (getDefaultRandomizer): Rewritten.
  5082. * src/BitfieldManFactory.cc
  5083. (defaultRandomizer): Removed.
  5084. (factory): Initialized to 0.
  5085. (BitfieldManFactory): Initialized randomizer to 0.
  5086. * src/DefaultPieceStorage.cc
  5087. (DefaultPieceStorage): getNewFactory() -> getFactoryInstance()
  5088. * src/Peer.cc
  5089. (Peer): getNewFactory() -> getFactoryInstance()
  5090. * src/SegmentMan.cc
  5091. (initBitfield): getNewFactory() -> getFactoryInstance()
  5092. * src/Piece.cc
  5093. (Piece): getNewFactory() -> getFactoryInstance()
  5094. 2007-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5095. To fix the bug that causes crash on Max OS X:
  5096. * src/SimpleRandomizer.h
  5097. (getInstance): Create new instance if the static variable is null.
  5098. * src/SimpleRandomizer.cc
  5099. (randomizer): Initialized to 0.
  5100. * src/BitfieldManFactory.h
  5101. (getNewFactory): Removed the call to setRandomizer().
  5102. To fix the miscalculation of the range of checksum:
  5103. * src/BitfieldMan.h
  5104. (isBitSetOffsetRange): New function.
  5105. * src/BitfieldMan.cc
  5106. (isBitSetOffsetRange): New function.
  5107. * src/SegmentMan.cc
  5108. (tryChunkChecksumValidation): Use BitfieldMan::isBitSetOffsetRange().
  5109. Use bitfield->getBlockLength() instead of segment.segmentLength.
  5110. * Release 0.10.1
  5111. 2007-02-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5112. To lower CPU usage in BitTorrent download when --max-upload-limit
  5113. command-line option specified:
  5114. * src/DefaultBtMessageDispatcher.cc
  5115. (sendMessages): Calculate uploading speed only when current message
  5116. is uploading data and is not sent yet.
  5117. * src/DefaultPeerStorage.h
  5118. (MAX_PEER_LIST_SIZE): 100 -> 60, because 60 is well enough.
  5119. * src/HttpResponseCommand.cc
  5120. (handleDefaultEncoding): Added the cast to int32_t to itos.
  5121. This fixes compile error in Soralis 10.
  5122. 2007-01-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5123. To fix segfault in Metalink download:
  5124. * src/UrlRequestInfo.h
  5125. (filename): Removed.
  5126. (totalLength): Removed.
  5127. (setTotalLength): Removed.
  5128. (setFilename): Removed.
  5129. * src/MetalinkRequestInfo.cc
  5130. (execute): Do not set filename and totalLength to reqInfo.
  5131. Set chunk checksum to reqInfo if it is not null.
  5132. * src/HttpResponseCommand.cc
  5133. (executeInternal): Fixed filename in log.
  5134. (handleDefaultEncoding): Removed the call to initBitfield() and
  5135. markAllPiecesDone().
  5136. (handleOtherEncoding): Added HEAD method handling.
  5137. * src/FtpNegotiateCommand.cc
  5138. (executeInternal): Added SEQ_HEAD_OK handling.
  5139. (recvSize): In HEAD handling, set sequence to SEQ_HEAD_OK and
  5140. return false.
  5141. * src/FtpNegotiateCommand.h
  5142. (SEQ_HEAD_OK): New definition.
  5143. * src/SegmentMan.cc
  5144. (initBitfield): Delete bitfield.
  5145. (isChunkChecksumValidationReady): Fixed the condition.
  5146. * src/UrlRequestInfo.cc: Fixed so that Metalink and Torrent download
  5147. works fine.
  5148. 2007-01-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5149. * src/Xml2MetalinkProcessor.h
  5150. (xpathExists): New function.
  5151. * src/Xml2MetalinkProcessor.cc
  5152. (xpathExists): New function.
  5153. Not to send HEAD request if filename and size are available in Metalink
  5154. file:
  5155. * src/UrlRequestInfo.h
  5156. (filename): New variable.
  5157. (totalLength): New variable.
  5158. (setTotalLength): New function.
  5159. (setFilename): New function.
  5160. * src/MetalinkRequestInfo.cc
  5161. (execute): Set filename and size to UrlRequestInfo.
  5162. * src/MetalinkEntry.cc
  5163. (MetalinkEntry): Initialize size with 0.
  5164. * src/UrlRequestInfo.cc
  5165. (execute): Set filename and size to SegmentMan.
  5166. Not to download rest of the files after selected files are downloaded
  5167. in BitTorrent:
  5168. * src/PieceStorage.h
  5169. (allDownloadFinished): New function.
  5170. * src/DefaultBtAnnounce.cc
  5171. (isCompleteAnnounceReady): Use allDownloadFinished instead of
  5172. downloadFinished.
  5173. (getAnnounceUrl): Use allDownloadFinished instead of downloadFinished.
  5174. * src/DefaultPieceStorage.cc
  5175. (completePiece): Use allDownloadFinished instead of downloadFinished.
  5176. Commented out the call to finishSelectiveDownloadingMode().
  5177. (downloadFinished): Call isFilteredAllBitSet() instead of
  5178. isAllBitSet().
  5179. (allDownloadFinished): New function.
  5180. * src/DefaultBtInteractive.cc
  5181. (addBitfieldMessageToQueue): Call allDownloadFinished() instead of
  5182. downloadFinished().
  5183. (checkHave): Call allDownloadFinished() instead of downloadFinished().
  5184. * src/TorrentDownloadEngine.cc
  5185. (onEndOfRun): Call allDownloadFinished() instead of downloadFinished().
  5186. * src/BitfieldMan.h
  5187. (isFilteredAllBitSet): New function.
  5188. * src/ShareRatioSeedCriteria.h
  5189. (PieceStorage.h): New include.
  5190. (pieceStorage): New variable.
  5191. (evaluate):
  5192. btContext->getTotalLength() -> pieceStorage->getCompletedLength()
  5193. * src/BitfieldMan.cc
  5194. (isFilteredAllBitSet): New function.
  5195. (isAllBitSet): Filter is not took into account.
  5196. Rename --force-truncate as --allow-overwrite:
  5197. * src/TorrentRequestInfo.cc
  5198. (execute): PREF_FORCE_TRUNCATE -> PREF_ALLOW_OVERWRITE
  5199. * src/main.cc
  5200. (showUsage): --force-truncate -> --allow-overwrite
  5201. * src/message.h
  5202. (EX_FILE_ALREADY_EXISTS): --force-truncate -> --allow-overwrite
  5203. * src/prefs.h
  5204. (PREF_FORCE_TRUNCATE): Removed.
  5205. (PREF_ALLOW_OVERWRITE): New definition.
  5206. * src/SegmentMan.cc
  5207. (shouldCancelDownloadForSafety): --force-truncate -> --allow-overwrite
  5208. * src/MetalinkRequestInfo.cc
  5209. (execute): Queueing message are now logged in info level.
  5210. * src/common.h
  5211. (LONG_LONG_MAX): Removed.
  5212. (LONG_LONG_MIN): Removed.
  5213. * src/HttpResponseCommand.cc
  5214. (handleDefaultEncoding): LONG_LONG_MAX -> INT64_MAX
  5215. * src/FtpNegotiateCommand.cc
  5216. (recvSize): LONG_LONG_MAX -> INT64_MAX
  5217. * src/main.cc
  5218. (showUsage): Added --check-integriy and --realtime-chunk-checksum
  5219. command-line option.
  5220. (main): Added --check-integriy and --realtime-chunk-checksum
  5221. command-line option.
  5222. --force-truncate -> --allow-overwrite
  5223. Set initial value of --check-integrity option to false.
  5224. Don't show usage when error occurs while persing command-line options.
  5225. Removed deprecated --upload-limit option.
  5226. 2007-01-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5227. * src/message.h: Added EX_INVALID_PAYLOAD_SIZE and
  5228. EX_INVALID_BT_MESSAGE_ID. Following source files affected.
  5229. * src/BtAllowedFastMessage.cc:
  5230. * src/BtBitfieldMessage.cc
  5231. * src/BtCancelMessage.cc
  5232. * src/BtChokeMessage.cc
  5233. * src/BtHaveAllMessage.cc
  5234. * src/BtHaveMessage.cc
  5235. * src/BtHaveNoneMessage.cc
  5236. * src/BtInterestedMessage.cc
  5237. * src/BtNotInterestedMessage.cc
  5238. * src/BtPieceMessage.cc
  5239. * src/BtPortMessage.cc
  5240. * src/BtRejectMessage.cc
  5241. * src/BtRequestMessage.cc
  5242. * src/BtSuggestPieceMessage.cc
  5243. * src/BtUnchokeMessage.cc
  5244. * src/message.h: Added EX_INVALID_CHUNK_CHECKSUM. Following source
  5245. files are affected.
  5246. * src/ChunkChecksumValidator.cc
  5247. * src/SegmentMan.cc
  5248. 2007-01-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5249. To add chunk checksum validation:
  5250. * src/MetalinkEntry.h
  5251. (MetalinkChunkChecksum.h): New include.
  5252. (chunkChecksum): New variable.
  5253. * src/Request.h
  5254. (method): New variable.
  5255. (setMethod): New function.
  5256. (getMethod): New function.
  5257. (METHOD_GET): New static constant.
  5258. (METHOD_HEAD): New static constant.
  5259. * src/Xml2MetalinkProcessor.h
  5260. (getPieceHash): New function.
  5261. * src/PieceStorage.h
  5262. (markAllPiecesDone): New function.
  5263. (checkIntegrity): New function.
  5264. * src/FileAllocator.h
  5265. (NullFileAllocationMonitor.h): New include.
  5266. (FileAllocator): Initialize fileAllocationMonitor with new
  5267. NullFileAllocationMonitor().
  5268. * src/MultiDiskAdaptor.h
  5269. (messageDigest.h): Remove include.
  5270. (ctx): Removed.
  5271. (hashUpdate): Added ctx.
  5272. (MultiDiskAdaptor): Removed ctx.
  5273. (sha1Sum): Renamed as messageDigest.
  5274. (messageDigest): New function.
  5275. * src/UrlRequestInfo.h
  5276. (HeadResult): New class.
  5277. (digestAlgo): New variable.
  5278. (chunkChecksumLength): New variable.
  5279. (chunkChecksums): New variable.
  5280. (getHeadResult): New function.
  5281. (UrlRequestInfo): Added digestAlgo, chunkChecksumLength.
  5282. (setDigestAlgo): New function.
  5283. (setChunkChecksumLength): New function.
  5284. (setChunkChecksums): New function.
  5285. * src/DefaultPieceStorage.cc
  5286. (DiskAdaptorWriter.h): New include.
  5287. (ChunkChecksumValidator.h): New include.
  5288. (markAllPiecesDone): New function.
  5289. (checkIntegrity): New function.
  5290. * src/DefaultBtContext.h
  5291. (getPieceHashes): New function.
  5292. * src/TorrentRequestInfo.cc
  5293. (execute): Try to validate chunk checksum if file already exists and
  5294. .aria2 file doesn't there and user allows aria2 to overwrite it.
  5295. * src/messageDigest.h
  5296. (~MessageDigestContext): Added digestFree().
  5297. * src/MetalinkRequestInfo.cc
  5298. (execute): Set digestAlgo, chunkChecksum, chunkChecksums to reqInfo.
  5299. * src/DiskAdaptor.h
  5300. (messageDigest.h): New include.
  5301. (sha1Sum): Renamed as messageDigest.
  5302. (messageDigest): New function.
  5303. * src/DownloadCommand.h
  5304. (PeerStat.h): New include.
  5305. (maxDownloadSpeedLimit): New variable.
  5306. (startupIdleTime): New variable.
  5307. (lowestDownloadSpeedLimit): New variable.
  5308. (peerStat): New variable.
  5309. (setMaxDownloadSpeedLimit): New function.
  5310. (setStartupIdleTime): New function.
  5311. (setLowestDownloadSPeedLimit): New function.
  5312. * src/BtContext.h
  5313. (getPieceHashes): New function.
  5314. * src/main.cc
  5315. (main): Set PREF_REALTIME_CHUNK_CHECKSUM and PREF_CHECK_INTEGRITY
  5316. option to true for testing purpose.
  5317. * src/BtPieceMessage.cc
  5318. (checkPieceHash): Use messageDigest
  5319. * src/DownloadEngine.cc
  5320. (SetDescriptor): Removed.
  5321. (AccumulateActiveCommand): Removed.
  5322. (waitData): Rewritten.
  5323. (updateFdSet): Rewritten.
  5324. * src/MultiDiskAdaptor.cc
  5325. (hashUpdate): Added ctx.
  5326. (sha1Sum): Renamed as messageDigest.
  5327. (messageDigest): New function.
  5328. * src/BitfieldMan.h
  5329. (isBitRangeSet): New function.
  5330. (unsetBitRange): New function.
  5331. * src/ByteArrayDiskWriter.h
  5332. (sha1Sum): Renamed as messageDigest.
  5333. (messageDigest): New function.
  5334. * src/ConsoleDownloadEngine.cc
  5335. (calculateStatistics): If nspeed < 0 then set nspeed to 0.
  5336. * src/DiskWriter.h
  5337. (messageDigest.h): New include.
  5338. (sha1Sum): Renamed as messageDigest.
  5339. (messageDigest): New function.
  5340. * src/ChunkChecksumValidator.h: New class.
  5341. * src/DiskAdaptorWriter.h: New class.
  5342. * src/prefs.h
  5343. (PREF_REALTIME_CHUNK_CHECKSUM): New definition.
  5344. (PREF_CHECK_INTEGRITY): New definition.
  5345. * src/HttpResponseCommand.cc
  5346. (handleDefaultEncoding): Added method "HEAD" handling.
  5347. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  5348. (handleOtherEncoding):
  5349. Added the call to e->segmentMan->shouldCancelDownloadForSafety().
  5350. (createHttpDownloadCommand): Set maxDownloadSpeedLimit,
  5351. startupIdleTime, lowestDownloadSpeedLimit to command.
  5352. * src/SegmentMan.h
  5353. (getSegmentEntryByIndex): New function.
  5354. (getSegmentEntryByCuid): New function.
  5355. (getSegmentEntryIteratorByCuid): New function.
  5356. (diskWriter): DiskWriter -> DiskWriterHandle
  5357. (pieceHashes): New variable.
  5358. (chunkHashLength): New variable.
  5359. (digestAlgo): New variable.
  5360. (FindPeerStat): Removed.
  5361. (getPeerStat): Rewritten.
  5362. (markAllPiecesDone): New function.
  5363. (checkIntegrity): New function.
  5364. (tryChunkChecksumValidation): New function.
  5365. (isChunkChecksumValidationReady): New function.
  5366. * src/BitfieldMan.cc
  5367. (BitfieldMan): Initialized bitfieldLength, blocks to 0.
  5368. (BitfieldMan): Initialized blockLength, totalLength, bitfieldLength,
  5369. blocks to 0.
  5370. (isBitRangeSet): New function.
  5371. (unsetBitRange): New function.
  5372. * src/FtpNegotiateCommand.cc
  5373. (executeInternal): Set maxDownloadSpeedLimit,
  5374. startupIdleTime, lowestDownloadSpeedLimit to command.
  5375. (recvSize): Added method "HEAD" handling.
  5376. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  5377. * src/AbstractSingleDiskAdaptor.cc
  5378. (sha1Sum): Renamed as messageDigest.
  5379. (messageDigest): New function.
  5380. * src/AbstractSingleDiskAdaptor.h
  5381. (sha1Sum): Renamed as messageDigest.
  5382. (messageDigest): New function.
  5383. * src/Util.h
  5384. (indexRange): New function.
  5385. * src/MetalinkEntry.cc
  5386. (MetalinkEntry): Initialized chunkChecksum to 0.
  5387. * src/ShaVisitor.cc
  5388. (~ShaVisitor): Removed the call to ctx.digestFree().
  5389. * src/SegmentMan.cc
  5390. (ChunkChecksumValidator.h): New include.
  5391. (SegmentMan): Initialized chunkHashLength to 0. Initialized digestAlgo
  5392. to DIGEST_ALGO_SHA1.
  5393. (~SegmentMan): Removed diskWriter.
  5394. (FindSegmentEntryByIndex): Removed.
  5395. (FindSegmentEntryByCuid): Removed.
  5396. (checkoutSegment): Rewritten.
  5397. (findSlowerSegmentEntry): Rewritten.
  5398. (getSegment): Rewritten.
  5399. (updateSegment): Rewritten.
  5400. (completeSegment): Rewritten.
  5401. (markAllPiecesDone): New function.
  5402. (checkIntegrity): New function.
  5403. (isChunkChecksumValidationReady): New function.
  5404. (tryChunkChecksumValidation): New function.
  5405. * src/Xml2MetalinkProcessor.cc
  5406. (getEntry): Get size and set it to entry.
  5407. Get chunk checksum and set it to entry.
  5408. (getPieceHash): New function.
  5409. * src/Util.cc
  5410. (sha1Sum): Removed ctx.digestFree()
  5411. (fileChecksum): Removed ctx.digestFree()
  5412. (indexRange): New function.
  5413. * src/Request.cc
  5414. (METHOD_GET): New variable.
  5415. (METHOD_HEAD): New variable.
  5416. (Request): Added method.
  5417. * src/UrlRequestInfo.cc
  5418. (FatalException.h): New include.
  5419. (message.h): New include.
  5420. (operator<<): Added operator<< for class HeadResult.
  5421. (getHeadResult): New function.
  5422. (execute): Get filename and size in separate download engine.
  5423. * src/ChunkChecksumValidator.cc: New class.
  5424. * src/DownloadCommand.cc:
  5425. (DownloadCommand): Added peerStat.
  5426. (executeInternal): Use maxDownloadSpeedLimit member instead of getting
  5427. the value from Option.
  5428. The buffer size is now 16KB.
  5429. Use peerStat member instead of getting it from SegmentMan.
  5430. Use startupIdleTime member instead of gettingit from Option.
  5431. Added chunk checksum validation.
  5432. * src/AbstractDiskWriter.cc
  5433. (AbstractDiskWriter): Removed ctx.
  5434. (~AbstractDiskWriter): Removed ctx.digestFree()
  5435. (writeDataInternal): Returns the return value of write.
  5436. (readDataInternal): Returns the return value of read.
  5437. (sha1Sum): Renamed as messageDigest
  5438. (messageDigest): New function.
  5439. * src/AbstractDiwkWriter.h
  5440. (messageDigest.h): Removed include.
  5441. (ctx): Removed.
  5442. (sha1Sum): Renamed as messageDigest
  5443. (messageDigest): New function.
  5444. * src/DefaultPieceStorage.h
  5445. (markAllPiecesDone): New function.
  5446. (checkIntegrity): New function.
  5447. * src/NullFileAllocationMonitor.h: New class.
  5448. * src/MetalinkChunkChecksum.h: New class.
  5449. 2007-01-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5450. To decrease CPU usage in bittorrent download, calculation results in
  5451. BitfieldMan were cached and realtime fetching PeerObject was removed
  5452. with WeakHandle introduced. Option values are set to the objects
  5453. by setter before download begins.
  5454. * src/DefaultBtRequestFactory.cc: Use messageFactory member.
  5455. * src/DefaultBtRequestFactory.h
  5456. (dispatcher): BtMessageDispatcherHandle ->
  5457. BtMessageDispatcherWeakHandle.
  5458. (messageFactory): New variable.
  5459. (setBtMessageDispatcher): BtMessageDispatcherHandle ->
  5460. BtMessageDispatcherWeakHandle.
  5461. (setBtMessageFactory): New function.
  5462. * src/DefaultBtMessageDispatcher.cc:
  5463. (sendMessages): Use maxUploadSpeedLimit instead of fetching the value
  5464. from Option.
  5465. (checkRequestSlotAndDoNecessaryThing): Use requestTimeout instead of
  5466. feating the value from Option.
  5467. Use messageFactory member.
  5468. * src/PeerInteractionCommand.cc
  5469. (PeerInteractionCommand): Added maxDownloadSpeedLimit.
  5470. Add reverse dependencies to factory object.
  5471. Set maxUploadSpeedLimit and requestTimeout and messageFactory to
  5472. dispatcher.
  5473. Set messageFactory to receiver.
  5474. Set keepAliveInterval and maxDownloadSpeedLimit and messageFactory to
  5475. btInteractive.
  5476. Set receiver to peerObject.
  5477. Set maxDownloadSpeedLimit to this.
  5478. (executeInternal): Use maxDownloadSpeedLimit member.
  5479. * src/BtChokeMessage.cc
  5480. (doReceivedAction): Use dispatcher, requestFactory member.
  5481. (onSendComplete): Use dispatcher member.
  5482. * src/PeerInteractionCommand.h
  5483. (maxDownloadSpeedLimit): New variable.
  5484. * src/DefaultBtMessageReceiver.h
  5485. (peerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  5486. (dispatcher):
  5487. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  5488. (messageFactory): New variable.
  5489. (setPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  5490. (getPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  5491. (setDispatcher):
  5492. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  5493. (setBtMessageFactory): New function.
  5494. * src/DefaultBtInteractive.cc
  5495. (initiateHandshake): Use messageFactory member.
  5496. (addBitfieldMessageToQueue): Use messageFactory member.
  5497. (addAllowedFastMessageToQueue): Use messageFactory member.
  5498. (decideChoking): Use messageFactory member.
  5499. (checkHave): Use messageFactory member.
  5500. (sendKeepAlive): Use keepAliveInterval, messageFactory member.
  5501. (receiveMessages): Use maxDownloadSpeedLimit member.
  5502. (decideInterest): Use messageFactory member.
  5503. * src/BtRequestMessage.cc
  5504. (doReceivedAction): Use messageFactory, dispatcher member.
  5505. (onQueued): Use dispatcher member.
  5506. * src/BtPieceMessage.cc
  5507. (doReceivedAction): Use dispatcher member.
  5508. (send): Use peerConnection member.
  5509. (onWrongPiece): Use requestFactory member.
  5510. (handleChokingEvent): Use messageFactory, dispatcher member.
  5511. (handleCancelSendingPieceEvent): Use messageFactory, dispatcher member.
  5512. * src/BtMessageDispatcher.h
  5513. (BtMessageDispatcherWeakHandle): New type definition.
  5514. * src/SimpleBtMessage.cc
  5515. (send): Use peerConnection member.
  5516. * src/BtRejectMessage.cc
  5517. (doReceivedAction): Use dispatcher member.
  5518. * src/DefaultBtMessageDispatcher.h
  5519. (Option.h): Removed include.
  5520. (messageFactory): New variable.
  5521. (option): Removed.
  5522. (maxUploadSpeedLimit): New variable.
  5523. (requestTimeout): New variable.
  5524. (DefaultBtMessageDispatcher): Removed option.
  5525. Added maxUploadSpeedLimit, requestTimeout.
  5526. (setOption): Removed.
  5527. (getOption): Removed.
  5528. (setMaxUploadSpeedLimit): New function.
  5529. (setRequestTimeout): New function.
  5530. (setBtMessageFactory): New function.
  5531. * src/DefaultBtInteractive.h
  5532. (btMessageReceiver):
  5533. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  5534. (dispatcher):
  5535. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  5536. (btRequestFactory):
  5537. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  5538. (peerConnection):
  5539. PeerConnectionHandle -> PeerConnectionWeakHandle
  5540. (messageFactory): New variable.
  5541. (option): Removed.
  5542. (keepAliveInterval): New variable.
  5543. (maxDownloadSpeedLimit): New variable.
  5544. (DefaultBtInteractive): Added keepAliveInterval, maxDownloadSpeedLimit.
  5545. (setBtMessageReceiver):
  5546. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  5547. (setDispatcher):
  5548. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  5549. (setBtRequestFactory):
  5550. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  5551. (setPeerConnection):
  5552. PeerConnectionHandle -> PeerConnectionWeakHandle
  5553. (setOption): Removed.
  5554. (setKeepAliveInterval): New function.
  5555. (setMaxDownloadSpeedLimit): New function.
  5556. (setBtMessageFactory): New function.
  5557. * src/BitfieldMan.h
  5558. (cachedNumMissingBlock): New variable.
  5559. (cachedNumFilteredBlock): New variable.
  5560. (cachedCompletedLength): New variable.
  5561. (cachedFilteredComletedLength): New variable.
  5562. (cachedFilteredTotalLength): New variable.
  5563. (countMissingBlockNow): New function.
  5564. (countFilteredBlockNow): New function.
  5565. (getFilteredTotalLengthNow): New function.
  5566. (getCompletedLengthNow): New function.
  5567. (getFilteredCompletedLengthNow): New function.
  5568. (updateCache): New function.
  5569. * src/AbstractBtMessage.h
  5570. (BtMessageDispatcher.h): New include.
  5571. (PeerConnection.h): New include.
  5572. (BtRequestFactory.h): New include
  5573. (BtMessageFactory.h): New include.
  5574. (dispatcher): New variable.
  5575. (messageFactory): New variable.
  5576. (peerConnection: New variable.
  5577. (setBtMessageDispatcher): New function.
  5578. (setPeerConnection): New function.
  5579. (setBtMessageFactory): New function.
  5580. (setBtRequestFactory): New function.
  5581. * src/DefaultBtMessageFactory.cc
  5582. (setCommonProperty): Set dispatcher, requestFactory, this,
  5583. peerConnection to msg.
  5584. * src/BtRegistry.h
  5585. (BT_MESSAGE_RECEIVER): New macro.
  5586. * src/PeerConnection.h
  5587. (PeerConnectionWeakHandle): New type definition.
  5588. * src/BtMessageFactory.h
  5589. (BtMessageFactoryWeakHandle): New type definition.
  5590. * src/BitfieldMan.cc
  5591. (BitfieldMan): Added cachedNumMissingBlock, cachedNumFilteredBlock,
  5592. cachedCompletedLength, cachedFilteredComletedLength,
  5593. cachedFilteredTotalLength.
  5594. Call updateCache().
  5595. (countMissingBlock): Return cachedNumMissingBlock.
  5596. (countMissingBlockNow): New function.
  5597. (countBlock): Return cachedNumFilteredBlock if filterEnabled is true.
  5598. (countFilteredBlockNow): New function.
  5599. (setBit): Call updateCache().
  5600. (unsetBit): Call updateCache().
  5601. (setBitfield): Call updateCache().
  5602. (clearAllBit): Call updateCache().
  5603. (setAllBit): Use setBitInternal instead of setBit.
  5604. Call updateCache().
  5605. (addFilter): Call updateCache().
  5606. (enableFilter): Call updateCache().
  5607. (disableFilter): Call updateCache().
  5608. (clearFilter): Call updateCache().
  5609. (getFilteredTotalLength): Return cachedFilteredTotalLength.
  5610. (getFilteredTotalLengthNow): New function.
  5611. (getCompletedLength): Return cachedCompletedLength.
  5612. (getCompletedLengthNow): New function.
  5613. (getFilteredCompletedLength): Return cachedFilteredComletedLength.
  5614. (getFilteredCompletedLengthNow): New function.
  5615. (updateCache): New function.
  5616. * src/BtMessageReceiver.h
  5617. (BtMessageReceiverWeakHandle): New type definition.
  5618. * src/DefaultBtMessageReceiver.cc
  5619. (receiveHandshake): Use messageFactory member.
  5620. (sendHandshake): Use messageFactory member.
  5621. (receiveMessage): Use messageFactory member.
  5622. * src/DefaultBtMessageFactory.h
  5623. (dispatcher): New variable.
  5624. (requestFactory): New variable.
  5625. (peerConnection): New variablle.
  5626. (setBtMessageDispatcher): New function.
  5627. (setBtRequestFactory): New function.
  5628. (setPeerConnection): New function.
  5629. * src/SharedHandle.h
  5630. (RefCount): New class.
  5631. (WeakHandle): New class.
  5632. * src/PeerObject.h
  5633. (BtMessageReceiver.h): New include.
  5634. (PeerObject): Added btMessageReceiver.
  5635. (btMessageReceiver): New variable.
  5636. * src/Util.cc
  5637. (countBit): Simplified.
  5638. * src/BtCancelMessage.cc
  5639. (doReceivedAction): Use dispatcher member.
  5640. * src/BtRequestFactory.h
  5641. (BtRequestFactoryWeakHandle): New type definition.
  5642. * src/PeerStorage.h
  5643. (downloadSpeed): int -> uint32_t
  5644. (uploadSpeed): int -> uint32_t
  5645. (sessionDownloadLength): long long int -> uint64_t
  5646. (sessionUploadLength): long long int -> uint64_t
  5647. 2007-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5648. To add RecoverableException, FatalException:
  5649. * src/AbstractCommand.cc
  5650. (onAbort): Exception -> RecoverableException
  5651. * src/PeerAbstractCommand.h
  5652. (RecoverableException.h): New include.
  5653. (onAbort): Exception -> RecoverableException.
  5654. * src/PeerInteractionCommand.cc
  5655. (onAbort): Exception -> RecoverableException.
  5656. * src/PeerAbstractCommand.cc
  5657. (execute): Exception -> RecoverableException.
  5658. (onAbort): Exception -> RecoverableException.
  5659. * src/TorrentRequestInfo.cc
  5660. (execute): Exception -> RecoverableException.
  5661. * src/MetalinkRequestInfo.cc
  5662. (execute): Exception -> RecoverableException.
  5663. * src/MetaFileUtil.cc: RecoverableException.
  5664. * src/AbstractCommand.h
  5665. (onAbort): Exception -> RecoverableException.
  5666. * src/DlRetryEx.h: Exception -> RecoverableException.
  5667. * src/DlAbortEx.h: Exception -> RecoverableException.
  5668. * src/PeerListenCommand.cc: Exception -> RecoverableException.
  5669. * src/Util.cc: Exception -> RecoverableException.
  5670. * src/DefauldDiskWriter.cc: Exception -> RecoverableException.
  5671. * src/TrackerUpdateCommand.cc: Exception -> RecoverableException.
  5672. * src/UrlRequestInfo.cc: Exception -> RecoverableException.
  5673. To make ID static const int
  5674. * src/BtInterestedMessage.h
  5675. (ID_t): Removed.
  5676. (ID): New variable.
  5677. (getId): Made non-const.
  5678. * src/BtPieceMessage.h
  5679. (ID_t): Removed.
  5680. (ID): New variable.
  5681. (getId): Made non-const.
  5682. * src/BtChokeMessage.h
  5683. (ID_t): Removed.
  5684. (ID): New variable.
  5685. (getId): Made non-const.
  5686. * src/BtHaveAllMessage.h
  5687. (ID_t): Removed.
  5688. (ID): New variable.
  5689. (getId): Made non-const.
  5690. * src/BtKeepAliveMessage.h
  5691. (ID_t): Removed.
  5692. (ID): New variable.
  5693. (getId): Made non-const.
  5694. * src/BtHandshakeMessage.h
  5695. (ID): New variable.
  5696. (getId): Made non-const.
  5697. * src/BtSuggestPieceMessage.h
  5698. (ID_t): Removed.
  5699. (ID): New variable.
  5700. (getId): Made non-const.
  5701. * src/BtPortMessage.h
  5702. (ID_t): Removed.
  5703. (ID): New variable.
  5704. (getId): Made non-const.
  5705. * src/AbstractBtMessage.h
  5706. (id): Removed.
  5707. (AbstractBtMessage): Removed id.
  5708. (getId): Removed.
  5709. * src/BtHaveMessage.h
  5710. (ID_t): Removed.
  5711. (ID): New variable.
  5712. (getId): Made non-const.
  5713. * src/BtAllowedFastMessage.h
  5714. (ID_t): Removed.
  5715. (ID): New variable.
  5716. (getId): Made non-const.
  5717. * src/BtCancelMessage.h
  5718. (ID_t): Removed.
  5719. (ID): New variable.
  5720. (getId): Made non-const.
  5721. * src/BtNotInterestedMessage.h
  5722. (ID_t): Removed.
  5723. (ID): New variable.
  5724. (getId): Made non-const.
  5725. * src/BtChokeMessage.h
  5726. (ID_t): Removed.
  5727. (ID): New variable.
  5728. (getId): Made non-const.
  5729. * src/BtRejectMessage.h
  5730. (ID_t): Removed.
  5731. (ID): New variable.
  5732. (getId): Made non-const.
  5733. * src/BtBitfieldMessage.h
  5734. (ID_t): Removed.
  5735. (ID): New variable.
  5736. (getId): Made non-const.
  5737. * src/BtUnchokeMessage.h
  5738. (ID_t): Removed.
  5739. (ID): New variable.
  5740. (getId): Made non-const.
  5741. * src/BtRequestMessage.h
  5742. (ID_t): Removed.
  5743. (ID): New variable.
  5744. (getId): Made non-const.
  5745. * src/BtHaveMessage.h
  5746. (ID_t): Removed.
  5747. (ID): New variable.
  5748. (getId): Made non-const.
  5749. To add --force-truncate command-line option and a check whether
  5750. the file already exists:
  5751. * src/DirectDiskAdaptor.h
  5752. (getFilePath): Made virtual public.
  5753. * src/MultiDiskAdaptor.h
  5754. (File.h): New include.
  5755. (DiskWriterEntry::fileEntry): Made private.
  5756. (DiskWriterEntry::fileExists): New function.
  5757. (DiskWriterEntry::getFileEntry): New function.
  5758. (fileExists): New function.
  5759. (getFilePath): New function.
  5760. * src/TorrentRequestInfo.cc
  5761. (FatalException.h): New include.
  5762. (message.h): New include.
  5763. (RecoverableException.h): New include.
  5764. (execute): Added a check whether file is already exists or not.
  5765. * src/DiskAdaptor.h
  5766. (fileExists): New function.
  5767. (getFilePath): New function.
  5768. * src/main.cc
  5769. (showUsage): Added an explanation of --force-truncate command-line
  5770. option.
  5771. (main): Added --force-truncate command-line option.
  5772. * src/Exception.h
  5773. (setMsg): buf[256] -> buf[1024]
  5774. * src/CopyDiskWriter.h
  5775. (getFilePath): Made public virtual.
  5776. * src/MultiDiskAdaptor.cc: fileEntry -> getFileEntry()
  5777. (fileExists): New function.
  5778. * src/DownloadEngineFactory.cc
  5779. (newTorrentConsoleEngine): Don't open file here.
  5780. * src/message.h
  5781. (EX_FILE_ALREADY_EXISTS): New definition.
  5782. * src/prefs.h
  5783. (PREF_FOECE_TRUNCATE): New definition.
  5784. * src/HttpResponseCommand.cc
  5785. (handleDefaultEncoding): Added a check whether the file already exists.
  5786. * src/SegmentMan.h
  5787. (fileExists): New function.
  5788. (shouldCancelDownloadForSafety): New function.
  5789. * src/FtpNegotiateCommand.cc
  5790. (recvSize): Added a check whether the file already exists.
  5791. * src/AbstractSingleDiskAdaptor.cc
  5792. (File.h): New include.
  5793. (fileExists): New function.
  5794. * src/AbstractSingleDiskAdaptor.h
  5795. (getFilePath): Removed.
  5796. (fileExists): New function.
  5797. * src/SegmentMan.cc
  5798. (fileExists): New function.
  5799. (shouldCancelDownloadForSafety): New function.
  5800. To fix regression bug in torrent downloading:
  5801. * src/DefaultBtRequestFactory.cc
  5802. (doChokedAction): New function.
  5803. * src/DefaultBtRequestFactory.h
  5804. (doChokedAction): New function.
  5805. * src/DefaultBtMessageDispatcher.cc
  5806. (doChokedAction): Do not delete request if its target is in allowed
  5807. fast set.
  5808. * src/DefaultBtInteractive.cc
  5809. (doPostHandshakeProcessing): Added a call to sendPendingMessage().
  5810. (sendKeepAlive): Send keep alive message even if the outgoing message
  5811. queue is not empty.
  5812. (decideInterest): Simplified the code.
  5813. (fillPiece): Remove a call to dispatcher->doChokedAction() because
  5814. it is already called when BtChokeMessage is received from a peer.
  5815. * src/BtRequestFactory.h
  5816. (doChokedAction): New function.
  5817. To clean up code:
  5818. * src/PeerInteractionCommand.h
  5819. (executeInternal): Added virtual keyword explicitly.
  5820. (prepareForRetry): Added virtual keyword explicitly.
  5821. (prepareForNextPeer): Added virtual keyword explicitly.
  5822. (onAbort): Added virtual keyword explicitly.
  5823. * src/RequestSlot.cc
  5824. (isTimeout): Use Time::elapsed() instead of differenceInMillis().
  5825. * src/BtPieceMessage.cc
  5826. (doReceivedAction): Added a debug log of piece's bitfield.
  5827. * src/Piece.h
  5828. (getBitfieldLength): New function.
  5829. * src/ByteArrayDiskWriter.cc
  5830. (clear): Added buf = 0 to avoid double free corruption.
  5831. * src/FileAllocator.cc
  5832. (allocate): Fixed an assignment of fileAllocationMonitor->currentValue.
  5833. Added cp.reset().
  5834. * src/BitfieldMan.h
  5835. (operator=): Rewritten.
  5836. * src/BitfieldMan.cc
  5837. (BitfieldMan): Initialized bitfield, useBitfield.
  5838. * src/PeerConnection.cc
  5839. (receiveMessage): Added a call to socket->readable() after getting
  5840. message length to avoid possible EOF.
  5841. * src/Util.cc
  5842. (torrentUrlencode): Fixed an encodeing bug. BUG#1629912
  5843. 2007-01-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5844. To add an ability to pre-allocate file space:
  5845. * src/DirectDiskAdaptor.h: Rewritten.
  5846. * src/PieceStorage.h: DiskAdaptor -> DiskAdaptorHandle
  5847. * src/MultiDiskAdaptor.h: Rewritten.
  5848. * src/DefaultPieceStorage.cc
  5849. (MultiDiskWriter.h): Removed include.
  5850. (PreAllocationDiskWriter.h): Removed include.
  5851. (FileAllocationMonitor.h): New include.
  5852. (~DefaultPieceStorage): Removed deletion of diskAdaptor.
  5853. (initStorage): Rewritten.
  5854. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5855. * src/FileAllocator.h: New class.
  5856. * src/FileAllocator.cc: New class.
  5857. * src/FileAllocationMonitor.h: New class.
  5858. * src/FileAllocationMonitor.cc: New class.
  5859. * src/ConsoleFileAllocationMonitor.h: New class.
  5860. * src/ConsoleFileAllocationMonitor.cc: New class.
  5861. * src/AbstractSingleDiskAdaptor.h: New class.
  5862. * src/AbstractSingleDiskAdaptor.cc: New class.
  5863. * src/DiskAdaptor.h
  5864. (Directory.h): Removed include.
  5865. (DiskWriter.h): Removed include.
  5866. (FileEntry.h): Removed include.
  5867. (diskWriter): Removed.
  5868. (DiskAdaptor): Removed diskWriter.
  5869. (openFile): Made pure virtual.
  5870. (closeFile): Made pure virtual.
  5871. (openExistingFile): Made pure virtual.
  5872. (initAndOpenFile): Made pure virtual.
  5873. (writeData): Made pure virtual.
  5874. (readData): Made pure virtual.
  5875. (sha1Sum): Made pure virtual.
  5876. (getStoreDir): Returns const reference of storeDir.
  5877. (DiskAdaptorHandle): New type definition.
  5878. * src/main.cc
  5879. (ConsoleFileAllocationMonitor.h): New include.
  5880. (showUsage): Added default value description of -s option.
  5881. Added the description of --file-allocation option.
  5882. (main): Set default value of --file-allocation option to 'none'.
  5883. Added --file-allocation command-line option.
  5884. Setup FileAllocationMonitorFactory.
  5885. * src/FtpInitiateConnectionCommand.cc
  5886. (executeInternal): Removed diskWriter related processing, which was
  5887. moved to FtpNegotiationCommand.cc.
  5888. * src/DirectDiskAdaptor.cc
  5889. (getFilePath): Made non-const.
  5890. * src/CopyDiskAdaptor.h
  5891. (DiskAdaptor.h): Removed include.
  5892. (DiskWriter.h): Removed include.
  5893. (AbstractSingleDiskAdaptor.h): New include.
  5894. (getFilePath): Made non-const. Added virtual keyword.
  5895. (CopyDiskAdaptor): Removed diskWriter.
  5896. (getTempFile): Returns const reference.
  5897. (CopyDiskAdaptorHandle): New type definition.
  5898. * src/ByteArrayDiskWriter.cc
  5899. (clear): Simplified.
  5900. (initAndOpenFile): Rewritten.
  5901. (openFile): Call initAndOpenFile()
  5902. * src/MultiDiskAdaptor.cc: Rewritten.
  5903. * src/DownloadEngineFactory.cc
  5904. (FileAllocator.h): New include.
  5905. (FileAllocationMonitor.h): New include.
  5906. (newConsoleEngine): Call DefaultDiskWriter::createNewDiskWriter() to
  5907. create DefaultDiskWriter with file allocator.
  5908. * src/DiskWriter.h
  5909. (initAndOpenFile): Added totalLength argument.
  5910. (openFile): Added totalLength argument.
  5911. * src/prefs.h
  5912. (PREF_FILE_ALLOCATION): New definition.
  5913. (V_PREALLOC): New definition.
  5914. (V_NONE): New definition.
  5915. * src/HttpResponseCommand.cc
  5916. (handleDefaultEncoding): Call DefaultDiskWriter::initAndOpenFile with
  5917. size.
  5918. * src/FtpNegotiateCommand.cc
  5919. (Util.h): New include.
  5920. (recvSize): Open file here.
  5921. * src/Util.h
  5922. (ullitos): New function.
  5923. * src/CopyDiskWriter.h
  5924. (getFilePath): Made non-const.
  5925. * src/DefaultDiskWriter.h
  5926. (Option.h): New include.
  5927. (totalLength): Removed.
  5928. (DefaultDiskWriter): Removed totalLength.
  5929. (initAndOpenFile): Added totalLength argument.
  5930. (DefaultDiskWriterHandle): New type definition.
  5931. (createNewDiskWriter): New function.
  5932. * src/Util.cc
  5933. (ullitos): New function.
  5934. * src/DefaultDiskWriter.cc
  5935. (message.h): New include.
  5936. (FileAllocator.h): New include.
  5937. (prefs.h): New include.
  5938. (Util.h): New include.
  5939. (DefaultDiskWriter): Removed totalLength.
  5940. (initAndOpenFile): Added file allocation.
  5941. (createNewDiskWriter): New function. Just for temporary solution.
  5942. It will be rewritten later.
  5943. * src/DiskAdaptor.cc
  5944. (DiskAdaptor): Removed diskWriter.
  5945. * src/AbstractDiskWriter.cc
  5946. (LogFactory.h): New include.
  5947. (AbstractDiskWriter): Added fileAllocator, logger.
  5948. (openFile): Added totalLength argument.
  5949. * src/AbstractDiskWriter.h
  5950. (FileAllocator.h): New include.
  5951. (Logger.h): New include.
  5952. (fileAllocator): New variable.
  5953. (logger): New variable.
  5954. (openFile): Added totalLength argument. Added virtual keyword
  5955. explicitly.
  5956. (openExistingFile): Added totalLength argument. Added virtual keyword
  5957. explicitly.
  5958. (closeFile): Added virtual keyword explicitly.
  5959. (sha1Sum): Added virtual keyword explicitly.
  5960. (writeData): Added virtual keyword explicitly.
  5961. (readData): Added virtual keyword explicitly.
  5962. (setFileAllocator): New function.
  5963. * src/DefaultPieceStorage.h
  5964. (FileAllocator.h): New include.
  5965. (diskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5966. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5967. * src/FileProgressMonitor.h: New class.
  5968. To compile aria2 on PC-BSD:
  5969. * src/DefaultBtContext.cc
  5970. (libgen.h): New include.
  5971. To fix memory leak:
  5972. * src/Exception.h
  5973. (~Exception): Delete cause. Fixed memory leak.
  5974. 2006-12-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5975. Rewritten a portion of bittorrent implementation:
  5976. * src/BtMessageValidator.h: New class.
  5977. * src/BtBitfieldMessageValidator.h: New class.
  5978. * src/BtHandshakeMessageValidator.h: New class.
  5979. * src/BtRequestMessageValidator.h: New class.
  5980. * src/BtSuggestPieceMessageValidator.h: New class.
  5981. * src/BtAllowedFastMessageValidator.h: New class.
  5982. * src/BtRejectMessageValidator.h: New class.
  5983. * src/BtCancelMessageValidator.h: New class.
  5984. * src/BtPieceMessageValidator.h: New class.
  5985. * src/BtHaveMessageValidator.h: New class.
  5986. * src/BtEventListener.h: New class.
  5987. * src/AbstractBtEventListener.h: New class.
  5988. * src/BtEvent.h: New class.
  5989. * src/BtChokingEvent.h: New class.
  5990. * src/BtChokedEvent.h: New class.
  5991. * src/BtCancelSendingPieceEvent.h: New class.
  5992. * src/BtAbortOutstandingRequestEvent.h: New class.
  5993. * src/Randomizer.h: New class.
  5994. * src/SimpleRandomizer.h: New class.
  5995. * src/BtMessage.h: New class.
  5996. * src/AbstractBtMessage.h: New class.
  5997. * src/SimpleBtMessage.h: New class.
  5998. * src/BtHaveMessage.h: New class.
  5999. * src/BtInterestedMessage.h: New class.
  6000. * src/BtAllowedFastMessage.h: New class.
  6001. * src/BtUnchokeMessage.h: New class.
  6002. * src/BtCancelMessage.h: New class.
  6003. * src/BtNotInterestedMessage.h: New class.
  6004. * src/BtChokeMessage.h: New class.
  6005. * src/BtHaveNoneMessage.h: New class.
  6006. * src/BtHandshakeMessage.h: New class.
  6007. * src/BtSuggestPieceMessage.h: New class.
  6008. * src/BtHaveMessage.h: New class.
  6009. * src/BtPieceMessage.h: New class.
  6010. * src/BtHaveAllMessage.h: New class.
  6011. * src/BtKeepAliveMessage.h: New class.
  6012. * src/BtPortMessage.h: New class.
  6013. * src/BtRejectMessage.h: New class.
  6014. * src/BtBitfieldMessage.h: New class.
  6015. * src/BtRequestMessage.h: New class.
  6016. * src/DefaultBtRequestFactory.h: New class.
  6017. * src/DefaultBtMessageReceiver.h: New class.
  6018. * src/BtInteractive.h: New class.
  6019. * src/BtMessageDispatcher.h: New class.
  6020. * src/DefaultBtMessageDispatcher.h: New class.
  6021. * src/DefaultBtInteractive.h: New class.
  6022. * src/BitfieldManFactory.h: New class.
  6023. * src/HandleRegistry.h: New class.
  6024. * src/BtMessageFactory.h: New class.
  6025. * src/BtMessageReceiver.h: New class.
  6026. * src/DefaultBtMessageFactory.h: New class.
  6027. * src/PeerObject.h: New class.
  6028. * src/BtRequestFactory.h: New class.
  6029. * src/SuggestPieceMessage.h: Removed.
  6030. * src/PortMessage.h: Removed.
  6031. * src/SuggestPieceMessage.h: Removed.
  6032. * src/KeepAliveMessage.h: Removed.
  6033. * src/HandshakeMessage.h: Removed.
  6034. * src/PeerInteraction.h: Removed.
  6035. * src/UnchokeMessage.h: Removed.
  6036. * src/PieceMessage.h: Removed.
  6037. * src/RequestMessage.h: Removed.
  6038. * src/InterestedMessage.h: Removed.
  6039. * src/HaveMessage.h: Removed.
  6040. * src/CancelMessage.h: Removed.
  6041. * src/RejectMessage.h: Removed.
  6042. * src/AllowedFastMessage.h: Removed.
  6043. * src/HaveNoneMessage.h: Removed.
  6044. * src/SimplePeerMessage.h: Removed.
  6045. * src/HaveAllMessage.h: Removed.
  6046. * src/BitfieldMessage.h: Removed.
  6047. * src/PeerMessageFactory.h: Removed.
  6048. * src/NotInterestedMessage.h: Removed.
  6049. * src/ChokeMessage.h: Removed.
  6050. * src/PeerMessage.h: Removed.
  6051. 2006-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6052. To know root cause of exception:
  6053. * src/Exception.h
  6054. (cause): New variable.
  6055. (Exception): Added a parameter.
  6056. (getMsg): Return const reference to msg.
  6057. (getCause): New function.
  6058. * src/DlRetryEx.h
  6059. (DlRetryEx): Added a parameter 'cause'.
  6060. Added an overloaded constructor.
  6061. (DlAbortEx): Added a parameter 'cause'.
  6062. Added an overloaded constructor.
  6063. * src/SimpleLogger.cc
  6064. (writeLog): Log nested exception messages recursively.
  6065. 2006-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6066. * src/DefaultBtProgressInfoFile.cc
  6067. (load): Fixed memory leak when the infohash doesn't match.
  6068. 2006-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6069. * src/DefaultPeerStorage.cc
  6070. (calculateStat): Simplified the code by combining 2 loops into 1.
  6071. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6072. Introduce new preference PREF_BT_TIMEOUT. This is the timeout value
  6073. for BitTorrent download:
  6074. * src/PeerAbstractCommand.cc
  6075. (PeerAbstractCommand): PREF_TIMEOUT -> PREF_BT_TIMEOUT
  6076. * src/main.cc:
  6077. (timeoutSpecified): Removed.
  6078. (main): Set the initial value of PREF_BT_TIMEOUT to 180.
  6079. Removed timeoutSpecified. TODO: Add --bt-timeout command line option.
  6080. * src/TorrentRequestInfo.cc
  6081. (timeoutSpecified): Removed.
  6082. (torrentHandler): Removed timeoutSpecified and the adjustment of
  6083. timeout value.
  6084. * src/prefs.h
  6085. (PREF_BT_TIMEOUT): New definition.
  6086. Delete unused variables:
  6087. * src/TorrentRequestInfo.cc
  6088. (requestInfo): Removed.
  6089. Move setSignalHander to Util::setGlobalSignalHandler:
  6090. * src/TorrentRequestInfo.cc:
  6091. setSignalHander -> Util::setGlobalSignalHandler
  6092. * src/main.cc
  6093. (setSignalHander): Removed.
  6094. (main): setSignalHander -> Util::setGlobalSignalHandler
  6095. * src/Util.h
  6096. (setGlobalSignalHandler): New function.
  6097. * src/Util.cc
  6098. (setGlobalSignalHandler): New function.
  6099. * src/UrlRequestInfo.cc:
  6100. setSignalHander -> Util::setGlobalSignalHandler
  6101. Reset peer status in order to exit gracefully:
  6102. * src/PeerAbstractCommand.cc
  6103. (execute): Call peer->resetStatus() when btRuntime->isHalt() is true.
  6104. To fix the bug that causes the number of bytes uploaded is not saved
  6105. to .aria2 file:
  6106. * src/DefaultPeerStorage.h
  6107. (removedPeerSessionDownloadLength): New variable.
  6108. (removedPeerSessionUploadLength): New variable.
  6109. * src/DefaultPeerStorage.cc
  6110. (DefaultPieceStorage): Added removedPeerSessionDownloadLength(0),
  6111. removedPeerSessionUploadLength(0).
  6112. (calculateStat): Calculate the number of bytes downloaded(uploaded)
  6113. through all peers, and then add removedPeerSessionDownloadLength(
  6114. removedPeerSessionUploadLength) to it.
  6115. (deleteUnusedPeer): Add the number of bytes downloaded(uploaded) from
  6116. (to) the peer to removedPeerSessionDownloadLength
  6117. (removedPeerSessionUploadLength).
  6118. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6119. To add Metalink location option:
  6120. * src/MetalinkRequestInfo.cc
  6121. (execute): Call MetalinkEntry::setLocationPreference()
  6122. * src/main.cc
  6123. (showUsage): Added the help message for --metalink-location option.
  6124. (main): Added --metalink-location option.
  6125. * src/prefs.h
  6126. (PREF_METALINK_LOCATION): New definition.
  6127. * src/MetalinkEntry.cc
  6128. (AddLocationPreference): New function object.
  6129. (setLocationPreference): New function.
  6130. * src/Xml2MetalinkProcessor.cc
  6131. (getResource): Set location attribute to MetalinkResource
  6132. To show URLs to download
  6133. * src/UrlRequestInfo.h
  6134. (printUrls): New function.
  6135. To add multiple <file> Metalink support:
  6136. * src/MetalinkEntry.h
  6137. (MetalinkResources): Removed.
  6138. (setLocationPreference): New function.
  6139. (MetalinkEntryHandle): New type definition.
  6140. (MetalinkEntries): New type definition.
  6141. * src/Xml2MetalinkProcessor.h
  6142. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  6143. (getResource): MetalinkResource* -> MetalinkResourceHandle
  6144. (parseFile): Metalinker* -> MetalinkerHandle
  6145. * src/UrlRequestInfo.h
  6146. (execute): RequestInfo* -> RequestInfos
  6147. * src/MetalinkRequestInfo.cc
  6148. (AccumulateNonP2PUrl): MetalinkResource* -> MetalinkResourceHandle
  6149. (FindBitTorrentUrl): MetalinkResource* -> MetalinkResourceHandle
  6150. (execute): RequestInfo* -> RequestInfos
  6151. Added multiple <file> support. Print filename when it is queued.
  6152. * src/MetalinkRequestInfo.h
  6153. (execute): RequestInfo* -> RequestInfos
  6154. (getDownloadEngine): Removed.
  6155. * src/RequestInfo.h
  6156. (RequestInfoHandle): New type definition.
  6157. (RequestInfos): New type definition.
  6158. (execute): RequestInfo* -> RequestInfos
  6159. (getDownloadEngine): Removed.
  6160. * src/MetalinkResource.h
  6161. (MetalinkResourceHandle): New type definition.
  6162. (MetalinkResources): New type definition.
  6163. * src/MetalinkEntry.cc
  6164. (~MetalinkEntry): Removed the deletion of the elements of resources,
  6165. because the element is now of type MetalinkResourceHandle.
  6166. (PrefOrder): MetalinkResource* -> MetalinkResourceHandle
  6167. (Supported): MetalinkResource* -> MetalinkResourceHandle
  6168. (dropUnsupportedResource): Removed the deletion of the elements of
  6169. resources because the element is now of type MetalinkResourceHandle.
  6170. * src/Xml2MetalinkProcessor.cc
  6171. (parseFile): Metalinker* -> MetalinkerHandle
  6172. MetalinkEntry* -> MetalinkEntryHandle
  6173. Removed try-catch block.
  6174. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  6175. MetalinkResource* -> MetalinkResourceHandle
  6176. Removed try-catch block.
  6177. (getResource): MetalinkResource* -> MetalinkResourceHandle
  6178. Free result by using xmlXPathFreeObject()
  6179. * src/Metalinker.cc
  6180. (~Metalinker): Removed the deletion of entries.
  6181. MetalinkEntry* -> MetalinkEntryHandle
  6182. (queryEntry): Add multiple <file> Metalink support.
  6183. * src/Metalinker.h
  6184. (MetalinkEntries): Removed.
  6185. (queryEntry): MetalinkEntry* -> MetalinkEntries
  6186. * src/MetalinkProcessor.h
  6187. (parseFile): Metalinker* -> MetalinkerHandle
  6188. Bug fixes:
  6189. * src/PeerChokeCommand.cc
  6190. (execute): cat01->cat02
  6191. * src/DefaultPieceStorage.cc
  6192. (DefaultPieceStorage): Added diskAdaptor(0)
  6193. * src/TrackerWatcherComand.cc:
  6194. (execute): Use btAnnounce->noMoreAnnounce()
  6195. to determin whether the function returns true or not.
  6196. * src/TrackerUpdateCommand.cc:
  6197. (execute): Use btAnnounce->noMoreAnnounce()
  6198. to determin whether the function returns true or not.
  6199. * src/FtpConnection.cc
  6200. (bulkReceiveResponse): Throw DlRetryEx if EOF got.
  6201. This is the fix of the busy loop bug.
  6202. * src/DownloadCommand.cc
  6203. (DownloadCommand): Reuse PeerStat. segmentMan->getPeerStat() returns
  6204. cached PeerStat.
  6205. The value of "name" entry in torrent file is now set by
  6206. *DiskAdaptor::setTopDir(...) methods.
  6207. * src/MultiDiskAdaptor.h
  6208. (topDir): New variable.
  6209. (setTopDir): New function.
  6210. (getTopDir): New function.
  6211. * src/MultiDiskAdaptor.cc
  6212. (getFilePath): Concat storDir, "/" and topDir.
  6213. (mkdir): Use getFilePath() to get the directory path for output.
  6214. * src/DefaultPieceStorage.cc
  6215. (initStorage): Set the value of "name" entry to MultiDiskAdaptor,
  6216. CopyDiskAdaptor.
  6217. * src/CopyDiskAdaptor.h
  6218. (topDir): New variable.
  6219. (setTopDir): New function.
  6220. (getTopDir): New function.
  6221. * src/CopyDiskAdaptor.cc
  6222. (fixFilename): Updated.
  6223. Misc
  6224. * src/UrlRequestInfo.h
  6225. (e): Removed.
  6226. (UrlRequestInfo): Removed e.
  6227. (getDownloadEngine): Removed.
  6228. * src/UrlRequestInfo.cc
  6229. (handler): Rewritten.
  6230. (printUrls): New function.
  6231. (execute): Call printUrls().
  6232. * src/HandshakeMessage.cc
  6233. (check): peerinteraction->getBtContext() -> btContext
  6234. * src/PeerInteraction.h
  6235. (getBtContext): Removed.
  6236. * src/TorrentRequestInfo.h
  6237. (execute): RequestInfo* -> RequestInfos
  6238. (getDownloadEngine): Removed.
  6239. * src/TorrentRequestInfo.cc
  6240. (haltRequested): Removed.
  6241. (btHaltRequested): New variable.
  6242. (torrentHandler): haltRequested -> btHaltRequested
  6243. (execute): RequestInfo* -> RequestInfos
  6244. * src/TorrentConsoleDownloadEngine.cc
  6245. (afterEachIteration): haltRequested -> btHaltRequested.
  6246. * src/ConsoleDownloadEngine.h
  6247. (initStatistics): Added virtual.
  6248. (calculateStatistics): Added virtual.
  6249. (onEndOfRun): Added virtual.
  6250. (afterEachIteration): Added virtual.
  6251. * src/ConsoleDownloadEngine.cc
  6252. (haltRequested): New variable.
  6253. (afterEachIteration): New function.
  6254. * src/main.cc
  6255. (requestInfo): Removed.
  6256. * src/SegmentMan.cc
  6257. (findSlowerSegmentEntry): Refactored.
  6258. * Release 0.9.0
  6259. 2006-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6260. To divide TorrentMan into 6 classes: BtContext, BtRuntime,
  6261. PeerStorage, PieceStorage, BtAnnounce and BtProgressInfoFile
  6262. * src/TorrentMan.h: Removed.
  6263. * src/TorrentMan.cc: Removed.
  6264. * src/TrackerWatcherComand.h: Made subclass of BtContextAwareCommand.
  6265. * src/SeedCheckCommand.cc: Use pieceStorage, btRuntime
  6266. * src/PeerAbstractCommand.h: Made subclass of BtContextAwareCommand.
  6267. * src/PeerAbstractCommand.cc: Use btRuntime.
  6268. * src/BtContextAwareCommand.h: New class.
  6269. * src/FileEntry.h: Added accessor methods for following variables.
  6270. (path): Made private.
  6271. (length): Made private.
  6272. (offset): Made private.
  6273. (extracted): Made private.
  6274. (requested): Made private.
  6275. (FileEntries): New definition.
  6276. (FileEntryHandle): New definition.
  6277. * src/FileEntry.cc: New file.
  6278. * src/HaveEraseCommand.h: Made subclass of BtContextAwareCommand.
  6279. * src/HaveEraseCommand.cc: Use btRuntime, pieceStorage.
  6280. * src/PeerChokeCommand.h: Made subclass of BtContextAwareCommand.
  6281. * src/PeerChokeCommand.cc: Use btRuntime, peerStorage, pieceStorage.
  6282. * src/PieceStorage.h: New file.
  6283. * src/PeerInteractionCommand.h: Use btContext.
  6284. * src/PeerInteractionCommand.cc: Use pieceStorage, peerStorage,
  6285. btRuntime.
  6286. * src/DefaultBtProgressInfoFile.h: New file.
  6287. * src/DefaultBtProgressInfoFile.cc: New file.
  6288. * src/File.cc
  6289. (Util.h): New include.
  6290. (mkdirs): New function.
  6291. * src/MultiDiskAdaptor.h
  6292. (mkdir): New function.
  6293. * src/PeerListProcessor.h
  6294. (Peers): Removed.
  6295. * src/PeerInteraction.h
  6296. (torrentMan): Removed.
  6297. (btContext): New variable.
  6298. (peerStorage): New variable.
  6299. (pieceStorage): New variable.
  6300. (btAnnounce): New variable.
  6301. (getTorrentMan): Removed.
  6302. (getBtContext): New function.
  6303. * src/PeerInteraction.cc: Use btContext, peerStorage, pieceStorage,
  6304. btAnnounce.
  6305. * src/HandshakeMessage.h
  6306. (TorrentMan.h): Removed.
  6307. * src/HandshakeMessage.cc: Use btContext.
  6308. * src/DefaultBtAnnounce.cc: New file.
  6309. * src/MultiDiskWriter.cc: Use the accessor methods of FileEntry.
  6310. * src/DefaultPieceStorage.cc: New file.
  6311. * src/DefaultBtContext.h: New file.
  6312. * src/TorrentRequestInfo.cc: Use btContext, pieceStorage.
  6313. Use the accessor methods of FileEntry.
  6314. * src/CookieBox.cc: Updated to use Util::slice().
  6315. * src/PieceMessage.cc: Use btContext, pieceStorage.
  6316. * src/common.h (SharedHandle.h): New include.
  6317. * src/PeerMessage.cc (PeerMessage): Added btContext, peerStorage,
  6318. pieceStorage.
  6319. * src/TorrentAutoSaveCommand.h: Made subclass of BtContextAwareCommand.
  6320. * src/DiskAdaptor.h
  6321. (topDir): Removed.
  6322. (getFileEntryFromPath): Changed the return type to FileEntryHandle.
  6323. (setTopDir): Removed.
  6324. (getTopDir): Removed.
  6325. * src/BtContext.h: New file.
  6326. * src/DefaultPeerStorage.h: New file.
  6327. * src/PieceMessage.h (TorrentMan.h): Removed.
  6328. * src/RequestMessage.h (TorrentMan.h): Removed.
  6329. * src/TorrentDownloadEngine.h
  6330. (uploadLength): New variable.
  6331. (btContext): New variable.
  6332. (btRuntime): New variable.
  6333. (pieceStorage): New variable.
  6334. (peerStorage): New variable.
  6335. (btAnnounce): New variable.
  6336. (btProgressInfoFile): New variable.
  6337. (torrentMan): Removed.
  6338. (setBtContext): New function.
  6339. * src/TorrentDownloadEngine.cc: Use BtContext, BtRuntime, pieceStorage,
  6340. peerStorage, btAnnounce, btProgressInfoFile.
  6341. * src/Piece.h
  6342. (toString): New function.
  6343. (Pieces): New type definition.
  6344. * src/Peer.h
  6345. (active): New variable.
  6346. (Peer): Added active.
  6347. (activate): Set active to true.
  6348. (deactivate): Set active to false.
  6349. (isActive): New function.
  6350. (Peers): New type definition.
  6351. * src/DirectDiskAdaptor.cc
  6352. (getFilePath): Use the accessor methods of FileEntry.
  6353. * src/TorrentConsoleDownloadEngine.h
  6354. (afterEachIteration): New function.
  6355. * src/TorrentConsoleDownloadEngine.cc
  6356. (haltRequested): New variable.
  6357. (sendStatistics): Use pieceStorage, btRuntime.
  6358. (afterEachIteration): New function.
  6359. * src/AnnounceList: AnnounceTier->AnnounceTierHandle.
  6360. * src/Directry.h
  6361. (Directory): New function.
  6362. (DirectoryHandle): New type definition.
  6363. * src/BtProgressInfoFile.h: New file.
  6364. * src/RequestMessage.cc: Use pieceStorage.
  6365. * src/BtRuntime.h: New file.
  6366. * src/DefaultBtContext.cc: New file.
  6367. * src/BitfieldMan.h
  6368. (getCompletedLength): New function(private).
  6369. (getCompletedLength): New function.
  6370. (getFilteredCompletedLength): New function.
  6371. * src/BitfieldMan.h
  6372. (getCompletedLength): New function(private).
  6373. (getCompletedLength): New function.
  6374. (getFilteredCompletedLength): New function.
  6375. * src/MultiDiskAdaptor.cc
  6376. (mkdir): New function.
  6377. (openFile): Call mkdir().
  6378. (initAndOpenFile): Call mkdir().
  6379. * src/CancelMessage.h
  6380. (TorrentMan.h): Removed.
  6381. * src/RejectMessage.h
  6382. (TorrentMan.h): Removed.
  6383. * src/DownloadEngineFactory.cc
  6384. (DefaultPieceStorage.h): New include.
  6385. (DefaultPeerStorage.h): New include.
  6386. (DefaultBtAnnounce.h): New include.
  6387. (DefaultBtProgressInfoFile.h): New include.
  6388. (newTorrentConsoleEngine): Rewritten.
  6389. * src/ShareRatioSeedCriteria.h
  6390. (torrentMan): Removed.
  6391. (btContext): New variable.
  6392. (peerStorage): New variable.
  6393. (btRuntime): New variable.
  6394. (evaluate): Use btContext, btRuntime, peerStorage.
  6395. * src/AnnounceTier.h: New file.
  6396. * src/BtAnnounce.h: New file.
  6397. * src/BtRegistry.h: New file.
  6398. * src/PeerInitiateConnectionCommand.h: Added btContext.
  6399. * src/PeerConnection.h (TorrentMan.h): Removed.
  6400. * src/PeerMessageFactory.cc: Use btContext, pieceStorage.
  6401. * src/Util.h
  6402. (slice): Added an argument.
  6403. * src/Util.cc
  6404. (slice): Added an argument to control whether trim is made or not.
  6405. * src/PeerStorage.h: New file.
  6406. * src/BtRegistry.cc: New file.
  6407. * src/TrackerUpdateCommand.h: Made subclass of BtContextAwareCommand.
  6408. * src/CopyDiskAdaptor.cc: Use the accessor methods of FileEntry.
  6409. * src/MultiDiskWriter.h: FileEntry -> FileEntryHandle
  6410. * src/PeerListenCommand.cc: Use btRuntime, peerStorage, btContext.
  6411. * src/TorrentRequestInfo.h
  6412. (e): Removed.
  6413. (showFileEntry): Added an argument.
  6414. (getDownloadEngine): Return 0.
  6415. * src/DefaultBtAnnounce.h: New file.
  6416. * src/TorrentAutoSaveCommand.cc: Use btRuntime, btProgressInfoFile.
  6417. * src/TrackerWatcherComand.cc: Use btRuntime, btAnnounce,
  6418. * src/PeerMessageFactory.h
  6419. (btContext): New variable.
  6420. (pieceStorage): New variable.
  6421. * src/TrackerUpdateCommand.cc: Use btRuntime, peerStorage, btContext,
  6422. btAnnounce.
  6423. * src/DiskAdaptor.cc
  6424. (DiskAdaptor): Removed topDir.
  6425. (~DiskAdaptor): Removed topDir.
  6426. * src/PeerListenCommand.h: Made subclass of BtContextAwareCommand.
  6427. * src/SeedCheckCommand.h: Made subclass of BtContextAwareCommand.
  6428. * src/File.h (mkdirs): New function.
  6429. * src/DefaultPeerStorage): New file.
  6430. * src/DownloadEngineFactory.h
  6431. (newTorrentConsoleEngine): Use btContext.
  6432. * src/BtContextAwareCommand.cc: New file.
  6433. * src/PeerInitiateConnectionCommand.cc: Use btRuntime, peerStorage.
  6434. * src/PeerMessage.h
  6435. (btContext): New variable.
  6436. (peerStorage): New variable.
  6437. (pieceStorage): New variable.
  6438. (setBtContext): New function.
  6439. * src/Directry.cc
  6440. (Directory): New function.
  6441. (createDir): Do nothing if name.size() == 0.
  6442. * src/AnnounceList.h
  6443. (AnnounceTier): Removed.
  6444. (AnnounceTiers): Removed.
  6445. * src/DefaultPieceStorage.h: New file.
  6446. * src/Piece.cc (toString): New function.
  6447. To fix typo:
  6448. * src/main.cc (showVersion): Fixed typo.
  6449. To fix compile warning:
  6450. * src/DelegatingPeerListProcessor.cc
  6451. (canHandle): Added "return false".
  6452. 2006-10-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6453. To simplify TrackerWatherCommand, TrackerUpdateCommand and
  6454. make the process of announce request testable.
  6455. * src/TrackerWatcherCommand.h
  6456. (TimeA2.h): Removed.
  6457. (interval): Removed.
  6458. (checkPoint): Removed.
  6459. (createRequestCommand): Added an argument 'url'.
  6460. (TrackerWatherCommand): Removed interval.
  6461. (createCommand): New function.
  6462. * src/DownloadEngineFactory.cc
  6463. (newTorrentConsoleEngine): Updated according to the changes in
  6464. TrackerWatherCommand.
  6465. * src/TorrentMan.cc
  6466. (DelegatingPeerListProcessor.h): New includes.
  6467. (TorrentMan): Added the initialization of announceInterval.
  6468. (isStoppedAnnounceReady): New function.
  6469. (isCompletedAnnounceReady): New function.
  6470. (isDefaultAnnounceReady): New function.
  6471. (isAnnounceReady): New function.
  6472. (getAnnounceUrl): New function.
  6473. (announceStart): New function.
  6474. (announceFailure): New function.
  6475. (announceSuccess): New function.
  6476. (isAllAnnounceFailed): New function.
  6477. (resetAnnounce): New function.
  6478. (processAnnounceResponse): New function.
  6479. (needMorePeerConnection): New function.
  6480. (noMoreAnnounce): New function.
  6481. * src/TrackerUpdateCommand.h
  6482. (getTrackerResponse): int->size_t
  6483. * src/TorrentMan.h
  6484. (isStoppedAnnounceReady): New function.
  6485. (isCompletedAnnounceReady): New function.
  6486. (isDefaultAnnounceReady): New function.
  6487. (announceInterval): New variable.
  6488. (isAnnounceReady): New function.
  6489. (getAnnounceUrl): New function.
  6490. (announceStart): New function.
  6491. (announceFailure): New function.
  6492. (announceSuccess): New function.
  6493. (isAllAnnounceFailed): New function.
  6494. (resetAnnounce): New function.
  6495. (processAnnounceResponse): New function.
  6496. (needMorePeerConnection): New function.
  6497. (noMoreAnnounce): New function.
  6498. * src/TrackerWatcherCommand.cc
  6499. (TrackerWatherCommand): Removed interval and checkPoint.
  6500. (execute): Rewritten.
  6501. (createCommand): New function.
  6502. (createRequestCommand): Rewritten.
  6503. * src/TrackerUpdateCommand.cc
  6504. (MetaFileUtil.h): Removed.
  6505. (DelegatingPeerListProcessor.h): Removed.
  6506. (getTrackerResponse): int->size_t. Use torrentMan's new functions.
  6507. 2006-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6508. Request -> RequestHandle:
  6509. * src/HttpResponseCommand.h: Request->RequestHandle
  6510. * src/AbstractCommand.cc: Request->RequestHandle
  6511. * src/HttpDownloadCommand.cc: Request->RequestHandle
  6512. * src/HttpRequestCommand.cc: Request->RequestHandle
  6513. * src/FtpInitiateConnectionCommand.h: Request->RequestHandle
  6514. * src/AbstractCommand.h: Request->RequestHandle
  6515. * src/HttpProxyRequestCommand.h: Request->RequestHandle
  6516. * src/HttpResponseCommand.cc: Request->RequestHandle
  6517. * src/HttpInitiateConnectionCommand.h: Request->RequestHandle
  6518. * src/FtpNegotiateCommand.cc: Request->RequestHandle
  6519. * src/FtpTunnelResponseCommand.h: Request->RequestHandle
  6520. * src/HttpConnection.h: Request->RequestHandle
  6521. * src/HttpProxyResponseCommand.cc: Request->RequestHandle
  6522. * src/InitiateConnectionCommandFactory.h: Request->RequestHandle
  6523. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  6524. * src/DownloadCommand.h: Request->RequestHandle
  6525. * src/FtpDowndloadCommand.cc: Request->RequestHandle
  6526. * src/HttpInitiateConnectionCommand.cc: Request->RequestHandle
  6527. * src/HttpRequestCommand.h: Request->RequestHandle
  6528. * src/FtpNegotiateCommand.h: Request->RequestHandle
  6529. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  6530. * src/FtpInitiateConnectionCommand.cc: Request->RequestHandle
  6531. * src/HttpDownloadCommand.h: Request->RequestHandle
  6532. * src/FtpConnection.cc: Request->RequestHandle
  6533. * src/InitiateConnectionCommandFactory.cc: Request->RequestHandle
  6534. * src/UrlRequestInfo.cc: Request->RequestHandle
  6535. * src/HttpProxyResponseCommand.h: Request->RequestHandle
  6536. * src/HttpConnection.h: Request->RequestHandle
  6537. * src/DownloadCommand.cc: Request->RequestHandle
  6538. * src/FtpConnection.h: Request->RequestHandle
  6539. * src/FtpDowndloadCommand.h: Request->RequestHandle
  6540. * src/HttpProxyRequestCommand.cc: Request->RequestHandle
  6541. * src/FtpTunnelRequestCommand.h: Request->RequestHandle
  6542. * src/Request.h
  6543. (SharedHandle.h): New include.
  6544. (RequestHandle): New type definition.
  6545. (Requests): Redefined.
  6546. To add MULTITRACKER support:
  6547. * src/TrackerWatcherCommand.h
  6548. (createRequestCommand): New function.
  6549. * src/DownloadEngineFactory.cc
  6550. (newTorrentConsoleEngine): Removed req.
  6551. * src/prefs.h
  6552. (PREF_TRACKER_MAX_TRIES): New definition.
  6553. * src/TorrentMan.cc
  6554. (TorrentMan): Removed req. Added trackerNumTry.
  6555. (~TorrentMan): Removed req.
  6556. (setupInternal1): Added announceList.
  6557. * src/TorrentRequestInfo.cc
  6558. (execute): Set PREF_MAX_TIRES to 1. The max number of tries for
  6559. announces is now specified by PREF_TRACKER_MAX_TRIES.
  6560. * src/main.cc
  6561. (main): Added PREF_TRACKER_MAX_TRIES.
  6562. * src/TorrentMan.h
  6563. (Request.h): Removed.
  6564. (AnnounceList.h): New include.
  6565. (trackerNumTry): New variable.
  6566. (req): Removed.
  6567. (announceList): New variable.
  6568. * src/TrackerWatcherCommand.cc
  6569. (execute): Rewritten.
  6570. (createRequestCommand): New function.
  6571. * src/TrackerUpdateCommand.cc
  6572. (execute): Updated with the use of AnnounceList.
  6573. * src/AnnounceList.cc: New class.
  6574. * src/AnnounceList.h: New class.
  6575. To fix typo:
  6576. * src/prefs.h
  6577. (PREF_MAX_TRIES): max_try->max_tries
  6578. To not to decode "+" as space in URL decode:
  6579. * src/Util.cc
  6580. (urldecode): Removed "+"->space decoding rule. Test case was updated.
  6581. 2006-10-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6582. To add timeout to async name resolution:
  6583. * src/AbstractCommand.h
  6584. (nameResolveFinished): New function. This is not elegant way. It needs
  6585. to be more refined.
  6586. (nameResolverCheck): New variable.
  6587. * src/AbstractCommand.cc
  6588. (AbstractCommand): Added nameResolverCheck.
  6589. (execute): Added the check whether the name resolution has finished.
  6590. (setNameResolverCheck): Set nameResolverCheck to true.
  6591. (disableNameResolverCheck): Set nameResolverCheck to false.
  6592. (nameResolverFinished): New function.
  6593. * src/FtpInitiateConnectionCommand.h
  6594. (nameResolverFinished): New function.
  6595. * src/FtpInitiateConnectionCommand.cc
  6596. (FtpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  6597. * src/HttpInitiateConnectionCommand.h
  6598. (nameResolverFinished): New function.
  6599. * src/HttpInitiateConnectionCommand.cc
  6600. (HttpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  6601. * src/prefs.h
  6602. (PREF_DNS_TIMEOUT): New definition.
  6603. * src/main.cc
  6604. (main): Added PREF_DNS_TIMEOUT.
  6605. To add the support for a non-compact response from a tracker:
  6606. * src/PeerListProcessor.h: New class.
  6607. * src/DefaultPeerListProcessor.h: New class.
  6608. * src/DefaultPeerListProcessor.cc: New class.
  6609. * src/CompactPeerListProcessor.h: New class.
  6610. * src/CompactPeerListProcessor.cc: New class.
  6611. * src/DelegatingPeerListProcessor.h: New class.
  6612. * src/DelegatingPeerListProcessor.cc: New class.
  6613. * src/TorrentMan.cc
  6614. (addPeer): New function(overload).
  6615. (addPeer): Delete unused peers only when new peer is added.
  6616. * src/TorrentMan.h
  6617. (PeerListProcessor.h): Included.
  6618. (Peers): Removed.
  6619. (addPeer): New function(overload).
  6620. * src/TrackerUpdateCommand.cc
  6621. (netinet/in.h): Removed.
  6622. (DelegatingPeerListProcessor.h): Included.
  6623. (execute): Updated to use DelegatingPeerListProcessor.
  6624. To fix the memory leak in TorrentMan::peers:
  6625. * src/PeerAbstractCommand.cc
  6626. (onAbort): Added peer->resetStatus().
  6627. * src/Peer.h
  6628. (resetStatus): Made public.
  6629. To improve the precision of the speed calculation:
  6630. * src/SpeedCalc.h
  6631. (nextInterval): New variable.
  6632. * src/SpeedCalc.cc
  6633. (reset): Added nextInterval.
  6634. (isIntervalOver): Use nextInterval instead of CHANGE_INTERVAL_SEC.
  6635. (changeSw): Set nextInterval to 15 seconds relative to the current
  6636. instant time.
  6637. * src/main.cc
  6638. (showVersion): Updated.
  6639. (showUsage): Updated.
  6640. * Release 0.8.1
  6641. 2006-09-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6642. * src/main.cc
  6643. (showUsage): Commented out --min-segment-size option.
  6644. (main): Commented out --min-segment-size option.
  6645. * Release 0.8.0
  6646. 2006-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6647. * src/*.{h,cc}:
  6648. Added an exception to the license which allows linking with OpenSSL.
  6649. 2006-09-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6650. * src/AbstractCommand.cc
  6651. (execute): Check whether the download has finished before checking
  6652. socket status.
  6653. Return true if peerStat->getStatus() == REQUEST_IDLE.
  6654. Do not exit even if no segment is available.
  6655. * src/prefs.h
  6656. (PREF_STARTUP_IDLE_TIME): New definition.
  6657. * src/PeerInteractionCommand.cc
  6658. (executeInternal): Removed max speed limit. Because it performs bad.
  6659. (receiveMessages): Added max speed limit. This was better than above,
  6660. but still a little bit to be desired. Sometimes the download speed
  6661. became much faster than I specified.
  6662. * src/SpeedCalc.h
  6663. (start): New variable.
  6664. (accumulatedLength): New variable.
  6665. (getAvgSpeed): New function.
  6666. * src/SpeedCalc.cc
  6667. (reset): Added start, accumulatedLength.
  6668. (update): Added calculation of an average speed.
  6669. (getAvgSpeed): New function.
  6670. * src/DownloadCommand.h
  6671. (sw): Removed.
  6672. * src/main.cc
  6673. (main): Added PREF_STARTUP_IDLE_TIME.
  6674. * src/PeerStat.h
  6675. (STATUS): Added REQUEST_IDLE.
  6676. (getMaxSpeed): Renamed as getMaxDownloadSpeed().
  6677. (getAvgDownloadSpeed): New function
  6678. (requestIdle): New function.
  6679. * src/SegmentMan.h
  6680. (SegmentEntryHandle): New type definition.
  6681. (SegmentEntries): Now holds SegmentEntryHandle.
  6682. (findSlowerSegmentEntry): New funtion.
  6683. * src/SegmentMan.cc
  6684. (save): Updated according to the changes in SegmentEntries.
  6685. (read): Updated according to the changes in SegmentEntries.
  6686. (FindSegmentEntryByIndex): Updated according to the changes in
  6687. SegmentEntries.
  6688. (FindSegmentEntryByCuid): Updated according to the changes in
  6689. SegmentEntries.
  6690. (checkoutSegment): Updated according to the changes in SegmentEntries.
  6691. (onNullBitfield): Updated according to the changes in SegmentEntries.
  6692. Renamed uitr as itr.
  6693. (findSlowerSegmentEntry): New function.
  6694. (getSegment): Updated according to the changes in SegmentEntries.
  6695. Added the feature that cancels the segment with slow server and fast
  6696. one takes it over.
  6697. (cancelSegment): Updated according to the changes in SegmentEntries.
  6698. (getDownloadLength): Updated according to the changes in
  6699. SegmentEntries.
  6700. (init): Assigned 0 to bitfield after deleting it.
  6701. * src/DownloadCommand.cc
  6702. (STARTUP_IDLE_TIME): Removed.
  6703. (executeInternal): Use PREF_STARTUP_IDLE_TIME.
  6704. * src/PeerChokeCommand.cc
  6705. (optUnchokingPeer): Updated according to the changes in Peer.
  6706. (ResetDelta): Removed.
  6707. (UploadFaster): Updated according to the changes in Peer.
  6708. (DownloadFaster): Updated according to the changes in Peer.
  6709. (execute): I clarify the meaning of "upload" and "download" here.
  6710. "upload" means the transfer from localhost to remote host.
  6711. "download" means the transfer from remote host to localhost.
  6712. Based on this rule, I swapped orderByUploadRate and
  6713. orderByDownloadRate.
  6714. * src/PeerInteractionCommand.cc
  6715. (PeerInteraction): Removed peerInteraction->setUploadLImit().
  6716. (executeInternal): Removed the argument of
  6717. peerInteraction->sendMessages().
  6718. (receiveMessages): Rewritten download speed limit.
  6719. (sendKeepAlive): Removed peerInteraction->sendMessages().
  6720. * src/HttpResponseCommand.cc
  6721. (handleDefaultEncoding): If file size is unknown in torrent request,
  6722. do not call segmentMan->initBitfield() here.
  6723. Disabled persistent connection feature in torrent request.
  6724. * src/UrlRequestInfo.h
  6725. (UrlRequestInfo): Removed const qualifier from option.
  6726. * src/TorrentMan.h
  6727. (TransferStat): New class.
  6728. (deltaDownloadLength): Removed.
  6729. (deltaUploadLength): Removed.
  6730. (addDeltaDownloadLength): Removed.
  6731. (getDeltaDownloadLength): Removed.
  6732. (resetDeltaDownloadLength): Removed.
  6733. (addDeltaUploadLength): Removed.
  6734. (getDeltaUploadLength): Removed.
  6735. (resetDeltaUploadLength): Removed.
  6736. (addActivePeer): Added peer->activate().
  6737. (deleteActivePeer): Added peer->deactivate().
  6738. (calculateStat): New function.
  6739. * src/TorrentMan.cc
  6740. (TorrentMan): Removed deltaDownloadLength and deltaUploadLength.
  6741. (calculateStat): New function.
  6742. * src/PeerInteraction.h
  6743. (uploadLimit): Removed.
  6744. (option): New variable.
  6745. (setUploadLimit): Removed.
  6746. (getUploadSpeed): Removed.
  6747. (sendMessages): Removed the argument "currentUploadSpeed".
  6748. * src/PeerInteraction.cc
  6749. (prefs.h): Included.
  6750. (PeerInteraction): Removed uploadLimit. Added option.
  6751. (sendMessages): Rewritten upload speed limit.
  6752. (sendHandshake): Removed the argument from sendMessages().
  6753. (sendBitfield): Removed the argument from sendMessages().
  6754. * src/PeerAbstractCommand.cc
  6755. (execute): Commented out the portion of upload limit.
  6756. (onAbort): Removed peer->resetStatus().
  6757. * src/TorrentRequestInfo.cc
  6758. (timeoutSpecified): Declared extern.
  6759. (execute): Set timeout to 180 if timeout is not specified by.
  6760. command-line.
  6761. * src/PieceMessage.cc
  6762. (receivedAction): Added peer->updateDownloadLength().
  6763. Removed peer->addPeerUpload().
  6764. Removed torrentMan->addDeltaDownloadLength().
  6765. (send): Added peer->updateUploadLength().
  6766. Removed peer->addPeerDownload().
  6767. Removed torrentMan->addDeltaUploadLength().
  6768. * src/main.cc
  6769. (timeoutSpecified): New variable.
  6770. (main): Set timeoutSpecified to false.
  6771. If the command-line option "--upload-limit" is specified, then
  6772. timeoutSpecified is set to true. This option will remain in the next
  6773. release, but be deprecated in the future release.
  6774. * src/TorrentRequestInfo.h
  6775. (TorrentRequestInfo): Removed const qualifier from op.
  6776. * src/PeerStat.h
  6777. (uploadSpeed): New variable.
  6778. (PeerStat): Added default value to cuid.
  6779. (calculateUploadSpeed): New function.
  6780. (updateUploadLength): New function.
  6781. (getMaxUploadSpeed): New function.
  6782. (getAvgUploadSpeed): New function.
  6783. (reset): Added uploadSpeed. Set status to IDLE.
  6784. * src/TorrentDownloadEngine.h
  6785. (cp): Declared as Time.
  6786. (sessionDownloadLengthArray): Removed.
  6787. (sessionUploadLengthArray): Removed.
  6788. (currentCp): Removed.
  6789. (lastCalcStat): New variable
  6790. (lastElapsed): Removed.
  6791. (sessionDownloadLength): Removed.
  6792. (calculateStat): New function.
  6793. * src/TorrentDownloadEngine.cc
  6794. (initStatistics): Removed lastElapsed, cp[],
  6795. sessionDownloadLengthArray[], sessionUploadLengthArray[],
  6796. currentCp, sessionDownloadLength.
  6797. Added cp.reset() and lastCalcStat.reset().
  6798. (calculateSpeed): Changed the name of the argument.
  6799. (calculateStatistics): Rewritten.
  6800. (calculateStat): New function.
  6801. * src/Peer.h
  6802. (PeerStat.h): Included.
  6803. (peerUpload): Removed.
  6804. (peerDownload): Removed.
  6805. (peerStat): New variable.
  6806. (sessionUploadLength): New variable.
  6807. (sessionDownloadLength): New variable.
  6808. (deltaUpload): Removed.
  6809. (deltaDownload): Removed.
  6810. (resetStatus): Made private.
  6811. (Peer): Added sessionUploadLength, sessionDownloadLength.
  6812. Removed peerUpload, peerDownload.
  6813. (updateUploadLength): New function.
  6814. (addDeltaUpload): Removed.
  6815. (updateDownloadLength): New function.
  6816. (resetDeltaUpload): Removed.
  6817. (getDeltaUpload): Removed.
  6818. (addDeltaDownload): Removed.
  6819. (calculateUploadSpeed): New function.
  6820. (resetDeltaDownload): Removed.
  6821. (getDeltaDownload): Removed.
  6822. (calculateDownloadSpeed): New function.
  6823. (getSessionUploadLength): New function.
  6824. (getSessionDownloadLength): New function.
  6825. (activate): New function.
  6826. (deactivate): New function.
  6827. (addPeerUpload): Removed.
  6828. (setPeerUpload): Removed.
  6829. (getPeerUpload): Removed.
  6830. (addPeerDownload): Removed.
  6831. (setPeerDownload): Removed.
  6832. (getPeerDownload): Removed.
  6833. * src/Peer.cc
  6834. (resetStatus): Removed resetDeltaUpload() and resetDeltaDownload().
  6835. * src/MetalinkRequestInfo.h
  6836. (MetalinkRequestInfo): Removed const qualifier from op.
  6837. * src/RequestInfo.h
  6838. (op): Removed const qualifier.
  6839. (RequestInfo): Removed const qualifier from op.
  6840. * src/prefs.h
  6841. (PREF_MAX_SPEED_LIMIT): Renamed as PREF_MAX_DOWNLOAD_LIMIT.
  6842. (PREF_UPLOAD_LIMIT): Renamed as PREF_MAX_UPLOAD_LIMIT.
  6843. * src/PeerInteractionCommand.cc
  6844. (PeerInteractionCommand): Use PREF_MAX_UPLOAD_LIMIT.
  6845. (receiveMessages): Use PREF_MAX_DOWNLOAD_LIMIT.
  6846. * src/PeerInteraction.cc
  6847. (sendMessages): Use PREF_MAX_UPLOAD_LIMIT.
  6848. * src/main.cc
  6849. (showUsage): Updated the description of "--lowest-speed-limit" option.
  6850. Added the description of "--max-download-limit" option.
  6851. Removed the description of "--upload-limit" option.
  6852. Added the description of "--max-upload-limit" option.
  6853. (main): Use PREF_MAX_UPLOAD_LIMIT, PREF_MAX_DOWNLOAD_LIMIT.
  6854. Added "--max-download-limit" option and "--max-upload-limit" option.
  6855. Added the warning message if "--upload-limit" option is used.
  6856. * src/DownloadCommand.cc
  6857. (executeInternal): Use PREF_MAX_DOWNLOAD_LIMIT.
  6858. 2006-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6859. To rewrite segment download mechanism for HTTP/FTP download.
  6860. Use BitfieldMan to manage segment download.
  6861. * src/HttpResponseCommand.h
  6862. (executeInternal): Pass the reference of segment.
  6863. * src/AbstractCommand.cc
  6864. (prepareForRetry): Call segmentMan->cancelSegment here.
  6865. (onAbort): Call segmentMan->cancelSegment here.
  6866. * src/HttpDownloadCommand.cc
  6867. (prepareForNextSegment): New function.
  6868. * src/DownloadEngineFactory.cc
  6869. (newConsoleEngine): Removed splitter.
  6870. (newTorrentConsoleEngine): Removed splitter.
  6871. * src/Request.h
  6872. (segment): Renamed from seg.
  6873. * src/FtpInitiateConnectionCommand.h
  6874. (executeInternal): Pass the reference of segment.
  6875. * src/AbstractCommand.h
  6876. (executeInternal): Pass the reference of segment.
  6877. * src/pref.h
  6878. (PREF_SEGMENT_SIZE): New definition.
  6879. * src/HttpProxyRequestCommand.h
  6880. (executeInternal): Pass the reference of segment.
  6881. * src/HttpResponseCommand.cc
  6882. (checkResponse): Allowed status 206 when a request range starts 0.
  6883. (handleDefaultEncoding): Rewritten the code related to Segment.
  6884. (handleOtherEncoding): Rewritten the code related to Segment.
  6885. * src/SegmentMan.h
  6886. (SegmentEntry): New class.
  6887. (SegmentEntries): New type definition.
  6888. (bitfield): New variable.
  6889. (usedSegmentEntries): New variable.
  6890. (onNullBitfield): New function.
  6891. (checkoutSegment): New function.
  6892. (segments): Removed.
  6893. (splitter): Removed.
  6894. (unregisterId): Removed.
  6895. (getSegment): New function(overload)
  6896. (getDownloadedSize): Removed.
  6897. (cancelSegment): New function.
  6898. (completeSegment): New function.
  6899. (initBitfield): New function.
  6900. (hasSegment): New function.
  6901. (getDownloadLength): New function.
  6902. * src/BitfieldMan.h
  6903. (getStartIndex): New function.
  6904. (getEndIndex): New function.
  6905. (getMissingUnusedIndex): New function(overload).
  6906. (getSparseMissingUnusedIndex): New function.
  6907. * src/BitfieldMan.cc
  6908. (getMissingIndexRandomly): Handle the last byte of bitfield properly.
  6909. (getMissingUnusedIndex): New function(overload).
  6910. (Range): New class.
  6911. (getStartIndex): New function.
  6912. (getEndIndex): New function.
  6913. (getSparseMissingUnusedIndex): New function.
  6914. (isBitSetInternal): Return false if the given index is less than 0.
  6915. * src/HttpInitiateConnectionCommand.h
  6916. (executeInternal): Pass the reference of segment.
  6917. * src/FtpNegotiateCommand.h
  6918. (executeInternal): Pass the reference of segment.
  6919. * src/FtpNegotiateCommand.cc
  6920. (recvSize): Initialize bitfield here.
  6921. * src/FtpTunnelResponseCommand.h
  6922. (executeInternal): Pass the reference of segment.
  6923. * src/HttpConnection.cc
  6924. (createRequest): Rewritten range header processing.
  6925. * src/DownloadCommand.h
  6926. (executeInternal): Pass the reference of segment.
  6927. (prepareForRetry): Removed.
  6928. (prepareForNextSegment): Added an argument segment. Made it a virtual
  6929. function.
  6930. * src/main.cc
  6931. (main): Set the initial value of PREF_SEGMENT_SIZE to 1MB.
  6932. * src/SegmentMan.cc
  6933. (SegmentMan): Added bitfield. Removed splitter.
  6934. (~SegmentMan): Added bitfield. Removed splitter.
  6935. (unregisterId): Removed.
  6936. (getSegment): Rewritten.
  6937. (updateSegment): Rewritten.
  6938. (save): Rewritten.
  6939. (read): Rewritten.
  6940. (finished): Rewritten.
  6941. (getDownloadedSize): Removed.
  6942. (initBitfield): New function.
  6943. (FindSegmentEntryByIndex): New function object.
  6944. (FindSegmentEntryByCuid): New function object.
  6945. (checkoutSegment): New function.
  6946. (onNullBitfield): New function.
  6947. (getSegment): New function(overload).
  6948. (CancelSegment): New function object.
  6949. (cancelSegment): New function.
  6950. (completeSegment): New function.
  6951. (hasSegment): New function.
  6952. (getDownloadLength): New function.
  6953. * src/FtpInitiateConnectionCommand.cc
  6954. (executeInternal): Load .aria2 file after hostname resolution finishes.
  6955. * src/Segment.h: Rewritten.
  6956. * src/Segment.cc (operator<<): New function.
  6957. * src/HttpDownloadCommand.h
  6958. (prepareForNextSegment): New function.
  6959. * src/Request.cc
  6960. (resetUrl): Made segment null.
  6961. * src/DownloadEngine.cc
  6962. (~DownloadEngine): Call cleanQueue before deleting segmentMan.
  6963. * src/HttpProxyRequestCommand.h
  6964. (executeInternal): Pass the reference of segment.
  6965. * src/DownloadCommand.cc
  6966. (executeInternal): Rewritten the code related to Segment.
  6967. (prepareForRetry): Removed.
  6968. (prepareForNextSegment): Rewritten.
  6969. * src/FtpTunnelResponseCommand.h
  6970. (executeInternal): Pass the reference of segment.
  6971. To add HTTP 1.1 persistent connection support(experimental)
  6972. * src/HttpRequestCommand.cc
  6973. (executeInternal): Disable keep alive if it is disabled by
  6974. configuration.
  6975. * src/Request.h
  6976. (keepAlive): New variable.
  6977. (isKeepAlive): New function.
  6978. (setKeepAlive): New function.
  6979. * src/pref.h
  6980. (PREF_HTTP_KEEP_ALIVE): New definition.
  6981. * src/HttpResponseCommand.cc
  6982. (executeInternal): Check the remote server supports keep alive.
  6983. * src/HttpConnection.cc
  6984. (createRequest): Send "Connection: close" only if keep alive is
  6985. disabled.
  6986. * src/main.cc
  6987. (main):
  6988. Set the initial value(false) of PREF_KEEP_ALIVE to false.
  6989. To add max download speed limit:
  6990. * src/pref.h
  6991. (PREF_MAX_SPEED_LIMIT): New definition.
  6992. * src/PeerInteractionCommand.cc
  6993. (executeInternal): Added max download speed limit. Not tested yet.
  6994. * src/SegmentMan.h
  6995. (PeerStats): New type definition.
  6996. (peerStats): New variable.
  6997. (registerPeerStat): New function.
  6998. (FindPeerStat): New function object.
  6999. (getPeerStat): New function.
  7000. (calculateDownloadSpeed): New function.
  7001. * src/SpeedCalc.h: New class.
  7002. * src/SpeedCalc.cc: New class.
  7003. * src/main.cc
  7004. (main):
  7005. Set the initial value of PREF_MAX_SPEED_LIMIT to 0(which means the
  7006. download speed is not restricted).
  7007. * src/PeerStat.h: New class.
  7008. * src/SegmentMan.cc
  7009. (registerPeerStat): New function.
  7010. (calculateDownloadSpeed): New function.
  7011. * src/DownloadCommand.cc
  7012. (STARTUP_IDLE_TIME): New definition.
  7013. (DownloadCommand): Register peerStat to segmentMan. Call peerStat->
  7014. downloadStart.
  7015. (~DownloadCommand): Call peerStat->downloadStop.
  7016. (executeInternal): Added download speed limitter. Rewritten lowest
  7017. speed limitter.
  7018. * src/HttpConnection.cc
  7019. (receiveResponse): Fixed: eohIndex[headerBuf] -> headerBuf[eohIndex].
  7020. * src/AbstractCommand.cc
  7021. (resolveHostname): Throw DlAbortEx if a name resolution failes.
  7022. Added hostname to the error message.
  7023. * src/ConsoleDownloadEngine.cc
  7024. (calculateStatistics): Initialize psize with dlSize.
  7025. * src/PieceMessage.cc
  7026. (receivedAction): Do not call peerInteraction->abortPiece here.
  7027. (onGotWrongPiece): Call peerInteraction->abortPiece here.
  7028. * src/BitfieldMan.h
  7029. (clearAllUseBit): New function.
  7030. (setAllUseBit): New function.
  7031. * src/BitfieldMan.cc
  7032. (clearAllBit): Do not clear useBitfield here.
  7033. (clearAllUseBit): New function.
  7034. (setAllUseBit): New function.
  7035. * src/Piece.cc
  7036. (clearAllBlock): Call bitfield->clearAllUseBit().
  7037. 2006-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7038. To make filename URL-decoded:
  7039. * src/HttpResponseCommand.h: Updated doc.
  7040. * src/HttpResponseCommand.cc
  7041. (determinFilename): Made filename URL-decoded.
  7042. * src/FtpInitiateConnectionCommand.cc
  7043. (executeInternal): Made filename URL-decoded.
  7044. * src/Util.h (urldecode): New function.
  7045. * src/Util.cc (urldecode): New function.
  7046. To fix a bug that caused assertion failure in ares_strerror:
  7047. * src/NameResolver.cc (callback): Fixed the bug.
  7048. * Release 0.7.3
  7049. 2006-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7050. To add --seed-time and --seed-ratio command-line option:
  7051. * src/Option.h (getAsDouble): New function.
  7052. * src/Option.cc (getAsDouble): New function.
  7053. * src/SeedCheckCommand.h: New class.
  7054. * src/SeedCheckCommand.cc: New class.
  7055. * src/DownloadEngineFactory.cc
  7056. (SeedCheckCommand.h): Included.
  7057. (UnionSeedCriteria.h): Included.
  7058. (TimeSeedCriteria.h): Included.
  7059. (ShareRatioSeedCriteria.h): Included.
  7060. (newTorrentConsoleEngine): Added the processing of seed option.
  7061. * src/SeedCriteria.h: New class.
  7062. * src/ShareRatioSeedCriteria.h: New class.
  7063. * src/TimeSeedCriteria.h: New class.
  7064. * src/UnionSeedCriteria.h: New class.
  7065. * src/prefs.h
  7066. (PREF_SEED_TIME): New definition.
  7067. (PREF_SEED_RATIO): New definition.
  7068. * src/main.cc
  7069. (showUsage): Added --seed-time and --seed-ratio option.
  7070. (main): Added --seed-time and --seed-ratio option.
  7071. Made default log file name "/dev/null".
  7072. * src/SharedHandle.h
  7073. (SharedHandle): Copy constructor. Made it assignable from the
  7074. SharedHandle of the subclasses.
  7075. (operator=): Made it assignable from the SharedHandle of the
  7076. subclasses.
  7077. (getRefCount): New function.
  7078. To add notice log level and the switch to write log to stdout. This
  7079. switch is configurable per log level.
  7080. * src/Logger.h
  7081. (notice): New function.
  7082. (LEVEL): Added NOTICE. Assigned an explicit value to each log level
  7083. constant.
  7084. * src/LogFactory.cc
  7085. (getInstance): The use of NullLogger was removed. A log message with
  7086. notice log level was made written to stdout along with log file.
  7087. * src/NullLogger.h
  7088. (notice): New function.
  7089. * src/SimpleLogger.h
  7090. (writeHeader): Added the 'file' argument.
  7091. (writeLog): Added the 'file' argument.
  7092. (writeFile): New function.
  7093. (stdoutField): New variable.
  7094. (SimpleLogger): Removed the default constructor.
  7095. (SimpleLogger): Made the default value of logfile 0.
  7096. (debug): Added 'virtual' keyword.
  7097. (info): Added 'virtual' keyword.
  7098. (warn): Added 'virtual' keyword.
  7099. (error): Added 'virtual' keyword.
  7100. (notice): New function.
  7101. (setStdout): New function.
  7102. * src/SimpleLogger.cc
  7103. (WRITE_LOG): Replaced writeLog with writeFile.
  7104. (WRITE_LOG_EX): Replaced writeLog with writeFile.
  7105. (SimpleLogger): Removed the default constructor.
  7106. (setStdout): New function.
  7107. (writeLog): Added the handling of NOTICE log level.
  7108. (writeFile): New function.
  7109. (notice): New function.
  7110. * src/TorrentMan.h: Updated doc.
  7111. * src/BitfieldMan.h: Updated doc.
  7112. * src/TrackerWatcherCommand.cc
  7113. (execute): Return true if error occurred in the request to the tracker
  7114. and halt is requested.
  7115. * src/TrackerUpdateCommand.cc
  7116. (execute): Return true if error occurred in the request to the tracker
  7117. and halt is requested.
  7118. To call onDownloadComplete from TorrentMan::completePiece(), not from
  7119. DownloadEngine:
  7120. * src/TorrentConsoleDownloadEngine.h
  7121. (onSelectiveDownloadingCompletes): Removed.
  7122. * src/TorrentConsoleDownloadEngine.cc
  7123. (onSelectiveDownloadingCompletes): Removed.
  7124. * src/TorrentDownloadEngine.h
  7125. (onEndOfRun): Added 'virtual' keyword.
  7126. (afterEachIteration): Removed.
  7127. (onSelectiveDownloadingCompletes): Removed.
  7128. * src/TorrentDownloadEngine.cc
  7129. (onEndOfRun): Removed filenameFixed.
  7130. (afterEachIteration): Removed.
  7131. * src/TorrentMan.cc
  7132. (completePiece): Call onDownloadComplete here.
  7133. (onDownloadComplete): Added 2 log messages.
  7134. 2006-08-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7135. To fix compilation problem on gcc4.1.1(patch#1542283 by tizianomueller)
  7136. * src/NameResolver.h: Added the prototype declaration of callback().
  7137. To support c-ares library:
  7138. * src/AbstractCommand.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  7139. * src/FeatureConfig.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  7140. * src/FtpInitiateConnectionCommand.h:
  7141. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  7142. * src/AbstractCommand.h: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  7143. * src/HttpInitiateConnectionCommand.h:
  7144. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  7145. * src/NameResolver.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS.
  7146. Added thes upport of c-ares's ares_strerror(the idea came from patch
  7147. #1542285 by tizianomueller)
  7148. * src/HttpInitiateConnectionCommand.cc:
  7149. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  7150. * src/FtpInitiateConnectionCommand.cc:
  7151. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  7152. * src/DownloadEngine.h:
  7153. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  7154. * src/DownloadEngine.cc:
  7155. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  7156. To fix the bug that causes compilation failure with metalink-support
  7157. disabled(bug#1543587):
  7158. * src/main.cc: Fixed with the patch by tizianomueller.
  7159. * Release 0.7.2
  7160. 2006-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7161. * src/main.cc
  7162. (main): Added a message to inform users that aria2 is starting to
  7163. verify checksum.
  7164. * src/RequestInfo.cc
  7165. (printDownloadAbortMessage): Added a message to inform users that
  7166. transfer can be resumed.
  7167. * src/FeatureConfig.cc
  7168. (FEATURE_ASYNC_DNS): New definition.
  7169. (FeatureConfig): Added aysnc DNS entry.
  7170. To replace CommandUuid with Command* in SocketEntry and
  7171. NameResolverEntry:
  7172. * src/DownloadEngine.h
  7173. (CommandUuids): Removed.
  7174. (SocketEntry::commandUuid): Removed.
  7175. (SocketEntry::command): New variable.
  7176. (SocketEntry::SocketEntry): Updated.
  7177. (SocketEntry::operator==): Updated.
  7178. (NameResolverEntry::commandUuid): Removed.
  7179. (NameResolverEntry::command): New variable.
  7180. (NameResolverEntry::NameResolverEntry): Updated.
  7181. (NameResolverEntry::operator==): Updated.
  7182. (waitData): Changed the argument type.
  7183. (addSocketForReadCheck): Changed the argument type.
  7184. (deleteSocketForReadCheck): Changed the argument type.
  7185. (addSocketForWriteCheck): Changed the argument type.
  7186. (deleteSocketForWriteCheck): Changed the argument type.
  7187. (addNameResolverCheck): Changed the argument type.
  7188. (deleteNameResolverCheck): Changed the argument type.
  7189. * src/DownloadEngine.cc
  7190. (FindCommand): Removed.
  7191. (run): Removed activeUuid. Added activeCommands instead.
  7192. (AccumulateActiveUuid): Renamed as AccumulateActiveCommand.
  7193. (AccumulateActiveCommand): New function object.
  7194. (waitData): Use AccumulateActiveCommand.
  7195. (addSocketForReadCheck): Use Command instead of CommandUuid.
  7196. (deleteSocketForReadCheck): Use Command instead of CommandUuid.
  7197. (addSocketForWriteCheck): Use Command instead of CommandUuid.
  7198. (deleteSocketForWriteCheck): Use Command instead of CommandUuid.
  7199. (addNameResolverCheck): Use Command instead of CommandUuid.
  7200. (deleteNameResolverCheck): Use Command instead of CommandUuid.
  7201. * src/AbstractCommand.cc
  7202. (disableReadCheckSocket): Updated according to the changes in
  7203. DownloadEngine.
  7204. (setReadCheckSocket): Updated according to the changes in
  7205. DownloadEngine.
  7206. (disableWriteCheckSocket): Updated according to the changes in
  7207. DownloadEngine.
  7208. (setWriteCheckSocket): Updated according to the changes in
  7209. DownloadEngine.
  7210. (setNameResolverCheck): Updated according to the changes in
  7211. DownloadEngine.
  7212. (disableNameResolverCheck): Updated according to the changes in
  7213. DownloadEngine.
  7214. * src/AbstractCommand.cc
  7215. (disableReadCheckSocket): Updated according to the changes in
  7216. DownloadEngine.
  7217. (setReadCheckSocket): Updated according to the changes in
  7218. DownloadEngine.
  7219. (disableWriteCheckSocket): Updated according to the changes in
  7220. DownloadEngine.
  7221. (setWriteCheckSocket): Updated according to the changes in
  7222. DownloadEngine.
  7223. * release 0.7.1
  7224. 2006-08-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7225. To handle the case where some BitTorrent tracker requires all letters
  7226. except for [A-Za-z0-9] is URL encoded.
  7227. * src/Util.h
  7228. (torrentUrlencode): New function.
  7229. * src/Util.cc
  7230. (ctype.h): Included.
  7231. (torrentUrlencode): New function.
  7232. * src/TrackerWatcherCommand.cc
  7233. (execute): Use Util::torrentUrlencode() instead of Util::urlencode().
  7234. 2006-08-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7235. To add asynchronous DNS support(libares):
  7236. * src/AbstractCommand.h
  7237. (setNameResolverCheck): New function.
  7238. (disableNameResolverCheck): New function
  7239. (resolveHostname): New function.
  7240. * src/AbstractCommand.cc
  7241. (setNameResolverCheck): New function.
  7242. (disableNameResolverCheck): New function
  7243. (resolveHostname): New function.
  7244. * src/FtpInitiateConnectionCommand.h
  7245. (nameResolver): New function.
  7246. * src/FtpInitiateConnectionCommand.cc
  7247. (Util.h): Included.
  7248. (FtpInitiateConnectionCommand): Call disableReadCheckSocket,
  7249. disableWriteCheckSocket.
  7250. (~FtpInitiateConnectionCommand): Call disableNameResolverCheck.
  7251. (executeInternal): Added async DNS support.
  7252. * src/HttpInitiateConnectionCommand.h
  7253. (nameResolver): New function.
  7254. * src/HttpInitiateConnectionCommand.cc
  7255. (DlRetryEx.h): Included.
  7256. (HttpInitiateConnectionCommand): Call disableReadCheckSocket,
  7257. disableWriteCheckSocket.
  7258. (~HttpInitiateConnectionCommand): Call disableNameResolverCheck.
  7259. (executeInternal): Added async DNS support.
  7260. * src/NameResolver.h: New class. Note: #include <ares.h> is surrounded
  7261. by extern "C" declaration.
  7262. * src/NameResolver.cc: New class.
  7263. * src/Util.h:
  7264. (isNumberAndDotsNotation): New function
  7265. * src/Util.cc
  7266. (isNumberAndDotsNotation): New function.
  7267. * src/DownloadEngine.h
  7268. (NameResolver.h): Included.
  7269. (NameResolverEntry): New class.
  7270. (NameResolverEntries): New type definition.
  7271. (addNameResolverCheck): New function.
  7272. (deleteNameResolverCheck): New function.
  7273. * src/DownloadEngine.cc
  7274. (run): Initialize cp with 0.
  7275. (SetDescriptor::operator()): Added for NameResolverEntry.
  7276. (AccumulateActiveUuid::operator()): Added for NameResolverEntry.
  7277. (waitData): Check nameResolver entries.
  7278. (updateFdSet): Update fds in nameResolver entries.
  7279. (addNameResolverCheck): New function.
  7280. (deleteNameResolverCheck): new function.
  7281. * src/PeerInteractionCommand.cc
  7282. (executeInternal): Fixed wrong socket handling.
  7283. * src/main.cc
  7284. (main): Fixed the initial value of PREF_LOWEST_SPEED_LIMIT option to 0.
  7285. * src/Util.cc
  7286. (fileChecksum): Removed the call to ctx.digestReset().
  7287. 2006-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7288. * po/ru.po: Azamat sent me Russian translation.
  7289. * src/FtpNegotiateCommand.cc
  7290. (recvGreeting): Call disableWriteCheckSocket just after
  7291. socket->setBlockingMode(). This avoids unnecessary CPU-hog loop.
  7292. (recvRetr): Recognized status code 125 as a acceptable response code.
  7293. Rename Time.h to TimeA2.h to avoid compilation ploblem on
  7294. case-insesitive filesystem(BUG#1531057).
  7295. * src/Time.h: Renamed as TimeA2.h.
  7296. * src/Time.cc: Renamed as TimeA2.cc.
  7297. * src/TimeA2.h: New class.
  7298. * src/TimeA2.cc: New class.
  7299. * src/PeerChokeCommand.h: Replaced Time.h with TimeA2.h.
  7300. * src/TrackerWatcherCommand.h: Replaced Time.h with TimeA2.h.
  7301. * src/PeerAbstractCommand.h: Replaced Time.h with TimeA2.h.
  7302. * src/AbstractCommand.h: Replaced Time.h with TimeA2.h.
  7303. * src/PeerInteractionCommand.h: Replaced Time.h with TimeA2.h.
  7304. * src/ConsoleDownloadEngine.h: Replaced Time.h with TimeA2.h.
  7305. * src/TorrentAutoSaveCommand.h: Replaced Time.h with TimeA2.h.
  7306. * src/DownloadCommand.h: Replaced Time.h with TimeA2.h.
  7307. * src/TorrentMan.h: Replaced Time.h with TimeA2.h.
  7308. * src/TorrentDownloadEngine.h: Replaced Time.h with TimeA2.h.
  7309. * src/RequestSlot.h: Replaced Time.h with TimeA2.h.
  7310. * src/SleepCommand.h: Replaced Time.h with TimeA2.h.
  7311. * src/DownloadEngine.cc: Replaced Time.h with TimeA2.h.
  7312. * release 0.7.0
  7313. 2006-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7314. * src/PeerChokeCommand.h
  7315. (PeerChokeCommand): Rearranged the arguments.
  7316. * src/PeerChokeCommand.cc
  7317. (PeerChokeCommand): Rearranged the arguments.
  7318. * src/MetalinkEntry.h
  7319. (Checksum.h): Included.
  7320. (md5): Removed.
  7321. (sha1): Removed.
  7322. (checksum): New variable.
  7323. (operator=): Updated.
  7324. (check): Removed.
  7325. * src/prefs.h
  7326. (PREF_LOWEST_SPEED_LIMIT): New definition.
  7327. (PREF_FOLLOW_TORRENT): New definition.
  7328. (PREF_SELECT_FILE): New definition.
  7329. (PREF_FOLLOW_METALINK): New definition.
  7330. * src/MetalinkResource.h
  7331. (TYPE_HTTPS): Added to enum TYPE.
  7332. * src/TorrentMan.cc
  7333. (~TorrentMan): Rewritten.
  7334. * src/MultiDiskWriter.cc
  7335. (MultiDiskAdaptor): Updated according to the changes in
  7336. MessageDigestContext.
  7337. (~MultiDiskAdaptor): Updated according to the changes in
  7338. MessageDigestContext.
  7339. (hashUpdate): Updated according to the changes in MessageDigestContext.
  7340. (sha1Sum): Updated according to the changes in MessageDigestContext.
  7341. * src/Util.h
  7342. (fileChecksum): Updated according to the changes in
  7343. MessageDigestContext.
  7344. * src/Util.cc
  7345. (sha1Sum): Updated according to the changes in MessageDigestContext.
  7346. (fileChecksum): Updated according to the changes in
  7347. MessageDigestContext.
  7348. * src/messageDigest.h: Rewritten.
  7349. * src/MetalinkEntry.cc
  7350. (check): Removed.
  7351. (Supported): Updated.
  7352. (dropUnsupportedResource): Fixed a memory leak.
  7353. * src/ShaVisitor.cc
  7354. (ShaVisitor): Updated according to the changes in MessageDigestContext.
  7355. (~ShaVisitor): Updated according to the changes in
  7356. MessageDigestContext.
  7357. (visit): Updated according to the changes in MessageDigestContext.
  7358. * src/main.cc
  7359. (main): Rewritten the portion of download loop. --lowest-speed-limit
  7360. command-line option added.
  7361. * src/DownloadEngine.h
  7362. (SocketEntry): New class.
  7363. (SocketEntries): New definition.
  7364. (PairFind): Removed.
  7365. (SockCmdMap): Removed.
  7366. * src/DownloadEngine.cc
  7367. (DownloadEngine): Rewritten.
  7368. (~DownloadEngine): Rewritten.
  7369. (run): Renamed activeCommandUuids as activeUuids.
  7370. (SetDescriptor): Rewritten.
  7371. (AccumulateActiveCommandUuid): Removed.
  7372. (AccumulateActiveUuid): New function object.
  7373. (waitData): Rewritten.
  7374. (updateFdSet): Rewritten.
  7375. (addSocket): Rewritten.
  7376. (deleteSocket): Rewritten.
  7377. (addSocketForReadCheck): Rewritten.
  7378. (deleteSocketForReadCheck): Rewritten.
  7379. (addSocketForWriteCheck): Rewritten.
  7380. (deleteSocketForWriteCheck): Rewritten.
  7381. * src/Xml2MetalinkProcessor.cc
  7382. (getEntry): Rewritten the portion of MetalinkEntry creation.
  7383. * src/DownloadCommand.cc
  7384. (executeInternal): Added the check routine for lowest speed limit.
  7385. * src/AbstractDiskWriter.cc
  7386. (AbstractDiskWriter): Updated according to the changes in
  7387. MessageDigestContext.
  7388. (~AbstractDiskWriter): Updated according to the changes in
  7389. MessageDigestContext.
  7390. (sha1Sum): Updated according to the changes in MessageDigestContext.
  7391. * src/RequestInfo.h: New class.
  7392. * src/UrlRequestInfo.h: New class.
  7393. * src/UrlRequestInfo.cc: New class.
  7394. * src/TorrentRequestInfo.h: New class.
  7395. * src/TorrentRequestInfo.cc: New class.
  7396. * src/MetalinkRequestInfo.h: New class.
  7397. * src/MetalinkRequestInfo.cc: New class.
  7398. * src/Checksum.h: New class.
  7399. * src/DownloadEngineFactory.h: New class.
  7400. * src/DownloadEngineFactory.cc: New class.
  7401. 2006-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7402. * src/Option.h
  7403. (getAsBool): New function.
  7404. * src/Option.cc
  7405. (prefs.h): Included.
  7406. (defined): 0-length value is now recognized as undefined.
  7407. (getAsInt): Rewritten.
  7408. (getAsLLInt): Rewritten.
  7409. (getAsBool): New function.
  7410. * src/FeatureConfig.h: Rewritten.
  7411. * src/FeatureConfig.cc: Rewritten.
  7412. * src/prefs.h
  7413. (PREF_STDOUT_LOG): New definition.
  7414. (PREF_LOG): New definition.
  7415. (PREF_DIR): New definition.
  7416. (PREF_OUT): New definition.
  7417. (PREF_SPLIT): New definition.
  7418. (PREF_DAEMON): New definition.
  7419. (PREF_REFERER): New definition.
  7420. (PREF_TORRENT_FILE): New definition.
  7421. (PREF_LISTEN_PORT): New definition.
  7422. (PREF_METALINK_FILE): New definition.
  7423. (PREF_METALINK_VERSION): New definition.
  7424. (PREF_METALINK_LANGUAGE): New definition.
  7425. (PREF_METALINK_OS): New definition.
  7426. (PREF_METALINK_SERVERS): New definition.
  7427. * src/main.cc
  7428. (main): Following command-line parameters are now put into Option
  7429. class: stdoutLog, logfile, dir, ufilename, split, daemonMode,
  7430. referer, torrentFile, metalinkFile, listenPort, metalinkVersion,
  7431. metalinkLanguage, metalinkOs, metalinkServers
  7432. To fix the bug that aria2 can not handle http response header properly.
  7433. * src/HttpHeader.cc
  7434. (put): Made name lowercased.
  7435. (defined): Made name lowercased.
  7436. (getFirst): Made name lowercased.
  7437. (get): Made name lowercased.
  7438. (getFirstAsInt): Rewritten.
  7439. (getFirstAsLLInt): Rewritten.
  7440. 2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7441. * src/TorrentMan.h:
  7442. (advertisePiece): Updated doc.
  7443. (getAdvertisedPieceIndexes): Updated doc.
  7444. (removeAdvertisedPiece); New function.
  7445. * src/TorrentMan.cc
  7446. (FindElapsedHave): New function object.
  7447. (removeAdvertisedPiece): New function.
  7448. * src/HaveEraseCommand.h: New class.
  7449. * src/HaveEraseCommand.cc: New class.
  7450. * src/FeatureConfig.h: New class.
  7451. * src/FeatureConfig.cc: New class.
  7452. * src/Request.h
  7453. (defaultPorts): Removed.
  7454. * src/Request.cc
  7455. (FeatureConfig.h): Included.
  7456. (Request): Removed the statements related to defaultPorts.
  7457. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead.
  7458. A default port number is now retrieved from FeatureConfig.
  7459. * src/main.cc
  7460. (HaveEraseCommand.h): Included.
  7461. (showVersion): Added the output of feature list.
  7462. (main): Added HaveEraseCommand to command queue in BitTorrent
  7463. downloading.
  7464. * src/PeerInteractionCommand.h
  7465. (chokeCheckPoint): Commented out.
  7466. (periodicExecPoint): New variable.
  7467. * src/PeerInteractionCommand.cc
  7468. (executeInternal): Following methods are now called in at least every
  7469. 0.5 seconds to reduce CPU usage:
  7470. detectMessageFlooding(), peerInteraction->checkRequestSlot(),
  7471. checkHave(), sendKeepAlive().
  7472. (checkLongTimePeerChoking): Commented out.
  7473. * src/BitfieldMan.h
  7474. (getNthBitIndex): Changed the method signature.
  7475. (getMissingIndexRandomly): Changed the method signature.
  7476. * src/BitfieldMan.cc
  7477. (getNthBitIndex): Rewritten
  7478. (getMissingIndexRandomly): Rewritten.
  7479. (hasMissingPiece): Rewritten.
  7480. (getMissingIndex): Refactored.
  7481. (getMissingUnusedIndex); Refactored.
  7482. (getMissingIndex): Refactored.
  7483. 2006-07-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7484. * src/PeerMessage.h
  7485. (Piece.h): Included.
  7486. (SharedHandle.h): Included.
  7487. (invalidate): New variable.
  7488. (uploading): New variable.
  7489. (isInvalidate): New function.
  7490. (isUploading): New function.
  7491. (onPush): New function.
  7492. (onChoked): New function.
  7493. (onCanceled): New function.
  7494. (onAbortPiece): New function.
  7495. (PeerMessageHandle): New type definition.
  7496. * src/PeerMessage.cc
  7497. (PeerMessage): Added the initialization for invalidate and uploading.
  7498. * src/CancelMessage.h
  7499. (CancelMessage): Rewritten.
  7500. * src/RejectMessage.h
  7501. (RejectMessage): Rewritten.
  7502. * src/Metalinker.h
  7503. (operator=): Defined.
  7504. * src/MetaEntry.h
  7505. (operator=): Defined.
  7506. * src/MetalinkResource.h
  7507. (operator=): Defined.
  7508. * src/AllowedFastMessage.h
  7509. (AllowedFastMessage): Rewritten.
  7510. * src/HandshakeMessage.h
  7511. (HandshakeMessage): New function(overload).
  7512. * src/HandshakeMessage.cc
  7513. (HandshakeMessage): Rewritten.
  7514. (init): New function.
  7515. * src/HaveMessage.h
  7516. (HaveMessage): Rewritten.
  7517. * src/Time.h
  7518. (operator=): Defined the function body here.
  7519. * src/Time.cc
  7520. (operator=): Removed.
  7521. * src/SocketCore.h
  7522. (operator==): Defined here.
  7523. (operator!=): Defined here.
  7524. (operator<): Defined here.
  7525. * src/SocketCore.cc
  7526. (operator==): Removed.
  7527. (operator<): Removed.
  7528. * src/BitfieldMan.h
  7529. (operator=): Defined the function body here.
  7530. * src/BitfieldMan.cc
  7531. (operator=): Removed.
  7532. * src/TorrentMan.h
  7533. (deleteErrorPeer): Removed.
  7534. (deleteUnusedPeer); New function.
  7535. * src/TorrentMan.cc
  7536. (addPeer): Call deleteUnusedPeer.
  7537. (deleteErrorPeer): Removed.
  7538. (deleteUnusedPeer): New function.
  7539. * src/PeerAbstractCommand.h
  7540. (setNoCheck): New function.
  7541. (noCheck): New variable.
  7542. * src/PeerAbstractCommand.cc
  7543. (PeerAbstractCommand): Added the initialization of noCheck.
  7544. (execute): Added a check for noCheck.
  7545. (setNoCheck): New function.
  7546. * src/Util.h
  7547. (stdio.h): Included.
  7548. * src/Util.cc
  7549. (unistd.h): Included.
  7550. * src/DefaultDiskWriter.cc
  7551. (unistd.h): Included.
  7552. * src/Peer.h
  7553. (operator==): Defined the function body here.
  7554. (operator!=): Defined the function body here.
  7555. * src/Peer.cc
  7556. (operator==): Removed.
  7557. (operator!=): Removed.
  7558. * src/Piece.h
  7559. (Piece): Defined the function body here(copy constructor).
  7560. (operator=): Defined the function body here.
  7561. (operator==): Defined the function body here.
  7562. * src/Piece.cc
  7563. (Piece): Removed(copy constructor).
  7564. (operator=): Removed.
  7565. (operator==): Removed.
  7566. * src/PeerMessageUtil.h
  7567. (ChokeMessage.h): Removed.
  7568. (UnchokeMessage.h): Removed.
  7569. (InterestedMessage.h): Removed.
  7570. (NotInterestedMessage.h): Removed.
  7571. (HaveMessage.h): Removed.
  7572. (BitfieldMessage.h): Removed.
  7573. (RequestMessage.h): Removed.
  7574. (CancelMessage.h): Removed.
  7575. (PieceMessage.h): Removed.
  7576. (HandshakeMessage.h): Removed.
  7577. (KeepAliveMessage.h): Removed.
  7578. (PortMessage.h): Removed.
  7579. (HaveAllMessage.h): Removed.
  7580. (HaveNoneMessage.h): Removed.
  7581. (PeerConnection.h): Removed.
  7582. (HandshakeMessage.h): Included.
  7583. * src/BitfieldMessage.h
  7584. (init): New function.
  7585. (BitfieldMessage): Rewritten.
  7586. (BitfieldMessage): New function(overload).
  7587. * src/RequestSlot.h
  7588. (operator=): Defined the function body here.
  7589. (operator==): Defined the function body here.
  7590. * src/RequestSlot.cc
  7591. (operator=): Removed.
  7592. (operator==): Removed.
  7593. To remove the dependency on the PeerMessage subclass from
  7594. PeerInteraction:
  7595. * src/PeerMessageFactory.h: New class.
  7596. * src/PeerMessageFactory.cc: New class.
  7597. * src/SimplePeerMessage.cc
  7598. (send): If invalidate is true then do nothing.
  7599. * src/PeerInteractionCommand.cc
  7600. (HandshakeMessage.h): Included.
  7601. (KeepAliveMessage.h): Included.
  7602. (ChokeMessage.h): Included.
  7603. (UnchokeMessage.h): Included.
  7604. (HaveMessage.h): Included.
  7605. (executeInternal): Call setNoCheck().
  7606. Removed setWriteCheckSocket(socket).
  7607. * src/PeerInteraction.h
  7608. (ChokeMessage.h): Removed.
  7609. (UnchokeMessage.h): Removed.
  7610. (InterestedMessage.h): Removed.
  7611. (NotInterestedMessage.h): Removed.
  7612. (HaveMessage.h): Removed.
  7613. (BitfieldMessage.h): Removed.
  7614. (RequestMessage.h): Removed.
  7615. (CancelMessage.h): Removed.
  7616. (PieceMessage.h): Removed.
  7617. (HandshakeMessage.h): Removed.
  7618. (KeepAliveMessage.h): Removed.
  7619. (PortMessage.h): Removed.
  7620. (HaveAllMessage.h): Removed.
  7621. (HaveNoneMessage.h): Removed.
  7622. (RejectMessage.h): Removed.
  7623. (AllowedFastMessage.h): Removed.
  7624. (SuggestPieceMessage.h): Removed.
  7625. (PeerMessageFactory.h): Included.
  7626. (PeerMessageHandle): Removed typedef of PeerMessageHandle.
  7627. (HandshakeMessageHandle): Removed typedef of HandshakeMessageHandle.
  7628. (PeerMessageFactory): New variable.
  7629. (createPeerMessage): Removed.
  7630. (createHandshakeMessage): Removed.
  7631. (setPeerMessageCommonProperty): Removed.
  7632. (addRequestSlot): New function.
  7633. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  7634. (getPeerMessageFactory): New function.
  7635. (createRequestMessage): Removed.
  7636. (createCancelMessage): Removed.
  7637. (createPieceMessage): Removed.
  7638. (createHaveMessage): Removed.
  7639. (createChokeMessage): Removed.
  7640. (createUnchokeMessage): Removed.
  7641. (createInterestedMessage): Removed.
  7642. (createNotInterestedMessage): Removed.
  7643. (createBitfieldMessage): Removed.
  7644. (createKeepAliveMessage): Removed.
  7645. (createHaveAllMessage): Removed.
  7646. (createHaveNoneMessage): Removed.
  7647. (createRejectMessage): Removed.
  7648. (createAllowedFastMessage): Removed.
  7649. * src/PeerInteraction.cc
  7650. (PeerInteraction): Allocate PeerMessageFactory here.
  7651. (~PeerInteraction): Deallocate PeerMessageFactory here.
  7652. (sendMessages): Use msg->isUploading() instead of msg->getId() ==
  7653. PieceMessage::ID.
  7654. (addMessage): Simplified by using PeerMessage::onPush().
  7655. (addRequestSlot): New function.
  7656. (rejectAllPieceMessageInQueue): Simplified by using
  7657. PeerMessage::onChoked().
  7658. (rejectPieceMessageInQueue): Simplified by using
  7659. PeerMessage::onCanceled().
  7660. (abortPiece): Simplified by using PeerMessage::abortPiece().
  7661. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  7662. (createHandshakeMessage): Removed.
  7663. (createPeerMessage): Removed.
  7664. (sendHandshake): Call PeerMessageFactory::createHandshakeMessage().
  7665. (setPeerMessageCommonProperty): Removed.
  7666. (createRequestMessage): Removed.
  7667. (createCancelMessage): Removed.
  7668. (createPieceMessage): Removed.
  7669. (createHaveMessage): Removed.
  7670. (createChokeMessage): Removed.
  7671. (createUnchokeMessage): Removed.
  7672. (createInterestedMessage): Removed.
  7673. (createNotInterestedMessage): Removed.
  7674. (createBitfieldMessage): Removed.
  7675. (createKeepAliveMessage): Removed.
  7676. (createHaveAllMessage): Removed.
  7677. (createHaveNoneMessage): Removed.
  7678. (createRejectMessage): Removed.
  7679. (createAllowedFastMessage): Removed.
  7680. * src/PieceMessage.h
  7681. (createRejectMessage): New function.
  7682. (PieceMessage): Rewritten.
  7683. (onChoked): New function.
  7684. (onCanceled): New function.
  7685. * src/PieceMessage.cc
  7686. (send): If invalidate is true then do nothing, just return.
  7687. (createRejectMessage): New function.
  7688. (onChoked): New function.
  7689. (onCanceled): New function.
  7690. * src/RequestMessage.h
  7691. (RequestMessage): Rewritten.
  7692. (onPush): New function.
  7693. (onAbortPiece): New function.
  7694. * src/RequestMessage.cc
  7695. (onPush): New function.
  7696. (onAbortPiece): New function.
  7697. Update fd_set when a socket is added or deleted in order to improve
  7698. performance:
  7699. * src/DownloadEngine.h
  7700. (rfdset): New variable.
  7701. (wfdset): New variable.
  7702. (updateFdSet): New function.
  7703. * src/DownloadEngine.cc
  7704. (SetDescriptor::operator()): Use SockCmdMap::value_type.
  7705. (AccumulateActiveCommandUuid::operator()): Use SockCmdMap::value_type.
  7706. (waitData): Copy rfdset and wfdset.
  7707. (updateFdSet): New function.
  7708. (addSocket): Call updateFdSet.
  7709. (deleteSocket): Call updateFdSet.
  7710. 2006-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7711. To add the support for Metalink3.0 backward compatible links:
  7712. * src/Request.h
  7713. (SAFE_CHARS): Added '#'.
  7714. (METALINK_MARK): New definition.
  7715. * src/Request.cc
  7716. (parseUrl): Added the support for Metalink3.0 backward compatible
  7717. links.
  7718. etc
  7719. * src/PeerInteraction.cc
  7720. (MsgPushBack): Removed.
  7721. (sendMessages): Use STL copy and back_inserter.
  7722. (rejectAllPieceMessageInQueue): Use STL copy and back_inserter.
  7723. (rejectPieceMessageInQueue): Use STL copy and back_inserter.
  7724. * src/TorrentMan.h
  7725. (MAX_PEER_LIST_SIZE): Changed to 100 from 250.
  7726. 2006-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7727. * src/SharedHandle.h: New class.
  7728. To wrap Socket, Command, PeerMessage and Peer with SharedHandle:
  7729. * src/HttpResponseCommand.h
  7730. (HttpResponseCommand): Wrapped Socket.
  7731. * src/SocketCore.h
  7732. (operator==): New function.
  7733. (operator!=): New function.
  7734. (operator<): New function.
  7735. (getSockfd): New function.
  7736. (isOpen): New function.
  7737. (writeData): New function.
  7738. * src/SocketCore.cc
  7739. (operator==): New function.
  7740. (operator!=): New function.
  7741. (operator<): New function.
  7742. * src/AbstractCommand.h
  7743. (socket): Changed its type to SocketHandle.
  7744. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7745. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7746. (disableReadCheckSocket): New function.
  7747. (disableWriteCheckSocket): New function.
  7748. (readCheckTarget): Changed its type to SocketHandle.
  7749. (writeCheckTarget): Changed its type to SocketHandle.
  7750. (AbstractCommand): Replaced Socket with SocketHandle.
  7751. * src/AbstractCommand.cc
  7752. (AbstractCommand): Replaced Socket with SocketHandle.
  7753. (~AbstractCommand): Removed the deallocation for Socket object.
  7754. (disableReadCheckSocket): New function.
  7755. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7756. (disableWriteCheckSocket): New function.
  7757. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7758. * src/HttpDownloadCommand.cc
  7759. (DownloadCommand): Replaced Socket with SocketHandle.
  7760. * src/PeerAbstractCommand.h
  7761. (socket): Changed its type to SocketHandle.
  7762. (peer): Changed its type to PeerHandle.
  7763. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7764. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7765. (disableReadCheckSocket): New function.
  7766. (disableWriteCheckSocket): New function.
  7767. (readCheckTarget): Changed its type to SocketHandle.
  7768. (writeCheckTarget): Changed its type to SocketHandle.
  7769. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  7770. Replaced Peer with PeerHandle.
  7771. * src/HttpRequestCommand.cc
  7772. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7773. Use disableReadCheckSocket.
  7774. * src/PeerInitiateConnectionCommand.h
  7775. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7776. * src/PeerChokeCommand.cc
  7777. (UploadFaster::operator()): Replaced Peer with PeerHandle.
  7778. (DownloadFaster::operator()): Replaced Peer with PeerHandle.
  7779. (execute): Use PeerHandle.
  7780. * src/PeerConnection.h
  7781. (HandshakeMessage.h): Removed include of HandshakeMessage.h.
  7782. (socket): Changed its type to SocketHandle.
  7783. (PeerConnection): Replaced Socket with SocketHandle.
  7784. * src/PeerConnection.cc
  7785. (PeerConnection): Replaced Socket with SocketHandle.
  7786. * src/PeerInteractionCommand.h
  7787. (PeerInteractionCommand): Replaced socket with SocketHandle.
  7788. Replaced Peer with PeerHandle.
  7789. * src/PeerInteractionCommand.cc
  7790. (PeerInteractionCommand): Replaced Socket with SocketHandle.
  7791. Replaced Peer with PeerHandle.
  7792. (executeInternal): Use disableWriteCheckSocket.
  7793. Use HandshakeMessageHandle.
  7794. (receiveMessages): Use PeerMessageHandle.
  7795. (prepareForNextPeer): Use PeerHandle.
  7796. * src/HttpProxyRequestCommand.h
  7797. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7798. * src/HttpResponseCommand.cc
  7799. (HttpResponseCommand): Replaced Socket with SocketHandle.
  7800. * src/TorrentMan.cc
  7801. (nullPeer): Added external reference.
  7802. (~TorrentMan): Removed the deallocation of the elements of peers.
  7803. (addPeer): Rewritten.
  7804. (isPeerAvailable): Use nullPeer.
  7805. (deleteOldpeers): Replaced with deleteErrorPeer.
  7806. (deleteErrorPeer): New function.
  7807. (getPeer): Use PeerHandle and nullPeer.
  7808. (hasMissingPiece): Replaced Peer with PeerHandle.
  7809. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7810. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7811. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7812. (getMissingPiece): Replaced Peer with PeerHandle.
  7813. * src/FtpNegotiateCommand.cc
  7814. (FtpNegotiationCommand): Replaced Peer with PeerHandle.
  7815. (~FtpNegotiationCommand): Removed the deallocation of Sockets.
  7816. (recvGreeting): Use disableWriteCheckSocket.
  7817. (recvPasv): Removed the allocation of Socket.
  7818. Use disableReadCheckSocket.
  7819. (sendRestPasv): Use disableWriteCheckSocket.
  7820. (recvRetr): Changed assertion.
  7821. * src/PeerInteraction.h
  7822. (SharedHandle.h): Included SharedHandle.h.
  7823. (PeerMessageHandle): New type definition.
  7824. (HandshakeMessageHandle): New type definition.
  7825. (MessageQueue): Changed. Now its element is of type PeerMessageHandle.
  7826. (peer): Changed its type to PeerHandle.
  7827. (createHandshakeMessage): Replaced HandshakeMessage with
  7828. HandshakeMessageHandle.
  7829. (createPeerMessage): Replaced PeerMessageHandle with PeerMessage.
  7830. (PeerInteraction): Replaced Peer with PeerHandle.
  7831. Replaced Socket with SocketHandle.
  7832. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  7833. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  7834. (receiveHandshake): Replaced HandshakeMessage with
  7835. HandshakeMessageHandle.
  7836. * src/PeerInteraction.cc
  7837. (PeerInteraction): Replaced Peer with PeerHandle.
  7838. Replaced Socket with SocketHandle.
  7839. (~PeerInteraction): Removed the deallocation of the elements of
  7840. messageQueue.
  7841. (MsgPushBack::operator()): Replaced PeerMessage with PeerMessageHandle.
  7842. (isSendingMessageInProgress): Replaced PeerMessage with
  7843. PeerMessageHandle.
  7844. (sendMessages): Use PeerMessageHandle. Removed try-catch block.
  7845. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  7846. (rejectAllPieceMessageInQueue): Use PeerMessageHandle.
  7847. (rejectPieceMessageInQueue): Use PeerMessageHandle.
  7848. (abortPiece): Use PeerMessageHandle.
  7849. (receiveHandshake): Replaced HandshakeMessage with
  7850. HandshakeMessageHandle. Removed try-catch block.
  7851. (createHandshakeMessage): Replaced HandshakeMessage with
  7852. HandshakeMessageHandle.
  7853. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  7854. Removed try-catch block.
  7855. (createPeerMessage): Replaced PeerMessage with PeerMessageHandle.
  7856. * src/HttpProxyResponseCommand.cc
  7857. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7858. * src/FtpTunnelResponseCommand.h
  7859. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7860. * src/HttpConnection.cc
  7861. (HttpConnection): Replaced Socket with SocketHandle.
  7862. * src/PeerAbstractCommand.cc
  7863. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  7864. (~PeerAbstractCommand): Removed the deallocation of socket.
  7865. Use disableReadCheckSocket, disableWriteCheckSocket.
  7866. (disableReadCheckSocket): New function.
  7867. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7868. (disableWriteCheckSocket): New function.
  7869. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7870. * src/InitiateConnectionCommandFactory.h: Corrected indentation.
  7871. * src/FtpTunnelRequestCommand.cc
  7872. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7873. (~FtpTunnelRequestCommand): Corrected indentation.
  7874. * src/DownloadCommand.h
  7875. (DownloadCommand): Replaced Socket with SocketHandle.
  7876. * src/PeerListenCommand.cc
  7877. (PeerListenCommand): Removed the initialization of socket.
  7878. (~PeerListenCommand): Removed the deallocation of socket.
  7879. (bindPort): Use SocketHandle.
  7880. (execute): Use SocketHandle and PeerHandle.
  7881. * src/FtpDowndloadCommand.cc
  7882. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7883. (~FtpDownloadCommand): Removed the deallocation of ctrlSocket.
  7884. * src/main.cc
  7885. (main): Corrected indentation.
  7886. * src/HttpInitiateConnectionCommand.cc
  7887. (HttpInitiateConnectionCommand): Replaced Socket with SocketHandle.
  7888. (executeInternal): Removed the allocation of socket.
  7889. * src/HttpRequestCommand.h
  7890. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7891. * src/FtpNegotiationCommand.h
  7892. (dataSocket): Changed its type to SocketHandle.
  7893. (serverSocket): Changed its type to SocketHandle.
  7894. (FtpNegotiationCommand): Replaced Socket with SocketHandle.
  7895. * src/TorrentMan.h
  7896. (MAX_PEER_UPDATE): Removed.
  7897. (MAX_PEERS): New definition.
  7898. (Peers): The element is now of type PeerHandle.
  7899. (addPeer): Replaced Peer with PeerHandle. Removed 'duplicate' argument.
  7900. (getPeer): Replaced Peer with PeerHandle.
  7901. (deleteOldErrorPeers): Removed.
  7902. (deleteErrorPeer): New function.
  7903. (hasMissingPiece): Replaced Peer with PeerHandle.
  7904. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7905. (getMissingPiece): Replaced Peer with PeerHandle.
  7906. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7907. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7908. (addActivePeer): Replaced Peer with PeerHandle.
  7909. (deleteActivePeer): Replaced Peer with PeerHandle.
  7910. Added a check for the return value of find.
  7911. * src/FtpTunnelResponseCommand.cc
  7912. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7913. * src/FtpInitiateConnectionCommand.cc
  7914. (executeInternal): Removed the allocation of socket.
  7915. * src/DownloadEngine.h
  7916. (Sockets): An element is now of type SocketHandle.
  7917. (SockCmdMap): A key is of type SocketHandle, a value is of type int.
  7918. (CommandUuids): New type definition.
  7919. (rsockets): Changed its type to SockCmdMap.
  7920. (wsockets): Changed its type to SockCmdMap.
  7921. (addSocket): Rewritten.
  7922. (deleteSocket): Rewritten.
  7923. (addSocketForReadCheck): Rewritten.
  7924. (deleteSocketForReadCheck): Rewritten.
  7925. (addSocketForWriteCheck): Rewritten.
  7926. (deleteSocketForWriteCheck): Rewritten.
  7927. (PairFind): New template class.
  7928. * src/HttpDownloadCommand.h
  7929. (HttpDownloadCommand): Replaced Socket with SocketHandle.
  7930. * src/FtpConnection.cc
  7931. (FtpConnection): Replaced Socket with SocketHandle.
  7932. (sendPort): Removed the allocation of serverSocket. Removed try-catch
  7933. block.
  7934. * src/InitiateConnectionCommandFactory.cc
  7935. (DlAbortEx.h): Included DlAbortEx.h.
  7936. (createInitiateConnectionCommand): Throw exception if the protocol of
  7937. requested URI is not supported.
  7938. * src/Peer.cc
  7939. (nullPeer): Changed its type to PeerHandle.
  7940. (operator==): New function.
  7941. (operator!=): New function.
  7942. * src/Peer.h
  7943. (SharedHandle.h): Included SharedHandle.h.
  7944. (operator==): New function.
  7945. (operator!=): New function.
  7946. (Peer): Added the default constructor.
  7947. Use resetStatus() to initialize member variables.
  7948. (nullPeer): Removed.
  7949. * src/TrackerUpdateCommand.cc
  7950. (execute): Brushed up using SharedHandle. Replaced MAX_PEER_UPDATE
  7951. with MIN_PEERS.
  7952. * src/PeerListenCommand.h
  7953. (socket): Changed its type to SocketHandle.
  7954. * src/Command.h
  7955. (CommandUuid): New type definition.
  7956. (uuid): New variable.
  7957. (uuidGen): New variable.
  7958. (Command): Added the initialization of uuid.
  7959. (getUuid): New function.
  7960. * src/Socket.h
  7961. (Socket): Removed.
  7962. (SocketHandle): New type definition.
  7963. * src/DownloadEngine.h
  7964. (FindCommand): New function object.
  7965. (run): The portion of socket check was rewritten.
  7966. (SetDescriptor): New function object.
  7967. (AccumulateActiveCommandUuid): New function object.
  7968. (waitData): Rewritten.
  7969. (addSocket): Rewritten.
  7970. (deleteSocket): Rewritten.
  7971. (addSocketForReadCheck): Rewritten.
  7972. (addSocketForWriteCheck): Rewritten.
  7973. (deleteSocketForReadCheck): Rewritten.
  7974. (deleteSocketForWriteCheck): Rewritten.
  7975. * src/HttpProxyResponseCommand.h
  7976. (HttpProxyResponseCommand): Replaced Socket with SocketHandle.
  7977. * src/HttpConnection.h
  7978. (socket): Changed its type to SocketHandle.
  7979. (HttpConnection): Replaced Socket with SocketHandle.
  7980. * src/PeerInitiateConnectionCommand.cc
  7981. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7982. (executeInternal): Removed the allocation of socket.
  7983. (prepareForNextPeer): Use PeerHandle.
  7984. * src/PeerMessage.h
  7985. (peer): Changed its type to PeerHandle.
  7986. (getPeer): Replaced Peer with PeerHandle.
  7987. (setPeer): Replaced Peer with PeerHandle.
  7988. * src/DownloadCommand.cc
  7989. (DownloadCommand): Replaced Socket with SocketHandle.
  7990. * src/FtpConnection.h
  7991. (socket): Changed its type to SocketHandle.
  7992. (FtpConnection): Replaced Socket with SocketHandle.
  7993. (sendPort); Replaced Socket with SocketHandle.
  7994. * src/FtpDowndloadCommand.h
  7995. (ctrlSocket): Changed its type to SocketHandle.
  7996. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7997. * src/HttpProxyRequestCommand.cc
  7998. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7999. * src/FtpTunnelRequestCommand.h
  8000. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  8001. etc
  8002. * src/PeerChokeCommand.h
  8003. (setAllPeerChoked): Removed.
  8004. (setAllPeerResetDelta): Removed.
  8005. * src/PeerChokeCommand.cc
  8006. (setAllPeerChoked): Removed.
  8007. (ChokePeer): New function object.
  8008. (setAllPeerResetDelta): Removed.
  8009. (ResetDelta): New function object.
  8010. (orderByDownloadRate): Fixed a bug: use DowloadFaster, not UploadFaster
  8011. (execute): Show download speed when the local node is a seeder.
  8012. setAllPeerChoked and setAllPeerResetDelta were rewritten
  8013. using STL.
  8014. * src/TrackerWatcherCommand.h
  8015. (MIN_PEERS): Removed.
  8016. * src/TorrentMan.cc
  8017. (getPeer): Replaced MAX_PEER_UPDATE with MIN_PEERS.
  8018. 2006-07-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8019. To fix the bug that .aria2 file is not saved if downloading is stopped
  8020. by the errors:it results that aria2 can not resume downloading:
  8021. * src/main.cc
  8022. (normalDownload): Added the call to save().
  8023. (main): Added the deletion of the elements in 'reserved'.
  8024. To fix log:
  8025. * src/PeerInteraction.cc
  8026. (receiveHandshake): Fixed log.
  8027. 2006-07-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8028. To improve download performance in BitTorrent:
  8029. * src/TorrentMan.cc
  8030. (getPeer): Check the number of connections. Return nullPeer if
  8031. it is greater than MAX_PEER_UPDATE.
  8032. This code was originally here, but was removed in 0.5.1.
  8033. 2006-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8034. To improve the conditional compilation:
  8035. * src/MultiDiskWriter.h:
  8036. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  8037. * src/MultiDiskWriter.cc:
  8038. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  8039. * src/Util.h:
  8040. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  8041. Added ENABLE_BITTORRENT around computeFastSet().
  8042. * src/Util.cc:
  8043. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  8044. Added ENABLE_BITTORRENT around computeFastSet().
  8045. * src/messageDigest.h:
  8046. Replaced ENABLE_BITTORRENT with ENABLE_SSL.
  8047. * src/ShaVisitor.h:
  8048. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  8049. * src/ShaVisitor.cc:
  8050. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  8051. * src/main.cc:
  8052. Added ENABLE_BITTORRENT around includes and blocks related to
  8053. BitTorrent.
  8054. Added ENABLE_MESSAGE_DIGEST to skip checksum checking when the message
  8055. digest support is not available.
  8056. * src/AbstractDiskWriter.h:
  8057. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  8058. * src/AbstractDiskWriter.cc:
  8059. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  8060. * src/MetalinkEntry.cc
  8061. (check): Added ENABLE_MESSAGE_DIGEST. Return true if the message digest
  8062. support is not available.
  8063. To add command-line options for Metalink:
  8064. * src/main.cc:
  8065. Added metalink-version, metalink-language, metalink-os,
  8066. follow-metalink.
  8067. To use EXIT_SUCCESS and EXIT_FAILURE with exit():
  8068. * src/main.cc: Use these definition.
  8069. * Release 0.6.0
  8070. 2006-07-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8071. To add Metalink support(http/ftp only):
  8072. * src/AbstractCommand.h
  8073. (tryReserved): New function.
  8074. * src/AbstractCommand.cc
  8075. (execute): Call tryReserved().
  8076. (tryReserved): New function.
  8077. * src/Request.h
  8078. (Requests): New type definition.
  8079. * src/SegmentMan.h
  8080. (reserved): New variable.
  8081. * src/Util.h
  8082. (fileChecksum): New function.
  8083. (toUpper): New function.
  8084. (toLower): New function.
  8085. * src/Util.cc
  8086. (messageDigest.h): Included.
  8087. (trim): Trim \r\n\t.
  8088. (fileChecksum): New function.
  8089. (toUpper): New function.
  8090. (toLower): New function.
  8091. * src/main.cc
  8092. (normalDownload): New function.
  8093. (main): Added 2 command-line options: metalink-file,
  8094. metalink-connection. Their usage has not been written yet.
  8095. * src/MetalinkProcessor.h: New class.
  8096. * src/Xml2MetalinkProcessor.h: New class.
  8097. * src/Xml2MetalinkProcessor.cc: New class.
  8098. * src/MetalinkEntry.h: New class.
  8099. * src/MetalinkEntry.cc: New class.
  8100. * src/MetalinkResource.h: New class.
  8101. * src/MetalinkResource.cc: New class.
  8102. To add md5 message digest checking:
  8103. * src/messageDigest.h: Rewritten.
  8104. * src/MultiDiskWriter.cc: Updated according to the changes in
  8105. messageDigest.h.
  8106. * src/ShaVisitor.cc: Updated according to the changes in
  8107. messageDigest.h.
  8108. * src/Util.cc: Updated according to the changes in messageDigest.h.
  8109. * src/AbstractDiskWriter.cc: Updated according to the changes in
  8110. messageDigest.h.
  8111. To fix a bug that causes segfault when the payload length in peer
  8112. message is less than 0:
  8113. * src/PeerConnection.cc:
  8114. (receiveMessage): Fixed the bug.
  8115. * src/PeerMessageUtil.cc
  8116. (checkLength): Throw an exception if length is less than or equals to
  8117. 0.
  8118. To add new interfaces to Base64 encoding/decoding:
  8119. * src/Base64.h
  8120. (part_encode): Changed the method signature.
  8121. (encode): New function(overload).
  8122. (decode): New function(overload).
  8123. * src/Base64.cc
  8124. (part_encode): Rewritten.
  8125. (encode): Rewritten.
  8126. (encode): New function(overload).
  8127. To prevent a peer to download same piece if there is an error in
  8128. checksum:
  8129. * src/PieceMessage.cc
  8130. (receivedAction): Call peerInteraction->abortPiece().
  8131. 2006-06-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8132. To fix the bug that causes same have message is sent many times to
  8133. a single peer.
  8134. * src/Time.cc
  8135. (isNewer): Use Util::difftv().
  8136. * src/Util.cc
  8137. (difftv): Added a cast to (long long int).
  8138. * src/TorrentMan.cc
  8139. (advertisePiece): Use push_front.
  8140. (getAdvertisedPieceIndexes): A performance improvement was made.
  8141. To fix the bug that sends tracker requests without a sleep interval
  8142. when the number of connections is less than 15.
  8143. * src/TrackerWatcherCommand.cc
  8144. (execute): Now the number of connections is not a factor to decide
  8145. whether or not a tracker request should be sent or not.
  8146. * src/Time.h
  8147. (setTimeInSec): New function.
  8148. * src/Time.cc
  8149. (setTimeInSec): New function.
  8150. etc.
  8151. * src/ChokeMessage.cc
  8152. (receivedAction): Removed peer->snubbing = false
  8153. * src/PeerConnection.h
  8154. (receiveHandshake): Updated doc.
  8155. * src/TorrentMan.h
  8156. (getAdvertisedPieceIndexes): Updated the method signature.
  8157. * src/TorrentMan.cc
  8158. (getAdvertisedPieceIndexes): Updated the method signature.
  8159. * src/Time.h
  8160. (getTimeInMicros): Added a cast to (long long int).
  8161. (getTimeInMillis): Added a cast to (long long int).
  8162. * Release 0.5.2
  8163. 2006-06-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8164. To make a listening socket non-block:
  8165. * src/SocketCore.h
  8166. (setNonBlockingMode): New function.
  8167. * src/SocketCore.cc
  8168. (setNonBlockingMode): New function.
  8169. (beginListen): Added a call to setNonBlockingMode().
  8170. (acceptConnection): Call setNonBlockingMode().
  8171. (setBlockingMode): Updated.
  8172. To handle tracker's NAT-checking:
  8173. * src/PeerConnection.cc
  8174. (receiveHandshake): 'msg' param is filled with received data and
  8175. its length is assigned to 'length' param, even if all handshake
  8176. message is not yet received.
  8177. * src/PeerInteractionCommand.cc
  8178. (executeInternal): Use peerInteraction->receiveHandshake(true) when
  8179. a new peer connects to localhost.
  8180. A call to peerInteraction->sendHandshake() was removed because
  8181. it is called from peerInteraction->receiveHandshake(true).
  8182. * src/PeerInteraction.h
  8183. (quickReplied): New variable.
  8184. (receiveHandshake): Added an argument.
  8185. * src/PeerInteraction.cc
  8186. (PeerInteraction): Added the initialization of quickReplied.
  8187. (receiveHandshake): Send handshake message as soon as the info hash
  8188. in a handshake message from a peer is correct.
  8189. To change the random part of peer id and key parameter:
  8190. * src/TorrentMan.h
  8191. (key): New variable.
  8192. * src/TorrentMan.cc
  8193. (setupInternal1): Use Util::randomAlpha() to generate random part
  8194. of peer id, which is now "-aria2-"+13 alphabet characters([A-Za-z]).
  8195. key is also generated by Util::randomAlpha() and it is now 8 character
  8196. long.
  8197. * src/Util.h
  8198. (randomAlpha): New function.
  8199. * src/Util.cc
  8200. (randomAlpha): New function.
  8201. * src/TrackerWatcherCommand.cc
  8202. (execute): In a tracker request: Use torrentMan->key as key parameter.
  8203. Added no_peer_id=1.
  8204. Set snubbing flag to false when a choke message is received from a
  8205. snubbed peer.
  8206. * src/ChokeMessage.cc
  8207. (receivedAction): Set snubbing flag to false.
  8208. 2006-06-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8209. * src/TorrentMan.cc (setupInternal1): Fixed peerId generation bug.
  8210. * src/SimpleLogger.h (writeHeader): New function.
  8211. * src/SimpleLogger.cc (writeHeader): New function.
  8212. (writeLog): Fixed the bug that causes segfaults if exception message
  8213. contains an unescaped "%" character.
  8214. * src/TrackerWatcherCommand.cc (execute): Added a short sleep
  8215. when a tracker request fails.
  8216. * src/Request.cc (parseUrl): Query string is now handled properly.
  8217. * Release 0.5.1
  8218. 2006-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8219. To add Time class which represents a specific instant in time and
  8220. its precision is microseconds. Time checking procedures were rewritten
  8221. using this object.
  8222. * src/Time.h: New class.
  8223. * src/Time.cc: New class.
  8224. * src/AbstractCommand.h
  8225. (updateCheckPoint): Removed.
  8226. (isTimeoutDetected): Removed.
  8227. (checkPoint): Changed the type to Time.
  8228. (timeout): New variable.
  8229. (setTimeout): New function.
  8230. * src/AbstractCommand.cc
  8231. (AbstractCommand): Removed the initialization of checkPoint.
  8232. Added the initialization of timeout.
  8233. (updateCheckPoint): Removed.
  8234. (isTimeoutDetected): Removed.
  8235. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  8236. * src/PeerChokeCommand.h
  8237. (checkPoint): Changed the type to Time.
  8238. * src/PeerChokeCommand.cc
  8239. (PeerChokeCommand): Removed the initialization of checkPoint.
  8240. (execute): Rewritten using Time object.
  8241. * src/TrackerWatcherCommand.h
  8242. (checkPoint): Changed the type to Time.
  8243. * src/TrackerWatcherCommand.cc
  8244. (TrackerWatcherCommand): Removed the initialization of checkPoint.
  8245. (execute): Rewritten.
  8246. * src/ConsoleDownloadEngine.h
  8247. (cp): Changed the type to Time.
  8248. (startup): Changed the type to Time.
  8249. * src/ConsoleDownloadEngine.cc
  8250. (initStatistics): Use cp.reset(), startup.reset().
  8251. (calculateStatistics): Rewritten using Time object.
  8252. * src/PeerAbstractCommand.h
  8253. (updateCheckPoint): Removed.
  8254. (isTimeoutDetected): Removed.
  8255. (checkPoint): Changed the type to Time.
  8256. * src/PeerAbstractCommand.cc
  8257. (PeerAbstractCommand): Removed the initialization of checkPoint.
  8258. (updateCheckPoint): Removed.
  8259. (isTimeoutDetected): Removed.
  8260. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  8261. * src/PeerInteractionCommand.cc
  8262. (PeerInteractionCommand): Removed the initializations of struct
  8263. timeval variables.
  8264. * src/PeerInteractionCommand.h
  8265. (keepAliveCheckPoint): Changed the type to Time.
  8266. (chokeCheckPoint): Changed the type to Time.
  8267. (freqCheckPoint): Changed the type to Time.
  8268. (haveCheckTime): Changed the type to Time.
  8269. * src/PeerInteractionCommand.cc
  8270. (executeInternal): Rewritten using Time object.
  8271. (detectMessageFlooding): Rewritten using Time object.
  8272. (checkLongTimePeerChoking): Rewritten using Time object.
  8273. (sendKeepAlive): Rewritten using Time object.
  8274. (checkHave): Rewritten using Time object.
  8275. * src/SleepCommand.h
  8276. (checkPoint): Changed the type to Time.
  8277. * src/SleepCommand.cc
  8278. (SleepCommand): Removed the initialization of checkPoint.
  8279. (execute): Rewritten using Time object.
  8280. * src/TorrentAutoSaveCommand.h
  8281. (checkPoint): Changed the type to Time.
  8282. * src/TorrentAutoSaveCommand.cc
  8283. (TorrentAutoSaveCommand): Removed the initialization of checkPoint.
  8284. (execute): Rewritten.
  8285. * src/DownloadCommand.h
  8286. (sw): Changed the type to Time.
  8287. * src/DownloadCommand.cc
  8288. (DownloadCommand): Removed the initialization of sw.
  8289. (executeInternal): Rewritten.
  8290. * src/RequestSlot.h
  8291. (dispatchedTime): Changed the type to Time.
  8292. * src/RequestSlot.cc
  8293. (RequestSlot): Removed the call to setDispatchedTime().
  8294. (setDispatchedTime): Rewirtten.
  8295. (isTimeout): Rewritten.
  8296. (getLatencyInMillis): Rewritten.
  8297. * src/TorrentDownloadEngine.h
  8298. (cp): Changed the type to Time[2].
  8299. (startup): Changed the type to Time.
  8300. * src/TorrentDownloadEngine.cc
  8301. (initStatistics): Rewritten.
  8302. (calculateStatistics): Rewritten.
  8303. * src/DownloadEngine.cc
  8304. (run): Rewritten.
  8305. To detect all attempts to connect to the tracker are failed:
  8306. * src/AbstractCommand.cc
  8307. (execute): Increment e->segmentMan->errors if a command aborted.
  8308. * src/SegmentMan.h
  8309. (errors): New variable.
  8310. * src/SegmentMan.cc
  8311. (SegmentMan): Added the initialization of errors.
  8312. (init): Added the initialization of errors.
  8313. * src/TrackerWatcherCommand.cc
  8314. (execute): If e->segmentMan->errors > 0 then assume that the tracker
  8315. request was failed.
  8316. To handle snubbed peers:
  8317. * src/PeerChokeCommand.cc
  8318. (optUnchokingPeer): Snubbed peers don't get unchoked.
  8319. (execute): Snubbed peers don't get unchoked.
  8320. * src/PeerInteraction.h
  8321. (REQUEST_TIME_OUT): Changed the value from 120 to 60.
  8322. * src/PeerInteraction.cc
  8323. (checkRequestSlot): A peer get marked as "snubbed" if it doesn't send
  8324. back the requested 16k block in 60 seconds.
  8325. * src/PieceMessage.cc
  8326. (receivedAction): A peer's snubbed state is cleard if it sends
  8327. the requested 16k block in 60 seconds.
  8328. * src/Peer.h
  8329. (snubbing): New variable.
  8330. * src/Peer.cc
  8331. (resetStatus): Added snubbed = false.
  8332. To fix the bug that causes have message is not sent:
  8333. * src/PeerInteractionCommand.cc
  8334. (~PeerInteractionCommand): Removed e->torrentMan->unadvertisePiece().
  8335. (FLOODING_CHECK_INTERVAL): New definition(temporal).
  8336. (detectMessageFlooding): Use FLOODING_CHECK_INTERVAL.
  8337. * src/TorrentMan.h
  8338. (HaveEntry): New class.
  8339. (advertisePiece): Rewritten.
  8340. (getAdvertisedPieceIndexes): Rewritten.
  8341. (Haves): Changed the type.
  8342. (getAdvertisedPieceIndexes): Added an argument.
  8343. Others:
  8344. * src/TorrentMan.h
  8345. (DEFAULT_ANNOUNCE_INTERVAL): Changed the value to 1800.
  8346. (DEFAULT_ANNOUNCE_MIN_INTERVAL): Changed the value to 1800.
  8347. * src/TorrentMan.cc
  8348. (getPeer): Don't check the number of connections here.
  8349. (setupInternal1): Changed peerId.
  8350. * src/PeerInteractionCommand.h
  8351. (KEEP_ALIVE_INTERVAL): New definition.
  8352. (sendKeepAlive): Use KEEP_ALIVE_INTERVAL.
  8353. * src/main.cc
  8354. (main): SA_ONESHOT was replaced with SA_RESETHAND.
  8355. * src/DownloadEngine.h: Removed unnecessary header includes.
  8356. 2006-05-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8357. To fix the bug that causes segfaults if a tracker returns a zero-length
  8358. list as "peers":
  8359. * src/TrackerUpdateCommand.cc
  8360. (execute): Added a check to see wether the type of peers is Data*.
  8361. 2006-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8362. * Release 0.5.0
  8363. To fix compile issue with gcc3:
  8364. * src/CancelMessage.h
  8365. (ID): Renamed as ID_t
  8366. (ID_t): New enum.
  8367. * src/RejectMessage.h
  8368. (ID): Renamed as ID_t
  8369. (ID_t): New enum.
  8370. * src/SuggestPieceMessage.h
  8371. (ID): Renamed as ID_t
  8372. (ID_t): New enum.
  8373. * src/AllowedFastMessage.h
  8374. (ID): Renamed as ID_t
  8375. (ID_t): New enum.
  8376. * src/PortMessage.h
  8377. (ID): Renamed as ID_t
  8378. (ID_t): New enum.
  8379. * src/HaveNoneMessage.h
  8380. (ID): Renamed as ID_t
  8381. (ID_t): New enum.
  8382. * src/KeepAliveMessage.h
  8383. (ID): Renamed as ID_t
  8384. (ID_t): New enum.
  8385. * src/HaveAllMessage.h
  8386. (ID): Renamed as ID_t
  8387. (ID_t): New enum.
  8388. * src/UnchokeMessage.h
  8389. (ID): Renamed as ID_t
  8390. (ID_t): New enum.
  8391. * src/BitfieldMessage.h
  8392. (ID): Renamed as ID_t
  8393. (ID_t): New enum.
  8394. * src/PieceMessage.h
  8395. (ID): Renamed as ID_t
  8396. (ID_t): New enum.
  8397. * src/RequestMessage.h
  8398. (ID): Renamed as ID_t
  8399. (ID_t): New enum.
  8400. * src/NotInterestedMessage.h
  8401. (ID): Renamed as ID_t
  8402. (ID_t): New enum.
  8403. * src/ChokeMessage.h
  8404. (ID): Renamed as ID_t
  8405. (ID_t): New enum.
  8406. * src/InterestedMessage.h
  8407. (ID): Renamed as ID_t
  8408. (ID_t): New enum.
  8409. * src/HaveMessage.h
  8410. (ID): Renamed as ID_t
  8411. (ID_t): New enum.
  8412. 2006-05-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8413. * src/PeerAbstractCommand.h
  8414. (beforeSocketCheck): Removed.
  8415. * src/PeerAbstractCommand.cc
  8416. Modified in order to call executeInternal() even if socket check
  8417. and upload limit check fail.
  8418. * src/PeerInteractionCommand.h
  8419. (keepAlive): Removed.
  8420. (sendKeepAlive): New function.
  8421. (checkHave): New function.
  8422. (beforeSocketCheck): Removed.
  8423. * src/PeerInteractionCommand.cc
  8424. (executeInternal): Use peerInteraction->checkRequestSlot(). Added
  8425. calls to checkHave() and sendKeepAlive().
  8426. (keepAlive): Renamed to sendKeepAlive().
  8427. (sendKeepAlive): New function.
  8428. (beforeSocketCheck): Removed.
  8429. (checkHave): New function.
  8430. * src/BitfieldMan.cc
  8431. (getMissingIndex): Don't call getMissingIndexRandomly() if max is 0.
  8432. (getMissingUnusedIndex): Don't call getMissingIndexRandomly() if max is
  8433. 0.
  8434. (getMissingIndex): Dont't call getMissingIndexRandomly() if max is 0.
  8435. * src/TorrentMan.h
  8436. (UsedPieces): Removed.
  8437. (Pieces): New type definition.
  8438. * src/Piece.h: Updated doc.
  8439. * src/Peer.h
  8440. (totalLength): Removed.
  8441. * src/Peer.cc
  8442. (updateLatency): Fixed the latency calculation.
  8443. * src/TorrentMan.cc
  8444. (addPeer): Call deleteOldErrorPeers() only if peers.size() is higher
  8445. than or equal to MAX_PEER_LIST_SIZE.
  8446. If duplicate is false and peer.size() >= MAX_PEER_LIST_SIZE,
  8447. then return false.
  8448. (deleteOldErrorPeers): Rewritten.
  8449. (deleteUsedPiece): Fixed the miss use of STL remove.
  8450. * src/PeerInteraction.h
  8451. (Pieces): Removed.
  8452. (deleteTimeoutRequestSlot): Removed.
  8453. (deleteCompletedRequestSlot): Removed.
  8454. (checkRequestSlot): New function.
  8455. * src/PeerInteraction.cc
  8456. (deleteTimeoutRequestSlot): Merged to checkRequestSlot().
  8457. (deleteCompletedRequestSlot): Merged to checkRequestSlot().
  8458. (checkRequestSlot): New function.
  8459. * src/DownloadEngine.cc
  8460. (run): Clear activeSockets before calling waitData().
  8461. (waitData): Removed a call to activeSockets.clear().
  8462. 2006-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8463. To attempt to handle EINTR:
  8464. * src/SocketCore.cc
  8465. (isReadable): Added EINTR handling.
  8466. (isWritable): Added EINTR handling.
  8467. To improve the performance:
  8468. * src/AbstractCommand.cc
  8469. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  8470. * src/PeerInteractionCommand.h
  8471. (receiveMessage): Renamed as receiveMessages().
  8472. (receiveMessages): New function.
  8473. * src/PeerInteractionCommand.cc
  8474. (executeInternal): receiveMessage loop is moved to new receiveMessages
  8475. () function. detectMessageFlooding() is moved here.
  8476. (detectMessageFlooding): Use Util::difftvsec() instead of Util::difftv
  8477. (). The flooding detection for have message is comment out.
  8478. (checkLongTimePeerChoking): Use Util::difftvsec() instead of
  8479. Util::difftv().
  8480. (receiveMessage): Renamed as receiveMessages().
  8481. (receiveMessages): New function.
  8482. (keepAlive): Use Util::difftvsec() instead of Util::difftv().
  8483. (beforeSocketCheck): Commented out checkLongTimePeerChoking().
  8484. * src/SleepCommand.cc
  8485. (execute): Use Util::difftvsec() instead of Util::difftv().
  8486. * src/BitfieldMan.h
  8487. (getNthBitIndex): New function.
  8488. (hasMissingPiece): New function.
  8489. (getAllMissingIndexes): New function.
  8490. * src/BitfieldMan.cc
  8491. (countSetBit): Rewritten.
  8492. (getNthBitIndex): New function.
  8493. (getMissingIndexRandomly): Rewritten.
  8494. (hasMissingPiece): New function.
  8495. (getAllMissingIndexes): New function.
  8496. * src/TorrentMan.cc
  8497. (hasMissingPiece): New function.
  8498. (deleteUsedPiece): Rewritten using STL.
  8499. * src/PeerInteraction.cc
  8500. (getNewPieceAndSendInterest): Use TorrentMan::hasMissingPiece(), which
  8501. is a little bit faster then TorrentMan::getMissingPieceIndex().
  8502. (addRequests): Updated the number of pending requests.
  8503. * src/PeerAbstractCommand.cc
  8504. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  8505. (execute): Returns true if TorrentMan::isHalt() is true.
  8506. Corrected the condition of upload limit checking.
  8507. * src/Util.h
  8508. (countBit): New function.
  8509. * src/Util.cc
  8510. (nbits): New variable.
  8511. (countBit): New function.
  8512. * src/DownloadEngine.h
  8513. (SockCmdMap): New type definition.
  8514. (waitData): Added an argument.
  8515. (addSocket): Added an argument.
  8516. (addSocketForReadCheck): Added an argument.
  8517. (addSocketForWriteCheck): Added an argument.
  8518. * src/DownloadEngine.cc
  8519. (run): Executes only commands whose sockets are ready to read or write.
  8520. All commands are executed in every 1 second.
  8521. (waitData): Calls select() again if it returned
  8522. EINTR.
  8523. (addSocket): Saves socket and command object pair to the map.
  8524. (deleteSocket): Deletes socket and command object pair from the map.
  8525. (addSocketForReadCheck): Added an argument.
  8526. (addSocketForWriteCheck): Added an argument.
  8527. * src/DownloadCommand.cc
  8528. (executeInternal): Use Util::difftvsec() instead of Util::difftv().
  8529. To send "event=stopped" to the tracker when the application finishes:
  8530. * src/PeerChokeCommand.h
  8531. (checkPoint): New variable.
  8532. * src/PeerChokeCommand.cc
  8533. (PeerChokeCommand): Added the initialization of checkPoint.
  8534. (execute): The interval check is now done by checkPoint, not
  8535. SleepCommand. Return true if TorrentMan::isHalt() is true.
  8536. * src/TorrentMan.h
  8537. (halt): New function.
  8538. (hasMissingPiece): New function.
  8539. (isHalt): New function.
  8540. (setHalt): New function.
  8541. * src/TorrentMan.cc
  8542. (TorrentMan): Added the initialization of halt.
  8543. * src/TorrentAutoSaveCommand.h
  8544. (checkPoint): New variable.
  8545. * src/PeerListenCommand.cc
  8546. (execute): Returns true if TorrentMan::isHalt() is true.
  8547. * src/main.cc
  8548. (setSignalHander): Added flags argument.
  8549. (torrentHandler): Just calls TorrentMan::setHalt(true) and returns.
  8550. (main): Set SA_ONESHOT flag of the signal hander of SIGINT and SIGTERM.
  8551. Removed printDownloadAbortMessage() after torrent downloading loop.
  8552. * src/TorrentAutoSaveCommand.cc
  8553. (TorrentAutoSaveCommand): Added the initialization of checkPoint.
  8554. (execute): Returns true if TorrentMan::isHalt() is true.
  8555. The interval check is now done by checkPoint, not SleepCommand.
  8556. * src/TrackerWatcherCommand.cc
  8557. (execute): If TorrentMan::isHalt(), then create a tracker request with
  8558. event=stopped.
  8559. * src/TrackerUpdateCommand.cc
  8560. (prepareForRetry): Do not use SleepCommand here.
  8561. (execute): Returns true if TorrentMan::isHalt() is true.
  8562. Others:
  8563. * src/TorrentMan.cc
  8564. (getMissingPieceIndex): Updated log message.
  8565. * src/PeerInteraction.cc
  8566. (createPeerMessag): Updated log message.
  8567. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8568. To add the ability to download several pieces in mix in a command and
  8569. increase the number of request slots according to request-cancel
  8570. latency:
  8571. * src/PeerInteractionCommand.cc
  8572. (executeInternal): The number of messages to be received at a time
  8573. is increased from 10 to 50.
  8574. * src/LogFactory
  8575. (getInstance): Added NullLogger.
  8576. * src/NullLogger.h: New class.
  8577. * src/BitfieldMan.h
  8578. (getMissingIndex): New function.
  8579. * src/BitfieldMan.cc
  8580. (getMissingIndex): New function.
  8581. * src/TorrentMan.h
  8582. (checkOutPiece): New function.
  8583. (getMissingPieceIndex): New function.
  8584. (getMissingFastPieceIndex): New function.
  8585. (getMissingFastPiece): New function.
  8586. * src/TorrentMan.cc
  8587. (updatePiece): Rewritten using STL.
  8588. (syncPiece): Rewritten using STL.
  8589. (getMissingPiece): Rewritten using getMissingPieceIndex() and
  8590. checkOutPiece().
  8591. (getMissingPieceIndex): New function.
  8592. (getMissingFastPieceIndex): New function.
  8593. (getMissingFastPiece): New function.
  8594. (checkOutPiece): New function.
  8595. * src/PeerInteraction.h
  8596. (Pieces): New type definition.
  8597. (piece): Removed.
  8598. (pieces): New variable.
  8599. (getNewPieceAndSendInterest): Added the "piece" argument.
  8600. (abortPiece): Added the "piece" argument.
  8601. (abortAllPieces): New function.
  8602. (isInRequestSlot): New function.
  8603. (hasDownloadPiece): Added the "index" argument.
  8604. (setDownloadPiece): Removed.
  8605. (getDownloadPiece): Added the "index" argument.
  8606. (updatePiece): New function.
  8607. (createRequestMessage): Added the "index" argument.
  8608. * src/PeerInteraction.cc
  8609. (onChoked): Rewritten.
  8610. (abortPiece): Rewirtten.
  8611. (abortAllPieces): New function.
  8612. (deleteTimeoutRequestSlot): Rewritten.
  8613. Clarified code a little bit.
  8614. (deleteCompletedRequestSlot): Rewritten.
  8615. (isInRequestSlot): New function.
  8616. (syncPiece): Rewritten.
  8617. (updatePiece): New function.
  8618. (getNewPieceAndSendInterest): Rewritten.
  8619. (addRequests): Rewritten.
  8620. (getDownloadPiece): Rewritten.
  8621. (hasDownloadPiece): Rewritten.
  8622. (createRequestMessage): Added the "index" argument.
  8623. * src/common.h
  8624. (BITFIELD_LEN_FROM_PIECES): Enclosed the variable in parentheses.
  8625. (DIV_FLOOR): New definition.
  8626. * src/PieceMessage.cc
  8627. (receivedAction): Update request-piece latency here.
  8628. * src/RequestSlot.h
  8629. (getLatencyInMillis): New function.
  8630. * src/RequestSlot.cc
  8631. (isTimeout): Rewritten using getLatencyInMillis.
  8632. (getLatencyInMillis): New function.
  8633. * src/Piece.h
  8634. (operator==): New function.
  8635. (getMissingBlockIndex): New function.
  8636. * src/Piece.cc
  8637. (operator==): New function.
  8638. (getMissingBlockIndex): New function.
  8639. * src/Peer.h
  8640. (DEFAULT_LATENCY): New definition.
  8641. (latency): New variable.
  8642. (updateLatency): New function.
  8643. (getLatency): New function.
  8644. * src/Peer.cc
  8645. (resetStatus): Reset latecy.
  8646. (updateLatency): New function.
  8647. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8648. * src/SocketCore.cc
  8649. (isReadable): Added secure to the condition.
  8650. * src/HttpConnection.cc
  8651. (receiveResponse): Fixed a bug that causes no response header
  8652. exception.
  8653. * src/Peer.h
  8654. (getFastSet): Fixed the return value type.
  8655. 2006-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8656. To remove a wait from download loop:
  8657. * src/DownloadEngine.cc
  8658. (run): Comment out shortSleep.
  8659. To rewrite the message handling:
  8660. * src/SimplePeerMessage.h: New class.
  8661. * src/SimplePeerMessage.cc: New class.
  8662. * src/CancelMessage.h: Derived from SimplePeerMessage.
  8663. (msg): New variable.
  8664. (create): New function.
  8665. (send): Removed.
  8666. (getMessage): New function.
  8667. (getMessageLength): New function.
  8668. * src/CancelMessage.cc
  8669. (create): New function.
  8670. (receivedAction): Replaced deleteRequestMessageInQueue with
  8671. rejectPieceMessageInQueue.
  8672. (send): Removed.
  8673. (getMessage): New function.
  8674. (getMessageLength): New function.
  8675. * src/BitfieldMessage.h: Derived from SimplePeerMessage.
  8676. (msg): New variable.
  8677. (msgLength): New variable.
  8678. (~BitfieldMessage): Deleted msg.
  8679. (send): Removed.
  8680. (getMessage): New function.
  8681. (getMessageLength): New function.
  8682. * src/BitfieldMessage.cc
  8683. (create): New function.
  8684. (send): Removed.
  8685. (getMessage): New function.
  8686. (getMessageLength): New function.
  8687. * src/ChokeMessage.h: Derived from SimplePeerMessage.
  8688. (msg): New variable.
  8689. (sendPredicate): New function.
  8690. (onSendComplete): New function.
  8691. (send): Removed.
  8692. (getMessage): New function.
  8693. (getMessageLength): New function.
  8694. (create): New function.
  8695. * src/ChokeMessage.cc
  8696. (create): New function.
  8697. (send): Removed.
  8698. (sendPredicate): New function.
  8699. (getMessage): New function.
  8700. (getMessageLength): New function.
  8701. (onSendComplete): New function.
  8702. * src/KeepAliveMessage.h: Derived from SimplePeerMessage.
  8703. (msg): New variable.
  8704. (send): Removed.
  8705. (getMessage): New function.
  8706. (getMessageLength): New function.
  8707. * src/KeepAliveMessage.cc
  8708. (send): Removed.
  8709. (getMessage): New function.
  8710. (getMessageLength): New function.
  8711. * src/PortMessage.h
  8712. (create): New function.
  8713. (receivedAction): Updated log message.
  8714. * src/PortMessage.cc: New file.
  8715. * src/UnchokeMessage.h: Derived from SimplePeerMessage.
  8716. (msg): New variable.
  8717. (sendPredicate): New function.
  8718. (onSendComplete): New function.
  8719. (create): New function.
  8720. (send): Removed.
  8721. (getMessage): New function.
  8722. (getMessageLength): New function.
  8723. * src/UnchokeMessage.cc
  8724. (create): New function.
  8725. (send): Removed.
  8726. (sendPredicate): New function.
  8727. (getMessage): New function.
  8728. (getMessageLength): New function.
  8729. (onSendComplete): New function.
  8730. * src/PieceMessage.h
  8731. (leftPieceDataLength): Removed.
  8732. (leftDataLength): New variable.
  8733. (headerSend): New variable.
  8734. (pendingCount): New variable.
  8735. (msgHeader): New variable.
  8736. (sendPieceData): New function.
  8737. (incrementPendingCount): New function.
  8738. (isPendingCountMax): New function.
  8739. (create): New function.
  8740. (getMessageHeader): New function.
  8741. (getMessageHeaderLength): New function.
  8742. * src/PieceMessage.cc
  8743. (create): New function.
  8744. (getMessageHeader): New function.
  8745. (getMessageHeaderLength): New function.
  8746. (send): Rewritten.
  8747. (sendPieceData): New function.
  8748. * src/HaveMessage.h: Derived from SimplePeerMessage.
  8749. (msg): New variable.
  8750. (create): New function.
  8751. (getMessage): New function.
  8752. (getMessageLength): New function.
  8753. * src/HaveMessage.cc
  8754. (create): New function.
  8755. (send): Removed.
  8756. (sendPieceData): New function.
  8757. (getMessage): New function.
  8758. (getMessageLength): New function.
  8759. * src/RequestMessage.h: Derived from SimplePeerMessage.
  8760. (msg): New variable.
  8761. (create): New function.
  8762. (send): Removed.
  8763. (getMessage): New function.
  8764. (getMessageLength): New function.
  8765. * src/RequestMessage.cc
  8766. (create): New function.
  8767. (receivedAction): Added the handling of fast extension.
  8768. Deleted torrentMan->addUploadLength, torrentMan->addDeltaUploadLength.
  8769. (send): Removed.
  8770. (getMessage): New function.
  8771. (getMessageLength): New function.
  8772. * src/InterestedMessage.h: Derived from SimplePeerMessage.
  8773. (msg): New variable.
  8774. (sendPredicate): New function.
  8775. (onSendComplete): New function.
  8776. (create): New function.
  8777. (getMessage): New function.
  8778. (getMessageLength): New function.
  8779. * src/InterestedMessage.cc
  8780. (create): New function.
  8781. (send): Removed.
  8782. (sendPieceData): New function.
  8783. (getMessage): New function.
  8784. (getMessageLength): New function.
  8785. (onSendComplete): New function.
  8786. * src/NotInterestedMessage.h: Derived from SimplePeerMessage.
  8787. (msg): New variable.
  8788. (sendPieceData): New function.
  8789. (onSendComplete): New function.
  8790. (create): New function.
  8791. (send): Removed.
  8792. (getMessage): New function.
  8793. (getMessageLength): New function.
  8794. * src/NotInterestedMessage.cc
  8795. (create): New function.
  8796. (send): Removed.
  8797. (sendPredicate): New function.
  8798. (getMessage): New function.
  8799. (getMessageLength): New function.
  8800. (onSendComplete): New function.
  8801. * src/AllowedFastMessage.h: New class.
  8802. * src/AllowedFastMessage.cc: New class.
  8803. * src/RejectMessage.h: New class.
  8804. * src/RejectMessage.cc: New class.
  8805. * src/SuggestPieceMessage.h: New class.
  8806. * src/SuggestPieceMessage.cc: New class.
  8807. * src/HaveAllMessage.h: New class.
  8808. * src/HaveAllMessage.cc: New class.
  8809. * src/HaveNoneMessage.h: New class.
  8810. * src/HaveNoneMessage.cc: New class.
  8811. * src/HandshakeMessage.h: Derived from SimplePeerMessage.
  8812. (msg): New variable.
  8813. (reserved): New variable.
  8814. (create): New function.
  8815. (getId): New function.
  8816. (receivedAction): New function.
  8817. (getMessage): New function.
  8818. (getMessageLength): New function.
  8819. (isFastExtensionSupported): New function.
  8820. * src/HandshakeMessage.cc
  8821. (HandshakeMessage): Moved here from HandshakeMessage.h.
  8822. (create): New function.
  8823. (getMessage): New function.
  8824. (getMessageLength): New function.
  8825. (toString): Added the output of reserved field.
  8826. (check): Added const qualifier.
  8827. (isFastExtensionSupported): New function.
  8828. * src/PeerMessageUtil.h
  8829. (createChokeMessage): Removed.
  8830. (createUnchokeMessage): Removed.
  8831. (createInterestedMessage): Removed.
  8832. (createNotInterestedMessage): Removed.
  8833. (createHaveMessage): Removed.
  8834. (createBitfieldMessage): Removed.
  8835. (createRequestMessage): Removed.
  8836. (createCancelMessage): Removed.
  8837. (createPieceMessage): Removed.
  8838. (createPortMessage): Removed.
  8839. (createChokeMessage): Removed.
  8840. (createUnchokeMessage): Removed.
  8841. (createInterestedMessage): Removed.
  8842. (createNotInterestedMessage): Removed.
  8843. (createHaveMessage): Removed.
  8844. (createBitfieldMessage): Removed.
  8845. (createRequestMessage): Removed.
  8846. (createCancelMessage): Removed.
  8847. (createPieceMessage): Removed.
  8848. (createKeepAliveMessage): Removed.
  8849. (createHandshakeMessage): Removed.
  8850. (setIntParam): New function.
  8851. (createPeerMessageString): New function.
  8852. * src/PeerMessageUtil.cc
  8853. (createChokeMessage): Removed.
  8854. (createUnchokeMessage): Removed.
  8855. (createInterestedMessage): Removed.
  8856. (createNotInterestedMessage): Removed.
  8857. (createHaveMessage): Removed.
  8858. (createBitfieldMessage): Removed.
  8859. (createRequestMessage): Removed.
  8860. (createCancelMessage): Removed.
  8861. (createPieceMessage): Removed.
  8862. (createPortMessage): Removed.
  8863. (createRequestMessage): Removed.
  8864. (createCancelMessage): Removed.
  8865. (createPieceMessage): Removed.
  8866. (createHaveMessage): Removed.
  8867. (createChokeMessage): Removed.
  8868. (createUnchokeMessage): Removed.
  8869. (createInterestedMessage): Removed.
  8870. (createNotInterestedMessage): Removed.
  8871. (createBitfieldMessage): Removed.
  8872. (createKeepAliveMessage): Removed.
  8873. (createHandshakeMessage): Removed.
  8874. (setIntParam): New function.
  8875. (createPeerMessageString): New function.
  8876. * src/PeerConnection.h
  8877. (peer): Removed.
  8878. (torrentMan): Removed.
  8879. (createNLengthMessage): Removed.
  8880. (setIntParam): Removed.
  8881. (writeOutgoingMessageLog): Removed all overloaded functions.
  8882. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8883. (sendMessage): New function.
  8884. (sendHandshake): Removed.
  8885. (sendKeepAlive): Removed.
  8886. (sendChoke): Removed.
  8887. (sendUnchoke): Removed.
  8888. (sendInterested): Removed.
  8889. (sendNotInterested): Removed.
  8890. (sendHave): Removed.
  8891. (sendBitfield): Removed.
  8892. (sendRequest): Removed.
  8893. (sendPiece): Removed.
  8894. (sendPieceHeader): Removed.
  8895. (sendPieceData): Removed.
  8896. (sendCancel): Removed.
  8897. (getPeer): Removed.
  8898. * src/PeerConnection.cc
  8899. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8900. (sendHandshake): Removed.
  8901. (sendKeepAlive): Removed.
  8902. (createNLengthMessage): Removed.
  8903. (setIntParam): Removed.
  8904. (writeOutgoingMessageLog): Removed all overloaded functions.
  8905. (sendChoke): Removed.
  8906. (sendUnchoke): Removed.
  8907. (sendInterested): Removed.
  8908. (sendNotInterested): Removed.
  8909. (sendHave): Removed.
  8910. (sendBitfield): Removed.
  8911. (sendRequest): Removed.
  8912. (sendPiece): Removed.
  8913. (sendPieceHeader): Removed.
  8914. (sendPieceData): Removed.
  8915. (sendMessage): New function.
  8916. (sendCancel): Removed.
  8917. * src/PeerInteractionCommand.cc
  8918. (PeerInteractionCommand): Call setUploadLimit.
  8919. (executeInternal): Call setUploadLimit.
  8920. Added the handling of "inProgress" state of handshake message.
  8921. Call sendBitfield() or sendAllowdFast() instead of deprecated
  8922. sendNow().
  8923. (keepAlive): Call addMessage and sendMessage instead of deprecated
  8924. sendNow().
  8925. (beforeSocketCheck): Call addMessage instead of deprecated trySendNow()
  8926. * src/TorrentMan.h
  8927. (PEER_ID_LENGTH): New definition.
  8928. (hasAllPieces): New function.
  8929. * src/TorrentMan.cc
  8930. (getMissingPiece): Added the handling of fast extension.
  8931. (cancelPiece): Call updatePiece().
  8932. (hasAllPieces): New function.
  8933. * src/PeerInteraction.h
  8934. (fastSet): New variable.
  8935. (getNewPieceAndSendInterest): Changed the return type to void.
  8936. (send): Renamed as sendMessages.
  8937. (deleteAllRequestSlot): Removed.
  8938. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8939. (cancelAllRequest): Removed all overloaded functions.
  8940. (deleteAllRequestSlot): Removed.
  8941. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8942. (rejectPieceMessageInQueue): New function.
  8943. (rejectAllPieceMessageInQueue): New function.
  8944. (onChoked): New function.
  8945. (isSendingMessageInProgress): New function.
  8946. (getCorrespondingRequestSlot): Changed its arguments.
  8947. (isInFastSet): New function.
  8948. (addFastSetIndex): New function.
  8949. (addRequests): New function.
  8950. (sendNow): Removed.
  8951. (trySendNow): Removed.
  8952. (sendBitfield): New function.
  8953. (sendAllowdFast): New function.
  8954. (createHaveAllMessage): New function.
  8955. (createHaveNoneMessage): New function.
  8956. (createRejectMessage): New function.
  8957. (createAllowedFastMessage): New function.
  8958. * src/PeerInteraction.cc
  8959. (send): Renamed as sendMessages.
  8960. (sendMessages): New function.
  8961. (MsgPushBack): New class.
  8962. (isSendingMessageInProgress): New function.
  8963. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8964. (rejectAllPieceMessageInQueue): New function.
  8965. Added the handling of fast extension.
  8966. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8967. (rejectPieceMessageInQueue): New function.
  8968. Added the handling of fast extension.
  8969. (deleteRequestSlot): Replaced for loop with std::find.
  8970. (onChoked): New function.
  8971. (deleteAllRequestSlot): Removed.
  8972. (abortPiece): Rewirtten.
  8973. (deleteTimeoutRequestSlot): Updated log messages.
  8974. (getCorrespondingRequestSlot): Changed its arguments.
  8975. (cancelAllRequest): Removed all overloaded functions.
  8976. (receiveHandshake): Added the check to see whether an incoming peer
  8977. supports fast extension.
  8978. (createHandshakeMessage): Use HandshakeMessage::create instead of
  8979. PeerMessageUtil.
  8980. (createPeerMessage): Use create() of each message class instead of
  8981. PeerMessageUtil.
  8982. HaveAllMessage, HaveNoneMessage, RejectMessage, SuggestPieceMessage,
  8983. AllowedFastMessage were added.
  8984. (getNewPieceAndSendInterest): Changed its return value type to void.
  8985. Added the handling of fast extension.
  8986. (addRequests): New function.
  8987. (sendNow): Removed.
  8988. (sendHandshake): Rewritten.
  8989. (trySendNow): Removed.
  8990. (sendBitfield): New function.
  8991. (sendAllowdFast): New function.
  8992. (isInFastSet): New function.
  8993. (addFastSetIndex): New function.
  8994. (createRequestMessage): Use RequestMessage::create instead of
  8995. PeerMessageUtil.
  8996. (createCancelMessage): Use CancelMessage::create instead of
  8997. PeerMessageUtil.
  8998. (createPieceMessage): Use PieceMessage::create instead of
  8999. PeerMessageUtil.
  9000. (createHaveMessage): Use HaveMessage::create instead of
  9001. PeerMessageUtil.
  9002. (createChokeMessage): Use ChokeMessage::create instead of
  9003. PeerMessageUtil.
  9004. (createUnchokeMessage): Use UnchokeMessage::create instead of
  9005. PeerMessageUtil.
  9006. (createInterestedMessage): Use InterestedMessage::create instead of
  9007. PeerMessageUtil.
  9008. (createNotInterestedMessage): Use NotInterestedMessage::create instead
  9009. of PeerMessageUtil.
  9010. (createBitfieldMessage): Use BitfieldMessage::create instead of
  9011. PeerMessageUtil.
  9012. (createKeepAliveMessage): Use KeepAliveMessage::create instead of
  9013. PeerMessageUtil.
  9014. (createHaveAllMessage): New function.
  9015. (createHaveNoneMessage): New function.
  9016. (createRejectMessage): New function.
  9017. (createAllowedFastMessage: New function.
  9018. * src/Util.h
  9019. (sha1Sum): New function.
  9020. (computeFastSet): New function.
  9021. * src/Util.cc
  9022. (sha1Sum): New function.
  9023. (computeFastSet): New function.
  9024. * src/Peer.h
  9025. (fastExtensionEnabled): New variable.
  9026. (fastSet): New variable.
  9027. (setAllBitfield): New function.
  9028. (setFastExtensionEnabled): New function.
  9029. (isFastExtensionEnabled): New function.
  9030. (addFastSetIndex): New function.
  9031. (getFastSet): New function.
  9032. (isInFastSet): New function.
  9033. (countFastSet): New function.
  9034. * src/Peer.cc
  9035. (isInFastSet): New function.
  9036. (addFastSetIndex): New function.
  9037. (setAllBitfield): New function.
  9038. * src/AbstractCommand.cc (execute): Changed the procedure of checking
  9039. sockets.
  9040. * src/PeerAbstractCommand.cc
  9041. (PeerAbstractCommand): Added the initialization for uploadLimitCheck
  9042. and uploadLimit.
  9043. (execute): Changed the procedure of checking sockets. The upload speed
  9044. checking were added.
  9045. (setUploadLimit): New function.
  9046. (setUploadLimitCheck): New function.
  9047. * src/PeerAbstractCommand.h
  9048. (setUploadLimit): New function.
  9049. (setUploadLimitCheck): New function.
  9050. (uploadLimit): New variable.
  9051. (uploadLimitCheck): New variable.
  9052. To contact a tracker regularly:
  9053. * src/TrackerWatcherCommand.h (interval): New variable.
  9054. (checkPoint): New variable.
  9055. (TrackerWatcherCommand): Added interval argument.
  9056. * src/TrackerWatcherCommand.cc
  9057. (TrackerWatcherCommand): Initialized checkPoint.
  9058. (execute): Now a tracker is contacted in every specified period.
  9059. If peer list is not needed, send request with numwant=0.
  9060. * src/TrackerUpdateCommand.cc
  9061. (execute): Updated log messages.
  9062. * src/DownloadEngine.cc
  9063. (~DownloadEngine): Removed two asserts.
  9064. (waitData): Uncommented wfds. May be a bug fix.
  9065. 2006-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9066. * src/PeerInteractionCommand.h
  9067. (checkInactiveConnection): Removed.
  9068. * src/PeerInteractionCommand.cc
  9069. (executeInternal): Removed following function calls:
  9070. detectMessageFlooding(), checkLongTimePeerChoking and
  9071. checkInactiveConnection().
  9072. (checkInactiveConnection): Removed.
  9073. (detectMessageFlooding): Removed function call to
  9074. checkInactiveConnection().
  9075. * src/PeerMessageUtil.h
  9076. (createChokeMessage): New function. Overload.
  9077. (createUnchokeMessage): New function. Overload.
  9078. (createInterestedMessage): New function. Overload.
  9079. (createNotInterestedMessage): New function. Overload.
  9080. (createHaveMessage): New function. Overload.
  9081. (createBitfieldMessage): New function. Overload.
  9082. (createRequestMessage): New function. Overload.
  9083. (createCancelMessage): New function. Overload.
  9084. (createPieceMessage): New function. Overload.
  9085. (createKeepAliveMessage): New function. Overload.
  9086. * src/PeerMessageUtil.cc
  9087. (createChokeMessage): New function. Overload.
  9088. (createUnchokeMessage): New function. Overload.
  9089. (createInterestedMessage): New function. Overload.
  9090. (createNotInterestedMessage): New function. Overload.
  9091. (createHaveMessage): New function. Overload.
  9092. (createBitfieldMessage): New function. Overload.
  9093. (createRequestMessage): New function. Overload.
  9094. (createCancelMessage): New function. Overload.
  9095. (createPieceMessage): New function. Overload.
  9096. (createKeepAliveMessage): New function. Overload.
  9097. * src/SendMessageQueue.cc
  9098. (createRequestMessage): Use PeerMessageUtil.
  9099. (createCancelMessage): Use PeerMessageUtil.
  9100. (createPieceMessage): Use PeerMessageUtil.
  9101. (createHaveMessage): Use PeerMessageUtil.
  9102. (createChokeMessage): Use PeerMessageUtil.
  9103. (createUnchokeMessage): Use PeerMessageUtil.
  9104. (createInterestedMessage): Use PeerMessageUtil.
  9105. (createNotInterestedMessage): Use PeerMessageUtil.
  9106. (createBitfieldMessage): Use PeerMessageUtil.
  9107. (createKeepAliveMessage): Use PeerMessageUtil.
  9108. * src/SendMessageQueue.h: Renamed to PeerInteraction.h
  9109. * src/SendMessageQueue.cc: Renamed to PeerInteraction.cc
  9110. * src/PeerInteraction.h: New class.
  9111. * src/PeerInteraction.cc: New class.
  9112. 2006-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9113. Each peer message has its own class.
  9114. * src/PendingMessages.h: Removed.
  9115. * src/PendingMessages.cc: Removed. The sending process was moved to
  9116. each message class.
  9117. * src/RequestSlotMan.h: Removed.
  9118. * src/RequestSlotMan.cc: Removed. All functionarities were moved to
  9119. SendMessageQueue.
  9120. * src/RequestMessage.h: New class.
  9121. * src/RequestMessage.cc: New class.
  9122. * src/CancelMessage.h: New class.
  9123. * src/CancelMessage.cc: New class.
  9124. * src/BitfieldMessage.h: New class.
  9125. * src/BitfieldMessage.cc: New class.
  9126. * src/ChokeMessage.h: New class.
  9127. * src/ChokeMessage.cc: New class.
  9128. * src/KeepAliveMessage.h: New class.
  9129. * src/KeepAliveMessage.cc: New class.
  9130. * src/PortMessage.h: New class.
  9131. * src/UnchokeMessage.h: New class.
  9132. * src/UnchokeMessage.cc: New class.
  9133. * src/PieceMessage.h: New class.
  9134. * src/PieceMessage.cc: New class.
  9135. * src/HaveMessage.h: New class.
  9136. * src/HaveMessage.cc: New class.
  9137. * src/BitfieldMessage.h: New class.
  9138. * src/BitfieldMessage.cc: New class.
  9139. * src/NotInterestedMessage.h: New class.
  9140. * src/NotInterestedMessage.cc: New class.
  9141. * src/InterestedMessage.h: New class.
  9142. * src/InterestedMessage.cc: New class.
  9143. * src/HandshakeMessage.h (sendMessageQueue): New variable.
  9144. (getSendMessageQueue): New function.
  9145. (setSendMessageQueue): New function.
  9146. * src/HandshakeMessage.cc: New class.
  9147. * src/PeerConnection.h (receiveMessage): Changed return value and
  9148. arguments.
  9149. (receiveHandshake): Changed return value and arguments.
  9150. * src/PeerConnection.cc (receiveMessage): Do not create message class
  9151. here.
  9152. (receiveHandshake): Do not create handshake class here.
  9153. * src/PeerInteractionCommand.h (peerConnection): Removed.
  9154. (piece): Removed.
  9155. (syncPiece): Removed.
  9156. (sendInterest): Removed.
  9157. (sendMessages): Removed.
  9158. (createRequestPendingMessage): Removed.
  9159. (checkPieceHash): Removed.
  9160. (erasePieceOnDisk): Removed.
  9161. (getNewPieceAndSendInterest): Removed.
  9162. (onGotNewPice): Removed.
  9163. (onGotWrongPiece): Removed.
  9164. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  9165. Removed peerConnection, piece.
  9166. (~PeerInteractionCommand): Removed peerConnection.
  9167. (executeInternal): Use sendMessageQueue instead of peerConnection.
  9168. (syncPiece): Moved to SendMessageQueue.
  9169. (decideChoking): Removed PendingMessage.
  9170. (receiveMessage): Use sendMessageQueue instead of peerConnection.
  9171. The action after receiving peer message was moved to each message
  9172. class.
  9173. (onGotNewPice): Moved to SendMessageQueue.
  9174. (onGotWrongPiece): Moved to SendMessageQueue.
  9175. (getNewPieceAndSendInterest): Moved to SendMessageQueue.
  9176. (sendInterest): Moved to SendMessageQueue.
  9177. (createRequestPendingMessage): Removed.
  9178. (sendMessages): Moved to SendMessageQueue.
  9179. (onAbort): Use SendMessageQueue::abortPiece()
  9180. (keepAlive): Use sendMessageQueue instead of peerConnection.
  9181. (beforeSocketCheck): Use sendMessageQueue instead of peerConnection.
  9182. (checkPieceHash): Moved to SendMessageQueue.
  9183. (erasePieceOnDisk): Moved to SendMessageQueue.
  9184. * src/PeerMessageUtil.h
  9185. (createBitfieldMessage): Removed.
  9186. (createHaveMessage): Changed return value and arguments.
  9187. (createBitfieldMessage): Changed return value and arguments.
  9188. (createRequestCancelMessage): Removed.
  9189. (createPieceMessage): Changed return value and arguments.
  9190. (getShortIntParam): New function.
  9191. (checkIndex): Changed arguments.
  9192. (checkBegin): Changed arguments.
  9193. (checkLength): Changed arguments.
  9194. (checkPieceOffset): Removed.
  9195. (checkRange): New function.
  9196. (checkBitfield): Changed arguments.
  9197. (createPeerMessage): Removed.
  9198. (checkIntegrity): Removed.
  9199. (createHandshakeMessage): Changed arguments.
  9200. (createChokeMessage): New function.
  9201. (createUnchokeMessage): New function.
  9202. (createInterestedMessage): New function.
  9203. (createNotInterestedMessage): New function.
  9204. (createRequestMessage): New function.
  9205. (createCancelMessage): New function.
  9206. (createPortMessage): New function.
  9207. * src/PeerMessageUtil.cc
  9208. (createBitfieldMessage): Removed.
  9209. (createHaveMessage): Changed return value and arguments.
  9210. (createBitfieldMessage): Changed return value and arguments.
  9211. (createRequestCancelMessage): Removed.
  9212. (createPieceMessage): Changed return value and arguments.
  9213. (getShortIntParam): New function.
  9214. (checkIndex): Changed arguments.
  9215. (checkBegin): Changed arguments.
  9216. (checkLength): Changed arguments.
  9217. (checkPieceOffset): Removed.
  9218. (checkRange): New function.
  9219. (checkBitfield): Changed arguments.
  9220. (createPeerMessage): Removed.
  9221. (checkIntegrity): Removed.
  9222. (createHandshakeMessage): Changed arguments.
  9223. (createChokeMessage): New function.
  9224. (createUnchokeMessage): New function.
  9225. (createInterestedMessage): New function.
  9226. (createNotInterestedMessage): New function.
  9227. (createRequestMessage): New function.
  9228. (createCancelMessage): New function.
  9229. (createPortMessage): New function.
  9230. * src/PeerMessage.h
  9231. (id): Removed.
  9232. (index): Removed.
  9233. (begin): Removed.
  9234. (length): Removed.
  9235. (bitfield): Removed.
  9236. (bitfieldLength): Removed.
  9237. (block): Removed.
  9238. (blockLength): Removed.
  9239. (inProgress): New variable.
  9240. (cuid): New variable.
  9241. (peer): New variable.
  9242. (sendMessageQueue): New variable.
  9243. (logger): New variable.
  9244. (setBitfield): Removed.
  9245. (getBitfield): Removed.
  9246. (setBlock): Removed.
  9247. (getBlock): Removed.
  9248. (getBitfieldLength): Removed.
  9249. (getBlockLength): Removed.
  9250. (isInProgress): New function.
  9251. (toString): Made pure virtual.
  9252. (check): New function.
  9253. (send): New function.
  9254. (receivedAction): New function.
  9255. (getId): Made pure virtual.
  9256. (setId): Removed.
  9257. (getIndex): Removed.
  9258. (setIndex): Removed.
  9259. (getBegin): Removed.
  9260. (setBegin): Removed.
  9261. (getLength): Removed.
  9262. (setLength): Removed.
  9263. (getCuid): New function.
  9264. (setCuid): New function.
  9265. (getPeer): New function.
  9266. (setPeer): New function.
  9267. (getSendMessageQueue): New function.
  9268. (setSendMessageQueue): New function.
  9269. (ID): Removed.
  9270. * src/PeerMessage.cc
  9271. (setBitfield): Removed.
  9272. (setBlock): Removed.
  9273. (toString): Removed.
  9274. * src/TorrentMan.h
  9275. (getPieceLength): New function.
  9276. (getPieceLength): New function.
  9277. * src/SendMessageQueue.h
  9278. (REQUEST_TIME_OUT): New definition.
  9279. (RequestSlots): New definition.
  9280. (MessageQueue): New definition.
  9281. (requestSlotMan): Removed.
  9282. (pendingMessages): Removed.
  9283. (requestSlots): New variable.
  9284. (messageQueue): New variable.
  9285. (torrentMan): New variable.
  9286. (peerConnection): New variable.
  9287. (peer): New variable.
  9288. (piece): New variable.
  9289. (getNewPieceAndSendInterest): New function.
  9290. (createPeerMessage): New function.
  9291. (createHandshakeMessage): New function.
  9292. (send): Made private.
  9293. (setPeerMessageCommonProperty): New function.
  9294. (deleteAllRequestSlot): New function.
  9295. (deleteRequestMessageInQueue): New function.
  9296. (cancelAllRequest): Made private.
  9297. (cancelAllRequest): Made private.
  9298. (countRequestSlot): Made private.
  9299. (addPendingMessage): Removed.
  9300. (deletePendingPieceMessage): Removed.
  9301. (deletePendingRequestMessage): Removed.
  9302. (addMessage): New function.
  9303. (deletePieceMessageInQueue): New function.
  9304. (deleteTimeoutRequestSlot): Changed argument.
  9305. (deleteCompletedRequestSlot): Changed argument.
  9306. (getCorrespoindingRequestSlot): Renamed to getCorrespondingRequestSlot.
  9307. (getCorrespondingRequestSlot): New function.
  9308. (countPendingMessage): Removed.
  9309. (countMessageInQueue): New function.
  9310. (getTorrentMan): New function.
  9311. (getPeerConnection): New function.
  9312. (hasDownloadPiece): New function.
  9313. (getDownloadPiece): New function.
  9314. (setDownloadPiece): New function.
  9315. (syncPiece): New function.
  9316. (sendMessages): New function.
  9317. (sendNow): New function.
  9318. (trySendNow): New function.
  9319. (abortPiece): New function.
  9320. (sendHandshake): New function.
  9321. (receiveMessage): New function.
  9322. (receiveHandshake): New function.
  9323. (createRequestMessage): New function.
  9324. (createCancelMessage): New function.
  9325. (createPieceMessage): New function.
  9326. (createHaveMessage): New function.
  9327. (createChokeMessage): New function.
  9328. (createUnchokeMessage): New function.
  9329. (createInterestedMessage): New function.
  9330. (createNotInterestedMessage): New function.
  9331. (createBitfieldMessage): New function.
  9332. (createKeepAliveMessage): New function.
  9333. * src/SendMessageQueue.cc
  9334. (SendMessageQueue): Removed requestSlotMan.
  9335. Instantiated peerConnection here.
  9336. (~SendMessageQueue): Removed requestSlotMan.
  9337. Added deletion of peerConnection and the contents of messageQueue.
  9338. (send): Updated according to the change of messageQueue.
  9339. (addPendingMessage): Renamed to addMessage.
  9340. (addMessage): New function.
  9341. (deletePendingPieceMessage): Renamed to deletePieceMessageInQueue.
  9342. (deletePieceMessageInQueue): New function.
  9343. (deletePendingRequestMessage): Renamed to deleteRequestMessageInQueue.
  9344. (deleteRequestMessageInQueue): New function.
  9345. (deleteRequestSlot): RequestSlotMan::deleteRequestSlot(...) was moved
  9346. here.
  9347. (deleteTimeoutRequestSlot): RequestSlotMan::deleteTimeoutRequestSlot
  9348. (...) was moved here.
  9349. (deleteAllRequestSlot): RequestSlotMan::deleteAllRequestSlot(...) was
  9350. moved here.
  9351. (deleteCompletedRequestSlot):
  9352. RequestSlotMan::deleteCompletedRequestSlot(...) was moved here.
  9353. (getCorrespondingRequestSlot):
  9354. RequestSlotMan::getCorrespoindingRequestSlot(...) was moved here.
  9355. And renamed to getCorrespondingRequestSlot, correcting a typo.
  9356. (countPendingMessage): Renamed to countMessageInQueue.
  9357. (countMessageInQueue): New function.
  9358. (countRequestSlot): RequestSlotMan::countRequestSlot() was moved here.
  9359. (receiveHandshake): New function.
  9360. (createHandshakeMessage): New function.
  9361. (receiveMessage): New function.
  9362. (createPeerMessage): New function.
  9363. (syncPiece): New function.
  9364. (getNewPieceAndSendInterest): New function.
  9365. (sendMessages): New function.
  9366. (sendNow): New function.
  9367. (trySendNow): New function.
  9368. (sendHandshake): New function.
  9369. (abortPiece): New function.
  9370. (getDownloadPiece): New function.
  9371. (getPeerMessageCommonProperty): New function.
  9372. (createRequestMessage): New function.
  9373. (createCancelMessage): New function.
  9374. (createPieceMessage): New function.
  9375. (createHaveMessage): New function.
  9376. (createChokeMessage): New function.
  9377. (createUnchokeMessage): New function.
  9378. (createInterestedMessage): New function.
  9379. (createNotInterestedMessage): New function.
  9380. (createBitfieldMessage): New function.
  9381. (createKeepAliveMessage): New function.
  9382. To add simple Content-Disposition support:
  9383. * src/HttpResponseCommand.h (determinFilename): New function.
  9384. * src/HttpResponseCommand.cc (executeInternal):
  9385. Use determinFilename(headers) instead of req->getFile() when comparing
  9386. filename.
  9387. (determinFilename): New function.
  9388. (handleDefaultEncoding): Use determinFilename(headers) instead of
  9389. req->getFile().
  9390. (handleOtherEncoding): Use determinFilename(headers) instead of
  9391. req->getFile().
  9392. * src/Util.h (getContentDispositionFilename): New function.
  9393. * src/Util.cc (getContentDispositionFilename): New function.
  9394. * src/LogFactory.h (release): New function.
  9395. * src/LogFactory.cc (release): New function.
  9396. To fix a bug that causes out-of-bound exception when HTTP status
  9397. line is wrong:
  9398. * src/HttpConnection.cc (receiveResponse): Added a check for header
  9399. size.
  9400. * src/common.h (Deleter): New class.
  9401. * src/SegmentMan.cc
  9402. (~SegmentMan): Added deletion of splitter and diskWriter.
  9403. * src/DownloadEngine.h
  9404. (Commands): Use deque.
  9405. (clearQueue): New function.
  9406. * src/DownloadEngine.cc
  9407. (~DownloadEngine): Added deletion of segmentMan.
  9408. (cleanQueue): New function.
  9409. * src/TorrentDownloadEngine.h
  9410. (TorrentDownloadEngine): The implementation was moved to
  9411. TorrentDownloadEngine.cc.
  9412. (~TorrentDownloadEngine): The implementation was moved to
  9413. TorrentDownloadEngine.cc.
  9414. * src/TorrentDownloadEngine.cc
  9415. (~TorrentDownloadEngine): Added deletion of torrentMan.
  9416. * src/main.cc
  9417. (clearRequest): Removed.
  9418. (handler): Added deletion of e.
  9419. (torrentHandler): Added deletion of te.
  9420. (main): Do not share splitter.
  9421. Use Deleter instead of clearRequest.
  9422. Deletion of classes were updated.
  9423. 2006-05-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9424. * src/main.cc (main): Fixed typo.
  9425. * src/message.h: Fixed typo.
  9426. * po/de.po: Added German translation, thanks to Hermann J. Beckers.
  9427. 2006-04-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9428. To add --select-file command-line option:
  9429. * src/Util.cc
  9430. (unfoldRange): New function.
  9431. (getNum): New function.
  9432. (unfoldSubRange): New function
  9433. * src/main.cc
  9434. (showUsage): Added help message.
  9435. (main): Added --select-file command-line option. Updated the layout of
  9436. file listing.
  9437. * src/common.h
  9438. (Integers): New definition.
  9439. * src/SocketCore.cc
  9440. (writeData): Removed timeout argument.
  9441. (readData): Removed timeout argument.
  9442. (peekData): Removed timeout argument.
  9443. * src/Socket.cc
  9444. (writeData): Removed timeout argument.
  9445. (readData): Removed timeout argument.
  9446. (peekData): Removed timeout argument.
  9447. * Release 0.4.1
  9448. 2006-04-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9449. To deploy upload rate based choking algorithm:
  9450. * src/PeerInteractionCommand.cc
  9451. (PeerInteractionCommand): Add peer to TorrentMan::activePeers to track
  9452. peer currently used.
  9453. (decideChoking): Deleted the choke/unchoke decision algorithm when
  9454. download completes. Simplified.
  9455. (receiveMessage): Updated.
  9456. * src/TorrentMan.h
  9457. (activePeers): New variable.
  9458. (addActivePeer): New function.
  9459. (getActivePeers): New function.
  9460. (deleteActivePeer): New function.
  9461. * src/TorrentMan.cc
  9462. (addPeer): deleteOldErrorPeers is moved to the begining of the function
  9463. * src/PeerAbstractCommand.cc
  9464. (onAbort): Use peer->resetStatus().
  9465. * src/main.cc
  9466. (PeerChokeCommand.h): Included.
  9467. (main): Added the instance of ChokingCommand to the command queue.
  9468. * src/Peer.h
  9469. (amChoking): Renamed from amChocking
  9470. (chokingRequired): New variable.
  9471. (optUnchoking): New variable.
  9472. (deltaUpload): New variable.
  9473. (deltaDownload): New variable.
  9474. (addDeltaUpload): New function.
  9475. (resetDeltaUpload): New function.
  9476. (addDeltaDownload): New function.
  9477. (resetDeltaDownload): New function.
  9478. (addPeerUpload): Added a call to addDeltaUpload.
  9479. (addPeerDownload): Added a call to addDeltaDownload.
  9480. * src/Peer.cc
  9481. (shouldBeChoking): Renamed from shouldChoke.
  9482. (resetStatus): New function.
  9483. * src/PeerChokeCommand.h: New class.
  9484. * src/PeerChokeCommand.cc: New class.
  9485. To add lazy upload speed limiter:
  9486. * src/TorrentConsoleDownloadEngine.h: Moved the variables for
  9487. statistics calculation to TorrentDownloadEngine.
  9488. * src/TorrentConsoleDownloadEngine.cc
  9489. (sendStatistics): Renamed from printStatistics.
  9490. (initStatistics): Removed. Moved to TorrentDownloadEngine.
  9491. (calculateSpeed): Removed. Moved to TorrentDownloadEngine.
  9492. (calculateStatistics): Removed. Moved to TorrentDownloadEngine.
  9493. * src/TorrentDownloadEngine.h: Added the variables for statistics
  9494. calculation.
  9495. (sendStatistics): New function as pure virtual function.
  9496. (getUploadSpeed): New function.
  9497. * src/TorrentDownloadEngine.cc
  9498. (initStatistics): New function.
  9499. (calculateSpeed): New function.
  9500. (calculateStatistics): New function.
  9501. * src/SendMessageQueue.h
  9502. (uploadLength): New variable.
  9503. (send): Added an argument.
  9504. (setUploadLimit): New function.
  9505. (getUploadLimit): New function.
  9506. * src/SendMessageQueue.cc
  9507. (send): Added upload speed limiter.
  9508. * src/prefs.h
  9509. (PREF_UPLOAD_LIMIT): New definition.
  9510. * src/PeerInteractionCommand.cc
  9511. (PeerInteractionCommand): Set upload speed limit to sendMessageQueue.
  9512. * src/main.cc
  9513. (main): Added --upload-limit option
  9514. For bug fixes:
  9515. * src/main.cc
  9516. (showUsage): Corrected --listen-port help
  9517. Other changes:
  9518. * src/TorrentMan.cc
  9519. (getPeer): Return nullPeer if connection is grather than
  9520. MAX_PEER_UPDATE(15) in order to leave space for incoming peers.
  9521. 2006-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9522. To add some useful information to the exception message:
  9523. * src/SocketCore.cc : Updated messages.
  9524. * src/SegmentMan.cc :
  9525. * src/TorrentMan.cc : Updated messages.
  9526. * src/MultiDiskWriter.cc : Updated messages.
  9527. * src/Util.cc : Updated messages.
  9528. * src/AbstractDiskWriter.cc : Updated messages.
  9529. * src/PreAllocationDiskWriter.cc : Updated messages.
  9530. * src/message.cc : Added new messages. Updated some messages.
  9531. * src/TrackerWatcherCommand.h (MIN_PEERS): New definition.
  9532. * src/TrackerWatcherCommand.cc (execute): Use MIN_PEERS.
  9533. Updated threshold from 30 to 15.
  9534. * src/AbstractDiskWriter.h (filename): New variable.
  9535. * src/AbstractDiskWriter.cc (openExistingFile): Assigned filename.
  9536. (createFile): Assigned filename.
  9537. * src/main.cc: Updated the help message for http-auth-scheme.
  9538. * Release 0.4.0
  9539. 2006-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9540. To add TrackerUpdateCommand with which replaces
  9541. CompactTrackerResponseProcessor:
  9542. * src/TrackerWatcherCommand.h (req): Removed.
  9543. * src/TrackerWatcherCommand.cc (execute): Send a request to tracker
  9544. if the number of peer connections are less than 30.
  9545. * src/ByteArrayDiskWriter.h (readData): Implemented.
  9546. * src/SegmentMan.h (diskWriter): New function.
  9547. * src/SegmentMan.cc (init): Added a call to diskWriter->closeFile()
  9548. * src/main.cc : Removed #include "CompactTrackerResponseProcessor.h"
  9549. (main): Use TrackerUpdateCommand.
  9550. * src/TorrentMan.h (CompactTrackerResponseProcessor): Removed.
  9551. (req): New variable.
  9552. (setTrackerResponseProcessor): Removed.
  9553. (getTrackerResponseProcessor): Removed.
  9554. (processTrackerResponse): Removed.
  9555. * src/DownloadEngine.h (diskWriter): Removed.
  9556. * src/TorrentDownloadEngine.cc (afterEachIteration): Removed a call
  9557. to torrentMan->processTrackerResponse().
  9558. To add Util::expandBuffer:
  9559. * src/ByteArrayDiskWriter.h (expandBuffer): Removed.
  9560. * src/ByteArrayDiskWriter.cc (writeData): Use Util::expandBuffer().
  9561. * src/Util.h (expandBuffer): New function.
  9562. To fix the bug that causes segmentation fault when "-l ." is specified
  9563. in command-line option:
  9564. * src/SimpleLogger.h (SimpleLogger): Removed "filename" argument.
  9565. (openFile): New function.
  9566. (closeFile): New function.
  9567. * src/SimpleLogger.cc (SimpleLogger): Removed fopen.
  9568. (~SimpleLogger): Call closeFile();
  9569. * src/LogFactory.cc (getInstance): Added a call to slogger->openFile().
  9570. * src/main.cc (main): Added a check to see logger is configured
  9571. properly.
  9572. To enable HTTP authentication without specifying "--http-auth-scheme"
  9573. * src/prefs.h (PREF_HTTP_AUTH_ENABLED): New definition.
  9574. * src/HttpConnection.cc (createRequest): Send Authorization header
  9575. if PREF_HTTP_AUTH_ENABLED == V_TRUE.
  9576. * src/main.cc (main): Preset PREF_HTTP_AUTH_SCHEME to V_TRUE
  9577. If "--http-user" is specified, set PREF_HTTP_AUTH_ENABLED to V_TRUE
  9578. * src/Peer.cc (shouldChoke): Updated algorithm.
  9579. * src/message.h (EX_AUTH_FAILED): New definition.
  9580. (EX_FILE_OPEN): New definition.
  9581. * src/HttpResponseCommand.cc (checkResponse): Throw DlAbortEx
  9582. if status == 401.
  9583. (handleDefaultEncoding): Added a call to diskWriter->initAndOpenFile()
  9584. if req->isTorrent == true.
  9585. * src/main.cc (handler): Removed the check to see e->diskWriter != NULL
  9586. (torrentHandler): Removed the check to see diskAdaptor != NULL.
  9587. * src/AbstractDiskWriter.cc (openExistingFile): Updated messsage.
  9588. (createFile): Updated message.
  9589. 2006-04-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9590. To add a readout of estimated remaining time to normal HTTP/FTP
  9591. downloads:
  9592. * src/ConsoleDownloadEngine.h (startup): New variable.
  9593. (startupLength): New variable.
  9594. (isStartupLengthSet): New variable.
  9595. (avgSpeed): New variable.
  9596. (eta): New variable.
  9597. * src/ConsoleDownloadEngine.cc (sendStatistics): Added a readout of
  9598. estimated remaining time.
  9599. (initStatistics): Initialized newly added variables.
  9600. (calculateStatistics): Calculate average speed and estimated remaining
  9601. time.
  9602. To decouple TorrentDownloadEngine from HttpResponseCommand:
  9603. * src/TrackerDownloadCommand.h: Removed.
  9604. * src/TrackerDownloadCommand.cc: Removed.
  9605. * src/TrackerInitCommand.h: Removed.
  9606. * src/TrackerInitCommand.cc: Removed.
  9607. * src/TrackerUpdateCommand.h: Removed.
  9608. * src/TrackerUpdateCommand.cc: Removed.
  9609. * src/TrackerWatcherCommand.cc (execute): The construction of request
  9610. url written in TrackerInitCommand was moved here. Do not create
  9611. tracker request command if torrentMan->trackers != 0.
  9612. * src/CompactTrackerResponseProcessor.h: New class.
  9613. * src/CompactTrackerResponseProcessor.cc: New class.
  9614. * src/message.h (MSG_TRACKER_WARNING_MESSAGE): Updated.
  9615. * src/HttpResponseCommand.cc (createHttpDownloadCommand):
  9616. Decoupled TorrentDownloadEngine from this.
  9617. * src/SegmentMan.h (init): New function.
  9618. * src/SegmentMan.cc (init): New function.
  9619. * src/TorrentMan.h (responseProcessor): New variable.
  9620. (trackers): New variable.
  9621. (setTrackerResponseProcessor): New function.
  9622. (getTrackerResponseProcessor): New function.
  9623. (processTrackerResponse): New function.
  9624. * src/TorrentMan.cc (Constructor): Initialized new variable trackers.
  9625. (processTrackerResponse): New function.
  9626. * src/main.cc (main): Use ByteArrayDiskWriter and
  9627. CompactTrackerResponseProcessor.
  9628. * src/TorrentDownloadEngine.cc (afterEachIteration): Call torrentMan->
  9629. processTrackerResponse().
  9630. * src/TorrentConsoleDownloadEngine.cc (printStatistics): Updated a
  9631. readout.
  9632. * src/TorrentDownloadEngine.cc (afterEachIteration): Added log message
  9633. which indicates download has completed.
  9634. * src/AbstractDiskWriter.cc (Destructor): fd >= 0, not fd >0
  9635. (closeFile): fd >= 0, not fd > 0
  9636. * src/main.cc (main): Added short cut for show-files.
  9637. Added short cut for torrent-file.
  9638. Added new command-line option listen-port.
  9639. Updated i18n messages.
  9640. 2006-04-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9641. To add LogFactory which creates singleton logger:
  9642. * src/LogFactory.h: New class.
  9643. * src/LogFactory.cc: New class.
  9644. * src/Command.h (logger): New variable.
  9645. (Constructor): Use LogFactory.
  9646. * src/AbstractCommand.cc: Use Command::logger
  9647. * src/PeerConnection.cc (Constructor): Deleted the argument logger.
  9648. Use LogFactory.
  9649. * src/SegmentSplitter.h : Made logger protected.
  9650. * src/SegmentSplitter.cc (Constructor): Use LogFactory.
  9651. * src/SegmentMan.cc (Constructor): Use LogFactory.
  9652. * src/DownloadEngine.h : Made logger protected.
  9653. * src/DownloadEngine.cc (Constructor): Use LogFactory.
  9654. * src/PeerInteractionCommand.cc : Use Command::logger.
  9655. * src/HttpResponseCommand.cc : Use Command::logger.
  9656. * src/SegmentMan.h : Made logger private.
  9657. * src/TorrentMan.h : Made logger private.
  9658. * src/TorrentMan.cc : Use LogFactory.
  9659. * src/FtpNegotiateCommand.cc : Use Command::logger.
  9660. * src/HttpConnection.h (Constructor): Deleted the argument logger.
  9661. * src/HttpConnection.cc (Constructor): Deleted the argument logger.
  9662. Use LogFactory.
  9663. * src/FtpConnection.h (Constructor): Deleted the argument logger.
  9664. * src/FtpConnection.cc (Constructor): Deleted the argument logger.
  9665. Use LogFactory.
  9666. * src/DownloadCommand.cc : Use Command::logger.
  9667. * src/PeerAbstractCommand.cc : Use Command::logger.
  9668. * src/PeerListenCommand.cc : Use Command::logger.
  9669. * src/PeerInitiateConnectionCommand.cc : Use Command::logger.
  9670. * src/HttpInitiateConnectionCommand.cc : Use Command::logger.
  9671. * src/FtpInitiateConnectionCommand.cc : Use Command::logger.
  9672. * src/TrackerWatcherCommand.cc : Use Command::logger.
  9673. * src/TrackerUpdateCommand.cc : Use Command::logger.
  9674. * src/TrackerDownloadCommand.cc : Use Command::logger.
  9675. * src/RequestSlotMan.cc (Constructor): Deleted the argument logger.
  9676. Use LogFactory.
  9677. * src/SendMessageQueue.h (Constructor): Deleted the argument logger.
  9678. * src/SendMessageQueue.cc (Constructor): Deleted the argument logger.
  9679. Use LogFactory.
  9680. * src/main.cc (main): Use LogFactory.
  9681. * src/DiskAdaptor.h (logger): New variable.
  9682. * src/DiskAdaptor.cc (Constructor): Use LogFactory.
  9683. * src/CopyDiskAdaptor.cc (fixFilename): Added a log message.
  9684. 2006-04-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9685. * src/TrackerInitCommand.cc (TrackerInitCommand): Added a "key"
  9686. parameter to a tracker request.
  9687. * src/TorrentMan.cc (readFileEntryFromMetaInfoFile): Bug fix.
  9688. * src/TrackerWatcherCommand.cc (execute): Call req->resetTryCount().
  9689. * src/main.cc (setSignalHander): New function.
  9690. (main): Added a handler for SIGTERM.
  9691. (handler): Updated message.
  9692. (torrentHandler): Updated message.
  9693. 2006-04-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9694. * src/TorrentConsoleDownloadEngine.cc
  9695. (onPartialDownloadingCompletes): Renamed as
  9696. onSelectiveDownloadingCompletes.
  9697. (onSelectiveDownloadingCompletes): Updated message.
  9698. To add DiskAdaptor which abstract DiskWriter family:
  9699. * src/PeerConnection.cc: Use diskAdaptor instead of diskWriter.
  9700. * src/PeerInteractionCommand.cc: Use diskAdaptor instead of diskWriter.
  9701. * src/BitfieldMan.cc (isAllBitSet): bug fix.
  9702. * src/TorrentMan.cc : Included CopyDiskAdaptor.h, DirectDiskAdaptor.h,
  9703. MultiDiskAdaptor.h.
  9704. (readFileEntry): Changed its arguments.
  9705. (setup): setupDiskWriter is merged into this function.
  9706. (setupDiskWriter): Removed.
  9707. (setFileFilter): New function.
  9708. (readFileEntryFromMetaInfoFile): Updated according to the changes
  9709. made in readFileEntry.
  9710. (getFilePath): Removed.
  9711. (getTempFilePath): Removed.
  9712. (getSegmentFilePath): Updated due to the removal of getFilePath.
  9713. (fixFilename): Removed.
  9714. (copySingleFile): Removed.
  9715. (splitMultiFile): Removed.
  9716. (deleteTempFile): Removed.
  9717. (setFileEntriesToDownload): Removed.
  9718. (isPartialDownloadingMode): Renamed as isSelectiveDownloadingMode.
  9719. (isSelectiveDownloadingMode): New function.
  9720. (setAllMultiFileRequestedState): Removed.
  9721. (finishPartialDownloadingMode): Renamed as
  9722. finishSelectiveDownloadingMode.
  9723. (finishSelectiveDownloadingMode): New function.
  9724. (getPartialTotalLength): Renamed as getSelectedTotalLength.
  9725. (getSelectedTotalLength): New function.
  9726. (onDownloadComplete): Use diskAdaptor.
  9727. * src/MultiDiskWriter.cc (Constructor): Added the argument pieceLength
  9728. (Range): Removed.
  9729. (setMultiFileEntries): Renamed as setFileEntries.
  9730. (setFileEntries): New function.
  9731. * src/MultiDiskWriter.h [DiskWriterEntry](enabled): Removed.
  9732. (pieceLength): New variable.
  9733. * src/main.cc (printDownloadCompeleteMessage): New function.
  9734. (torrentHandler): Use diskAdaptor instead of diskWriter.
  9735. (main): Renamed torrent-show-files to show-files.
  9736. Rewritten file contents listing.
  9737. * src/TorrentMan.h (FileEntry): Removed.
  9738. (multiFileTopDir): Removed.
  9739. (multiFileEntries): Removed.
  9740. (diskWriter): Removed.
  9741. (diskAdaptor): New variable.
  9742. * src/DefaultDiskWriter.h (totalLength): New variable.
  9743. * src/DefaultDiskWriter.cc (initAndOpenFile): Added ftruncate.
  9744. * src/TorrentDownloadEngine.cc (onEndOfRun): Use diskAdaptor instead of
  9745. diskWriter.
  9746. * src/TorrentConsoleDownloadEngine.h
  9747. (partialDownloadLengthDiff): Renamed as selectedDownloadLengthDiff.
  9748. (partialTotalLength): Renamed as selectedTotalLength.
  9749. * src/AbstractDiskWriter.cc (openFile): If file exists, call
  9750. openExistingFile, otherwise call initAndOpenFile.
  9751. (closeFile): fd > 0, not fd != 0.
  9752. * src/DirectDiskAdaptor.h: New class.
  9753. * src/DirectDiskAdaptor.cc: New class.
  9754. * src/MultiDiskAdaptor.h: New class.
  9755. * src/MultiDiskAdaptor.cc: New class.
  9756. * src/CopyDiskAdaptor.h: New class.
  9757. * src/CopyDiskAdaptor.cc: New class.
  9758. * src/DiskAdaptor.h: New class.
  9759. * src/DiskAdaptor.cc: New class.
  9760. * src/prefs.h (PREF_TORRENT_SHOW_FILES): Renamed as PREF_SHOW_FILES
  9761. (PREF_SHOW_FILES): New definition.
  9762. 2006-04-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9763. To add the ability to download multi torrent into respective files
  9764. directly:
  9765. * src/DiskWriter.h (openFile): New function.
  9766. (seek): Removed.
  9767. * src/MultiDiskWriter.h: New class.
  9768. * src/MultiDiskWriter.cc: New class.
  9769. * src/AbstractDiskWriter.h (seek): Changed its scope from public to
  9770. protected.
  9771. (openFile): New function.
  9772. * src/AbstractDiskWriter.cc (openFile): New function.
  9773. * src/prefs.h (V_FALSE): New definition.
  9774. (PREF_DIRECT_FILE_MAPPING): New definition.
  9775. * src/TorrentMan.h (setupDiskWriter): New function.
  9776. (setAllMultiFileRequestedState): New function.
  9777. (onDownloadComplete): New function.
  9778. * src/TorrentMan.cc : Included MultiDiskWriter.h
  9779. (setupDiskWriter): New function.
  9780. (getFilePath): Updated.
  9781. (getTempFilePath): Updated.
  9782. (getSegmentFilePath): Updated.
  9783. (fixFilename): Updated.
  9784. (deleteTempFile): Updated.
  9785. (setAllMultiFileRequestedState): New function.
  9786. (setFileEntriesToDownload): Use setAllMultiFileRequestedState().
  9787. (finishPartialDownloadingMode): Reset requested flags.
  9788. (onDownloadComplete): New function.
  9789. * src/main.cc: Added --direct-file-mapping option.
  9790. Use TorrentMan::setupDiskWriter().
  9791. * src/TorrentDownloadEngine.cc (afterEachIteration): Use TorrentMan::
  9792. onDownloadComplete().
  9793. To fix ETA bug:
  9794. * src/Util.h (difftvsec): New function.
  9795. * src/Util.cc (difftvsec): New function.
  9796. * src/TorrentConsoleDownloadEngine.cc (calculateSpeed): Use int for the
  9797. type of "elapsed" instead of long long int.
  9798. (calculateStatistics): Use Util::difftvsec instead of Util::difftv.
  9799. The updates of statistics takes place every 1 seconds.
  9800. * src/TorrentConsoleDownloadEngine.h (lastElapsed): Changed its type.
  9801. (calculateSpeed): Changed its argument signature.
  9802. * src/PeerMessage.cc (toString): Fixed message.
  9803. 2006-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9804. To print ETA:
  9805. * src/TorrentDownloadEngine.cc (afterEachIteration): Added download
  9806. completion handling when dealing with
  9807. TorrentMan::isPartialDownloadingMode() == true.
  9808. * src/TorrentDownloadEngine.h (onPartialDownloadingCompletes):
  9809. New function.
  9810. * src/TorrentConsoleDownloadEngine.h (startup): New variable.
  9811. (sessionDownloadLength): New variable.
  9812. (avgSpeed): New variable.
  9813. (eta): New variable.
  9814. * src/TorrentConsoleDownloadEngine.cc (initStatistics): Initialized
  9815. new variables: eta, avgSpeed, startup.
  9816. (calculateSpeed): Calculate average speed and ETA.
  9817. (printStatistics): Added ETA.
  9818. * src/Util.h (secfmt): New function.
  9819. * src/Util.cc (secfmt): New function.
  9820. 2006-04-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9821. To detect "keep alive" flooding:
  9822. * src/PeerInteractionCommand.h (keepAliveCount): New variable
  9823. * src/PeerInteractionCommand.cc (Constructor): Initialized new
  9824. variable: keepAliveCount.
  9825. (detectMessageFlooding): Added "keep alive" flooding detection.
  9826. (receiveMessage): Increase keepAliveCount when "keep alive" message
  9827. received.
  9828. To add the ability to download only specified files in multi-file
  9829. torrent:
  9830. * src/BitfieldMan.h (filterBitfield): New variable.
  9831. (filterEnabled): New variable.
  9832. (setFilterBit): New function.
  9833. (enableFilter): New function.
  9834. (disableFilter): New function.
  9835. (isFilterEnabled): New function.
  9836. (getFilteredTotalLength): New function.
  9837. (getCompletedLength): New function.
  9838. * src/BitfieldMan.cc (Constructor): Initialized new variable:
  9839. filterBitfield, filterEnabled.
  9840. (CopyConstructor): Added filterBitfield and filterEnabled.
  9841. (operator==): Added filterBitfield and filterEnabled.
  9842. (Destructor): Added filterBitfield.
  9843. (getMissingIndex): Use filterBitfield.
  9844. (getMissingUnusedIndex): Use filterBitfield.
  9845. (getFirstMissingUnusedIndex): Use filterBitfield.
  9846. (getFirstMissingUnusedIndex): Use filterBitfield.
  9847. (getAllMissingIndexes): Use filterBitfield.
  9848. (countMissingBlock): Use filterBitfield.
  9849. (countBlock): Use filterBitfield.
  9850. (setBitInternal): Added new argument on.
  9851. (setUseBit): Use setBitInternal.
  9852. (unsetUseBit): Use setBitInternal.
  9853. (setBit): Use setBitInternal.
  9854. (unsetBit): Use setBitInternal.
  9855. (isAllBitSet): Use filterBitfield.
  9856. (setFilterBit): New function.
  9857. (addFilter): New function.
  9858. (enableFilter): New function.
  9859. (disableFilter): New function.
  9860. (clearFilter): New function.
  9861. (isFilterEnabled): New function.
  9862. (getFilteredTotalLength): New function.
  9863. (getCompletedLength): New function.
  9864. * src/TorrentMan.h [FileEntry](Constructor): Updated signature.
  9865. Initalized newly added variables.
  9866. [FileEntry](offset): New variable.
  9867. [FileEntry](extracted): New variable.
  9868. [FileEntry](requested): New variable.
  9869. (readFileEntry): New function.
  9870. (option): New variable.
  9871. (splitMultiFile): Removed const qualifier.
  9872. (fixFilename): Removed const qualifier.
  9873. (readFileEntryFromMetaInfoFile): New function.
  9874. (finishPartialDownloadingMode): New function.
  9875. (isPartialDownloadingMode): New function.
  9876. (setFileEntriesToDownload): New function.
  9877. (getCompletedLength): New function.
  9878. (getPartialTotalLength): New function.
  9879. * src/TorrentMan.cc (readFileEntry): New function.
  9880. (setup): Use readFileEntry. If no-preallocation option is specified,
  9881. use DefaultDiskWriter.
  9882. (readFileEntryFromMetaInfoFile): New function.
  9883. (fixFilename): Removed const qualifier.
  9884. (splitMultiFile): Removed const qualifier.
  9885. (setFileEntriesToDownload): New function.
  9886. (isPartialDownloadingMode): New function.
  9887. (finishPartialDownloadingMode): New function.
  9888. (getCompletedLength): New function.
  9889. (getPartialTotalLength): New function.
  9890. * src/TorrentConsoleDownloadEngine.h (partialDownloadLengthDiff):
  9891. New variable.
  9892. (partialTotalLength): New variable.
  9893. (downloadLength): New variable.
  9894. (totalLength): New variable.
  9895. * src/TorrentConsoleDownloadEngine.cc (onPartialDownloadingCompletes):
  9896. Added log.
  9897. (initStatistics): Initialized new variables: partialDownloadLengthDiff,
  9898. partialTotalLength, downloadLength, totalLength.
  9899. (calculate): Calculate downloadLength and totalLength.
  9900. * src/prefs.h :New definition PREF_NO_PREALLOCATION
  9901. * src/main.cc (addCommand): Changed argument signature.
  9902. (main): Added new variable: args. Added new option "torrent-show-files"
  9903. "no-preallocation". Usage is not updated yet.
  9904. 2006-04-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9905. * src/PeerMessage.cc (setBitfield): Fixed invalid memory de-allocation.
  9906. 2006-04-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9907. Attempt to add the ability to listing file entries in a .torrent file.
  9908. This feature is not yet complete.
  9909. * src/prefs.h (PREF_TORRENT_SHOW_FILES): New definition
  9910. * src/TorrentMan.cc (getMultiFileEntries): New function.
  9911. (getName): New function.
  9912. * src/TorrentMan.h (getMultiFileEntries): New function.
  9913. (getName): New function.
  9914. * src/main.cc (main): Use above 2 funtion.
  9915. * Release 0.3.2
  9916. 2006-03-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9917. * src/PeerInteractionCommand.cc (checkInactiveConnection): New function
  9918. (detectMessageFlooding): Updated threshold value.
  9919. (checkLongTimePeerChoking): Updated timeout value.
  9920. (getNewPieceAndSendInterest): Added debug log.
  9921. * src/PeerInteractionCommand.h (checkInactiveConnection): New function
  9922. * src/TorrentMan.cc (deleteOldErrorPeers): Updated.
  9923. (getPeer): Updated.
  9924. * src/TorrentMan.h: Added MAX_PEER_ERROR.
  9925. * src/PeerAbstractCommand.cc (onAbort): Increment error counter.
  9926. * src/PeerListenCommand.cc (execute): Close connection if incoming peer
  9927. is localhost.
  9928. * src/main.cc (main): Updated PREF_PEER_CONNECTION_TIMEOUT to 60.
  9929. * src/PendingMessage.cc (processMessage): Not to send piece message
  9930. if peer is not interested in the pieces localhost has.
  9931. * src/Peer.cc (shouldChoke): Updated.
  9932. * src/SendMessageQueue.cc (cancelAllRequest): Fixed.
  9933. * src/Util.cc (isPowerOf): New function.
  9934. * src/Util.h (isPowerOf): New function.
  9935. * src/PeerMessageUtil.cc (checkLength): Added a check for length
  9936. whether or not it is power of 2.
  9937. 2006-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9938. Added new class SendMessageQueue that includes PendingMessages and
  9939. RequestSlotMan.
  9940. * src/SendMessageQueue.h: New class.
  9941. * src/SendMessageQueue.cc: New class.
  9942. * src/PendingMessage.h: Added new member variable blockIndex and its
  9943. accessors.
  9944. (createRequestMessage): Updated.
  9945. * src/PendingMessage.cc (createRequestMessage): Updated.
  9946. * src/PeerInteractionCommand.cc (executeInternal): Updated with
  9947. SendMessageQueue.
  9948. (checkLongTimePeerChoking): Updated with SendMessageQueue.
  9949. (receiveMessage): Updated with SendMessageQueue.
  9950. (deletePendingPieceMessage): Removed.
  9951. (getNewPieceAndSendInterest): Updated with SendMessageQueue.
  9952. (sendInterest): Updated with SendMessageQueue.
  9953. (createRequestPendingMessage): Updated with SendMessageQueue.
  9954. (sendMessages): Updated with SendMessageQueue.
  9955. (onAbort): Updated with SendMessageQueue.
  9956. (keepAlive): Updated with SendMessageQueue.
  9957. (beforeSocketCheck): Updated SendMessageQueue.
  9958. * src/PeerInteractionCommand (sendMessages): Shuffle
  9959. missingBLockIndexes before using it.
  9960. Added its own timeout for peer connection.
  9961. * src/PeerAbstractCommand.h: Added member variable timeout and its
  9962. setter.
  9963. * src/prefs.h: Added PREF_PEER_CONNECTION_TIMEOUT.
  9964. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  9965. Added setTimeout() call.
  9966. (executeInternal): Added setTimeout() call.
  9967. * src/PeerAbstractCommand.cc (PeerAbstractCommand):
  9968. Added timeout.
  9969. (isTimeoutDetected): Updated.
  9970. * src/main.cc (main): Added PREF_PEER_CONNECTION_TIMEOUT entry to
  9971. option.
  9972. Added *simple* message flooding checker.
  9973. * src/PeerInteractionCommand.cc (executeInternal):
  9974. Added detectMessageFlooding() call.
  9975. (detectMessageFlooding): New function.
  9976. (receiveMessage): Count up CHOKE, UNCHOKE, HAVE message.
  9977. (beforeSocketCheck): Added detectMessageFlooding() call.
  9978. * src/PeerInteractionCommand.h: Added sendMessageQueue,
  9979. chokeUnchokeCount, haveCount, detectMessageFlooding().
  9980. Removed deletePendingPieceMessage(), getRequestSlot(),
  9981. deleteRequestSlot(), deleteAllRequestSlot().
  9982. * src/PeerInteractionCommand.cc (beforeSocketCheck):
  9983. Added checkLongTimePeerChoking() call.
  9984. * src/RequestSlotMan.h: Renamed deleteTimeoutRequestSlot().
  9985. * src/TorrentMan.cc (addPeer): Delete at most MAX_PEER_LIST_SIZE peers
  9986. if duplicate == false.
  9987. The parameter "uploaded" and "downloaded" in the tracker request are
  9988. the size since the client sent the "started" event to the tracker.
  9989. * src/TorrentMan.cc (setup): Assigned saved downloaded Size and
  9990. uploaded size to preDownloadedSize, preUploadedSize respectively.
  9991. * src/TorrentMan.h: Added preDownloadedSize, preUploadedSize,
  9992. getSessionDownloadedSize(), getSessionUploadedSize().
  9993. * src/TrackerInitCommand.cc (execute): Use getSessionDownloadedSize(),
  9994. getSessionUploadedSize() instead of getDownloadedSize(),
  9995. getUploadedSize().
  9996. * src/PendingMessage.cc (processMessage): Do not send request message
  9997. if the peer is choking the client.
  9998. * src/TrackerUpdateCommand.cc (execute): Check wtheher minInterval is
  9999. less than interval.
  10000. 2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10001. * configure.in: Added gnutls support. Added several CPP macros.
  10002. * m4/openssl.m4: Added.
  10003. * src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
  10004. readData(), peekData(). Added gnutls support.
  10005. * src/HttpDownloadCommand.cc: Removed SleepCommand.h
  10006. * src/TrackerWatcherCommand.{h,cc}: Added. This command creates
  10007. TrackerInitCommand periodicaly(TorrentMan::minInterval).
  10008. * src/TorrentMan.cc: Remove downloadedSize == 0 check from save().
  10009. Instead, added a check for whether setup method has executed
  10010. successfully.
  10011. * src/TorrentMan.h: Added member vaiable setupComplete. Updated
  10012. DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to 300.
  10013. * src/Makefile.am: Updated.
  10014. * src/messageDigest.h: Added. This is a macro calculating SHA1 digest
  10015. using whether OpenSSL or gcrypt, depending on the result of configure
  10016. script.
  10017. * src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by using
  10018. messageDigest.h.
  10019. * src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
  10020. * src/PeerListenCommand.cc: Added log about port binded successfully.
  10021. Fixed memory leak.
  10022. * src/main.cc: Added gnutls support. Replaced LIB_SSL with
  10023. ENABLE_BITTORRENT where they are not related to OpenSSL but BitTorrent.
  10024. Removed instantiation of TrackerInitCommand. Instead,
  10025. TrackerWatcherCommand is instantiated and pushed to the command queue.
  10026. * src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL with
  10027. ENABLE_SSL.
  10028. * src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
  10029. * src/RequestSlotMan.cc (deleteCompletedRequestSlot):
  10030. If a piece is already acquired by another command, delete the request
  10031. slots for the piece.
  10032. * src/TrackerUpdateCommand.cc (execute):
  10033. Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to warn.
  10034. Added a check whether peer list is null.
  10035. Fixed the bug that causes sending completed event to the tracker
  10036. several times.
  10037. * src/TrackerInitCommand.cc (execute):
  10038. Fixed the bug that causes sending completed event to the tracker
  10039. several times.
  10040. * src/AbstractDiskWriter.{h,cc}: Removed direct dependency on OpenSSL
  10041. by using messageDigest.h.
  10042. 2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10043. * PeerConnection.cc: Replaced log message "keep-alive" with
  10044. "keep alive".
  10045. * PeerInteractionCommand.{h,cc}: Close connection if peer is choking
  10046. localhost long time.
  10047. * TorrentMan.cc: When adding new peer with duplicate = true, if the
  10048. number of peer list is equal to or grater than MAX_PEER_LIST, delete
  10049. at most 100 failure entry from the list. If with duplicate = false,
  10050. MAX_PEER_LIST is not checked.
  10051. * PeerListenCommand.cc: Fixed the argument order of log message.
  10052. 2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10053. * Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
  10054. Added warn().
  10055. * SimpleLogger.h: Moved enum LEVEL to Logger.h.
  10056. Implemented warn().
  10057. Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated code.
  10058. 2006-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10059. * Request.h: Added AFTER_COMPLETED event.
  10060. * TorrentDownloadEngine.cc: Prints "Download complete" message
  10061. instead of downloaded size and progress(%) after download completes.
  10062. * PeerInteractionCommand.cc: After download completes, sends unchoke
  10063. message to the peer if it is interested in what localhost has
  10064. downloaded.
  10065. * TorrentMan.cc: In single-file mode, copy temporary file to the final
  10066. destination instead of just renaming it.
  10067. * TorrentMan.cc: Added deleteTempFile().
  10068. * PeerAbstractCommand.cc: do not stop execution after download
  10069. completes. This makes localhost a seeder.
  10070. * Util.{h,cc}: Added fileCopy().
  10071. * PeerListenCommand.cc: do not stop execution after download completes.
  10072. This makes localhost a seeder.
  10073. * main.cc: Do not call TorrentMan::fixFilename() in torrentHandler.
  10074. Added TorrentMan::deleteTempFile() to torrentHandler.
  10075. Initialized the variable dir as ".".
  10076. * TorrentMan.h: Changed DEFAULT_ANNOUNCE_INTERVAL to 120 seconds.
  10077. Deleted renameSingleFile().
  10078. Added copySingleFile(), deleteTempFile().
  10079. * DownloadEngine.h: Added virtual function afterEachIteration().
  10080. * TorrentDownloadEngine.cc: Move a call to TorrentMan::fixFilename()
  10081. in onEndOfRun() to afterEachIteration().
  10082. In onEndOfRun(), changed if condition to check whether filenameFixed is
  10083. true.
  10084. * Util.cc: Implemented fileCopy() using rangedFileCopy().
  10085. In rangedFileCopy(), added try-catch block to properly close file
  10086. descriptors.
  10087. * TorrentDownloadEngine.cc: Added a member variable filenameFixed.
  10088. Added afterEachIteration(), isFilenameFixed().
  10089. * Peer.cc: Changed choking strategy.
  10090. * PreAllocationDiskWriter.cc: Drop O_DIRECT flag.
  10091. * TrackerInitCommand.cc: Send completed event only once.
  10092. * DownloadEngine.cc: Added a call to afterEachIteration().
  10093. * TrackerUpdateCommand.cc: Do not stop execution after download
  10094. completes.
  10095. * TorrentMan.h: Defined MAX_PEER_UPDATE as 15. aria2 attempts to
  10096. connect the peers at most MAX_PEER_UPDATE when a peer list is
  10097. received from a tracker.
  10098. * TrackerUpdateCommand.cc: Implemented above mentioned behavior.
  10099. Decreased the number of failure peers to delete to 0(just comment out
  10100. the line).
  10101. * Release 0.3.1
  10102. 2006-03-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10103. * PeerInteractionCommand.cc: added a call to
  10104. TorrentMan::unadvertisePiece in Destructor.
  10105. * PeerInteractionCommand.cc: make have message sent immediately
  10106. if the size of pending message queue is zero.
  10107. * TorrentMan.cc: set the maximum size of peer list to 250.
  10108. * TorrentMan.h: changed the container type of Peers and UsedPieces
  10109. to deque.
  10110. * Util.cc: fixed rangedFileCopy.
  10111. * AbstractDiskWriter.{h,cc}: moved digest context initialization
  10112. to Constructor. Also, moved digest cleanup to Destructor.
  10113. * MetaFileUtil.cc: fixed memory leak
  10114. * replaced std::vector with std::deque.
  10115. * AbstractCommand.cc: casted timeout value to long long int.
  10116. * ChunkedEncoding.cc: fixed memory leak.
  10117. * PeerInteractionCommand.cc: casted timeout value to long long int.
  10118. * SleepCommand.cc: casted timeout value to long long int.
  10119. * Data.cc: fixed memory leak.
  10120. * Data.cc: fixed toLLInt().
  10121. * BitfieldMan.cc: fixed memory leak.
  10122. * TorrentMan.cc: initialized storeDir to ".".
  10123. * TorrentMan.cc: fixed memory leak.
  10124. * TorrentMan.cc: corrected file paths of splitted files.
  10125. * PeerAbstractCommand.cc: casted timeout to long long int.
  10126. * main.cc: added delete(req) and delete(te->diskWriter).
  10127. * RequestSlot.cc: casted timeout value to long long int.
  10128. * Request.cc: fixed memory leak.
  10129. * PendingMessage.cc: make HAVE messages sent only when peer does not
  10130. have the piece.
  10131. * Peer.{h,cc}: added hasPiece(int index).
  10132. * main.cc: corrected addCommand.
  10133. 2006-03-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10134. * BitTorrent protocol support added.
  10135. * Release 0.3.0
  10136. 2006-03-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10137. * SocketCore.cc: remove the assignment of addrinfo.ai_addr.
  10138. 2006-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10139. * ChunkedEncoding.{h,cc}: fixed the bug that if chunk data is binary,
  10140. decoding did not work properly.
  10141. 2006-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10142. * DownloadEngine.h: included sys/time.h
  10143. * DownloadEngine.cc: remove sys/time.h
  10144. * Makefile.am (SUBDIRS): Add intl.
  10145. * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
  10146. 2006-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10147. * main.cc: correct help message for --http-auth-scheme.
  10148. * main.cc: changed e-mail address for bug reports.
  10149. * ja.po: added japanese translation.
  10150. 2006-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10151. * SimpleLogger.cc: flush log file instead of stdout.
  10152. 2006-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10153. * main.cc: Fixed command-line option: max-tries
  10154. * HttpResponseCommand.cc: Make the request re-sent only if req->seg.sp
  10155. does not equal to seg.sp.
  10156. * DownloadCommand.cc: If EOF is got from the server and the total size
  10157. of file is not zero, then throw DlRetryEx.
  10158. * main.cc: Set the minium value of min-segment-size to 1024.
  10159. * HttpResponseCommand.cc: Fixed the bug that http segmented downloading
  10160. fails because of a regression since 0.2.0 release.
  10161. 2006-03-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10162. * HttpConnection.cc:
  10163. * common.h: defined the user agent name as macro
  10164. * DownloadEngine.{h, cc}:
  10165. * ConsoleDownloadEngine.{h, cc}: Console output message(size, speed)
  10166. is now generated by ConsoleDownloadEngine not by DownloadEngine.
  10167. * main.cc: Download complete/abort message is now generated by main.
  10168. * Makefile.am (SUBDIRS): Add m4.
  10169. (ACLOCAL_AMFLAGS): New variable.
  10170. (EXTRA_DIST): New variable.
  10171. * configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
  10172. * gettext: added gettext functionality
  10173. 2006-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10174. * AbstractCommand.cc:
  10175. * DownloadCommand.{h, cc}: Aborted downloading commands now properly
  10176. unregister its cuid from SegmentMan.
  10177. * DownloadEngine.cc: .aria2 file was written when a downloading
  10178. failed with errors.
  10179. * HttpConnection.cc: Added "Proxy-Connection" header to proxy request.
  10180. Added "User-Agent" header to CONNECT proxy request.
  10181. Fixed "Proxy-Authorization" header. Now proxy authorization works
  10182. properly.
  10183. * Logger.h:
  10184. * SimpleLogger.{h,cc}: Changed the type of msg to const char*.
  10185. * ChunkedEncoding.cc: Added #include directive for strings.h
  10186. * Release 0.2.1
  10187. 2006-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10188. * Util.{h,cc}: added startsWith().
  10189. * CookieBox.cc: rewrited criteriaFind() using Util::startsWith() and
  10190. Util::endsWith().
  10191. * SocketCore.cc: struct addrinfo is now zero-initialized.
  10192. * common.h: added #include directive of limit.h.
  10193. * DownloadEngine.cc: added #include directive of sys/time.h and
  10194. algorithm.
  10195. * Exception.h: added #include directive of stdio.h.
  10196. * AbstractCommand.h: added #include directive of sys/time.h.
  10197. * DownloadCommand.h: added #include directive of sys/time.h.
  10198. * *.h: added #include directive of common.h to all base classes.
  10199. subclasses' one was removed.
  10200. * common.h: defined LONG_LONG_MAX and LONG_LONG_MIN if a compiler
  10201. does not define these macros.
  10202. 2006-02-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10203. * Release 0.2.0
  10204. * main.cc:
  10205. * HttpInitiateConnectionCommand.{h,cc}:
  10206. * prefs.h:
  10207. * HttpConnection.{h,cc}: added --http-proxy-method option.
  10208. We can now use GET command in http proxy.
  10209. 2006-02-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10210. * SplitSlowestSegmentSplitter.{h,cc}: This class provies algorithm
  10211. that splits slowest segment of SegmentMan::commands vector.
  10212. This is the default split algorithm of aria2.
  10213. * SplitFirstSegmentSplitter.{h,cc}: This class provides algorithm
  10214. that splits first segment of SegmentMan::commands vector.
  10215. * SegmentSplitter.{h,cc}: Added. This class provides split algorithm.
  10216. * DownloadCommand.{h,cc}: Added downloading speed calculation.
  10217. * Segment.h:
  10218. * SegmentMan.cc: Added speed field to Segment.h
  10219. * main.cc: -s option now affects all URLs in command-line arguemtns.
  10220. * HttpResponseCommand.cc: Fixed bug that segment file is not loaded.
  10221. * message.h: Change file size related %d to %lld.
  10222. 2006-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10223. * FtpInitiateConnectionCommand.{h,cc}:
  10224. * FtpNegotiationCommand.{h,cc}:
  10225. * FtpDownloadCommand.{h,cc}:
  10226. * FtpConnection.{h,cc}: Added FTP support
  10227. * SimpleLogger.cc: Log message now includes time information.
  10228. * main.cc: The value of --http-auth-scheme option is chagned from
  10229. 'BASIC' to 'basic'
  10230. * main.cc: Added --timeout command-line option.
  10231. * main.cc: Added --min-segment-size command-line option.
  10232. * main.cc: Added --max-retries command-line option.
  10233. * prefs.h: option string constants are now defined in prefs.h
  10234. 2006-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10235. * AbstractCommand.cc: Fixed timeout bug in AbstractCommand
  10236. * SegmentMan.cc: Added totalSize entry to .aria2 file. No compatibility
  10237. with version 0.1.0's one.
  10238. 2006-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10239. * configure.in: Added --enable-ssl option to configure script.
  10240. * HttpConnection.cc: Make Request-URI an absolute path. Some servers
  10241. cannot permit absoluteURI as Request-URI.
  10242. * HttpConnection.cc: Added Referer support.
  10243. * main.cc: Added referer command-line option.
  10244. * main.cc: Added rety-wait command-line option.
  10245. * Exception.h: Fixed formating bug in Exception::setMsg()
  10246. * SocketCore.{h,cc}:
  10247. * Socket.{h, cc}:
  10248. * Request.cc:
  10249. * InitiateConnectionCommandFactory.cc:
  10250. * HttpRequestCommand.cc: Added HTTPS support.
  10251. * SocketCore.{h,cc}: Added SocketCore. Socket becomes a handle class
  10252. for SocketCore.
  10253. * ChunkedEncoding.cc: Fixed bug in ChunkedEncoding: expanding buffer
  10254. size is wrong
  10255. * DownloadCommand.cc: Fixed bug in DownloadCommand: In Chunked
  10256. Encoding, it wrongly adds to Segment.ds buff length from the socket.
  10257. 2006-02-17 Tatsuhiro Tsujikawa <tsujikawa at rednoah dot com>
  10258. * Release 0.1.0