ChangeLog 339 KB

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