ChangeLog 349 KB

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