ChangeLog 377 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485
  1. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2. Added build test script
  3. * build_test.sh
  4. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5. Updated ja.po
  6. * src/ja.po
  7. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8. Bump up version number to 0.14.0
  9. * src/configure.ac
  10. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  11. Updated ja.po and fr.po. Great thanks for french translators and
  12. Sebastien WILLEMIJNS.
  13. * po/fr.po
  14. * po/ja.po
  15. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  16. Added configure option to enable/disable epoll support.
  17. * configure.ac
  18. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  19. Updated man page.
  20. * doc/aria2c.1.txt
  21. * doc/aria2c.1
  22. * doc/aria2c.1.html
  23. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  24. Added missing default value '5' to the usage of --split option.
  25. * src/HelpItemFactory.cc
  26. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  27. Filled up pieces based on the number of missing blocks, rather than
  28. simplay the number of piece * block length.
  29. * src/BtRequestFactory.h
  30. * src/DefaultBtInteractive.cc
  31. * src/DefaultBtInteractive.h
  32. * src/DefaultBtRequestFactory.cc
  33. * src/DefaultBtRequestFactory.h
  34. * src/Piece.cc
  35. * src/Piece.h
  36. * test/BitfieldManTest.cc
  37. * test/DefaultBtRequestFactoryTest.cc
  38. * test/MockBtRequestFactory.h
  39. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  40. Made _epEvents a member variable.
  41. * src/DownloadEngine.cc
  42. * src/DownloadEngine.h
  43. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  44. Cancel download if http redirect is bounded more than 20 times.
  45. * src/AbstractCommand.cc
  46. * src/HttpSkipResponseCommand.cc
  47. * src/Request.cc
  48. * src/Request.h
  49. * test/RequestTest.cc
  50. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  51. Fixed unhandled exception(removed keyword `new').
  52. * src/SocketCore.cc (initEPOLL)
  53. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  54. Removed visit(const MetaEntry*)
  55. * src/MetaEntryVisitor.h:
  56. Added visit(const Data*),visit(const Dictionary*),visit(const List*)
  57. and made them virtual.
  58. * src/BencodeVisitor.h
  59. * src/BencodeVisitor.cc
  60. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  61. Updated po files.
  62. * po/aria2c.pot
  63. * po/*.po
  64. * po/*.gmo
  65. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  66. Moved the call setWriteCheckSocket inside the previous clause to reduce
  67. the number of socket to watch out.
  68. * src/PeerInteractionCommand.cc
  69. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  70. When there is not enough space in disk when writing a chunk of data,
  71. aria2 now prints the message to the console to warn user and aborts
  72. its download. Not all downloads are canceled because some downloads
  73. may use another disk or partition. BUG#1640332
  74. * src/AbstractDiskWriter.cc
  75. * src/PeerAbstractCommand.cc
  76. * src/PeerAbstractCommand.h: Added onFailure() function for override.
  77. * src/PeerInteractionCommand.cc: In onFailure(), call RequestGroup::
  78. setHaltRequested(true) to cancel download.
  79. * src/PeerInteractionCommand.h
  80. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  81. Applied Ross's aria2-0.13.2+1-mingw-5.patch, which changes the type of
  82. socket from int to sock_t as sockets are unsigned in Windows.
  83. For AsyncNameResolver, DownloadEngine, I did additional modification
  84. for the portion of the code changed according to epoll support.
  85. I defined sock_t in a2netcompat.h to use sock_t without including
  86. SocketCore.h.
  87. * src/AsyncNameResolver.cc
  88. * src/AsyncNameResolver.h
  89. * src/DownloadEngine.cc
  90. * src/DownloadEngine.h
  91. * src/SocketCore.cc
  92. * src/SocketCore.h
  93. * src/a2netcompat.h
  94. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  95. Applied Ross's aria2-0.13.2+1-mingw-4.patch. With this change, all
  96. changes in the patch were applied.
  97. * test/DHTConnectionImplTest.cc: Fixed unit test error in MinGW.
  98. * test/DefaultPieceStorageTest.cc: Fixed unit test error in MinGW.
  99. * test/PeerMessageUtilTest.cc: Fixed unit test error in MinGW.
  100. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  101. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this change,
  102. a2io.h and common.h were modified.
  103. * src/a2io.h: Changed seek/stat/tell calls to use 64 bit versions in
  104. MinGW.
  105. * src/common.h: Changed off_t to 64 bit in MinGW.
  106. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  107. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
  108. only a2netcompat.h is modified.
  109. * src/a2netcompat.h: Removed unused getaddrinfo related #define
  110. directives.
  111. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  112. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
  113. only gai_strerror.h is modified.
  114. * src/gai_strerror.h: Fixed gai_strerror() function to report all
  115. winsock errors in MinGW.
  116. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  117. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit, only the
  118. follow sources are applied.
  119. * src/Platform.h: I removed HAVE_WINSOCK2_H directive from Platform.h.
  120. * src/Platform.cc: Moved common setup/teardown code to Platform class.
  121. I moved #endif // HAVE_WINSOCK2_H to the front of #include "DlAbortEx.h"
  122. I included locale.h from Platform.cc.
  123. * src/main.cc: Moved common setup/teardown code to Platform class.
  124. * test/AllTest.cc: Use Platform class.
  125. Set locale to C in AllTest.cc to prevent the messages to be localized.
  126. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  127. Applied Ross's aria2-0.13.2+1-mingw-3.patch.
  128. * test/HttpHeaderTest.cc: Casted to off_t where it should.
  129. * test/HttpRequestTest.cc: Casted to off_t where it should.
  130. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  131. Applied Ross's aria2-0.13.2+1-mingw.patch and
  132. aria2-0.13.2+1-mingw-2.patch.
  133. * src/ConsoleStatCalc.cc: Added HAVE_TERMIOUS_H directive for the
  134. systems which don't have termious.h. I moved the directive inside of
  135. if(isTTY) { ... clause so that line is wiped out without termious.h.
  136. I also removed HAVE_ASCTIME_R clause because asctime_r is provided
  137. anyway.
  138. * src/asctime_r.h
  139. * src/asctime_r.c: Added for the systems don't have asctime_r function.
  140. I added 2nd argument to the prototype declaration.
  141. * src/StringFormat.cc: Get rid of vasprintf.
  142. * src/getaddrinfo.h: Fixed constants.
  143. * configure.ac: Added the check for asctime_r function.
  144. * src/Makefile.am: Added conditional based on HAVE_ASCTIME_R
  145. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  146. Added writable test for Socket when the sending message is in progress.
  147. Usually the sending message is piece message. Without wriable check,
  148. upload latency is dropped to more than 1sec.
  149. * src/PeerInteractionCommand.cc
  150. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  151. Create only requested files and files which shares a piece with
  152. requested file in multi-torrent downloads. Directory structures are
  153. also created in the same rule.
  154. MultiDiskAdaptor::fileExists() now uses FileEntry instead of
  155. DiskWriterEntry as in the previous implementation.
  156. * src/MultiDiskWriter.cc
  157. * src/MultiFileAllocationIterator.cc
  158. * src/MultiFileAllocationIterator.h
  159. * test/MultiFileAllocationIteratorTest.cc
  160. 2008-06-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  161. Commented out -lprofiler
  162. * src/Makefile.am
  163. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  164. Bump up version number to 0.14.0b.
  165. * src/configure.ac
  166. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  167. Actively establish connection to peers in seeding, when peer cache
  168. is not full and max upload speed limit is not reached.
  169. * src/ActivePeerConnectionCommand.cc
  170. * src/ActivePeerConnectionCommand.h
  171. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  172. Always remove a peer from cache in DefaultPeerStorage::returnPeer(),
  173. to make room more fleshy, recently found peers.
  174. Peer::_badConditionStartTime is not used anymore. Consider to remove
  175. it.
  176. * src/DefaultPeerStorage.cc
  177. * test/DefaultPeerStorageTest.cc
  178. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  179. Returns cached data only when the previous receiveHandshake() is called
  180. with peek = true.
  181. * src/PeerConnection.cc (receiveHandshake)
  182. * src/PeerConnection.h (receiveHandshake)
  183. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  184. Changed default value of -s option from 1 to 5.
  185. Also max value of -s option is changed from 5 to 16.
  186. * src/HelpItemFactory.cc
  187. * src/OptionHandlerFactory.cc
  188. * src/option_processing.cc
  189. * src/usage_text.h
  190. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  191. Changed -s options behavior. Now it means the number of connections
  192. made simultaneously in each http/ftp download.
  193. If 1 URL is specified, the behavior is the same with old implementation.
  194. If -s N is given and more than N URLs are specified, first N URLs are
  195. used and remaining URLs are used for backup. If less than N URLs are
  196. specified, some of URLs are used more than once so that totally N
  197. connections are made simultaneously.
  198. * src/main.cc
  199. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  200. Included missing iosfwd or ostream header.
  201. * src/RequestGroupMan.cc
  202. * src/TaggedItem.cc
  203. * src/TaggedItem.h
  204. * src/Util.cc
  205. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  206. * src/HttpHeaderProcessor.cc: Rewritten using std::string as a buffer.
  207. * src/HttpHeaderProcessor.h: Rewritten using std::string as a buffer.
  208. * src/HttpConnection.cc: Included missing sstream.
  209. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  210. Added --bt-max-open-files option.
  211. * src/DefaultPieceStorage.cc
  212. * src/HelpItemFactory.cc
  213. * src/MultiDiskAdaptor.cc
  214. * src/MultiDiskAdaptor.h
  215. * src/OptionHandlerFactory.cc
  216. * src/option_processing.cc
  217. * src/prefs.cc
  218. * src/prefs.h
  219. * src/usage_text.h
  220. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  221. Fixed the bug that aria2 aborts when a path to a directory is given
  222. in command-line.
  223. * src/ProtocolDetector.cc
  224. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  225. Limited the number files opened in each BitTorrent download. The default
  226. value is 100. The option to change this value will be added.
  227. * src/MultiDiskAdaptor.cc
  228. * src/MultiDiskAdaptor.h
  229. * src/MultiFileAllocationIterator.cc
  230. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  231. Fixed the bug that HTTP downloads don't start with old libraries.
  232. * src/HttpHeaderProcessor.cc
  233. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  234. Use empty() instead of size() > 0.
  235. * src/HttpConnection.cc
  236. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  237. Drop connection if the incoming peer ID is the same with localhost's
  238. one. The previous implementation drops connection when incoming peer's
  239. IP address is the same with localhost's one.
  240. * src/PeerListenCommand.cc
  241. * src/DefaultBtInteractive.cc
  242. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  243. Returns cached data without checking whether socket is readable
  244. if the cache is available.
  245. * src/PeerConnection.cc (receiveHandshake)
  246. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  247. Included stdint.h
  248. * src/common.h
  249. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  250. Removed duplicate HAVE_GETTIMEOFDAY
  251. * src/Makefile.am
  252. * src/Makefile.in
  253. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  254. Use interval as a minInterval when minInterval is not supplied.
  255. * src/DefaultBtAnnounce.cc
  256. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  257. Made DEFAULT_ANNOUNCE_INTERVAL 120, so that if first tracker request
  258. attempt is failed, then 2nd attempt get kicked out more quickly.
  259. And it is now static const member of DefaultBtAnnounce.
  260. * src/DefaultBtAnnounce.h
  261. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  262. Renamed BtRuntime::lessThanMinPeers() and BtRuntime::lessThanEqMinPeers.
  263. Made MAX_PEERS and MIN_PEERS static const members of BtRuntime.
  264. * src/ActivePeerConnectionCommand.cc
  265. * src/BtConstants.h
  266. * src/BtRuntime.h
  267. * src/DHTGetPeersCommand.cc
  268. * src/DefaultBtAnnounce.cc
  269. * src/DefaultPeerStorage.cc: Calculate maxPeerListSize based on
  270. BtRuntime::MAX_PEERS.
  271. * src/DefaultPeerStorage.h
  272. * src/InitiatorMSEHandshakeCommand.cc
  273. * src/PeerInitiateConnectionCommand.cc
  274. * src/PeerInteractionCommand.cc
  275. * src/PeerReceiveHandshakeCommand.cc
  276. * src/TrackerWatcherCommand.cc
  277. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  278. Always Connect to _numNewConnection
  279. * src/ActivePeerConnectionCommand.cc
  280. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  281. Made `begin' unsigned int.
  282. * src/GrowSegment.h
  283. * src/Piece.cc
  284. * src/Piece.h
  285. * src/PiecedSegment.cc
  286. * src/PiecedSegment.h
  287. * src/Segment.h
  288. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  289. Calculate piece hash when data is arrived if the data is arrived in
  290. order. This removes additional read operation for hash calculation.
  291. If the data is arrived in out of order, the hash is calucated when the
  292. piece is completed. This is the same behavior as the old implementation.
  293. * src/BtPieceMessage.cc
  294. * src/DefaultBtProgressInfoFile.cc
  295. * src/DefaultPieceStorage.cc
  296. * src/DownloadCommand.cc
  297. * src/DownloadCommand.h
  298. * src/DownloadEngine.cc
  299. * src/GrowSegment.cc
  300. * src/GrowSegment.h
  301. * src/Piece.cc
  302. * src/Piece.h
  303. * src/PiecedSegment.cc
  304. * src/PiecedSegment.h
  305. * src/Segment.h
  306. * test/PieceTest.cc
  307. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  308. Try to keep the ordering of outgoing piece message.
  309. * src/DefaultBtMessageDispatcher.cc
  310. (DefaultBtMessageDispatcher::sendMessages)
  311. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  312. Fixed busy loop when error/hup epoll events occur.
  313. * src/AbstractCommand.cc
  314. * src/PeerAbstractCommand.cc
  315. 2008-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  316. Added --bt-request-peer-speed-limit option, which was a constant
  317. SLOW_SPEED_THRESHOLD.
  318. * src/ActivePeerConnectionCommand.cc
  319. * src/ActivePeerConnectionCommand.h
  320. * src/BtConstants.h
  321. * src/HelpItemFactory.cc
  322. * src/OptionHandlerFactory.cc
  323. * src/PeerReceiveHandshakeCommand.cc
  324. * src/option_processing.cc
  325. * src/prefs.cc
  326. * src/prefs.h
  327. * src/usage_text.h
  328. 2008-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  329. Removed repeated call of getTopDirPath(). Instead, call it once and
  330. cache the result.
  331. * src/MultiDiskAdaptor.cc
  332. * src/MultiDiskAdaptor.h
  333. (mkdir, openFile, initAndOpenFile, openExistingFile)
  334. 2008-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  335. Fixed compile error on debian etch.
  336. The libc6 shipped with debian etch doesn't define ULLONG_MAX properly
  337. even if _GNU_SOURCE is defined. So define ULLONG_MAX in case when
  338. it is undefined.
  339. * src/Util.cc (ULLONG_MAX)
  340. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  341. Added epoll support. Use epoll if it is available. If not, use select.
  342. When async dns is enabled in compile time, epoll support is enabled
  343. only when aria2 is built with c-ares. This condition statement is
  344. defined in a2io.h.
  345. Currently aria2 supports both c-ares and ares, but ares is maintained
  346. for quite a while and debian already has c-ares package, ares support
  347. will be dropped in the future version.
  348. * configure.ac
  349. * src/AbstractCommand.cc
  350. * src/AsyncNameResolver.cc
  351. * src/AsyncNameResolver.h
  352. * src/Command.cc
  353. * src/Command.h
  354. * src/DownloadEngine.cc
  355. * src/DownloadEngine.h
  356. * src/PeerAbstractCommand.cc
  357. * src/SocketCore.cc
  358. * src/SocketCore.h
  359. * src/a2io.h
  360. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  361. * test/MetalinkEntryTest.cc: Added missing `defined' keyword to #if
  362. directive.
  363. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  364. Do not do write operation to /dev/null file.
  365. * src/LogFactory.cc
  366. * src/SimpleLogger.cc
  367. Replaced vasprintf with vsnprintf
  368. * src/SimpleLogger.cc (SimpleLogger::writeLog)
  369. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  370. * src/BtRequestMessage.cc
  371. (BtRequestMessage::onQueue): Given piece to RequestSlot. This is a fix
  372. for segmentation fault caused by previous commit.
  373. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  374. Reduced the usage of gettimeofday().
  375. * src/DefaultBtMessageDispatcher.cc
  376. (DefaultBtMessageDispatcher::checkRequestSlotAndDoNecessaryThing)
  377. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  378. * src/RequestSlot.cc
  379. * src/RequestSlot.h
  380. (RequestSlot::isTimeout)
  381. Made RequestSlot have a reference to Piece object to avoid find
  382. Piece repeatedly.
  383. * src/DefaultBtMessageDispatcher.cc
  384. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  385. * src/RequestSlot.cc
  386. * src/RequestSlot.h
  387. (RequestSlot::getPiece)
  388. * test/DefaultBtMessageDispatcherTest.cc
  389. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  390. * src/TimeA2.cc
  391. * src/TimeA2.h
  392. (Time::difference): New function.
  393. (Time::elapsed): Done optimization.
  394. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  395. * src/HelpItemFactory.cc: Added missing `defined' keyword to #if
  396. directive.
  397. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  398. * src/option_processing.cc: Added missing `defined' keyword to #if
  399. directive.
  400. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  401. Bump up version number to 0.13.2+1
  402. * src/configure.ac
  403. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  404. Refactored broken outstanding piece handling.
  405. * src/DefaultPieceStorage.cc
  406. * src/DefaultPieceStorage.h
  407. * src/Piece.cc
  408. * src/Piece.h
  409. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  410. Fixed compile error on Mac OS X 10.3.9. This error was caused by the
  411. name collision of static variable and predefined macro.
  412. * src/BtContext.cc
  413. * src/BtContext.h
  414. * src/CookieBoxFactory.cc
  415. * src/CookieBoxFactory.h
  416. * src/CookieParser.cc
  417. * src/CookieParser.h
  418. * src/DefaultBtContext.cc
  419. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  420. * src/RequestGroup.cc
  421. (RequestGroup::createInitialCommand): Use empty() instead of size().
  422. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  423. * Release 0.13.2
  424. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  425. Updated fr.po(thanks to Sebastien) and ja.po. ThanksDone make update-po
  426. * po/fr.po
  427. * po/ja.po
  428. * po/aria2c.pot
  429. * po/*.po
  430. * po/*.gmo
  431. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  432. Bump up version number to 0.13.2
  433. * src/configure.ac
  434. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  435. Refactord.
  436. * src/RequestGroupMan.cc
  437. (removeStoppedGroup)
  438. (fillRequestGroupFromReserver)
  439. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  440. Fixed compile error on Ubuntu.
  441. * src/BtPieceMessage.cc
  442. * src/MessageDigestHelper.cc
  443. * src/Util.cc
  444. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  445. Fixed compile error when configured with --disable-bittorrent
  446. * test/DownloadHandlerFactoryTest.cc
  447. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  448. Done make update-po
  449. * po/aria2c.pot
  450. * po/*.po
  451. * po/*.gmo
  452. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  453. Bump up version number to 0.13.2rc.
  454. * src/configure.ac
  455. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  456. Made option name bold. Updated SYNOPSIS to make it more readable.
  457. * doc/aria2c.1.txt
  458. * doc/aria2c.1
  459. * doc/aria2c.1.html
  460. * src/version_usage.cc
  461. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  462. Refactored. Use std::string instead of size and char*.
  463. * Data.cc
  464. * Data.h
  465. * test/Data.cc
  466. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  467. Added trimSelf(). Rewritten trim() to use trimSelf().
  468. * Util.cc
  469. * Util.h
  470. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  471. * src/ChunkChecksum.h (getChecksum): Return const reference.
  472. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  473. Fixed compile error when configured with --disable-metalink.
  474. Also moved test/DownloadHandlerFactoryTest.cc to SRC in Makefile.am.
  475. * test/FeatureConfigTest.cc
  476. * test/DownloadHandlerFactoryTest.cc
  477. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  478. Fixed compile error when configured with --without-gnutls
  479. --without-openssl
  480. * src/main.cc
  481. * test/DefaultBtProgressInfoFileTest.cc
  482. * test/SegmentManTest.cc
  483. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  484. Fixed compile error with OpenSSL.
  485. * src/IteratableChunkChecksumValidator.cc
  486. * src/LibsslDHKeyExchange.h
  487. * src/MessageDigestHelper.cc
  488. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  489. Revert the default value of --max-concurrent-downloads to 5.
  490. Revert the default value of --metalink-servers to 5.
  491. Man pages was also updated.
  492. * src/option_processing.cc
  493. * doc/aria2c.1.txt
  494. * doc/aria2c.1.html
  495. * doc/aria2c.1
  496. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  497. Returns const reference:
  498. DownloadContext::getPieceHash, DownloadContext::getName,
  499. DownloadContext::getPieceHashAlgo, DownloadContext::getDir,
  500. BtContext::getInfoHashAsString,
  501. * src/BtContext.h
  502. * src/DefaultBtContext.cc
  503. * src/DefaultBtContext.h
  504. * src/DownloadContext.h
  505. * src/SingleFileDownloadContext.h
  506. * test/MockBtContext.h
  507. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  508. * src/RequestGroup.h (getDir): Removed.
  509. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  510. Returns const reference. The internal urlencode function was optimized
  511. a little bit.
  512. * src/Request.cc
  513. * src/Request.h
  514. * src/HttpRequest.cc
  515. * src/HttpRequest.h
  516. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  517. Defined option name and possible values as std::string to reduce
  518. temporary string object creation in runtime.
  519. * src/HelpItemFactory.cc
  520. * src/LogFactory.cc
  521. * src/Option.cc
  522. * src/OptionHandlerFactory.cc
  523. * src/option_processing.cc
  524. * src/prefs.cc
  525. * src/prefs.h
  526. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  527. Return const reference.
  528. * src/DownloadHandlerConstants.cc
  529. * src/DownloadHandlerConstants.h
  530. (getMetalinkExtensions)
  531. (getMetalinkContentTypes)
  532. (getBtExtensions)
  533. (getBtContentTypes)
  534. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  535. * src/HttpHeader.cc (get): Rewritten.
  536. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  537. Make HttpHeader::getFirst(...) return const reference.
  538. * src/HttpHeader.cc
  539. * src/HttpHeader.h
  540. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  541. Use Option::getAsBool(...) instead of Option::get(...) and compare
  542. it with V_TRUE.
  543. * src/DefaultPieceStorage.cc
  544. * src/DownloadCommand.cc
  545. * src/FtpNegotiationCommand.cc
  546. * src/HttpRequest.cc
  547. * src/InitiateConnectionCommand.cc
  548. * src/RequestGroup.cc
  549. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  550. Made Option::get(...) return const reference of std::string.
  551. * src/Option.cc
  552. * src/Option.h
  553. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  554. Replaced std:copy with insert.
  555. * src/DefaultBtMessageDispatcher.cc
  556. * src/DefaultPieceStorage.cc
  557. * src/DownloadEngineFactory.cc
  558. * src/RequestGroup.cc
  559. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  560. Included SocketCore.h to fix compiler warning.
  561. * src/InitiateConnectionCommand.cc
  562. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  563. Put piece selection strategy algorithm to RarestPieceSelector class,
  564. Added a switch to choose whether randomized selection so that unit
  565. tests emit same results in, possibly, win32.
  566. * src/DefaultPieceStorage.cc
  567. * src/DefaultPieceStorage.h
  568. * src/RarestPieceSelector.cc
  569. * src/RarestPieceSelector.h
  570. * test/DefaultPieceStorageTest.cc
  571. * test/RarestPieceSelectorTest.cc
  572. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  573. Don't pool connection if HTTP proxy is enabled.
  574. * src/FtpFinishDownloadCommand.cc
  575. * src/FtpNegotiationCommand.cc
  576. * src/HttpSkipResponseCommand.cc
  577. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  578. Don't add closed socket to DownloadEngine::addSocketForReadCheck()
  579. * src/AbstractCommand.cc
  580. * src/AbstractCommand.h
  581. * src/ActivePeerConnectionCommand.cc
  582. * src/FtpInitiateConnectionCommand.cc
  583. * src/HttpInitiateConnectionCommand.cc
  584. * src/InitiateConnectionCommandFactory.cc
  585. * src/PeerAbstractCommand.cc
  586. * src/PeerAbstractCommand.h
  587. * src/PeerInitiateConnectionCommand.cc
  588. * src/TrackerWatcherCommand.cc
  589. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  590. Sort RequestSlot in ascending order and manipulate them using
  591. lower_bound.
  592. * src/DefaultBtMessageDispatcher.cc
  593. * src/DefaultBtMessageDispatcher.h
  594. (getMessageQueue): Added const qualifier.
  595. (getRequestSlots): Added const qualifier.
  596. (sendMessages): Use empty() instead of size().
  597. (doCancelSendingPieceAction): Use HandleEvent object.
  598. (doAbortOutstandingRequestAction): Rewritten.
  599. (doChokedAction): Rewritten.
  600. (checkRequestSlotAndDoNecessaryThing): Rewritten.
  601. (isOutstandingRequest): Rewritten.
  602. (getOutstandingRequest): Rewritten.
  603. (removeOutstandingRequest): Rewritten.
  604. (addOutstandingRequest): Rewritten.
  605. * src/RequestSlot.cc
  606. * src/RequestSlot.h
  607. (operator=): Rewritten.
  608. (operator!=): New function.
  609. (operator<): New function.
  610. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  611. * src/DefaultBtRequestFactory.cc
  612. (doChokedAction): Rewritten.
  613. (removeCompletedPiece): Rewritten.
  614. (removeTargetPiece): Rewritten.
  615. (createRequestMessages): Added the debug log.
  616. (createRequestMessagesOnEndGame: Added the debug log.
  617. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  618. Added the debug log message.
  619. * src/BtPieceMessage.cc (doReceivedAction)
  620. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  621. Sorted DHTPeerAnnounceEntry in a ascending order of info hash and
  622. used lower_bound to process them rather than linear search.
  623. * src/DHTPeerAnnounceStorage.cc
  624. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  625. Call subtractPieceStats from ~PeerInteractionCommand only when the
  626. peer has at least one completed piece.
  627. * src/Peer.cc
  628. * src/Peer.h
  629. * src/PeerInteractionCommand.cc
  630. * src/PeerSessionResource.cc
  631. * src/PeerSessionResource.h
  632. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  633. Removed unnecessary sorting
  634. * src/DefaultPieceStorage (DefaultPieceStorage)
  635. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  636. Rewritten the portion of the code that mangaes allowed fast indexes.
  637. * src/PeerSessionResource.cc
  638. * src/PeerSessionResource.h
  639. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  640. Removed the invalid string including '\r' from ru.po and
  641. did make update-po.
  642. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  643. Added --log-level and --summary-interval to man page.
  644. * doc/aria2c.1.txt
  645. * doc/aria2c.1.html
  646. * doc/aria2c.1
  647. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  648. Added --log-level option to specify log level. Log messages under
  649. the specified level are not output. Default value is `debug'.
  650. * src/HelpItemFactory.cc
  651. * src/LogFactory.cc
  652. * src/LogFactory.h
  653. * src/Logger.h
  654. * src/OptionHandlerFactory.cc
  655. * src/SimpleLogger.cc
  656. * src/SimpleLogger.h
  657. * src/main.cc
  658. * src/option_processing.cc
  659. * src/prefs.h
  660. * src/usage_text.h
  661. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  662. Print download progress summary of all parallel downloads in specified
  663. interval, default 60 secs. While aria2 could download several files
  664. in parallel (see -j option), it displayed just first download progress,
  665. and the other downloads are hidden from the users. This new feature
  666. prints all downloads currently in-progress to the console so that you
  667. can check the status of all downloads. The interval can be adjusted
  668. by --summary-interval option.
  669. The progress readout is now cut so that all fits in the one line of
  670. console.
  671. * src/ConsoleStatCalc.cc
  672. * src/ConsoleStatCalc.h
  673. * src/HelpItemFactory.cc
  674. * src/OptionHandlerFactory.cc
  675. * src/RequestGroupMan.cc
  676. * src/RequestGroupMan.h
  677. * src/main.cc
  678. * src/option_processing.cc
  679. * src/prefs.h
  680. * src/usage_text.h
  681. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  682. Call updateFdSet() to initialize rfdset, wfdset fdmax.
  683. * src/DownloadEngine.cc (DownloadEngine)
  684. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  685. Use free() to deallocate memory for _buffer if HAVE_POSIX_MEMALIGN is
  686. defined.
  687. * src/SingleFileAllocationIterator.cc (~SingleFileAllocationIterator)
  688. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  689. Use erase+lower_bound+insert instead of sort.
  690. * src/DefaultPieceStorage.cc (addPieceStats)
  691. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  692. Use A2STR::SHARP_C and A2STR::EQUAL_C.
  693. * src/A2STR.cc
  694. * src/A2STR.h
  695. * src/OptionParser.cc (parse)
  696. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  697. Defined fake filename `[tracker.announce]' as static const std::string.
  698. * src/TrackerWatcherCommand.cc (createRequestGroup)
  699. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  700. Defined default filename `index.html' as static const std::string
  701. * src/SingleFileDownloadContext.cc
  702. * src/SingleFileDownloadContext.h
  703. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  704. Defined "[MEMORY]" as static const std::string.
  705. * src/MemoryBufferPreDownloadHandler.cc (execute)
  706. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  707. Defined control file's version number as static const std::string.
  708. * src/DefaultBtProgressInfoFile.cc
  709. * src/DefaultBtProgressInfoFile.h
  710. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  711. Use Request::METHOD_GET
  712. * src/RequestGroup.cc (createNextCommandWithAdj)
  713. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  714. Defined "OK", "ERR", "INPR" as static const std::string
  715. * src/RequestGroupMan.cc (showDownloadResults)
  716. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  717. Defined default client used in extended handshake as static const
  718. std::string
  719. * src/DefaultBtInteractive.cc (addHandshakeExtendedMessageToQueue)
  720. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  721. Defined AUTH_HEADER, PROXY_AUTH_HEADER as static const std::string
  722. * src/HttpConnection.cc (eraseConfidentialInfo)
  723. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  724. Defined default ftp user and password as static const std::string
  725. * src/AuthConfigFactory.cc
  726. * src/AuthConfigFactory.h
  727. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  728. Defined strings used in netrc as static const std::string
  729. * src/Netrc.cc
  730. * src/Netrc.h
  731. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  732. Defined HTTP status as static const std::string
  733. * src/AbstractProxyResponseCommand.cc
  734. * src/HttpHeader.cc
  735. * src/HttpHeader.h
  736. * src/HttpResponse.cc
  737. * src/HttpResponseCommand.cc
  738. * src/HttpSkipResponseCommand.cc
  739. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  740. Defined "\r\n", "A", "I" as static const std::string
  741. * src/A2STR.cc
  742. * src/A2STR.h
  743. * src/FtpConnection.cc
  744. * src/FtpConnection.h
  745. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  746. Added COLON_C(".") and used it in Request::parseUrl()
  747. * src/A2STR.cc
  748. * src/A2STR.h
  749. * src/Request.cc (parseUrl)
  750. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  751. Changed the type of padName from `const std::string&' to `const char*'.
  752. * src/MSEHandshake.cc (verifyPadLength)
  753. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  754. Defined "sha1" as static const std::string.
  755. * src/MetalinkParserController.cc
  756. * src/MetalinkParserController.h
  757. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  758. Defined message digest algorithm name as static const std::string
  759. * src/DHTTokenTracker.cc
  760. * src/DHTUtil.cc
  761. * src/DefaultBtContext.cc
  762. * src/MSEHandshake.cc
  763. * src/MessageDigestHelper.cc
  764. * src/Peer.cc
  765. * src/messageDigest.cc
  766. * src/messageDigest.h
  767. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  768. Made string literals used in SAX parser static const std::string.
  769. * src/FileMetalinkParserState.cc
  770. * src/FileMetalinkParserState.h
  771. * src/FilesMetalinkParserState.cc
  772. * src/FilesMetalinkParserState.h
  773. * src/InitialMetalinkParserState.cc
  774. * src/InitialMetalinkParserState.h
  775. * src/MetalinkMetalinkParserState.cc
  776. * src/MetalinkMetalinkParserState.h
  777. * src/PiecesMetalinkParserState.cc
  778. * src/PiecesMetalinkParserState.h
  779. * src/ResourcesMetalinkParserState.cc
  780. * src/ResourcesMetalinkParserState.h
  781. * src/VerificationMetalinkParserState.cc
  782. * src/VerificationMetalinkParserState.h
  783. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  784. Use A2STR::SLASH_C, A2STR::DOT_C instead of "/", "." respectively.
  785. * src/A2STR.cc
  786. * src/A2STR.h
  787. * src/File.cc
  788. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  789. Defined static const std::string IP("ip"), PORT("port") and use them
  790. instead of string literals.
  791. * src/DefaultPeerListProcessor.cc
  792. * src/DefaultPeerListProcessor.h
  793. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  794. Made string literals for torrent file processing static const
  795. std::string.
  796. * src/BtContext.cc
  797. * src/BtContext.h
  798. * src/DefaultBtContext.cc
  799. * src/DefaultBtContext.h
  800. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  801. Made string literal for tracker response static const std::string
  802. * src/BtAnnounce.cc
  803. * src/BtAnnounce.h
  804. * src/DefaultBtAnnounce.cc
  805. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  806. Use DHTMessage::T instead of "t".
  807. * src/DHTMessageTracker.cc (messageArrived)
  808. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  809. Made keyName static const. Made trimmed charset static const
  810. std::string.
  811. * src/Util.cc (getContentDispositionFilename)
  812. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  813. Made USER_AGENT const. Made "/" static const std::string.
  814. * src/A2STR.cc
  815. * src/A2STR.h
  816. * src/HttpRequest.cc
  817. * src/HttpRequest.h
  818. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  819. Made string listeral to static const std::string:
  820. "Content-Range", "Content-Length"
  821. * src/HttpHeader.cc
  822. * src/HttpHeader.h
  823. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  824. Made string listeral to static const std::string.
  825. * src/HttpConnection.cc
  826. * src/HttpHeader.cc
  827. * src/HttpHeader.h
  828. * src/HttpResponse.cc
  829. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  830. Made string listeral to static const std::string.
  831. * src/A2STR.cc
  832. * src/A2STR.h
  833. * src/SimpleLogger.cc
  834. * src/SimpleLogger.h
  835. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  836. Made string literal to static const std::string.
  837. Rewritten CookieParser::setField.
  838. * src/A2STR.cc
  839. * src/A2STR.h
  840. * src/CookieBoxFactory.cc
  841. * src/CookieBoxFactory.h
  842. * src/CookieParser.cc
  843. * src/CookieParser.h
  844. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  845. Made string literal to static const std::string
  846. * src/DHTAbstractMessage.cc
  847. * src/DHTAnnouncePeerMessage.cc
  848. * src/DHTAnnouncePeerMessage.h
  849. * src/DHTAnnouncePeerReplyMessage.cc
  850. * src/DHTAnnouncePeerReplyMessage.h
  851. * src/DHTFindNodeMessage.cc
  852. * src/DHTFindNodeMessage.h
  853. * src/DHTFindNodeReplyMessage.cc
  854. * src/DHTFindNodeReplyMessage.h
  855. * src/DHTGetPeersMessage.cc
  856. * src/DHTGetPeersMessage.h
  857. * src/DHTGetPeersReplyMessage.cc
  858. * src/DHTGetPeersReplyMessage.h
  859. * src/DHTMessage.cc
  860. * src/DHTMessage.h
  861. * src/DHTMessageFactoryImpl.cc
  862. * src/DHTMessageReceiver.cc
  863. * src/DHTPingMessage.cc
  864. * src/DHTPingMessage.h
  865. * src/DHTPingReplyMessage.cc
  866. * src/DHTPingReplyMessage.h
  867. * src/DHTQueryMessage.cc
  868. * src/DHTQueryMessage.h
  869. * src/DHTResponseMessage.cc
  870. * src/DHTResponseMessage.h
  871. * src/DHTUnknownMessage.cc
  872. * src/DHTUnknownMessage.h
  873. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  874. Made string literal to static const std::string
  875. * src/BtChokeMessage.cc (toString)
  876. * src/BtHaveAllMessage.cc (toString)
  877. * src/BtHaveNoneMessage.cc (toString)
  878. * src/BtInterestedMessage.cc (toString)
  879. * src/BtNotInterestedMessage.cc (toString)
  880. * src/BtUnchokeMessage.cc (toString)
  881. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  882. Replaced "" with static const variable A2STR::NIL.
  883. Replaced string comparison against "" with std::string::empty().
  884. Added PROTO_* to Request class and use them as a protocol string
  885. constant.
  886. Made "started", "stopped", "completed" static const variable in
  887. AnnounceList class.
  888. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  889. Updated translations. Great thanks to translators.
  890. * po/ca.po
  891. * po/de.po
  892. * po/fr.po
  893. * po/it.po
  894. * po/ja.po
  895. * po/ru.po
  896. * po/zh_CN.po
  897. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  898. Updated man page; categorized options and fixed typo.
  899. * doc/aria2c.1.txt
  900. * doc/aria2c.1.html
  901. * doc/aria2c.1
  902. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  903. Removed const ref
  904. * src/MetalinkEntry.cc (AddProtocolPreference)
  905. * src/RequestGroup.cc (FindServerHostByHostname)
  906. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  907. Rewritten Accept-Features handling.
  908. * src/HttpRequestCommand.cc (createHttpRequest)
  909. * src/a2functional.h
  910. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  911. Changed method signature:
  912. DHTAbstractNodeLookupTask::toEntries
  913. * src/DHTAbstractNodeLookupTask.cc
  914. * src/DHTAbstractNodeLookupTask.h
  915. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  916. Changed method signature:
  917. BtContext::computeFastSet, DefaultBtContext::extractUrlList
  918. * src/BtContext.h
  919. * src/DefaultBtContext.cc
  920. * src/DefaultBtContext.h
  921. * src/DefaultBtInteractive.cc
  922. * test/DefaultBtContextTest.cc
  923. * test/MockBtContext.h
  924. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  925. Changed method signature:
  926. MultiFileAllocationIterator::makeDiskWriterEntries
  927. * src/MultiFileAllocationIterator.cc
  928. * src/MultiFileAllocationIterator.h
  929. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  930. Changed method sinature:
  931. MetalinkEntry::toFileEntry,
  932. MetalinkHelper::query, MetalinkHelper::parseAndQuery,
  933. Metalinker::queryEntry
  934. * src/Metalink2RequestGroup.cc
  935. * src/MetalinkEntry.cc
  936. * src/MetalinkEntry.h
  937. * src/MetalinkHelper.cc
  938. * src/MetalinkHelper.h
  939. * src/Metalinker.cc
  940. * src/Metalinker.h
  941. * src/main.cc
  942. * test/MetalinkHelperTest.cc
  943. * test/MetalinkerTest.cc
  944. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  945. Changed method sinature:
  946. RequestGroup::getURIs
  947. * src/RequestGroup.cc
  948. * src/RequestGroup.h
  949. * test/Metalink2RequestGroupTest.cc
  950. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  951. Changed method signature:
  952. PeerListProcessor::extractPeer
  953. * src/CompactPeerListProcessor.cc
  954. * src/CompactPeerListProcessor.h
  955. * src/DefaultBtAnnounce.cc
  956. * src/DefaultPeerListProcessor.cc
  957. * src/DefaultPeerListProcessor.h
  958. * src/DelegatingPeerListProcessor.cc
  959. * src/DelegatingPeerListProcessor.h
  960. * src/PeerListProcessor.h
  961. * src/UTPexExtensionMessage.cc
  962. * test/DefaultPeerListProcessorTest.cc
  963. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  964. Changed method signature:
  965. BtRequestFactory::createRequestMessages,
  966. BtRequestFactory::createRequestMessagesOnEndGame
  967. * src/BtRequestFactory.h
  968. * src/DefaultBtInteractive.cc
  969. * src/DefaultBtRequestFactory.cc
  970. * src/DefaultBtRequestFactory.h
  971. * test/DefaultBtRequestFactoryTest.cc
  972. * test/MockBtRequestFactory.h
  973. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  974. Changed method signature:
  975. PieceStorage::getInFlightPieces
  976. * src/DefaultBtProgressInfoFile.cc
  977. * src/DefaultPieceStorage.cc
  978. * src/DefaultPieceStorage.h
  979. * src/PieceStorage.h
  980. * src/UnknownLengthPieceStorage.cc
  981. * src/UnknownLengthPieceStorage.h
  982. * test/DefaultBtProgressInfoFileTest.cc
  983. * test/MockPieceStorage.h
  984. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  985. Changed method signature:
  986. PostDownloadHandler::getNextRequestGroups
  987. Metalink2RequestGroup::generate
  988. RequestGroup::postDownloadProcessing
  989. * src/BtPostDownloadHandler.cc
  990. * src/BtPostDownloadHandler.h
  991. * src/Metalink2RequestGroup.cc
  992. * src/Metalink2RequestGroup.h
  993. * src/MetalinkPostDownloadHandler.cc
  994. * src/MetalinkPostDownloadHandler.h
  995. * src/PostDownloadHandler.h
  996. * src/RequestGroup.cc
  997. * src/RequestGroup.h
  998. * src/RequestGroupMan.cc
  999. * src/main.cc
  1000. * test/BtPostDownloadHandlerTest.cc
  1001. * test/Metalink2RequestGroupTest.cc
  1002. * test/MetalinkPostDownloadHandlerTest.cc
  1003. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1004. Rewritten AccRequestGroup
  1005. * src/main.cc
  1006. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1007. Rewritten.
  1008. * src/TaggedItem.cc (toTagString)
  1009. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1010. Rewritten Accept-Features handling.
  1011. * src/HttpRequestCommand.cc (createHttpRequest)
  1012. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1013. Rewritten accept types handling.
  1014. * HttpRequest.cc (createRequest)
  1015. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1016. Rewritten
  1017. * src/FeatureConfig.cc (featureSummary)
  1018. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1019. Changed method signature:
  1020. PeerStorage::getActivePeers
  1021. * src/DHTPeerAnnounceEntry.cc
  1022. * src/DefaultPeerStorage.cc
  1023. * src/DefaultPeerStorage.h
  1024. * src/PeerStorage.h
  1025. * test/DefaultPeerStorageTest.cc
  1026. * test/MockPeerStorage.h
  1027. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1028. Changed method signature:
  1029. DHTPeerAnnounceStorage::getPeers,
  1030. DHTPeerAnnounceEntry::getPeers
  1031. * src/DHTGetPeersMessage.cc
  1032. * src/DHTPeerAnnounceEntry.cc
  1033. * src/DHTPeerAnnounceEntry.h
  1034. * src/DHTPeerAnnounceStorage.cc
  1035. * src/DHTPeerAnnounceStorage.h
  1036. * test/DHTAnnouncePeerMessageTest.cc
  1037. * test/DHTPeerAnnounceEntryTest.cc
  1038. * test/DHTPeerAnnounceStorageTest.cc
  1039. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1040. Changed method signature:
  1041. NameResolver::resolve
  1042. * src/DHTEntryPointNameResolveCommand.cc
  1043. * src/InitiateConnectionCommand.cc
  1044. * src/NameResolver.cc
  1045. * src/NameResolver.h
  1046. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1047. Changed method signature:
  1048. PieceStorage::getAdvertisedPieceIndexes
  1049. * src/DefaultBtInteractive.cc
  1050. * src/DefaultPieceStorage.cc
  1051. * src/DefaultPieceStorage.h
  1052. * src/PieceStorage.h
  1053. * src/UnknownLengthPieceStorage.h
  1054. * test/MockPieceStorage.h
  1055. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1056. Changed method signature:
  1057. SegmentMan::getInFlightSegment
  1058. * src/AbstractCommand.cc
  1059. * src/SegmentMan.cc
  1060. * src/SegmentMan.h
  1061. * test/SegmentManTest.cc
  1062. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1063. Changed method signature:
  1064. DHTAbstractNodeLookupTask::getNodesFromMessage
  1065. * src/DHTAbstractNodeLookupTask.cc
  1066. * src/DHTAbstractNodeLookupTask.h
  1067. * src/DHTNodeLookupTask.cc
  1068. * src/DHTNodeLookupTask.h
  1069. * src/DHTPeerLookupTask.cc
  1070. * src/DHTPeerLookupTask.h
  1071. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1072. Pass std::deque<Command*> by reference to avoid unnecessary coping.
  1073. * src/AbstractCommand.cc
  1074. * src/BtCheckIntegrityEntry.cc
  1075. * src/BtCheckIntegrityEntry.h
  1076. * src/BtFileAllocationEntry.cc
  1077. * src/BtFileAllocationEntry.h
  1078. * src/BtSetup.cc
  1079. * src/BtSetup.h
  1080. * src/CheckIntegrityCommand.cc
  1081. * src/CheckIntegrityEntry.h
  1082. * src/ChecksumCheckIntegrityEntry.cc
  1083. * src/ChecksumCheckIntegrityEntry.h
  1084. * src/DHTSetup.cc
  1085. * src/DHTSetup.h
  1086. * src/DownloadEngine.cc
  1087. * src/FileAllocationCommand.cc
  1088. * src/FileAllocationEntry.h
  1089. * src/RequestGroup.cc
  1090. * src/RequestGroup.h
  1091. * src/RequestGroupMan.cc
  1092. * src/RequestGroupMan.h
  1093. * src/StreamCheckIntegrityEntry.cc
  1094. * src/StreamCheckIntegrityEntry.h
  1095. * src/StreamFileAllocationEntry.cc
  1096. * src/StreamFileAllocationEntry.h
  1097. * src/TrackerWatcherCommand.cc
  1098. * src/a2functional.h
  1099. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1100. Changed method signature:
  1101. BNode::findClosestKNodes, BNode:: enumerateBucket,
  1102. DHTBucket::getGoodNodes,
  1103. DHTRoutingTable::getClosestKNodes, DHTRoutingTable::getBuckets
  1104. * src/BNode.cc
  1105. * src/BNode.h
  1106. * src/DHTAbstractNodeLookupTask.cc
  1107. * src/DHTAutoSaveCommand.cc
  1108. * src/DHTBucket.cc
  1109. * src/DHTBucket.h
  1110. * src/DHTBucketRefreshTask.cc
  1111. * src/DHTFindNodeMessage.cc
  1112. * src/DHTGetPeersMessage.cc
  1113. * src/DHTRoutingTable.cc
  1114. * src/DHTRoutingTable.h
  1115. * test/BNodeTest.cc
  1116. * test/DHTBucketTest.cc
  1117. * test/DHTRoutingTableTest.cc
  1118. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1119. In piece selection functions, Pass std::deque<...> by reference rather
  1120. than returning it.
  1121. * src/BitfieldMan.cc
  1122. * src/BitfieldMan.h
  1123. * src/DefaultBtRequestFactory.cc
  1124. * src/DefaultPieceStorage.cc
  1125. * src/Piece.cc
  1126. * src/Piece.h
  1127. * test/BitfieldManTest.cc
  1128. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1129. Implemented rarest piece first piece selection strategy.
  1130. * src/AbstractBtMessage.cc
  1131. * src/AbstractBtMessage.h
  1132. * src/BitfieldMan.cc
  1133. * src/BitfieldMan.h
  1134. * src/BtBitfieldMessage.cc
  1135. * src/BtHaveAllMessage.cc
  1136. * src/BtHaveMessage.cc
  1137. * src/DefaultPieceStorage.cc
  1138. * src/DefaultPieceStorage.h
  1139. * src/PeerInteractionCommand.cc
  1140. * src/PieceStorage.h
  1141. * src/UnknownLengthPieceStorage.h
  1142. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1143. Rewritten readData and writeData.
  1144. * src/MultiDiskAdaptor.cc
  1145. * src/MultiDiskAdaptor.h
  1146. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1147. Move \n out of the message "Usage: ...".
  1148. * src/version_usage.cc
  1149. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1150. Bump up version number to 0.13.2b.
  1151. * configure.ac
  1152. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1153. Added const qualifier to argument Exception& e.
  1154. * src/Logger.h
  1155. * src/SimpleLogger.cc
  1156. * src/SimpleLogger.h
  1157. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1158. Pool connection when CWD, SIZE command fails.
  1159. * src/FtpNegotiationCommand.cc
  1160. * src/FtpNegotiationCommand.h
  1161. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1162. Renamed HttpNullDownloadCommand as HttpSkipResponseCommand
  1163. * src/HttpResponseCommand.cc
  1164. * src/HttpSkipResponseCommand.cc
  1165. * src/HttpSkipResponseCommand.h
  1166. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1167. Pool connection when a server returns 4xx, 5xx responses.
  1168. * src/HttpNullDownloadCommand.cc
  1169. * src/HttpNullDownloadCommand.h
  1170. * src/HttpResponse.cc
  1171. * src/HttpResponse.h
  1172. * src/HttpResponseCommand.cc
  1173. * src/HttpResponseCommand.h
  1174. * test/HttpResponseTest.cc
  1175. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1176. Print usage when no URL is specifed or bad command-line option is
  1177. specified.
  1178. * src/HelpItemFactory.cc
  1179. * src/help_tags.h
  1180. * src/option_processing.cc
  1181. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1182. Removed duplicate log message.
  1183. * src/AbstractCommand.cc (asyncResolveHostname)
  1184. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1185. Updated man page: --async-dns and --ftp-reuse-connection were added.
  1186. Changed -j option's default value from 5 to 1.
  1187. Added new examples using protocol auto detection feature.
  1188. Removed -T, -M usage where it can be omitted.
  1189. * doc/aria2c.1.txt
  1190. * doc/aria2c.1.html
  1191. * doc/aria2c.1.txt
  1192. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1193. Updated command-line usage text, so that it tells users that they
  1194. can specify any number of torrent files and metalink files in
  1195. command-line.
  1196. * src/version_usage.cc
  1197. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1198. Changed the default value of -j option to 1.
  1199. * src/HelpItemFactory.cc
  1200. * src/option_processing.cc
  1201. * src/usage_text.h
  1202. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1203. Added the ability to reuse connection in FTP and it is enabled by
  1204. default. It can be disabled by --ftp-reuse-connection=false option.
  1205. * src/Command.cc
  1206. * src/DownloadCommand.cc
  1207. * src/FtpDownloadCommand.cc
  1208. * src/FtpDownloadCommand.h
  1209. * src/FtpFinishDownloadCommand.cc
  1210. * src/FtpFinishDownloadCommand.h
  1211. * src/FtpInitiateConnectionCommand.cc
  1212. * src/FtpNegotiationCommand.cc
  1213. * src/FtpNegotiationCommand.h
  1214. * src/HelpItemFactory.cc
  1215. * src/Makefile.am
  1216. * src/Makefile.in
  1217. * src/OptionHandlerFactory.cc
  1218. * src/option_processing.cc
  1219. * src/prefs.h
  1220. * src/usage_text.h
  1221. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1222. Call Command::transitStatus() before calling Command::execute(),
  1223. so that the status change made in execute() is not cleared.
  1224. * src/DownloadEngine.cc
  1225. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1226. Removed forward declaration of SocketCore class.
  1227. * src/HttpDownloadCommand.h
  1228. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1229. Set Request::setKeepAliveHint() and Request::setPipeliningHint()
  1230. in InitiateConnectionCommandFactory. They should be set only when
  1231. the protocol is HTTP or HTTPS.
  1232. * src/InitiateConnectionCommandFactory.cc
  1233. * src/RequestGroup.cc
  1234. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1235. Fixed infinite loop in checksum checking.
  1236. * src/IteratableChecksumValidator.cc
  1237. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1238. Set _supportsPersistentConnection to true by default.
  1239. * src/Request.cc
  1240. * src/RequestGroup.cc
  1241. * test/HttpRequestTest.cc
  1242. * test/RequestTest.cc
  1243. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1244. Added timeout to socket pool. The default timeout is 15 seconds,
  1245. which is the same value Apache uses.
  1246. * src/DownloadEngine.cc
  1247. * src/DownloadEngine.h
  1248. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1249. Fixed misuse of multimap::find()
  1250. * src/HttpHeader.cc
  1251. * test/HttpHeaderTest.cc
  1252. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1253. Rewritten name resolver. Now async DNS can be disabled by --async-dns
  1254. option.
  1255. The asynchronous DNS is not capable of IPv6 yet.
  1256. By disabling asynchronous DNS, aria2 is IPv6 enabled application, at
  1257. least for HTTP download.
  1258. * src/AbstractCommand.cc
  1259. * src/AbstractCommand.h
  1260. * src/AsyncNameResolver.cc
  1261. * src/AsyncNameResolver.h
  1262. * src/DHTEntryPointNameResolveCommand.cc
  1263. * src/DHTEntryPointNameResolveCommand.h
  1264. * src/DownloadEngine.cc
  1265. * src/DownloadEngine.h
  1266. * src/FtpInitiateConnectionCommand.cc
  1267. * src/FtpInitiateConnectionCommand.h
  1268. * src/HelpItemFactory.cc
  1269. * src/HttpInitiateConnectionCommand.cc
  1270. * src/HttpInitiateConnectionCommand.h
  1271. * src/InitiateConnectionCommand.cc
  1272. * src/InitiateConnectionCommand.h
  1273. * src/Makefile.am
  1274. * src/Makefile.in
  1275. * src/NameResolver.cc
  1276. * src/NameResolver.h
  1277. * src/OptionHandlerFactory.cc
  1278. * src/SocketCore.cc
  1279. * src/SocketCore.h
  1280. * src/Util.cc
  1281. * src/Util.h
  1282. * src/option_processing.cc
  1283. * src/prefs.h
  1284. * src/usage_text.h
  1285. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1286. Updated man page: --quiet, --header were added.
  1287. --metalink-servers and --enable-http-keep-alive option were updated.
  1288. * doc/aria2c.1
  1289. * doc/aria2c.1.html
  1290. * doc/aria2c.1.txt
  1291. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1292. Enable HTTP keep-alive by default.
  1293. * src/HelpItemFactory.cc
  1294. * src/option_processing.cc
  1295. * src/usage_text.h
  1296. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1297. Disable http keep-alive if the remote server is not HTTP/1.1.
  1298. * src/HttpConnection.cc
  1299. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1300. Receive content body of 302 response so that the connection can be
  1301. reused later when http keep-alive is enabled.
  1302. * src/HttpNullDownloadCommand.cc
  1303. * src/HttpNullDownloadCommand.h
  1304. * src/HttpResponseCommand.cc
  1305. * src/HttpResponseCommand.h
  1306. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1307. const SharedHandle<Request> -> const SharedHandle<Request>&
  1308. * src/FtpDowndloadCommand.cc
  1309. * src/FtpDowndloadCommand.h
  1310. * src/HttpDownloadCommand.cc
  1311. * src/HttpDownloadCommand.h
  1312. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1313. Fixed the bug that the control file(.aria2 file) is not renamed
  1314. according to tryAutoFileRenaming().
  1315. tryAutoFileRenaming() was rewritten so that if both renamed file and
  1316. its control file exist, use them and continue download.
  1317. The old implementation didn't take into account of control file's
  1318. existence, so basically you couldn't continue download of renamed file.
  1319. * src/BtProgressInfoFile.h
  1320. * src/DefaultBtProgressInfoFile.cc
  1321. * src/DefaultBtProgressInfoFile.h
  1322. * src/NullProgressInfoFile.h
  1323. * src/RequestGroup.cc
  1324. * test/DefaultBtProgressInfoFileTest.cc
  1325. * test/MockBtProgressInfoFile.h
  1326. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1327. Change the default value of --metalink-servers option from `5' to `1'.
  1328. * src/HelpItemFactory.cc
  1329. * src/option_processing.cc
  1330. * src/usage_text.h
  1331. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1332. Reimplemented transparent metalink using Accept request header.
  1333. * src/HttpRequest.cc
  1334. * src/HttpRequest.h
  1335. * src/HttpRequestCommand.cc
  1336. * src/Metalink2RequestGroup.cc
  1337. * src/RequestGroup.cc
  1338. * src/RequestGroup.h
  1339. * test/HttpRequestTest.cc
  1340. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1341. Bump up version number to 0.13.2a
  1342. * configure.ac
  1343. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1344. Updated configure.ac using the result of autoscan.
  1345. * configure.ac
  1346. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1347. Fixed compilation error without gcrypt/openssl.
  1348. * src/DownloadCommand.cc
  1349. * src/DownloadCommand.h
  1350. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1351. Reorganized version information so that it can be displayed in a
  1352. standard terminal screen without scrolling.
  1353. Removed http, ftp from Configuration section, because they are always
  1354. enabled.
  1355. * src/FeatureConfig.cc
  1356. * src/FeatureConfig.h
  1357. * src/main.cc
  1358. * src/messageDigest.cc
  1359. * src/messageDigest.h
  1360. * src/version_usage.cc
  1361. * test/FeatureConfigTest.cc
  1362. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1363. Masked user ID in log.
  1364. * src/FtpConnection.cc (sendUser)
  1365. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1366. Removed query part from filename in HTTP download. The query part means
  1367. the substring after "?" in URL. Firefox seems do the same thing.
  1368. A query part is sometimes very long and not suitable to filename,
  1369. so I think it is better to remove it from filename.
  1370. * src/HttpRequest.cc
  1371. * src/HttpRequest.h
  1372. * src/Request.cc
  1373. * src/Request.h
  1374. * test/HttpRequestTest.cc
  1375. * test/RequestTest.cc
  1376. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1377. Rewritten Exception class. Throw exception object, not its pointer and
  1378. catch by reference, so that remove problematic delete operator for
  1379. catched exception.
  1380. * src/Exception.cc
  1381. * src/Exception.h
  1382. * test/ExceptionTest.cc
  1383. * src/*: All files throwing/catching exception.
  1384. * test/*: All files throwing/catching exception.
  1385. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1386. Now auto protocol detection is enabled without -Z option.
  1387. But there is a important difference between with/without -Z optoin.
  1388. For example, if you type:
  1389. aria2c http://host/file file1.torrent file2.metalink http://mirror/file
  1390. then, aria2 interprets there are 3 request groups:
  1391. (1) http://host/file, http://mirror/file <-- multi-source download
  1392. (2) file1.torrent
  1393. (3) file2.metalink
  1394. On the other hand, if you invoke above command with -Z option, it is
  1395. interpreted as 4 request groups:
  1396. (1) http://host/file
  1397. (2) file1.torrent
  1398. (3) file2.metalink
  1399. (4) http://mirror/file
  1400. I think usually user don't mix multi-source URLs and torrent files, so
  1401. there is no big problem here.
  1402. * src/main.cc
  1403. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1404. Fixed the bug that causes segmentaion fault when reading XML containing
  1405. unescapsed character like '&'.
  1406. Also a modification was made which avoids adding unnecessary
  1407. characters stack and appending unused string.
  1408. * src/ExpatMetalinkProcessor.cc
  1409. * src/FileMetalinkParserState.h
  1410. * src/FilesMetalinkParserState.h
  1411. * src/FinMetalinkParserState.h
  1412. * src/HashMetalinkParserState.h
  1413. * src/InitialMetalinkParserState.h
  1414. * src/LanguageMetalinkParserState.h
  1415. * src/MetalinkMetalinkParserState.h
  1416. * src/MetalinkParserState.h
  1417. * src/MetalinkParserStateMachine.cc
  1418. * src/MetalinkParserStateMachine.h
  1419. * src/OSMetalinkParserState.h
  1420. * src/PieceHashMetalinkParserState.h
  1421. * src/PiecesMetalinkParserState.h
  1422. * src/ResourcesMetalinkParserState.h
  1423. * src/SizeMetalinkParserState.h
  1424. * src/SkipTagMetalinkParserState.h
  1425. * src/URLMetalinkParserState.h
  1426. * src/VerificationMetalinkParserState.h
  1427. * src/VersionMetalinkParserState.h
  1428. * src/XML2SAXMetalinkProcessor.cc
  1429. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1430. Added StringFormat class, which internally calls vasprintf.
  1431. operator<< is defined for this class, so it can be used with iostream
  1432. classes nicely. SimpleLogger and following functions are rewritten
  1433. using StringFormat class.
  1434. Besides, now Logger class's methods are non-const, many classes
  1435. that has a const Logger* as a member variable are modified to remove
  1436. const qualifier from the variable declaration.
  1437. * src/HelpItemFactory.cc
  1438. * src/Request.cc
  1439. * src/SimpleLogger.cc
  1440. * src/StringFormat.cc
  1441. * src/StringFormat.h
  1442. * src/Util.cc
  1443. * src/option_processing.cc
  1444. * src/version_usage.cc
  1445. * test/StringFormatTest.cc
  1446. * src/*.h: The classes that has const Logger* as a member variable.
  1447. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1448. Log error in AccRequestGroup when reading BitTorrent/Metalink file is
  1449. failed. Also fixed memory link when exception is thrown there.
  1450. * src/main.cc (AccRequestGroup)
  1451. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1452. Added build-in "Accept-Features" support. For now only "metalink" is
  1453. used in this header field.
  1454. This "metalink" value is removed from the list when connecting URLs
  1455. fed by metalink file to avoid loop in "transparent" metlaink.
  1456. * src/HttpRequest.cc
  1457. * src/HttpRequest.h: Renamed _userHeaders as _headers. Accept-Features
  1458. header is also held in this variable. Also renamed setUserHeaders as
  1459. addHeader and it was rewritten to add header not just to clear the old
  1460. value.
  1461. * src/HttpRequestCommand.cc
  1462. * src/Metalink2RequestGroup.cc: Added the code to remove "metalink"
  1463. from "Accept-Features" list.
  1464. * src/RequestGroup.cc: Added "metalink" to "Accept-Features" by
  1465. default.
  1466. * src/RequestGroup.h
  1467. * src/TaggedItem.cc: Moved Concat class to a2functional.h.
  1468. * src/a2functional.h: Included <string> because Concat class depends on
  1469. it.
  1470. * test/HttpRequestTest.cc
  1471. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1472. Added comment
  1473. * src/RequestGroup.cc (createNextCommand)
  1474. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1475. Capitalized METHOD_GET and METHOD_HEAD
  1476. * src/Request.cc
  1477. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1478. Added getDownloadResults() method
  1479. * src/RequestGroupMan.cc
  1480. * src/RequestGroupMan.h
  1481. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1482. Fixed the bug that aria2 exits when commands is empty() but
  1483. _routineCommands are not.
  1484. * src/DownloadEngine.cc
  1485. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1486. Use the default value pulled from Option object in HelpItemFactory.
  1487. except options whose defualt value is embedded in a usage text.
  1488. * src/HelpItemFactory.cc
  1489. * src/HelpItemFactory.h
  1490. * src/option_processing.cc
  1491. * src/version_usage.cc
  1492. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1493. Added --quiet option to make aria2 quiet (no console output).
  1494. --quiet option is tagged with ADVANCED.
  1495. * src/HelpItemFactory.cc
  1496. * src/LogFactory.cc
  1497. * src/LogFactory.h
  1498. * src/MultiUrlRequestInfo.cc
  1499. * src/MultiUrlRequestInfo.h
  1500. * src/NullStatCalc.h: New class. This class prints nothing.
  1501. * src/OptionHandlerFactory.cc
  1502. * src/main.cc
  1503. * src/option_processing.cc
  1504. * src/prefs.h
  1505. * src/usage_text.h
  1506. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1507. Add HTTP tag to --header option. Removed ADVANCED tag instead.
  1508. * src/HelpItemFactory.cc (createHelpItems):
  1509. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1510. Fixed compilation error in ExpatMetalinkProcessor.cc
  1511. * src/ExpatMetalinkProcessor.cc
  1512. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1513. Reuse socket if the origin server supports HTTP keep-alive and
  1514. --enable-http-keep-alive or --enable-http-pipelining is given.
  1515. The current implementation doesn't reuse the connections established
  1516. against proxy server.
  1517. * src/AbstractCommand.cc
  1518. * src/DownloadEngine.cc
  1519. * src/DownloadEngine.h
  1520. * src/HttpDownloadCommand.cc
  1521. * src/HttpInitiateConnectionCommand.cc
  1522. * src/HttpResponseCommand.cc
  1523. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1524. Rewritten HTTP keep-alive and pipelining routine.
  1525. * src/AbstractCommand.cc
  1526. * src/HttpConnection.cc
  1527. * src/HttpDownloadCommand.cc
  1528. * src/HttpRequest.cc
  1529. * src/HttpRequestCommand.cc
  1530. * src/HttpResponseCommand.cc
  1531. * src/Request.cc
  1532. * src/Request.h
  1533. * src/RequestGroup.cc
  1534. * test/HttpRequestTest.cc
  1535. * test/HttpResponseTest.cc
  1536. * test/RequestTest.cc
  1537. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1538. Added missing setUserHeaders call
  1539. * src/HttpRequestCommand.cc
  1540. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1541. Call FileAllocationMan::nextFileAllocationEntryExists() first.
  1542. Calling FileAllocationMan::isFileAllocationBeingExecuted() is somwhat
  1543. waste of time because it is more likey false.
  1544. * src/FileAllocationDispatcherCommand.cc (execute)
  1545. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1546. Now HTTP status and version are a member variable of HttpHeader.
  1547. HTTP status is processed as a string, not integer.
  1548. * src/AbstractProxyResponseCommand.cc
  1549. * src/HttpConnection.cc
  1550. * src/HttpHeader.cc
  1551. * src/HttpHeader.h
  1552. * src/HttpHeaderProcessor.cc
  1553. * src/HttpHeaderProcessor.h
  1554. * src/HttpResponse.cc
  1555. * src/HttpResponse.h
  1556. * test/HttpHeaderProcessorTest.cc
  1557. * test/HttpResponseTest.cc
  1558. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1559. Added --header option. You can specify any number of additional HTTP headers
  1560. like:
  1561. aria2 --header="X-A: 300" --header="X-B: 900" http://host/file
  1562. Unlike other commad-line option, you can use --header option multiple times.
  1563. * src/HelpItemFactory.cc
  1564. * src/HttpRequest.{cc, h}
  1565. * src/HttpRequestCommand.cc
  1566. * src/OptionHandlerFactory.cc
  1567. * src/OptionHandlerImpl.h
  1568. * src/option_processing.cc
  1569. * src/prefs.h
  1570. * src/usage_text.h
  1571. * test/HttpRequestTest.cc (testUserHeaders)
  1572. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1573. Eliminates the time lag between sequential downloads and commands in
  1574. the same RequestGroup.
  1575. In old implementation, aria2 occasionally waits 1 seconds before
  1576. executing next command or RequestGroup.
  1577. This is really a waste of time, and new implementation eliminates
  1578. this unnecessary time lag.
  1579. * src/AbstractCommand.cc
  1580. * src/AutoSaveCommand.cc
  1581. * src/CheckIntegrityCommand.cc
  1582. * src/Command.{cc, h}
  1583. * src/DownloadEngine.{cc, h}
  1584. * src/DownloadEngineFactory.cc
  1585. * src/FileAllocationCommand.cc
  1586. * src/FileAllocationDispatcherCommand.cc
  1587. * src/FillRequestGroupCommand.cc
  1588. * src/FtpInitiateConnectionCommand.cc
  1589. * src/HaveEraseCommand.cc
  1590. * src/HttpInitiateConnectionCommand.cc
  1591. * src/HttpResponseCommand.cc
  1592. * src/RealtimeCommand.cc
  1593. * src/RequestGroup.cc
  1594. * src/RequestGroupMan.cc
  1595. * src/StreamFileAllocationEntry.cc
  1596. * src/TimeBasedCommand.{cc, h}
  1597. * src/TimedHaltCommand.cc
  1598. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1599. Rewritten SharedHandle. Now copy constructor taking raw pointer has
  1600. keyword explicit and SharedHandle's default constructor initializes
  1601. its internal obj to null, old implementation initializes it using
  1602. obj's default constructor.
  1603. To assign null, write SharedHandle<T> x(...); x.reset();
  1604. TODO: test/SharedHandleTest.cc needs more tests.
  1605. * src/SharedHandle.h
  1606. 2008-04-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1607. Fixed type in man page.
  1608. * doc/aria2c.1.txt
  1609. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1610. Merged Ross's 0.13.1+1 Cygwin compile fix patch.
  1611. * src/SimpleLogger.{cc, h}
  1612. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1613. Implemented auto protocol detection.
  1614. Now you can do:
  1615. aria2c -Z http://host/file file1.torrent file2.metalink
  1616. (Note: -Z option is required for auto protcol detection.)
  1617. Then aria2c downloads 3 files simultaneously:
  1618. 1. http://host/file
  1619. 2. file1.torrent <-- read local torrent file
  1620. 3. file2.metalink <-- read local Metalink file.
  1621. Same thing goes with -i option. Assume your uris.txt contans:
  1622. http://host/file
  1623. file1.torrent
  1624. file2.metalink
  1625. Then you can do: aria2c -i uris.txt
  1626. (Note: -Z option is not needed if -i option is given.)
  1627. * src/main.cc
  1628. * src/ProtocolDetector.{cc, h}
  1629. * test/ProtocolDetectorTest.cc
  1630. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1631. Fixed compile error without gnutls/libgcrypt/libgpg-error and openSSL
  1632. installed
  1633. * src/ARC4Encryptor.h
  1634. * src/ARC4Decryptor.h
  1635. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1636. Renamed argument from 'errno' to 'err', since errno is confused with
  1637. errno defined in errno.h.
  1638. * src/LibgcryptARC4Decryptor.h
  1639. * src/LibgcryptARC4Context.h
  1640. * src/LibgcryptDHKeyExchange.h
  1641. * src/LibgcryptARC4Encryptor.h
  1642. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1643. Rewritten choking algorithm.
  1644. * src/PeerChokeCommand.{cc, h}
  1645. * src/BtInterestedMessage.cc
  1646. * src/PeerSessionResource.{cc, h}
  1647. * src/DefaultPeerStorage.{cc, h}
  1648. * src/BtNotInterestedMessage.cc
  1649. * src/DefaultBtMessageDispatcher.{cc, h}
  1650. * src/BtMessageDispatcher.h
  1651. * src/Peer.{cc, h}
  1652. * src/BtLeecherStateChoke.{cc, h}
  1653. * src/BtSetup.cc
  1654. * src/BtSeederStateChoke.{cc, h}
  1655. * src/PeerStorage.h
  1656. * test/MockPeerStorage.h
  1657. * test/MockBtMessageDispatcher.h
  1658. 2008-04-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1659. Fixed compilation error on x84-64 platform.
  1660. * src/AuthConfig.cc: Included ostream.
  1661. 2008-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1662. Rewritten getBasename() and getDirname(), without standard library
  1663. basename(), dirname().
  1664. * src/File.cc
  1665. * test/FileTest.cc
  1666. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1667. Added Simplified Chinese translation. Also updated the following
  1668. translations: Polish, Dutch, German. Great thanks to all translators.
  1669. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1670. Suppress content-range error when 'Content-Range' response header
  1671. doesn't contains bytes-unit specifier 'bytes'
  1672. * src/HttpHeader.cc (getRange)
  1673. * test/HttpHeaderTest.cc
  1674. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1675. Fixed compilation error with g++-4.3
  1676. 2008-03-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1677. Added missing include files for MinGW
  1678. * test/HttpHeaderProcessorTest.cc
  1679. * test/DHTRoutingTableSerializerTest.cc
  1680. * test/DHTRoutingTableDeserializerTest.cc
  1681. * test/UriListParserTest.cc
  1682. 2008-03-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1683. Now download line is printed nicely with no garbage at the end of
  1684. line. I use ioctl to get the columns of terminal.
  1685. If stdout is redirected to another device, instead of carriage return,
  1686. end of line '\n' character is used. This is feature request#1909659
  1687. * src/ConsoleStatCalc.cc (calculateStat)
  1688. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1689. Included a2time.h
  1690. * src/DHTMessageDispatcher.h
  1691. * src/DHTMessageEntry.h
  1692. * src/DHTReplaceNodeTask.h
  1693. * src/DHTMessageTracker.h
  1694. * src/Util.h
  1695. * src/CookieBox.h
  1696. * src/SocketCore.h
  1697. * src/DefaultBtMessageDispatcher.h
  1698. * src/SocketCore.cc
  1699. * src/Util.cc
  1700. * src/DHTPingTask.h
  1701. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1702. Fixed high memory footprint when DHT is enabled.
  1703. This is not a memory leak, but DHTReplaceNodeTask is more frequently
  1704. queued than it is processed and the queue is getting longer. As a
  1705. consequence, momory usage is increased.
  1706. As for a fix, instead of issuing DHTReplaceNodeTask, I've implemented
  1707. replacement cache in DHTBucket which is described in Kademlia paper.
  1708. * src/DHTRoutingTable.cc (addNode): Removed the issuing of
  1709. DHTReplaceNodeTask.
  1710. * src/DHTBucket.{h, cc}
  1711. (cacheNode): New function.
  1712. (getCachedNodes): New function.
  1713. (dropNode): Push back cached node to _nodes.
  1714. * test/DHTBucketTest.cc
  1715. (testCacheNode): New test
  1716. (testDropNode): New test
  1717. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1718. Allocate memory for peekBuf in initiateSecureConnection() to avoid
  1719. the unused 4KB memory when ssl is not used.
  1720. * src/SocketCore.cc
  1721. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1722. Added summary log for peer announce storage.
  1723. * src/DHTPeerAnnounceStorage.cc (handleTimeout)
  1724. Removed cast
  1725. * src/DefaultPeerStorage.cc (addPeer)
  1726. Log exception message
  1727. * src/DHTMessageTracker.cc (handleTimeout)
  1728. Fixed casting
  1729. * test/HttpRequestTest.cc
  1730. * test/MetalinkProcessorTest.cc
  1731. * test/PieceTest.cc
  1732. * test/MetalinkEntryTest.cc
  1733. * test/SequenceTest.cc
  1734. 2008-03-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1735. * src/ParameterizedStringParser.cc (createLoop):
  1736. Removed unused variable sstep.
  1737. * src/AlphaNumberDecorator.h (decode): Rewritten.
  1738. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1739. * src/Util.{h, cc}
  1740. (parseUInt): New function.
  1741. (alphaToNum): Now returns unsigned int and 0 when overflow detected.
  1742. The actual range is uint32_t.
  1743. * test/UtilTest.cc
  1744. * src/ParameterizedStringParser.cc:
  1745. Use Util::parseUInt() for loop variables.
  1746. * test/ParameterizedStringParserTest.cc
  1747. * src/PStringNumLoop.h: Make _startValue and _endValue unsigned int.
  1748. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1749. Rewritten the functions for binding port.
  1750. * src/DHTConnectionImpl.{h, cc}
  1751. * src/PeerListenCommand.{h, cc}
  1752. * src/DHTSetup.cc
  1753. * src/BtSetup.cc
  1754. * test/DHTConnectionImplTest.cc
  1755. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1756. type cleanup for allmost all remaining files.
  1757. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1758. Type clarification
  1759. * src/PeerSessionResource.{h, cc}
  1760. * src/DefaultPieceStorage.{h, cc}
  1761. * src/Peer.{h, cc}
  1762. * test/PeerSessionResourceTest.cc
  1763. Use div function
  1764. * src/BtPieceMessage.cc (erasePieceOnDisk)
  1765. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1766. Type clarification
  1767. * src/DefaultPeerStorage.{h, cc}
  1768. * test/DefaultPeerStorageTest.cc
  1769. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1770. Type clarification: size_t for length or size, uint64_t for file
  1771. length, off_t for file offset.
  1772. * src/DefaultBtProgressInfoFile.cc
  1773. * src/DefaultBtContext.{h, cc}
  1774. * src/DefaultBtInteractive.cc
  1775. * src/DownloadCommand.{h, cc}
  1776. * src/IteratableChunkChecksumValidator.{h, cc}
  1777. * src/SegmentMan.{h, cc}
  1778. * src/SingleFileDownloadContext.{h, cc}
  1779. * src/IteratableChecksumValidator.{h, cc}
  1780. * src/BtContext.h
  1781. * src/IteratableValidator.h
  1782. * src/DownloadContext.h
  1783. * test/SingleFileDownloadContextTest.cc
  1784. * test/DefaultBtContextTest.cc
  1785. * test/MockBtContext.h
  1786. * test/Metalink2RequestGroupTest.cc
  1787. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1788. Type clarification: size_t for length or size, uint64_t for file
  1789. length, off_t for file offset.
  1790. * src/PiecedSegment.cc
  1791. * src/GrowSegment.h
  1792. * src/DefaultBtRequestFactory.h
  1793. * src/DefaultBtProgressInfoFile.cc
  1794. * src/UnknownLengthPieceStorage.h
  1795. * src/DefaultPieceStorage.cc
  1796. * src/UnknownLengthPieceStorage.cc
  1797. * src/DefaultBtInteractive.cc
  1798. * src/GrowSegment.cc
  1799. * src/BitfieldMan.h
  1800. * src/DownloadCommand.cc
  1801. * src/BtRequestFactory.h
  1802. * src/PiecedSegment.h
  1803. * src/DefaultPieceStorage.h
  1804. * src/Piece.cc
  1805. * src/DefaultBtRequestFactory.cc
  1806. * src/PieceStorage.h
  1807. * src/Segment.h
  1808. * src/Piece.h
  1809. * src/BitfieldMan.cc
  1810. * src/Util.cc
  1811. * test/DefaultBtProgressInfoFileTest.cc
  1812. * test/DefaultPieceStorageTest.cc
  1813. * test/MockPieceStorage.h
  1814. * test/BtRequestMessageTest.cc
  1815. * test/DefaultBtMessageDispatcherTest.cc
  1816. * test/BitfieldManTest.cc
  1817. * test/GrowSegmentTest.cc
  1818. * test/PieceTest.cc
  1819. * test/SegmentTest.cc
  1820. * test/SegmentManTest.cc
  1821. * test/DefaultBtRequestFactoryTest.cc
  1822. * test/MockBtRequestFactory.h
  1823. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1824. Fixed compilation error with --disable-nls
  1825. It seems that defining gettext(Msgid) to ((const char *) (Msgid))
  1826. in gettext.h causes the problem.
  1827. * src/common.h
  1828. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1829. Removed subPiece related functions.
  1830. * src/Piece.{h, cc} : Also rewritten getCompletedLength().
  1831. * src/DefaultPieceStorage.{h, cc}
  1832. * test/PieceTest.cc
  1833. * test/DefaultPieceStorageTest.cc
  1834. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1835. Use unsigned char for data store.
  1836. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1837. Bump up version number to 0.13.0+1
  1838. * configure.ac
  1839. * Release 0.13.0+1
  1840. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1841. Changed inactive connection timeout to 120.
  1842. To accept more mulually interested peers, disconnect peer when there
  1843. is no interest between us after certain time passed.
  1844. * src/DefaultBtInteractive.cc (checkActiveInteraction)
  1845. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1846. Fixed the bug that aria2 only uses first dns server in resolv.conf
  1847. when compiled with async DNS support.
  1848. * src/DownloadEngine.cc
  1849. * src/option_processing.cc: Lengthened DNS timeout to 30. I think old
  1850. value '10' will be a little bit short when some DNS servers are
  1851. offline and several DNS servers are tried. It should be configured
  1852. by command-line option.
  1853. 2008-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1854. Merged Ross's mingw patch.
  1855. * src/DHTRoutingTableDeserializer.cc
  1856. * src/DHTRoutingTableSerializer.cc
  1857. * src/Platform.{h, cc}
  1858. * src/timegm.h
  1859. * src/gettimeofday.h
  1860. * src/getaddrinfo.h
  1861. * src/SocketCore.h
  1862. * src/common.h
  1863. * src/inet_aton.h
  1864. * src/DownloadEngine.h
  1865. * src/gai_strerror.h
  1866. * src/a2netcompat.h
  1867. * configure.ac
  1868. * configure
  1869. * aclocal.m4
  1870. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1871. Included missing iostream.
  1872. * test/AllTest.cc
  1873. * test/BtDependencyTest.cc
  1874. * test/BtExtendedMessageTest.cc
  1875. * test/DHTConnectionImplTest.cc
  1876. * test/DHTMessageFactoryImplTest.cc
  1877. * test/DHTMessageTrackerEntryTest.cc
  1878. * test/DHTNodeTest.cc
  1879. * test/DHTRoutingTableSerializerTest.cc
  1880. * test/DefaultBtAnnounceTest.cc
  1881. * test/DefaultBtContextTest.cc
  1882. * test/DefaultBtMessageFactoryTest.cc
  1883. * test/DefaultExtensionMessageFactoryTest.cc
  1884. * test/HandshakeExtensionMessageTest.cc
  1885. * test/HttpResponseTest.cc
  1886. * test/MetalinkProcessorTest.cc
  1887. * test/MultiFileAllocationIteratorTest.cc
  1888. * test/SocketCoreTest.cc
  1889. * test/UTPexExtensionMessageTest.cc
  1890. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1891. Reorganized includes.
  1892. * src/NameResolver.cc
  1893. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1894. Fixed compilation error without ares/c-ares
  1895. * src/NameResolver.h:
  1896. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1897. Added a test for large file.
  1898. * test/MetalinkProcessorTest.cc (testLargeFileSize):
  1899. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1900. Fixed the bug that file size is ignored if size > INT32_MAX
  1901. * src/SizeMetalinkParserState.cc (endElement):
  1902. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1903. Bump up version number to 0.13.0
  1904. * configure.ac
  1905. * Release 0.13.0
  1906. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1907. Updated Makfefile.am to make 'make dist' work.
  1908. Now packaged filename is aria2c-VERSION.tar.bz2.
  1909. Added README, README.html, and aria2c.1.html to dist_doc_DATA.
  1910. Added LICENSE.OpenSSL to dist_noinst_DATA.
  1911. Large file support is now configured by configure script.
  1912. * configure.ac
  1913. Removed unsused source files
  1914. * src/
  1915. * test/
  1916. Removed PeerDecl.h and BtContextDecl.h. typedefs are removed to
  1917. Peer.h and BtContext.h respectively.
  1918. * src/Peer.h
  1919. * src/BtContext.h
  1920. Updated translations.
  1921. Added Polish, Thai, Indonesian, Norwegian Nynorsk, Hungarian
  1922. translations. Great thanks to all translators!;)
  1923. * po/*.{po, gmo}
  1924. 2008-02-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1925. Create MessageDigestHelper::staticSHA1DigestInit() which uses
  1926. statically declared sha1 MessageDigestContext.
  1927. * src/BtPieceMessage.cc: Use staticSHA1DigestInit() to avoid
  1928. initialization of short-lived MessageDigestContext.
  1929. * src/MessageDigestHelper.{h, cc}
  1930. * src/main.cc
  1931. Now DownloadCommand has a reference to MessageDigestContext to avoid
  1932. the initialization of MessageDigestContext every time in validating
  1933. chunk checksum.
  1934. * src/DownloadCommand.{h, cc}
  1935. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1936. Add a file descriptor which connected to fast peer(latency<1500) to
  1937. select(). This change reduced CPU load.
  1938. * src/PeerInteractionCommand.cc
  1939. * src/DefaultBtInteractive.{h, cc}
  1940. * src/BtInteractive.h
  1941. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1942. Fixed the previous insufficient fix for possible busy loop.
  1943. * src/MSEHandshake.cc (identifyHandshakeType)
  1944. Removed unused functions.
  1945. * src/MSEHandshake.{h, cc} (readDataAndDecrypt)
  1946. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1947. Fixed possible busy loop if first 20 bytes are not received for a few
  1948. minutes.
  1949. * src/MSEHandshake.{h, cc} (identifyHandshakeType)
  1950. * src/ReceiverMSEHandshakeCommand.cc
  1951. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1952. Fixed compilation error
  1953. * src/ExpatMetalinkProcessor.cc
  1954. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1955. Fixed compile error on Mac OS X, on 64Bit OS maybe.
  1956. * src/DHTBucket.cc
  1957. Removed unnecessary cast.
  1958. * src/HandshakeExtensionMessage.cc
  1959. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1960. Fixed the bug that option handler for PREF_METALINK_ENABLE_UNIQUE_PROTOCOL.
  1961. is missing.
  1962. * src/OptionHandlerFactory.cc
  1963. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1964. Fixed the bug that HAVE message is not sent for a piece they are
  1965. downloaded fom http/ftp server before any BitTorrent handshake is done
  1966. with peers.
  1967. * src/DefaultBtInteractive.cc
  1968. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1969. Removed RequestInfo.h and FileAllocator.h since they have been removed.
  1970. * src/Makefile.am
  1971. * src/Makefile.in
  1972. 2008-02-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1973. Updated README. Added html version of README and man page.
  1974. * README
  1975. * README.html
  1976. * readme2html: Shell script to generate README.html from README using
  1977. asciidoc.
  1978. * doc/aria2c.1.html
  1979. * doc/makeman: Added the line to generate aria2c.1.html
  1980. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1981. Fixed offset calculation.
  1982. * src/LibgcryptDHKeyExchange.h (computeSecret)
  1983. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1984. Rewritten itos and uitos using template. llitos and ullitos are
  1985. replaced with itos and uitos respectively.
  1986. * src/Util.{h, cc}
  1987. * test/UtilTest.cc
  1988. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1989. Fixed the bug that DH key exchange sometimes fails due to bad handling
  1990. of the number of bytes required for storing public key and shared
  1991. secret.
  1992. * src/LibgcryptDHKeyExchange.h
  1993. * src/LibsslDHKeyExchange.h: Also added function name to handleError.
  1994. * src/MSEHandshake.cc
  1995. * test/DHKeyExchangeTest.cc
  1996. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1997. Removed since they are not used.
  1998. * src/Xml2MetalinkProcessor.{h, cc}
  1999. * src/Socket.cc
  2000. * src/SegmentSplitter.{h, cc}
  2001. * test/Xml2MetalinkProcessorTest.cc
  2002. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2003. Fixed the bug that prevents aria2 from stopping other than by pressing
  2004. Ctrl-C in BitTorrent download. It is reproducible using --seed-time
  2005. option. aria2 doesn't stop even after --seed-time is satisfied and
  2006. continues to output blank lines in the console.
  2007. * src/ReceiverMSEHandshakeCommand.cc
  2008. * src/PeerReceiveHandshakeCommand.cc
  2009. * src/PeerListenCommand.cc
  2010. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2011. Bump up version number to 0.13.0rc
  2012. * configure.ac
  2013. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2014. Updated man page and some usage text.
  2015. * doc/aria2c.1.txt
  2016. * src/usage_text.h
  2017. * po/*.{po, gmo}
  2018. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2019. Updated translations. Added Finnish and Hebrew translations.
  2020. Great thanks to all translators!
  2021. * po/*.{po, gmo}
  2022. * po/LINGUAS
  2023. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2024. Log more detailed information about each message.
  2025. * src/DHTQueryMessage.{h, cc}
  2026. * src/DHTGetPeersMessage.{h, cc}
  2027. * src/DHTFindNodeReplyMessage.{h, cc}
  2028. * src/DHTGetPeersReplyMessage.{h, cc}
  2029. * src/DHTAnnouncePeerMessage.{h, cc}
  2030. * src/DHTResponseMessage.{h, cc}
  2031. * src/DHTFindNodeMessage.{h, cc}
  2032. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2033. Use constants defined in prefs.h
  2034. * src/option_processing.cc
  2035. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2036. * test/AllTest.cc: Added OpenSSL, GNUTLS initialization code.
  2037. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2038. Make room for future enchancements for IPv6 addresses.
  2039. Bump up version number of dht.dat file format to 2.
  2040. Not compatible with previous version.
  2041. * src/DHTRoutingTableSerializer.cc
  2042. * src/DHTRoutingTableDeserializer.cc
  2043. * test/DHTRoutingTableSerializerTest.cc
  2044. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2045. Added handling for the return values from
  2046. PeerMessageUtil::createcompact().
  2047. * src/DefaultBtContext.cc (computeFastSet):
  2048. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2049. Fixed abort when peer's ip address is IPv4-mapped address.
  2050. * src/DefaultBtContext.cc (computeFastSet)
  2051. Removed number-and-dots criteria, since Util::isNumberAndDotsNotation()
  2052. cannot handle IPv4-mapped addresses.
  2053. * src/DefaultBtInteractive.cc (addPeerExchangeMessage)
  2054. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2055. Proper return value handling for OpenSSL functions.
  2056. * src/LibsslDHKeyExchange.h
  2057. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2058. Random bytes generation using libgcrypt and OpenSSL.
  2059. * src/DHTUtil.{h, cc}
  2060. * test/DHTUtilTest.cc
  2061. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2062. Fixed segmentation fault when a DHT message which doesn't have 'y' key
  2063. received.
  2064. * src/DHTMessageReceiver.cc (receiveMessage)
  2065. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2066. Fixed the bug that a return code is always 0. BUG#1897704
  2067. If error occurred during the download or there exist unfinished
  2068. downloads, aria2 returns with code 1.
  2069. * src/RequestGroupMan.{h, cc}
  2070. * src/MultiUrlRequestInfo.{h, cc}
  2071. * src/main.cc
  2072. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2073. IPv6 support for SocketCore class.
  2074. TODO: In SocketCore::establishConnection(), this is insufficient to
  2075. determin the failure of connect() here because the socket is
  2076. non-blocking state. The next addresses should be tried after select().
  2077. TODO: NameResolver still uses c-ares(<= 1.4) ares_gethostbyname().
  2078. If c-ares 1.5 or newer is installed, ares_getaddrinfo() should be used
  2079. instead which address family independent.
  2080. TODO: DHTRoutingTable{Deserializer,Serializer} currently saves peer
  2081. information in a compact peer format which is for IPv4 only.
  2082. Some BitTorrent functions in PeerMessageUtil still depends on IPv4 but
  2083. this is a spec of BitTorrent protocol.
  2084. * src/SocketCore.{h, cc}
  2085. * src/PeerMessageUtil.cc
  2086. * test/SocketCoreTest.cc
  2087. * test/PeerMessageUtilTest.cc
  2088. * test/DHTConnectionImplTest.cc
  2089. Handle IPv4-mapped addresses.
  2090. * src/DHTNode.cc: Now identity is determined by node id.
  2091. * src/DHTMessageTrackerEntry.cc
  2092. Because now PeerMessageUtil::unpackcompact() could fail, the caller
  2093. should handle it.
  2094. * src/DHTRoutingTableDeserializer.cc
  2095. * src/DHTMessageFactoryImpl.cc
  2096. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2097. Change the unit of --stop option from a minute to a second.
  2098. * src/usage_text.h
  2099. * src/DownloadEngineFactory.cc
  2100. * src/OptionHandlerFactory.cc
  2101. * src/message.h
  2102. * src/TimedHaltCommand.cc
  2103. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2104. Make listening socket non-block mode.
  2105. * src/FtpConnection.cc
  2106. * src/FtpNegotiationCommand.{h, cc}
  2107. * src/PeerListenCommand.cc
  2108. Fixed the bug that cause slow ftp negotiation.
  2109. * src/FtpNegotiationCommand.{h, cc}
  2110. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2111. Added basic tag to --enable-dht, --dht-listen-port option.
  2112. * src/HelpItemFactory.cc (createHelpItems)
  2113. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2114. Updated text.
  2115. * src/usage_text.h
  2116. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2117. * src/MSEHandshake.cc (encryptAndSendData): Use std::min().
  2118. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2119. Determin _threadtholdSpeed in each constructor for
  2120. ActivePeerConnectionCommand and PeerReceiveHandshakeCommand.
  2121. * src/ActivePeerConnectionCommand.{h, cc}
  2122. * src/PeerReceiveHandshakeCommand.{h, cc}
  2123. * src/BtSetup.cc
  2124. * src/BtConstants.h
  2125. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2126. Added --bt-min-crypto-level and --bt-require-crypto options.
  2127. * src/OptionHandlerFactory.cc
  2128. * src/MSEHandshake.cc
  2129. * src/HelpItemFactory.cc
  2130. * src/option_processing.cc
  2131. * src/ReceiverMSEHandshakeCommand.cc
  2132. * src/prefs.h
  2133. * src/DefaultBtAnnounce.cc
  2134. * src/InitiatorMSEHandshakeCommand.cc
  2135. * src/usage_text.h
  2136. * test/MSEHandshakeTest.cc
  2137. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2138. Bump version number to 0.13.0b
  2139. * configure.ac
  2140. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2141. Updated doc.
  2142. * src/MessageDigestHelper.h:
  2143. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2144. Use raw message digest as a token instead of its hexadecimal
  2145. representation.
  2146. * src/DHTTokenTracker.cc (generateToken)
  2147. 2008-02-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2148. Added Message Stream Encryption(MSE) support.
  2149. Currently, aria2 accepts incoming connections with Obfuscation Header
  2150. and legacy BitTorrent Header and establishes connections with
  2151. Obfuscation Header first and if failed then retry with legacy
  2152. BitTorrent header. If plain text and ARC4 is provided, aria2 always
  2153. choose ARC4. The new option to change the default behavior is planned.
  2154. For tracker extension, "supportcrypto=1" is added statically.
  2155. * src/PeerInitiateConnectionCommand.{h, cc}
  2156. * src/PeerConnection.{h, cc}
  2157. * src/HandleRegistry.h
  2158. * src/SocketCore.h
  2159. * src/PeerReceiveHandshakeCommand.{h, cc}
  2160. * src/BtRegistry.{h, cc}
  2161. * src/PeerListenCommand.cc
  2162. * src/InitiatorMSEHandshakeCommand.{h, cc}
  2163. * src/ReceiverMSEHandshakeCommand.{h, cc}
  2164. * src/MSEHandshake.{h, cc}
  2165. * src/ARC4Encryptor.h
  2166. * src/ARC4Decryptor.h
  2167. * src/LibgcryptARC4Encryptor.h
  2168. * src/LibgcryptARC4Decryptor.h
  2169. * src/LibgcryptARC4Context.h
  2170. * src/LibsslARC4Encryptor.h
  2171. * src/LibsslARC4Decryptor.h
  2172. * src/LibsslARC4Context.h
  2173. * src/DHKeyExchange.h
  2174. * src/LibgcryptDHKeyExchange.h
  2175. * src/LibsslDHKeyExchange.h
  2176. * src/DefaultBtAnnounce.cc: Just added "supportcrypto=1" parameter.
  2177. * test/DefaultBtAnnounceTest.cc
  2178. * test/ARC4Test.cc
  2179. * test/DHKeyExchangeTest.cc
  2180. Removed prepareForRetry() because it is not used.
  2181. * src/PeerAbstractCommand.{h, cc}
  2182. * src/PeerInteractionCommand.{h, cc}
  2183. * src/PeerInitiateConnectionCommand.{h, cc}
  2184. 2008-02-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2185. Added the ability to load nodes from torrent file. These nodes are
  2186. added to the routing table when downloading that torrent.
  2187. * src/BtContext.h
  2188. * src/DefaultBtContext.{h, cc}
  2189. * src/DHTSetup.cc
  2190. * src/DHTEntryPointNameResolveCommand.{h, cc}: Now accepts list of
  2191. hostname and port pair, and resolves all of them.
  2192. * src/NameResolver.{h, cc}: Added reset().
  2193. * src/RequestGroup.cc
  2194. * test/DefaultBtContextTest.cc
  2195. * test/MockBtContext.h
  2196. Removed assert() from DefaultBtContext and throw exception instead.
  2197. * src/DefaultBtContext.cc
  2198. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2199. Fixed segmentation fault bug when exiting if dht is disabled.
  2200. * src/RequestGroup.cc
  2201. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2202. Fixed typo in log message and define the message in message.h
  2203. * src/TimedHaltCommand.cc
  2204. * src/message.h
  2205. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2206. Included RecoverableException.h to fix compilation error.
  2207. * test/DHTMessageFactoryImplTest.cc
  2208. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2209. Added test 'testDoReceivedAction' for DHTQueryMessage subclasses.
  2210. * test/DHTPingMessageTest.cc
  2211. * test/DHTGetPeersMessageTest.cc
  2212. * test/DHTFindNodeMessageTest.cc
  2213. * test/DHTAnnouncePeerMessageTest.cc
  2214. * test/MockDHTMessage.h
  2215. * test/MockDHTMessageFactory.h
  2216. * test/MockDHTMessageDispatcher.h: New class.
  2217. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2218. Added DHTMessageDispatcherImpl. Now DHTMessageDispatcher is pure
  2219. virtual.
  2220. * src/DHTMessageDispatcher.h
  2221. * src/DHTMessageDispatcherImpl.{h, cc}
  2222. * src/DHTSetup.cc
  2223. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2224. Adding handling of DHT error message. Just log error message and
  2225. throw exception.
  2226. * src/DHTMessageFactoryImpl.cc
  2227. * test/DHTMessageFactoryImplTest.cc
  2228. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2229. Added handling of dynamic cast failure.
  2230. * src/DHTNodeLookupTask.cc
  2231. * src/DHTPeerLookupTask.cc
  2232. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2233. Added the ability to stop aria2 itself when given time has passed
  2234. from start. Use --stop option to specify time in minutes.
  2235. When 0 is given, this feature is disabled.
  2236. * src/OptionHandlerFactory.cc
  2237. * src/TimeBasedCommand.h: Make _interval protected scope.
  2238. * src/HelpItemFactory.cc
  2239. * src/option_processing.cc
  2240. * src/prefs.h
  2241. * src/FillRequestGroupCommand.cc: Evaluate _e->isHaltRequested()
  2242. before calling RequestGroupMan::fillRequestGroupFromReserver().
  2243. Without this modification, the result list shows "ERR" when aria2 is
  2244. stopped by --stop option. It should be "INPR".
  2245. * src/DownloadEngine.{h, cc}
  2246. * src/DownloadEngineFactory.cc
  2247. * src/usage_text.h
  2248. * src/TimedHaltCommand.{h, cc}: New class.
  2249. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2250. Bootstrap through node added by port message.
  2251. Currently bootstrap is executed if the number of buckets in routing
  2252. table is 1.
  2253. * src/BtPortMessage.{h, cc}
  2254. * src/DefaultBtMessageFactory.{h, cc}
  2255. * src/PeerInteractionCommand.cc
  2256. * test/BtPortMessageTest.cc
  2257. * test/MockDHTTask.h
  2258. 2008-02-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2259. Extract the Peer class's member variables, which are only needed after
  2260. PeerInteractionCommand, into PeerSessionResource class.
  2261. This class is instantiated in PeerInteractionCommand class's ctor and
  2262. released in its dtor.
  2263. This will make Peer class lightweight and uses less memory for peers
  2264. which are not connected and wait in the queue.
  2265. * src/PeerChokeCommand.cc
  2266. * src/PeerSessionResource.{h, cc}
  2267. * src/PeerInteractionCommand.cc
  2268. * src/PeerAbstractCommand.cc: Note: 0 is given to onAbort() function.
  2269. * src/DefaultBtInteractive.cc
  2270. * src/BtPieceMessage.cc
  2271. * src/BtInterestedMessage.cc
  2272. * src/BtUnchokeMessage.cc
  2273. * src/DefaultPeerStorage.{h, cc}
  2274. * src/PeerInitiateConnectionCommand.cc
  2275. * src/ActivePeerConnectionCommand.cc
  2276. * src/BtNotInterestedMessage.cc
  2277. * src/DefaultBtMessageDispatcher.cc
  2278. * src/BtChokeMessage.cc
  2279. * src/BtRequestMessage.cc
  2280. * src/Peer.{h, cc}
  2281. * src/BtRegistry.h
  2282. * src/TrackerWatcherCommand.cc
  2283. * src/PeerReceiveHandshakeCommand.cc
  2284. * test/BtExtendedMessageTest.cc
  2285. * test/BtAllowedFastMessageTest.cc
  2286. * test/BtCancelMessageTest.cc
  2287. * test/DefaultPieceStorageTest.cc
  2288. * test/BtBitfieldMessageTest.cc
  2289. * test/BtHaveMessageTest.cc
  2290. * test/BtNotInterestedMessageTest.cc
  2291. * test/BtRequestMessageTest.cc
  2292. * test/PeerSessionResourceTest.cc
  2293. * test/DefaultBtMessageDispatcherTest.cc
  2294. * test/PeerTest.cc
  2295. * test/BtInterestedMessageTest.cc
  2296. * test/BtRejectMessageTest.cc
  2297. * test/BtChokeMessageTest.cc
  2298. * test/DefaultPeerStorageTest.cc
  2299. * test/BtHaveNoneMessageTest.cc
  2300. * test/BtHaveAllMessageTest.cc
  2301. * test/DefaultExtensionMessageFactoryTest.cc
  2302. * test/BtUnchokeMessageTest.cc
  2303. * test/DefaultBtMessageFactoryTest.cc
  2304. * test/HandshakeExtensionMessageTest.cc
  2305. * test/UTPexExtensionMessageTest.cc
  2306. * test/DefaultBtRequestFactoryTest.cc
  2307. * test/BtPieceMessageTest.cc
  2308. Removed typedef PeerStats.
  2309. * src/PeerStat.h
  2310. * src/SegmentMan.cc
  2311. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2312. Added std namespace to copy, remove_copy, back_inserter,
  2313. front_inserter.
  2314. * src/RequestGroupMan.cc
  2315. * src/DefaultPieceStorage.cc
  2316. * src/StreamFileAllocationEntry.cc
  2317. * src/BtFileAllocationEntry.cc
  2318. * src/RequestGroup.cc
  2319. * src/MetalinkEntry.cc
  2320. * src/DelegatingPeerListProcessor.cc
  2321. * src/DefaultBtRequestFactory.cc
  2322. * src/DefaultBtMessageDispatcher.cc
  2323. * src/version_usage.cc: Included <algorithm>
  2324. * src/main.cc
  2325. * src/MetalinkParserController.cc
  2326. * src/DefaultBtContext.cc
  2327. * src/DownloadEngineFactory.cc
  2328. * src/a2algo.h
  2329. Removed.
  2330. * test/StreamUriListParserTest.cc
  2331. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2332. Use PREF_MAX_DOWNLOAD_LIMIT as a threshold for
  2333. ActivePeerConnectionCommand when it is given and
  2334. PREF_MAX_DOWNLOAD_LIMIT < default threshold.
  2335. * src/ActivePeerConnectionCommand.{h, cc}
  2336. * src/BtSetup.cc
  2337. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2338. Only add socket to DownloadEngine's select routine when peer or
  2339. localhost is unchoked and interested. This lowers CPU usage a
  2340. little bit.
  2341. * src/PeerInteractionCommand.cc
  2342. * src/PeerAbstractCommand.{h, cc}
  2343. * src/BtInteractive.h
  2344. * src/DefaultBtInteractive.{h, cc}
  2345. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2346. Revert previous change because get_peers message is needed for
  2347. announce_peer anyway.
  2348. * src/DHTGetPeersCommand.cc
  2349. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2350. Request peers thought DHT only when download hasn't finished.
  2351. * src/DHTGetPeersCommand.cc
  2352. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2353. Force refresh bucket when startup if certain time has passed(currently 15 minutes).
  2354. * src/DHTBucketRefreshTask.{h, cc}
  2355. * src/DHTSetup.cc
  2356. 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2357. Removed "using namespace std;" from all sources. Appended std:: prefix to c++
  2358. standard classes.
  2359. Included string.h where mem* function are used.
  2360. Added namespace aria2.
  2361. 2008-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2362. Create directory before saving DHT routing table.
  2363. Now ios::failure is now handled properly.
  2364. * src/DHTAutoSaveCommand.cc
  2365. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2366. Removed unnecessary cerr.
  2367. * src/DownloadEngine.cc
  2368. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2369. Catch exception inside DHTMessageReceiver::receiveMessage().
  2370. Log unknown message.
  2371. * src/DHTMessageReceiver.{h, cc}
  2372. * src/DHTMessageFactory.h
  2373. * src/DHTMessageFactoryImpl.{h, cc}
  2374. * src/DHTMessageTracker.cc (handleTimeout): Catch and handle exception.
  2375. * src/DHTInteractionCommand.cc
  2376. * src/DHTUnknownMessage.{h, cc}
  2377. * test/DHTUnknownMessageTest.cc
  2378. * test/MockDHTMessageFactory.h
  2379. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2380. Commented out ip address comparison because a host can have multiple
  2381. ip addresses and it is hard to predict the hostname is resolved into
  2382. which one.
  2383. * test/SocketCoreTest.cc (testWriteAndReadDatagram)
  2384. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2385. * po/Makefile.in: Removed since this is generated by configure.
  2386. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2387. Fixed compiler warning about redefinition of SIZE_MAX.
  2388. Use common.h instead of config.h directly here.
  2389. * src/Platform.{h, cc}
  2390. The check of ENABLE_NLS is made in gettext.h, so it is not required
  2391. here.
  2392. * common.h
  2393. 2008-02-02 gettextize <bug-gnu-gettext@gnu.org>
  2394. Updated gettext related files.
  2395. * configure.ac (AC_CONFIG_FILES): Add intl/Makefile.
  2396. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17.
  2397. 2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2398. Added DHT functionality, compatible with mainline.
  2399. DHT is disabled by default. To enable it, give --enable-dht to aria2c.
  2400. You may need to specify entry point to DHT network using
  2401. --dht-entry-point. DHT uses UDP port to listen incoming message.
  2402. Use --dht-listen-port to specify port number. Make sure that your
  2403. firewall configuration can pass through UDP traffic to the port.
  2404. The routing table is saved in $HOME/.aria2/dht.dat.
  2405. * src/DHT*
  2406. * src/BNode.{h, cc}
  2407. * src/PeerInteractionCommand.cc: enable DHT functionality for a
  2408. particular torrent.
  2409. * src/Data.cc: Rewritten ctor.
  2410. * src/OptionHandlerFactory.cc: Added --enable-dht, --dht-listen-port,
  2411. --dht-entry-point.
  2412. * src/DefaultBtInteractive.cc: Send port message if dht is enabled.
  2413. * src/RequestGroup.cc: Initialize DHT functionality. When download
  2414. ends, remove BtContext from DHTPeerAnnounceStorage.
  2415. * src/BtPortMessage.{h, cc}: Rewritten.
  2416. * src/message.h
  2417. * src/OptionHandlerImpl.cc
  2418. * src/option_processing.cc: Added --enable-dht, --dht-listen-port,
  2419. --dht-entry-point.
  2420. * src/Dictionary.{h, cc} (remove): New function.
  2421. * src/prefs.h
  2422. * src/DefaultBtMessageFactory.h
  2423. * src/BtHandshakeMessage.cc
  2424. * src/ActivePeerConnectionCommand.cc
  2425. * src/SocketCore.{h, cc}: Added datagram socket support.
  2426. * src/DefaultBtMessageFactory.cc
  2427. * src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
  2428. Create DHT commands.
  2429. * src/BtMessageFactory.h
  2430. * src/PeerMessageUtil.{h, cc}
  2431. 2008-01-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2432. Fixed the bug that log file is not written when configuration file doesn't exist.
  2433. This is caused by using Logger class before LogFactory is not configured.
  2434. BUG #1875079
  2435. * src/option_processing.cc
  2436. Warning message "configuration doesn't exist" is only printed when --conf is
  2437. given.
  2438. * src/option_processing.cc
  2439. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2440. Use BencodeVisitor and MessageDigestHelper instead of ShaVisitor.
  2441. ShaVisitor is now deprecated and slated to be removed.
  2442. * src/DefaultBtContext.cc
  2443. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2444. Externalize message to message.h
  2445. * src/Platform.cc
  2446. * src/message.h
  2447. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2448. Set default domain and default path to cookie.
  2449. * src/HttpResponse.cc
  2450. * src/CookieBox.{h, cc}
  2451. * src/CookieParser.{h, cc}
  2452. * test/CookieParserTest.cc
  2453. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2454. Added --no-conf and --conf-path command-line option.
  2455. --no-conf option disables loading aria2.conf file.
  2456. --conf-path option changes the configuration file path. The default
  2457. file path is $HOME/.aria2/aria2.conf
  2458. Added a warning message when the configuration file is not found.
  2459. * src/HelpItemFactory.cc
  2460. * src/option_processing.cc
  2461. * src/prefs.h
  2462. * src/usage_text.h
  2463. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2464. Added the message to inform users that other help categories are
  2465. available in -h option.
  2466. * src/version_usage.cc
  2467. * src/TagContainer.{h, cc}
  2468. * test/TagContainerTest.cc
  2469. * src/TaggedItem.{h, cc}
  2470. * test/TaggedItemTest.cc
  2471. * src/HelpItem.h
  2472. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2473. Added Piece::getFirstMissingBlockIndexWithoutLock() and it is called
  2474. from PiecedSegment's ctor.
  2475. Previously Piece::getAllMissingBlockIndexes() is called from
  2476. PiecedSegment() but it is rather expensive since only first element is
  2477. used.
  2478. * src/PiecedSegment.cc
  2479. * src/Piece.{h, cc}
  2480. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2481. Rewritten get*Missing*Index functions. Now no need to allocate memory
  2482. each time these functions are called.
  2483. * src/BitfieldMan.{h, cc}
  2484. * test/BitfieldManTest.cc
  2485. * src/array_fun.h
  2486. * test/array_funTest.cc
  2487. Now BitfieldMan::countBlock() returns BitfieldMan::blocks.
  2488. Added new BitfieldMan::countFilteredBlock() to get the number of blocks
  2489. filtered. Removed unnecessary cast to int32_t.
  2490. * src/BitfieldMan.{h, cc}
  2491. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2492. Fixed the bug that EX_TOO_LONG_PAYLOAD exception is thrown if just
  2493. payload length(4bytes) are received. This happens because lenbufLength
  2494. is not updated in this particular case and successive call of
  2495. receiveMessage() overwrites payload length with bytes recieved which
  2496. are payload body.
  2497. * src/PeerConnection.{h, cc}
  2498. * src/message.h
  2499. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2500. Fixed the bug that DefaultPeerStorage::returnPeer() may delete wrong
  2501. peer if there are peers that have same ipaddr and port.
  2502. I've experiened segmentation fault and "pure virtual function was
  2503. called" error.
  2504. * src/Peer.h
  2505. * test/PeerTest.cc
  2506. * src/DefaultPeerStorage.cc
  2507. * test/DefaultPeerStorageTest.cc
  2508. 2008-01-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2509. Removed a call to isPowerOf() because it is no longer necessary here
  2510. and a request block is not always power of 2.
  2511. BUG#1866924
  2512. * src/PeerMessageUtil.cc (checkLength)
  2513. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2514. Fixed the bug that always first found Segment is removed from
  2515. usedSegmentEntries. Removed unused functions.
  2516. * src/SegmentMan.{h, cc}
  2517. * test/SegmentManTest.cc
  2518. Fixed the bug that ServerHost is not removed.
  2519. * src/RequestGroup.cc
  2520. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2521. Fixed the bug that SegmentMan::completeSegment() is not called
  2522. even if Segment is complete when --lowest-speed-limit is enabled.
  2523. BUG#1864525
  2524. * src/DownloadCommand.{h, cc}
  2525. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2526. Fixed: hash algorithm 'sha1' is always used.
  2527. * src/DownloadCommand.cc (validatePieceHash)
  2528. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2529. Added --enable-peer-exchange command-line option.
  2530. * src/OptionHandlerFactory.cc
  2531. * src/HelpItemFactory.cc
  2532. * src/option_processing.cc
  2533. * src/usage_text.h
  2534. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2535. Move extension from BtRuntime to ExtensionMessageFactory, because
  2536. extension can be specified per peer, not per torrent.
  2537. * src/DefaultBtInteractive.cc
  2538. * src/BtRuntime.h
  2539. * src/ExtendedMessagingAware.h
  2540. * src/ExtensionMessageFactory.h
  2541. * src/DefaultExtensionMessageFactory.cc
  2542. * test/DefaultExtensionMessageFactoryTest.cc
  2543. 2008-01-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2544. Added categorized option help. Specify category using --help option.
  2545. Also added the ability to search options in forward match.
  2546. * src/HelpItem.{h, cc}
  2547. * test/HelpItemTest.cc
  2548. * src/HelpItemFactory.{h, cc}
  2549. * src/TagContainer.{h, cc}
  2550. * test/TagContainerTest.cc
  2551. * src/option_processing.cc
  2552. * src/prefs.h
  2553. * src/TaggedItem.{h, cc}
  2554. * test/TaggedItemTest.cc
  2555. * src/version_usage.cc
  2556. * src/help_tags.h
  2557. * src/usage_text.h
  2558. 2008-01-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2559. Fixed segmentation fault when bad torrent metainfo is parsed.
  2560. Added dynamic_cast properly to detect the misconfiguration of metainfo
  2561. and then throw exception or skip it.
  2562. * src/DefaultBtContext.{h, cc}
  2563. * test/DefaultBtContextTest.cc
  2564. * src/AnnounceList.cc
  2565. * src/CompactPeerListProcessor.cc
  2566. * src/message.h
  2567. * src/DefaultBtAnnounce.{h, cc}
  2568. * test/DefaultBtAnnounceTest.cc
  2569. * src/BencodeVisitor.cc
  2570. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2571. Added missing "B"(=Byte). So now the message looks like this:
  2572. Your share ratio was 1.0, uploaded/downloaded=12MiB/12MiB
  2573. * src/message.h (MSG_SHARE_RATIO_REPORT)
  2574. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2575. Show the seed ratio after torrent downloads.
  2576. For example, after torrent download completed and --seed-time and
  2577. --seed-ratio conditions are fulfilled, following message is printed
  2578. right after "Download complete: .....":
  2579. Your share ratio was 1.0, uploaded/downloaded=12M/12M
  2580. * src/RequestGroupMan.cc
  2581. * src/RequestGroup.{h, cc}
  2582. * src/message.h
  2583. 2007-12-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2584. Remove a defunct control file. A defunct control file means that while
  2585. it exists, but the corresponding download file is missing.
  2586. After its removal, a download restarts from the beginning.
  2587. * src/RequestGroup.cc
  2588. * src/message.h
  2589. 2007-12-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2590. Allocate bitfield in Peer when it is really used. More specifically,
  2591. bitfield in Peer is allocated after the connection is established and
  2592. deallocated when the connection is dropped.
  2593. Since 2 parameters(piece length and total length) was removed from the
  2594. constructor of Peer class, many test classes were modified accordingly.
  2595. See svn log for more detailed information.
  2596. * src/PeerInteractionCommand.cc
  2597. * src/CompactPeerListProcessor.cc
  2598. * src/Peer.cc
  2599. * src/DefaultPeerListProcessor.cc
  2600. * src/PeerListenCommand.cc
  2601. * src/PeerReceiveHandshakeCommand.cc
  2602. Fixed memory leak
  2603. * src/Piece.cc
  2604. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2605. Changed the default value of PREF_PEER_CONNECTION_TIMEOUT and
  2606. lowestSpeedLimit in ActivePeerConnectionCommand. TODO: Make them
  2607. command-line options.
  2608. * src/option_processing.cc
  2609. * src/ActivePeerConnectionCommand.cc
  2610. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2611. Send have message to peer if it already has the piece.
  2612. * src/BtHaveMessage.{h, cc}
  2613. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2614. Removed incomingPeer. Set 0 to peer's port if it is not a listening
  2615. port.
  2616. * src/DefaultPeerStorage.{h, cc}
  2617. * test/DefaultPeerStorageTest.cc
  2618. * src/HandshakeExtensionMessage.cc
  2619. * test/HandshakeExtensionMessageTest.cc
  2620. * src/Peer.{h, cc}: Added ipaddr and port to identity comparison.
  2621. * src/PeerStorage.h
  2622. * test/MockPeerStorage.h
  2623. * src/PeerListenCommand.cc
  2624. * src/PeerReceiveHandshakeCommand.cc
  2625. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2626. Added --metalink-enable-unique-protocol option.
  2627. * src/Metalink2RequestGroup.cc
  2628. * src/option_processing.cc
  2629. * src/prefs.h
  2630. * src/version_usage.cc
  2631. * doc/aria2c.1.txt
  2632. * doc/aria2c.1
  2633. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2634. Allow a peer in incomingPeer to be added peers.
  2635. * src/DefaultPeerStorage.cc
  2636. * test/DefaultPeerStorageTest.cc
  2637. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2638. Fixed the bug that causes aria2 not to finish download. BUG#1855875.
  2639. I could reproduce this bug in following procedure:
  2640. 1. Stop the download at the very beginning(1% or 100KB downloaded).
  2641. 2. Restart aria2.
  2642. 3. You see the download stopped around 99%.
  2643. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  2644. * src/StreamFileAllocationEntry.cc: Removed the timeout handling.
  2645. If timeout is reached, then _nextCommand is unused and it may contains
  2646. segments and they won't be canceled. Actually, timeout is not needed
  2647. here because if the server dropped connection, then retry is made.
  2648. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2649. Added uTorrent compatible Peer Exchange.
  2650. * src/BencodeVisitor.{h, cc}
  2651. * test/BencodeVisitorTest.cc
  2652. * src/BtConstants.h
  2653. * src/BtContext.h: Added 'private' flag.
  2654. * src/BtExtendedMessage.{h, cc}
  2655. * test/BtExtendedMessageTest.cc
  2656. * src/BtHandshakeMessage.{h, cc}: Set extended messaging bit in
  2657. reserved field.
  2658. * test/BtHandshakeMessageTest.cc
  2659. * src/BtMessageFactory.h
  2660. * src/BtRegistry.h
  2661. * src/BtRuntime.h: This class holds default extension message IDs for
  2662. aria2. By default, aria2 uses ID 8 for ut_pex.
  2663. * src/DefaultBtContext.cc
  2664. * src/DefaultBtInteractive.{h, cc}: This class holds _utPexEnabled.
  2665. When it is true, aria2 enables ut_pex. This value is set by
  2666. PeerInteractionCommand.
  2667. * src/DefaultBtMessageFactory.{h, cc}
  2668. * test/DefaultBtMessageFactoryTest.cc
  2669. * src/DefaultBtMessageReceiver.cc: Moved the code of fast extension
  2670. handling to DefaultBtInteractive class.
  2671. * src/DefaultExtensionMessageFactory.{h, cc}
  2672. * test/DefaultExtensionMessageFactoryTest.cc
  2673. * src/DefaultPeerStorage.cc: Returns false if a peer is already in
  2674. the container(peers and incomingPeers. The equality is determined by
  2675. Peer::id).
  2676. * test/DefaultPeerStorageTest.cc
  2677. * src/ExtensionMessage.h
  2678. * test/MockExtensionMessage.h
  2679. * src/ExtensionMessageFactory.h
  2680. * test/MockExtensionMessageFactory.h
  2681. * src/HandshakeExtensionMessage.{h, cc}
  2682. * test/HandshakeExtensionMessageTest.cc
  2683. * src/MetaEntry.h
  2684. * src/Peer.{h, cc}
  2685. * src/PeerInteractionCommand.cc
  2686. * src/PeerReceiveHandshakeCommand.cc: Evaluate the return value of
  2687. addIncomingPeer.
  2688. * src/PeerMessageUtil.{h, cc}
  2689. * src/PeerObject.h
  2690. * src/UTPexExtensionMessage.{h, cc}
  2691. * test/UTPexExtensionMessageTest.cc
  2692. * src/message.h
  2693. * src/prefs.h
  2694. Fixed the bug that returns incomplete data when it contains null
  2695. character. A convenient constructor was also added.
  2696. * src/Data.{h, cc}
  2697. Rewritten.
  2698. * src/CompactPeerListProcessor.cc
  2699. Fixed typos.
  2700. * src/message.h
  2701. * src/MetaFileUtil.cc
  2702. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2703. Added "Status Legend" label to the explanation text of 'stat' in
  2704. download result and moved it to the last. BUG#1848214
  2705. * src/RequestGroupMan.cc
  2706. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2707. Fixed the bug that -lexpat is always added to aria2c_LDADD.
  2708. * src/Makefie.am
  2709. * test/Makefile.am
  2710. 2007-12-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2711. Fixed the bug that prevents aria2 from loading cookie file when expire
  2712. value is greater than 2^31-1. BUG#1851066
  2713. * src/CookieBoxFactory.cc
  2714. * test/CookieBoxFactoryTest.cc
  2715. 2007-12-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2716. Fixed possible memory leak when an exception is thrown.
  2717. * src/XML2SAXMetalinkProcessor.cc
  2718. Added Expat support. If both libxml2 and Expat are installed, then
  2719. libxml2 is used by default.
  2720. MetalinkProcessorFactory chooses from XML2SAXMetalinkProcessor and
  2721. ExpatMetalinkProcessor according to the configuration.
  2722. * src/ExpatMetalinkProcessor.{h, cc}
  2723. * src/main.cc: Removed libxml2 specific header and init/free function.
  2724. * src/MetalinkProcessorFactory.{h, cc}
  2725. * src/MetalinkHelper.cc
  2726. * src/Metalinker.h: Removed unnecessary libxml2 header.
  2727. * src/MetalinkProcessor.h
  2728. * test/XML2SAXMetalinkProcessorTest.cc: Removed because
  2729. MetalinkProcessorTest is used instead.
  2730. * test/MetalinkProcessorTest.cc: Added. It is actually the same with
  2731. XML2SAXMetalinkProcessor, replaced XML2SAXMetalinkProcessor with
  2732. MetalinkProcessorFactory::newInstance().
  2733. * m4/libexpat.m4
  2734. * configure.ac: Added configuration options for libexpat.
  2735. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2736. Disabled -s option in metalink download.
  2737. * src/Metalink2RequestGroup.cc
  2738. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2739. If several protocols are available for a mirror in metalink file,
  2740. aria2 now use one of them. --metalink-preferred-protocol option was
  2741. added to specify the preference of protocol.
  2742. * src/AbstractCommand.cc
  2743. * src/OptionHandlerFactory.cc
  2744. * src/ServerHost.{h, cc}
  2745. * src/Metalink2RequestGroup.cc
  2746. * src/RequestGroup.{h, cc}
  2747. * test/RequestGroupTest.cc
  2748. * src/option_processing.cc
  2749. * src/prefs.h
  2750. * src/HttpResponseCommand.cc
  2751. * src/MetalinkResource.{h, cc}
  2752. * src/FtpNegotiationCommand.cc
  2753. * src/MetalinkEntry.{h, cc}
  2754. * src/MetalinkEntryTest.cc
  2755. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2756. Code cleanup and added debug log.
  2757. * src/PeerConnection.cc
  2758. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2759. Compiler error fix: applied the patch by Tiziano Mueller
  2760. * src/RequestGroup.cc
  2761. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2762. Fixed the bug: only first announce URL is tried in AnnounceTier,
  2763. in stopped and completed event.
  2764. * src/AnnounceList.{h, cc}
  2765. * test/AnnounceListTest.cc
  2766. * src/DefaultBtAnnounce.cc
  2767. * test/DefaultBtAnnounceTest.cc
  2768. Sorted URLs.
  2769. * test/Metalink2RequestGroupTest.cc
  2770. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2771. Removed unnecessary string copy. Updated doc and corrected indentation.
  2772. * src/Base64.cc
  2773. Fixed compilation warnings
  2774. * test/DataTest.cc
  2775. * test/HttpRequestTest.cc
  2776. * test/MetaFileUtilTest.cc
  2777. * test/RequestTest.cc
  2778. * Release 0.12.0
  2779. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2780. Updated translations
  2781. * po/{de,fr,ja,nl,ru}.po
  2782. Added Brazilian Portuguese, Catalan, Italian, Spanish, Swedish
  2783. translations. Many thanks to translators.
  2784. * po/{ca,es,it,pt_BR,sv}.po
  2785. * po/LINGUAS
  2786. 2007-12-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2787. Added a notice about URL
  2788. * src/version_usage.cc
  2789. 2007-12-07 Tatsuhiro Tsujikawa <tujikawa at rednoah com>
  2790. Fixed the bug#1845750; CTRL+C does not stop torrent.
  2791. aria2 repeatedly sends stopped request when tracker returns error code.
  2792. * src/AnnounceList.cc
  2793. * test/AnnounceListTest.cc
  2794. * src/AnnounceTier.h
  2795. Added a message when ctrl-c is hit.
  2796. Now second ctrl-c is also handled in signal handler.
  2797. * src/RequestGroupMan.{h, cc}
  2798. * src/RequestGroup.{h, cc}
  2799. * src/MultiUrlRequestInfo.cc
  2800. * src/DownloadEngine.cc
  2801. * src/TrackerWatcherCommand.cc
  2802. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2803. Code cleanup
  2804. * src/Base64.cc (encode)
  2805. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2806. Changed Direct/IO enable/disable procesure in file allocation routine.
  2807. * src/SingleFileAllocationIterator.cc
  2808. (SingleFileAllocationIterator):
  2809. Disable directIO if offset is not multiple of 512.
  2810. (~SingleFileAllocationIterator): Removed a call to disableDirectIO.
  2811. * src/MultiFileAllocationIterator.cc (allocateChunk):
  2812. Enable created SingleFileAllocationIterator's directIO.
  2813. * src/FileAllocationEntry.cc
  2814. (FileAllocationEntry): Enable directIO here.
  2815. (~FileAllocationEntry): Disable directIO here.
  2816. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2817. Fixed the bug: aria2 doesn't utilize fast set index offered by peer.
  2818. * src/Peer.{h, cc}
  2819. * src/DefaultPieceStorage.cc
  2820. * test/DefaultPieceStorageTest.cc
  2821. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2822. Rewritten direct I/O support routine
  2823. * src/SingleFileAllocationIterator.cc
  2824. * src/MultiDiskAdaptor.{h, cc}
  2825. * src/ByteArrayDiskWriter.h
  2826. * src/AbstractSingleDiskAdaptor.h
  2827. * src/AbstractDiskWriter.cc
  2828. * src/DefaultPieceStorage.cc
  2829. * src/DiskWriter.h
  2830. * src/BinaryStream.h
  2831. * src/IteratableChunkChecksumValidator.cc
  2832. * src/IteratableChecksumValidator.cc
  2833. * src/CheckIntegrityEntry.cc
  2834. * src/FileAllocationEntry.cc
  2835. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2836. Fixed typo
  2837. * src/version_usage.cc
  2838. Updated doc
  2839. * doc/aria2c.1.txt
  2840. * doc/aria2c.1
  2841. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2842. Fixed compile error without message digest support.
  2843. * src/FileMetalinkParserState.cc
  2844. * src/MetalinkParserController.{h, cc}
  2845. * test/XML2SAXMetalinkProcessorTest.cc
  2846. * test/MetalinkParserControllerTest.cc
  2847. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2848. Enable direct I/O support in checksum checking.
  2849. * src/IteratableChunkChecksumValidator.{h, cc}
  2850. * test/IteratableChunkChecksumValidatorTest.cc
  2851. * src/CheckIntegrityEntry.cc
  2852. * src/PieceHashCheckIntegrityEntry.cc
  2853. * src/IteratableChecksumValidator.{h, cc}
  2854. * src/BtCheckIntegrityEntry.cc: Added doc.
  2855. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2856. Added --allow-piece-length-change option.
  2857. * src/DefaultBtProgressInfoFile.cc
  2858. * test/DefaultBtProgressInfoFileTest.cc
  2859. * src/OptionHandlerFactory.cc
  2860. * src/option_processing.cc
  2861. * src/prefs.h
  2862. * src/version_usage.cc
  2863. * doc/aria2c.1.txt
  2864. * doc/aria2c.1
  2865. Fixed: duplicated result entry appears when exception is thrown in
  2866. RequestGroup::createInitiateConnectionCommand().
  2867. * src/RequestGroupMan.cc (fillRequestGroupFromReserver):
  2868. Add RequestGroup to _requestGroup after RequetGroup::
  2869. createInitiateConnectionCommand() succeeds.
  2870. Externalized message
  2871. * src/XML2SAXMetalinkProcessor.cc
  2872. * src/message.h
  2873. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2874. Forced download abort when received negative response from http/ftp
  2875. server.
  2876. * src/HttpResponseCommand.cc
  2877. * src/FtpNegotiationCommand.cc
  2878. * src/HttpResponse.cc
  2879. * src/FtpConnection.cc
  2880. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2881. Added XML2SAXMetalinkProcessor class, which is a lot faster than
  2882. the predecessor, Xml2MetalinkParser class.
  2883. I tested them against 94KB metalink file with 1234 chunk checksums.
  2884. The new one parsed it in 22msec, while it took 6000msec with old one.
  2885. * src/XML2SAXMetalinkProcessor.{h, cc}
  2886. * test/XML2SAXMetalinkProcessorTest.cc
  2887. * src/MetalinkParserController.{h, cc}
  2888. * test/MetalinkParserControllerTest.cc
  2889. * src/MetalinkParserState.h: Also added 16 subclasses.
  2890. * src/main.cc
  2891. * src/Metalink2RequestGroup.cc
  2892. * src/MetalinkHelper.cc
  2893. * src/MetalinkEntry.cc
  2894. * src/ChunkChecksum.h
  2895. Rewritten Base64 class for better performance.
  2896. * src/Base64.{h, cc}
  2897. * test/Base64Test.cc
  2898. * src/HttpRequest.cc
  2899. 2007-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2900. Fixed the bug#1841757: aria2 will connect to server to only get
  2901. file size.
  2902. * src/StreamFileAllocationEntry.cc
  2903. * src/option_processing.cc
  2904. * src/HttpResponseCommand.cc: Now reuse connection in segmented
  2905. downloads.
  2906. * src/FtpNegotiationCommand.cc
  2907. Suppressed wrong message when finding PreDownloadHandler
  2908. * src/RequestGroup.cc
  2909. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2910. Updated usage
  2911. * src/version_usage.cc
  2912. Updated man page
  2913. * doc/aria2c.1.txt
  2914. * doc/aria2c.1
  2915. Updated po files
  2916. * po/aria2c.pot
  2917. * po/*.po
  2918. * po/*.gmo
  2919. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2920. Eliminated g++-4.2 warning
  2921. * src/DownloadHandlerConstants.{h, cc}
  2922. * src/Util.cc
  2923. * test/MetaFileUtilTest.cc
  2924. * test/PStringBuildVisitorTest.cc
  2925. Fixed bug: --check-integrity doesn't work for multi file torrent.
  2926. * src/RequestGroup.cc
  2927. * src/BtCheckIntegrityEntry.cc
  2928. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2929. Fixed a2io.h
  2930. * src/a2io.h
  2931. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2932. Added direct I/O support. The current implementation uses O_DIRECT,
  2933. which is not posix standard and is tested on linux 2.6.21.
  2934. Currently only file allocation uses direct I/O.
  2935. * src/SingleFileAllocationIterator.{h, cc}
  2936. * test/SingleFileAllocationIteratorTest.cc
  2937. * src/MultiFileAllocationIterator.{h, cc}
  2938. * test/MultiFileAllocationIteratorTest.cc
  2939. * src/BinaryStream.h
  2940. * src/DiskWriter.h
  2941. * src/AbstractDiskWriter.{h, cc}
  2942. * src/ByteArrayDiskWriter.h
  2943. * src/DiskAdaptor.h
  2944. * src/AbstractSingleDiskAdaptor.{h, cc}
  2945. * src/MultiDiskAdaptor.{h, cc}
  2946. * src/FileAllocationEntry.cc
  2947. * src/Util.{h, cc}
  2948. * src/OptionHandlerFactory.cc
  2949. * src/prefs.h
  2950. * src/version_usage.cc
  2951. * src/option_processing.cc
  2952. Moved FileAllocationMan::markCurrentFileAllocationEntryDone() to
  2953. handleException.
  2954. * src/MultiFileAllocationIterator.cc
  2955. Added EINTR handling
  2956. * src/SocketCore.cc
  2957. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2958. Updated usage
  2959. * src/version_usage.cc
  2960. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2961. Applied Ross's patch for MinGW port.
  2962. * src/DownloadEngine.h
  2963. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2964. Set Content-Type to SingleFileDownloadContext when http response is
  2965. received.
  2966. * src/HttpResponseCommand.cc
  2967. * src/HttpResponse.{h, cc}
  2968. * test/HttpResponseTest.cc
  2969. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2970. Rewritten to add content-type support.
  2971. * src/DownloadHandler.{h, cc}
  2972. * src/BtPostDownloadHandler.{h, cc}
  2973. * test/BtPostDownloadHandlerTest.cc
  2974. * src/MetalinkPostDownloadHandler.{h, cc}
  2975. * test/MetalinkPostDownloadHandlerTest.cc
  2976. * src/PostDownloadHandler.{h, cc}
  2977. * src/DownloadHandlerConstants.{h, cc}
  2978. * src/RequestGroup.cc
  2979. * src/HttpResponseCommand.cc
  2980. * src/FtpNegotiationCommand.cc
  2981. * src/SingleFileDownloadContext.{h, cc}
  2982. * src/RequestGroup.h
  2983. * src/RequestGroupCriteria.h
  2984. * src/ContentTypeRequestGroupCriteria.h
  2985. Added 'mem' option value for --follow-metalink, --follow-torrent.
  2986. If it is give, metalink/torrent file is not written to the disk, but
  2987. just is kept in memory. Parsing is occurred on memory.
  2988. * src/MetalinkHelper.{h, cc}
  2989. * src/MetalinkProcessor.h
  2990. * src/Xml2MetalinkProcessor.{h, cc}
  2991. * test/Xml2MetalinkProcessorTest.cc
  2992. * src/DownloadHandlerFactory.{h, cc}
  2993. * test/DownloadHandlerFactoryTest.cc
  2994. * src/PreDownloadHandler.{h, cc}
  2995. * src/OptionHandlerFactory.cc
  2996. * src/DefaultBtContext.{h, cc}
  2997. * test/DefaultBtContextTest.cc
  2998. * src/version_usage.cc
  2999. * src/Metalink2RequestGroup.{h, cc}
  3000. * src/RequestGroup.{h, cc}
  3001. * src/a2functional.h
  3002. * test/a2functionalTest.cc
  3003. * src/MemoryBufferPreDownloadHandler.{h, cc}
  3004. * src/OptionHandlerImpl.h
  3005. * src/prefs.h
  3006. * src/Util.{h, cc}
  3007. * test/UtilTest.cc
  3008. Keep DownloadResult rather than RequestGroup after downloads to reduce
  3009. memory usage.
  3010. * src/RequestGroupMan.{h, cc}
  3011. * src/DownloadEngine.cc
  3012. * src/BtDependency.{h, cc}: Changed the type of dependee from
  3013. WeakHandle to SharedHandle because WeakHandle could be null.
  3014. * src/RequestGroup.{h, cc}
  3015. * src/DownloadEngineFactory.cc
  3016. * src/DownloadResult.h
  3017. Set totalLength after download finished
  3018. * src/UnknownLengthPieceStorage.{h, cc}
  3019. Keep torrent file specified in metalink in memory.
  3020. * src/Metalink2RequestGroup.cc
  3021. * src/BtDependency.cc
  3022. * src/TrueRequestGroupCriteria.h
  3023. Fixed the bug: seekg is used where seekp should be used.
  3024. * src/ByteArrayDiskWriter.cc
  3025. * test/ByteArraydiskWriterTest.cc
  3026. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3027. Fixed syntax error
  3028. * test/SequenceTest.cc
  3029. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3030. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  3031. * src/RequestGroupMan.cc (isSameFileBeingDownloaded)
  3032. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  3033. * src/RequestGroup.cc (downloadFinishedByFileLength)
  3034. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3035. Added the check to see whether ares_host_callback accepts timeouts
  3036. with c-ares; only c-ares 1.5.0 or newer accepts it.
  3037. * src/NameResolver.{h, cc}
  3038. * m4/libcares.m4
  3039. * configure.ac: Set C++ for language choice.
  3040. 2007-11-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3041. Fixed: compilation fails without c-ares/ares
  3042. * src/DownloadEngine.cc (addCommand): Moved outside #ifdef
  3043. Generate http/ftp commands only when download is incomplete.
  3044. * src/BtFileAllocationEntry.cc (prepareForNextAction)
  3045. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3046. Corrected typo. Examples are removed since they are available in man
  3047. page.
  3048. * src/version_usage.cc
  3049. Updated man page.
  3050. * doc/aria2c.1
  3051. * doc/aria2c.1.txt
  3052. * doc/makeman: Commented out sed command.
  3053. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3054. Throw DlAbortEx when a remote file is not found.
  3055. * src/HttpResponse.cc
  3056. * src/FtpNegotiationCommand.cc
  3057. * src/message.h
  3058. Overwrite an existing file if --allow-overwrite=true is given.
  3059. * src/RequestGroup.cc
  3060. Removed unused functions
  3061. * src/AbstractCommand.h
  3062. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3063. Removed 'extern' from 'extern typedef ...' in src/*.h
  3064. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3065. Updated usage
  3066. * src/version_usage.cc
  3067. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3068. Trim announce URL
  3069. * src/DefaultBtContext.cc
  3070. * test/ShaVisitorTest.cc
  3071. Trim argument s. Give trimed s to exception constructor.
  3072. * src/Util.cc (parseInt)(parseLLInt)
  3073. * test/UtilTest.cc
  3074. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3075. Set precision back to 1.
  3076. * src/ConsoleStatCalc.cc (calculateStat)
  3077. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3078. Replaced strtol with Util::parseInt
  3079. * src/ChunkedEncoding.cc
  3080. * src/HttpConnection.cc
  3081. * src/CookieBoxFactory.cc
  3082. * src/ParameterizedStringParser.cc
  3083. * src/Util.cc
  3084. * test/UtilTest.cc
  3085. * test/OptionHandlerTest.cc
  3086. * src/Request.cc
  3087. Throw exception when empty string is given. The message for exception
  3088. changed.
  3089. * src/Util.cc (parseInt)(parseLLInt)
  3090. * src/message.h
  3091. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3092. Set precision to 2 because share ratio is rounded into 1.0 if precision
  3093. set to 1.
  3094. * src/ConsoleStatCalc.cc (calculateStat)
  3095. 2007-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3096. Preallocate non-requested file which is adjacent forward to requested
  3097. file('requested' files means the files given in --select-file option)
  3098. if they share a same piece.
  3099. This fixes long pause in the file system which doesn't support sparse
  3100. files like FAT32 while downloading.
  3101. * src/MultiFileAllocationIterator.{h, cc}
  3102. * test/MultiFileAllocationIteratorTest.cc
  3103. * src/FileEntry.{h, cc}
  3104. Removed unused _option.
  3105. * src/MultiDiskAdaptor.h
  3106. * test/MultiDiskAdaptorTest.cc
  3107. * src/DefaultPieceStorage.cc
  3108. Set the default value of --seed-ratio to 1.0.
  3109. If 0.0 is given, then seeding continues regardless of share ratio.
  3110. * src/version_usage.cc
  3111. * src/option_processing.cc
  3112. * src/BtSetup.cc
  3113. * doc/aria2c.1.txt
  3114. * doc/aria2c.1
  3115. Fixed: Selective download is not working in BitTorrent
  3116. * src/RequestGroup.cc
  3117. Introduced Sequence class. Use this instead of Util::unfoldRange()
  3118. * src/PieceStorage.h
  3119. * test/MockPieceStorage.h
  3120. * src/UnknownLengthPieceStorage.h
  3121. * src/DefaultPieceStorage.{h, cc}
  3122. * src/Metalink2RequestGroup.cc
  3123. * src/RequestGroup.cc
  3124. * src/Sequence.h
  3125. * test/SequenceTest.cc
  3126. * src/IntSequence.h
  3127. * src/message.h
  3128. * src/Util.{h, cc}
  3129. * test/UtilTest.cc
  3130. Added new function 'parse' to catch exception thrown by subclass's
  3131. parseArg
  3132. * src/OptionHandler.h
  3133. * src/OptionParser.cc
  3134. * src/NameMatchOptionHandler.h
  3135. * src/OptionHandlerImpl.h
  3136. * test/OptionHandlerTest.cc
  3137. Added IntegerRangeOptionHandler. Used for --listen-port and
  3138. --select-file. Now --listen-port accepts range of port.
  3139. * src/OptionHandlerFactory.cc
  3140. * src/version_usage.cc
  3141. * src/OptionHandlerImpl.h
  3142. * src/option_processing.cc
  3143. * src/BtSetup.cc
  3144. * src/PeerListenCommand.{h, cc}
  3145. * doc/aria2c.1.txt
  3146. * doc/aria2c.1
  3147. Implemented operator< for Exception class to provide easy way to print
  3148. exception stack trace.
  3149. * src/Exception.{h, cc}
  3150. * src/main.cc
  3151. * src/option_processing.cc
  3152. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3153. * src/version_usage.cc
  3154. (showVersion): Reworked.
  3155. (showUsage): Added examples.
  3156. Removed Hint for total length and file name.
  3157. * src/Metalink2RequestGroup.cc
  3158. * src/RequestGroup.{h, cc}
  3159. * src/HttpResponseCommand.cc
  3160. * src/FtpNegotiationCommand.cc
  3161. Now --follow-torrent and --follow-metalink option work properly.
  3162. * src/RequestGroup.cc
  3163. Updated man page
  3164. * doc/aria2c.1.txt
  3165. * doc/aria2c.1
  3166. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3167. Removed.
  3168. * src/PiecedSegment.{h, cc} (operator==)(operator!=)
  3169. Use Segment::operator==()
  3170. * src/HttpConnection.cc
  3171. * src/Segment.h
  3172. Updated usage
  3173. * src/version_usage.cc
  3174. Added EINTR treatment.
  3175. * src/SocketCore.cc
  3176. * src/AbstractDiskWriter.cc
  3177. Rewritten.
  3178. * src/Util.cc (rangedFileCopy)
  3179. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3180. Fixed typo.
  3181. * src/version_usage.cc
  3182. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3183. Implemented. Now -c option works fine.
  3184. * src/DefaultPieceStorage.cc (markPiecesDone)
  3185. * test/DefaultPieceStorageTest.cc
  3186. Removed.
  3187. * src/SegmentMan.{h, cc}
  3188. (markAllPiecesDone)
  3189. (markPieceDone)
  3190. Synchronized po files with
  3191. https://translations.launchpad.net/aria2/trunk/+pots/aria2c
  3192. * src/fr.po
  3193. * src/ru.po
  3194. * src/de.po
  3195. * src/ja.po
  3196. 2007-11-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3197. Added ifdef and some modifications to compile without BitTorrent,
  3198. Metalink, MessageDigest
  3199. support.
  3200. * src/PieceHashCheckIntegrityEntry.cc
  3201. * src/MetalinkEntry.h
  3202. * src/version_usage.cc
  3203. * src/main.cc
  3204. * src/DownloadEngine.{h, cc}
  3205. * src/Metalink2RequestGroup.cc
  3206. * src/Peer.cc
  3207. * src/RequestGroup.cc
  3208. * src/MetalinkHelper.cc
  3209. * test/DefaultPieceStorageTest.cc
  3210. * test/MetalinkPostDownloadHandlerTest.cc
  3211. * test/Metalink2RequestGroupTest.cc
  3212. Hide TOTAL SPD when all downloads complete.
  3213. * src/ConsoleStatCalc.cc
  3214. Log target system information.
  3215. * src/main.cc
  3216. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3217. Now --metalink-location accepts a comma-deliminated list of locations.
  3218. * src/MetalinkEntry.{h, cc}
  3219. * test/MetalinkEntryTest.cc
  3220. * src/version_usage.cc
  3221. * src/Metalink2RequestGroup.cc
  3222. * src/Xml2MetalinkProcessor.cc
  3223. * test/Xml2MetalinkProcessorTest.cc
  3224. * doc/aria2c.1.txt
  3225. * doc/aria2c.1
  3226. * src/Util.cc (toUpper)(toLower): Rewritten.
  3227. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3228. Added the ability to detect duplicate download entry which is about to
  3229. download the same file other RequestGroup is downloading.
  3230. * src/RequestGroup.cc
  3231. * src/HttpResponseCommand.cc
  3232. * src/FtpNegotiationCommand.cc
  3233. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3234. Recalculates download progress when loading a control file,
  3235. if the piece length of DownloadContext is different from the one saved
  3236. in the control file. Currently in-flight pieces are ignored.
  3237. * src/DefaultBtProgressInfoFile.cc
  3238. * test/DefaultBtProgressInfoFileTest.cc
  3239. * src/Util.{h, cc}
  3240. * test/UtilTest.cc
  3241. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3242. Do not rotate tiers in announce-list.
  3243. * src/DefaultBtAnnounce.{h, cc}: Removed trackerNumTry.
  3244. AnnounceList::allTiersFailed() used instead to detect whether all
  3245. tiers are tried and failed.
  3246. * test/DefaultBtAnnounceTest.cc
  3247. * src/AnnounceList.{h, cc}: If all tiers are tried and failed then
  3248. allTiersFailed() returns true. To reset tier pointer, call resetTier();
  3249. * test/AnnounceListTest.cc
  3250. * src/TrackerWatcherCommand.cc (execute): Removed DlAbortEx catch
  3251. clause. Catch RecoverableException instead of DlRetryEx instead.
  3252. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3253. Implemented checksum validation feature(1 checksum for each file)
  3254. The validation takes place after the download.
  3255. * src/PieceHashCheckIntegrityEntry.{h, cc}: New class.
  3256. * src/IteratableChecksumValidator.{h, cc}: Rewritten.
  3257. * src/CheckIntegrityCommand.cc: Changed log message.
  3258. * src/Metalink2RequestGroup.cc: Set checksum to
  3259. SingleFileDownloadContext.
  3260. * src/StreamCheckIntegrityEntry.{h, cc}: Now derived from
  3261. PieceHashCheckIntegrity class.
  3262. * src/BtCheckIntegrityEntry.{h, cc}: Now derived from
  3263. PieceHashCheckIntegrity class.
  3264. * src/ChecksumCheckIntegrityEntry.{h, cc}: New class.
  3265. * src/IteratableValidator.h: New class.
  3266. * src/message.h
  3267. * src/CheckIntegrityEntry.{h, cc}
  3268. * src/IteratableChunkChecksumValidator.{h, cc}
  3269. * src/SingleFileDownloadContext.h
  3270. * src/DownloadCommand.cc
  3271. --allow-overwrite=true is no longer needed to check file integrity
  3272. before download in BitTorrent download.
  3273. * src/RequestGroup.cc (getInitialCommand)
  3274. Removed RequestGroup from queue when RequestGroup::getInitialCommand()
  3275. throws exception.
  3276. * src/RequestGroupMan.cc (getInitialCommands)
  3277. 2007-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3278. urlencode the given url inside Request::parseUrl(...)
  3279. * src/Request.{h, cc}
  3280. * src/Util.{h, cc}
  3281. * test/RequestTest.cc
  3282. Removed #!metalink3! notation support because it is deleted from
  3283. the metalink specification.
  3284. * src/Request.{h, cc}
  3285. * test/RequestTest.cc
  3286. 2007-11-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3287. Don't connect server before checking file integrity at startup, if
  3288. filesize and output file path are known.
  3289. * src/AbstractCommand.cc
  3290. * src/StreamFileAllocationEntry.cc
  3291. * src/Metalink2RequestGroup.cc
  3292. * src/RequestGroup.{h, cc}
  3293. * src/HttpResponseCommand.cc
  3294. * src/FtpNegotiationCommand.cc
  3295. Added DownloadFailureException. If it is thrown, RequestGroup should
  3296. halt.
  3297. * src/AbstractCommand.cc
  3298. * src/DownloadFailureException.h
  3299. * src/RequestGroup.cc
  3300. Catch RecoverableException, instead of DlAbortEx.
  3301. * src/RequestGroupMan.cc
  3302. * src/FillRequestGroupCommand.cc
  3303. * src/MetaFileUtil.cc
  3304. * src/IteratableChunkChecksumValidator.cc
  3305. Now first parameter of MSG_DOWNLOAD_ABORTED is gid(RequestGroup::
  3306. getGID())
  3307. * src/CheckIntegrityCommand.cc
  3308. * src/message.h
  3309. Print gid instead of idx.
  3310. * src/RequestGroupMan.cc
  3311. Removed exception throwers declaration.
  3312. * src/DirectDiskAdaptor.{h, cc}
  3313. * src/SocketCore.{h, cc}
  3314. * src/MultiDiskAdaptor.{h, cc}
  3315. * src/HttpConnection.{h, cc}
  3316. * src/HttpResponse.{h, cc}
  3317. * src/DiskAdaptor.{h, cc}
  3318. * src/CopyDiskAdaptor.{h, cc}
  3319. * src/MultiDiskAdaptor.{h, cc}
  3320. * src/HttpHeaderProcessor.{h, cc}
  3321. * src/AbstractSingleDiskAdaptor.{h, cc}
  3322. * src/Util.{h, cc}
  3323. * test/UtilTest.cc
  3324. * src/DefaultDiskWriter.{h, cc}
  3325. * src/FtpConnection.{h, cc}
  3326. * src/AbstractDiskWriter.{h, cc}
  3327. Removed duplicate code.
  3328. * src/StreamCheckIntegrityEntry.cc
  3329. Removed unnecessary include.
  3330. * src/DiskWriter.h
  3331. Included Exception.h
  3332. * src/option_processing.cc
  3333. Included 2 files and added doc
  3334. * src/TrackerWatcherCommand.cc
  3335. * src/SocketCore.cc (writeData): Fixed send error with GnuTLS.
  3336. 2007-11-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3337. Changed CheckIntegrityEntry interface so that it can define
  3338. the action when all the chunk checksums are valid.
  3339. * src/CheckIntegrityEntry.h
  3340. * src/StreamCheckIntegrityEntry.{h, cc}
  3341. * src/BtCheckIntegrityEntry.{h, cc}: Currently,when all the checksums
  3342. are valid, then aira2 goes to seeding mode. Sometimes it is better
  3343. to exit rather than doing seeding. So, it would be good to toggle this
  3344. behavior.
  3345. * src/CheckIntegrityCommand.cc
  3346. * src/AbstractCommand.cc
  3347. * src/RequestGroup.cc
  3348. 2007-11-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3349. Reflect the download length of in-flight pieces.
  3350. It makes the download length readout more precise.
  3351. * src/DefaultPieceStorage.{h, cc}
  3352. * test/DefaultPieceStorageTest.cc
  3353. * src/a2functional.h
  3354. * test/a2functionalTest.cc
  3355. Lower CPU load when --max-download-limit is used.
  3356. There is up and down in speed indicator when enabling
  3357. http-pipelining but a download goes well. I think the problem is that
  3358. because http-pipelining is enabled, DownloadCommand is created for
  3359. each segment and in its constructor, PeerStat::downloadStart() is
  3360. called. In PeerStat::downloadStart(), speed calculation object is
  3361. reseted, which makes download speed zero.
  3362. * src/DownloadCommand.cc
  3363. Rewritten using accumulate.
  3364. * src/RequestGroupMan.cc (calculateStat)
  3365. Code clearnup.
  3366. * src/FtpNegotiationCommand.cc
  3367. * src/HttpResponseCommand.cc
  3368. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3369. Fixed: Can not resume: aria2 reports download already finished.
  3370. * src/AbstractCommand.{h, cc}
  3371. * src/HttpResponseCommand.cc
  3372. * src/FtpNegotiateCommand.cc
  3373. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3374. Now a file is stored in the directory specified in .metalnk file
  3375. (file[@name]).
  3376. * src/Metalink2RequestGroup.cc
  3377. Create the directory structure when opening the file if it doesn't
  3378. exist.
  3379. * src/AbstractDiskWriter.cc
  3380. * src/Util.{h, cc}
  3381. * src/File.h
  3382. * test/UtilTest.cc
  3383. Removed file name comparison
  3384. * src/Metalink2RequestGroup.cc
  3385. * src/HttpResponseCommand.cc
  3386. Rewritten using Util::mkdirs()
  3387. * src/FileEntry.cc (setupDir)
  3388. * test/FileEntryTest.cc
  3389. Updated doc
  3390. * src/SingleFileDownloadContext.h
  3391. 2007-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3392. Now SleepCommand dispatches nextCommand when halt is requested.
  3393. It avoids a possible long wait after hitting CTRL-C.
  3394. * src/SleepCommand.{h, cc}
  3395. * src/RequestGroupAware.{h, cc}
  3396. 2007-11-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3397. Fixed: the listen port sent to the tracker is wrong. If aria2 fails
  3398. to open listen port, then remove the port number from the tracker
  3399. request.
  3400. * src/DefaultBtAnnounce.cc
  3401. * test/DefaultBtAnnounceTest.cc
  3402. * test/MockPieceStorage.h
  3403. Inject randomizer to DefaultBtAnnounce and DefaultBtContext to make
  3404. them more testable.
  3405. * src/DefaultBtAnnounce.{h, cc}
  3406. * src/DefaultBtContext.{h, cc}
  3407. * src/Util.{h, cc}
  3408. * test/DefaultBtAnnounceTest.cc
  3409. * test/DefaultBtContextTest.cc
  3410. * test/UtilTest.cc
  3411. Added 'B' to upload bytes readout.
  3412. * src/ConsoleStatCalc.cc
  3413. Now the listen port for BitTorrent download is opened when it is
  3414. needed.
  3415. * src/DownloadEngineFactory.cc
  3416. * src/BtSetup.{h, cc}
  3417. * src/PeerListenCommand.{h, cc}
  3418. Now an exception thrown while parsing tracker response is now logged.
  3419. If DlAbortEx is catched, then btAnnounce->resetAnnounce() immediately
  3420. called, which means no retry is made in this case, assuming a tracker
  3421. has a problem.
  3422. * src/TrackerWatcherCommand.cc
  3423. Fixed: downloading a file whose length is unkown fails.
  3424. * src/DownloadCommand.cc
  3425. Simplified prepareForNextSegment()
  3426. * src/DownloadCommand.cc
  3427. Updated
  3428. * po/POTFILES.in
  3429. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3430. Re-implemented a file listing for Metalink, which was dropped while
  3431. http/ftp/torrent integration was being implemented.
  3432. * src/MetalinkHelper.{h, cc}: New class.
  3433. * test/MetalinkHelperTest.cc
  3434. * src/main.cc
  3435. * src/Metalink2RequestGroup.cc
  3436. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3437. Added the ability to display the detailed torrent file information.
  3438. Now -S option gives not only a file listing, but also total download
  3439. length, info hash, announce URI, piece length, the number of pieces,
  3440. and mode(single or multi-torrent).
  3441. * src/DefaultBtContext.{h, cc} (operator<<): New function.
  3442. * src/Util.cc (toStream): Show file length in a abbreviated form(like
  3443. KiB)
  3444. * test/UtilTest.cc
  3445. * src/main.cc
  3446. 2007-10-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3447. Added ftp://USER:PASSWD@Servername automatic parsing.
  3448. * src/Request.{h, cc}: Removed AuthResolvers. Added _username and
  3449. _password. Recognize username and password in URI.
  3450. * src/main.cc: Use AuthConfigFactory instead of RequestFactory.
  3451. * src/RequestGroup.cc: Use AuthConfigFactory instead of RequestFactory.
  3452. * src/RequestFactory.{h, cc}: Removed.
  3453. * src/AuthConfigFactory.{h, cc}: New class.
  3454. * src/FtpConnection.cc: Use AuthConfigFactory.
  3455. * src/HttpRequest.cc: Use AuthConfigFactory.
  3456. * test/HttpRequestTest.cc: Updated.
  3457. * test/RequestTest.cc: Updated.
  3458. * test/AuthConfigFactoryTest.cc: New class.
  3459. * test/RequestFactoryTest.cc: Removed.
  3460. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3461. Use RequestGroup::allDownloadFinished() to decide whether the control
  3462. file should be removed or saved.
  3463. * src/RequestGroup.{h, cc} (allDownloadFinished): New function.
  3464. * src/RequestGroupMan.cc (removeStoppedGroup) (save)
  3465. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3466. Use File::renameTo()
  3467. * src/DefaultBtProgressInfoFile.cc
  3468. Added --no-file-allocation-limit command-line option.
  3469. * src/version_usage.cc
  3470. * src/option_processing.cc
  3471. * src/OptionHandlerFactory.cc
  3472. * src/RequestGroup.{h, cc}
  3473. * src/BtCheckIntegrityEntry.cc
  3474. * src/StreamCheckIntegrityEntry.cc
  3475. * src/prefs.h
  3476. * doc/aria2c.1.txt
  3477. * doc/aria2c.1
  3478. Now prealloc is the default value for --file-allocation option.
  3479. * src/version_usage.cc
  3480. * src/option_processing.cc
  3481. * doc/aria2c.1.txt
  3482. * doc/aria2c.1
  3483. Don't URL-encode user-agent.
  3484. * src/HttpRequest.cc
  3485. Updated translations
  3486. * po/LINGUAS: Added nl for Dutch translation.
  3487. * po/nl.po: Added Dutch translation, thanks to A. Bram Neijt.
  3488. * po/de.po: Updated German translation, thanks to Patrick Ruckstuhl.
  3489. * po/POTFILES.in: Updated.
  3490. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3491. Added the ability to recognize url-list in a torrent file.
  3492. The retrieved URLs are attached to the corresponding FileEntry.
  3493. * src/DefaultBtContext.{h, cc}
  3494. * src/FileEntry.{h, cc}
  3495. * test/DefaultBtContextTest.cc
  3496. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3497. * src/ConsoleStatCalc.cc: Let the user know that aria2 is now seeding
  3498. after the download finishes.
  3499. 2007-10-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3500. * src/Piece.{h, cc}: Added SubPiece infrastructure to track down
  3501. the data smaller than block length.
  3502. A block length can be specified by constructor's argument.
  3503. * src/DefaultPieceStorage.{h, cc} (getMissingPiece):
  3504. Get a missing piece in the range of given FileEntry. This function is
  3505. not used in the program yet.
  3506. * src/Util.h: Added some macros.
  3507. 2007-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3508. Added HTTP/1.1 keep alive and pipelining support.
  3509. See --enable-http-keep-alive and --enable-http-pipelining option.
  3510. * src/AbstractCommand.{h, cc}: Now it has one-to-many relation to
  3511. Segment.
  3512. * src/HttpDownloadCommand.{h, cc}
  3513. * src/OptionHandlerFactory.cc
  3514. * src/HttpConnection.{h, cc}
  3515. * src/version_usage.cc
  3516. * src/HttpInitiateConnectionCommand.cc
  3517. * src/FtpInitiateConnectionCommand.cc
  3518. * src/Segment.h
  3519. * src/HttpRequestCommand.{h, cc}
  3520. * src/option_processing.cc
  3521. * src/prefs.h
  3522. * src/HttpResponseCommand.cc
  3523. * src/SegmentMan.{h, cc}
  3524. * src/FtpNegotiateCommand.cc
  3525. * src/HttpProxyResponseCommand.cc
  3526. * src/Request.cc
  3527. * src/HttpRequest.cc
  3528. * src/DownloadCommand.cc
  3529. * test/HttpRequestTest.cc
  3530. * test/RequestTest.cc
  3531. 2007-10-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3532. * src/ConsoleCalc.cc (calculateStat): Hide SPD after the download
  3533. finished.
  3534. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3535. * src/Metalink2RequestGroup.cc (generate): Throw exception instead of
  3536. catching it inside the method.
  3537. When no file entry is found in a metalink without querying user
  3538. preferences, throw the exception with the error message that suggests
  3539. metalink file is probably broken.
  3540. * src/RequestGroup.cc (postDownloadProcessing): Catch exception here.
  3541. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3542. Fixed the bug that prevents remote Metalink/Torrent file from begin
  3543. processed.
  3544. * src/RequestGroupMan.cc (removeStoppedGroup)
  3545. Added debug message.
  3546. * src/BtPostDownloadHandler.cc
  3547. * src/MetalinkPostDownloadHandler.cc
  3548. * src/PostDownloadHandler.{h, cc}
  3549. * src/RequestGroup.cc
  3550. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3551. * src/Request.cc (parseUrl): Removed unnecessary slashes around dir.
  3552. 2007-10-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3553. * src/MultiUrlRequestInfo.h: Updated the message shown when program
  3554. stops and there are any unfinished or in-progress downloads.
  3555. Added the legend of "stat".
  3556. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3557. Throw exception when chunck checksum verification fails.
  3558. * src/DownloadCommand.cc (validatePieceHash): New function.
  3559. * src/PiecedSegment.{h, cc} (clear): New function.
  3560. * src/GrowSegment.{h, cc} (clear): New function.
  3561. * src/Segment.h (clear): New function.
  3562. * src/SegmentMan.{h, cc} (validatePieceHash): Removed.
  3563. * test/SegmentTest.cc
  3564. * test/GrowSegmentTest.cc
  3565. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3566. Do not send referer when redirected.
  3567. * src/Request.cc (redirectUrl)
  3568. * test/RequestTest.cc
  3569. * test/HttpRequestTest.cc
  3570. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3571. Implemented BitTorrent/http/ftp integrated download.
  3572. I've rewritten lots of files and now some headers have forward
  3573. class declarations to reduce compile time.
  3574. The implementation is extremely alpha stage, I recommend to use this
  3575. for testing purpose only.
  3576. 2007-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3577. Fixed the compilation error on 64bit platform.
  3578. * test/HttpHeaderProcessorTest.cc
  3579. 2007-09-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3580. Merged Ross's patch that fixes compilation problem in MinGW
  3581. * test/DefaultBtProgressInfoFileTest.cc
  3582. 2007-09-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3583. Updated fr.po by sebone
  3584. * po/fr.po
  3585. Updated man page.
  3586. * doc/aria2c.1.txt
  3587. * Release 0.11.3
  3588. 2007-09-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3589. * src/MetalinkRequestInfo.cc (execute): Fixed BitTorrent download
  3590. failure in Metalink.
  3591. 2007-09-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3592. Automatically save *.aria2 control file of http/ftp download in every
  3593. 60 seconds.
  3594. * src/AutoSaveCommand.{h, cc}: New class.
  3595. * src/TimeBasedCommand.{h, cc}: New class.
  3596. * src/DownloadEngineFactory.cc (newConsoleEngine)
  3597. Disable parameterized URI support by default. Added -P option to
  3598. enable the feature.
  3599. * src/prefs.h: Added PREF_PARAMETERIZED_URI
  3600. * src/OptionHandlerFactory.cc
  3601. * src/main.cc: Also updated usages for -Z and --auto-file-renaming
  3602. Updated Japanese translation.
  3603. * po/ja.po
  3604. Updated man page.
  3605. * doc/aria2c.1.txt
  3606. * Release 0.11.3-rc
  3607. 2007-09-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3608. Now *.aria2 contorol file is first saved to *.aria2__temp and if
  3609. it is successful, then renamed to *.aria2.
  3610. This prevents *.aria2 file from being truncated or corrupted when
  3611. file system becomes out of space.
  3612. * src/DefaultBtProgressInfoFile.cc (save)
  3613. * src/SegmentMan.cc (save)
  3614. * test/DefaultBtProgressInfoFileTest.cc (testSave): Implemented.
  3615. 2007-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3616. Reduced the fragmentation of bitfield in http/ftp download.
  3617. * src/BitfieldMan.cc (getSparseMissingUnusedIndex)
  3618. * test/BitfieldManTest.cc
  3619. 2007-08-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3620. Added the ability to disable segmented download in .metalink.
  3621. aria2 can now recognize 'maxconnections' attribute in 'resources' and
  3622. 'url' tag.
  3623. * src/MetalinkEntry.{h, cc}
  3624. * src/RequestResource.{h, cc}
  3625. * src/MetalinkRequestInfo.cc
  3626. * src/Xml2MetalinkProcessor.cc
  3627. * test/Xml2MetalinkProcessorTest.cc
  3628. 2007-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3629. Added parameterized URI support.
  3630. * src/main.cc: -Z option added.
  3631. * src/OptionHandlerFactory.cc
  3632. * src/prefs.h: Added PREF_FORCE_SEQUENTIAL.
  3633. * src/PStringDatum.h: New class.
  3634. * src/PStringSegment.{h,cc}: New class.
  3635. * src/PStringNumLoop.h: New class.
  3636. * src/PStringSelect.h: New class.
  3637. * src/NumberDecorator.h: New class.
  3638. * src/FixedWidthNumberDecorator.h: New class.
  3639. * src/AlphaNumberDecorator.h: New class.
  3640. * src/PStringVisitor.h: New class.
  3641. * src/PStringBuildVisitor.{h,cc}: New class.
  3642. * src/ParameterizedStringParser.{h,cc}: New class.
  3643. * src/Util.{h,cc}
  3644. (isNumber): New function.
  3645. (isLowercase): New function.
  3646. (isUppercase): New function.
  3647. (alphaToNum): New function.
  3648. * test/ParameterizedStringParserTest.cc: New class.
  3649. * test/AlphaNumberDecoratorTest.cc: New class.
  3650. * test/PStringBuildVisitorTest.cc: New class.
  3651. * test/UtilTest.cc
  3652. (testIsNumber): New function.
  3653. (testIsLowercase): New function.
  3654. (testIsUppercase): New function.
  3655. (testAlphaToNum): New function.
  3656. Added '\n' after the error message
  3657. * src/RequestInfo.h (printDownloadAbortMessage)
  3658. Added auto file renaming feature in http(s)/ftp download.
  3659. * src/main.cc: Added --auto-file-renaming command-line option.
  3660. * src/OptionHandlerFactory.cc
  3661. * src/prefs.h: Added PREF_AUTO_FILE_RENAMING
  3662. * src/RequestGroup.{h, cc}
  3663. (shouldCancelDownloadForSafety): Rewritten
  3664. (tryAutoFileRenaming): New function.
  3665. * src/SegmentMan.{h, cc} (shouldCancelDownloadForSafety): Removed.
  3666. * src/HttpResponseCommand.cc
  3667. (executeInternal): Removed the call to RequestGroupMan::
  3668. isSameFileBeingDownloaded()
  3669. * src/FtpNegotiateCommand.cc
  3670. (recvSize): Removed the call to RequestGroupMan::
  3671. isSameFileBeingDownloaded()
  3672. * test/RequestGroupTest.cc: New class.
  3673. 2007-08-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3674. Merged Ross's patch: Removed setmode(). Use _CRT_fmode to enable binary
  3675. IO.
  3676. * src/DefaultBtProgressInfoFile.cc
  3677. * src/MetaFileUtil.cc
  3678. * src/SimpleLogger.cc
  3679. * src/SegmentMan.cc
  3680. * src/Util.cc
  3681. * src/Platform.cc
  3682. 2007-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3683. * src/Xml2MetalinkProcessor.cc (getPieceHash): Added missing .c_str().
  3684. 2007-08-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3685. Avoid sparse files if possible, because VFAT32 doesn't support it.
  3686. * src/DefaultDiskWriter.cc (initAndOpenFile)
  3687. Fixed the bug that prevents file allocation is not done when
  3688. dowloading multi-torrent file.
  3689. * src/AbstractDiskWriter.cc (openFile)
  3690. Increase the maximum number of -j option from 15 to 45.
  3691. * src/OptionHandlerFactory.cc (createOptionHandlers)
  3692. Added fr.po, thanks to Charles Landemaine.
  3693. * po/fr.po
  3694. * po/LINGUAS
  3695. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  3696. gcc 3.4.4 support:
  3697. * src/DefaultBtContext.cc: int32_t -> int
  3698. * src/main.cc: int -> int32_t, int32_t -> int
  3699. * src/messageDigest.h: uint32_t -> unsigned int
  3700. * src/NameResolver.h: int32_t -> int
  3701. * src/PeerConnection.cc: int -> int32_t
  3702. * src/SpeedCalc.cc: int32_t -> int
  3703. * src/TrackerUpdateCommand.h: int -> int32_t
  3704. * src/Util.cc: int32_t -> int
  3705. * src/Util.h: int32_t -> int
  3706. * src/Xml2MetalinkProcessor.cc: int -> uint32_t, int64_t -> uint64_t
  3707. * test/AnnounceListTest.cc: int -> int32_t
  3708. * test/ChunkedEncodingTest.cc: int -> int32_t
  3709. * test/DataTest.cc: int -> int32_t
  3710. * test/DefaultBtRequestFactoryTest.cc: int -> int32_t
  3711. * test/DefaultPeerListProcessorTest.cc: int -> int32_t
  3712. * test/DefaultPieceStorageTest.cc: int -> int32_t
  3713. * test/FeatureConfigTest.cc: int -> int32_t
  3714. * test/MetalinkEntryTest.cc: int -> int32_t
  3715. * test/MockBtRequestFactory.h: int -> int32_t
  3716. * test/MockPieceStorage.h: int -> int32_t
  3717. * test/OptionTest.cc: int -> int32_t
  3718. * test/RequestTest.cc: int -> int32_t
  3719. * test/SegmentManTest.cc: int -> int32_t
  3720. * test/Xml2MetalinkProcessorTest.cc: int -> int32_t
  3721. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  3722. Move sleep functions to Util class:
  3723. * src/Util.cc
  3724. (sleep): New function.
  3725. (usleep): New function.
  3726. * src/DownloadCommand.cc: sleep -> Util::sleep
  3727. * test/TimeSeedCriteriaTest.cc: sleep -> Util::sleep
  3728. MinGW build enhancements. The following files are added:
  3729. * src/timegm.{c,h}
  3730. Changes to support the above new files:
  3731. * configure.ac
  3732. * src/Makefile.am
  3733. * src/a2time.h
  3734. * src/Util.cc:
  3735. * src/strptime.c: Added support for %Z option.
  3736. Fixed MinGW non-blocking bug.
  3737. * src/SocketCore.cc
  3738. * src/HttpRequestCommand.cc
  3739. Miscellenous build fixes/enhancements.
  3740. * configure.ac: Added summary report.
  3741. * src/Platform.h: Tweaked #include's.
  3742. * src/a2netcompat.h: Tweaked #include's.
  3743. * src/strptime.h: Tweaked #include's.
  3744. * src/gai_strerror.c: Tweaked #include's.
  3745. * src/gai_strerror.h: _D_GETADDRINFO_H -> _D_GAI_STRERROR_H
  3746. * src/getaddrinfo.h: Moved #ifndef __MINGW32__
  3747. * src/gettimeofday.h: Added HAVE_CONFIG_H
  3748. 2007-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3749. Increased the initial connection size in BitTorrent download to 40.
  3750. * src/BtRuntime.h
  3751. Added the usage message of --peer-id-prefix option.
  3752. * src/main.cc
  3753. * Release 0.11.2
  3754. 2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3755. MessageDigestHelper is introduced in order to simplify the use
  3756. of message digest. Removed repeated code.
  3757. The message digest algorithm is now specified by string, like "sha1",
  3758. "md5".
  3759. * src/messageDigest.{h, cc}
  3760. * src/MessageDigestHelper.{h, cc}: New class.
  3761. * src/DefaultPieceStorage.cc
  3762. * src/DefaultBtContext.{h, cc}
  3763. (computeFastSet): New function.
  3764. (setInfoHash): Added for unit testing.
  3765. (setNumPieces): Added for unit testing.
  3766. * src/DefaultBtInteractive.cc
  3767. * src/BtPieceMessage.cc
  3768. * src/Peer.cc
  3769. * src/Checksum.h
  3770. * src/message.h
  3771. * src/IteratableChecksumValidator.h
  3772. * src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator
  3773. inside it.
  3774. * src/SegmentMan.{h, cc}
  3775. (checkIntegrity): Removed.
  3776. * src/IteratableChunkChecksumValidator.{h, cc}
  3777. * src/Util.h
  3778. (sha1Sum): Removed.
  3779. (simpleMessageDigest): Removed.
  3780. (fileChecksum): Removed.
  3781. (computeFastSet): Removed.
  3782. * src/ShaVisitor.cc
  3783. * src/ChunkChecksum.h
  3784. * src/DownloadCommand.cc
  3785. Removed messageDigest virtual functions.
  3786. * src/MultiDiskAdaptor.{h, cc}
  3787. * src/DiskAdaptor.h
  3788. * src/ByteArrayDiskWriter.h
  3789. * src/DiskWriter.h
  3790. * src/DiskAdaptorWriter.h
  3791. * src/AbstractSingleDiskAdaptor.{h, cc}
  3792. * src/AbstractDiskWriter.{h, cc}
  3793. Fixed comilation error when message digest is disabled.
  3794. * src/MetalinkEntry.{h, cc}
  3795. * src/MetalinkRequestInfo.cc
  3796. Removed srandom and random.
  3797. * src/SimpleRandomizer.h
  3798. Added size() virtual function to DiskAdaptor
  3799. * src/MultiDiskAdaptor.h
  3800. Fixed the bug that causes that files are not opened correctly in
  3801. multi-file torrent.
  3802. * src/TorrentRequestInfo.cc
  3803. * src/MultiDiskAdaptor.cc
  3804. Added SHA256 support
  3805. * src/messageDigest.cc
  3806. * src/Xml2MetalinkProcessor.cc
  3807. Show supported message digest algorithms
  3808. * src/main.cc
  3809. Updated contact info.
  3810. * src/main.cc
  3811. Applied Ross's patch
  3812. * src/a2netcompat.h
  3813. * src/main.cc
  3814. Fixed the bug that prevents a remote metalink from not being processed
  3815. even if '-o foo.metalink' is specified.
  3816. * src/MetalinkRequestInfo.cc
  3817. 2007-08-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3818. Merged Dan's patch:
  3819. * src/ByteArrayDiskWriter.cc: ios_base -> ios
  3820. Use va_copy to avoid core dump on amd64:
  3821. * src/SimpleLogger.cc
  3822. Updated contact info.
  3823. * src/main.cc
  3824. Added #ifdef ENABLE_MESSAGE_DIGEST to fix test errors when message
  3825. digest is not available.
  3826. * src/MetalinkEntry.h
  3827. 2007-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3828. Make a2netcompat.h include a2io.h to fix compilation error:
  3829. * src/a2netcompat.h
  3830. * src/SocketCore.cc: Removed include of a2io.h
  3831. * src/Util.cc: Removed include of a2io.h
  3832. Gather time related functions to a2time.h:
  3833. * src/a2time.h: New file.
  3834. * src/DefaultPeerStorage.cc
  3835. * src/SimpleLogger.cc
  3836. * src/Util.{h, cc}
  3837. * src/SimpleRandomizer.h
  3838. * src/TimeA2.{h,cc}
  3839. * src/DownloadCommand.cc
  3840. * src/main.cc
  3841. Removed #ifdef __MINGW32__ since gai_strerror is included in
  3842. a2netcompat.h:
  3843. * src/NameResolver.cc
  3844. Fixed compilation error without openssl:
  3845. * src/SocketCore.{h,cc}: Moved include of openssl/err.h to SocketCore.h
  3846. Added default block to suppress compiler warnings:
  3847. * src/MetalinkRequestInfo.cc (AccumulateNonP2PUrl::operator())
  3848. 2007-07-26 Ross Smith II <aria2spam at smithii dot com>
  3849. MinGW build enhancements. The following files are added:
  3850. * src/gai_strerror.{c,h}
  3851. * src/gettimeofday.{c,h}
  3852. Changes to support the above new files:
  3853. * configure.ac
  3854. * src/Makefile.am
  3855. * src/a2netcompat.h
  3856. * src/TimeA2.cc
  3857. * src/DefaultPeerStorage.cc
  3858. * src/NameResolver.cc: removed mingw_strerror() function.
  3859. * src/SocketCore.cc: removed mingw_strerror() function.
  3860. Miscellaneous MinGW build fixes.
  3861. * src/a2io.h: Use _lseeki64() instead of lseek()
  3862. * src/common.h
  3863. * src/DefaultFileAllocator.cc
  3864. * src/GlowFileAllocator.cc
  3865. * src/main.cc: Moved #include "prefs.h" to quiet compile error.
  3866. * src/NameResolver.cc
  3867. (callback): Changed int32_t to int.
  3868. (resolve): Changed int32_t to int.
  3869. * src/Platform.cc
  3870. * src/Platform.h
  3871. * test/MultiDiskWriterTest.cc
  3872. * test/PeerMessageUtilTest.cc
  3873. * src/localtime_r.c: Add DeleteCriticalSection() and at exit().
  3874. Other enhancements and fixes.
  3875. * src/HttpRequestCommand.cc
  3876. (executeInternal) Use non-blocking socket for HTTPS (MinGW only).
  3877. * src/SocketCore.cc:
  3878. (error): New function to abstract errno/WSAGetLastError().
  3879. (errorMsg): New function to abstract errno/WSAGetLastError().
  3880. (initiateSecureConnection): Added more detailed error reporting.
  3881. * src/SocketCore.h: Added private variable blocking, to allow
  3882. proper handling of OpenSSL psuedo-errors.
  3883. * src/message.h
  3884. (EX_SSL_INIT_FAILURE)
  3885. (EX_SSL_IO_ERROR)
  3886. (EX_SSL_PROTOCOL_ERROR)
  3887. (EX_SSL_UNKNOWN_ERROR)
  3888. (EX_SSL_CONNECT_ERROR)
  3889. (EX_SOCKET_BLOCKING)
  3890. (EX_SOCKET_NONBLOCKING)
  3891. (EX_SOCKET_UNKNOWN_ERROR)
  3892. * src/Util.cc
  3893. (setGlobalSignalHandler): Renamed signal to sig as signal is a
  3894. reserved name.
  3895. (httpGMT): Fixed typo.
  3896. 2007-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3897. Merged Ross's win32 patch(manually)
  3898. In the course of merging, following files are added.
  3899. * src/strptime.{h,c}
  3900. * src/libgen.{h,c}
  3901. * src/inet_aton.{h,c}
  3902. * src/Platform.{h,cc}
  3903. * src/localtime_r.{h,c}
  3904. * src/getaddrinfo.{h,c}
  3905. I've gethered network related things, and put them to following file:
  3906. * src/a2netcompat.h
  3907. Also io related things are put to following file:
  3908. * src/a2io.h
  3909. Changed %lld to %s because mingw32 doesn't recognize %lld.
  3910. * src/message.h
  3911. (MSG_ALLOCATION_COMPLETED)
  3912. (EX_TOO_LARGE_FILE)
  3913. (EX_SIZE_MISMATCH)
  3914. (EX_FILE_OFFSET_OUT_OF_RANGE)
  3915. (EX_INVALID_CHUNK_CHECKSUM)
  3916. (EX_INVALID_RANGE_HEADER)
  3917. * src/FileAllocationCommand.cc
  3918. * src/HttpResponse.cc
  3919. * src/RequestGroup.cc
  3920. * src/MultiDiskAdaptor.cc
  3921. * src/OptionHandlerImpl.h
  3922. * src/HttpResponseCommand.cc
  3923. * src/FtpNegotiateCommand.cc
  3924. * src/IteratableChecksumValidator.cc
  3925. * src/SegmentMan.cc
  3926. * src/ChunkChecksumValidator.cc
  3927. Added Randomizer::getRandomNumber(long int)
  3928. * src/Randomizer.h (getRandomNumber)
  3929. * src/SimpleRandomizer.h (getRandomNumber)
  3930. * src/BitfieldMan.cc (getMissingIndexRandomly): Use this new function.
  3931. * src/Util.cc (randomAlpha): Use this new function.
  3932. 2007-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3933. Converted int's to in32_t. long long int's are also converted to
  3934. int64_t
  3935. 2007-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3936. Fixed the bug that prevents cookies from being sent to the server
  3937. if the domain of cookie is FQDN and starts with ".".
  3938. * src/Cookie.cc (match)
  3939. To add the ability to change peer id.
  3940. * src/DefaultBtContext.h
  3941. (_peerIdPrefix): New variable
  3942. (setPeerIdPrefix): New function.
  3943. * src/torrentRequestInfo.cc
  3944. (execute): Set the option value of PREF_PEER_ID_PREFIX to
  3945. DefaultBtContext.
  3946. * src/main.cc (main): Added peer-id-prefix command-line option.
  3947. The usage message is not added yet.
  3948. * src/DefaultBtContext.cc
  3949. (generatePeerId): Use _peerIdPrefix.
  3950. * src/prefs.h (PREF_PEER_ID_PREFIX): New definition.
  3951. 2007-07-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3952. Fixed the bug that prevents filename in content-disposition from
  3953. being retrieved when filename is not quoted.
  3954. * src/Util.cc (getContentDispositionFilename)
  3955. Fixed the bug that causes infinate loop and memory leak when file open
  3956. operation failed.
  3957. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  3958. 2007-07-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3959. Fixed the bug that causes segfault when all URIs specified are
  3960. unsupported.
  3961. * src/RequestGroupMan.cc (getInitialCommands)
  3962. Check if RequestGroup::createNextCommand() returns empty list of
  3963. commands.
  3964. * src/RequestGroup.cc (createNextCommand)
  3965. Change log level from info to error so that users can notice that
  3966. an error occurred.
  3967. Fixed the bug that causes segfault when a zero-sized file is
  3968. downloaded.
  3969. * src/BitfieldMan.cc (isAllBitSet)
  3970. Return true if bitfieldLength is 0.
  3971. 2007-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3972. * src/main.cc
  3973. (showUsage): Added 3 usage examples for metalink download.
  3974. Replace MetalinkChunkChecksum with ChunkChecksum.
  3975. * src/MetalinkChunkChecksum.h: Removed.
  3976. * src/MetalinkEntry.h: MetalinkChunkChecksum -> ChunkChecksum.
  3977. * src/Xml2MetalinkProcessor.h: MetalinkChunkChecksum -> ChunkChecksum.
  3978. * src/Xml2MetalinkProcessor.cc
  3979. (getPieceHash): Use ChunkChecksum instead of MetalinkChunkChecksum.
  3980. * src/MetalinkRequestInfo.cc (execute)
  3981. * Release 0.11.1
  3982. 2007-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3983. Reads URIs from stdin when "-i -" is specified.
  3984. * src/UriFileListParser.h, src/UriFileListParser.cc: Removed.
  3985. * src/UriListParser.h, src/UriListParser.cc: New class.
  3986. * src/StreamUriListParser.h: New class.
  3987. * src/FileUriListParser.h: New class.
  3988. * src/main.cc (main): Use StreamUriListParser and FileUriListParser
  3989. instead of UriFileListParser.
  3990. 2007-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3991. Made console readout more readable.
  3992. * src/ConsoleDownloadEngine.cc (sendStatistics)
  3993. 2007-07-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3994. Fix the bug that causes -s option not to work.
  3995. * src/main.cc (main)
  3996. * src/a2algo.h: New file.
  3997. 2007-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3998. Create directory structure specified in metalink file.
  3999. * src/RequestGroup.h, src/RequestGroup.cc
  4000. (initAndOpenFile): Create a directory to store files if it does not
  4001. exist.
  4002. (getDir): New function.
  4003. Added ETA and download speed for an individual file to readout.
  4004. * src/ConsoleDownloadEngine.cc (sendStatistics)
  4005. * src/RequestGroup.h
  4006. (calculateDownloadSpeed): New function.
  4007. 2007-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4008. Made -S option work with metalink file and provided selective download
  4009. to metalink.
  4010. * src/MetalinkEntry.h, src/MetalinkEntry.cc
  4011. (filename): Removed.
  4012. (file): New variable.
  4013. (size): Removed.
  4014. (operator=): Updated.
  4015. (getPath): New function.
  4016. (getLength): New function.
  4017. (toFileEntry): New function.
  4018. * src/TorrentRequestInfo.h, src/TorrentRequestInfo.cc
  4019. (execute): Use toStream.
  4020. (showFileEntry): Removed.
  4021. * src/MetalinkRequestInfo.h
  4022. (targetFiles): New variable.
  4023. (setTargetFiles): New variable.
  4024. * src/MetalinkRequestInfo.cc
  4025. (execute): Added the ability to print file information included in
  4026. a metalink file.
  4027. Added selective download mode to metalink.
  4028. * src/main.cc
  4029. (showUsage): Updated to denote that -S and --select-file options are
  4030. applicable to metalink.
  4031. * src/FileEntry.h
  4032. (operator=): New function.
  4033. (getBasename): New function.
  4034. (getDirname): New function.
  4035. * src/Util.h, src/Util.cc
  4036. (toStream): New function.
  4037. * src/Xml2MetalinkProcessor.cc: Updated.
  4038. Made aria2 work with metalink with directory structure.
  4039. * src/File.h, src/File.cc
  4040. (getBasename): New function.
  4041. (getDirname): New function.
  4042. * src/RequestGroup.h, src/RequestGroup.cc
  4043. (_topDir): New variable.
  4044. (setTopDir): New function.
  4045. (initSegmentMan): A directory structure is added to _segmentMan->dir.
  4046. Rewrote HTTP header parsing with stringstream.
  4047. * src/HttpConnection.h, src/HttpConnection.cc
  4048. (HttpRequestEntry): New class.
  4049. (headerBuf): Removed.
  4050. (headerBufLength): Removed.
  4051. (outstandingHttpRequests): Now its element type is
  4052. HttpRequestEntryHandle.
  4053. (findEndOfHeader): Removed.
  4054. (receiveResponse): Rewritten.
  4055. * src/HttpHeaderProcessor.h, src/HttpHeaderProcessor.cc: New class.
  4056. Updated doc for -j option to notice that it should be used with -i
  4057. option.
  4058. * src/main.cc (showUsage)
  4059. Removed unused classes.
  4060. * src/RequestInfo.h
  4061. (FileInfo): Removed.
  4062. (checksum): Removed.
  4063. (fileInfo): Removed.
  4064. (setChecksum): Removed.
  4065. (getChecksum): Removed.
  4066. (getFileInfo): Removed.
  4067. Use ISO units.
  4068. * src/ConsoleDownloadEngine.cc
  4069. * src/TorrentConsoleDownloadEngine.cc
  4070. * src/Util.cc (abbrevSize)
  4071. 2007-06-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4072. Added the default listening ports to the help message.
  4073. * src/main.cc (showUsage)
  4074. 2007-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4075. Reduce the number of calls to gettimeofday to lower CPU load.
  4076. * src/TimeA2.h, src/TimeA2.cc (differenceInMillis): New function.
  4077. * src/SpeedCalc.h, src/SpeedCalc.cc (calculateSpeed): New function.
  4078. * src/Peer.h (calculateUploadSpeed): New function.
  4079. (calculateDownloadSpeed): New function.
  4080. * src/DefaultPeerStorage.cc
  4081. (CalculateStat): Added _now variable.
  4082. In operator(), call Peer::calculateDownloadSpeed(const struct timeval&)
  4083. and Peer::calculateUploadSpeed(const struct timeval&)
  4084. Drop connection if no request or piece message is exchanged in
  4085. a certain interval.
  4086. * src/DefaultBtInteractive.h
  4087. (btRuntime): New variable.
  4088. (inactiveCheckPoint): New variable.
  4089. (checkActiveInteraction): New function.
  4090. * src/DefaultBtInteractive.cc (receiveMessages): Reset timer when
  4091. request or piece message is received.
  4092. (checkActiveInteraction): New function.
  4093. (doInteractionProcessing): Call checkActiveInteraction.
  4094. Fixed the bug that causes remote Metalink and Torrent files are not
  4095. processed.
  4096. * src/MultiUrlRequestInfo.cc (createNextRequestInfo): Fixed the bug.
  4097. 2007-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4098. Changed format of log file.
  4099. * src/SimpleLogger.cc
  4100. * Release 0.11.0
  4101. 2007-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4102. * src/AbstractCommand.cc
  4103. (execute): Changed log level of MSG_RESTARTING_DOWNLOAD and
  4104. MSG_MAX_TRY from error to info.
  4105. Added MSG_DOWNLOAD_ABORTED after MSG_MAX_TRY.
  4106. * src/message.h
  4107. (MSG_TORRENT_DOWNLOAD_ABORTED): New definition.
  4108. (MSG_DOWNLOAD_ABORTED): Added %s.
  4109. (MSG_RESTARTING_DOWNLOAD): Added %s.
  4110. (MSG_DOWNLOAD_ALREADY_COMPLETED): Updated.
  4111. * src/PeerAbstractCommand.cc
  4112. (execute): MSG_DOWNLOAD_ABORTED -> MSG_TORRENT_DOWNLOAD_ABORTED
  4113. * src/Request.h
  4114. (cookieBox): Made ShardHandle.
  4115. * src/RequestGroup.h, src/RequestGroup.cc
  4116. (createNextCommandWithAdj): New function.
  4117. * src/FileAllocationCommand.cc
  4118. (executeInternal): Use createNextCommandWithAdj().
  4119. * src/CheckIntegrityCommand.cc
  4120. (executeInternal): Use createNextCommandWithAdj().
  4121. Added --load-cookies command-option.
  4122. * src/OptionHandlerFactory.cc
  4123. (createOptionHandlers): Added PREF_LOAD_COOKIES.
  4124. * src/CookieBox.h, src/CookieBox.cc: Rwritten using CookieParser.
  4125. Now aria2 can handle cookie's expiration date.
  4126. * src/Cookie.h (expires): Changed its type to time_t.
  4127. * src/main.cc: Added --load-cookies command-line option.
  4128. * src/prefs.h (PREF_LOAD_COOKIES): New definition.
  4129. * src/Util.h, src/Util.cc (httpGMT): New function.
  4130. * src/Request.cc (Request): Initialize cookieBox using
  4131. CookieBoxFactory.
  4132. * src/CookieBoxFactory.h, src/CookieBoxFactory.cc: New class.
  4133. * src/CookieParser.h, src/CookieParser.cc: New class.
  4134. * src/main.cc: Chagned the default value of --metalink-servers to 5.
  4135. * src/HttpResponseCommand.cc
  4136. (handleOtherEncoding): Call RequestGroup::shouldCancelDownloadForSafety
  4137. * src/MetalinkRequestInfo.cc: Now -s option is ignored in Metalink
  4138. download.
  4139. 2007-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4140. Added -j command-line option.
  4141. * src/OptionHandlerFactory.cc (createOptionHandlers)
  4142. * src/main.cc
  4143. * src/ByteArrayDiskWriter.h, src/ByteArrayDiskWriter.cc
  4144. Rewritten using stringstream.
  4145. * src/TrackerUpdateCommand.h, src/TrackerUpdateCommand.cc
  4146. Rewritten using stringstream.
  4147. 2007-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4148. Make download size shown in MB, KB.
  4149. * src/ConsoleDownloadEngine.h (sendStatistics)
  4150. * src/Util.h, srcUtil.cc (abbrevSize): New function.
  4151. 2007-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4152. Accept incoming connections if download rate is low.
  4153. * src/PeerListenCommand.h, src/PeerListenCommand.cc:
  4154. (_lowestSpeedLimit): New variable.
  4155. (setLowestSpeedLimit): New function.
  4156. (execute): Accept incoming connections if download rate is low.
  4157. MAX_PEERS is ignored in this case.
  4158. Disable PREF_OUT in multiple concurrent download:
  4159. * src/RequestGroup.h, src/RequestGroup.cc
  4160. (setUserDefinedFilename): New function.
  4161. * src/DownloadEngineFactory.cc
  4162. (newConsoleEngine): Do not set PREF_OUT to requestGroup in multiple
  4163. concurrent download.
  4164. * src/DefaultSegmentManFactory.cc
  4165. (createNewInstance): Comment out the line: segmentMan->ufilename = ...
  4166. 2007-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4167. RequestGroup::getNextCommand() was renamed to createNextCommand().
  4168. Added its overloaded method.
  4169. * src/RequestGroup.h
  4170. (_numConcurrentCommand): New variable.
  4171. (setNumConcurrentCommand): New function.
  4172. * src/RequestGroup.cc
  4173. Abort download if same file is being downloaded concurrently.
  4174. * src/RequestGroup.h, src/RequestGroupMan.cc
  4175. (isSameFileBeingDownloaded): New function.
  4176. * src/HttpResponseCommand.cc (executeInternal)
  4177. * src/FtpNegotiateCommand.cc (recvSize)
  4178. * src/message.h (EX_DUPLICATE_FILE_DOWNLOAD): New definition.
  4179. * main.cc: Added help message for -i option.
  4180. 2007-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4181. * src/FileAllocationCommand.cc: Derived from RealtimeCommand.
  4182. * src/CheckIntegrityCommand.cc: Derived from RealtimeCommand.
  4183. * src/MetalinkEntry.h
  4184. (checksum): Changed to ChecksumHandle
  4185. * src/MetalinkRequestInfo.cc
  4186. (checksum): Changed to ChecksumHandle
  4187. * src/File.cc
  4188. (mkdirs): OPEN_MODE -> DIR_OPEN_MODE
  4189. * src/common.h
  4190. (DIR_OPEN_MODE): New definition
  4191. * src/RequestGroup.cc
  4192. (prepareForNextAction): Added an argument.
  4193. * src/message.h
  4194. (MSG_GOOD_CHECKSUM): New definition
  4195. (MSG_BAD_CHECKSUM): New definition
  4196. * src/HttpResponseCommand.cc
  4197. (handleDefaultEncoding): Continue download sequence in new
  4198. non-segmented download.
  4199. * src/FileAllocationEntry.h
  4200. (_nextDownloadCommand): New variable.
  4201. * src/DownloadCommand.cc
  4202. (prepareForNextSegment): Create ChecksumCommand if checksum is
  4203. available.
  4204. * src/RealtimeCommand.h, src/RealtimeCommand.cc: New class.
  4205. * src/IteratableChecksumValidator.h,
  4206. src/IteratableChecksumValidator.cc: New class.
  4207. * src/ChecksumCommand.h, src/ChecksumCommand.cc: New class.
  4208. 2007-05-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4209. Change file mode to 666:
  4210. * src/common.h (OPEN_MODE): New definition.
  4211. * src/File.cc
  4212. * src/Util.cc
  4213. * src/Directry.cc
  4214. * src/AbstractDiskWriter.cc
  4215. Change the level of log message "download aborted" to debug:
  4216. * src/PeerAbstractCommand.cc (execute)
  4217. * src/RequestGroup.h (RequestGroup): Initialized _hintTotalLength to 0.
  4218. * src/TrackerWatcherCommand.cc
  4219. (createCommand): Sleep some seconds after request failed.
  4220. If tracker request fails more than value of PREF_TRACKER_MAX_TRIES,
  4221. then abort tracker request.
  4222. 2007-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4223. * Added the simultaneous download feature.
  4224. * src/main.cc: Print "Exception caught: " when exception is caught.
  4225. Use CUIDCounter instead of BtRuntime::getNewCuid():
  4226. * src/ActivePeerConnectionCommand.cc
  4227. * src/PeerInteractionCommand.cc
  4228. * src/BtRuntime.h
  4229. (cuidCounter): Removed.
  4230. (getNewCuid): Removed.
  4231. * src/DownloadEngineFactory.cc
  4232. * src/PeerListenCommand.cc
  4233. * src/TrackerUpdateCommand.cc
  4234. * src/PeerInitiateConnectionCommand.cc
  4235. 2007-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4236. * src/PeerAbstractCommand.cc
  4237. (onAbort): Call PeerStorage::returnPeer()
  4238. * src/DefaultPeerStorage.h, src/DefaultPeerStorage.cc
  4239. (incomingPeers): New variable.
  4240. (addIncomingPeer): New function.
  4241. (returnPeer): New function.
  4242. (onErasingPeer): New function.
  4243. (addPeer): push_back -> push_front
  4244. (getActivePeers): Rewritten.
  4245. (calculateStat): Rewritten.
  4246. * src/PeerStorage.h
  4247. (TransferStat::copy): New function.
  4248. (TransferStat::TransferStat): New function.
  4249. (TransferStat::operator=): New function.
  4250. (addIncomingPeer): New function.
  4251. (returnPeer): New function.
  4252. * src/PeerListenCommand.cc
  4253. (execute): Use PeerStorage::addIncomingPeer() instead of
  4254. Peer::addPeer().
  4255. 2007-04-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4256. Connect to a peer actively when download speed is lower than specified
  4257. speed in torrent download:
  4258. * src/ActivePeerConnectionCommand.h: New class.
  4259. 2007-03-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4260. * src/HttpRequest.cc (createRequest): url-encode user-agent
  4261. * src/main.cc: Fixed the bug that prevents download if .netrc
  4262. doesn't exist.
  4263. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4264. To cache resolved hostname:
  4265. * src/AbstractCommand.h, src/AbstractCommand.cc
  4266. (resolveHostname): Put outside #ifdef ENABLE_ASYNC_DNS clause.
  4267. Added dns cache.
  4268. * src/FtpInitiateConnectionCommand.cc
  4269. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS.
  4270. * src/NameResolver.h, src/NameResolver.cc: Added synchronized
  4271. NameResolver working without ares.
  4272. * src/TorrentRequestInfo.cc
  4273. (execute): Don't cache dns in torrent download.
  4274. * src/HttpInitiateConnectionCommand.cc
  4275. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS
  4276. * src/DNSCache.h: New class.
  4277. * src/UrlRequestInfo.cc
  4278. (execute): Use dns cache.
  4279. In http request, suppress port number in http request header if port
  4280. is 80 or 443:
  4281. * src/HttpRequest.cc (getHostText): Suppress port number in http
  4282. request header if port is 80 or 443.
  4283. (createProxyRequest): Allways send port number.
  4284. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4285. To add the command-line option which disables netrc support:
  4286. * src/OptionHandlerFactory.cc
  4287. (createOptionHandlers): Added PREF_NO_NETRC.
  4288. * src/main.cc: Added -n option.
  4289. * src/prefs.h (PREF_NO_NETRC): New definition.
  4290. * src/RequestFactory.cc: Do not use netrc in ftp if PREF_NO_NETRC is
  4291. V_TRUE.
  4292. Note that netrc is not used in http, http proxy even if PREF_NO_NETRC
  4293. is V_FALSE. This may get configurable in the future release.
  4294. To clear peer's error status by time basis:
  4295. * src/PeerAbstractCommand.cc
  4296. (onAbort): Call Peer::startBadCondition().
  4297. * src/Peer.h, src/Peer.cc
  4298. (error): Removed.
  4299. (_badConditionStartTime): New variable.
  4300. (_badConditionInterval): New variable. Initialized to 10 seconds.
  4301. (startBadCondition): New function.
  4302. (isGood): New function.
  4303. * src/DefaultPeerStorage.cc
  4304. (addPeer): Use Peer::isGood().
  4305. (FindFinePeer): Use Peer::isGood().
  4306. Always include port number in http request header:
  4307. * src/HttpRequest.cc (getHostText): Always include port number in
  4308. http request header.
  4309. 2007-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4310. To the ability to read options from a config file:
  4311. * src/main.cc: Command-line parameter validation is delegated to
  4312. OptionHandler class.
  4313. * src/OptionHandlerFactory.h, src/OptionHandlerFactory.cc: New class.
  4314. * src/Option.h, src/Option.cc (clear): New function.
  4315. * src/OptionParser.h, src/OptionParser.cc: New class.
  4316. * src/OptionHandler.h: New class.
  4317. * src/NameMatchOptionHandler.h: New class.
  4318. * src/OptionHandlerImpl.h: New classes.
  4319. * src/prefs.h: '_' -> '-'
  4320. (FTP_PASV_ENABLED): Renamed to FTP_PASV.
  4321. (FTP_PASV): New definition.
  4322. * src/Util.h, src/Util.cc (getRealSize): New function.
  4323. To disable netrc support if .netrc file does not have correct
  4324. permissions:
  4325. * src/File.h, src/File.cc (mode): New function.
  4326. To prevent confidential information to be logged:
  4327. * src/HttpConnection.h, src/HttpConnection.cc
  4328. (eraseConfidentialInfo): New function.
  4329. (sendRequest): Call eraseConfidentialInfo().
  4330. (sendProxyRequest): Call eraseConfidentialInfo().
  4331. * src/main.cc: Validate permissions of .netrc file.
  4332. To add --user-agent command-line option:
  4333. * src/main.cc: Added new command line option: --user-agent
  4334. * src/prefs.h (PREF_USER_AGENT): New definition.
  4335. * src/HttpRequestCommand.cc (executeInternal): Set user-agent option
  4336. parameter to HttpRequest object.
  4337. * src/AbstractProxyRequestCommand.cc
  4338. (executeInternal): Set user-agent option parameter to HttpRequest
  4339. object.
  4340. Marged the patches from Dan Fandrich.
  4341. 2007-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4342. Use filename and size from Metalink file instead of sending HEAD
  4343. request:
  4344. * src/UrlRequestInfo.h
  4345. (_filename): New variable.
  4346. (_totalLength): New variable.
  4347. (setTotalLength): New variable.
  4348. (setFilename): New variable.
  4349. * src/MetalinkRequestInfo.cc
  4350. (execute): Set filename and size to UrlRequestInfo
  4351. * src/UrlRequestInfo.cc
  4352. (execute): Use filename and size from Metalink instead of seding
  4353. HEAD request to servers.
  4354. 2007-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4355. To add the ability to resume downloading a partially downloaded file
  4356. which is downloaded from the beginning:
  4357. * src/FileAllocator.h: Made abstract class. New DefaultFileAllocator
  4358. takes this role.
  4359. * src/main.cc: Added -c option.
  4360. * src/BitfieldMan.h, src/BitfieldMan.cc (setBitRange): New function.
  4361. * src/DiskWriter.h (openExistingFile): Added totalLength argument.
  4362. * src/prefs.h (PREF_CONTINUE): New definition.
  4363. * src/SegmentMan.h, src/SegmentMan.cc (markPieceDone): New function.
  4364. * src/DefaultDiskWriter.cc
  4365. (createNewDiskWriter): Add GlowFileAllocator to the new object.
  4366. * src/AbstractDiskWriter.h
  4367. (glowFileAllocator): New variable.
  4368. * src/AbstractDiskWriter.cc
  4369. (openExistingFile): Now preallocate file space from the end of the
  4370. existing file if totalLength argument is specified and grater than 0.
  4371. * src/UrlRequestInfo.cc: If -c option is specified and the file
  4372. to download exists in local, continue the download of the file.
  4373. --allow-overwrite=true is assumed in this context.
  4374. * src/DefaultFileAllocator.h, src/DefaultFileAllocator.cc: New class.
  4375. * src/GlowFileAllocator.h, src/GlowFileAllocator.cc: New class.
  4376. Throw exception if --check-integrity=true is specified but chunk
  4377. checksums are not provided:
  4378. * src/UrlRequestInfo.cc
  4379. Do not print URLs to stdout:
  4380. * src/UrlRequestInfo.cc
  4381. 2007-03-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4382. * src/Request.h: Use AuthResolver to get authentication information.
  4383. * src/main.cc: Made RequestFactory a singleton object. Netrc is now
  4384. set to RequestFactory object.
  4385. * src/AuthConfigItem.h, src/AuthConfigItem.cc: Removed.
  4386. * src/AuthConfig.h, src/AuthConfig.cc: Rewritten.
  4387. * src/TrackerWatcherComand.cc: Use RequestFactorySingletonHolder to
  4388. create Request object.
  4389. 2007-03-19 Tatsuhiro Tsujikawa <tujikawa at valkyrie dot rednoah com>
  4390. To integrate Netrc into exsiting classes:
  4391. * src/Request.h
  4392. (_userDefinedAuthConfig): New variable.
  4393. (findNetrcAuthenticator): New function.
  4394. (segment): Removed.
  4395. (setUserDefinedAuthConfig): New function.
  4396. (resolveHttpAuthConfigItem): New function.
  4397. (resolveFtpAuthConfigItem): New function.
  4398. (resolveHttpProxyAuthConfigItem): New function.
  4399. * src/HttpRequest.h
  4400. (authConfig): Removed.
  4401. (proxyAuthConfig): Removed.
  4402. (setAuthConfig): Removed.
  4403. (setProxyAuthConfig): Removed.
  4404. * src/UrlRequest.h
  4405. (getHeadResult): Added a parameter: authConfigHandle
  4406. * src/common.h
  4407. (SingletonHolder.h): New include.
  4408. * src/main.cc
  4409. (Netrc.h): New include.
  4410. (main): Removed initial values of PREF_FTP_USER, PREF_FTP_PASSWD.
  4411. Added initial value of PREF_NETRC_PATH.
  4412. Added the initialization of netrc.
  4413. * src/AuthConfig.h: New class.
  4414. * src/prefs.h
  4415. (PREF_NETRC_PATH): New definition.
  4416. * src/HttpAuthConfig.h: Removed.
  4417. * src/Netrc.cc
  4418. (getRequiredNextToken): New function.
  4419. (skipMacdef): New function.
  4420. (parse): Rewritten.
  4421. * src/Netrc.h
  4422. (getRequiredNextToken): New function.
  4423. (skipMacdef): New function.
  4424. * src/Util.h, src/Util.cc
  4425. (getHomeDir): New function.
  4426. * src/TrackerWatcherComand.cc
  4427. (createRequestCommand): Use AuthConfig.
  4428. * src/FtpConnection.cc
  4429. (sendUser): Use Request::resolveFtpAuthConfigItem().
  4430. (sendPass): Use Request::resolveFtpAuthConfigItem().
  4431. * src/Request.cc
  4432. (findNetrcAuthenticator): New function.
  4433. (resolveHttpAuthConfigItem): New function.
  4434. (resolveFtpAuthConfigItem): New function.
  4435. (resolveHttpProxyAuthConfigItem): New function.
  4436. * src/UrlRequestInfo.cc: Use AuthConfig.
  4437. * src/HttpRequest.cc
  4438. (createRequest): Use authConfig.
  4439. (getProxyAuthString): Use authConfig.
  4440. (configure): Removed PREF_HTTP_USER, PREF_HTTP_PASSWD,
  4441. PREF_HTTP_PROXY_USER, PREF_HTTP_PROXY_PASSWD.
  4442. 2007-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4443. To reduce overhead to find commands whose socket is either
  4444. readable or writable in the download engine loop:
  4445. * src/Command.h, src/Command.cc
  4446. (STATUS): New enum.
  4447. (status): New variable.
  4448. (statusMatch): New function.
  4449. (setStatusActive): New function.
  4450. (setStatusInactive): New function.
  4451. * src/DownloadEngine.h, src/DownloadEngine.cc
  4452. (executeCommand): New function.
  4453. (run): Simplified.
  4454. (waitData): Call Command::setStatusActive() when command's socket is
  4455. readable or writable.
  4456. 2007-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4457. To handle Segment as SegmentHandle:
  4458. * src/AbstractCommand.cc (execute): Rewritten.
  4459. * src/SegmentMan.h: Segment -> SegmentHandle
  4460. Introducded HttpResponse class, HttpRequest class to improve code
  4461. extensiveness and make it clear:
  4462. * src/HttpDownloadCommand.cc: transfer encoders are now managed by
  4463. HttpResponse class.
  4464. * src/HttpRequest.h, src/HttpRequest.cc: New class.
  4465. * src/HttpResponse.h, src/HttpResponse.cc: New class.
  4466. * src/HttpConnection.cc: Contruction of http request were moved to
  4467. HttpRequest class.
  4468. * src/HttpResponseCommand.h, src/HttpResponseCommand.cc: Refactored.
  4469. * src/HttpRequestCommand.cc (executeInternal): Rewritten.
  4470. * src/HttpAuthConfig.h: New class.
  4471. * src/Range.h: New class.
  4472. To make FtpTunnel{Request, Response}Command and
  4473. HttpProxy{Request, Response}Command derived from
  4474. AbstractProxy{Request, Response}Command:
  4475. * src/FtpTunnelResponseCommand.h, src/FtpTunnelResponseCommand.cc:
  4476. Derived from AbstractProxyRequestCommand class.
  4477. * src/FtpTunnelRequestCommand.h, src/FtpTunnelRequestCommand.cc:
  4478. Derived from AbstractProxyResponseCommand class.
  4479. * src/HttpProxyRequestCommand.h, src/HttpProxyRequestCommand.cc:
  4480. Derived from AbstractProxyRequestCommand class.
  4481. * src/HttpProxyResponseCommand.h, src/HttpProxyResponseCommand.cc:
  4482. Derived from AbstractProxyResponseCommand class.
  4483. * src/AbstractProxyRequestCommand.h, src/AbstractProxyRequestCommand.cc
  4484. : New class.
  4485. * src/AbstractProxyResponseCommand.h,
  4486. src/AbstractProxyResponseCommand.cc: New class.
  4487. To add netrc support:
  4488. * src/Netrc.h, src/Netrc.cc: New class.
  4489. * src/Util.h, src/Util.cc (split): New function.
  4490. * src/HttpHeader.cc (getRange): Fixed so that it inspects
  4491. "Content-Range" header instead of "Range" header.
  4492. * src/HttpHeader.h
  4493. (getStatus): Removed.
  4494. (setStatus): Removed.
  4495. * src/Segment.h
  4496. (getPositionToWrite): New function.
  4497. 2007-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4498. * src/HttpHeader.h
  4499. (Range.h): New include.
  4500. (status): New variable.
  4501. (HttpHeader): Initialized status with 0.
  4502. (getStatus): New function.
  4503. (setStatus): New function.
  4504. (getRange): New function.
  4505. (HttpHeaderHandle): New function.
  4506. * src/HttpHeader.cc
  4507. (getRange): New function.
  4508. * src/Request.h
  4509. (RequestWeakHandle): New definition.
  4510. * src/HttpConnection.h
  4511. (HttpConnectionHandle): New type definition.
  4512. * src/HttpConnection.cc
  4513. (receiveResponse): Set HTTP status to headers.
  4514. * src/main.cc
  4515. (showUsage): Fixed typo.
  4516. * src/Segment.h
  4517. (SegmentHandle): New type definition.
  4518. * src/BitfieldMan.h
  4519. (getMissingUnusedLength): New function.
  4520. * src/BitfieldMan.cc
  4521. (getMissingUnusedLength): New function.
  4522. 2007-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4523. To fix static initialization order problem:
  4524. * src/BitfieldManFactory.h
  4525. (defaultRandomizer): Removed.
  4526. (factory): New variable.
  4527. (getNewFactory): Removed.
  4528. (getFactoryInstance): New function.
  4529. (setDefaultRandomizer): Rewritten.
  4530. (getDefaultRandomizer): Rewritten.
  4531. * src/BitfieldManFactory.cc
  4532. (defaultRandomizer): Removed.
  4533. (factory): Initialized to 0.
  4534. (BitfieldManFactory): Initialized randomizer to 0.
  4535. * src/DefaultPieceStorage.cc
  4536. (DefaultPieceStorage): getNewFactory() -> getFactoryInstance()
  4537. * src/Peer.cc
  4538. (Peer): getNewFactory() -> getFactoryInstance()
  4539. * src/SegmentMan.cc
  4540. (initBitfield): getNewFactory() -> getFactoryInstance()
  4541. * src/Piece.cc
  4542. (Piece): getNewFactory() -> getFactoryInstance()
  4543. 2007-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4544. To fix the bug that causes crash on Max OS X:
  4545. * src/SimpleRandomizer.h
  4546. (getInstance): Create new instance if the static variable is null.
  4547. * src/SimpleRandomizer.cc
  4548. (randomizer): Initialized to 0.
  4549. * src/BitfieldManFactory.h
  4550. (getNewFactory): Removed the call to setRandomizer().
  4551. To fix the miscalculation of the range of checksum:
  4552. * src/BitfieldMan.h
  4553. (isBitSetOffsetRange): New function.
  4554. * src/BitfieldMan.cc
  4555. (isBitSetOffsetRange): New function.
  4556. * src/SegmentMan.cc
  4557. (tryChunkChecksumValidation): Use BitfieldMan::isBitSetOffsetRange().
  4558. Use bitfield->getBlockLength() instead of segment.segmentLength.
  4559. * Release 0.10.1
  4560. 2007-02-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4561. To lower CPU usage in BitTorrent download when --max-upload-limit
  4562. command-line option specified:
  4563. * src/DefaultBtMessageDispatcher.cc
  4564. (sendMessages): Calculate uploading speed only when current message
  4565. is uploading data and is not sent yet.
  4566. * src/DefaultPeerStorage.h
  4567. (MAX_PEER_LIST_SIZE): 100 -> 60, because 60 is well enough.
  4568. * src/HttpResponseCommand.cc
  4569. (handleDefaultEncoding): Added the cast to int32_t to itos.
  4570. This fixes compile error in Soralis 10.
  4571. 2007-01-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4572. To fix segfault in Metalink download:
  4573. * src/UrlRequestInfo.h
  4574. (filename): Removed.
  4575. (totalLength): Removed.
  4576. (setTotalLength): Removed.
  4577. (setFilename): Removed.
  4578. * src/MetalinkRequestInfo.cc
  4579. (execute): Do not set filename and totalLength to reqInfo.
  4580. Set chunk checksum to reqInfo if it is not null.
  4581. * src/HttpResponseCommand.cc
  4582. (executeInternal): Fixed filename in log.
  4583. (handleDefaultEncoding): Removed the call to initBitfield() and
  4584. markAllPiecesDone().
  4585. (handleOtherEncoding): Added HEAD method handling.
  4586. * src/FtpNegotiateCommand.cc
  4587. (executeInternal): Added SEQ_HEAD_OK handling.
  4588. (recvSize): In HEAD handling, set sequence to SEQ_HEAD_OK and
  4589. return false.
  4590. * src/FtpNegotiateCommand.h
  4591. (SEQ_HEAD_OK): New definition.
  4592. * src/SegmentMan.cc
  4593. (initBitfield): Delete bitfield.
  4594. (isChunkChecksumValidationReady): Fixed the condition.
  4595. * src/UrlRequestInfo.cc: Fixed so that Metalink and Torrent download
  4596. works fine.
  4597. 2007-01-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4598. * src/Xml2MetalinkProcessor.h
  4599. (xpathExists): New function.
  4600. * src/Xml2MetalinkProcessor.cc
  4601. (xpathExists): New function.
  4602. Not to send HEAD request if filename and size are available in Metalink
  4603. file:
  4604. * src/UrlRequestInfo.h
  4605. (filename): New variable.
  4606. (totalLength): New variable.
  4607. (setTotalLength): New function.
  4608. (setFilename): New function.
  4609. * src/MetalinkRequestInfo.cc
  4610. (execute): Set filename and size to UrlRequestInfo.
  4611. * src/MetalinkEntry.cc
  4612. (MetalinkEntry): Initialize size with 0.
  4613. * src/UrlRequestInfo.cc
  4614. (execute): Set filename and size to SegmentMan.
  4615. Not to download rest of the files after selected files are downloaded
  4616. in BitTorrent:
  4617. * src/PieceStorage.h
  4618. (allDownloadFinished): New function.
  4619. * src/DefaultBtAnnounce.cc
  4620. (isCompleteAnnounceReady): Use allDownloadFinished instead of
  4621. downloadFinished.
  4622. (getAnnounceUrl): Use allDownloadFinished instead of downloadFinished.
  4623. * src/DefaultPieceStorage.cc
  4624. (completePiece): Use allDownloadFinished instead of downloadFinished.
  4625. Commented out the call to finishSelectiveDownloadingMode().
  4626. (downloadFinished): Call isFilteredAllBitSet() instead of
  4627. isAllBitSet().
  4628. (allDownloadFinished): New function.
  4629. * src/DefaultBtInteractive.cc
  4630. (addBitfieldMessageToQueue): Call allDownloadFinished() instead of
  4631. downloadFinished().
  4632. (checkHave): Call allDownloadFinished() instead of downloadFinished().
  4633. * src/TorrentDownloadEngine.cc
  4634. (onEndOfRun): Call allDownloadFinished() instead of downloadFinished().
  4635. * src/BitfieldMan.h
  4636. (isFilteredAllBitSet): New function.
  4637. * src/ShareRatioSeedCriteria.h
  4638. (PieceStorage.h): New include.
  4639. (pieceStorage): New variable.
  4640. (evaluate):
  4641. btContext->getTotalLength() -> pieceStorage->getCompletedLength()
  4642. * src/BitfieldMan.cc
  4643. (isFilteredAllBitSet): New function.
  4644. (isAllBitSet): Filter is not took into account.
  4645. Rename --force-truncate as --allow-overwrite:
  4646. * src/TorrentRequestInfo.cc
  4647. (execute): PREF_FORCE_TRUNCATE -> PREF_ALLOW_OVERWRITE
  4648. * src/main.cc
  4649. (showUsage): --force-truncate -> --allow-overwrite
  4650. * src/message.h
  4651. (EX_FILE_ALREADY_EXISTS): --force-truncate -> --allow-overwrite
  4652. * src/prefs.h
  4653. (PREF_FORCE_TRUNCATE): Removed.
  4654. (PREF_ALLOW_OVERWRITE): New definition.
  4655. * src/SegmentMan.cc
  4656. (shouldCancelDownloadForSafety): --force-truncate -> --allow-overwrite
  4657. * src/MetalinkRequestInfo.cc
  4658. (execute): Queueing message are now logged in info level.
  4659. * src/common.h
  4660. (LONG_LONG_MAX): Removed.
  4661. (LONG_LONG_MIN): Removed.
  4662. * src/HttpResponseCommand.cc
  4663. (handleDefaultEncoding): LONG_LONG_MAX -> INT64_MAX
  4664. * src/FtpNegotiateCommand.cc
  4665. (recvSize): LONG_LONG_MAX -> INT64_MAX
  4666. * src/main.cc
  4667. (showUsage): Added --check-integriy and --realtime-chunk-checksum
  4668. command-line option.
  4669. (main): Added --check-integriy and --realtime-chunk-checksum
  4670. command-line option.
  4671. --force-truncate -> --allow-overwrite
  4672. Set initial value of --check-integrity option to false.
  4673. Don't show usage when error occurs while persing command-line options.
  4674. Removed deprecated --upload-limit option.
  4675. 2007-01-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4676. * src/message.h: Added EX_INVALID_PAYLOAD_SIZE and
  4677. EX_INVALID_BT_MESSAGE_ID. Following source files affected.
  4678. * src/BtAllowedFastMessage.cc:
  4679. * src/BtBitfieldMessage.cc
  4680. * src/BtCancelMessage.cc
  4681. * src/BtChokeMessage.cc
  4682. * src/BtHaveAllMessage.cc
  4683. * src/BtHaveMessage.cc
  4684. * src/BtHaveNoneMessage.cc
  4685. * src/BtInterestedMessage.cc
  4686. * src/BtNotInterestedMessage.cc
  4687. * src/BtPieceMessage.cc
  4688. * src/BtPortMessage.cc
  4689. * src/BtRejectMessage.cc
  4690. * src/BtRequestMessage.cc
  4691. * src/BtSuggestPieceMessage.cc
  4692. * src/BtUnchokeMessage.cc
  4693. * src/message.h: Added EX_INVALID_CHUNK_CHECKSUM. Following source
  4694. files are affected.
  4695. * src/ChunkChecksumValidator.cc
  4696. * src/SegmentMan.cc
  4697. 2007-01-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4698. To add chunk checksum validation:
  4699. * src/MetalinkEntry.h
  4700. (MetalinkChunkChecksum.h): New include.
  4701. (chunkChecksum): New variable.
  4702. * src/Request.h
  4703. (method): New variable.
  4704. (setMethod): New function.
  4705. (getMethod): New function.
  4706. (METHOD_GET): New static constant.
  4707. (METHOD_HEAD): New static constant.
  4708. * src/Xml2MetalinkProcessor.h
  4709. (getPieceHash): New function.
  4710. * src/PieceStorage.h
  4711. (markAllPiecesDone): New function.
  4712. (checkIntegrity): New function.
  4713. * src/FileAllocator.h
  4714. (NullFileAllocationMonitor.h): New include.
  4715. (FileAllocator): Initialize fileAllocationMonitor with new
  4716. NullFileAllocationMonitor().
  4717. * src/MultiDiskAdaptor.h
  4718. (messageDigest.h): Remove include.
  4719. (ctx): Removed.
  4720. (hashUpdate): Added ctx.
  4721. (MultiDiskAdaptor): Removed ctx.
  4722. (sha1Sum): Renamed as messageDigest.
  4723. (messageDigest): New function.
  4724. * src/UrlRequestInfo.h
  4725. (HeadResult): New class.
  4726. (digestAlgo): New variable.
  4727. (chunkChecksumLength): New variable.
  4728. (chunkChecksums): New variable.
  4729. (getHeadResult): New function.
  4730. (UrlRequestInfo): Added digestAlgo, chunkChecksumLength.
  4731. (setDigestAlgo): New function.
  4732. (setChunkChecksumLength): New function.
  4733. (setChunkChecksums): New function.
  4734. * src/DefaultPieceStorage.cc
  4735. (DiskAdaptorWriter.h): New include.
  4736. (ChunkChecksumValidator.h): New include.
  4737. (markAllPiecesDone): New function.
  4738. (checkIntegrity): New function.
  4739. * src/DefaultBtContext.h
  4740. (getPieceHashes): New function.
  4741. * src/TorrentRequestInfo.cc
  4742. (execute): Try to validate chunk checksum if file already exists and
  4743. .aria2 file doesn't there and user allows aria2 to overwrite it.
  4744. * src/messageDigest.h
  4745. (~MessageDigestContext): Added digestFree().
  4746. * src/MetalinkRequestInfo.cc
  4747. (execute): Set digestAlgo, chunkChecksum, chunkChecksums to reqInfo.
  4748. * src/DiskAdaptor.h
  4749. (messageDigest.h): New include.
  4750. (sha1Sum): Renamed as messageDigest.
  4751. (messageDigest): New function.
  4752. * src/DownloadCommand.h
  4753. (PeerStat.h): New include.
  4754. (maxDownloadSpeedLimit): New variable.
  4755. (startupIdleTime): New variable.
  4756. (lowestDownloadSpeedLimit): New variable.
  4757. (peerStat): New variable.
  4758. (setMaxDownloadSpeedLimit): New function.
  4759. (setStartupIdleTime): New function.
  4760. (setLowestDownloadSPeedLimit): New function.
  4761. * src/BtContext.h
  4762. (getPieceHashes): New function.
  4763. * src/main.cc
  4764. (main): Set PREF_REALTIME_CHUNK_CHECKSUM and PREF_CHECK_INTEGRITY
  4765. option to true for testing purpose.
  4766. * src/BtPieceMessage.cc
  4767. (checkPieceHash): Use messageDigest
  4768. * src/DownloadEngine.cc
  4769. (SetDescriptor): Removed.
  4770. (AccumulateActiveCommand): Removed.
  4771. (waitData): Rewritten.
  4772. (updateFdSet): Rewritten.
  4773. * src/MultiDiskAdaptor.cc
  4774. (hashUpdate): Added ctx.
  4775. (sha1Sum): Renamed as messageDigest.
  4776. (messageDigest): New function.
  4777. * src/BitfieldMan.h
  4778. (isBitRangeSet): New function.
  4779. (unsetBitRange): New function.
  4780. * src/ByteArrayDiskWriter.h
  4781. (sha1Sum): Renamed as messageDigest.
  4782. (messageDigest): New function.
  4783. * src/ConsoleDownloadEngine.cc
  4784. (calculateStatistics): If nspeed < 0 then set nspeed to 0.
  4785. * src/DiskWriter.h
  4786. (messageDigest.h): New include.
  4787. (sha1Sum): Renamed as messageDigest.
  4788. (messageDigest): New function.
  4789. * src/ChunkChecksumValidator.h: New class.
  4790. * src/DiskAdaptorWriter.h: New class.
  4791. * src/prefs.h
  4792. (PREF_REALTIME_CHUNK_CHECKSUM): New definition.
  4793. (PREF_CHECK_INTEGRITY): New definition.
  4794. * src/HttpResponseCommand.cc
  4795. (handleDefaultEncoding): Added method "HEAD" handling.
  4796. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  4797. (handleOtherEncoding):
  4798. Added the call to e->segmentMan->shouldCancelDownloadForSafety().
  4799. (createHttpDownloadCommand): Set maxDownloadSpeedLimit,
  4800. startupIdleTime, lowestDownloadSpeedLimit to command.
  4801. * src/SegmentMan.h
  4802. (getSegmentEntryByIndex): New function.
  4803. (getSegmentEntryByCuid): New function.
  4804. (getSegmentEntryIteratorByCuid): New function.
  4805. (diskWriter): DiskWriter -> DiskWriterHandle
  4806. (pieceHashes): New variable.
  4807. (chunkHashLength): New variable.
  4808. (digestAlgo): New variable.
  4809. (FindPeerStat): Removed.
  4810. (getPeerStat): Rewritten.
  4811. (markAllPiecesDone): New function.
  4812. (checkIntegrity): New function.
  4813. (tryChunkChecksumValidation): New function.
  4814. (isChunkChecksumValidationReady): New function.
  4815. * src/BitfieldMan.cc
  4816. (BitfieldMan): Initialized bitfieldLength, blocks to 0.
  4817. (BitfieldMan): Initialized blockLength, totalLength, bitfieldLength,
  4818. blocks to 0.
  4819. (isBitRangeSet): New function.
  4820. (unsetBitRange): New function.
  4821. * src/FtpNegotiateCommand.cc
  4822. (executeInternal): Set maxDownloadSpeedLimit,
  4823. startupIdleTime, lowestDownloadSpeedLimit to command.
  4824. (recvSize): Added method "HEAD" handling.
  4825. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  4826. * src/AbstractSingleDiskAdaptor.cc
  4827. (sha1Sum): Renamed as messageDigest.
  4828. (messageDigest): New function.
  4829. * src/AbstractSingleDiskAdaptor.h
  4830. (sha1Sum): Renamed as messageDigest.
  4831. (messageDigest): New function.
  4832. * src/Util.h
  4833. (indexRange): New function.
  4834. * src/MetalinkEntry.cc
  4835. (MetalinkEntry): Initialized chunkChecksum to 0.
  4836. * src/ShaVisitor.cc
  4837. (~ShaVisitor): Removed the call to ctx.digestFree().
  4838. * src/SegmentMan.cc
  4839. (ChunkChecksumValidator.h): New include.
  4840. (SegmentMan): Initialized chunkHashLength to 0. Initialized digestAlgo
  4841. to DIGEST_ALGO_SHA1.
  4842. (~SegmentMan): Removed diskWriter.
  4843. (FindSegmentEntryByIndex): Removed.
  4844. (FindSegmentEntryByCuid): Removed.
  4845. (checkoutSegment): Rewritten.
  4846. (findSlowerSegmentEntry): Rewritten.
  4847. (getSegment): Rewritten.
  4848. (updateSegment): Rewritten.
  4849. (completeSegment): Rewritten.
  4850. (markAllPiecesDone): New function.
  4851. (checkIntegrity): New function.
  4852. (isChunkChecksumValidationReady): New function.
  4853. (tryChunkChecksumValidation): New function.
  4854. * src/Xml2MetalinkProcessor.cc
  4855. (getEntry): Get size and set it to entry.
  4856. Get chunk checksum and set it to entry.
  4857. (getPieceHash): New function.
  4858. * src/Util.cc
  4859. (sha1Sum): Removed ctx.digestFree()
  4860. (fileChecksum): Removed ctx.digestFree()
  4861. (indexRange): New function.
  4862. * src/Request.cc
  4863. (METHOD_GET): New variable.
  4864. (METHOD_HEAD): New variable.
  4865. (Request): Added method.
  4866. * src/UrlRequestInfo.cc
  4867. (FatalException.h): New include.
  4868. (message.h): New include.
  4869. (operator<<): Added operator<< for class HeadResult.
  4870. (getHeadResult): New function.
  4871. (execute): Get filename and size in separate download engine.
  4872. * src/ChunkChecksumValidator.cc: New class.
  4873. * src/DownloadCommand.cc:
  4874. (DownloadCommand): Added peerStat.
  4875. (executeInternal): Use maxDownloadSpeedLimit member instead of getting
  4876. the value from Option.
  4877. The buffer size is now 16KB.
  4878. Use peerStat member instead of getting it from SegmentMan.
  4879. Use startupIdleTime member instead of gettingit from Option.
  4880. Added chunk checksum validation.
  4881. * src/AbstractDiskWriter.cc
  4882. (AbstractDiskWriter): Removed ctx.
  4883. (~AbstractDiskWriter): Removed ctx.digestFree()
  4884. (writeDataInternal): Returns the return value of write.
  4885. (readDataInternal): Returns the return value of read.
  4886. (sha1Sum): Renamed as messageDigest
  4887. (messageDigest): New function.
  4888. * src/AbstractDiwkWriter.h
  4889. (messageDigest.h): Removed include.
  4890. (ctx): Removed.
  4891. (sha1Sum): Renamed as messageDigest
  4892. (messageDigest): New function.
  4893. * src/DefaultPieceStorage.h
  4894. (markAllPiecesDone): New function.
  4895. (checkIntegrity): New function.
  4896. * src/NullFileAllocationMonitor.h: New class.
  4897. * src/MetalinkChunkChecksum.h: New class.
  4898. 2007-01-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4899. To decrease CPU usage in bittorrent download, calculation results in
  4900. BitfieldMan were cached and realtime fetching PeerObject was removed
  4901. with WeakHandle introduced. Option values are set to the objects
  4902. by setter before download begins.
  4903. * src/DefaultBtRequestFactory.cc: Use messageFactory member.
  4904. * src/DefaultBtRequestFactory.h
  4905. (dispatcher): BtMessageDispatcherHandle ->
  4906. BtMessageDispatcherWeakHandle.
  4907. (messageFactory): New variable.
  4908. (setBtMessageDispatcher): BtMessageDispatcherHandle ->
  4909. BtMessageDispatcherWeakHandle.
  4910. (setBtMessageFactory): New function.
  4911. * src/DefaultBtMessageDispatcher.cc:
  4912. (sendMessages): Use maxUploadSpeedLimit instead of fetching the value
  4913. from Option.
  4914. (checkRequestSlotAndDoNecessaryThing): Use requestTimeout instead of
  4915. feating the value from Option.
  4916. Use messageFactory member.
  4917. * src/PeerInteractionCommand.cc
  4918. (PeerInteractionCommand): Added maxDownloadSpeedLimit.
  4919. Add reverse dependencies to factory object.
  4920. Set maxUploadSpeedLimit and requestTimeout and messageFactory to
  4921. dispatcher.
  4922. Set messageFactory to receiver.
  4923. Set keepAliveInterval and maxDownloadSpeedLimit and messageFactory to
  4924. btInteractive.
  4925. Set receiver to peerObject.
  4926. Set maxDownloadSpeedLimit to this.
  4927. (executeInternal): Use maxDownloadSpeedLimit member.
  4928. * src/BtChokeMessage.cc
  4929. (doReceivedAction): Use dispatcher, requestFactory member.
  4930. (onSendComplete): Use dispatcher member.
  4931. * src/PeerInteractionCommand.h
  4932. (maxDownloadSpeedLimit): New variable.
  4933. * src/DefaultBtMessageReceiver.h
  4934. (peerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  4935. (dispatcher):
  4936. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  4937. (messageFactory): New variable.
  4938. (setPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  4939. (getPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  4940. (setDispatcher):
  4941. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  4942. (setBtMessageFactory): New function.
  4943. * src/DefaultBtInteractive.cc
  4944. (initiateHandshake): Use messageFactory member.
  4945. (addBitfieldMessageToQueue): Use messageFactory member.
  4946. (addAllowedFastMessageToQueue): Use messageFactory member.
  4947. (decideChoking): Use messageFactory member.
  4948. (checkHave): Use messageFactory member.
  4949. (sendKeepAlive): Use keepAliveInterval, messageFactory member.
  4950. (receiveMessages): Use maxDownloadSpeedLimit member.
  4951. (decideInterest): Use messageFactory member.
  4952. * src/BtRequestMessage.cc
  4953. (doReceivedAction): Use messageFactory, dispatcher member.
  4954. (onQueued): Use dispatcher member.
  4955. * src/BtPieceMessage.cc
  4956. (doReceivedAction): Use dispatcher member.
  4957. (send): Use peerConnection member.
  4958. (onWrongPiece): Use requestFactory member.
  4959. (handleChokingEvent): Use messageFactory, dispatcher member.
  4960. (handleCancelSendingPieceEvent): Use messageFactory, dispatcher member.
  4961. * src/BtMessageDispatcher.h
  4962. (BtMessageDispatcherWeakHandle): New type definition.
  4963. * src/SimpleBtMessage.cc
  4964. (send): Use peerConnection member.
  4965. * src/BtRejectMessage.cc
  4966. (doReceivedAction): Use dispatcher member.
  4967. * src/DefaultBtMessageDispatcher.h
  4968. (Option.h): Removed include.
  4969. (messageFactory): New variable.
  4970. (option): Removed.
  4971. (maxUploadSpeedLimit): New variable.
  4972. (requestTimeout): New variable.
  4973. (DefaultBtMessageDispatcher): Removed option.
  4974. Added maxUploadSpeedLimit, requestTimeout.
  4975. (setOption): Removed.
  4976. (getOption): Removed.
  4977. (setMaxUploadSpeedLimit): New function.
  4978. (setRequestTimeout): New function.
  4979. (setBtMessageFactory): New function.
  4980. * src/DefaultBtInteractive.h
  4981. (btMessageReceiver):
  4982. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  4983. (dispatcher):
  4984. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  4985. (btRequestFactory):
  4986. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  4987. (peerConnection):
  4988. PeerConnectionHandle -> PeerConnectionWeakHandle
  4989. (messageFactory): New variable.
  4990. (option): Removed.
  4991. (keepAliveInterval): New variable.
  4992. (maxDownloadSpeedLimit): New variable.
  4993. (DefaultBtInteractive): Added keepAliveInterval, maxDownloadSpeedLimit.
  4994. (setBtMessageReceiver):
  4995. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  4996. (setDispatcher):
  4997. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  4998. (setBtRequestFactory):
  4999. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  5000. (setPeerConnection):
  5001. PeerConnectionHandle -> PeerConnectionWeakHandle
  5002. (setOption): Removed.
  5003. (setKeepAliveInterval): New function.
  5004. (setMaxDownloadSpeedLimit): New function.
  5005. (setBtMessageFactory): New function.
  5006. * src/BitfieldMan.h
  5007. (cachedNumMissingBlock): New variable.
  5008. (cachedNumFilteredBlock): New variable.
  5009. (cachedCompletedLength): New variable.
  5010. (cachedFilteredComletedLength): New variable.
  5011. (cachedFilteredTotalLength): New variable.
  5012. (countMissingBlockNow): New function.
  5013. (countFilteredBlockNow): New function.
  5014. (getFilteredTotalLengthNow): New function.
  5015. (getCompletedLengthNow): New function.
  5016. (getFilteredCompletedLengthNow): New function.
  5017. (updateCache): New function.
  5018. * src/AbstractBtMessage.h
  5019. (BtMessageDispatcher.h): New include.
  5020. (PeerConnection.h): New include.
  5021. (BtRequestFactory.h): New include
  5022. (BtMessageFactory.h): New include.
  5023. (dispatcher): New variable.
  5024. (messageFactory): New variable.
  5025. (peerConnection: New variable.
  5026. (setBtMessageDispatcher): New function.
  5027. (setPeerConnection): New function.
  5028. (setBtMessageFactory): New function.
  5029. (setBtRequestFactory): New function.
  5030. * src/DefaultBtMessageFactory.cc
  5031. (setCommonProperty): Set dispatcher, requestFactory, this,
  5032. peerConnection to msg.
  5033. * src/BtRegistry.h
  5034. (BT_MESSAGE_RECEIVER): New macro.
  5035. * src/PeerConnection.h
  5036. (PeerConnectionWeakHandle): New type definition.
  5037. * src/BtMessageFactory.h
  5038. (BtMessageFactoryWeakHandle): New type definition.
  5039. * src/BitfieldMan.cc
  5040. (BitfieldMan): Added cachedNumMissingBlock, cachedNumFilteredBlock,
  5041. cachedCompletedLength, cachedFilteredComletedLength,
  5042. cachedFilteredTotalLength.
  5043. Call updateCache().
  5044. (countMissingBlock): Return cachedNumMissingBlock.
  5045. (countMissingBlockNow): New function.
  5046. (countBlock): Return cachedNumFilteredBlock if filterEnabled is true.
  5047. (countFilteredBlockNow): New function.
  5048. (setBit): Call updateCache().
  5049. (unsetBit): Call updateCache().
  5050. (setBitfield): Call updateCache().
  5051. (clearAllBit): Call updateCache().
  5052. (setAllBit): Use setBitInternal instead of setBit.
  5053. Call updateCache().
  5054. (addFilter): Call updateCache().
  5055. (enableFilter): Call updateCache().
  5056. (disableFilter): Call updateCache().
  5057. (clearFilter): Call updateCache().
  5058. (getFilteredTotalLength): Return cachedFilteredTotalLength.
  5059. (getFilteredTotalLengthNow): New function.
  5060. (getCompletedLength): Return cachedCompletedLength.
  5061. (getCompletedLengthNow): New function.
  5062. (getFilteredCompletedLength): Return cachedFilteredComletedLength.
  5063. (getFilteredCompletedLengthNow): New function.
  5064. (updateCache): New function.
  5065. * src/BtMessageReceiver.h
  5066. (BtMessageReceiverWeakHandle): New type definition.
  5067. * src/DefaultBtMessageReceiver.cc
  5068. (receiveHandshake): Use messageFactory member.
  5069. (sendHandshake): Use messageFactory member.
  5070. (receiveMessage): Use messageFactory member.
  5071. * src/DefaultBtMessageFactory.h
  5072. (dispatcher): New variable.
  5073. (requestFactory): New variable.
  5074. (peerConnection): New variablle.
  5075. (setBtMessageDispatcher): New function.
  5076. (setBtRequestFactory): New function.
  5077. (setPeerConnection): New function.
  5078. * src/SharedHandle.h
  5079. (RefCount): New class.
  5080. (WeakHandle): New class.
  5081. * src/PeerObject.h
  5082. (BtMessageReceiver.h): New include.
  5083. (PeerObject): Added btMessageReceiver.
  5084. (btMessageReceiver): New variable.
  5085. * src/Util.cc
  5086. (countBit): Simplified.
  5087. * src/BtCancelMessage.cc
  5088. (doReceivedAction): Use dispatcher member.
  5089. * src/BtRequestFactory.h
  5090. (BtRequestFactoryWeakHandle): New type definition.
  5091. * src/PeerStorage.h
  5092. (downloadSpeed): int -> uint32_t
  5093. (uploadSpeed): int -> uint32_t
  5094. (sessionDownloadLength): long long int -> uint64_t
  5095. (sessionUploadLength): long long int -> uint64_t
  5096. 2007-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5097. To add RecoverableException, FatalException:
  5098. * src/AbstractCommand.cc
  5099. (onAbort): Exception -> RecoverableException
  5100. * src/PeerAbstractCommand.h
  5101. (RecoverableException.h): New include.
  5102. (onAbort): Exception -> RecoverableException.
  5103. * src/PeerInteractionCommand.cc
  5104. (onAbort): Exception -> RecoverableException.
  5105. * src/PeerAbstractCommand.cc
  5106. (execute): Exception -> RecoverableException.
  5107. (onAbort): Exception -> RecoverableException.
  5108. * src/TorrentRequestInfo.cc
  5109. (execute): Exception -> RecoverableException.
  5110. * src/MetalinkRequestInfo.cc
  5111. (execute): Exception -> RecoverableException.
  5112. * src/MetaFileUtil.cc: RecoverableException.
  5113. * src/AbstractCommand.h
  5114. (onAbort): Exception -> RecoverableException.
  5115. * src/DlRetryEx.h: Exception -> RecoverableException.
  5116. * src/DlAbortEx.h: Exception -> RecoverableException.
  5117. * src/PeerListenCommand.cc: Exception -> RecoverableException.
  5118. * src/Util.cc: Exception -> RecoverableException.
  5119. * src/DefauldDiskWriter.cc: Exception -> RecoverableException.
  5120. * src/TrackerUpdateCommand.cc: Exception -> RecoverableException.
  5121. * src/UrlRequestInfo.cc: Exception -> RecoverableException.
  5122. To make ID static const int
  5123. * src/BtInterestedMessage.h
  5124. (ID_t): Removed.
  5125. (ID): New variable.
  5126. (getId): Made non-const.
  5127. * src/BtPieceMessage.h
  5128. (ID_t): Removed.
  5129. (ID): New variable.
  5130. (getId): Made non-const.
  5131. * src/BtChokeMessage.h
  5132. (ID_t): Removed.
  5133. (ID): New variable.
  5134. (getId): Made non-const.
  5135. * src/BtHaveAllMessage.h
  5136. (ID_t): Removed.
  5137. (ID): New variable.
  5138. (getId): Made non-const.
  5139. * src/BtKeepAliveMessage.h
  5140. (ID_t): Removed.
  5141. (ID): New variable.
  5142. (getId): Made non-const.
  5143. * src/BtHandshakeMessage.h
  5144. (ID): New variable.
  5145. (getId): Made non-const.
  5146. * src/BtSuggestPieceMessage.h
  5147. (ID_t): Removed.
  5148. (ID): New variable.
  5149. (getId): Made non-const.
  5150. * src/BtPortMessage.h
  5151. (ID_t): Removed.
  5152. (ID): New variable.
  5153. (getId): Made non-const.
  5154. * src/AbstractBtMessage.h
  5155. (id): Removed.
  5156. (AbstractBtMessage): Removed id.
  5157. (getId): Removed.
  5158. * src/BtHaveMessage.h
  5159. (ID_t): Removed.
  5160. (ID): New variable.
  5161. (getId): Made non-const.
  5162. * src/BtAllowedFastMessage.h
  5163. (ID_t): Removed.
  5164. (ID): New variable.
  5165. (getId): Made non-const.
  5166. * src/BtCancelMessage.h
  5167. (ID_t): Removed.
  5168. (ID): New variable.
  5169. (getId): Made non-const.
  5170. * src/BtNotInterestedMessage.h
  5171. (ID_t): Removed.
  5172. (ID): New variable.
  5173. (getId): Made non-const.
  5174. * src/BtChokeMessage.h
  5175. (ID_t): Removed.
  5176. (ID): New variable.
  5177. (getId): Made non-const.
  5178. * src/BtRejectMessage.h
  5179. (ID_t): Removed.
  5180. (ID): New variable.
  5181. (getId): Made non-const.
  5182. * src/BtBitfieldMessage.h
  5183. (ID_t): Removed.
  5184. (ID): New variable.
  5185. (getId): Made non-const.
  5186. * src/BtUnchokeMessage.h
  5187. (ID_t): Removed.
  5188. (ID): New variable.
  5189. (getId): Made non-const.
  5190. * src/BtRequestMessage.h
  5191. (ID_t): Removed.
  5192. (ID): New variable.
  5193. (getId): Made non-const.
  5194. * src/BtHaveMessage.h
  5195. (ID_t): Removed.
  5196. (ID): New variable.
  5197. (getId): Made non-const.
  5198. To add --force-truncate command-line option and a check whether
  5199. the file already exists:
  5200. * src/DirectDiskAdaptor.h
  5201. (getFilePath): Made virtual public.
  5202. * src/MultiDiskAdaptor.h
  5203. (File.h): New include.
  5204. (DiskWriterEntry::fileEntry): Made private.
  5205. (DiskWriterEntry::fileExists): New function.
  5206. (DiskWriterEntry::getFileEntry): New function.
  5207. (fileExists): New function.
  5208. (getFilePath): New function.
  5209. * src/TorrentRequestInfo.cc
  5210. (FatalException.h): New include.
  5211. (message.h): New include.
  5212. (RecoverableException.h): New include.
  5213. (execute): Added a check whether file is already exists or not.
  5214. * src/DiskAdaptor.h
  5215. (fileExists): New function.
  5216. (getFilePath): New function.
  5217. * src/main.cc
  5218. (showUsage): Added an explanation of --force-truncate command-line
  5219. option.
  5220. (main): Added --force-truncate command-line option.
  5221. * src/Exception.h
  5222. (setMsg): buf[256] -> buf[1024]
  5223. * src/CopyDiskWriter.h
  5224. (getFilePath): Made public virtual.
  5225. * src/MultiDiskAdaptor.cc: fileEntry -> getFileEntry()
  5226. (fileExists): New function.
  5227. * src/DownloadEngineFactory.cc
  5228. (newTorrentConsoleEngine): Don't open file here.
  5229. * src/message.h
  5230. (EX_FILE_ALREADY_EXISTS): New definition.
  5231. * src/prefs.h
  5232. (PREF_FOECE_TRUNCATE): New definition.
  5233. * src/HttpResponseCommand.cc
  5234. (handleDefaultEncoding): Added a check whether the file already exists.
  5235. * src/SegmentMan.h
  5236. (fileExists): New function.
  5237. (shouldCancelDownloadForSafety): New function.
  5238. * src/FtpNegotiateCommand.cc
  5239. (recvSize): Added a check whether the file already exists.
  5240. * src/AbstractSingleDiskAdaptor.cc
  5241. (File.h): New include.
  5242. (fileExists): New function.
  5243. * src/AbstractSingleDiskAdaptor.h
  5244. (getFilePath): Removed.
  5245. (fileExists): New function.
  5246. * src/SegmentMan.cc
  5247. (fileExists): New function.
  5248. (shouldCancelDownloadForSafety): New function.
  5249. To fix regression bug in torrent downloading:
  5250. * src/DefaultBtRequestFactory.cc
  5251. (doChokedAction): New function.
  5252. * src/DefaultBtRequestFactory.h
  5253. (doChokedAction): New function.
  5254. * src/DefaultBtMessageDispatcher.cc
  5255. (doChokedAction): Do not delete request if its target is in allowed
  5256. fast set.
  5257. * src/DefaultBtInteractive.cc
  5258. (doPostHandshakeProcessing): Added a call to sendPendingMessage().
  5259. (sendKeepAlive): Send keep alive message even if the outgoing message
  5260. queue is not empty.
  5261. (decideInterest): Simplified the code.
  5262. (fillPiece): Remove a call to dispatcher->doChokedAction() because
  5263. it is already called when BtChokeMessage is received from a peer.
  5264. * src/BtRequestFactory.h
  5265. (doChokedAction): New function.
  5266. To clean up code:
  5267. * src/PeerInteractionCommand.h
  5268. (executeInternal): Added virtual keyword explicitly.
  5269. (prepareForRetry): Added virtual keyword explicitly.
  5270. (prepareForNextPeer): Added virtual keyword explicitly.
  5271. (onAbort): Added virtual keyword explicitly.
  5272. * src/RequestSlot.cc
  5273. (isTimeout): Use Time::elapsed() instead of differenceInMillis().
  5274. * src/BtPieceMessage.cc
  5275. (doReceivedAction): Added a debug log of piece's bitfield.
  5276. * src/Piece.h
  5277. (getBitfieldLength): New function.
  5278. * src/ByteArrayDiskWriter.cc
  5279. (clear): Added buf = 0 to avoid double free corruption.
  5280. * src/FileAllocator.cc
  5281. (allocate): Fixed an assignment of fileAllocationMonitor->currentValue.
  5282. Added cp.reset().
  5283. * src/BitfieldMan.h
  5284. (operator=): Rewritten.
  5285. * src/BitfieldMan.cc
  5286. (BitfieldMan): Initialized bitfield, useBitfield.
  5287. * src/PeerConnection.cc
  5288. (receiveMessage): Added a call to socket->readable() after getting
  5289. message length to avoid possible EOF.
  5290. * src/Util.cc
  5291. (torrentUrlencode): Fixed an encodeing bug. BUG#1629912
  5292. 2007-01-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5293. To add an ability to pre-allocate file space:
  5294. * src/DirectDiskAdaptor.h: Rewritten.
  5295. * src/PieceStorage.h: DiskAdaptor -> DiskAdaptorHandle
  5296. * src/MultiDiskAdaptor.h: Rewritten.
  5297. * src/DefaultPieceStorage.cc
  5298. (MultiDiskWriter.h): Removed include.
  5299. (PreAllocationDiskWriter.h): Removed include.
  5300. (FileAllocationMonitor.h): New include.
  5301. (~DefaultPieceStorage): Removed deletion of diskAdaptor.
  5302. (initStorage): Rewritten.
  5303. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5304. * src/FileAllocator.h: New class.
  5305. * src/FileAllocator.cc: New class.
  5306. * src/FileAllocationMonitor.h: New class.
  5307. * src/FileAllocationMonitor.cc: New class.
  5308. * src/ConsoleFileAllocationMonitor.h: New class.
  5309. * src/ConsoleFileAllocationMonitor.cc: New class.
  5310. * src/AbstractSingleDiskAdaptor.h: New class.
  5311. * src/AbstractSingleDiskAdaptor.cc: New class.
  5312. * src/DiskAdaptor.h
  5313. (Directory.h): Removed include.
  5314. (DiskWriter.h): Removed include.
  5315. (FileEntry.h): Removed include.
  5316. (diskWriter): Removed.
  5317. (DiskAdaptor): Removed diskWriter.
  5318. (openFile): Made pure virtual.
  5319. (closeFile): Made pure virtual.
  5320. (openExistingFile): Made pure virtual.
  5321. (initAndOpenFile): Made pure virtual.
  5322. (writeData): Made pure virtual.
  5323. (readData): Made pure virtual.
  5324. (sha1Sum): Made pure virtual.
  5325. (getStoreDir): Returns const reference of storeDir.
  5326. (DiskAdaptorHandle): New type definition.
  5327. * src/main.cc
  5328. (ConsoleFileAllocationMonitor.h): New include.
  5329. (showUsage): Added default value description of -s option.
  5330. Added the description of --file-allocation option.
  5331. (main): Set default value of --file-allocation option to 'none'.
  5332. Added --file-allocation command-line option.
  5333. Setup FileAllocationMonitorFactory.
  5334. * src/FtpInitiateConnectionCommand.cc
  5335. (executeInternal): Removed diskWriter related processing, which was
  5336. moved to FtpNegotiationCommand.cc.
  5337. * src/DirectDiskAdaptor.cc
  5338. (getFilePath): Made non-const.
  5339. * src/CopyDiskAdaptor.h
  5340. (DiskAdaptor.h): Removed include.
  5341. (DiskWriter.h): Removed include.
  5342. (AbstractSingleDiskAdaptor.h): New include.
  5343. (getFilePath): Made non-const. Added virtual keyword.
  5344. (CopyDiskAdaptor): Removed diskWriter.
  5345. (getTempFile): Returns const reference.
  5346. (CopyDiskAdaptorHandle): New type definition.
  5347. * src/ByteArrayDiskWriter.cc
  5348. (clear): Simplified.
  5349. (initAndOpenFile): Rewritten.
  5350. (openFile): Call initAndOpenFile()
  5351. * src/MultiDiskAdaptor.cc: Rewritten.
  5352. * src/DownloadEngineFactory.cc
  5353. (FileAllocator.h): New include.
  5354. (FileAllocationMonitor.h): New include.
  5355. (newConsoleEngine): Call DefaultDiskWriter::createNewDiskWriter() to
  5356. create DefaultDiskWriter with file allocator.
  5357. * src/DiskWriter.h
  5358. (initAndOpenFile): Added totalLength argument.
  5359. (openFile): Added totalLength argument.
  5360. * src/prefs.h
  5361. (PREF_FILE_ALLOCATION): New definition.
  5362. (V_PREALLOC): New definition.
  5363. (V_NONE): New definition.
  5364. * src/HttpResponseCommand.cc
  5365. (handleDefaultEncoding): Call DefaultDiskWriter::initAndOpenFile with
  5366. size.
  5367. * src/FtpNegotiateCommand.cc
  5368. (Util.h): New include.
  5369. (recvSize): Open file here.
  5370. * src/Util.h
  5371. (ullitos): New function.
  5372. * src/CopyDiskWriter.h
  5373. (getFilePath): Made non-const.
  5374. * src/DefaultDiskWriter.h
  5375. (Option.h): New include.
  5376. (totalLength): Removed.
  5377. (DefaultDiskWriter): Removed totalLength.
  5378. (initAndOpenFile): Added totalLength argument.
  5379. (DefaultDiskWriterHandle): New type definition.
  5380. (createNewDiskWriter): New function.
  5381. * src/Util.cc
  5382. (ullitos): New function.
  5383. * src/DefaultDiskWriter.cc
  5384. (message.h): New include.
  5385. (FileAllocator.h): New include.
  5386. (prefs.h): New include.
  5387. (Util.h): New include.
  5388. (DefaultDiskWriter): Removed totalLength.
  5389. (initAndOpenFile): Added file allocation.
  5390. (createNewDiskWriter): New function. Just for temporary solution.
  5391. It will be rewritten later.
  5392. * src/DiskAdaptor.cc
  5393. (DiskAdaptor): Removed diskWriter.
  5394. * src/AbstractDiskWriter.cc
  5395. (LogFactory.h): New include.
  5396. (AbstractDiskWriter): Added fileAllocator, logger.
  5397. (openFile): Added totalLength argument.
  5398. * src/AbstractDiskWriter.h
  5399. (FileAllocator.h): New include.
  5400. (Logger.h): New include.
  5401. (fileAllocator): New variable.
  5402. (logger): New variable.
  5403. (openFile): Added totalLength argument. Added virtual keyword
  5404. explicitly.
  5405. (openExistingFile): Added totalLength argument. Added virtual keyword
  5406. explicitly.
  5407. (closeFile): Added virtual keyword explicitly.
  5408. (sha1Sum): Added virtual keyword explicitly.
  5409. (writeData): Added virtual keyword explicitly.
  5410. (readData): Added virtual keyword explicitly.
  5411. (setFileAllocator): New function.
  5412. * src/DefaultPieceStorage.h
  5413. (FileAllocator.h): New include.
  5414. (diskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5415. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5416. * src/FileProgressMonitor.h: New class.
  5417. To compile aria2 on PC-BSD:
  5418. * src/DefaultBtContext.cc
  5419. (libgen.h): New include.
  5420. To fix memory leak:
  5421. * src/Exception.h
  5422. (~Exception): Delete cause. Fixed memory leak.
  5423. 2006-12-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5424. Rewritten a portion of bittorrent implementation:
  5425. * src/BtMessageValidator.h: New class.
  5426. * src/BtBitfieldMessageValidator.h: New class.
  5427. * src/BtHandshakeMessageValidator.h: New class.
  5428. * src/BtRequestMessageValidator.h: New class.
  5429. * src/BtSuggestPieceMessageValidator.h: New class.
  5430. * src/BtAllowedFastMessageValidator.h: New class.
  5431. * src/BtRejectMessageValidator.h: New class.
  5432. * src/BtCancelMessageValidator.h: New class.
  5433. * src/BtPieceMessageValidator.h: New class.
  5434. * src/BtHaveMessageValidator.h: New class.
  5435. * src/BtEventListener.h: New class.
  5436. * src/AbstractBtEventListener.h: New class.
  5437. * src/BtEvent.h: New class.
  5438. * src/BtChokingEvent.h: New class.
  5439. * src/BtChokedEvent.h: New class.
  5440. * src/BtCancelSendingPieceEvent.h: New class.
  5441. * src/BtAbortOutstandingRequestEvent.h: New class.
  5442. * src/Randomizer.h: New class.
  5443. * src/SimpleRandomizer.h: New class.
  5444. * src/BtMessage.h: New class.
  5445. * src/AbstractBtMessage.h: New class.
  5446. * src/SimpleBtMessage.h: New class.
  5447. * src/BtHaveMessage.h: New class.
  5448. * src/BtInterestedMessage.h: New class.
  5449. * src/BtAllowedFastMessage.h: New class.
  5450. * src/BtUnchokeMessage.h: New class.
  5451. * src/BtCancelMessage.h: New class.
  5452. * src/BtNotInterestedMessage.h: New class.
  5453. * src/BtChokeMessage.h: New class.
  5454. * src/BtHaveNoneMessage.h: New class.
  5455. * src/BtHandshakeMessage.h: New class.
  5456. * src/BtSuggestPieceMessage.h: New class.
  5457. * src/BtHaveMessage.h: New class.
  5458. * src/BtPieceMessage.h: New class.
  5459. * src/BtHaveAllMessage.h: New class.
  5460. * src/BtKeepAliveMessage.h: New class.
  5461. * src/BtPortMessage.h: New class.
  5462. * src/BtRejectMessage.h: New class.
  5463. * src/BtBitfieldMessage.h: New class.
  5464. * src/BtRequestMessage.h: New class.
  5465. * src/DefaultBtRequestFactory.h: New class.
  5466. * src/DefaultBtMessageReceiver.h: New class.
  5467. * src/BtInteractive.h: New class.
  5468. * src/BtMessageDispatcher.h: New class.
  5469. * src/DefaultBtMessageDispatcher.h: New class.
  5470. * src/DefaultBtInteractive.h: New class.
  5471. * src/BitfieldManFactory.h: New class.
  5472. * src/HandleRegistry.h: New class.
  5473. * src/BtMessageFactory.h: New class.
  5474. * src/BtMessageReceiver.h: New class.
  5475. * src/DefaultBtMessageFactory.h: New class.
  5476. * src/PeerObject.h: New class.
  5477. * src/BtRequestFactory.h: New class.
  5478. * src/SuggestPieceMessage.h: Removed.
  5479. * src/PortMessage.h: Removed.
  5480. * src/SuggestPieceMessage.h: Removed.
  5481. * src/KeepAliveMessage.h: Removed.
  5482. * src/HandshakeMessage.h: Removed.
  5483. * src/PeerInteraction.h: Removed.
  5484. * src/UnchokeMessage.h: Removed.
  5485. * src/PieceMessage.h: Removed.
  5486. * src/RequestMessage.h: Removed.
  5487. * src/InterestedMessage.h: Removed.
  5488. * src/HaveMessage.h: Removed.
  5489. * src/CancelMessage.h: Removed.
  5490. * src/RejectMessage.h: Removed.
  5491. * src/AllowedFastMessage.h: Removed.
  5492. * src/HaveNoneMessage.h: Removed.
  5493. * src/SimplePeerMessage.h: Removed.
  5494. * src/HaveAllMessage.h: Removed.
  5495. * src/BitfieldMessage.h: Removed.
  5496. * src/PeerMessageFactory.h: Removed.
  5497. * src/NotInterestedMessage.h: Removed.
  5498. * src/ChokeMessage.h: Removed.
  5499. * src/PeerMessage.h: Removed.
  5500. 2006-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5501. To know root cause of exception:
  5502. * src/Exception.h
  5503. (cause): New variable.
  5504. (Exception): Added a parameter.
  5505. (getMsg): Return const reference to msg.
  5506. (getCause): New function.
  5507. * src/DlRetryEx.h
  5508. (DlRetryEx): Added a parameter 'cause'.
  5509. Added an overloaded constructor.
  5510. (DlAbortEx): Added a parameter 'cause'.
  5511. Added an overloaded constructor.
  5512. * src/SimpleLogger.cc
  5513. (writeLog): Log nested exception messages recursively.
  5514. 2006-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5515. * src/DefaultBtProgressInfoFile.cc
  5516. (load): Fixed memory leak when the infohash doesn't match.
  5517. 2006-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5518. * src/DefaultPeerStorage.cc
  5519. (calculateStat): Simplified the code by combining 2 loops into 1.
  5520. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5521. Introduce new preference PREF_BT_TIMEOUT. This is the timeout value
  5522. for BitTorrent download:
  5523. * src/PeerAbstractCommand.cc
  5524. (PeerAbstractCommand): PREF_TIMEOUT -> PREF_BT_TIMEOUT
  5525. * src/main.cc:
  5526. (timeoutSpecified): Removed.
  5527. (main): Set the initial value of PREF_BT_TIMEOUT to 180.
  5528. Removed timeoutSpecified. TODO: Add --bt-timeout command line option.
  5529. * src/TorrentRequestInfo.cc
  5530. (timeoutSpecified): Removed.
  5531. (torrentHandler): Removed timeoutSpecified and the adjustment of
  5532. timeout value.
  5533. * src/prefs.h
  5534. (PREF_BT_TIMEOUT): New definition.
  5535. Delete unused variables:
  5536. * src/TorrentRequestInfo.cc
  5537. (requestInfo): Removed.
  5538. Move setSignalHander to Util::setGlobalSignalHandler:
  5539. * src/TorrentRequestInfo.cc:
  5540. setSignalHander -> Util::setGlobalSignalHandler
  5541. * src/main.cc
  5542. (setSignalHander): Removed.
  5543. (main): setSignalHander -> Util::setGlobalSignalHandler
  5544. * src/Util.h
  5545. (setGlobalSignalHandler): New function.
  5546. * src/Util.cc
  5547. (setGlobalSignalHandler): New function.
  5548. * src/UrlRequestInfo.cc:
  5549. setSignalHander -> Util::setGlobalSignalHandler
  5550. Reset peer status in order to exit gracefully:
  5551. * src/PeerAbstractCommand.cc
  5552. (execute): Call peer->resetStatus() when btRuntime->isHalt() is true.
  5553. To fix the bug that causes the number of bytes uploaded is not saved
  5554. to .aria2 file:
  5555. * src/DefaultPeerStorage.h
  5556. (removedPeerSessionDownloadLength): New variable.
  5557. (removedPeerSessionUploadLength): New variable.
  5558. * src/DefaultPeerStorage.cc
  5559. (DefaultPieceStorage): Added removedPeerSessionDownloadLength(0),
  5560. removedPeerSessionUploadLength(0).
  5561. (calculateStat): Calculate the number of bytes downloaded(uploaded)
  5562. through all peers, and then add removedPeerSessionDownloadLength(
  5563. removedPeerSessionUploadLength) to it.
  5564. (deleteUnusedPeer): Add the number of bytes downloaded(uploaded) from
  5565. (to) the peer to removedPeerSessionDownloadLength
  5566. (removedPeerSessionUploadLength).
  5567. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5568. To add Metalink location option:
  5569. * src/MetalinkRequestInfo.cc
  5570. (execute): Call MetalinkEntry::setLocationPreference()
  5571. * src/main.cc
  5572. (showUsage): Added the help message for --metalink-location option.
  5573. (main): Added --metalink-location option.
  5574. * src/prefs.h
  5575. (PREF_METALINK_LOCATION): New definition.
  5576. * src/MetalinkEntry.cc
  5577. (AddLocationPreference): New function object.
  5578. (setLocationPreference): New function.
  5579. * src/Xml2MetalinkProcessor.cc
  5580. (getResource): Set location attribute to MetalinkResource
  5581. To show URLs to download
  5582. * src/UrlRequestInfo.h
  5583. (printUrls): New function.
  5584. To add multiple <file> Metalink support:
  5585. * src/MetalinkEntry.h
  5586. (MetalinkResources): Removed.
  5587. (setLocationPreference): New function.
  5588. (MetalinkEntryHandle): New type definition.
  5589. (MetalinkEntries): New type definition.
  5590. * src/Xml2MetalinkProcessor.h
  5591. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  5592. (getResource): MetalinkResource* -> MetalinkResourceHandle
  5593. (parseFile): Metalinker* -> MetalinkerHandle
  5594. * src/UrlRequestInfo.h
  5595. (execute): RequestInfo* -> RequestInfos
  5596. * src/MetalinkRequestInfo.cc
  5597. (AccumulateNonP2PUrl): MetalinkResource* -> MetalinkResourceHandle
  5598. (FindBitTorrentUrl): MetalinkResource* -> MetalinkResourceHandle
  5599. (execute): RequestInfo* -> RequestInfos
  5600. Added multiple <file> support. Print filename when it is queued.
  5601. * src/MetalinkRequestInfo.h
  5602. (execute): RequestInfo* -> RequestInfos
  5603. (getDownloadEngine): Removed.
  5604. * src/RequestInfo.h
  5605. (RequestInfoHandle): New type definition.
  5606. (RequestInfos): New type definition.
  5607. (execute): RequestInfo* -> RequestInfos
  5608. (getDownloadEngine): Removed.
  5609. * src/MetalinkResource.h
  5610. (MetalinkResourceHandle): New type definition.
  5611. (MetalinkResources): New type definition.
  5612. * src/MetalinkEntry.cc
  5613. (~MetalinkEntry): Removed the deletion of the elements of resources,
  5614. because the element is now of type MetalinkResourceHandle.
  5615. (PrefOrder): MetalinkResource* -> MetalinkResourceHandle
  5616. (Supported): MetalinkResource* -> MetalinkResourceHandle
  5617. (dropUnsupportedResource): Removed the deletion of the elements of
  5618. resources because the element is now of type MetalinkResourceHandle.
  5619. * src/Xml2MetalinkProcessor.cc
  5620. (parseFile): Metalinker* -> MetalinkerHandle
  5621. MetalinkEntry* -> MetalinkEntryHandle
  5622. Removed try-catch block.
  5623. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  5624. MetalinkResource* -> MetalinkResourceHandle
  5625. Removed try-catch block.
  5626. (getResource): MetalinkResource* -> MetalinkResourceHandle
  5627. Free result by using xmlXPathFreeObject()
  5628. * src/Metalinker.cc
  5629. (~Metalinker): Removed the deletion of entries.
  5630. MetalinkEntry* -> MetalinkEntryHandle
  5631. (queryEntry): Add multiple <file> Metalink support.
  5632. * src/Metalinker.h
  5633. (MetalinkEntries): Removed.
  5634. (queryEntry): MetalinkEntry* -> MetalinkEntries
  5635. * src/MetalinkProcessor.h
  5636. (parseFile): Metalinker* -> MetalinkerHandle
  5637. Bug fixes:
  5638. * src/PeerChokeCommand.cc
  5639. (execute): cat01->cat02
  5640. * src/DefaultPieceStorage.cc
  5641. (DefaultPieceStorage): Added diskAdaptor(0)
  5642. * src/TrackerWatcherComand.cc:
  5643. (execute): Use btAnnounce->noMoreAnnounce()
  5644. to determin whether the function returns true or not.
  5645. * src/TrackerUpdateCommand.cc:
  5646. (execute): Use btAnnounce->noMoreAnnounce()
  5647. to determin whether the function returns true or not.
  5648. * src/FtpConnection.cc
  5649. (bulkReceiveResponse): Throw DlRetryEx if EOF got.
  5650. This is the fix of the busy loop bug.
  5651. * src/DownloadCommand.cc
  5652. (DownloadCommand): Reuse PeerStat. segmentMan->getPeerStat() returns
  5653. cached PeerStat.
  5654. The value of "name" entry in torrent file is now set by
  5655. *DiskAdaptor::setTopDir(...) methods.
  5656. * src/MultiDiskAdaptor.h
  5657. (topDir): New variable.
  5658. (setTopDir): New function.
  5659. (getTopDir): New function.
  5660. * src/MultiDiskAdaptor.cc
  5661. (getFilePath): Concat storDir, "/" and topDir.
  5662. (mkdir): Use getFilePath() to get the directory path for output.
  5663. * src/DefaultPieceStorage.cc
  5664. (initStorage): Set the value of "name" entry to MultiDiskAdaptor,
  5665. CopyDiskAdaptor.
  5666. * src/CopyDiskAdaptor.h
  5667. (topDir): New variable.
  5668. (setTopDir): New function.
  5669. (getTopDir): New function.
  5670. * src/CopyDiskAdaptor.cc
  5671. (fixFilename): Updated.
  5672. Misc
  5673. * src/UrlRequestInfo.h
  5674. (e): Removed.
  5675. (UrlRequestInfo): Removed e.
  5676. (getDownloadEngine): Removed.
  5677. * src/UrlRequestInfo.cc
  5678. (handler): Rewritten.
  5679. (printUrls): New function.
  5680. (execute): Call printUrls().
  5681. * src/HandshakeMessage.cc
  5682. (check): peerinteraction->getBtContext() -> btContext
  5683. * src/PeerInteraction.h
  5684. (getBtContext): Removed.
  5685. * src/TorrentRequestInfo.h
  5686. (execute): RequestInfo* -> RequestInfos
  5687. (getDownloadEngine): Removed.
  5688. * src/TorrentRequestInfo.cc
  5689. (haltRequested): Removed.
  5690. (btHaltRequested): New variable.
  5691. (torrentHandler): haltRequested -> btHaltRequested
  5692. (execute): RequestInfo* -> RequestInfos
  5693. * src/TorrentConsoleDownloadEngine.cc
  5694. (afterEachIteration): haltRequested -> btHaltRequested.
  5695. * src/ConsoleDownloadEngine.h
  5696. (initStatistics): Added virtual.
  5697. (calculateStatistics): Added virtual.
  5698. (onEndOfRun): Added virtual.
  5699. (afterEachIteration): Added virtual.
  5700. * src/ConsoleDownloadEngine.cc
  5701. (haltRequested): New variable.
  5702. (afterEachIteration): New function.
  5703. * src/main.cc
  5704. (requestInfo): Removed.
  5705. * src/SegmentMan.cc
  5706. (findSlowerSegmentEntry): Refactored.
  5707. * Release 0.9.0
  5708. 2006-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5709. To divide TorrentMan into 6 classes: BtContext, BtRuntime,
  5710. PeerStorage, PieceStorage, BtAnnounce and BtProgressInfoFile
  5711. * src/TorrentMan.h: Removed.
  5712. * src/TorrentMan.cc: Removed.
  5713. * src/TrackerWatcherComand.h: Made subclass of BtContextAwareCommand.
  5714. * src/SeedCheckCommand.cc: Use pieceStorage, btRuntime
  5715. * src/PeerAbstractCommand.h: Made subclass of BtContextAwareCommand.
  5716. * src/PeerAbstractCommand.cc: Use btRuntime.
  5717. * src/BtContextAwareCommand.h: New class.
  5718. * src/FileEntry.h: Added accessor methods for following variables.
  5719. (path): Made private.
  5720. (length): Made private.
  5721. (offset): Made private.
  5722. (extracted): Made private.
  5723. (requested): Made private.
  5724. (FileEntries): New definition.
  5725. (FileEntryHandle): New definition.
  5726. * src/FileEntry.cc: New file.
  5727. * src/HaveEraseCommand.h: Made subclass of BtContextAwareCommand.
  5728. * src/HaveEraseCommand.cc: Use btRuntime, pieceStorage.
  5729. * src/PeerChokeCommand.h: Made subclass of BtContextAwareCommand.
  5730. * src/PeerChokeCommand.cc: Use btRuntime, peerStorage, pieceStorage.
  5731. * src/PieceStorage.h: New file.
  5732. * src/PeerInteractionCommand.h: Use btContext.
  5733. * src/PeerInteractionCommand.cc: Use pieceStorage, peerStorage,
  5734. btRuntime.
  5735. * src/DefaultBtProgressInfoFile.h: New file.
  5736. * src/DefaultBtProgressInfoFile.cc: New file.
  5737. * src/File.cc
  5738. (Util.h): New include.
  5739. (mkdirs): New function.
  5740. * src/MultiDiskAdaptor.h
  5741. (mkdir): New function.
  5742. * src/PeerListProcessor.h
  5743. (Peers): Removed.
  5744. * src/PeerInteraction.h
  5745. (torrentMan): Removed.
  5746. (btContext): New variable.
  5747. (peerStorage): New variable.
  5748. (pieceStorage): New variable.
  5749. (btAnnounce): New variable.
  5750. (getTorrentMan): Removed.
  5751. (getBtContext): New function.
  5752. * src/PeerInteraction.cc: Use btContext, peerStorage, pieceStorage,
  5753. btAnnounce.
  5754. * src/HandshakeMessage.h
  5755. (TorrentMan.h): Removed.
  5756. * src/HandshakeMessage.cc: Use btContext.
  5757. * src/DefaultBtAnnounce.cc: New file.
  5758. * src/MultiDiskWriter.cc: Use the accessor methods of FileEntry.
  5759. * src/DefaultPieceStorage.cc: New file.
  5760. * src/DefaultBtContext.h: New file.
  5761. * src/TorrentRequestInfo.cc: Use btContext, pieceStorage.
  5762. Use the accessor methods of FileEntry.
  5763. * src/CookieBox.cc: Updated to use Util::slice().
  5764. * src/PieceMessage.cc: Use btContext, pieceStorage.
  5765. * src/common.h (SharedHandle.h): New include.
  5766. * src/PeerMessage.cc (PeerMessage): Added btContext, peerStorage,
  5767. pieceStorage.
  5768. * src/TorrentAutoSaveCommand.h: Made subclass of BtContextAwareCommand.
  5769. * src/DiskAdaptor.h
  5770. (topDir): Removed.
  5771. (getFileEntryFromPath): Changed the return type to FileEntryHandle.
  5772. (setTopDir): Removed.
  5773. (getTopDir): Removed.
  5774. * src/BtContext.h: New file.
  5775. * src/DefaultPeerStorage.h: New file.
  5776. * src/PieceMessage.h (TorrentMan.h): Removed.
  5777. * src/RequestMessage.h (TorrentMan.h): Removed.
  5778. * src/TorrentDownloadEngine.h
  5779. (uploadLength): New variable.
  5780. (btContext): New variable.
  5781. (btRuntime): New variable.
  5782. (pieceStorage): New variable.
  5783. (peerStorage): New variable.
  5784. (btAnnounce): New variable.
  5785. (btProgressInfoFile): New variable.
  5786. (torrentMan): Removed.
  5787. (setBtContext): New function.
  5788. * src/TorrentDownloadEngine.cc: Use BtContext, BtRuntime, pieceStorage,
  5789. peerStorage, btAnnounce, btProgressInfoFile.
  5790. * src/Piece.h
  5791. (toString): New function.
  5792. (Pieces): New type definition.
  5793. * src/Peer.h
  5794. (active): New variable.
  5795. (Peer): Added active.
  5796. (activate): Set active to true.
  5797. (deactivate): Set active to false.
  5798. (isActive): New function.
  5799. (Peers): New type definition.
  5800. * src/DirectDiskAdaptor.cc
  5801. (getFilePath): Use the accessor methods of FileEntry.
  5802. * src/TorrentConsoleDownloadEngine.h
  5803. (afterEachIteration): New function.
  5804. * src/TorrentConsoleDownloadEngine.cc
  5805. (haltRequested): New variable.
  5806. (sendStatistics): Use pieceStorage, btRuntime.
  5807. (afterEachIteration): New function.
  5808. * src/AnnounceList: AnnounceTier->AnnounceTierHandle.
  5809. * src/Directry.h
  5810. (Directory): New function.
  5811. (DirectoryHandle): New type definition.
  5812. * src/BtProgressInfoFile.h: New file.
  5813. * src/RequestMessage.cc: Use pieceStorage.
  5814. * src/BtRuntime.h: New file.
  5815. * src/DefaultBtContext.cc: New file.
  5816. * src/BitfieldMan.h
  5817. (getCompletedLength): New function(private).
  5818. (getCompletedLength): New function.
  5819. (getFilteredCompletedLength): New function.
  5820. * src/BitfieldMan.h
  5821. (getCompletedLength): New function(private).
  5822. (getCompletedLength): New function.
  5823. (getFilteredCompletedLength): New function.
  5824. * src/MultiDiskAdaptor.cc
  5825. (mkdir): New function.
  5826. (openFile): Call mkdir().
  5827. (initAndOpenFile): Call mkdir().
  5828. * src/CancelMessage.h
  5829. (TorrentMan.h): Removed.
  5830. * src/RejectMessage.h
  5831. (TorrentMan.h): Removed.
  5832. * src/DownloadEngineFactory.cc
  5833. (DefaultPieceStorage.h): New include.
  5834. (DefaultPeerStorage.h): New include.
  5835. (DefaultBtAnnounce.h): New include.
  5836. (DefaultBtProgressInfoFile.h): New include.
  5837. (newTorrentConsoleEngine): Rewritten.
  5838. * src/ShareRatioSeedCriteria.h
  5839. (torrentMan): Removed.
  5840. (btContext): New variable.
  5841. (peerStorage): New variable.
  5842. (btRuntime): New variable.
  5843. (evaluate): Use btContext, btRuntime, peerStorage.
  5844. * src/AnnounceTier.h: New file.
  5845. * src/BtAnnounce.h: New file.
  5846. * src/BtRegistry.h: New file.
  5847. * src/PeerInitiateConnectionCommand.h: Added btContext.
  5848. * src/PeerConnection.h (TorrentMan.h): Removed.
  5849. * src/PeerMessageFactory.cc: Use btContext, pieceStorage.
  5850. * src/Util.h
  5851. (slice): Added an argument.
  5852. * src/Util.cc
  5853. (slice): Added an argument to control whether trim is made or not.
  5854. * src/PeerStorage.h: New file.
  5855. * src/BtRegistry.cc: New file.
  5856. * src/TrackerUpdateCommand.h: Made subclass of BtContextAwareCommand.
  5857. * src/CopyDiskAdaptor.cc: Use the accessor methods of FileEntry.
  5858. * src/MultiDiskWriter.h: FileEntry -> FileEntryHandle
  5859. * src/PeerListenCommand.cc: Use btRuntime, peerStorage, btContext.
  5860. * src/TorrentRequestInfo.h
  5861. (e): Removed.
  5862. (showFileEntry): Added an argument.
  5863. (getDownloadEngine): Return 0.
  5864. * src/DefaultBtAnnounce.h: New file.
  5865. * src/TorrentAutoSaveCommand.cc: Use btRuntime, btProgressInfoFile.
  5866. * src/TrackerWatcherComand.cc: Use btRuntime, btAnnounce,
  5867. * src/PeerMessageFactory.h
  5868. (btContext): New variable.
  5869. (pieceStorage): New variable.
  5870. * src/TrackerUpdateCommand.cc: Use btRuntime, peerStorage, btContext,
  5871. btAnnounce.
  5872. * src/DiskAdaptor.cc
  5873. (DiskAdaptor): Removed topDir.
  5874. (~DiskAdaptor): Removed topDir.
  5875. * src/PeerListenCommand.h: Made subclass of BtContextAwareCommand.
  5876. * src/SeedCheckCommand.h: Made subclass of BtContextAwareCommand.
  5877. * src/File.h (mkdirs): New function.
  5878. * src/DefaultPeerStorage): New file.
  5879. * src/DownloadEngineFactory.h
  5880. (newTorrentConsoleEngine): Use btContext.
  5881. * src/BtContextAwareCommand.cc: New file.
  5882. * src/PeerInitiateConnectionCommand.cc: Use btRuntime, peerStorage.
  5883. * src/PeerMessage.h
  5884. (btContext): New variable.
  5885. (peerStorage): New variable.
  5886. (pieceStorage): New variable.
  5887. (setBtContext): New function.
  5888. * src/Directry.cc
  5889. (Directory): New function.
  5890. (createDir): Do nothing if name.size() == 0.
  5891. * src/AnnounceList.h
  5892. (AnnounceTier): Removed.
  5893. (AnnounceTiers): Removed.
  5894. * src/DefaultPieceStorage.h: New file.
  5895. * src/Piece.cc (toString): New function.
  5896. To fix typo:
  5897. * src/main.cc (showVersion): Fixed typo.
  5898. To fix compile warning:
  5899. * src/DelegatingPeerListProcessor.cc
  5900. (canHandle): Added "return false".
  5901. 2006-10-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5902. To simplify TrackerWatherCommand, TrackerUpdateCommand and
  5903. make the process of announce request testable.
  5904. * src/TrackerWatcherCommand.h
  5905. (TimeA2.h): Removed.
  5906. (interval): Removed.
  5907. (checkPoint): Removed.
  5908. (createRequestCommand): Added an argument 'url'.
  5909. (TrackerWatherCommand): Removed interval.
  5910. (createCommand): New function.
  5911. * src/DownloadEngineFactory.cc
  5912. (newTorrentConsoleEngine): Updated according to the changes in
  5913. TrackerWatherCommand.
  5914. * src/TorrentMan.cc
  5915. (DelegatingPeerListProcessor.h): New includes.
  5916. (TorrentMan): Added the initialization of announceInterval.
  5917. (isStoppedAnnounceReady): New function.
  5918. (isCompletedAnnounceReady): New function.
  5919. (isDefaultAnnounceReady): New function.
  5920. (isAnnounceReady): New function.
  5921. (getAnnounceUrl): New function.
  5922. (announceStart): New function.
  5923. (announceFailure): New function.
  5924. (announceSuccess): New function.
  5925. (isAllAnnounceFailed): New function.
  5926. (resetAnnounce): New function.
  5927. (processAnnounceResponse): New function.
  5928. (needMorePeerConnection): New function.
  5929. (noMoreAnnounce): New function.
  5930. * src/TrackerUpdateCommand.h
  5931. (getTrackerResponse): int->size_t
  5932. * src/TorrentMan.h
  5933. (isStoppedAnnounceReady): New function.
  5934. (isCompletedAnnounceReady): New function.
  5935. (isDefaultAnnounceReady): New function.
  5936. (announceInterval): New variable.
  5937. (isAnnounceReady): New function.
  5938. (getAnnounceUrl): New function.
  5939. (announceStart): New function.
  5940. (announceFailure): New function.
  5941. (announceSuccess): New function.
  5942. (isAllAnnounceFailed): New function.
  5943. (resetAnnounce): New function.
  5944. (processAnnounceResponse): New function.
  5945. (needMorePeerConnection): New function.
  5946. (noMoreAnnounce): New function.
  5947. * src/TrackerWatcherCommand.cc
  5948. (TrackerWatherCommand): Removed interval and checkPoint.
  5949. (execute): Rewritten.
  5950. (createCommand): New function.
  5951. (createRequestCommand): Rewritten.
  5952. * src/TrackerUpdateCommand.cc
  5953. (MetaFileUtil.h): Removed.
  5954. (DelegatingPeerListProcessor.h): Removed.
  5955. (getTrackerResponse): int->size_t. Use torrentMan's new functions.
  5956. 2006-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5957. Request -> RequestHandle:
  5958. * src/HttpResponseCommand.h: Request->RequestHandle
  5959. * src/AbstractCommand.cc: Request->RequestHandle
  5960. * src/HttpDownloadCommand.cc: Request->RequestHandle
  5961. * src/HttpRequestCommand.cc: Request->RequestHandle
  5962. * src/FtpInitiateConnectionCommand.h: Request->RequestHandle
  5963. * src/AbstractCommand.h: Request->RequestHandle
  5964. * src/HttpProxyRequestCommand.h: Request->RequestHandle
  5965. * src/HttpResponseCommand.cc: Request->RequestHandle
  5966. * src/HttpInitiateConnectionCommand.h: Request->RequestHandle
  5967. * src/FtpNegotiateCommand.cc: Request->RequestHandle
  5968. * src/FtpTunnelResponseCommand.h: Request->RequestHandle
  5969. * src/HttpConnection.h: Request->RequestHandle
  5970. * src/HttpProxyResponseCommand.cc: Request->RequestHandle
  5971. * src/InitiateConnectionCommandFactory.h: Request->RequestHandle
  5972. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  5973. * src/DownloadCommand.h: Request->RequestHandle
  5974. * src/FtpDowndloadCommand.cc: Request->RequestHandle
  5975. * src/HttpInitiateConnectionCommand.cc: Request->RequestHandle
  5976. * src/HttpRequestCommand.h: Request->RequestHandle
  5977. * src/FtpNegotiateCommand.h: Request->RequestHandle
  5978. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  5979. * src/FtpInitiateConnectionCommand.cc: Request->RequestHandle
  5980. * src/HttpDownloadCommand.h: Request->RequestHandle
  5981. * src/FtpConnection.cc: Request->RequestHandle
  5982. * src/InitiateConnectionCommandFactory.cc: Request->RequestHandle
  5983. * src/UrlRequestInfo.cc: Request->RequestHandle
  5984. * src/HttpProxyResponseCommand.h: Request->RequestHandle
  5985. * src/HttpConnection.h: Request->RequestHandle
  5986. * src/DownloadCommand.cc: Request->RequestHandle
  5987. * src/FtpConnection.h: Request->RequestHandle
  5988. * src/FtpDowndloadCommand.h: Request->RequestHandle
  5989. * src/HttpProxyRequestCommand.cc: Request->RequestHandle
  5990. * src/FtpTunnelRequestCommand.h: Request->RequestHandle
  5991. * src/Request.h
  5992. (SharedHandle.h): New include.
  5993. (RequestHandle): New type definition.
  5994. (Requests): Redefined.
  5995. To add MULTITRACKER support:
  5996. * src/TrackerWatcherCommand.h
  5997. (createRequestCommand): New function.
  5998. * src/DownloadEngineFactory.cc
  5999. (newTorrentConsoleEngine): Removed req.
  6000. * src/prefs.h
  6001. (PREF_TRACKER_MAX_TRIES): New definition.
  6002. * src/TorrentMan.cc
  6003. (TorrentMan): Removed req. Added trackerNumTry.
  6004. (~TorrentMan): Removed req.
  6005. (setupInternal1): Added announceList.
  6006. * src/TorrentRequestInfo.cc
  6007. (execute): Set PREF_MAX_TIRES to 1. The max number of tries for
  6008. announces is now specified by PREF_TRACKER_MAX_TRIES.
  6009. * src/main.cc
  6010. (main): Added PREF_TRACKER_MAX_TRIES.
  6011. * src/TorrentMan.h
  6012. (Request.h): Removed.
  6013. (AnnounceList.h): New include.
  6014. (trackerNumTry): New variable.
  6015. (req): Removed.
  6016. (announceList): New variable.
  6017. * src/TrackerWatcherCommand.cc
  6018. (execute): Rewritten.
  6019. (createRequestCommand): New function.
  6020. * src/TrackerUpdateCommand.cc
  6021. (execute): Updated with the use of AnnounceList.
  6022. * src/AnnounceList.cc: New class.
  6023. * src/AnnounceList.h: New class.
  6024. To fix typo:
  6025. * src/prefs.h
  6026. (PREF_MAX_TRIES): max_try->max_tries
  6027. To not to decode "+" as space in URL decode:
  6028. * src/Util.cc
  6029. (urldecode): Removed "+"->space decoding rule. Test case was updated.
  6030. 2006-10-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6031. To add timeout to async name resolution:
  6032. * src/AbstractCommand.h
  6033. (nameResolveFinished): New function. This is not elegant way. It needs
  6034. to be more refined.
  6035. (nameResolverCheck): New variable.
  6036. * src/AbstractCommand.cc
  6037. (AbstractCommand): Added nameResolverCheck.
  6038. (execute): Added the check whether the name resolution has finished.
  6039. (setNameResolverCheck): Set nameResolverCheck to true.
  6040. (disableNameResolverCheck): Set nameResolverCheck to false.
  6041. (nameResolverFinished): New function.
  6042. * src/FtpInitiateConnectionCommand.h
  6043. (nameResolverFinished): New function.
  6044. * src/FtpInitiateConnectionCommand.cc
  6045. (FtpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  6046. * src/HttpInitiateConnectionCommand.h
  6047. (nameResolverFinished): New function.
  6048. * src/HttpInitiateConnectionCommand.cc
  6049. (HttpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  6050. * src/prefs.h
  6051. (PREF_DNS_TIMEOUT): New definition.
  6052. * src/main.cc
  6053. (main): Added PREF_DNS_TIMEOUT.
  6054. To add the support for a non-compact response from a tracker:
  6055. * src/PeerListProcessor.h: New class.
  6056. * src/DefaultPeerListProcessor.h: New class.
  6057. * src/DefaultPeerListProcessor.cc: New class.
  6058. * src/CompactPeerListProcessor.h: New class.
  6059. * src/CompactPeerListProcessor.cc: New class.
  6060. * src/DelegatingPeerListProcessor.h: New class.
  6061. * src/DelegatingPeerListProcessor.cc: New class.
  6062. * src/TorrentMan.cc
  6063. (addPeer): New function(overload).
  6064. (addPeer): Delete unused peers only when new peer is added.
  6065. * src/TorrentMan.h
  6066. (PeerListProcessor.h): Included.
  6067. (Peers): Removed.
  6068. (addPeer): New function(overload).
  6069. * src/TrackerUpdateCommand.cc
  6070. (netinet/in.h): Removed.
  6071. (DelegatingPeerListProcessor.h): Included.
  6072. (execute): Updated to use DelegatingPeerListProcessor.
  6073. To fix the memory leak in TorrentMan::peers:
  6074. * src/PeerAbstractCommand.cc
  6075. (onAbort): Added peer->resetStatus().
  6076. * src/Peer.h
  6077. (resetStatus): Made public.
  6078. To improve the precision of the speed calculation:
  6079. * src/SpeedCalc.h
  6080. (nextInterval): New variable.
  6081. * src/SpeedCalc.cc
  6082. (reset): Added nextInterval.
  6083. (isIntervalOver): Use nextInterval instead of CHANGE_INTERVAL_SEC.
  6084. (changeSw): Set nextInterval to 15 seconds relative to the current
  6085. instant time.
  6086. * src/main.cc
  6087. (showVersion): Updated.
  6088. (showUsage): Updated.
  6089. * Release 0.8.1
  6090. 2006-09-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6091. * src/main.cc
  6092. (showUsage): Commented out --min-segment-size option.
  6093. (main): Commented out --min-segment-size option.
  6094. * Release 0.8.0
  6095. 2006-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6096. * src/*.{h,cc}:
  6097. Added an exception to the license which allows linking with OpenSSL.
  6098. 2006-09-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6099. * src/AbstractCommand.cc
  6100. (execute): Check whether the download has finished before checking
  6101. socket status.
  6102. Return true if peerStat->getStatus() == REQUEST_IDLE.
  6103. Do not exit even if no segment is available.
  6104. * src/prefs.h
  6105. (PREF_STARTUP_IDLE_TIME): New definition.
  6106. * src/PeerInteractionCommand.cc
  6107. (executeInternal): Removed max speed limit. Because it performs bad.
  6108. (receiveMessages): Added max speed limit. This was better than above,
  6109. but still a little bit to be desired. Sometimes the download speed
  6110. became much faster than I specified.
  6111. * src/SpeedCalc.h
  6112. (start): New variable.
  6113. (accumulatedLength): New variable.
  6114. (getAvgSpeed): New function.
  6115. * src/SpeedCalc.cc
  6116. (reset): Added start, accumulatedLength.
  6117. (update): Added calculation of an average speed.
  6118. (getAvgSpeed): New function.
  6119. * src/DownloadCommand.h
  6120. (sw): Removed.
  6121. * src/main.cc
  6122. (main): Added PREF_STARTUP_IDLE_TIME.
  6123. * src/PeerStat.h
  6124. (STATUS): Added REQUEST_IDLE.
  6125. (getMaxSpeed): Renamed as getMaxDownloadSpeed().
  6126. (getAvgDownloadSpeed): New function
  6127. (requestIdle): New function.
  6128. * src/SegmentMan.h
  6129. (SegmentEntryHandle): New type definition.
  6130. (SegmentEntries): Now holds SegmentEntryHandle.
  6131. (findSlowerSegmentEntry): New funtion.
  6132. * src/SegmentMan.cc
  6133. (save): Updated according to the changes in SegmentEntries.
  6134. (read): Updated according to the changes in SegmentEntries.
  6135. (FindSegmentEntryByIndex): Updated according to the changes in
  6136. SegmentEntries.
  6137. (FindSegmentEntryByCuid): Updated according to the changes in
  6138. SegmentEntries.
  6139. (checkoutSegment): Updated according to the changes in SegmentEntries.
  6140. (onNullBitfield): Updated according to the changes in SegmentEntries.
  6141. Renamed uitr as itr.
  6142. (findSlowerSegmentEntry): New function.
  6143. (getSegment): Updated according to the changes in SegmentEntries.
  6144. Added the feature that cancels the segment with slow server and fast
  6145. one takes it over.
  6146. (cancelSegment): Updated according to the changes in SegmentEntries.
  6147. (getDownloadLength): Updated according to the changes in
  6148. SegmentEntries.
  6149. (init): Assigned 0 to bitfield after deleting it.
  6150. * src/DownloadCommand.cc
  6151. (STARTUP_IDLE_TIME): Removed.
  6152. (executeInternal): Use PREF_STARTUP_IDLE_TIME.
  6153. * src/PeerChokeCommand.cc
  6154. (optUnchokingPeer): Updated according to the changes in Peer.
  6155. (ResetDelta): Removed.
  6156. (UploadFaster): Updated according to the changes in Peer.
  6157. (DownloadFaster): Updated according to the changes in Peer.
  6158. (execute): I clarify the meaning of "upload" and "download" here.
  6159. "upload" means the transfer from localhost to remote host.
  6160. "download" means the transfer from remote host to localhost.
  6161. Based on this rule, I swapped orderByUploadRate and
  6162. orderByDownloadRate.
  6163. * src/PeerInteractionCommand.cc
  6164. (PeerInteraction): Removed peerInteraction->setUploadLImit().
  6165. (executeInternal): Removed the argument of
  6166. peerInteraction->sendMessages().
  6167. (receiveMessages): Rewritten download speed limit.
  6168. (sendKeepAlive): Removed peerInteraction->sendMessages().
  6169. * src/HttpResponseCommand.cc
  6170. (handleDefaultEncoding): If file size is unknown in torrent request,
  6171. do not call segmentMan->initBitfield() here.
  6172. Disabled persistent connection feature in torrent request.
  6173. * src/UrlRequestInfo.h
  6174. (UrlRequestInfo): Removed const qualifier from option.
  6175. * src/TorrentMan.h
  6176. (TransferStat): New class.
  6177. (deltaDownloadLength): Removed.
  6178. (deltaUploadLength): Removed.
  6179. (addDeltaDownloadLength): Removed.
  6180. (getDeltaDownloadLength): Removed.
  6181. (resetDeltaDownloadLength): Removed.
  6182. (addDeltaUploadLength): Removed.
  6183. (getDeltaUploadLength): Removed.
  6184. (resetDeltaUploadLength): Removed.
  6185. (addActivePeer): Added peer->activate().
  6186. (deleteActivePeer): Added peer->deactivate().
  6187. (calculateStat): New function.
  6188. * src/TorrentMan.cc
  6189. (TorrentMan): Removed deltaDownloadLength and deltaUploadLength.
  6190. (calculateStat): New function.
  6191. * src/PeerInteraction.h
  6192. (uploadLimit): Removed.
  6193. (option): New variable.
  6194. (setUploadLimit): Removed.
  6195. (getUploadSpeed): Removed.
  6196. (sendMessages): Removed the argument "currentUploadSpeed".
  6197. * src/PeerInteraction.cc
  6198. (prefs.h): Included.
  6199. (PeerInteraction): Removed uploadLimit. Added option.
  6200. (sendMessages): Rewritten upload speed limit.
  6201. (sendHandshake): Removed the argument from sendMessages().
  6202. (sendBitfield): Removed the argument from sendMessages().
  6203. * src/PeerAbstractCommand.cc
  6204. (execute): Commented out the portion of upload limit.
  6205. (onAbort): Removed peer->resetStatus().
  6206. * src/TorrentRequestInfo.cc
  6207. (timeoutSpecified): Declared extern.
  6208. (execute): Set timeout to 180 if timeout is not specified by.
  6209. command-line.
  6210. * src/PieceMessage.cc
  6211. (receivedAction): Added peer->updateDownloadLength().
  6212. Removed peer->addPeerUpload().
  6213. Removed torrentMan->addDeltaDownloadLength().
  6214. (send): Added peer->updateUploadLength().
  6215. Removed peer->addPeerDownload().
  6216. Removed torrentMan->addDeltaUploadLength().
  6217. * src/main.cc
  6218. (timeoutSpecified): New variable.
  6219. (main): Set timeoutSpecified to false.
  6220. If the command-line option "--upload-limit" is specified, then
  6221. timeoutSpecified is set to true. This option will remain in the next
  6222. release, but be deprecated in the future release.
  6223. * src/TorrentRequestInfo.h
  6224. (TorrentRequestInfo): Removed const qualifier from op.
  6225. * src/PeerStat.h
  6226. (uploadSpeed): New variable.
  6227. (PeerStat): Added default value to cuid.
  6228. (calculateUploadSpeed): New function.
  6229. (updateUploadLength): New function.
  6230. (getMaxUploadSpeed): New function.
  6231. (getAvgUploadSpeed): New function.
  6232. (reset): Added uploadSpeed. Set status to IDLE.
  6233. * src/TorrentDownloadEngine.h
  6234. (cp): Declared as Time.
  6235. (sessionDownloadLengthArray): Removed.
  6236. (sessionUploadLengthArray): Removed.
  6237. (currentCp): Removed.
  6238. (lastCalcStat): New variable
  6239. (lastElapsed): Removed.
  6240. (sessionDownloadLength): Removed.
  6241. (calculateStat): New function.
  6242. * src/TorrentDownloadEngine.cc
  6243. (initStatistics): Removed lastElapsed, cp[],
  6244. sessionDownloadLengthArray[], sessionUploadLengthArray[],
  6245. currentCp, sessionDownloadLength.
  6246. Added cp.reset() and lastCalcStat.reset().
  6247. (calculateSpeed): Changed the name of the argument.
  6248. (calculateStatistics): Rewritten.
  6249. (calculateStat): New function.
  6250. * src/Peer.h
  6251. (PeerStat.h): Included.
  6252. (peerUpload): Removed.
  6253. (peerDownload): Removed.
  6254. (peerStat): New variable.
  6255. (sessionUploadLength): New variable.
  6256. (sessionDownloadLength): New variable.
  6257. (deltaUpload): Removed.
  6258. (deltaDownload): Removed.
  6259. (resetStatus): Made private.
  6260. (Peer): Added sessionUploadLength, sessionDownloadLength.
  6261. Removed peerUpload, peerDownload.
  6262. (updateUploadLength): New function.
  6263. (addDeltaUpload): Removed.
  6264. (updateDownloadLength): New function.
  6265. (resetDeltaUpload): Removed.
  6266. (getDeltaUpload): Removed.
  6267. (addDeltaDownload): Removed.
  6268. (calculateUploadSpeed): New function.
  6269. (resetDeltaDownload): Removed.
  6270. (getDeltaDownload): Removed.
  6271. (calculateDownloadSpeed): New function.
  6272. (getSessionUploadLength): New function.
  6273. (getSessionDownloadLength): New function.
  6274. (activate): New function.
  6275. (deactivate): New function.
  6276. (addPeerUpload): Removed.
  6277. (setPeerUpload): Removed.
  6278. (getPeerUpload): Removed.
  6279. (addPeerDownload): Removed.
  6280. (setPeerDownload): Removed.
  6281. (getPeerDownload): Removed.
  6282. * src/Peer.cc
  6283. (resetStatus): Removed resetDeltaUpload() and resetDeltaDownload().
  6284. * src/MetalinkRequestInfo.h
  6285. (MetalinkRequestInfo): Removed const qualifier from op.
  6286. * src/RequestInfo.h
  6287. (op): Removed const qualifier.
  6288. (RequestInfo): Removed const qualifier from op.
  6289. * src/prefs.h
  6290. (PREF_MAX_SPEED_LIMIT): Renamed as PREF_MAX_DOWNLOAD_LIMIT.
  6291. (PREF_UPLOAD_LIMIT): Renamed as PREF_MAX_UPLOAD_LIMIT.
  6292. * src/PeerInteractionCommand.cc
  6293. (PeerInteractionCommand): Use PREF_MAX_UPLOAD_LIMIT.
  6294. (receiveMessages): Use PREF_MAX_DOWNLOAD_LIMIT.
  6295. * src/PeerInteraction.cc
  6296. (sendMessages): Use PREF_MAX_UPLOAD_LIMIT.
  6297. * src/main.cc
  6298. (showUsage): Updated the description of "--lowest-speed-limit" option.
  6299. Added the description of "--max-download-limit" option.
  6300. Removed the description of "--upload-limit" option.
  6301. Added the description of "--max-upload-limit" option.
  6302. (main): Use PREF_MAX_UPLOAD_LIMIT, PREF_MAX_DOWNLOAD_LIMIT.
  6303. Added "--max-download-limit" option and "--max-upload-limit" option.
  6304. Added the warning message if "--upload-limit" option is used.
  6305. * src/DownloadCommand.cc
  6306. (executeInternal): Use PREF_MAX_DOWNLOAD_LIMIT.
  6307. 2006-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6308. To rewrite segment download mechanism for HTTP/FTP download.
  6309. Use BitfieldMan to manage segment download.
  6310. * src/HttpResponseCommand.h
  6311. (executeInternal): Pass the reference of segment.
  6312. * src/AbstractCommand.cc
  6313. (prepareForRetry): Call segmentMan->cancelSegment here.
  6314. (onAbort): Call segmentMan->cancelSegment here.
  6315. * src/HttpDownloadCommand.cc
  6316. (prepareForNextSegment): New function.
  6317. * src/DownloadEngineFactory.cc
  6318. (newConsoleEngine): Removed splitter.
  6319. (newTorrentConsoleEngine): Removed splitter.
  6320. * src/Request.h
  6321. (segment): Renamed from seg.
  6322. * src/FtpInitiateConnectionCommand.h
  6323. (executeInternal): Pass the reference of segment.
  6324. * src/AbstractCommand.h
  6325. (executeInternal): Pass the reference of segment.
  6326. * src/pref.h
  6327. (PREF_SEGMENT_SIZE): New definition.
  6328. * src/HttpProxyRequestCommand.h
  6329. (executeInternal): Pass the reference of segment.
  6330. * src/HttpResponseCommand.cc
  6331. (checkResponse): Allowed status 206 when a request range starts 0.
  6332. (handleDefaultEncoding): Rewritten the code related to Segment.
  6333. (handleOtherEncoding): Rewritten the code related to Segment.
  6334. * src/SegmentMan.h
  6335. (SegmentEntry): New class.
  6336. (SegmentEntries): New type definition.
  6337. (bitfield): New variable.
  6338. (usedSegmentEntries): New variable.
  6339. (onNullBitfield): New function.
  6340. (checkoutSegment): New function.
  6341. (segments): Removed.
  6342. (splitter): Removed.
  6343. (unregisterId): Removed.
  6344. (getSegment): New function(overload)
  6345. (getDownloadedSize): Removed.
  6346. (cancelSegment): New function.
  6347. (completeSegment): New function.
  6348. (initBitfield): New function.
  6349. (hasSegment): New function.
  6350. (getDownloadLength): New function.
  6351. * src/BitfieldMan.h
  6352. (getStartIndex): New function.
  6353. (getEndIndex): New function.
  6354. (getMissingUnusedIndex): New function(overload).
  6355. (getSparseMissingUnusedIndex): New function.
  6356. * src/BitfieldMan.cc
  6357. (getMissingIndexRandomly): Handle the last byte of bitfield properly.
  6358. (getMissingUnusedIndex): New function(overload).
  6359. (Range): New class.
  6360. (getStartIndex): New function.
  6361. (getEndIndex): New function.
  6362. (getSparseMissingUnusedIndex): New function.
  6363. (isBitSetInternal): Return false if the given index is less than 0.
  6364. * src/HttpInitiateConnectionCommand.h
  6365. (executeInternal): Pass the reference of segment.
  6366. * src/FtpNegotiateCommand.h
  6367. (executeInternal): Pass the reference of segment.
  6368. * src/FtpNegotiateCommand.cc
  6369. (recvSize): Initialize bitfield here.
  6370. * src/FtpTunnelResponseCommand.h
  6371. (executeInternal): Pass the reference of segment.
  6372. * src/HttpConnection.cc
  6373. (createRequest): Rewritten range header processing.
  6374. * src/DownloadCommand.h
  6375. (executeInternal): Pass the reference of segment.
  6376. (prepareForRetry): Removed.
  6377. (prepareForNextSegment): Added an argument segment. Made it a virtual
  6378. function.
  6379. * src/main.cc
  6380. (main): Set the initial value of PREF_SEGMENT_SIZE to 1MB.
  6381. * src/SegmentMan.cc
  6382. (SegmentMan): Added bitfield. Removed splitter.
  6383. (~SegmentMan): Added bitfield. Removed splitter.
  6384. (unregisterId): Removed.
  6385. (getSegment): Rewritten.
  6386. (updateSegment): Rewritten.
  6387. (save): Rewritten.
  6388. (read): Rewritten.
  6389. (finished): Rewritten.
  6390. (getDownloadedSize): Removed.
  6391. (initBitfield): New function.
  6392. (FindSegmentEntryByIndex): New function object.
  6393. (FindSegmentEntryByCuid): New function object.
  6394. (checkoutSegment): New function.
  6395. (onNullBitfield): New function.
  6396. (getSegment): New function(overload).
  6397. (CancelSegment): New function object.
  6398. (cancelSegment): New function.
  6399. (completeSegment): New function.
  6400. (hasSegment): New function.
  6401. (getDownloadLength): New function.
  6402. * src/FtpInitiateConnectionCommand.cc
  6403. (executeInternal): Load .aria2 file after hostname resolution finishes.
  6404. * src/Segment.h: Rewritten.
  6405. * src/Segment.cc (operator<<): New function.
  6406. * src/HttpDownloadCommand.h
  6407. (prepareForNextSegment): New function.
  6408. * src/Request.cc
  6409. (resetUrl): Made segment null.
  6410. * src/DownloadEngine.cc
  6411. (~DownloadEngine): Call cleanQueue before deleting segmentMan.
  6412. * src/HttpProxyRequestCommand.h
  6413. (executeInternal): Pass the reference of segment.
  6414. * src/DownloadCommand.cc
  6415. (executeInternal): Rewritten the code related to Segment.
  6416. (prepareForRetry): Removed.
  6417. (prepareForNextSegment): Rewritten.
  6418. * src/FtpTunnelResponseCommand.h
  6419. (executeInternal): Pass the reference of segment.
  6420. To add HTTP 1.1 persistent connection support(experimental)
  6421. * src/HttpRequestCommand.cc
  6422. (executeInternal): Disable keep alive if it is disabled by
  6423. configuration.
  6424. * src/Request.h
  6425. (keepAlive): New variable.
  6426. (isKeepAlive): New function.
  6427. (setKeepAlive): New function.
  6428. * src/pref.h
  6429. (PREF_HTTP_KEEP_ALIVE): New definition.
  6430. * src/HttpResponseCommand.cc
  6431. (executeInternal): Check the remote server supports keep alive.
  6432. * src/HttpConnection.cc
  6433. (createRequest): Send "Connection: close" only if keep alive is
  6434. disabled.
  6435. * src/main.cc
  6436. (main):
  6437. Set the initial value(false) of PREF_KEEP_ALIVE to false.
  6438. To add max download speed limit:
  6439. * src/pref.h
  6440. (PREF_MAX_SPEED_LIMIT): New definition.
  6441. * src/PeerInteractionCommand.cc
  6442. (executeInternal): Added max download speed limit. Not tested yet.
  6443. * src/SegmentMan.h
  6444. (PeerStats): New type definition.
  6445. (peerStats): New variable.
  6446. (registerPeerStat): New function.
  6447. (FindPeerStat): New function object.
  6448. (getPeerStat): New function.
  6449. (calculateDownloadSpeed): New function.
  6450. * src/SpeedCalc.h: New class.
  6451. * src/SpeedCalc.cc: New class.
  6452. * src/main.cc
  6453. (main):
  6454. Set the initial value of PREF_MAX_SPEED_LIMIT to 0(which means the
  6455. download speed is not restricted).
  6456. * src/PeerStat.h: New class.
  6457. * src/SegmentMan.cc
  6458. (registerPeerStat): New function.
  6459. (calculateDownloadSpeed): New function.
  6460. * src/DownloadCommand.cc
  6461. (STARTUP_IDLE_TIME): New definition.
  6462. (DownloadCommand): Register peerStat to segmentMan. Call peerStat->
  6463. downloadStart.
  6464. (~DownloadCommand): Call peerStat->downloadStop.
  6465. (executeInternal): Added download speed limitter. Rewritten lowest
  6466. speed limitter.
  6467. * src/HttpConnection.cc
  6468. (receiveResponse): Fixed: eohIndex[headerBuf] -> headerBuf[eohIndex].
  6469. * src/AbstractCommand.cc
  6470. (resolveHostname): Throw DlAbortEx if a name resolution failes.
  6471. Added hostname to the error message.
  6472. * src/ConsoleDownloadEngine.cc
  6473. (calculateStatistics): Initialize psize with dlSize.
  6474. * src/PieceMessage.cc
  6475. (receivedAction): Do not call peerInteraction->abortPiece here.
  6476. (onGotWrongPiece): Call peerInteraction->abortPiece here.
  6477. * src/BitfieldMan.h
  6478. (clearAllUseBit): New function.
  6479. (setAllUseBit): New function.
  6480. * src/BitfieldMan.cc
  6481. (clearAllBit): Do not clear useBitfield here.
  6482. (clearAllUseBit): New function.
  6483. (setAllUseBit): New function.
  6484. * src/Piece.cc
  6485. (clearAllBlock): Call bitfield->clearAllUseBit().
  6486. 2006-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6487. To make filename URL-decoded:
  6488. * src/HttpResponseCommand.h: Updated doc.
  6489. * src/HttpResponseCommand.cc
  6490. (determinFilename): Made filename URL-decoded.
  6491. * src/FtpInitiateConnectionCommand.cc
  6492. (executeInternal): Made filename URL-decoded.
  6493. * src/Util.h (urldecode): New function.
  6494. * src/Util.cc (urldecode): New function.
  6495. To fix a bug that caused assertion failure in ares_strerror:
  6496. * src/NameResolver.cc (callback): Fixed the bug.
  6497. * Release 0.7.3
  6498. 2006-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6499. To add --seed-time and --seed-ratio command-line option:
  6500. * src/Option.h (getAsDouble): New function.
  6501. * src/Option.cc (getAsDouble): New function.
  6502. * src/SeedCheckCommand.h: New class.
  6503. * src/SeedCheckCommand.cc: New class.
  6504. * src/DownloadEngineFactory.cc
  6505. (SeedCheckCommand.h): Included.
  6506. (UnionSeedCriteria.h): Included.
  6507. (TimeSeedCriteria.h): Included.
  6508. (ShareRatioSeedCriteria.h): Included.
  6509. (newTorrentConsoleEngine): Added the processing of seed option.
  6510. * src/SeedCriteria.h: New class.
  6511. * src/ShareRatioSeedCriteria.h: New class.
  6512. * src/TimeSeedCriteria.h: New class.
  6513. * src/UnionSeedCriteria.h: New class.
  6514. * src/prefs.h
  6515. (PREF_SEED_TIME): New definition.
  6516. (PREF_SEED_RATIO): New definition.
  6517. * src/main.cc
  6518. (showUsage): Added --seed-time and --seed-ratio option.
  6519. (main): Added --seed-time and --seed-ratio option.
  6520. Made default log file name "/dev/null".
  6521. * src/SharedHandle.h
  6522. (SharedHandle): Copy constructor. Made it assignable from the
  6523. SharedHandle of the subclasses.
  6524. (operator=): Made it assignable from the SharedHandle of the
  6525. subclasses.
  6526. (getRefCount): New function.
  6527. To add notice log level and the switch to write log to stdout. This
  6528. switch is configurable per log level.
  6529. * src/Logger.h
  6530. (notice): New function.
  6531. (LEVEL): Added NOTICE. Assigned an explicit value to each log level
  6532. constant.
  6533. * src/LogFactory.cc
  6534. (getInstance): The use of NullLogger was removed. A log message with
  6535. notice log level was made written to stdout along with log file.
  6536. * src/NullLogger.h
  6537. (notice): New function.
  6538. * src/SimpleLogger.h
  6539. (writeHeader): Added the 'file' argument.
  6540. (writeLog): Added the 'file' argument.
  6541. (writeFile): New function.
  6542. (stdoutField): New variable.
  6543. (SimpleLogger): Removed the default constructor.
  6544. (SimpleLogger): Made the default value of logfile 0.
  6545. (debug): Added 'virtual' keyword.
  6546. (info): Added 'virtual' keyword.
  6547. (warn): Added 'virtual' keyword.
  6548. (error): Added 'virtual' keyword.
  6549. (notice): New function.
  6550. (setStdout): New function.
  6551. * src/SimpleLogger.cc
  6552. (WRITE_LOG): Replaced writeLog with writeFile.
  6553. (WRITE_LOG_EX): Replaced writeLog with writeFile.
  6554. (SimpleLogger): Removed the default constructor.
  6555. (setStdout): New function.
  6556. (writeLog): Added the handling of NOTICE log level.
  6557. (writeFile): New function.
  6558. (notice): New function.
  6559. * src/TorrentMan.h: Updated doc.
  6560. * src/BitfieldMan.h: Updated doc.
  6561. * src/TrackerWatcherCommand.cc
  6562. (execute): Return true if error occurred in the request to the tracker
  6563. and halt is requested.
  6564. * src/TrackerUpdateCommand.cc
  6565. (execute): Return true if error occurred in the request to the tracker
  6566. and halt is requested.
  6567. To call onDownloadComplete from TorrentMan::completePiece(), not from
  6568. DownloadEngine:
  6569. * src/TorrentConsoleDownloadEngine.h
  6570. (onSelectiveDownloadingCompletes): Removed.
  6571. * src/TorrentConsoleDownloadEngine.cc
  6572. (onSelectiveDownloadingCompletes): Removed.
  6573. * src/TorrentDownloadEngine.h
  6574. (onEndOfRun): Added 'virtual' keyword.
  6575. (afterEachIteration): Removed.
  6576. (onSelectiveDownloadingCompletes): Removed.
  6577. * src/TorrentDownloadEngine.cc
  6578. (onEndOfRun): Removed filenameFixed.
  6579. (afterEachIteration): Removed.
  6580. * src/TorrentMan.cc
  6581. (completePiece): Call onDownloadComplete here.
  6582. (onDownloadComplete): Added 2 log messages.
  6583. 2006-08-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6584. To fix compilation problem on gcc4.1.1(patch#1542283 by tizianomueller)
  6585. * src/NameResolver.h: Added the prototype declaration of callback().
  6586. To support c-ares library:
  6587. * src/AbstractCommand.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6588. * src/FeatureConfig.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6589. * src/FtpInitiateConnectionCommand.h:
  6590. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6591. * src/AbstractCommand.h: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6592. * src/HttpInitiateConnectionCommand.h:
  6593. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6594. * src/NameResolver.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS.
  6595. Added thes upport of c-ares's ares_strerror(the idea came from patch
  6596. #1542285 by tizianomueller)
  6597. * src/HttpInitiateConnectionCommand.cc:
  6598. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6599. * src/FtpInitiateConnectionCommand.cc:
  6600. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6601. * src/DownloadEngine.h:
  6602. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6603. * src/DownloadEngine.cc:
  6604. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6605. To fix the bug that causes compilation failure with metalink-support
  6606. disabled(bug#1543587):
  6607. * src/main.cc: Fixed with the patch by tizianomueller.
  6608. * Release 0.7.2
  6609. 2006-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6610. * src/main.cc
  6611. (main): Added a message to inform users that aria2 is starting to
  6612. verify checksum.
  6613. * src/RequestInfo.cc
  6614. (printDownloadAbortMessage): Added a message to inform users that
  6615. transfer can be resumed.
  6616. * src/FeatureConfig.cc
  6617. (FEATURE_ASYNC_DNS): New definition.
  6618. (FeatureConfig): Added aysnc DNS entry.
  6619. To replace CommandUuid with Command* in SocketEntry and
  6620. NameResolverEntry:
  6621. * src/DownloadEngine.h
  6622. (CommandUuids): Removed.
  6623. (SocketEntry::commandUuid): Removed.
  6624. (SocketEntry::command): New variable.
  6625. (SocketEntry::SocketEntry): Updated.
  6626. (SocketEntry::operator==): Updated.
  6627. (NameResolverEntry::commandUuid): Removed.
  6628. (NameResolverEntry::command): New variable.
  6629. (NameResolverEntry::NameResolverEntry): Updated.
  6630. (NameResolverEntry::operator==): Updated.
  6631. (waitData): Changed the argument type.
  6632. (addSocketForReadCheck): Changed the argument type.
  6633. (deleteSocketForReadCheck): Changed the argument type.
  6634. (addSocketForWriteCheck): Changed the argument type.
  6635. (deleteSocketForWriteCheck): Changed the argument type.
  6636. (addNameResolverCheck): Changed the argument type.
  6637. (deleteNameResolverCheck): Changed the argument type.
  6638. * src/DownloadEngine.cc
  6639. (FindCommand): Removed.
  6640. (run): Removed activeUuid. Added activeCommands instead.
  6641. (AccumulateActiveUuid): Renamed as AccumulateActiveCommand.
  6642. (AccumulateActiveCommand): New function object.
  6643. (waitData): Use AccumulateActiveCommand.
  6644. (addSocketForReadCheck): Use Command instead of CommandUuid.
  6645. (deleteSocketForReadCheck): Use Command instead of CommandUuid.
  6646. (addSocketForWriteCheck): Use Command instead of CommandUuid.
  6647. (deleteSocketForWriteCheck): Use Command instead of CommandUuid.
  6648. (addNameResolverCheck): Use Command instead of CommandUuid.
  6649. (deleteNameResolverCheck): Use Command instead of CommandUuid.
  6650. * src/AbstractCommand.cc
  6651. (disableReadCheckSocket): Updated according to the changes in
  6652. DownloadEngine.
  6653. (setReadCheckSocket): Updated according to the changes in
  6654. DownloadEngine.
  6655. (disableWriteCheckSocket): Updated according to the changes in
  6656. DownloadEngine.
  6657. (setWriteCheckSocket): Updated according to the changes in
  6658. DownloadEngine.
  6659. (setNameResolverCheck): Updated according to the changes in
  6660. DownloadEngine.
  6661. (disableNameResolverCheck): Updated according to the changes in
  6662. DownloadEngine.
  6663. * src/AbstractCommand.cc
  6664. (disableReadCheckSocket): Updated according to the changes in
  6665. DownloadEngine.
  6666. (setReadCheckSocket): Updated according to the changes in
  6667. DownloadEngine.
  6668. (disableWriteCheckSocket): Updated according to the changes in
  6669. DownloadEngine.
  6670. (setWriteCheckSocket): Updated according to the changes in
  6671. DownloadEngine.
  6672. * release 0.7.1
  6673. 2006-08-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6674. To handle the case where some BitTorrent tracker requires all letters
  6675. except for [A-Za-z0-9] is URL encoded.
  6676. * src/Util.h
  6677. (torrentUrlencode): New function.
  6678. * src/Util.cc
  6679. (ctype.h): Included.
  6680. (torrentUrlencode): New function.
  6681. * src/TrackerWatcherCommand.cc
  6682. (execute): Use Util::torrentUrlencode() instead of Util::urlencode().
  6683. 2006-08-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6684. To add asynchronous DNS support(libares):
  6685. * src/AbstractCommand.h
  6686. (setNameResolverCheck): New function.
  6687. (disableNameResolverCheck): New function
  6688. (resolveHostname): New function.
  6689. * src/AbstractCommand.cc
  6690. (setNameResolverCheck): New function.
  6691. (disableNameResolverCheck): New function
  6692. (resolveHostname): New function.
  6693. * src/FtpInitiateConnectionCommand.h
  6694. (nameResolver): New function.
  6695. * src/FtpInitiateConnectionCommand.cc
  6696. (Util.h): Included.
  6697. (FtpInitiateConnectionCommand): Call disableReadCheckSocket,
  6698. disableWriteCheckSocket.
  6699. (~FtpInitiateConnectionCommand): Call disableNameResolverCheck.
  6700. (executeInternal): Added async DNS support.
  6701. * src/HttpInitiateConnectionCommand.h
  6702. (nameResolver): New function.
  6703. * src/HttpInitiateConnectionCommand.cc
  6704. (DlRetryEx.h): Included.
  6705. (HttpInitiateConnectionCommand): Call disableReadCheckSocket,
  6706. disableWriteCheckSocket.
  6707. (~HttpInitiateConnectionCommand): Call disableNameResolverCheck.
  6708. (executeInternal): Added async DNS support.
  6709. * src/NameResolver.h: New class. Note: #include <ares.h> is surrounded
  6710. by extern "C" declaration.
  6711. * src/NameResolver.cc: New class.
  6712. * src/Util.h:
  6713. (isNumberAndDotsNotation): New function
  6714. * src/Util.cc
  6715. (isNumberAndDotsNotation): New function.
  6716. * src/DownloadEngine.h
  6717. (NameResolver.h): Included.
  6718. (NameResolverEntry): New class.
  6719. (NameResolverEntries): New type definition.
  6720. (addNameResolverCheck): New function.
  6721. (deleteNameResolverCheck): New function.
  6722. * src/DownloadEngine.cc
  6723. (run): Initialize cp with 0.
  6724. (SetDescriptor::operator()): Added for NameResolverEntry.
  6725. (AccumulateActiveUuid::operator()): Added for NameResolverEntry.
  6726. (waitData): Check nameResolver entries.
  6727. (updateFdSet): Update fds in nameResolver entries.
  6728. (addNameResolverCheck): New function.
  6729. (deleteNameResolverCheck): new function.
  6730. * src/PeerInteractionCommand.cc
  6731. (executeInternal): Fixed wrong socket handling.
  6732. * src/main.cc
  6733. (main): Fixed the initial value of PREF_LOWEST_SPEED_LIMIT option to 0.
  6734. * src/Util.cc
  6735. (fileChecksum): Removed the call to ctx.digestReset().
  6736. 2006-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6737. * po/ru.po: Azamat sent me Russian translation.
  6738. * src/FtpNegotiateCommand.cc
  6739. (recvGreeting): Call disableWriteCheckSocket just after
  6740. socket->setBlockingMode(). This avoids unnecessary CPU-hog loop.
  6741. (recvRetr): Recognized status code 125 as a acceptable response code.
  6742. Rename Time.h to TimeA2.h to avoid compilation ploblem on
  6743. case-insesitive filesystem(BUG#1531057).
  6744. * src/Time.h: Renamed as TimeA2.h.
  6745. * src/Time.cc: Renamed as TimeA2.cc.
  6746. * src/TimeA2.h: New class.
  6747. * src/TimeA2.cc: New class.
  6748. * src/PeerChokeCommand.h: Replaced Time.h with TimeA2.h.
  6749. * src/TrackerWatcherCommand.h: Replaced Time.h with TimeA2.h.
  6750. * src/PeerAbstractCommand.h: Replaced Time.h with TimeA2.h.
  6751. * src/AbstractCommand.h: Replaced Time.h with TimeA2.h.
  6752. * src/PeerInteractionCommand.h: Replaced Time.h with TimeA2.h.
  6753. * src/ConsoleDownloadEngine.h: Replaced Time.h with TimeA2.h.
  6754. * src/TorrentAutoSaveCommand.h: Replaced Time.h with TimeA2.h.
  6755. * src/DownloadCommand.h: Replaced Time.h with TimeA2.h.
  6756. * src/TorrentMan.h: Replaced Time.h with TimeA2.h.
  6757. * src/TorrentDownloadEngine.h: Replaced Time.h with TimeA2.h.
  6758. * src/RequestSlot.h: Replaced Time.h with TimeA2.h.
  6759. * src/SleepCommand.h: Replaced Time.h with TimeA2.h.
  6760. * src/DownloadEngine.cc: Replaced Time.h with TimeA2.h.
  6761. * release 0.7.0
  6762. 2006-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6763. * src/PeerChokeCommand.h
  6764. (PeerChokeCommand): Rearranged the arguments.
  6765. * src/PeerChokeCommand.cc
  6766. (PeerChokeCommand): Rearranged the arguments.
  6767. * src/MetalinkEntry.h
  6768. (Checksum.h): Included.
  6769. (md5): Removed.
  6770. (sha1): Removed.
  6771. (checksum): New variable.
  6772. (operator=): Updated.
  6773. (check): Removed.
  6774. * src/prefs.h
  6775. (PREF_LOWEST_SPEED_LIMIT): New definition.
  6776. (PREF_FOLLOW_TORRENT): New definition.
  6777. (PREF_SELECT_FILE): New definition.
  6778. (PREF_FOLLOW_METALINK): New definition.
  6779. * src/MetalinkResource.h
  6780. (TYPE_HTTPS): Added to enum TYPE.
  6781. * src/TorrentMan.cc
  6782. (~TorrentMan): Rewritten.
  6783. * src/MultiDiskWriter.cc
  6784. (MultiDiskAdaptor): Updated according to the changes in
  6785. MessageDigestContext.
  6786. (~MultiDiskAdaptor): Updated according to the changes in
  6787. MessageDigestContext.
  6788. (hashUpdate): Updated according to the changes in MessageDigestContext.
  6789. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6790. * src/Util.h
  6791. (fileChecksum): Updated according to the changes in
  6792. MessageDigestContext.
  6793. * src/Util.cc
  6794. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6795. (fileChecksum): Updated according to the changes in
  6796. MessageDigestContext.
  6797. * src/messageDigest.h: Rewritten.
  6798. * src/MetalinkEntry.cc
  6799. (check): Removed.
  6800. (Supported): Updated.
  6801. (dropUnsupportedResource): Fixed a memory leak.
  6802. * src/ShaVisitor.cc
  6803. (ShaVisitor): Updated according to the changes in MessageDigestContext.
  6804. (~ShaVisitor): Updated according to the changes in
  6805. MessageDigestContext.
  6806. (visit): Updated according to the changes in MessageDigestContext.
  6807. * src/main.cc
  6808. (main): Rewritten the portion of download loop. --lowest-speed-limit
  6809. command-line option added.
  6810. * src/DownloadEngine.h
  6811. (SocketEntry): New class.
  6812. (SocketEntries): New definition.
  6813. (PairFind): Removed.
  6814. (SockCmdMap): Removed.
  6815. * src/DownloadEngine.cc
  6816. (DownloadEngine): Rewritten.
  6817. (~DownloadEngine): Rewritten.
  6818. (run): Renamed activeCommandUuids as activeUuids.
  6819. (SetDescriptor): Rewritten.
  6820. (AccumulateActiveCommandUuid): Removed.
  6821. (AccumulateActiveUuid): New function object.
  6822. (waitData): Rewritten.
  6823. (updateFdSet): Rewritten.
  6824. (addSocket): Rewritten.
  6825. (deleteSocket): Rewritten.
  6826. (addSocketForReadCheck): Rewritten.
  6827. (deleteSocketForReadCheck): Rewritten.
  6828. (addSocketForWriteCheck): Rewritten.
  6829. (deleteSocketForWriteCheck): Rewritten.
  6830. * src/Xml2MetalinkProcessor.cc
  6831. (getEntry): Rewritten the portion of MetalinkEntry creation.
  6832. * src/DownloadCommand.cc
  6833. (executeInternal): Added the check routine for lowest speed limit.
  6834. * src/AbstractDiskWriter.cc
  6835. (AbstractDiskWriter): Updated according to the changes in
  6836. MessageDigestContext.
  6837. (~AbstractDiskWriter): Updated according to the changes in
  6838. MessageDigestContext.
  6839. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6840. * src/RequestInfo.h: New class.
  6841. * src/UrlRequestInfo.h: New class.
  6842. * src/UrlRequestInfo.cc: New class.
  6843. * src/TorrentRequestInfo.h: New class.
  6844. * src/TorrentRequestInfo.cc: New class.
  6845. * src/MetalinkRequestInfo.h: New class.
  6846. * src/MetalinkRequestInfo.cc: New class.
  6847. * src/Checksum.h: New class.
  6848. * src/DownloadEngineFactory.h: New class.
  6849. * src/DownloadEngineFactory.cc: New class.
  6850. 2006-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6851. * src/Option.h
  6852. (getAsBool): New function.
  6853. * src/Option.cc
  6854. (prefs.h): Included.
  6855. (defined): 0-length value is now recognized as undefined.
  6856. (getAsInt): Rewritten.
  6857. (getAsLLInt): Rewritten.
  6858. (getAsBool): New function.
  6859. * src/FeatureConfig.h: Rewritten.
  6860. * src/FeatureConfig.cc: Rewritten.
  6861. * src/prefs.h
  6862. (PREF_STDOUT_LOG): New definition.
  6863. (PREF_LOG): New definition.
  6864. (PREF_DIR): New definition.
  6865. (PREF_OUT): New definition.
  6866. (PREF_SPLIT): New definition.
  6867. (PREF_DAEMON): New definition.
  6868. (PREF_REFERER): New definition.
  6869. (PREF_TORRENT_FILE): New definition.
  6870. (PREF_LISTEN_PORT): New definition.
  6871. (PREF_METALINK_FILE): New definition.
  6872. (PREF_METALINK_VERSION): New definition.
  6873. (PREF_METALINK_LANGUAGE): New definition.
  6874. (PREF_METALINK_OS): New definition.
  6875. (PREF_METALINK_SERVERS): New definition.
  6876. * src/main.cc
  6877. (main): Following command-line parameters are now put into Option
  6878. class: stdoutLog, logfile, dir, ufilename, split, daemonMode,
  6879. referer, torrentFile, metalinkFile, listenPort, metalinkVersion,
  6880. metalinkLanguage, metalinkOs, metalinkServers
  6881. To fix the bug that aria2 can not handle http response header properly.
  6882. * src/HttpHeader.cc
  6883. (put): Made name lowercased.
  6884. (defined): Made name lowercased.
  6885. (getFirst): Made name lowercased.
  6886. (get): Made name lowercased.
  6887. (getFirstAsInt): Rewritten.
  6888. (getFirstAsLLInt): Rewritten.
  6889. 2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6890. * src/TorrentMan.h:
  6891. (advertisePiece): Updated doc.
  6892. (getAdvertisedPieceIndexes): Updated doc.
  6893. (removeAdvertisedPiece); New function.
  6894. * src/TorrentMan.cc
  6895. (FindElapsedHave): New function object.
  6896. (removeAdvertisedPiece): New function.
  6897. * src/HaveEraseCommand.h: New class.
  6898. * src/HaveEraseCommand.cc: New class.
  6899. * src/FeatureConfig.h: New class.
  6900. * src/FeatureConfig.cc: New class.
  6901. * src/Request.h
  6902. (defaultPorts): Removed.
  6903. * src/Request.cc
  6904. (FeatureConfig.h): Included.
  6905. (Request): Removed the statements related to defaultPorts.
  6906. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead.
  6907. A default port number is now retrieved from FeatureConfig.
  6908. * src/main.cc
  6909. (HaveEraseCommand.h): Included.
  6910. (showVersion): Added the output of feature list.
  6911. (main): Added HaveEraseCommand to command queue in BitTorrent
  6912. downloading.
  6913. * src/PeerInteractionCommand.h
  6914. (chokeCheckPoint): Commented out.
  6915. (periodicExecPoint): New variable.
  6916. * src/PeerInteractionCommand.cc
  6917. (executeInternal): Following methods are now called in at least every
  6918. 0.5 seconds to reduce CPU usage:
  6919. detectMessageFlooding(), peerInteraction->checkRequestSlot(),
  6920. checkHave(), sendKeepAlive().
  6921. (checkLongTimePeerChoking): Commented out.
  6922. * src/BitfieldMan.h
  6923. (getNthBitIndex): Changed the method signature.
  6924. (getMissingIndexRandomly): Changed the method signature.
  6925. * src/BitfieldMan.cc
  6926. (getNthBitIndex): Rewritten
  6927. (getMissingIndexRandomly): Rewritten.
  6928. (hasMissingPiece): Rewritten.
  6929. (getMissingIndex): Refactored.
  6930. (getMissingUnusedIndex); Refactored.
  6931. (getMissingIndex): Refactored.
  6932. 2006-07-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6933. * src/PeerMessage.h
  6934. (Piece.h): Included.
  6935. (SharedHandle.h): Included.
  6936. (invalidate): New variable.
  6937. (uploading): New variable.
  6938. (isInvalidate): New function.
  6939. (isUploading): New function.
  6940. (onPush): New function.
  6941. (onChoked): New function.
  6942. (onCanceled): New function.
  6943. (onAbortPiece): New function.
  6944. (PeerMessageHandle): New type definition.
  6945. * src/PeerMessage.cc
  6946. (PeerMessage): Added the initialization for invalidate and uploading.
  6947. * src/CancelMessage.h
  6948. (CancelMessage): Rewritten.
  6949. * src/RejectMessage.h
  6950. (RejectMessage): Rewritten.
  6951. * src/Metalinker.h
  6952. (operator=): Defined.
  6953. * src/MetaEntry.h
  6954. (operator=): Defined.
  6955. * src/MetalinkResource.h
  6956. (operator=): Defined.
  6957. * src/AllowedFastMessage.h
  6958. (AllowedFastMessage): Rewritten.
  6959. * src/HandshakeMessage.h
  6960. (HandshakeMessage): New function(overload).
  6961. * src/HandshakeMessage.cc
  6962. (HandshakeMessage): Rewritten.
  6963. (init): New function.
  6964. * src/HaveMessage.h
  6965. (HaveMessage): Rewritten.
  6966. * src/Time.h
  6967. (operator=): Defined the function body here.
  6968. * src/Time.cc
  6969. (operator=): Removed.
  6970. * src/SocketCore.h
  6971. (operator==): Defined here.
  6972. (operator!=): Defined here.
  6973. (operator<): Defined here.
  6974. * src/SocketCore.cc
  6975. (operator==): Removed.
  6976. (operator<): Removed.
  6977. * src/BitfieldMan.h
  6978. (operator=): Defined the function body here.
  6979. * src/BitfieldMan.cc
  6980. (operator=): Removed.
  6981. * src/TorrentMan.h
  6982. (deleteErrorPeer): Removed.
  6983. (deleteUnusedPeer); New function.
  6984. * src/TorrentMan.cc
  6985. (addPeer): Call deleteUnusedPeer.
  6986. (deleteErrorPeer): Removed.
  6987. (deleteUnusedPeer): New function.
  6988. * src/PeerAbstractCommand.h
  6989. (setNoCheck): New function.
  6990. (noCheck): New variable.
  6991. * src/PeerAbstractCommand.cc
  6992. (PeerAbstractCommand): Added the initialization of noCheck.
  6993. (execute): Added a check for noCheck.
  6994. (setNoCheck): New function.
  6995. * src/Util.h
  6996. (stdio.h): Included.
  6997. * src/Util.cc
  6998. (unistd.h): Included.
  6999. * src/DefaultDiskWriter.cc
  7000. (unistd.h): Included.
  7001. * src/Peer.h
  7002. (operator==): Defined the function body here.
  7003. (operator!=): Defined the function body here.
  7004. * src/Peer.cc
  7005. (operator==): Removed.
  7006. (operator!=): Removed.
  7007. * src/Piece.h
  7008. (Piece): Defined the function body here(copy constructor).
  7009. (operator=): Defined the function body here.
  7010. (operator==): Defined the function body here.
  7011. * src/Piece.cc
  7012. (Piece): Removed(copy constructor).
  7013. (operator=): Removed.
  7014. (operator==): Removed.
  7015. * src/PeerMessageUtil.h
  7016. (ChokeMessage.h): Removed.
  7017. (UnchokeMessage.h): Removed.
  7018. (InterestedMessage.h): Removed.
  7019. (NotInterestedMessage.h): Removed.
  7020. (HaveMessage.h): Removed.
  7021. (BitfieldMessage.h): Removed.
  7022. (RequestMessage.h): Removed.
  7023. (CancelMessage.h): Removed.
  7024. (PieceMessage.h): Removed.
  7025. (HandshakeMessage.h): Removed.
  7026. (KeepAliveMessage.h): Removed.
  7027. (PortMessage.h): Removed.
  7028. (HaveAllMessage.h): Removed.
  7029. (HaveNoneMessage.h): Removed.
  7030. (PeerConnection.h): Removed.
  7031. (HandshakeMessage.h): Included.
  7032. * src/BitfieldMessage.h
  7033. (init): New function.
  7034. (BitfieldMessage): Rewritten.
  7035. (BitfieldMessage): New function(overload).
  7036. * src/RequestSlot.h
  7037. (operator=): Defined the function body here.
  7038. (operator==): Defined the function body here.
  7039. * src/RequestSlot.cc
  7040. (operator=): Removed.
  7041. (operator==): Removed.
  7042. To remove the dependency on the PeerMessage subclass from
  7043. PeerInteraction:
  7044. * src/PeerMessageFactory.h: New class.
  7045. * src/PeerMessageFactory.cc: New class.
  7046. * src/SimplePeerMessage.cc
  7047. (send): If invalidate is true then do nothing.
  7048. * src/PeerInteractionCommand.cc
  7049. (HandshakeMessage.h): Included.
  7050. (KeepAliveMessage.h): Included.
  7051. (ChokeMessage.h): Included.
  7052. (UnchokeMessage.h): Included.
  7053. (HaveMessage.h): Included.
  7054. (executeInternal): Call setNoCheck().
  7055. Removed setWriteCheckSocket(socket).
  7056. * src/PeerInteraction.h
  7057. (ChokeMessage.h): Removed.
  7058. (UnchokeMessage.h): Removed.
  7059. (InterestedMessage.h): Removed.
  7060. (NotInterestedMessage.h): Removed.
  7061. (HaveMessage.h): Removed.
  7062. (BitfieldMessage.h): Removed.
  7063. (RequestMessage.h): Removed.
  7064. (CancelMessage.h): Removed.
  7065. (PieceMessage.h): Removed.
  7066. (HandshakeMessage.h): Removed.
  7067. (KeepAliveMessage.h): Removed.
  7068. (PortMessage.h): Removed.
  7069. (HaveAllMessage.h): Removed.
  7070. (HaveNoneMessage.h): Removed.
  7071. (RejectMessage.h): Removed.
  7072. (AllowedFastMessage.h): Removed.
  7073. (SuggestPieceMessage.h): Removed.
  7074. (PeerMessageFactory.h): Included.
  7075. (PeerMessageHandle): Removed typedef of PeerMessageHandle.
  7076. (HandshakeMessageHandle): Removed typedef of HandshakeMessageHandle.
  7077. (PeerMessageFactory): New variable.
  7078. (createPeerMessage): Removed.
  7079. (createHandshakeMessage): Removed.
  7080. (setPeerMessageCommonProperty): Removed.
  7081. (addRequestSlot): New function.
  7082. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  7083. (getPeerMessageFactory): New function.
  7084. (createRequestMessage): Removed.
  7085. (createCancelMessage): Removed.
  7086. (createPieceMessage): Removed.
  7087. (createHaveMessage): Removed.
  7088. (createChokeMessage): Removed.
  7089. (createUnchokeMessage): Removed.
  7090. (createInterestedMessage): Removed.
  7091. (createNotInterestedMessage): Removed.
  7092. (createBitfieldMessage): Removed.
  7093. (createKeepAliveMessage): Removed.
  7094. (createHaveAllMessage): Removed.
  7095. (createHaveNoneMessage): Removed.
  7096. (createRejectMessage): Removed.
  7097. (createAllowedFastMessage): Removed.
  7098. * src/PeerInteraction.cc
  7099. (PeerInteraction): Allocate PeerMessageFactory here.
  7100. (~PeerInteraction): Deallocate PeerMessageFactory here.
  7101. (sendMessages): Use msg->isUploading() instead of msg->getId() ==
  7102. PieceMessage::ID.
  7103. (addMessage): Simplified by using PeerMessage::onPush().
  7104. (addRequestSlot): New function.
  7105. (rejectAllPieceMessageInQueue): Simplified by using
  7106. PeerMessage::onChoked().
  7107. (rejectPieceMessageInQueue): Simplified by using
  7108. PeerMessage::onCanceled().
  7109. (abortPiece): Simplified by using PeerMessage::abortPiece().
  7110. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  7111. (createHandshakeMessage): Removed.
  7112. (createPeerMessage): Removed.
  7113. (sendHandshake): Call PeerMessageFactory::createHandshakeMessage().
  7114. (setPeerMessageCommonProperty): Removed.
  7115. (createRequestMessage): Removed.
  7116. (createCancelMessage): Removed.
  7117. (createPieceMessage): Removed.
  7118. (createHaveMessage): Removed.
  7119. (createChokeMessage): Removed.
  7120. (createUnchokeMessage): Removed.
  7121. (createInterestedMessage): Removed.
  7122. (createNotInterestedMessage): Removed.
  7123. (createBitfieldMessage): Removed.
  7124. (createKeepAliveMessage): Removed.
  7125. (createHaveAllMessage): Removed.
  7126. (createHaveNoneMessage): Removed.
  7127. (createRejectMessage): Removed.
  7128. (createAllowedFastMessage): Removed.
  7129. * src/PieceMessage.h
  7130. (createRejectMessage): New function.
  7131. (PieceMessage): Rewritten.
  7132. (onChoked): New function.
  7133. (onCanceled): New function.
  7134. * src/PieceMessage.cc
  7135. (send): If invalidate is true then do nothing, just return.
  7136. (createRejectMessage): New function.
  7137. (onChoked): New function.
  7138. (onCanceled): New function.
  7139. * src/RequestMessage.h
  7140. (RequestMessage): Rewritten.
  7141. (onPush): New function.
  7142. (onAbortPiece): New function.
  7143. * src/RequestMessage.cc
  7144. (onPush): New function.
  7145. (onAbortPiece): New function.
  7146. Update fd_set when a socket is added or deleted in order to improve
  7147. performance:
  7148. * src/DownloadEngine.h
  7149. (rfdset): New variable.
  7150. (wfdset): New variable.
  7151. (updateFdSet): New function.
  7152. * src/DownloadEngine.cc
  7153. (SetDescriptor::operator()): Use SockCmdMap::value_type.
  7154. (AccumulateActiveCommandUuid::operator()): Use SockCmdMap::value_type.
  7155. (waitData): Copy rfdset and wfdset.
  7156. (updateFdSet): New function.
  7157. (addSocket): Call updateFdSet.
  7158. (deleteSocket): Call updateFdSet.
  7159. 2006-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7160. To add the support for Metalink3.0 backward compatible links:
  7161. * src/Request.h
  7162. (SAFE_CHARS): Added '#'.
  7163. (METALINK_MARK): New definition.
  7164. * src/Request.cc
  7165. (parseUrl): Added the support for Metalink3.0 backward compatible
  7166. links.
  7167. etc
  7168. * src/PeerInteraction.cc
  7169. (MsgPushBack): Removed.
  7170. (sendMessages): Use STL copy and back_inserter.
  7171. (rejectAllPieceMessageInQueue): Use STL copy and back_inserter.
  7172. (rejectPieceMessageInQueue): Use STL copy and back_inserter.
  7173. * src/TorrentMan.h
  7174. (MAX_PEER_LIST_SIZE): Changed to 100 from 250.
  7175. 2006-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7176. * src/SharedHandle.h: New class.
  7177. To wrap Socket, Command, PeerMessage and Peer with SharedHandle:
  7178. * src/HttpResponseCommand.h
  7179. (HttpResponseCommand): Wrapped Socket.
  7180. * src/SocketCore.h
  7181. (operator==): New function.
  7182. (operator!=): New function.
  7183. (operator<): New function.
  7184. (getSockfd): New function.
  7185. (isOpen): New function.
  7186. (writeData): New function.
  7187. * src/SocketCore.cc
  7188. (operator==): New function.
  7189. (operator!=): New function.
  7190. (operator<): New function.
  7191. * src/AbstractCommand.h
  7192. (socket): Changed its type to SocketHandle.
  7193. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7194. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7195. (disableReadCheckSocket): New function.
  7196. (disableWriteCheckSocket): New function.
  7197. (readCheckTarget): Changed its type to SocketHandle.
  7198. (writeCheckTarget): Changed its type to SocketHandle.
  7199. (AbstractCommand): Replaced Socket with SocketHandle.
  7200. * src/AbstractCommand.cc
  7201. (AbstractCommand): Replaced Socket with SocketHandle.
  7202. (~AbstractCommand): Removed the deallocation for Socket object.
  7203. (disableReadCheckSocket): New function.
  7204. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7205. (disableWriteCheckSocket): New function.
  7206. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7207. * src/HttpDownloadCommand.cc
  7208. (DownloadCommand): Replaced Socket with SocketHandle.
  7209. * src/PeerAbstractCommand.h
  7210. (socket): Changed its type to SocketHandle.
  7211. (peer): Changed its type to PeerHandle.
  7212. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7213. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7214. (disableReadCheckSocket): New function.
  7215. (disableWriteCheckSocket): New function.
  7216. (readCheckTarget): Changed its type to SocketHandle.
  7217. (writeCheckTarget): Changed its type to SocketHandle.
  7218. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  7219. Replaced Peer with PeerHandle.
  7220. * src/HttpRequestCommand.cc
  7221. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7222. Use disableReadCheckSocket.
  7223. * src/PeerInitiateConnectionCommand.h
  7224. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7225. * src/PeerChokeCommand.cc
  7226. (UploadFaster::operator()): Replaced Peer with PeerHandle.
  7227. (DownloadFaster::operator()): Replaced Peer with PeerHandle.
  7228. (execute): Use PeerHandle.
  7229. * src/PeerConnection.h
  7230. (HandshakeMessage.h): Removed include of HandshakeMessage.h.
  7231. (socket): Changed its type to SocketHandle.
  7232. (PeerConnection): Replaced Socket with SocketHandle.
  7233. * src/PeerConnection.cc
  7234. (PeerConnection): Replaced Socket with SocketHandle.
  7235. * src/PeerInteractionCommand.h
  7236. (PeerInteractionCommand): Replaced socket with SocketHandle.
  7237. Replaced Peer with PeerHandle.
  7238. * src/PeerInteractionCommand.cc
  7239. (PeerInteractionCommand): Replaced Socket with SocketHandle.
  7240. Replaced Peer with PeerHandle.
  7241. (executeInternal): Use disableWriteCheckSocket.
  7242. Use HandshakeMessageHandle.
  7243. (receiveMessages): Use PeerMessageHandle.
  7244. (prepareForNextPeer): Use PeerHandle.
  7245. * src/HttpProxyRequestCommand.h
  7246. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7247. * src/HttpResponseCommand.cc
  7248. (HttpResponseCommand): Replaced Socket with SocketHandle.
  7249. * src/TorrentMan.cc
  7250. (nullPeer): Added external reference.
  7251. (~TorrentMan): Removed the deallocation of the elements of peers.
  7252. (addPeer): Rewritten.
  7253. (isPeerAvailable): Use nullPeer.
  7254. (deleteOldpeers): Replaced with deleteErrorPeer.
  7255. (deleteErrorPeer): New function.
  7256. (getPeer): Use PeerHandle and nullPeer.
  7257. (hasMissingPiece): Replaced Peer with PeerHandle.
  7258. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7259. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7260. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7261. (getMissingPiece): Replaced Peer with PeerHandle.
  7262. * src/FtpNegotiateCommand.cc
  7263. (FtpNegotiationCommand): Replaced Peer with PeerHandle.
  7264. (~FtpNegotiationCommand): Removed the deallocation of Sockets.
  7265. (recvGreeting): Use disableWriteCheckSocket.
  7266. (recvPasv): Removed the allocation of Socket.
  7267. Use disableReadCheckSocket.
  7268. (sendRestPasv): Use disableWriteCheckSocket.
  7269. (recvRetr): Changed assertion.
  7270. * src/PeerInteraction.h
  7271. (SharedHandle.h): Included SharedHandle.h.
  7272. (PeerMessageHandle): New type definition.
  7273. (HandshakeMessageHandle): New type definition.
  7274. (MessageQueue): Changed. Now its element is of type PeerMessageHandle.
  7275. (peer): Changed its type to PeerHandle.
  7276. (createHandshakeMessage): Replaced HandshakeMessage with
  7277. HandshakeMessageHandle.
  7278. (createPeerMessage): Replaced PeerMessageHandle with PeerMessage.
  7279. (PeerInteraction): Replaced Peer with PeerHandle.
  7280. Replaced Socket with SocketHandle.
  7281. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  7282. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  7283. (receiveHandshake): Replaced HandshakeMessage with
  7284. HandshakeMessageHandle.
  7285. * src/PeerInteraction.cc
  7286. (PeerInteraction): Replaced Peer with PeerHandle.
  7287. Replaced Socket with SocketHandle.
  7288. (~PeerInteraction): Removed the deallocation of the elements of
  7289. messageQueue.
  7290. (MsgPushBack::operator()): Replaced PeerMessage with PeerMessageHandle.
  7291. (isSendingMessageInProgress): Replaced PeerMessage with
  7292. PeerMessageHandle.
  7293. (sendMessages): Use PeerMessageHandle. Removed try-catch block.
  7294. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  7295. (rejectAllPieceMessageInQueue): Use PeerMessageHandle.
  7296. (rejectPieceMessageInQueue): Use PeerMessageHandle.
  7297. (abortPiece): Use PeerMessageHandle.
  7298. (receiveHandshake): Replaced HandshakeMessage with
  7299. HandshakeMessageHandle. Removed try-catch block.
  7300. (createHandshakeMessage): Replaced HandshakeMessage with
  7301. HandshakeMessageHandle.
  7302. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  7303. Removed try-catch block.
  7304. (createPeerMessage): Replaced PeerMessage with PeerMessageHandle.
  7305. * src/HttpProxyResponseCommand.cc
  7306. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7307. * src/FtpTunnelResponseCommand.h
  7308. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7309. * src/HttpConnection.cc
  7310. (HttpConnection): Replaced Socket with SocketHandle.
  7311. * src/PeerAbstractCommand.cc
  7312. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  7313. (~PeerAbstractCommand): Removed the deallocation of socket.
  7314. Use disableReadCheckSocket, disableWriteCheckSocket.
  7315. (disableReadCheckSocket): New function.
  7316. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7317. (disableWriteCheckSocket): New function.
  7318. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7319. * src/InitiateConnectionCommandFactory.h: Corrected indentation.
  7320. * src/FtpTunnelRequestCommand.cc
  7321. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7322. (~FtpTunnelRequestCommand): Corrected indentation.
  7323. * src/DownloadCommand.h
  7324. (DownloadCommand): Replaced Socket with SocketHandle.
  7325. * src/PeerListenCommand.cc
  7326. (PeerListenCommand): Removed the initialization of socket.
  7327. (~PeerListenCommand): Removed the deallocation of socket.
  7328. (bindPort): Use SocketHandle.
  7329. (execute): Use SocketHandle and PeerHandle.
  7330. * src/FtpDowndloadCommand.cc
  7331. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7332. (~FtpDownloadCommand): Removed the deallocation of ctrlSocket.
  7333. * src/main.cc
  7334. (main): Corrected indentation.
  7335. * src/HttpInitiateConnectionCommand.cc
  7336. (HttpInitiateConnectionCommand): Replaced Socket with SocketHandle.
  7337. (executeInternal): Removed the allocation of socket.
  7338. * src/HttpRequestCommand.h
  7339. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7340. * src/FtpNegotiationCommand.h
  7341. (dataSocket): Changed its type to SocketHandle.
  7342. (serverSocket): Changed its type to SocketHandle.
  7343. (FtpNegotiationCommand): Replaced Socket with SocketHandle.
  7344. * src/TorrentMan.h
  7345. (MAX_PEER_UPDATE): Removed.
  7346. (MAX_PEERS): New definition.
  7347. (Peers): The element is now of type PeerHandle.
  7348. (addPeer): Replaced Peer with PeerHandle. Removed 'duplicate' argument.
  7349. (getPeer): Replaced Peer with PeerHandle.
  7350. (deleteOldErrorPeers): Removed.
  7351. (deleteErrorPeer): New function.
  7352. (hasMissingPiece): Replaced Peer with PeerHandle.
  7353. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7354. (getMissingPiece): Replaced Peer with PeerHandle.
  7355. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7356. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7357. (addActivePeer): Replaced Peer with PeerHandle.
  7358. (deleteActivePeer): Replaced Peer with PeerHandle.
  7359. Added a check for the return value of find.
  7360. * src/FtpTunnelResponseCommand.cc
  7361. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7362. * src/FtpInitiateConnectionCommand.cc
  7363. (executeInternal): Removed the allocation of socket.
  7364. * src/DownloadEngine.h
  7365. (Sockets): An element is now of type SocketHandle.
  7366. (SockCmdMap): A key is of type SocketHandle, a value is of type int.
  7367. (CommandUuids): New type definition.
  7368. (rsockets): Changed its type to SockCmdMap.
  7369. (wsockets): Changed its type to SockCmdMap.
  7370. (addSocket): Rewritten.
  7371. (deleteSocket): Rewritten.
  7372. (addSocketForReadCheck): Rewritten.
  7373. (deleteSocketForReadCheck): Rewritten.
  7374. (addSocketForWriteCheck): Rewritten.
  7375. (deleteSocketForWriteCheck): Rewritten.
  7376. (PairFind): New template class.
  7377. * src/HttpDownloadCommand.h
  7378. (HttpDownloadCommand): Replaced Socket with SocketHandle.
  7379. * src/FtpConnection.cc
  7380. (FtpConnection): Replaced Socket with SocketHandle.
  7381. (sendPort): Removed the allocation of serverSocket. Removed try-catch
  7382. block.
  7383. * src/InitiateConnectionCommandFactory.cc
  7384. (DlAbortEx.h): Included DlAbortEx.h.
  7385. (createInitiateConnectionCommand): Throw exception if the protocol of
  7386. requested URI is not supported.
  7387. * src/Peer.cc
  7388. (nullPeer): Changed its type to PeerHandle.
  7389. (operator==): New function.
  7390. (operator!=): New function.
  7391. * src/Peer.h
  7392. (SharedHandle.h): Included SharedHandle.h.
  7393. (operator==): New function.
  7394. (operator!=): New function.
  7395. (Peer): Added the default constructor.
  7396. Use resetStatus() to initialize member variables.
  7397. (nullPeer): Removed.
  7398. * src/TrackerUpdateCommand.cc
  7399. (execute): Brushed up using SharedHandle. Replaced MAX_PEER_UPDATE
  7400. with MIN_PEERS.
  7401. * src/PeerListenCommand.h
  7402. (socket): Changed its type to SocketHandle.
  7403. * src/Command.h
  7404. (CommandUuid): New type definition.
  7405. (uuid): New variable.
  7406. (uuidGen): New variable.
  7407. (Command): Added the initialization of uuid.
  7408. (getUuid): New function.
  7409. * src/Socket.h
  7410. (Socket): Removed.
  7411. (SocketHandle): New type definition.
  7412. * src/DownloadEngine.h
  7413. (FindCommand): New function object.
  7414. (run): The portion of socket check was rewritten.
  7415. (SetDescriptor): New function object.
  7416. (AccumulateActiveCommandUuid): New function object.
  7417. (waitData): Rewritten.
  7418. (addSocket): Rewritten.
  7419. (deleteSocket): Rewritten.
  7420. (addSocketForReadCheck): Rewritten.
  7421. (addSocketForWriteCheck): Rewritten.
  7422. (deleteSocketForReadCheck): Rewritten.
  7423. (deleteSocketForWriteCheck): Rewritten.
  7424. * src/HttpProxyResponseCommand.h
  7425. (HttpProxyResponseCommand): Replaced Socket with SocketHandle.
  7426. * src/HttpConnection.h
  7427. (socket): Changed its type to SocketHandle.
  7428. (HttpConnection): Replaced Socket with SocketHandle.
  7429. * src/PeerInitiateConnectionCommand.cc
  7430. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7431. (executeInternal): Removed the allocation of socket.
  7432. (prepareForNextPeer): Use PeerHandle.
  7433. * src/PeerMessage.h
  7434. (peer): Changed its type to PeerHandle.
  7435. (getPeer): Replaced Peer with PeerHandle.
  7436. (setPeer): Replaced Peer with PeerHandle.
  7437. * src/DownloadCommand.cc
  7438. (DownloadCommand): Replaced Socket with SocketHandle.
  7439. * src/FtpConnection.h
  7440. (socket): Changed its type to SocketHandle.
  7441. (FtpConnection): Replaced Socket with SocketHandle.
  7442. (sendPort); Replaced Socket with SocketHandle.
  7443. * src/FtpDowndloadCommand.h
  7444. (ctrlSocket): Changed its type to SocketHandle.
  7445. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7446. * src/HttpProxyRequestCommand.cc
  7447. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7448. * src/FtpTunnelRequestCommand.h
  7449. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7450. etc
  7451. * src/PeerChokeCommand.h
  7452. (setAllPeerChoked): Removed.
  7453. (setAllPeerResetDelta): Removed.
  7454. * src/PeerChokeCommand.cc
  7455. (setAllPeerChoked): Removed.
  7456. (ChokePeer): New function object.
  7457. (setAllPeerResetDelta): Removed.
  7458. (ResetDelta): New function object.
  7459. (orderByDownloadRate): Fixed a bug: use DowloadFaster, not UploadFaster
  7460. (execute): Show download speed when the local node is a seeder.
  7461. setAllPeerChoked and setAllPeerResetDelta were rewritten
  7462. using STL.
  7463. * src/TrackerWatcherCommand.h
  7464. (MIN_PEERS): Removed.
  7465. * src/TorrentMan.cc
  7466. (getPeer): Replaced MAX_PEER_UPDATE with MIN_PEERS.
  7467. 2006-07-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7468. To fix the bug that .aria2 file is not saved if downloading is stopped
  7469. by the errors:it results that aria2 can not resume downloading:
  7470. * src/main.cc
  7471. (normalDownload): Added the call to save().
  7472. (main): Added the deletion of the elements in 'reserved'.
  7473. To fix log:
  7474. * src/PeerInteraction.cc
  7475. (receiveHandshake): Fixed log.
  7476. 2006-07-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7477. To improve download performance in BitTorrent:
  7478. * src/TorrentMan.cc
  7479. (getPeer): Check the number of connections. Return nullPeer if
  7480. it is greater than MAX_PEER_UPDATE.
  7481. This code was originally here, but was removed in 0.5.1.
  7482. 2006-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7483. To improve the conditional compilation:
  7484. * src/MultiDiskWriter.h:
  7485. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7486. * src/MultiDiskWriter.cc:
  7487. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7488. * src/Util.h:
  7489. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7490. Added ENABLE_BITTORRENT around computeFastSet().
  7491. * src/Util.cc:
  7492. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7493. Added ENABLE_BITTORRENT around computeFastSet().
  7494. * src/messageDigest.h:
  7495. Replaced ENABLE_BITTORRENT with ENABLE_SSL.
  7496. * src/ShaVisitor.h:
  7497. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7498. * src/ShaVisitor.cc:
  7499. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7500. * src/main.cc:
  7501. Added ENABLE_BITTORRENT around includes and blocks related to
  7502. BitTorrent.
  7503. Added ENABLE_MESSAGE_DIGEST to skip checksum checking when the message
  7504. digest support is not available.
  7505. * src/AbstractDiskWriter.h:
  7506. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7507. * src/AbstractDiskWriter.cc:
  7508. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7509. * src/MetalinkEntry.cc
  7510. (check): Added ENABLE_MESSAGE_DIGEST. Return true if the message digest
  7511. support is not available.
  7512. To add command-line options for Metalink:
  7513. * src/main.cc:
  7514. Added metalink-version, metalink-language, metalink-os,
  7515. follow-metalink.
  7516. To use EXIT_SUCCESS and EXIT_FAILURE with exit():
  7517. * src/main.cc: Use these definition.
  7518. * Release 0.6.0
  7519. 2006-07-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7520. To add Metalink support(http/ftp only):
  7521. * src/AbstractCommand.h
  7522. (tryReserved): New function.
  7523. * src/AbstractCommand.cc
  7524. (execute): Call tryReserved().
  7525. (tryReserved): New function.
  7526. * src/Request.h
  7527. (Requests): New type definition.
  7528. * src/SegmentMan.h
  7529. (reserved): New variable.
  7530. * src/Util.h
  7531. (fileChecksum): New function.
  7532. (toUpper): New function.
  7533. (toLower): New function.
  7534. * src/Util.cc
  7535. (messageDigest.h): Included.
  7536. (trim): Trim \r\n\t.
  7537. (fileChecksum): New function.
  7538. (toUpper): New function.
  7539. (toLower): New function.
  7540. * src/main.cc
  7541. (normalDownload): New function.
  7542. (main): Added 2 command-line options: metalink-file,
  7543. metalink-connection. Their usage has not been written yet.
  7544. * src/MetalinkProcessor.h: New class.
  7545. * src/Xml2MetalinkProcessor.h: New class.
  7546. * src/Xml2MetalinkProcessor.cc: New class.
  7547. * src/MetalinkEntry.h: New class.
  7548. * src/MetalinkEntry.cc: New class.
  7549. * src/MetalinkResource.h: New class.
  7550. * src/MetalinkResource.cc: New class.
  7551. To add md5 message digest checking:
  7552. * src/messageDigest.h: Rewritten.
  7553. * src/MultiDiskWriter.cc: Updated according to the changes in
  7554. messageDigest.h.
  7555. * src/ShaVisitor.cc: Updated according to the changes in
  7556. messageDigest.h.
  7557. * src/Util.cc: Updated according to the changes in messageDigest.h.
  7558. * src/AbstractDiskWriter.cc: Updated according to the changes in
  7559. messageDigest.h.
  7560. To fix a bug that causes segfault when the payload length in peer
  7561. message is less than 0:
  7562. * src/PeerConnection.cc:
  7563. (receiveMessage): Fixed the bug.
  7564. * src/PeerMessageUtil.cc
  7565. (checkLength): Throw an exception if length is less than or equals to
  7566. 0.
  7567. To add new interfaces to Base64 encoding/decoding:
  7568. * src/Base64.h
  7569. (part_encode): Changed the method signature.
  7570. (encode): New function(overload).
  7571. (decode): New function(overload).
  7572. * src/Base64.cc
  7573. (part_encode): Rewritten.
  7574. (encode): Rewritten.
  7575. (encode): New function(overload).
  7576. To prevent a peer to download same piece if there is an error in
  7577. checksum:
  7578. * src/PieceMessage.cc
  7579. (receivedAction): Call peerInteraction->abortPiece().
  7580. 2006-06-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7581. To fix the bug that causes same have message is sent many times to
  7582. a single peer.
  7583. * src/Time.cc
  7584. (isNewer): Use Util::difftv().
  7585. * src/Util.cc
  7586. (difftv): Added a cast to (long long int).
  7587. * src/TorrentMan.cc
  7588. (advertisePiece): Use push_front.
  7589. (getAdvertisedPieceIndexes): A performance improvement was made.
  7590. To fix the bug that sends tracker requests without a sleep interval
  7591. when the number of connections is less than 15.
  7592. * src/TrackerWatcherCommand.cc
  7593. (execute): Now the number of connections is not a factor to decide
  7594. whether or not a tracker request should be sent or not.
  7595. * src/Time.h
  7596. (setTimeInSec): New function.
  7597. * src/Time.cc
  7598. (setTimeInSec): New function.
  7599. etc.
  7600. * src/ChokeMessage.cc
  7601. (receivedAction): Removed peer->snubbing = false
  7602. * src/PeerConnection.h
  7603. (receiveHandshake): Updated doc.
  7604. * src/TorrentMan.h
  7605. (getAdvertisedPieceIndexes): Updated the method signature.
  7606. * src/TorrentMan.cc
  7607. (getAdvertisedPieceIndexes): Updated the method signature.
  7608. * src/Time.h
  7609. (getTimeInMicros): Added a cast to (long long int).
  7610. (getTimeInMillis): Added a cast to (long long int).
  7611. * Release 0.5.2
  7612. 2006-06-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7613. To make a listening socket non-block:
  7614. * src/SocketCore.h
  7615. (setNonBlockingMode): New function.
  7616. * src/SocketCore.cc
  7617. (setNonBlockingMode): New function.
  7618. (beginListen): Added a call to setNonBlockingMode().
  7619. (acceptConnection): Call setNonBlockingMode().
  7620. (setBlockingMode): Updated.
  7621. To handle tracker's NAT-checking:
  7622. * src/PeerConnection.cc
  7623. (receiveHandshake): 'msg' param is filled with received data and
  7624. its length is assigned to 'length' param, even if all handshake
  7625. message is not yet received.
  7626. * src/PeerInteractionCommand.cc
  7627. (executeInternal): Use peerInteraction->receiveHandshake(true) when
  7628. a new peer connects to localhost.
  7629. A call to peerInteraction->sendHandshake() was removed because
  7630. it is called from peerInteraction->receiveHandshake(true).
  7631. * src/PeerInteraction.h
  7632. (quickReplied): New variable.
  7633. (receiveHandshake): Added an argument.
  7634. * src/PeerInteraction.cc
  7635. (PeerInteraction): Added the initialization of quickReplied.
  7636. (receiveHandshake): Send handshake message as soon as the info hash
  7637. in a handshake message from a peer is correct.
  7638. To change the random part of peer id and key parameter:
  7639. * src/TorrentMan.h
  7640. (key): New variable.
  7641. * src/TorrentMan.cc
  7642. (setupInternal1): Use Util::randomAlpha() to generate random part
  7643. of peer id, which is now "-aria2-"+13 alphabet characters([A-Za-z]).
  7644. key is also generated by Util::randomAlpha() and it is now 8 character
  7645. long.
  7646. * src/Util.h
  7647. (randomAlpha): New function.
  7648. * src/Util.cc
  7649. (randomAlpha): New function.
  7650. * src/TrackerWatcherCommand.cc
  7651. (execute): In a tracker request: Use torrentMan->key as key parameter.
  7652. Added no_peer_id=1.
  7653. Set snubbing flag to false when a choke message is received from a
  7654. snubbed peer.
  7655. * src/ChokeMessage.cc
  7656. (receivedAction): Set snubbing flag to false.
  7657. 2006-06-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7658. * src/TorrentMan.cc (setupInternal1): Fixed peerId generation bug.
  7659. * src/SimpleLogger.h (writeHeader): New function.
  7660. * src/SimpleLogger.cc (writeHeader): New function.
  7661. (writeLog): Fixed the bug that causes segfaults if exception message
  7662. contains an unescaped "%" character.
  7663. * src/TrackerWatcherCommand.cc (execute): Added a short sleep
  7664. when a tracker request fails.
  7665. * src/Request.cc (parseUrl): Query string is now handled properly.
  7666. * Release 0.5.1
  7667. 2006-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7668. To add Time class which represents a specific instant in time and
  7669. its precision is microseconds. Time checking procedures were rewritten
  7670. using this object.
  7671. * src/Time.h: New class.
  7672. * src/Time.cc: New class.
  7673. * src/AbstractCommand.h
  7674. (updateCheckPoint): Removed.
  7675. (isTimeoutDetected): Removed.
  7676. (checkPoint): Changed the type to Time.
  7677. (timeout): New variable.
  7678. (setTimeout): New function.
  7679. * src/AbstractCommand.cc
  7680. (AbstractCommand): Removed the initialization of checkPoint.
  7681. Added the initialization of timeout.
  7682. (updateCheckPoint): Removed.
  7683. (isTimeoutDetected): Removed.
  7684. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  7685. * src/PeerChokeCommand.h
  7686. (checkPoint): Changed the type to Time.
  7687. * src/PeerChokeCommand.cc
  7688. (PeerChokeCommand): Removed the initialization of checkPoint.
  7689. (execute): Rewritten using Time object.
  7690. * src/TrackerWatcherCommand.h
  7691. (checkPoint): Changed the type to Time.
  7692. * src/TrackerWatcherCommand.cc
  7693. (TrackerWatcherCommand): Removed the initialization of checkPoint.
  7694. (execute): Rewritten.
  7695. * src/ConsoleDownloadEngine.h
  7696. (cp): Changed the type to Time.
  7697. (startup): Changed the type to Time.
  7698. * src/ConsoleDownloadEngine.cc
  7699. (initStatistics): Use cp.reset(), startup.reset().
  7700. (calculateStatistics): Rewritten using Time object.
  7701. * src/PeerAbstractCommand.h
  7702. (updateCheckPoint): Removed.
  7703. (isTimeoutDetected): Removed.
  7704. (checkPoint): Changed the type to Time.
  7705. * src/PeerAbstractCommand.cc
  7706. (PeerAbstractCommand): Removed the initialization of checkPoint.
  7707. (updateCheckPoint): Removed.
  7708. (isTimeoutDetected): Removed.
  7709. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  7710. * src/PeerInteractionCommand.cc
  7711. (PeerInteractionCommand): Removed the initializations of struct
  7712. timeval variables.
  7713. * src/PeerInteractionCommand.h
  7714. (keepAliveCheckPoint): Changed the type to Time.
  7715. (chokeCheckPoint): Changed the type to Time.
  7716. (freqCheckPoint): Changed the type to Time.
  7717. (haveCheckTime): Changed the type to Time.
  7718. * src/PeerInteractionCommand.cc
  7719. (executeInternal): Rewritten using Time object.
  7720. (detectMessageFlooding): Rewritten using Time object.
  7721. (checkLongTimePeerChoking): Rewritten using Time object.
  7722. (sendKeepAlive): Rewritten using Time object.
  7723. (checkHave): Rewritten using Time object.
  7724. * src/SleepCommand.h
  7725. (checkPoint): Changed the type to Time.
  7726. * src/SleepCommand.cc
  7727. (SleepCommand): Removed the initialization of checkPoint.
  7728. (execute): Rewritten using Time object.
  7729. * src/TorrentAutoSaveCommand.h
  7730. (checkPoint): Changed the type to Time.
  7731. * src/TorrentAutoSaveCommand.cc
  7732. (TorrentAutoSaveCommand): Removed the initialization of checkPoint.
  7733. (execute): Rewritten.
  7734. * src/DownloadCommand.h
  7735. (sw): Changed the type to Time.
  7736. * src/DownloadCommand.cc
  7737. (DownloadCommand): Removed the initialization of sw.
  7738. (executeInternal): Rewritten.
  7739. * src/RequestSlot.h
  7740. (dispatchedTime): Changed the type to Time.
  7741. * src/RequestSlot.cc
  7742. (RequestSlot): Removed the call to setDispatchedTime().
  7743. (setDispatchedTime): Rewirtten.
  7744. (isTimeout): Rewritten.
  7745. (getLatencyInMillis): Rewritten.
  7746. * src/TorrentDownloadEngine.h
  7747. (cp): Changed the type to Time[2].
  7748. (startup): Changed the type to Time.
  7749. * src/TorrentDownloadEngine.cc
  7750. (initStatistics): Rewritten.
  7751. (calculateStatistics): Rewritten.
  7752. * src/DownloadEngine.cc
  7753. (run): Rewritten.
  7754. To detect all attempts to connect to the tracker are failed:
  7755. * src/AbstractCommand.cc
  7756. (execute): Increment e->segmentMan->errors if a command aborted.
  7757. * src/SegmentMan.h
  7758. (errors): New variable.
  7759. * src/SegmentMan.cc
  7760. (SegmentMan): Added the initialization of errors.
  7761. (init): Added the initialization of errors.
  7762. * src/TrackerWatcherCommand.cc
  7763. (execute): If e->segmentMan->errors > 0 then assume that the tracker
  7764. request was failed.
  7765. To handle snubbed peers:
  7766. * src/PeerChokeCommand.cc
  7767. (optUnchokingPeer): Snubbed peers don't get unchoked.
  7768. (execute): Snubbed peers don't get unchoked.
  7769. * src/PeerInteraction.h
  7770. (REQUEST_TIME_OUT): Changed the value from 120 to 60.
  7771. * src/PeerInteraction.cc
  7772. (checkRequestSlot): A peer get marked as "snubbed" if it doesn't send
  7773. back the requested 16k block in 60 seconds.
  7774. * src/PieceMessage.cc
  7775. (receivedAction): A peer's snubbed state is cleard if it sends
  7776. the requested 16k block in 60 seconds.
  7777. * src/Peer.h
  7778. (snubbing): New variable.
  7779. * src/Peer.cc
  7780. (resetStatus): Added snubbed = false.
  7781. To fix the bug that causes have message is not sent:
  7782. * src/PeerInteractionCommand.cc
  7783. (~PeerInteractionCommand): Removed e->torrentMan->unadvertisePiece().
  7784. (FLOODING_CHECK_INTERVAL): New definition(temporal).
  7785. (detectMessageFlooding): Use FLOODING_CHECK_INTERVAL.
  7786. * src/TorrentMan.h
  7787. (HaveEntry): New class.
  7788. (advertisePiece): Rewritten.
  7789. (getAdvertisedPieceIndexes): Rewritten.
  7790. (Haves): Changed the type.
  7791. (getAdvertisedPieceIndexes): Added an argument.
  7792. Others:
  7793. * src/TorrentMan.h
  7794. (DEFAULT_ANNOUNCE_INTERVAL): Changed the value to 1800.
  7795. (DEFAULT_ANNOUNCE_MIN_INTERVAL): Changed the value to 1800.
  7796. * src/TorrentMan.cc
  7797. (getPeer): Don't check the number of connections here.
  7798. (setupInternal1): Changed peerId.
  7799. * src/PeerInteractionCommand.h
  7800. (KEEP_ALIVE_INTERVAL): New definition.
  7801. (sendKeepAlive): Use KEEP_ALIVE_INTERVAL.
  7802. * src/main.cc
  7803. (main): SA_ONESHOT was replaced with SA_RESETHAND.
  7804. * src/DownloadEngine.h: Removed unnecessary header includes.
  7805. 2006-05-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7806. To fix the bug that causes segfaults if a tracker returns a zero-length
  7807. list as "peers":
  7808. * src/TrackerUpdateCommand.cc
  7809. (execute): Added a check to see wether the type of peers is Data*.
  7810. 2006-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7811. * Release 0.5.0
  7812. To fix compile issue with gcc3:
  7813. * src/CancelMessage.h
  7814. (ID): Renamed as ID_t
  7815. (ID_t): New enum.
  7816. * src/RejectMessage.h
  7817. (ID): Renamed as ID_t
  7818. (ID_t): New enum.
  7819. * src/SuggestPieceMessage.h
  7820. (ID): Renamed as ID_t
  7821. (ID_t): New enum.
  7822. * src/AllowedFastMessage.h
  7823. (ID): Renamed as ID_t
  7824. (ID_t): New enum.
  7825. * src/PortMessage.h
  7826. (ID): Renamed as ID_t
  7827. (ID_t): New enum.
  7828. * src/HaveNoneMessage.h
  7829. (ID): Renamed as ID_t
  7830. (ID_t): New enum.
  7831. * src/KeepAliveMessage.h
  7832. (ID): Renamed as ID_t
  7833. (ID_t): New enum.
  7834. * src/HaveAllMessage.h
  7835. (ID): Renamed as ID_t
  7836. (ID_t): New enum.
  7837. * src/UnchokeMessage.h
  7838. (ID): Renamed as ID_t
  7839. (ID_t): New enum.
  7840. * src/BitfieldMessage.h
  7841. (ID): Renamed as ID_t
  7842. (ID_t): New enum.
  7843. * src/PieceMessage.h
  7844. (ID): Renamed as ID_t
  7845. (ID_t): New enum.
  7846. * src/RequestMessage.h
  7847. (ID): Renamed as ID_t
  7848. (ID_t): New enum.
  7849. * src/NotInterestedMessage.h
  7850. (ID): Renamed as ID_t
  7851. (ID_t): New enum.
  7852. * src/ChokeMessage.h
  7853. (ID): Renamed as ID_t
  7854. (ID_t): New enum.
  7855. * src/InterestedMessage.h
  7856. (ID): Renamed as ID_t
  7857. (ID_t): New enum.
  7858. * src/HaveMessage.h
  7859. (ID): Renamed as ID_t
  7860. (ID_t): New enum.
  7861. 2006-05-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7862. * src/PeerAbstractCommand.h
  7863. (beforeSocketCheck): Removed.
  7864. * src/PeerAbstractCommand.cc
  7865. Modified in order to call executeInternal() even if socket check
  7866. and upload limit check fail.
  7867. * src/PeerInteractionCommand.h
  7868. (keepAlive): Removed.
  7869. (sendKeepAlive): New function.
  7870. (checkHave): New function.
  7871. (beforeSocketCheck): Removed.
  7872. * src/PeerInteractionCommand.cc
  7873. (executeInternal): Use peerInteraction->checkRequestSlot(). Added
  7874. calls to checkHave() and sendKeepAlive().
  7875. (keepAlive): Renamed to sendKeepAlive().
  7876. (sendKeepAlive): New function.
  7877. (beforeSocketCheck): Removed.
  7878. (checkHave): New function.
  7879. * src/BitfieldMan.cc
  7880. (getMissingIndex): Don't call getMissingIndexRandomly() if max is 0.
  7881. (getMissingUnusedIndex): Don't call getMissingIndexRandomly() if max is
  7882. 0.
  7883. (getMissingIndex): Dont't call getMissingIndexRandomly() if max is 0.
  7884. * src/TorrentMan.h
  7885. (UsedPieces): Removed.
  7886. (Pieces): New type definition.
  7887. * src/Piece.h: Updated doc.
  7888. * src/Peer.h
  7889. (totalLength): Removed.
  7890. * src/Peer.cc
  7891. (updateLatency): Fixed the latency calculation.
  7892. * src/TorrentMan.cc
  7893. (addPeer): Call deleteOldErrorPeers() only if peers.size() is higher
  7894. than or equal to MAX_PEER_LIST_SIZE.
  7895. If duplicate is false and peer.size() >= MAX_PEER_LIST_SIZE,
  7896. then return false.
  7897. (deleteOldErrorPeers): Rewritten.
  7898. (deleteUsedPiece): Fixed the miss use of STL remove.
  7899. * src/PeerInteraction.h
  7900. (Pieces): Removed.
  7901. (deleteTimeoutRequestSlot): Removed.
  7902. (deleteCompletedRequestSlot): Removed.
  7903. (checkRequestSlot): New function.
  7904. * src/PeerInteraction.cc
  7905. (deleteTimeoutRequestSlot): Merged to checkRequestSlot().
  7906. (deleteCompletedRequestSlot): Merged to checkRequestSlot().
  7907. (checkRequestSlot): New function.
  7908. * src/DownloadEngine.cc
  7909. (run): Clear activeSockets before calling waitData().
  7910. (waitData): Removed a call to activeSockets.clear().
  7911. 2006-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7912. To attempt to handle EINTR:
  7913. * src/SocketCore.cc
  7914. (isReadable): Added EINTR handling.
  7915. (isWritable): Added EINTR handling.
  7916. To improve the performance:
  7917. * src/AbstractCommand.cc
  7918. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  7919. * src/PeerInteractionCommand.h
  7920. (receiveMessage): Renamed as receiveMessages().
  7921. (receiveMessages): New function.
  7922. * src/PeerInteractionCommand.cc
  7923. (executeInternal): receiveMessage loop is moved to new receiveMessages
  7924. () function. detectMessageFlooding() is moved here.
  7925. (detectMessageFlooding): Use Util::difftvsec() instead of Util::difftv
  7926. (). The flooding detection for have message is comment out.
  7927. (checkLongTimePeerChoking): Use Util::difftvsec() instead of
  7928. Util::difftv().
  7929. (receiveMessage): Renamed as receiveMessages().
  7930. (receiveMessages): New function.
  7931. (keepAlive): Use Util::difftvsec() instead of Util::difftv().
  7932. (beforeSocketCheck): Commented out checkLongTimePeerChoking().
  7933. * src/SleepCommand.cc
  7934. (execute): Use Util::difftvsec() instead of Util::difftv().
  7935. * src/BitfieldMan.h
  7936. (getNthBitIndex): New function.
  7937. (hasMissingPiece): New function.
  7938. (getAllMissingIndexes): New function.
  7939. * src/BitfieldMan.cc
  7940. (countSetBit): Rewritten.
  7941. (getNthBitIndex): New function.
  7942. (getMissingIndexRandomly): Rewritten.
  7943. (hasMissingPiece): New function.
  7944. (getAllMissingIndexes): New function.
  7945. * src/TorrentMan.cc
  7946. (hasMissingPiece): New function.
  7947. (deleteUsedPiece): Rewritten using STL.
  7948. * src/PeerInteraction.cc
  7949. (getNewPieceAndSendInterest): Use TorrentMan::hasMissingPiece(), which
  7950. is a little bit faster then TorrentMan::getMissingPieceIndex().
  7951. (addRequests): Updated the number of pending requests.
  7952. * src/PeerAbstractCommand.cc
  7953. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  7954. (execute): Returns true if TorrentMan::isHalt() is true.
  7955. Corrected the condition of upload limit checking.
  7956. * src/Util.h
  7957. (countBit): New function.
  7958. * src/Util.cc
  7959. (nbits): New variable.
  7960. (countBit): New function.
  7961. * src/DownloadEngine.h
  7962. (SockCmdMap): New type definition.
  7963. (waitData): Added an argument.
  7964. (addSocket): Added an argument.
  7965. (addSocketForReadCheck): Added an argument.
  7966. (addSocketForWriteCheck): Added an argument.
  7967. * src/DownloadEngine.cc
  7968. (run): Executes only commands whose sockets are ready to read or write.
  7969. All commands are executed in every 1 second.
  7970. (waitData): Calls select() again if it returned
  7971. EINTR.
  7972. (addSocket): Saves socket and command object pair to the map.
  7973. (deleteSocket): Deletes socket and command object pair from the map.
  7974. (addSocketForReadCheck): Added an argument.
  7975. (addSocketForWriteCheck): Added an argument.
  7976. * src/DownloadCommand.cc
  7977. (executeInternal): Use Util::difftvsec() instead of Util::difftv().
  7978. To send "event=stopped" to the tracker when the application finishes:
  7979. * src/PeerChokeCommand.h
  7980. (checkPoint): New variable.
  7981. * src/PeerChokeCommand.cc
  7982. (PeerChokeCommand): Added the initialization of checkPoint.
  7983. (execute): The interval check is now done by checkPoint, not
  7984. SleepCommand. Return true if TorrentMan::isHalt() is true.
  7985. * src/TorrentMan.h
  7986. (halt): New function.
  7987. (hasMissingPiece): New function.
  7988. (isHalt): New function.
  7989. (setHalt): New function.
  7990. * src/TorrentMan.cc
  7991. (TorrentMan): Added the initialization of halt.
  7992. * src/TorrentAutoSaveCommand.h
  7993. (checkPoint): New variable.
  7994. * src/PeerListenCommand.cc
  7995. (execute): Returns true if TorrentMan::isHalt() is true.
  7996. * src/main.cc
  7997. (setSignalHander): Added flags argument.
  7998. (torrentHandler): Just calls TorrentMan::setHalt(true) and returns.
  7999. (main): Set SA_ONESHOT flag of the signal hander of SIGINT and SIGTERM.
  8000. Removed printDownloadAbortMessage() after torrent downloading loop.
  8001. * src/TorrentAutoSaveCommand.cc
  8002. (TorrentAutoSaveCommand): Added the initialization of checkPoint.
  8003. (execute): Returns true if TorrentMan::isHalt() is true.
  8004. The interval check is now done by checkPoint, not SleepCommand.
  8005. * src/TrackerWatcherCommand.cc
  8006. (execute): If TorrentMan::isHalt(), then create a tracker request with
  8007. event=stopped.
  8008. * src/TrackerUpdateCommand.cc
  8009. (prepareForRetry): Do not use SleepCommand here.
  8010. (execute): Returns true if TorrentMan::isHalt() is true.
  8011. Others:
  8012. * src/TorrentMan.cc
  8013. (getMissingPieceIndex): Updated log message.
  8014. * src/PeerInteraction.cc
  8015. (createPeerMessag): Updated log message.
  8016. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8017. To add the ability to download several pieces in mix in a command and
  8018. increase the number of request slots according to request-cancel
  8019. latency:
  8020. * src/PeerInteractionCommand.cc
  8021. (executeInternal): The number of messages to be received at a time
  8022. is increased from 10 to 50.
  8023. * src/LogFactory
  8024. (getInstance): Added NullLogger.
  8025. * src/NullLogger.h: New class.
  8026. * src/BitfieldMan.h
  8027. (getMissingIndex): New function.
  8028. * src/BitfieldMan.cc
  8029. (getMissingIndex): New function.
  8030. * src/TorrentMan.h
  8031. (checkOutPiece): New function.
  8032. (getMissingPieceIndex): New function.
  8033. (getMissingFastPieceIndex): New function.
  8034. (getMissingFastPiece): New function.
  8035. * src/TorrentMan.cc
  8036. (updatePiece): Rewritten using STL.
  8037. (syncPiece): Rewritten using STL.
  8038. (getMissingPiece): Rewritten using getMissingPieceIndex() and
  8039. checkOutPiece().
  8040. (getMissingPieceIndex): New function.
  8041. (getMissingFastPieceIndex): New function.
  8042. (getMissingFastPiece): New function.
  8043. (checkOutPiece): New function.
  8044. * src/PeerInteraction.h
  8045. (Pieces): New type definition.
  8046. (piece): Removed.
  8047. (pieces): New variable.
  8048. (getNewPieceAndSendInterest): Added the "piece" argument.
  8049. (abortPiece): Added the "piece" argument.
  8050. (abortAllPieces): New function.
  8051. (isInRequestSlot): New function.
  8052. (hasDownloadPiece): Added the "index" argument.
  8053. (setDownloadPiece): Removed.
  8054. (getDownloadPiece): Added the "index" argument.
  8055. (updatePiece): New function.
  8056. (createRequestMessage): Added the "index" argument.
  8057. * src/PeerInteraction.cc
  8058. (onChoked): Rewritten.
  8059. (abortPiece): Rewirtten.
  8060. (abortAllPieces): New function.
  8061. (deleteTimeoutRequestSlot): Rewritten.
  8062. Clarified code a little bit.
  8063. (deleteCompletedRequestSlot): Rewritten.
  8064. (isInRequestSlot): New function.
  8065. (syncPiece): Rewritten.
  8066. (updatePiece): New function.
  8067. (getNewPieceAndSendInterest): Rewritten.
  8068. (addRequests): Rewritten.
  8069. (getDownloadPiece): Rewritten.
  8070. (hasDownloadPiece): Rewritten.
  8071. (createRequestMessage): Added the "index" argument.
  8072. * src/common.h
  8073. (BITFIELD_LEN_FROM_PIECES): Enclosed the variable in parentheses.
  8074. (DIV_FLOOR): New definition.
  8075. * src/PieceMessage.cc
  8076. (receivedAction): Update request-piece latency here.
  8077. * src/RequestSlot.h
  8078. (getLatencyInMillis): New function.
  8079. * src/RequestSlot.cc
  8080. (isTimeout): Rewritten using getLatencyInMillis.
  8081. (getLatencyInMillis): New function.
  8082. * src/Piece.h
  8083. (operator==): New function.
  8084. (getMissingBlockIndex): New function.
  8085. * src/Piece.cc
  8086. (operator==): New function.
  8087. (getMissingBlockIndex): New function.
  8088. * src/Peer.h
  8089. (DEFAULT_LATENCY): New definition.
  8090. (latency): New variable.
  8091. (updateLatency): New function.
  8092. (getLatency): New function.
  8093. * src/Peer.cc
  8094. (resetStatus): Reset latecy.
  8095. (updateLatency): New function.
  8096. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8097. * src/SocketCore.cc
  8098. (isReadable): Added secure to the condition.
  8099. * src/HttpConnection.cc
  8100. (receiveResponse): Fixed a bug that causes no response header
  8101. exception.
  8102. * src/Peer.h
  8103. (getFastSet): Fixed the return value type.
  8104. 2006-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8105. To remove a wait from download loop:
  8106. * src/DownloadEngine.cc
  8107. (run): Comment out shortSleep.
  8108. To rewrite the message handling:
  8109. * src/SimplePeerMessage.h: New class.
  8110. * src/SimplePeerMessage.cc: New class.
  8111. * src/CancelMessage.h: Derived from SimplePeerMessage.
  8112. (msg): New variable.
  8113. (create): New function.
  8114. (send): Removed.
  8115. (getMessage): New function.
  8116. (getMessageLength): New function.
  8117. * src/CancelMessage.cc
  8118. (create): New function.
  8119. (receivedAction): Replaced deleteRequestMessageInQueue with
  8120. rejectPieceMessageInQueue.
  8121. (send): Removed.
  8122. (getMessage): New function.
  8123. (getMessageLength): New function.
  8124. * src/BitfieldMessage.h: Derived from SimplePeerMessage.
  8125. (msg): New variable.
  8126. (msgLength): New variable.
  8127. (~BitfieldMessage): Deleted msg.
  8128. (send): Removed.
  8129. (getMessage): New function.
  8130. (getMessageLength): New function.
  8131. * src/BitfieldMessage.cc
  8132. (create): New function.
  8133. (send): Removed.
  8134. (getMessage): New function.
  8135. (getMessageLength): New function.
  8136. * src/ChokeMessage.h: Derived from SimplePeerMessage.
  8137. (msg): New variable.
  8138. (sendPredicate): New function.
  8139. (onSendComplete): New function.
  8140. (send): Removed.
  8141. (getMessage): New function.
  8142. (getMessageLength): New function.
  8143. (create): New function.
  8144. * src/ChokeMessage.cc
  8145. (create): New function.
  8146. (send): Removed.
  8147. (sendPredicate): New function.
  8148. (getMessage): New function.
  8149. (getMessageLength): New function.
  8150. (onSendComplete): New function.
  8151. * src/KeepAliveMessage.h: Derived from SimplePeerMessage.
  8152. (msg): New variable.
  8153. (send): Removed.
  8154. (getMessage): New function.
  8155. (getMessageLength): New function.
  8156. * src/KeepAliveMessage.cc
  8157. (send): Removed.
  8158. (getMessage): New function.
  8159. (getMessageLength): New function.
  8160. * src/PortMessage.h
  8161. (create): New function.
  8162. (receivedAction): Updated log message.
  8163. * src/PortMessage.cc: New file.
  8164. * src/UnchokeMessage.h: Derived from SimplePeerMessage.
  8165. (msg): New variable.
  8166. (sendPredicate): New function.
  8167. (onSendComplete): New function.
  8168. (create): New function.
  8169. (send): Removed.
  8170. (getMessage): New function.
  8171. (getMessageLength): New function.
  8172. * src/UnchokeMessage.cc
  8173. (create): New function.
  8174. (send): Removed.
  8175. (sendPredicate): New function.
  8176. (getMessage): New function.
  8177. (getMessageLength): New function.
  8178. (onSendComplete): New function.
  8179. * src/PieceMessage.h
  8180. (leftPieceDataLength): Removed.
  8181. (leftDataLength): New variable.
  8182. (headerSend): New variable.
  8183. (pendingCount): New variable.
  8184. (msgHeader): New variable.
  8185. (sendPieceData): New function.
  8186. (incrementPendingCount): New function.
  8187. (isPendingCountMax): New function.
  8188. (create): New function.
  8189. (getMessageHeader): New function.
  8190. (getMessageHeaderLength): New function.
  8191. * src/PieceMessage.cc
  8192. (create): New function.
  8193. (getMessageHeader): New function.
  8194. (getMessageHeaderLength): New function.
  8195. (send): Rewritten.
  8196. (sendPieceData): New function.
  8197. * src/HaveMessage.h: Derived from SimplePeerMessage.
  8198. (msg): New variable.
  8199. (create): New function.
  8200. (getMessage): New function.
  8201. (getMessageLength): New function.
  8202. * src/HaveMessage.cc
  8203. (create): New function.
  8204. (send): Removed.
  8205. (sendPieceData): New function.
  8206. (getMessage): New function.
  8207. (getMessageLength): New function.
  8208. * src/RequestMessage.h: Derived from SimplePeerMessage.
  8209. (msg): New variable.
  8210. (create): New function.
  8211. (send): Removed.
  8212. (getMessage): New function.
  8213. (getMessageLength): New function.
  8214. * src/RequestMessage.cc
  8215. (create): New function.
  8216. (receivedAction): Added the handling of fast extension.
  8217. Deleted torrentMan->addUploadLength, torrentMan->addDeltaUploadLength.
  8218. (send): Removed.
  8219. (getMessage): New function.
  8220. (getMessageLength): New function.
  8221. * src/InterestedMessage.h: Derived from SimplePeerMessage.
  8222. (msg): New variable.
  8223. (sendPredicate): New function.
  8224. (onSendComplete): New function.
  8225. (create): New function.
  8226. (getMessage): New function.
  8227. (getMessageLength): New function.
  8228. * src/InterestedMessage.cc
  8229. (create): New function.
  8230. (send): Removed.
  8231. (sendPieceData): New function.
  8232. (getMessage): New function.
  8233. (getMessageLength): New function.
  8234. (onSendComplete): New function.
  8235. * src/NotInterestedMessage.h: Derived from SimplePeerMessage.
  8236. (msg): New variable.
  8237. (sendPieceData): New function.
  8238. (onSendComplete): New function.
  8239. (create): New function.
  8240. (send): Removed.
  8241. (getMessage): New function.
  8242. (getMessageLength): New function.
  8243. * src/NotInterestedMessage.cc
  8244. (create): New function.
  8245. (send): Removed.
  8246. (sendPredicate): New function.
  8247. (getMessage): New function.
  8248. (getMessageLength): New function.
  8249. (onSendComplete): New function.
  8250. * src/AllowedFastMessage.h: New class.
  8251. * src/AllowedFastMessage.cc: New class.
  8252. * src/RejectMessage.h: New class.
  8253. * src/RejectMessage.cc: New class.
  8254. * src/SuggestPieceMessage.h: New class.
  8255. * src/SuggestPieceMessage.cc: New class.
  8256. * src/HaveAllMessage.h: New class.
  8257. * src/HaveAllMessage.cc: New class.
  8258. * src/HaveNoneMessage.h: New class.
  8259. * src/HaveNoneMessage.cc: New class.
  8260. * src/HandshakeMessage.h: Derived from SimplePeerMessage.
  8261. (msg): New variable.
  8262. (reserved): New variable.
  8263. (create): New function.
  8264. (getId): New function.
  8265. (receivedAction): New function.
  8266. (getMessage): New function.
  8267. (getMessageLength): New function.
  8268. (isFastExtensionSupported): New function.
  8269. * src/HandshakeMessage.cc
  8270. (HandshakeMessage): Moved here from HandshakeMessage.h.
  8271. (create): New function.
  8272. (getMessage): New function.
  8273. (getMessageLength): New function.
  8274. (toString): Added the output of reserved field.
  8275. (check): Added const qualifier.
  8276. (isFastExtensionSupported): New function.
  8277. * src/PeerMessageUtil.h
  8278. (createChokeMessage): Removed.
  8279. (createUnchokeMessage): Removed.
  8280. (createInterestedMessage): Removed.
  8281. (createNotInterestedMessage): Removed.
  8282. (createHaveMessage): Removed.
  8283. (createBitfieldMessage): Removed.
  8284. (createRequestMessage): Removed.
  8285. (createCancelMessage): Removed.
  8286. (createPieceMessage): Removed.
  8287. (createPortMessage): Removed.
  8288. (createChokeMessage): Removed.
  8289. (createUnchokeMessage): Removed.
  8290. (createInterestedMessage): Removed.
  8291. (createNotInterestedMessage): Removed.
  8292. (createHaveMessage): Removed.
  8293. (createBitfieldMessage): Removed.
  8294. (createRequestMessage): Removed.
  8295. (createCancelMessage): Removed.
  8296. (createPieceMessage): Removed.
  8297. (createKeepAliveMessage): Removed.
  8298. (createHandshakeMessage): Removed.
  8299. (setIntParam): New function.
  8300. (createPeerMessageString): New function.
  8301. * src/PeerMessageUtil.cc
  8302. (createChokeMessage): Removed.
  8303. (createUnchokeMessage): Removed.
  8304. (createInterestedMessage): Removed.
  8305. (createNotInterestedMessage): Removed.
  8306. (createHaveMessage): Removed.
  8307. (createBitfieldMessage): Removed.
  8308. (createRequestMessage): Removed.
  8309. (createCancelMessage): Removed.
  8310. (createPieceMessage): Removed.
  8311. (createPortMessage): Removed.
  8312. (createRequestMessage): Removed.
  8313. (createCancelMessage): Removed.
  8314. (createPieceMessage): Removed.
  8315. (createHaveMessage): Removed.
  8316. (createChokeMessage): Removed.
  8317. (createUnchokeMessage): Removed.
  8318. (createInterestedMessage): Removed.
  8319. (createNotInterestedMessage): Removed.
  8320. (createBitfieldMessage): Removed.
  8321. (createKeepAliveMessage): Removed.
  8322. (createHandshakeMessage): Removed.
  8323. (setIntParam): New function.
  8324. (createPeerMessageString): New function.
  8325. * src/PeerConnection.h
  8326. (peer): Removed.
  8327. (torrentMan): Removed.
  8328. (createNLengthMessage): Removed.
  8329. (setIntParam): Removed.
  8330. (writeOutgoingMessageLog): Removed all overloaded functions.
  8331. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8332. (sendMessage): New function.
  8333. (sendHandshake): Removed.
  8334. (sendKeepAlive): Removed.
  8335. (sendChoke): Removed.
  8336. (sendUnchoke): Removed.
  8337. (sendInterested): Removed.
  8338. (sendNotInterested): Removed.
  8339. (sendHave): Removed.
  8340. (sendBitfield): Removed.
  8341. (sendRequest): Removed.
  8342. (sendPiece): Removed.
  8343. (sendPieceHeader): Removed.
  8344. (sendPieceData): Removed.
  8345. (sendCancel): Removed.
  8346. (getPeer): Removed.
  8347. * src/PeerConnection.cc
  8348. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8349. (sendHandshake): Removed.
  8350. (sendKeepAlive): Removed.
  8351. (createNLengthMessage): Removed.
  8352. (setIntParam): Removed.
  8353. (writeOutgoingMessageLog): Removed all overloaded functions.
  8354. (sendChoke): Removed.
  8355. (sendUnchoke): Removed.
  8356. (sendInterested): Removed.
  8357. (sendNotInterested): Removed.
  8358. (sendHave): Removed.
  8359. (sendBitfield): Removed.
  8360. (sendRequest): Removed.
  8361. (sendPiece): Removed.
  8362. (sendPieceHeader): Removed.
  8363. (sendPieceData): Removed.
  8364. (sendMessage): New function.
  8365. (sendCancel): Removed.
  8366. * src/PeerInteractionCommand.cc
  8367. (PeerInteractionCommand): Call setUploadLimit.
  8368. (executeInternal): Call setUploadLimit.
  8369. Added the handling of "inProgress" state of handshake message.
  8370. Call sendBitfield() or sendAllowdFast() instead of deprecated
  8371. sendNow().
  8372. (keepAlive): Call addMessage and sendMessage instead of deprecated
  8373. sendNow().
  8374. (beforeSocketCheck): Call addMessage instead of deprecated trySendNow()
  8375. * src/TorrentMan.h
  8376. (PEER_ID_LENGTH): New definition.
  8377. (hasAllPieces): New function.
  8378. * src/TorrentMan.cc
  8379. (getMissingPiece): Added the handling of fast extension.
  8380. (cancelPiece): Call updatePiece().
  8381. (hasAllPieces): New function.
  8382. * src/PeerInteraction.h
  8383. (fastSet): New variable.
  8384. (getNewPieceAndSendInterest): Changed the return type to void.
  8385. (send): Renamed as sendMessages.
  8386. (deleteAllRequestSlot): Removed.
  8387. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8388. (cancelAllRequest): Removed all overloaded functions.
  8389. (deleteAllRequestSlot): Removed.
  8390. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8391. (rejectPieceMessageInQueue): New function.
  8392. (rejectAllPieceMessageInQueue): New function.
  8393. (onChoked): New function.
  8394. (isSendingMessageInProgress): New function.
  8395. (getCorrespondingRequestSlot): Changed its arguments.
  8396. (isInFastSet): New function.
  8397. (addFastSetIndex): New function.
  8398. (addRequests): New function.
  8399. (sendNow): Removed.
  8400. (trySendNow): Removed.
  8401. (sendBitfield): New function.
  8402. (sendAllowdFast): New function.
  8403. (createHaveAllMessage): New function.
  8404. (createHaveNoneMessage): New function.
  8405. (createRejectMessage): New function.
  8406. (createAllowedFastMessage): New function.
  8407. * src/PeerInteraction.cc
  8408. (send): Renamed as sendMessages.
  8409. (sendMessages): New function.
  8410. (MsgPushBack): New class.
  8411. (isSendingMessageInProgress): New function.
  8412. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8413. (rejectAllPieceMessageInQueue): New function.
  8414. Added the handling of fast extension.
  8415. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8416. (rejectPieceMessageInQueue): New function.
  8417. Added the handling of fast extension.
  8418. (deleteRequestSlot): Replaced for loop with std::find.
  8419. (onChoked): New function.
  8420. (deleteAllRequestSlot): Removed.
  8421. (abortPiece): Rewirtten.
  8422. (deleteTimeoutRequestSlot): Updated log messages.
  8423. (getCorrespondingRequestSlot): Changed its arguments.
  8424. (cancelAllRequest): Removed all overloaded functions.
  8425. (receiveHandshake): Added the check to see whether an incoming peer
  8426. supports fast extension.
  8427. (createHandshakeMessage): Use HandshakeMessage::create instead of
  8428. PeerMessageUtil.
  8429. (createPeerMessage): Use create() of each message class instead of
  8430. PeerMessageUtil.
  8431. HaveAllMessage, HaveNoneMessage, RejectMessage, SuggestPieceMessage,
  8432. AllowedFastMessage were added.
  8433. (getNewPieceAndSendInterest): Changed its return value type to void.
  8434. Added the handling of fast extension.
  8435. (addRequests): New function.
  8436. (sendNow): Removed.
  8437. (sendHandshake): Rewritten.
  8438. (trySendNow): Removed.
  8439. (sendBitfield): New function.
  8440. (sendAllowdFast): New function.
  8441. (isInFastSet): New function.
  8442. (addFastSetIndex): New function.
  8443. (createRequestMessage): Use RequestMessage::create instead of
  8444. PeerMessageUtil.
  8445. (createCancelMessage): Use CancelMessage::create instead of
  8446. PeerMessageUtil.
  8447. (createPieceMessage): Use PieceMessage::create instead of
  8448. PeerMessageUtil.
  8449. (createHaveMessage): Use HaveMessage::create instead of
  8450. PeerMessageUtil.
  8451. (createChokeMessage): Use ChokeMessage::create instead of
  8452. PeerMessageUtil.
  8453. (createUnchokeMessage): Use UnchokeMessage::create instead of
  8454. PeerMessageUtil.
  8455. (createInterestedMessage): Use InterestedMessage::create instead of
  8456. PeerMessageUtil.
  8457. (createNotInterestedMessage): Use NotInterestedMessage::create instead
  8458. of PeerMessageUtil.
  8459. (createBitfieldMessage): Use BitfieldMessage::create instead of
  8460. PeerMessageUtil.
  8461. (createKeepAliveMessage): Use KeepAliveMessage::create instead of
  8462. PeerMessageUtil.
  8463. (createHaveAllMessage): New function.
  8464. (createHaveNoneMessage): New function.
  8465. (createRejectMessage): New function.
  8466. (createAllowedFastMessage: New function.
  8467. * src/Util.h
  8468. (sha1Sum): New function.
  8469. (computeFastSet): New function.
  8470. * src/Util.cc
  8471. (sha1Sum): New function.
  8472. (computeFastSet): New function.
  8473. * src/Peer.h
  8474. (fastExtensionEnabled): New variable.
  8475. (fastSet): New variable.
  8476. (setAllBitfield): New function.
  8477. (setFastExtensionEnabled): New function.
  8478. (isFastExtensionEnabled): New function.
  8479. (addFastSetIndex): New function.
  8480. (getFastSet): New function.
  8481. (isInFastSet): New function.
  8482. (countFastSet): New function.
  8483. * src/Peer.cc
  8484. (isInFastSet): New function.
  8485. (addFastSetIndex): New function.
  8486. (setAllBitfield): New function.
  8487. * src/AbstractCommand.cc (execute): Changed the procedure of checking
  8488. sockets.
  8489. * src/PeerAbstractCommand.cc
  8490. (PeerAbstractCommand): Added the initialization for uploadLimitCheck
  8491. and uploadLimit.
  8492. (execute): Changed the procedure of checking sockets. The upload speed
  8493. checking were added.
  8494. (setUploadLimit): New function.
  8495. (setUploadLimitCheck): New function.
  8496. * src/PeerAbstractCommand.h
  8497. (setUploadLimit): New function.
  8498. (setUploadLimitCheck): New function.
  8499. (uploadLimit): New variable.
  8500. (uploadLimitCheck): New variable.
  8501. To contact a tracker regularly:
  8502. * src/TrackerWatcherCommand.h (interval): New variable.
  8503. (checkPoint): New variable.
  8504. (TrackerWatcherCommand): Added interval argument.
  8505. * src/TrackerWatcherCommand.cc
  8506. (TrackerWatcherCommand): Initialized checkPoint.
  8507. (execute): Now a tracker is contacted in every specified period.
  8508. If peer list is not needed, send request with numwant=0.
  8509. * src/TrackerUpdateCommand.cc
  8510. (execute): Updated log messages.
  8511. * src/DownloadEngine.cc
  8512. (~DownloadEngine): Removed two asserts.
  8513. (waitData): Uncommented wfds. May be a bug fix.
  8514. 2006-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8515. * src/PeerInteractionCommand.h
  8516. (checkInactiveConnection): Removed.
  8517. * src/PeerInteractionCommand.cc
  8518. (executeInternal): Removed following function calls:
  8519. detectMessageFlooding(), checkLongTimePeerChoking and
  8520. checkInactiveConnection().
  8521. (checkInactiveConnection): Removed.
  8522. (detectMessageFlooding): Removed function call to
  8523. checkInactiveConnection().
  8524. * src/PeerMessageUtil.h
  8525. (createChokeMessage): New function. Overload.
  8526. (createUnchokeMessage): New function. Overload.
  8527. (createInterestedMessage): New function. Overload.
  8528. (createNotInterestedMessage): New function. Overload.
  8529. (createHaveMessage): New function. Overload.
  8530. (createBitfieldMessage): New function. Overload.
  8531. (createRequestMessage): New function. Overload.
  8532. (createCancelMessage): New function. Overload.
  8533. (createPieceMessage): New function. Overload.
  8534. (createKeepAliveMessage): New function. Overload.
  8535. * src/PeerMessageUtil.cc
  8536. (createChokeMessage): New function. Overload.
  8537. (createUnchokeMessage): New function. Overload.
  8538. (createInterestedMessage): New function. Overload.
  8539. (createNotInterestedMessage): New function. Overload.
  8540. (createHaveMessage): New function. Overload.
  8541. (createBitfieldMessage): New function. Overload.
  8542. (createRequestMessage): New function. Overload.
  8543. (createCancelMessage): New function. Overload.
  8544. (createPieceMessage): New function. Overload.
  8545. (createKeepAliveMessage): New function. Overload.
  8546. * src/SendMessageQueue.cc
  8547. (createRequestMessage): Use PeerMessageUtil.
  8548. (createCancelMessage): Use PeerMessageUtil.
  8549. (createPieceMessage): Use PeerMessageUtil.
  8550. (createHaveMessage): Use PeerMessageUtil.
  8551. (createChokeMessage): Use PeerMessageUtil.
  8552. (createUnchokeMessage): Use PeerMessageUtil.
  8553. (createInterestedMessage): Use PeerMessageUtil.
  8554. (createNotInterestedMessage): Use PeerMessageUtil.
  8555. (createBitfieldMessage): Use PeerMessageUtil.
  8556. (createKeepAliveMessage): Use PeerMessageUtil.
  8557. * src/SendMessageQueue.h: Renamed to PeerInteraction.h
  8558. * src/SendMessageQueue.cc: Renamed to PeerInteraction.cc
  8559. * src/PeerInteraction.h: New class.
  8560. * src/PeerInteraction.cc: New class.
  8561. 2006-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8562. Each peer message has its own class.
  8563. * src/PendingMessages.h: Removed.
  8564. * src/PendingMessages.cc: Removed. The sending process was moved to
  8565. each message class.
  8566. * src/RequestSlotMan.h: Removed.
  8567. * src/RequestSlotMan.cc: Removed. All functionarities were moved to
  8568. SendMessageQueue.
  8569. * src/RequestMessage.h: New class.
  8570. * src/RequestMessage.cc: New class.
  8571. * src/CancelMessage.h: New class.
  8572. * src/CancelMessage.cc: New class.
  8573. * src/BitfieldMessage.h: New class.
  8574. * src/BitfieldMessage.cc: New class.
  8575. * src/ChokeMessage.h: New class.
  8576. * src/ChokeMessage.cc: New class.
  8577. * src/KeepAliveMessage.h: New class.
  8578. * src/KeepAliveMessage.cc: New class.
  8579. * src/PortMessage.h: New class.
  8580. * src/UnchokeMessage.h: New class.
  8581. * src/UnchokeMessage.cc: New class.
  8582. * src/PieceMessage.h: New class.
  8583. * src/PieceMessage.cc: New class.
  8584. * src/HaveMessage.h: New class.
  8585. * src/HaveMessage.cc: New class.
  8586. * src/BitfieldMessage.h: New class.
  8587. * src/BitfieldMessage.cc: New class.
  8588. * src/NotInterestedMessage.h: New class.
  8589. * src/NotInterestedMessage.cc: New class.
  8590. * src/InterestedMessage.h: New class.
  8591. * src/InterestedMessage.cc: New class.
  8592. * src/HandshakeMessage.h (sendMessageQueue): New variable.
  8593. (getSendMessageQueue): New function.
  8594. (setSendMessageQueue): New function.
  8595. * src/HandshakeMessage.cc: New class.
  8596. * src/PeerConnection.h (receiveMessage): Changed return value and
  8597. arguments.
  8598. (receiveHandshake): Changed return value and arguments.
  8599. * src/PeerConnection.cc (receiveMessage): Do not create message class
  8600. here.
  8601. (receiveHandshake): Do not create handshake class here.
  8602. * src/PeerInteractionCommand.h (peerConnection): Removed.
  8603. (piece): Removed.
  8604. (syncPiece): Removed.
  8605. (sendInterest): Removed.
  8606. (sendMessages): Removed.
  8607. (createRequestPendingMessage): Removed.
  8608. (checkPieceHash): Removed.
  8609. (erasePieceOnDisk): Removed.
  8610. (getNewPieceAndSendInterest): Removed.
  8611. (onGotNewPice): Removed.
  8612. (onGotWrongPiece): Removed.
  8613. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  8614. Removed peerConnection, piece.
  8615. (~PeerInteractionCommand): Removed peerConnection.
  8616. (executeInternal): Use sendMessageQueue instead of peerConnection.
  8617. (syncPiece): Moved to SendMessageQueue.
  8618. (decideChoking): Removed PendingMessage.
  8619. (receiveMessage): Use sendMessageQueue instead of peerConnection.
  8620. The action after receiving peer message was moved to each message
  8621. class.
  8622. (onGotNewPice): Moved to SendMessageQueue.
  8623. (onGotWrongPiece): Moved to SendMessageQueue.
  8624. (getNewPieceAndSendInterest): Moved to SendMessageQueue.
  8625. (sendInterest): Moved to SendMessageQueue.
  8626. (createRequestPendingMessage): Removed.
  8627. (sendMessages): Moved to SendMessageQueue.
  8628. (onAbort): Use SendMessageQueue::abortPiece()
  8629. (keepAlive): Use sendMessageQueue instead of peerConnection.
  8630. (beforeSocketCheck): Use sendMessageQueue instead of peerConnection.
  8631. (checkPieceHash): Moved to SendMessageQueue.
  8632. (erasePieceOnDisk): Moved to SendMessageQueue.
  8633. * src/PeerMessageUtil.h
  8634. (createBitfieldMessage): Removed.
  8635. (createHaveMessage): Changed return value and arguments.
  8636. (createBitfieldMessage): Changed return value and arguments.
  8637. (createRequestCancelMessage): Removed.
  8638. (createPieceMessage): Changed return value and arguments.
  8639. (getShortIntParam): New function.
  8640. (checkIndex): Changed arguments.
  8641. (checkBegin): Changed arguments.
  8642. (checkLength): Changed arguments.
  8643. (checkPieceOffset): Removed.
  8644. (checkRange): New function.
  8645. (checkBitfield): Changed arguments.
  8646. (createPeerMessage): Removed.
  8647. (checkIntegrity): Removed.
  8648. (createHandshakeMessage): Changed arguments.
  8649. (createChokeMessage): New function.
  8650. (createUnchokeMessage): New function.
  8651. (createInterestedMessage): New function.
  8652. (createNotInterestedMessage): New function.
  8653. (createRequestMessage): New function.
  8654. (createCancelMessage): New function.
  8655. (createPortMessage): New function.
  8656. * src/PeerMessageUtil.cc
  8657. (createBitfieldMessage): Removed.
  8658. (createHaveMessage): Changed return value and arguments.
  8659. (createBitfieldMessage): Changed return value and arguments.
  8660. (createRequestCancelMessage): Removed.
  8661. (createPieceMessage): Changed return value and arguments.
  8662. (getShortIntParam): New function.
  8663. (checkIndex): Changed arguments.
  8664. (checkBegin): Changed arguments.
  8665. (checkLength): Changed arguments.
  8666. (checkPieceOffset): Removed.
  8667. (checkRange): New function.
  8668. (checkBitfield): Changed arguments.
  8669. (createPeerMessage): Removed.
  8670. (checkIntegrity): Removed.
  8671. (createHandshakeMessage): Changed arguments.
  8672. (createChokeMessage): New function.
  8673. (createUnchokeMessage): New function.
  8674. (createInterestedMessage): New function.
  8675. (createNotInterestedMessage): New function.
  8676. (createRequestMessage): New function.
  8677. (createCancelMessage): New function.
  8678. (createPortMessage): New function.
  8679. * src/PeerMessage.h
  8680. (id): Removed.
  8681. (index): Removed.
  8682. (begin): Removed.
  8683. (length): Removed.
  8684. (bitfield): Removed.
  8685. (bitfieldLength): Removed.
  8686. (block): Removed.
  8687. (blockLength): Removed.
  8688. (inProgress): New variable.
  8689. (cuid): New variable.
  8690. (peer): New variable.
  8691. (sendMessageQueue): New variable.
  8692. (logger): New variable.
  8693. (setBitfield): Removed.
  8694. (getBitfield): Removed.
  8695. (setBlock): Removed.
  8696. (getBlock): Removed.
  8697. (getBitfieldLength): Removed.
  8698. (getBlockLength): Removed.
  8699. (isInProgress): New function.
  8700. (toString): Made pure virtual.
  8701. (check): New function.
  8702. (send): New function.
  8703. (receivedAction): New function.
  8704. (getId): Made pure virtual.
  8705. (setId): Removed.
  8706. (getIndex): Removed.
  8707. (setIndex): Removed.
  8708. (getBegin): Removed.
  8709. (setBegin): Removed.
  8710. (getLength): Removed.
  8711. (setLength): Removed.
  8712. (getCuid): New function.
  8713. (setCuid): New function.
  8714. (getPeer): New function.
  8715. (setPeer): New function.
  8716. (getSendMessageQueue): New function.
  8717. (setSendMessageQueue): New function.
  8718. (ID): Removed.
  8719. * src/PeerMessage.cc
  8720. (setBitfield): Removed.
  8721. (setBlock): Removed.
  8722. (toString): Removed.
  8723. * src/TorrentMan.h
  8724. (getPieceLength): New function.
  8725. (getPieceLength): New function.
  8726. * src/SendMessageQueue.h
  8727. (REQUEST_TIME_OUT): New definition.
  8728. (RequestSlots): New definition.
  8729. (MessageQueue): New definition.
  8730. (requestSlotMan): Removed.
  8731. (pendingMessages): Removed.
  8732. (requestSlots): New variable.
  8733. (messageQueue): New variable.
  8734. (torrentMan): New variable.
  8735. (peerConnection): New variable.
  8736. (peer): New variable.
  8737. (piece): New variable.
  8738. (getNewPieceAndSendInterest): New function.
  8739. (createPeerMessage): New function.
  8740. (createHandshakeMessage): New function.
  8741. (send): Made private.
  8742. (setPeerMessageCommonProperty): New function.
  8743. (deleteAllRequestSlot): New function.
  8744. (deleteRequestMessageInQueue): New function.
  8745. (cancelAllRequest): Made private.
  8746. (cancelAllRequest): Made private.
  8747. (countRequestSlot): Made private.
  8748. (addPendingMessage): Removed.
  8749. (deletePendingPieceMessage): Removed.
  8750. (deletePendingRequestMessage): Removed.
  8751. (addMessage): New function.
  8752. (deletePieceMessageInQueue): New function.
  8753. (deleteTimeoutRequestSlot): Changed argument.
  8754. (deleteCompletedRequestSlot): Changed argument.
  8755. (getCorrespoindingRequestSlot): Renamed to getCorrespondingRequestSlot.
  8756. (getCorrespondingRequestSlot): New function.
  8757. (countPendingMessage): Removed.
  8758. (countMessageInQueue): New function.
  8759. (getTorrentMan): New function.
  8760. (getPeerConnection): New function.
  8761. (hasDownloadPiece): New function.
  8762. (getDownloadPiece): New function.
  8763. (setDownloadPiece): New function.
  8764. (syncPiece): New function.
  8765. (sendMessages): New function.
  8766. (sendNow): New function.
  8767. (trySendNow): New function.
  8768. (abortPiece): New function.
  8769. (sendHandshake): New function.
  8770. (receiveMessage): New function.
  8771. (receiveHandshake): New function.
  8772. (createRequestMessage): New function.
  8773. (createCancelMessage): New function.
  8774. (createPieceMessage): New function.
  8775. (createHaveMessage): New function.
  8776. (createChokeMessage): New function.
  8777. (createUnchokeMessage): New function.
  8778. (createInterestedMessage): New function.
  8779. (createNotInterestedMessage): New function.
  8780. (createBitfieldMessage): New function.
  8781. (createKeepAliveMessage): New function.
  8782. * src/SendMessageQueue.cc
  8783. (SendMessageQueue): Removed requestSlotMan.
  8784. Instantiated peerConnection here.
  8785. (~SendMessageQueue): Removed requestSlotMan.
  8786. Added deletion of peerConnection and the contents of messageQueue.
  8787. (send): Updated according to the change of messageQueue.
  8788. (addPendingMessage): Renamed to addMessage.
  8789. (addMessage): New function.
  8790. (deletePendingPieceMessage): Renamed to deletePieceMessageInQueue.
  8791. (deletePieceMessageInQueue): New function.
  8792. (deletePendingRequestMessage): Renamed to deleteRequestMessageInQueue.
  8793. (deleteRequestMessageInQueue): New function.
  8794. (deleteRequestSlot): RequestSlotMan::deleteRequestSlot(...) was moved
  8795. here.
  8796. (deleteTimeoutRequestSlot): RequestSlotMan::deleteTimeoutRequestSlot
  8797. (...) was moved here.
  8798. (deleteAllRequestSlot): RequestSlotMan::deleteAllRequestSlot(...) was
  8799. moved here.
  8800. (deleteCompletedRequestSlot):
  8801. RequestSlotMan::deleteCompletedRequestSlot(...) was moved here.
  8802. (getCorrespondingRequestSlot):
  8803. RequestSlotMan::getCorrespoindingRequestSlot(...) was moved here.
  8804. And renamed to getCorrespondingRequestSlot, correcting a typo.
  8805. (countPendingMessage): Renamed to countMessageInQueue.
  8806. (countMessageInQueue): New function.
  8807. (countRequestSlot): RequestSlotMan::countRequestSlot() was moved here.
  8808. (receiveHandshake): New function.
  8809. (createHandshakeMessage): New function.
  8810. (receiveMessage): New function.
  8811. (createPeerMessage): New function.
  8812. (syncPiece): New function.
  8813. (getNewPieceAndSendInterest): New function.
  8814. (sendMessages): New function.
  8815. (sendNow): New function.
  8816. (trySendNow): New function.
  8817. (sendHandshake): New function.
  8818. (abortPiece): New function.
  8819. (getDownloadPiece): New function.
  8820. (getPeerMessageCommonProperty): New function.
  8821. (createRequestMessage): New function.
  8822. (createCancelMessage): New function.
  8823. (createPieceMessage): New function.
  8824. (createHaveMessage): New function.
  8825. (createChokeMessage): New function.
  8826. (createUnchokeMessage): New function.
  8827. (createInterestedMessage): New function.
  8828. (createNotInterestedMessage): New function.
  8829. (createBitfieldMessage): New function.
  8830. (createKeepAliveMessage): New function.
  8831. To add simple Content-Disposition support:
  8832. * src/HttpResponseCommand.h (determinFilename): New function.
  8833. * src/HttpResponseCommand.cc (executeInternal):
  8834. Use determinFilename(headers) instead of req->getFile() when comparing
  8835. filename.
  8836. (determinFilename): New function.
  8837. (handleDefaultEncoding): Use determinFilename(headers) instead of
  8838. req->getFile().
  8839. (handleOtherEncoding): Use determinFilename(headers) instead of
  8840. req->getFile().
  8841. * src/Util.h (getContentDispositionFilename): New function.
  8842. * src/Util.cc (getContentDispositionFilename): New function.
  8843. * src/LogFactory.h (release): New function.
  8844. * src/LogFactory.cc (release): New function.
  8845. To fix a bug that causes out-of-bound exception when HTTP status
  8846. line is wrong:
  8847. * src/HttpConnection.cc (receiveResponse): Added a check for header
  8848. size.
  8849. * src/common.h (Deleter): New class.
  8850. * src/SegmentMan.cc
  8851. (~SegmentMan): Added deletion of splitter and diskWriter.
  8852. * src/DownloadEngine.h
  8853. (Commands): Use deque.
  8854. (clearQueue): New function.
  8855. * src/DownloadEngine.cc
  8856. (~DownloadEngine): Added deletion of segmentMan.
  8857. (cleanQueue): New function.
  8858. * src/TorrentDownloadEngine.h
  8859. (TorrentDownloadEngine): The implementation was moved to
  8860. TorrentDownloadEngine.cc.
  8861. (~TorrentDownloadEngine): The implementation was moved to
  8862. TorrentDownloadEngine.cc.
  8863. * src/TorrentDownloadEngine.cc
  8864. (~TorrentDownloadEngine): Added deletion of torrentMan.
  8865. * src/main.cc
  8866. (clearRequest): Removed.
  8867. (handler): Added deletion of e.
  8868. (torrentHandler): Added deletion of te.
  8869. (main): Do not share splitter.
  8870. Use Deleter instead of clearRequest.
  8871. Deletion of classes were updated.
  8872. 2006-05-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8873. * src/main.cc (main): Fixed typo.
  8874. * src/message.h: Fixed typo.
  8875. * po/de.po: Added German translation, thanks to Hermann J. Beckers.
  8876. 2006-04-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8877. To add --select-file command-line option:
  8878. * src/Util.cc
  8879. (unfoldRange): New function.
  8880. (getNum): New function.
  8881. (unfoldSubRange): New function
  8882. * src/main.cc
  8883. (showUsage): Added help message.
  8884. (main): Added --select-file command-line option. Updated the layout of
  8885. file listing.
  8886. * src/common.h
  8887. (Integers): New definition.
  8888. * src/SocketCore.cc
  8889. (writeData): Removed timeout argument.
  8890. (readData): Removed timeout argument.
  8891. (peekData): Removed timeout argument.
  8892. * src/Socket.cc
  8893. (writeData): Removed timeout argument.
  8894. (readData): Removed timeout argument.
  8895. (peekData): Removed timeout argument.
  8896. * Release 0.4.1
  8897. 2006-04-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8898. To deploy upload rate based choking algorithm:
  8899. * src/PeerInteractionCommand.cc
  8900. (PeerInteractionCommand): Add peer to TorrentMan::activePeers to track
  8901. peer currently used.
  8902. (decideChoking): Deleted the choke/unchoke decision algorithm when
  8903. download completes. Simplified.
  8904. (receiveMessage): Updated.
  8905. * src/TorrentMan.h
  8906. (activePeers): New variable.
  8907. (addActivePeer): New function.
  8908. (getActivePeers): New function.
  8909. (deleteActivePeer): New function.
  8910. * src/TorrentMan.cc
  8911. (addPeer): deleteOldErrorPeers is moved to the begining of the function
  8912. * src/PeerAbstractCommand.cc
  8913. (onAbort): Use peer->resetStatus().
  8914. * src/main.cc
  8915. (PeerChokeCommand.h): Included.
  8916. (main): Added the instance of ChokingCommand to the command queue.
  8917. * src/Peer.h
  8918. (amChoking): Renamed from amChocking
  8919. (chokingRequired): New variable.
  8920. (optUnchoking): New variable.
  8921. (deltaUpload): New variable.
  8922. (deltaDownload): New variable.
  8923. (addDeltaUpload): New function.
  8924. (resetDeltaUpload): New function.
  8925. (addDeltaDownload): New function.
  8926. (resetDeltaDownload): New function.
  8927. (addPeerUpload): Added a call to addDeltaUpload.
  8928. (addPeerDownload): Added a call to addDeltaDownload.
  8929. * src/Peer.cc
  8930. (shouldBeChoking): Renamed from shouldChoke.
  8931. (resetStatus): New function.
  8932. * src/PeerChokeCommand.h: New class.
  8933. * src/PeerChokeCommand.cc: New class.
  8934. To add lazy upload speed limiter:
  8935. * src/TorrentConsoleDownloadEngine.h: Moved the variables for
  8936. statistics calculation to TorrentDownloadEngine.
  8937. * src/TorrentConsoleDownloadEngine.cc
  8938. (sendStatistics): Renamed from printStatistics.
  8939. (initStatistics): Removed. Moved to TorrentDownloadEngine.
  8940. (calculateSpeed): Removed. Moved to TorrentDownloadEngine.
  8941. (calculateStatistics): Removed. Moved to TorrentDownloadEngine.
  8942. * src/TorrentDownloadEngine.h: Added the variables for statistics
  8943. calculation.
  8944. (sendStatistics): New function as pure virtual function.
  8945. (getUploadSpeed): New function.
  8946. * src/TorrentDownloadEngine.cc
  8947. (initStatistics): New function.
  8948. (calculateSpeed): New function.
  8949. (calculateStatistics): New function.
  8950. * src/SendMessageQueue.h
  8951. (uploadLength): New variable.
  8952. (send): Added an argument.
  8953. (setUploadLimit): New function.
  8954. (getUploadLimit): New function.
  8955. * src/SendMessageQueue.cc
  8956. (send): Added upload speed limiter.
  8957. * src/prefs.h
  8958. (PREF_UPLOAD_LIMIT): New definition.
  8959. * src/PeerInteractionCommand.cc
  8960. (PeerInteractionCommand): Set upload speed limit to sendMessageQueue.
  8961. * src/main.cc
  8962. (main): Added --upload-limit option
  8963. For bug fixes:
  8964. * src/main.cc
  8965. (showUsage): Corrected --listen-port help
  8966. Other changes:
  8967. * src/TorrentMan.cc
  8968. (getPeer): Return nullPeer if connection is grather than
  8969. MAX_PEER_UPDATE(15) in order to leave space for incoming peers.
  8970. 2006-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8971. To add some useful information to the exception message:
  8972. * src/SocketCore.cc : Updated messages.
  8973. * src/SegmentMan.cc :
  8974. * src/TorrentMan.cc : Updated messages.
  8975. * src/MultiDiskWriter.cc : Updated messages.
  8976. * src/Util.cc : Updated messages.
  8977. * src/AbstractDiskWriter.cc : Updated messages.
  8978. * src/PreAllocationDiskWriter.cc : Updated messages.
  8979. * src/message.cc : Added new messages. Updated some messages.
  8980. * src/TrackerWatcherCommand.h (MIN_PEERS): New definition.
  8981. * src/TrackerWatcherCommand.cc (execute): Use MIN_PEERS.
  8982. Updated threshold from 30 to 15.
  8983. * src/AbstractDiskWriter.h (filename): New variable.
  8984. * src/AbstractDiskWriter.cc (openExistingFile): Assigned filename.
  8985. (createFile): Assigned filename.
  8986. * src/main.cc: Updated the help message for http-auth-scheme.
  8987. * Release 0.4.0
  8988. 2006-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8989. To add TrackerUpdateCommand with which replaces
  8990. CompactTrackerResponseProcessor:
  8991. * src/TrackerWatcherCommand.h (req): Removed.
  8992. * src/TrackerWatcherCommand.cc (execute): Send a request to tracker
  8993. if the number of peer connections are less than 30.
  8994. * src/ByteArrayDiskWriter.h (readData): Implemented.
  8995. * src/SegmentMan.h (diskWriter): New function.
  8996. * src/SegmentMan.cc (init): Added a call to diskWriter->closeFile()
  8997. * src/main.cc : Removed #include "CompactTrackerResponseProcessor.h"
  8998. (main): Use TrackerUpdateCommand.
  8999. * src/TorrentMan.h (CompactTrackerResponseProcessor): Removed.
  9000. (req): New variable.
  9001. (setTrackerResponseProcessor): Removed.
  9002. (getTrackerResponseProcessor): Removed.
  9003. (processTrackerResponse): Removed.
  9004. * src/DownloadEngine.h (diskWriter): Removed.
  9005. * src/TorrentDownloadEngine.cc (afterEachIteration): Removed a call
  9006. to torrentMan->processTrackerResponse().
  9007. To add Util::expandBuffer:
  9008. * src/ByteArrayDiskWriter.h (expandBuffer): Removed.
  9009. * src/ByteArrayDiskWriter.cc (writeData): Use Util::expandBuffer().
  9010. * src/Util.h (expandBuffer): New function.
  9011. To fix the bug that causes segmentation fault when "-l ." is specified
  9012. in command-line option:
  9013. * src/SimpleLogger.h (SimpleLogger): Removed "filename" argument.
  9014. (openFile): New function.
  9015. (closeFile): New function.
  9016. * src/SimpleLogger.cc (SimpleLogger): Removed fopen.
  9017. (~SimpleLogger): Call closeFile();
  9018. * src/LogFactory.cc (getInstance): Added a call to slogger->openFile().
  9019. * src/main.cc (main): Added a check to see logger is configured
  9020. properly.
  9021. To enable HTTP authentication without specifying "--http-auth-scheme"
  9022. * src/prefs.h (PREF_HTTP_AUTH_ENABLED): New definition.
  9023. * src/HttpConnection.cc (createRequest): Send Authorization header
  9024. if PREF_HTTP_AUTH_ENABLED == V_TRUE.
  9025. * src/main.cc (main): Preset PREF_HTTP_AUTH_SCHEME to V_TRUE
  9026. If "--http-user" is specified, set PREF_HTTP_AUTH_ENABLED to V_TRUE
  9027. * src/Peer.cc (shouldChoke): Updated algorithm.
  9028. * src/message.h (EX_AUTH_FAILED): New definition.
  9029. (EX_FILE_OPEN): New definition.
  9030. * src/HttpResponseCommand.cc (checkResponse): Throw DlAbortEx
  9031. if status == 401.
  9032. (handleDefaultEncoding): Added a call to diskWriter->initAndOpenFile()
  9033. if req->isTorrent == true.
  9034. * src/main.cc (handler): Removed the check to see e->diskWriter != NULL
  9035. (torrentHandler): Removed the check to see diskAdaptor != NULL.
  9036. * src/AbstractDiskWriter.cc (openExistingFile): Updated messsage.
  9037. (createFile): Updated message.
  9038. 2006-04-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9039. To add a readout of estimated remaining time to normal HTTP/FTP
  9040. downloads:
  9041. * src/ConsoleDownloadEngine.h (startup): New variable.
  9042. (startupLength): New variable.
  9043. (isStartupLengthSet): New variable.
  9044. (avgSpeed): New variable.
  9045. (eta): New variable.
  9046. * src/ConsoleDownloadEngine.cc (sendStatistics): Added a readout of
  9047. estimated remaining time.
  9048. (initStatistics): Initialized newly added variables.
  9049. (calculateStatistics): Calculate average speed and estimated remaining
  9050. time.
  9051. To decouple TorrentDownloadEngine from HttpResponseCommand:
  9052. * src/TrackerDownloadCommand.h: Removed.
  9053. * src/TrackerDownloadCommand.cc: Removed.
  9054. * src/TrackerInitCommand.h: Removed.
  9055. * src/TrackerInitCommand.cc: Removed.
  9056. * src/TrackerUpdateCommand.h: Removed.
  9057. * src/TrackerUpdateCommand.cc: Removed.
  9058. * src/TrackerWatcherCommand.cc (execute): The construction of request
  9059. url written in TrackerInitCommand was moved here. Do not create
  9060. tracker request command if torrentMan->trackers != 0.
  9061. * src/CompactTrackerResponseProcessor.h: New class.
  9062. * src/CompactTrackerResponseProcessor.cc: New class.
  9063. * src/message.h (MSG_TRACKER_WARNING_MESSAGE): Updated.
  9064. * src/HttpResponseCommand.cc (createHttpDownloadCommand):
  9065. Decoupled TorrentDownloadEngine from this.
  9066. * src/SegmentMan.h (init): New function.
  9067. * src/SegmentMan.cc (init): New function.
  9068. * src/TorrentMan.h (responseProcessor): New variable.
  9069. (trackers): New variable.
  9070. (setTrackerResponseProcessor): New function.
  9071. (getTrackerResponseProcessor): New function.
  9072. (processTrackerResponse): New function.
  9073. * src/TorrentMan.cc (Constructor): Initialized new variable trackers.
  9074. (processTrackerResponse): New function.
  9075. * src/main.cc (main): Use ByteArrayDiskWriter and
  9076. CompactTrackerResponseProcessor.
  9077. * src/TorrentDownloadEngine.cc (afterEachIteration): Call torrentMan->
  9078. processTrackerResponse().
  9079. * src/TorrentConsoleDownloadEngine.cc (printStatistics): Updated a
  9080. readout.
  9081. * src/TorrentDownloadEngine.cc (afterEachIteration): Added log message
  9082. which indicates download has completed.
  9083. * src/AbstractDiskWriter.cc (Destructor): fd >= 0, not fd >0
  9084. (closeFile): fd >= 0, not fd > 0
  9085. * src/main.cc (main): Added short cut for show-files.
  9086. Added short cut for torrent-file.
  9087. Added new command-line option listen-port.
  9088. Updated i18n messages.
  9089. 2006-04-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9090. To add LogFactory which creates singleton logger:
  9091. * src/LogFactory.h: New class.
  9092. * src/LogFactory.cc: New class.
  9093. * src/Command.h (logger): New variable.
  9094. (Constructor): Use LogFactory.
  9095. * src/AbstractCommand.cc: Use Command::logger
  9096. * src/PeerConnection.cc (Constructor): Deleted the argument logger.
  9097. Use LogFactory.
  9098. * src/SegmentSplitter.h : Made logger protected.
  9099. * src/SegmentSplitter.cc (Constructor): Use LogFactory.
  9100. * src/SegmentMan.cc (Constructor): Use LogFactory.
  9101. * src/DownloadEngine.h : Made logger protected.
  9102. * src/DownloadEngine.cc (Constructor): Use LogFactory.
  9103. * src/PeerInteractionCommand.cc : Use Command::logger.
  9104. * src/HttpResponseCommand.cc : Use Command::logger.
  9105. * src/SegmentMan.h : Made logger private.
  9106. * src/TorrentMan.h : Made logger private.
  9107. * src/TorrentMan.cc : Use LogFactory.
  9108. * src/FtpNegotiateCommand.cc : Use Command::logger.
  9109. * src/HttpConnection.h (Constructor): Deleted the argument logger.
  9110. * src/HttpConnection.cc (Constructor): Deleted the argument logger.
  9111. Use LogFactory.
  9112. * src/FtpConnection.h (Constructor): Deleted the argument logger.
  9113. * src/FtpConnection.cc (Constructor): Deleted the argument logger.
  9114. Use LogFactory.
  9115. * src/DownloadCommand.cc : Use Command::logger.
  9116. * src/PeerAbstractCommand.cc : Use Command::logger.
  9117. * src/PeerListenCommand.cc : Use Command::logger.
  9118. * src/PeerInitiateConnectionCommand.cc : Use Command::logger.
  9119. * src/HttpInitiateConnectionCommand.cc : Use Command::logger.
  9120. * src/FtpInitiateConnectionCommand.cc : Use Command::logger.
  9121. * src/TrackerWatcherCommand.cc : Use Command::logger.
  9122. * src/TrackerUpdateCommand.cc : Use Command::logger.
  9123. * src/TrackerDownloadCommand.cc : Use Command::logger.
  9124. * src/RequestSlotMan.cc (Constructor): Deleted the argument logger.
  9125. Use LogFactory.
  9126. * src/SendMessageQueue.h (Constructor): Deleted the argument logger.
  9127. * src/SendMessageQueue.cc (Constructor): Deleted the argument logger.
  9128. Use LogFactory.
  9129. * src/main.cc (main): Use LogFactory.
  9130. * src/DiskAdaptor.h (logger): New variable.
  9131. * src/DiskAdaptor.cc (Constructor): Use LogFactory.
  9132. * src/CopyDiskAdaptor.cc (fixFilename): Added a log message.
  9133. 2006-04-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9134. * src/TrackerInitCommand.cc (TrackerInitCommand): Added a "key"
  9135. parameter to a tracker request.
  9136. * src/TorrentMan.cc (readFileEntryFromMetaInfoFile): Bug fix.
  9137. * src/TrackerWatcherCommand.cc (execute): Call req->resetTryCount().
  9138. * src/main.cc (setSignalHander): New function.
  9139. (main): Added a handler for SIGTERM.
  9140. (handler): Updated message.
  9141. (torrentHandler): Updated message.
  9142. 2006-04-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9143. * src/TorrentConsoleDownloadEngine.cc
  9144. (onPartialDownloadingCompletes): Renamed as
  9145. onSelectiveDownloadingCompletes.
  9146. (onSelectiveDownloadingCompletes): Updated message.
  9147. To add DiskAdaptor which abstract DiskWriter family:
  9148. * src/PeerConnection.cc: Use diskAdaptor instead of diskWriter.
  9149. * src/PeerInteractionCommand.cc: Use diskAdaptor instead of diskWriter.
  9150. * src/BitfieldMan.cc (isAllBitSet): bug fix.
  9151. * src/TorrentMan.cc : Included CopyDiskAdaptor.h, DirectDiskAdaptor.h,
  9152. MultiDiskAdaptor.h.
  9153. (readFileEntry): Changed its arguments.
  9154. (setup): setupDiskWriter is merged into this function.
  9155. (setupDiskWriter): Removed.
  9156. (setFileFilter): New function.
  9157. (readFileEntryFromMetaInfoFile): Updated according to the changes
  9158. made in readFileEntry.
  9159. (getFilePath): Removed.
  9160. (getTempFilePath): Removed.
  9161. (getSegmentFilePath): Updated due to the removal of getFilePath.
  9162. (fixFilename): Removed.
  9163. (copySingleFile): Removed.
  9164. (splitMultiFile): Removed.
  9165. (deleteTempFile): Removed.
  9166. (setFileEntriesToDownload): Removed.
  9167. (isPartialDownloadingMode): Renamed as isSelectiveDownloadingMode.
  9168. (isSelectiveDownloadingMode): New function.
  9169. (setAllMultiFileRequestedState): Removed.
  9170. (finishPartialDownloadingMode): Renamed as
  9171. finishSelectiveDownloadingMode.
  9172. (finishSelectiveDownloadingMode): New function.
  9173. (getPartialTotalLength): Renamed as getSelectedTotalLength.
  9174. (getSelectedTotalLength): New function.
  9175. (onDownloadComplete): Use diskAdaptor.
  9176. * src/MultiDiskWriter.cc (Constructor): Added the argument pieceLength
  9177. (Range): Removed.
  9178. (setMultiFileEntries): Renamed as setFileEntries.
  9179. (setFileEntries): New function.
  9180. * src/MultiDiskWriter.h [DiskWriterEntry](enabled): Removed.
  9181. (pieceLength): New variable.
  9182. * src/main.cc (printDownloadCompeleteMessage): New function.
  9183. (torrentHandler): Use diskAdaptor instead of diskWriter.
  9184. (main): Renamed torrent-show-files to show-files.
  9185. Rewritten file contents listing.
  9186. * src/TorrentMan.h (FileEntry): Removed.
  9187. (multiFileTopDir): Removed.
  9188. (multiFileEntries): Removed.
  9189. (diskWriter): Removed.
  9190. (diskAdaptor): New variable.
  9191. * src/DefaultDiskWriter.h (totalLength): New variable.
  9192. * src/DefaultDiskWriter.cc (initAndOpenFile): Added ftruncate.
  9193. * src/TorrentDownloadEngine.cc (onEndOfRun): Use diskAdaptor instead of
  9194. diskWriter.
  9195. * src/TorrentConsoleDownloadEngine.h
  9196. (partialDownloadLengthDiff): Renamed as selectedDownloadLengthDiff.
  9197. (partialTotalLength): Renamed as selectedTotalLength.
  9198. * src/AbstractDiskWriter.cc (openFile): If file exists, call
  9199. openExistingFile, otherwise call initAndOpenFile.
  9200. (closeFile): fd > 0, not fd != 0.
  9201. * src/DirectDiskAdaptor.h: New class.
  9202. * src/DirectDiskAdaptor.cc: New class.
  9203. * src/MultiDiskAdaptor.h: New class.
  9204. * src/MultiDiskAdaptor.cc: New class.
  9205. * src/CopyDiskAdaptor.h: New class.
  9206. * src/CopyDiskAdaptor.cc: New class.
  9207. * src/DiskAdaptor.h: New class.
  9208. * src/DiskAdaptor.cc: New class.
  9209. * src/prefs.h (PREF_TORRENT_SHOW_FILES): Renamed as PREF_SHOW_FILES
  9210. (PREF_SHOW_FILES): New definition.
  9211. 2006-04-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9212. To add the ability to download multi torrent into respective files
  9213. directly:
  9214. * src/DiskWriter.h (openFile): New function.
  9215. (seek): Removed.
  9216. * src/MultiDiskWriter.h: New class.
  9217. * src/MultiDiskWriter.cc: New class.
  9218. * src/AbstractDiskWriter.h (seek): Changed its scope from public to
  9219. protected.
  9220. (openFile): New function.
  9221. * src/AbstractDiskWriter.cc (openFile): New function.
  9222. * src/prefs.h (V_FALSE): New definition.
  9223. (PREF_DIRECT_FILE_MAPPING): New definition.
  9224. * src/TorrentMan.h (setupDiskWriter): New function.
  9225. (setAllMultiFileRequestedState): New function.
  9226. (onDownloadComplete): New function.
  9227. * src/TorrentMan.cc : Included MultiDiskWriter.h
  9228. (setupDiskWriter): New function.
  9229. (getFilePath): Updated.
  9230. (getTempFilePath): Updated.
  9231. (getSegmentFilePath): Updated.
  9232. (fixFilename): Updated.
  9233. (deleteTempFile): Updated.
  9234. (setAllMultiFileRequestedState): New function.
  9235. (setFileEntriesToDownload): Use setAllMultiFileRequestedState().
  9236. (finishPartialDownloadingMode): Reset requested flags.
  9237. (onDownloadComplete): New function.
  9238. * src/main.cc: Added --direct-file-mapping option.
  9239. Use TorrentMan::setupDiskWriter().
  9240. * src/TorrentDownloadEngine.cc (afterEachIteration): Use TorrentMan::
  9241. onDownloadComplete().
  9242. To fix ETA bug:
  9243. * src/Util.h (difftvsec): New function.
  9244. * src/Util.cc (difftvsec): New function.
  9245. * src/TorrentConsoleDownloadEngine.cc (calculateSpeed): Use int for the
  9246. type of "elapsed" instead of long long int.
  9247. (calculateStatistics): Use Util::difftvsec instead of Util::difftv.
  9248. The updates of statistics takes place every 1 seconds.
  9249. * src/TorrentConsoleDownloadEngine.h (lastElapsed): Changed its type.
  9250. (calculateSpeed): Changed its argument signature.
  9251. * src/PeerMessage.cc (toString): Fixed message.
  9252. 2006-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9253. To print ETA:
  9254. * src/TorrentDownloadEngine.cc (afterEachIteration): Added download
  9255. completion handling when dealing with
  9256. TorrentMan::isPartialDownloadingMode() == true.
  9257. * src/TorrentDownloadEngine.h (onPartialDownloadingCompletes):
  9258. New function.
  9259. * src/TorrentConsoleDownloadEngine.h (startup): New variable.
  9260. (sessionDownloadLength): New variable.
  9261. (avgSpeed): New variable.
  9262. (eta): New variable.
  9263. * src/TorrentConsoleDownloadEngine.cc (initStatistics): Initialized
  9264. new variables: eta, avgSpeed, startup.
  9265. (calculateSpeed): Calculate average speed and ETA.
  9266. (printStatistics): Added ETA.
  9267. * src/Util.h (secfmt): New function.
  9268. * src/Util.cc (secfmt): New function.
  9269. 2006-04-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9270. To detect "keep alive" flooding:
  9271. * src/PeerInteractionCommand.h (keepAliveCount): New variable
  9272. * src/PeerInteractionCommand.cc (Constructor): Initialized new
  9273. variable: keepAliveCount.
  9274. (detectMessageFlooding): Added "keep alive" flooding detection.
  9275. (receiveMessage): Increase keepAliveCount when "keep alive" message
  9276. received.
  9277. To add the ability to download only specified files in multi-file
  9278. torrent:
  9279. * src/BitfieldMan.h (filterBitfield): New variable.
  9280. (filterEnabled): New variable.
  9281. (setFilterBit): New function.
  9282. (enableFilter): New function.
  9283. (disableFilter): New function.
  9284. (isFilterEnabled): New function.
  9285. (getFilteredTotalLength): New function.
  9286. (getCompletedLength): New function.
  9287. * src/BitfieldMan.cc (Constructor): Initialized new variable:
  9288. filterBitfield, filterEnabled.
  9289. (CopyConstructor): Added filterBitfield and filterEnabled.
  9290. (operator==): Added filterBitfield and filterEnabled.
  9291. (Destructor): Added filterBitfield.
  9292. (getMissingIndex): Use filterBitfield.
  9293. (getMissingUnusedIndex): Use filterBitfield.
  9294. (getFirstMissingUnusedIndex): Use filterBitfield.
  9295. (getFirstMissingUnusedIndex): Use filterBitfield.
  9296. (getAllMissingIndexes): Use filterBitfield.
  9297. (countMissingBlock): Use filterBitfield.
  9298. (countBlock): Use filterBitfield.
  9299. (setBitInternal): Added new argument on.
  9300. (setUseBit): Use setBitInternal.
  9301. (unsetUseBit): Use setBitInternal.
  9302. (setBit): Use setBitInternal.
  9303. (unsetBit): Use setBitInternal.
  9304. (isAllBitSet): Use filterBitfield.
  9305. (setFilterBit): New function.
  9306. (addFilter): New function.
  9307. (enableFilter): New function.
  9308. (disableFilter): New function.
  9309. (clearFilter): New function.
  9310. (isFilterEnabled): New function.
  9311. (getFilteredTotalLength): New function.
  9312. (getCompletedLength): New function.
  9313. * src/TorrentMan.h [FileEntry](Constructor): Updated signature.
  9314. Initalized newly added variables.
  9315. [FileEntry](offset): New variable.
  9316. [FileEntry](extracted): New variable.
  9317. [FileEntry](requested): New variable.
  9318. (readFileEntry): New function.
  9319. (option): New variable.
  9320. (splitMultiFile): Removed const qualifier.
  9321. (fixFilename): Removed const qualifier.
  9322. (readFileEntryFromMetaInfoFile): New function.
  9323. (finishPartialDownloadingMode): New function.
  9324. (isPartialDownloadingMode): New function.
  9325. (setFileEntriesToDownload): New function.
  9326. (getCompletedLength): New function.
  9327. (getPartialTotalLength): New function.
  9328. * src/TorrentMan.cc (readFileEntry): New function.
  9329. (setup): Use readFileEntry. If no-preallocation option is specified,
  9330. use DefaultDiskWriter.
  9331. (readFileEntryFromMetaInfoFile): New function.
  9332. (fixFilename): Removed const qualifier.
  9333. (splitMultiFile): Removed const qualifier.
  9334. (setFileEntriesToDownload): New function.
  9335. (isPartialDownloadingMode): New function.
  9336. (finishPartialDownloadingMode): New function.
  9337. (getCompletedLength): New function.
  9338. (getPartialTotalLength): New function.
  9339. * src/TorrentConsoleDownloadEngine.h (partialDownloadLengthDiff):
  9340. New variable.
  9341. (partialTotalLength): New variable.
  9342. (downloadLength): New variable.
  9343. (totalLength): New variable.
  9344. * src/TorrentConsoleDownloadEngine.cc (onPartialDownloadingCompletes):
  9345. Added log.
  9346. (initStatistics): Initialized new variables: partialDownloadLengthDiff,
  9347. partialTotalLength, downloadLength, totalLength.
  9348. (calculate): Calculate downloadLength and totalLength.
  9349. * src/prefs.h :New definition PREF_NO_PREALLOCATION
  9350. * src/main.cc (addCommand): Changed argument signature.
  9351. (main): Added new variable: args. Added new option "torrent-show-files"
  9352. "no-preallocation". Usage is not updated yet.
  9353. 2006-04-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9354. * src/PeerMessage.cc (setBitfield): Fixed invalid memory de-allocation.
  9355. 2006-04-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9356. Attempt to add the ability to listing file entries in a .torrent file.
  9357. This feature is not yet complete.
  9358. * src/prefs.h (PREF_TORRENT_SHOW_FILES): New definition
  9359. * src/TorrentMan.cc (getMultiFileEntries): New function.
  9360. (getName): New function.
  9361. * src/TorrentMan.h (getMultiFileEntries): New function.
  9362. (getName): New function.
  9363. * src/main.cc (main): Use above 2 funtion.
  9364. * Release 0.3.2
  9365. 2006-03-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9366. * src/PeerInteractionCommand.cc (checkInactiveConnection): New function
  9367. (detectMessageFlooding): Updated threshold value.
  9368. (checkLongTimePeerChoking): Updated timeout value.
  9369. (getNewPieceAndSendInterest): Added debug log.
  9370. * src/PeerInteractionCommand.h (checkInactiveConnection): New function
  9371. * src/TorrentMan.cc (deleteOldErrorPeers): Updated.
  9372. (getPeer): Updated.
  9373. * src/TorrentMan.h: Added MAX_PEER_ERROR.
  9374. * src/PeerAbstractCommand.cc (onAbort): Increment error counter.
  9375. * src/PeerListenCommand.cc (execute): Close connection if incoming peer
  9376. is localhost.
  9377. * src/main.cc (main): Updated PREF_PEER_CONNECTION_TIMEOUT to 60.
  9378. * src/PendingMessage.cc (processMessage): Not to send piece message
  9379. if peer is not interested in the pieces localhost has.
  9380. * src/Peer.cc (shouldChoke): Updated.
  9381. * src/SendMessageQueue.cc (cancelAllRequest): Fixed.
  9382. * src/Util.cc (isPowerOf): New function.
  9383. * src/Util.h (isPowerOf): New function.
  9384. * src/PeerMessageUtil.cc (checkLength): Added a check for length
  9385. whether or not it is power of 2.
  9386. 2006-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9387. Added new class SendMessageQueue that includes PendingMessages and
  9388. RequestSlotMan.
  9389. * src/SendMessageQueue.h: New class.
  9390. * src/SendMessageQueue.cc: New class.
  9391. * src/PendingMessage.h: Added new member variable blockIndex and its
  9392. accessors.
  9393. (createRequestMessage): Updated.
  9394. * src/PendingMessage.cc (createRequestMessage): Updated.
  9395. * src/PeerInteractionCommand.cc (executeInternal): Updated with
  9396. SendMessageQueue.
  9397. (checkLongTimePeerChoking): Updated with SendMessageQueue.
  9398. (receiveMessage): Updated with SendMessageQueue.
  9399. (deletePendingPieceMessage): Removed.
  9400. (getNewPieceAndSendInterest): Updated with SendMessageQueue.
  9401. (sendInterest): Updated with SendMessageQueue.
  9402. (createRequestPendingMessage): Updated with SendMessageQueue.
  9403. (sendMessages): Updated with SendMessageQueue.
  9404. (onAbort): Updated with SendMessageQueue.
  9405. (keepAlive): Updated with SendMessageQueue.
  9406. (beforeSocketCheck): Updated SendMessageQueue.
  9407. * src/PeerInteractionCommand (sendMessages): Shuffle
  9408. missingBLockIndexes before using it.
  9409. Added its own timeout for peer connection.
  9410. * src/PeerAbstractCommand.h: Added member variable timeout and its
  9411. setter.
  9412. * src/prefs.h: Added PREF_PEER_CONNECTION_TIMEOUT.
  9413. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  9414. Added setTimeout() call.
  9415. (executeInternal): Added setTimeout() call.
  9416. * src/PeerAbstractCommand.cc (PeerAbstractCommand):
  9417. Added timeout.
  9418. (isTimeoutDetected): Updated.
  9419. * src/main.cc (main): Added PREF_PEER_CONNECTION_TIMEOUT entry to
  9420. option.
  9421. Added *simple* message flooding checker.
  9422. * src/PeerInteractionCommand.cc (executeInternal):
  9423. Added detectMessageFlooding() call.
  9424. (detectMessageFlooding): New function.
  9425. (receiveMessage): Count up CHOKE, UNCHOKE, HAVE message.
  9426. (beforeSocketCheck): Added detectMessageFlooding() call.
  9427. * src/PeerInteractionCommand.h: Added sendMessageQueue,
  9428. chokeUnchokeCount, haveCount, detectMessageFlooding().
  9429. Removed deletePendingPieceMessage(), getRequestSlot(),
  9430. deleteRequestSlot(), deleteAllRequestSlot().
  9431. * src/PeerInteractionCommand.cc (beforeSocketCheck):
  9432. Added checkLongTimePeerChoking() call.
  9433. * src/RequestSlotMan.h: Renamed deleteTimeoutRequestSlot().
  9434. * src/TorrentMan.cc (addPeer): Delete at most MAX_PEER_LIST_SIZE peers
  9435. if duplicate == false.
  9436. The parameter "uploaded" and "downloaded" in the tracker request are
  9437. the size since the client sent the "started" event to the tracker.
  9438. * src/TorrentMan.cc (setup): Assigned saved downloaded Size and
  9439. uploaded size to preDownloadedSize, preUploadedSize respectively.
  9440. * src/TorrentMan.h: Added preDownloadedSize, preUploadedSize,
  9441. getSessionDownloadedSize(), getSessionUploadedSize().
  9442. * src/TrackerInitCommand.cc (execute): Use getSessionDownloadedSize(),
  9443. getSessionUploadedSize() instead of getDownloadedSize(),
  9444. getUploadedSize().
  9445. * src/PendingMessage.cc (processMessage): Do not send request message
  9446. if the peer is choking the client.
  9447. * src/TrackerUpdateCommand.cc (execute): Check wtheher minInterval is
  9448. less than interval.
  9449. 2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9450. * configure.in: Added gnutls support. Added several CPP macros.
  9451. * m4/openssl.m4: Added.
  9452. * src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
  9453. readData(), peekData(). Added gnutls support.
  9454. * src/HttpDownloadCommand.cc: Removed SleepCommand.h
  9455. * src/TrackerWatcherCommand.{h,cc}: Added. This command creates
  9456. TrackerInitCommand periodicaly(TorrentMan::minInterval).
  9457. * src/TorrentMan.cc: Remove downloadedSize == 0 check from save().
  9458. Instead, added a check for whether setup method has executed
  9459. successfully.
  9460. * src/TorrentMan.h: Added member vaiable setupComplete. Updated
  9461. DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to 300.
  9462. * src/Makefile.am: Updated.
  9463. * src/messageDigest.h: Added. This is a macro calculating SHA1 digest
  9464. using whether OpenSSL or gcrypt, depending on the result of configure
  9465. script.
  9466. * src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by using
  9467. messageDigest.h.
  9468. * src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
  9469. * src/PeerListenCommand.cc: Added log about port binded successfully.
  9470. Fixed memory leak.
  9471. * src/main.cc: Added gnutls support. Replaced LIB_SSL with
  9472. ENABLE_BITTORRENT where they are not related to OpenSSL but BitTorrent.
  9473. Removed instantiation of TrackerInitCommand. Instead,
  9474. TrackerWatcherCommand is instantiated and pushed to the command queue.
  9475. * src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL with
  9476. ENABLE_SSL.
  9477. * src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
  9478. * src/RequestSlotMan.cc (deleteCompletedRequestSlot):
  9479. If a piece is already acquired by another command, delete the request
  9480. slots for the piece.
  9481. * src/TrackerUpdateCommand.cc (execute):
  9482. Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to warn.
  9483. Added a check whether peer list is null.
  9484. Fixed the bug that causes sending completed event to the tracker
  9485. several times.
  9486. * src/TrackerInitCommand.cc (execute):
  9487. Fixed the bug that causes sending completed event to the tracker
  9488. several times.
  9489. * src/AbstractDiskWriter.{h,cc}: Removed direct dependency on OpenSSL
  9490. by using messageDigest.h.
  9491. 2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9492. * PeerConnection.cc: Replaced log message "keep-alive" with
  9493. "keep alive".
  9494. * PeerInteractionCommand.{h,cc}: Close connection if peer is choking
  9495. localhost long time.
  9496. * TorrentMan.cc: When adding new peer with duplicate = true, if the
  9497. number of peer list is equal to or grater than MAX_PEER_LIST, delete
  9498. at most 100 failure entry from the list. If with duplicate = false,
  9499. MAX_PEER_LIST is not checked.
  9500. * PeerListenCommand.cc: Fixed the argument order of log message.
  9501. 2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9502. * Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
  9503. Added warn().
  9504. * SimpleLogger.h: Moved enum LEVEL to Logger.h.
  9505. Implemented warn().
  9506. Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated code.
  9507. 2006-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9508. * Request.h: Added AFTER_COMPLETED event.
  9509. * TorrentDownloadEngine.cc: Prints "Download complete" message
  9510. instead of downloaded size and progress(%) after download completes.
  9511. * PeerInteractionCommand.cc: After download completes, sends unchoke
  9512. message to the peer if it is interested in what localhost has
  9513. downloaded.
  9514. * TorrentMan.cc: In single-file mode, copy temporary file to the final
  9515. destination instead of just renaming it.
  9516. * TorrentMan.cc: Added deleteTempFile().
  9517. * PeerAbstractCommand.cc: do not stop execution after download
  9518. completes. This makes localhost a seeder.
  9519. * Util.{h,cc}: Added fileCopy().
  9520. * PeerListenCommand.cc: do not stop execution after download completes.
  9521. This makes localhost a seeder.
  9522. * main.cc: Do not call TorrentMan::fixFilename() in torrentHandler.
  9523. Added TorrentMan::deleteTempFile() to torrentHandler.
  9524. Initialized the variable dir as ".".
  9525. * TorrentMan.h: Changed DEFAULT_ANNOUNCE_INTERVAL to 120 seconds.
  9526. Deleted renameSingleFile().
  9527. Added copySingleFile(), deleteTempFile().
  9528. * DownloadEngine.h: Added virtual function afterEachIteration().
  9529. * TorrentDownloadEngine.cc: Move a call to TorrentMan::fixFilename()
  9530. in onEndOfRun() to afterEachIteration().
  9531. In onEndOfRun(), changed if condition to check whether filenameFixed is
  9532. true.
  9533. * Util.cc: Implemented fileCopy() using rangedFileCopy().
  9534. In rangedFileCopy(), added try-catch block to properly close file
  9535. descriptors.
  9536. * TorrentDownloadEngine.cc: Added a member variable filenameFixed.
  9537. Added afterEachIteration(), isFilenameFixed().
  9538. * Peer.cc: Changed choking strategy.
  9539. * PreAllocationDiskWriter.cc: Drop O_DIRECT flag.
  9540. * TrackerInitCommand.cc: Send completed event only once.
  9541. * DownloadEngine.cc: Added a call to afterEachIteration().
  9542. * TrackerUpdateCommand.cc: Do not stop execution after download
  9543. completes.
  9544. * TorrentMan.h: Defined MAX_PEER_UPDATE as 15. aria2 attempts to
  9545. connect the peers at most MAX_PEER_UPDATE when a peer list is
  9546. received from a tracker.
  9547. * TrackerUpdateCommand.cc: Implemented above mentioned behavior.
  9548. Decreased the number of failure peers to delete to 0(just comment out
  9549. the line).
  9550. * Release 0.3.1
  9551. 2006-03-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9552. * PeerInteractionCommand.cc: added a call to
  9553. TorrentMan::unadvertisePiece in Destructor.
  9554. * PeerInteractionCommand.cc: make have message sent immediately
  9555. if the size of pending message queue is zero.
  9556. * TorrentMan.cc: set the maximum size of peer list to 250.
  9557. * TorrentMan.h: changed the container type of Peers and UsedPieces
  9558. to deque.
  9559. * Util.cc: fixed rangedFileCopy.
  9560. * AbstractDiskWriter.{h,cc}: moved digest context initialization
  9561. to Constructor. Also, moved digest cleanup to Destructor.
  9562. * MetaFileUtil.cc: fixed memory leak
  9563. * replaced std::vector with std::deque.
  9564. * AbstractCommand.cc: casted timeout value to long long int.
  9565. * ChunkedEncoding.cc: fixed memory leak.
  9566. * PeerInteractionCommand.cc: casted timeout value to long long int.
  9567. * SleepCommand.cc: casted timeout value to long long int.
  9568. * Data.cc: fixed memory leak.
  9569. * Data.cc: fixed toLLInt().
  9570. * BitfieldMan.cc: fixed memory leak.
  9571. * TorrentMan.cc: initialized storeDir to ".".
  9572. * TorrentMan.cc: fixed memory leak.
  9573. * TorrentMan.cc: corrected file paths of splitted files.
  9574. * PeerAbstractCommand.cc: casted timeout to long long int.
  9575. * main.cc: added delete(req) and delete(te->diskWriter).
  9576. * RequestSlot.cc: casted timeout value to long long int.
  9577. * Request.cc: fixed memory leak.
  9578. * PendingMessage.cc: make HAVE messages sent only when peer does not
  9579. have the piece.
  9580. * Peer.{h,cc}: added hasPiece(int index).
  9581. * main.cc: corrected addCommand.
  9582. 2006-03-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9583. * BitTorrent protocol support added.
  9584. * Release 0.3.0
  9585. 2006-03-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9586. * SocketCore.cc: remove the assignment of addrinfo.ai_addr.
  9587. 2006-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9588. * ChunkedEncoding.{h,cc}: fixed the bug that if chunk data is binary,
  9589. decoding did not work properly.
  9590. 2006-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9591. * DownloadEngine.h: included sys/time.h
  9592. * DownloadEngine.cc: remove sys/time.h
  9593. * Makefile.am (SUBDIRS): Add intl.
  9594. * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
  9595. 2006-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9596. * main.cc: correct help message for --http-auth-scheme.
  9597. * main.cc: changed e-mail address for bug reports.
  9598. * ja.po: added japanese translation.
  9599. 2006-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9600. * SimpleLogger.cc: flush log file instead of stdout.
  9601. 2006-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9602. * main.cc: Fixed command-line option: max-tries
  9603. * HttpResponseCommand.cc: Make the request re-sent only if req->seg.sp
  9604. does not equal to seg.sp.
  9605. * DownloadCommand.cc: If EOF is got from the server and the total size
  9606. of file is not zero, then throw DlRetryEx.
  9607. * main.cc: Set the minium value of min-segment-size to 1024.
  9608. * HttpResponseCommand.cc: Fixed the bug that http segmented downloading
  9609. fails because of a regression since 0.2.0 release.
  9610. 2006-03-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9611. * HttpConnection.cc:
  9612. * common.h: defined the user agent name as macro
  9613. * DownloadEngine.{h, cc}:
  9614. * ConsoleDownloadEngine.{h, cc}: Console output message(size, speed)
  9615. is now generated by ConsoleDownloadEngine not by DownloadEngine.
  9616. * main.cc: Download complete/abort message is now generated by main.
  9617. * Makefile.am (SUBDIRS): Add m4.
  9618. (ACLOCAL_AMFLAGS): New variable.
  9619. (EXTRA_DIST): New variable.
  9620. * configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
  9621. * gettext: added gettext functionality
  9622. 2006-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9623. * AbstractCommand.cc:
  9624. * DownloadCommand.{h, cc}: Aborted downloading commands now properly
  9625. unregister its cuid from SegmentMan.
  9626. * DownloadEngine.cc: .aria2 file was written when a downloading
  9627. failed with errors.
  9628. * HttpConnection.cc: Added "Proxy-Connection" header to proxy request.
  9629. Added "User-Agent" header to CONNECT proxy request.
  9630. Fixed "Proxy-Authorization" header. Now proxy authorization works
  9631. properly.
  9632. * Logger.h:
  9633. * SimpleLogger.{h,cc}: Changed the type of msg to const char*.
  9634. * ChunkedEncoding.cc: Added #include directive for strings.h
  9635. * Release 0.2.1
  9636. 2006-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9637. * Util.{h,cc}: added startsWith().
  9638. * CookieBox.cc: rewrited criteriaFind() using Util::startsWith() and
  9639. Util::endsWith().
  9640. * SocketCore.cc: struct addrinfo is now zero-initialized.
  9641. * common.h: added #include directive of limit.h.
  9642. * DownloadEngine.cc: added #include directive of sys/time.h and
  9643. algorithm.
  9644. * Exception.h: added #include directive of stdio.h.
  9645. * AbstractCommand.h: added #include directive of sys/time.h.
  9646. * DownloadCommand.h: added #include directive of sys/time.h.
  9647. * *.h: added #include directive of common.h to all base classes.
  9648. subclasses' one was removed.
  9649. * common.h: defined LONG_LONG_MAX and LONG_LONG_MIN if a compiler
  9650. does not define these macros.
  9651. 2006-02-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9652. * Release 0.2.0
  9653. * main.cc:
  9654. * HttpInitiateConnectionCommand.{h,cc}:
  9655. * prefs.h:
  9656. * HttpConnection.{h,cc}: added --http-proxy-method option.
  9657. We can now use GET command in http proxy.
  9658. 2006-02-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9659. * SplitSlowestSegmentSplitter.{h,cc}: This class provies algorithm
  9660. that splits slowest segment of SegmentMan::commands vector.
  9661. This is the default split algorithm of aria2.
  9662. * SplitFirstSegmentSplitter.{h,cc}: This class provides algorithm
  9663. that splits first segment of SegmentMan::commands vector.
  9664. * SegmentSplitter.{h,cc}: Added. This class provides split algorithm.
  9665. * DownloadCommand.{h,cc}: Added downloading speed calculation.
  9666. * Segment.h:
  9667. * SegmentMan.cc: Added speed field to Segment.h
  9668. * main.cc: -s option now affects all URLs in command-line arguemtns.
  9669. * HttpResponseCommand.cc: Fixed bug that segment file is not loaded.
  9670. * message.h: Change file size related %d to %lld.
  9671. 2006-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9672. * FtpInitiateConnectionCommand.{h,cc}:
  9673. * FtpNegotiationCommand.{h,cc}:
  9674. * FtpDownloadCommand.{h,cc}:
  9675. * FtpConnection.{h,cc}: Added FTP support
  9676. * SimpleLogger.cc: Log message now includes time information.
  9677. * main.cc: The value of --http-auth-scheme option is chagned from
  9678. 'BASIC' to 'basic'
  9679. * main.cc: Added --timeout command-line option.
  9680. * main.cc: Added --min-segment-size command-line option.
  9681. * main.cc: Added --max-retries command-line option.
  9682. * prefs.h: option string constants are now defined in prefs.h
  9683. 2006-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9684. * AbstractCommand.cc: Fixed timeout bug in AbstractCommand
  9685. * SegmentMan.cc: Added totalSize entry to .aria2 file. No compatibility
  9686. with version 0.1.0's one.
  9687. 2006-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9688. * configure.in: Added --enable-ssl option to configure script.
  9689. * HttpConnection.cc: Make Request-URI an absolute path. Some servers
  9690. cannot permit absoluteURI as Request-URI.
  9691. * HttpConnection.cc: Added Referer support.
  9692. * main.cc: Added referer command-line option.
  9693. * main.cc: Added rety-wait command-line option.
  9694. * Exception.h: Fixed formating bug in Exception::setMsg()
  9695. * SocketCore.{h,cc}:
  9696. * Socket.{h, cc}:
  9697. * Request.cc:
  9698. * InitiateConnectionCommandFactory.cc:
  9699. * HttpRequestCommand.cc: Added HTTPS support.
  9700. * SocketCore.{h,cc}: Added SocketCore. Socket becomes a handle class
  9701. for SocketCore.
  9702. * ChunkedEncoding.cc: Fixed bug in ChunkedEncoding: expanding buffer
  9703. size is wrong
  9704. * DownloadCommand.cc: Fixed bug in DownloadCommand: In Chunked
  9705. Encoding, it wrongly adds to Segment.ds buff length from the socket.
  9706. 2006-02-17 Tatsuhiro Tsujikawa <tsujikawa at rednoah dot com>
  9707. * Release 0.1.0