ChangeLog 375 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416
  1. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2. Fixed unhandled exception(removed keyword `new').
  3. * src/SocketCore.cc (initEPOLL)
  4. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5. Removed visit(const MetaEntry*)
  6. * src/MetaEntryVisitor.h:
  7. Added visit(const Data*),visit(const Dictionary*),visit(const List*)
  8. and made them virtual.
  9. * src/BencodeVisitor.h
  10. * src/BencodeVisitor.cc
  11. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  12. Updated po files.
  13. * po/aria2c.pot
  14. * po/*.po
  15. * po/*.gmo
  16. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  17. Moved the call setWriteCheckSocket inside the previous clause to reduce
  18. the number of socket to watch out.
  19. * src/PeerInteractionCommand.cc
  20. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  21. When there is not enough space in disk when writing a chunk of data,
  22. aria2 now prints the message to the console to warn user and aborts
  23. its download. Not all downloads are canceled because some downloads
  24. may use another disk or partition. BUG#1640332
  25. * src/AbstractDiskWriter.cc
  26. * src/PeerAbstractCommand.cc
  27. * src/PeerAbstractCommand.h: Added onFailure() function for override.
  28. * src/PeerInteractionCommand.cc: In onFailure(), call RequestGroup::
  29. setHaltRequested(true) to cancel download.
  30. * src/PeerInteractionCommand.h
  31. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  32. Applied Ross's aria2-0.13.2+1-mingw-5.patch, which changes the type of
  33. socket from int to sock_t as sockets are unsigned in Windows.
  34. For AsyncNameResolver, DownloadEngine, I did additional modification
  35. for the portion of the code changed according to epoll support.
  36. I defined sock_t in a2netcompat.h to use sock_t without including
  37. SocketCore.h.
  38. * src/AsyncNameResolver.cc
  39. * src/AsyncNameResolver.h
  40. * src/DownloadEngine.cc
  41. * src/DownloadEngine.h
  42. * src/SocketCore.cc
  43. * src/SocketCore.h
  44. * src/a2netcompat.h
  45. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  46. Applied Ross's aria2-0.13.2+1-mingw-4.patch. With this change, all
  47. changes in the patch were applied.
  48. * test/DHTConnectionImplTest.cc: Fixed unit test error in MinGW.
  49. * test/DefaultPieceStorageTest.cc: Fixed unit test error in MinGW.
  50. * test/PeerMessageUtilTest.cc: Fixed unit test error in MinGW.
  51. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  52. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this change,
  53. a2io.h and common.h were modified.
  54. * src/a2io.h: Changed seek/stat/tell calls to use 64 bit versions in
  55. MinGW.
  56. * src/common.h: Changed off_t to 64 bit in MinGW.
  57. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  58. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
  59. only a2netcompat.h is modified.
  60. * src/a2netcompat.h: Removed unused getaddrinfo related #define
  61. directives.
  62. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  63. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
  64. only gai_strerror.h is modified.
  65. * src/gai_strerror.h: Fixed gai_strerror() function to report all
  66. winsock errors in MinGW.
  67. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  68. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit, only the
  69. follow sources are applied.
  70. * src/Platform.h: I removed HAVE_WINSOCK2_H directive from Platform.h.
  71. * src/Platform.cc: Moved common setup/teardown code to Platform class.
  72. I moved #endif // HAVE_WINSOCK2_H to the front of #include "DlAbortEx.h"
  73. I included locale.h from Platform.cc.
  74. * src/main.cc: Moved common setup/teardown code to Platform class.
  75. * test/AllTest.cc: Use Platform class.
  76. Set locale to C in AllTest.cc to prevent the messages to be localized.
  77. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  78. Applied Ross's aria2-0.13.2+1-mingw-3.patch.
  79. * test/HttpHeaderTest.cc: Casted to off_t where it should.
  80. * test/HttpRequestTest.cc: Casted to off_t where it should.
  81. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  82. Applied Ross's aria2-0.13.2+1-mingw.patch and
  83. aria2-0.13.2+1-mingw-2.patch.
  84. * src/ConsoleStatCalc.cc: Added HAVE_TERMIOUS_H directive for the
  85. systems which don't have termious.h. I moved the directive inside of
  86. if(isTTY) { ... clause so that line is wiped out without termious.h.
  87. I also removed HAVE_ASCTIME_R clause because asctime_r is provided
  88. anyway.
  89. * src/asctime_r.h
  90. * src/asctime_r.c: Added for the systems don't have asctime_r function.
  91. I added 2nd argument to the prototype declaration.
  92. * src/StringFormat.cc: Get rid of vasprintf.
  93. * src/getaddrinfo.h: Fixed constants.
  94. * configure.ac: Added the check for asctime_r function.
  95. * src/Makefile.am: Added conditional based on HAVE_ASCTIME_R
  96. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  97. Added writable test for Socket when the sending message is in progress.
  98. Usually the sending message is piece message. Without wriable check,
  99. upload latency is dropped to more than 1sec.
  100. * src/PeerInteractionCommand.cc
  101. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  102. Create only requested files and files which shares a piece with
  103. requested file in multi-torrent downloads. Directory structures are
  104. also created in the same rule.
  105. MultiDiskAdaptor::fileExists() now uses FileEntry instead of
  106. DiskWriterEntry as in the previous implementation.
  107. * src/MultiDiskWriter.cc
  108. * src/MultiFileAllocationIterator.cc
  109. * src/MultiFileAllocationIterator.h
  110. * test/MultiFileAllocationIteratorTest.cc
  111. 2008-06-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  112. Commented out -lprofiler
  113. * src/Makefile.am
  114. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  115. Bump up version number to 0.14.0b.
  116. * src/configure.ac
  117. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  118. Actively establish connection to peers in seeding, when peer cache
  119. is not full and max upload speed limit is not reached.
  120. * src/ActivePeerConnectionCommand.cc
  121. * src/ActivePeerConnectionCommand.h
  122. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  123. Always remove a peer from cache in DefaultPeerStorage::returnPeer(),
  124. to make room more fleshy, recently found peers.
  125. Peer::_badConditionStartTime is not used anymore. Consider to remove
  126. it.
  127. * src/DefaultPeerStorage.cc
  128. * test/DefaultPeerStorageTest.cc
  129. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  130. Returns cached data only when the previous receiveHandshake() is called
  131. with peek = true.
  132. * src/PeerConnection.cc (receiveHandshake)
  133. * src/PeerConnection.h (receiveHandshake)
  134. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  135. Changed default value of -s option from 1 to 5.
  136. Also max value of -s option is changed from 5 to 16.
  137. * src/HelpItemFactory.cc
  138. * src/OptionHandlerFactory.cc
  139. * src/option_processing.cc
  140. * src/usage_text.h
  141. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  142. Changed -s options behavior. Now it means the number of connections
  143. made simultaneously in each http/ftp download.
  144. If 1 URL is specified, the behavior is the same with old implementation.
  145. If -s N is given and more than N URLs are specified, first N URLs are
  146. used and remaining URLs are used for backup. If less than N URLs are
  147. specified, some of URLs are used more than once so that totally N
  148. connections are made simultaneously.
  149. * src/main.cc
  150. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  151. Included missing iosfwd or ostream header.
  152. * src/RequestGroupMan.cc
  153. * src/TaggedItem.cc
  154. * src/TaggedItem.h
  155. * src/Util.cc
  156. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  157. * src/HttpHeaderProcessor.cc: Rewritten using std::string as a buffer.
  158. * src/HttpHeaderProcessor.h: Rewritten using std::string as a buffer.
  159. * src/HttpConnection.cc: Included missing sstream.
  160. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  161. Added --bt-max-open-files option.
  162. * src/DefaultPieceStorage.cc
  163. * src/HelpItemFactory.cc
  164. * src/MultiDiskAdaptor.cc
  165. * src/MultiDiskAdaptor.h
  166. * src/OptionHandlerFactory.cc
  167. * src/option_processing.cc
  168. * src/prefs.cc
  169. * src/prefs.h
  170. * src/usage_text.h
  171. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  172. Fixed the bug that aria2 aborts when a path to a directory is given
  173. in command-line.
  174. * src/ProtocolDetector.cc
  175. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  176. Limited the number files opened in each BitTorrent download. The default
  177. value is 100. The option to change this value will be added.
  178. * src/MultiDiskAdaptor.cc
  179. * src/MultiDiskAdaptor.h
  180. * src/MultiFileAllocationIterator.cc
  181. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  182. Fixed the bug that HTTP downloads don't start with old libraries.
  183. * src/HttpHeaderProcessor.cc
  184. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  185. Use empty() instead of size() > 0.
  186. * src/HttpConnection.cc
  187. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  188. Drop connection if the incoming peer ID is the same with localhost's
  189. one. The previous implementation drops connection when incoming peer's
  190. IP address is the same with localhost's one.
  191. * src/PeerListenCommand.cc
  192. * src/DefaultBtInteractive.cc
  193. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  194. Returns cached data without checking whether socket is readable
  195. if the cache is available.
  196. * src/PeerConnection.cc (receiveHandshake)
  197. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  198. Included stdint.h
  199. * src/common.h
  200. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  201. Removed duplicate HAVE_GETTIMEOFDAY
  202. * src/Makefile.am
  203. * src/Makefile.in
  204. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  205. Use interval as a minInterval when minInterval is not supplied.
  206. * src/DefaultBtAnnounce.cc
  207. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  208. Made DEFAULT_ANNOUNCE_INTERVAL 120, so that if first tracker request
  209. attempt is failed, then 2nd attempt get kicked out more quickly.
  210. And it is now static const member of DefaultBtAnnounce.
  211. * src/DefaultBtAnnounce.h
  212. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  213. Renamed BtRuntime::lessThanMinPeers() and BtRuntime::lessThanEqMinPeers.
  214. Made MAX_PEERS and MIN_PEERS static const members of BtRuntime.
  215. * src/ActivePeerConnectionCommand.cc
  216. * src/BtConstants.h
  217. * src/BtRuntime.h
  218. * src/DHTGetPeersCommand.cc
  219. * src/DefaultBtAnnounce.cc
  220. * src/DefaultPeerStorage.cc: Calculate maxPeerListSize based on
  221. BtRuntime::MAX_PEERS.
  222. * src/DefaultPeerStorage.h
  223. * src/InitiatorMSEHandshakeCommand.cc
  224. * src/PeerInitiateConnectionCommand.cc
  225. * src/PeerInteractionCommand.cc
  226. * src/PeerReceiveHandshakeCommand.cc
  227. * src/TrackerWatcherCommand.cc
  228. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  229. Always Connect to _numNewConnection
  230. * src/ActivePeerConnectionCommand.cc
  231. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  232. Made `begin' unsigned int.
  233. * src/GrowSegment.h
  234. * src/Piece.cc
  235. * src/Piece.h
  236. * src/PiecedSegment.cc
  237. * src/PiecedSegment.h
  238. * src/Segment.h
  239. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  240. Calculate piece hash when data is arrived if the data is arrived in
  241. order. This removes additional read operation for hash calculation.
  242. If the data is arrived in out of order, the hash is calucated when the
  243. piece is completed. This is the same behavior as the old implementation.
  244. * src/BtPieceMessage.cc
  245. * src/DefaultBtProgressInfoFile.cc
  246. * src/DefaultPieceStorage.cc
  247. * src/DownloadCommand.cc
  248. * src/DownloadCommand.h
  249. * src/DownloadEngine.cc
  250. * src/GrowSegment.cc
  251. * src/GrowSegment.h
  252. * src/Piece.cc
  253. * src/Piece.h
  254. * src/PiecedSegment.cc
  255. * src/PiecedSegment.h
  256. * src/Segment.h
  257. * test/PieceTest.cc
  258. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  259. Try to keep the ordering of outgoing piece message.
  260. * src/DefaultBtMessageDispatcher.cc
  261. (DefaultBtMessageDispatcher::sendMessages)
  262. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  263. Fixed busy loop when error/hup epoll events occur.
  264. * src/AbstractCommand.cc
  265. * src/PeerAbstractCommand.cc
  266. 2008-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  267. Added --bt-request-peer-speed-limit option, which was a constant
  268. SLOW_SPEED_THRESHOLD.
  269. * src/ActivePeerConnectionCommand.cc
  270. * src/ActivePeerConnectionCommand.h
  271. * src/BtConstants.h
  272. * src/HelpItemFactory.cc
  273. * src/OptionHandlerFactory.cc
  274. * src/PeerReceiveHandshakeCommand.cc
  275. * src/option_processing.cc
  276. * src/prefs.cc
  277. * src/prefs.h
  278. * src/usage_text.h
  279. 2008-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  280. Removed repeated call of getTopDirPath(). Instead, call it once and
  281. cache the result.
  282. * src/MultiDiskAdaptor.cc
  283. * src/MultiDiskAdaptor.h
  284. (mkdir, openFile, initAndOpenFile, openExistingFile)
  285. 2008-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  286. Fixed compile error on debian etch.
  287. The libc6 shipped with debian etch doesn't define ULLONG_MAX properly
  288. even if _GNU_SOURCE is defined. So define ULLONG_MAX in case when
  289. it is undefined.
  290. * src/Util.cc (ULLONG_MAX)
  291. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  292. Added epoll support. Use epoll if it is available. If not, use select.
  293. When async dns is enabled in compile time, epoll support is enabled
  294. only when aria2 is built with c-ares. This condition statement is
  295. defined in a2io.h.
  296. Currently aria2 supports both c-ares and ares, but ares is maintained
  297. for quite a while and debian already has c-ares package, ares support
  298. will be dropped in the future version.
  299. * configure.ac
  300. * src/AbstractCommand.cc
  301. * src/AsyncNameResolver.cc
  302. * src/AsyncNameResolver.h
  303. * src/Command.cc
  304. * src/Command.h
  305. * src/DownloadEngine.cc
  306. * src/DownloadEngine.h
  307. * src/PeerAbstractCommand.cc
  308. * src/SocketCore.cc
  309. * src/SocketCore.h
  310. * src/a2io.h
  311. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  312. * test/MetalinkEntryTest.cc: Added missing `defined' keyword to #if
  313. directive.
  314. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  315. Do not do write operation to /dev/null file.
  316. * src/LogFactory.cc
  317. * src/SimpleLogger.cc
  318. Replaced vasprintf with vsnprintf
  319. * src/SimpleLogger.cc (SimpleLogger::writeLog)
  320. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  321. * src/BtRequestMessage.cc
  322. (BtRequestMessage::onQueue): Given piece to RequestSlot. This is a fix
  323. for segmentation fault caused by previous commit.
  324. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  325. Reduced the usage of gettimeofday().
  326. * src/DefaultBtMessageDispatcher.cc
  327. (DefaultBtMessageDispatcher::checkRequestSlotAndDoNecessaryThing)
  328. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  329. * src/RequestSlot.cc
  330. * src/RequestSlot.h
  331. (RequestSlot::isTimeout)
  332. Made RequestSlot have a reference to Piece object to avoid find
  333. Piece repeatedly.
  334. * src/DefaultBtMessageDispatcher.cc
  335. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  336. * src/RequestSlot.cc
  337. * src/RequestSlot.h
  338. (RequestSlot::getPiece)
  339. * test/DefaultBtMessageDispatcherTest.cc
  340. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  341. * src/TimeA2.cc
  342. * src/TimeA2.h
  343. (Time::difference): New function.
  344. (Time::elapsed): Done optimization.
  345. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  346. * src/HelpItemFactory.cc: Added missing `defined' keyword to #if
  347. directive.
  348. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  349. * src/option_processing.cc: Added missing `defined' keyword to #if
  350. directive.
  351. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  352. Bump up version number to 0.13.2+1
  353. * src/configure.ac
  354. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  355. Refactored broken outstanding piece handling.
  356. * src/DefaultPieceStorage.cc
  357. * src/DefaultPieceStorage.h
  358. * src/Piece.cc
  359. * src/Piece.h
  360. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  361. Fixed compile error on Mac OS X 10.3.9. This error was caused by the
  362. name collision of static variable and predefined macro.
  363. * src/BtContext.cc
  364. * src/BtContext.h
  365. * src/CookieBoxFactory.cc
  366. * src/CookieBoxFactory.h
  367. * src/CookieParser.cc
  368. * src/CookieParser.h
  369. * src/DefaultBtContext.cc
  370. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  371. * src/RequestGroup.cc
  372. (RequestGroup::createInitialCommand): Use empty() instead of size().
  373. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  374. * Release 0.13.2
  375. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  376. Updated fr.po(thanks to Sebastien) and ja.po. ThanksDone make update-po
  377. * po/fr.po
  378. * po/ja.po
  379. * po/aria2c.pot
  380. * po/*.po
  381. * po/*.gmo
  382. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  383. Bump up version number to 0.13.2
  384. * src/configure.ac
  385. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  386. Refactord.
  387. * src/RequestGroupMan.cc
  388. (removeStoppedGroup)
  389. (fillRequestGroupFromReserver)
  390. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  391. Fixed compile error on Ubuntu.
  392. * src/BtPieceMessage.cc
  393. * src/MessageDigestHelper.cc
  394. * src/Util.cc
  395. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  396. Fixed compile error when configured with --disable-bittorrent
  397. * test/DownloadHandlerFactoryTest.cc
  398. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  399. Done make update-po
  400. * po/aria2c.pot
  401. * po/*.po
  402. * po/*.gmo
  403. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  404. Bump up version number to 0.13.2rc.
  405. * src/configure.ac
  406. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  407. Made option name bold. Updated SYNOPSIS to make it more readable.
  408. * doc/aria2c.1.txt
  409. * doc/aria2c.1
  410. * doc/aria2c.1.html
  411. * src/version_usage.cc
  412. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  413. Refactored. Use std::string instead of size and char*.
  414. * Data.cc
  415. * Data.h
  416. * test/Data.cc
  417. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  418. Added trimSelf(). Rewritten trim() to use trimSelf().
  419. * Util.cc
  420. * Util.h
  421. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  422. * src/ChunkChecksum.h (getChecksum): Return const reference.
  423. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  424. Fixed compile error when configured with --disable-metalink.
  425. Also moved test/DownloadHandlerFactoryTest.cc to SRC in Makefile.am.
  426. * test/FeatureConfigTest.cc
  427. * test/DownloadHandlerFactoryTest.cc
  428. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  429. Fixed compile error when configured with --without-gnutls
  430. --without-openssl
  431. * src/main.cc
  432. * test/DefaultBtProgressInfoFileTest.cc
  433. * test/SegmentManTest.cc
  434. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  435. Fixed compile error with OpenSSL.
  436. * src/IteratableChunkChecksumValidator.cc
  437. * src/LibsslDHKeyExchange.h
  438. * src/MessageDigestHelper.cc
  439. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  440. Revert the default value of --max-concurrent-downloads to 5.
  441. Revert the default value of --metalink-servers to 5.
  442. Man pages was also updated.
  443. * src/option_processing.cc
  444. * doc/aria2c.1.txt
  445. * doc/aria2c.1.html
  446. * doc/aria2c.1
  447. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  448. Returns const reference:
  449. DownloadContext::getPieceHash, DownloadContext::getName,
  450. DownloadContext::getPieceHashAlgo, DownloadContext::getDir,
  451. BtContext::getInfoHashAsString,
  452. * src/BtContext.h
  453. * src/DefaultBtContext.cc
  454. * src/DefaultBtContext.h
  455. * src/DownloadContext.h
  456. * src/SingleFileDownloadContext.h
  457. * test/MockBtContext.h
  458. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  459. * src/RequestGroup.h (getDir): Removed.
  460. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  461. Returns const reference. The internal urlencode function was optimized
  462. a little bit.
  463. * src/Request.cc
  464. * src/Request.h
  465. * src/HttpRequest.cc
  466. * src/HttpRequest.h
  467. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  468. Defined option name and possible values as std::string to reduce
  469. temporary string object creation in runtime.
  470. * src/HelpItemFactory.cc
  471. * src/LogFactory.cc
  472. * src/Option.cc
  473. * src/OptionHandlerFactory.cc
  474. * src/option_processing.cc
  475. * src/prefs.cc
  476. * src/prefs.h
  477. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  478. Return const reference.
  479. * src/DownloadHandlerConstants.cc
  480. * src/DownloadHandlerConstants.h
  481. (getMetalinkExtensions)
  482. (getMetalinkContentTypes)
  483. (getBtExtensions)
  484. (getBtContentTypes)
  485. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  486. * src/HttpHeader.cc (get): Rewritten.
  487. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  488. Make HttpHeader::getFirst(...) return const reference.
  489. * src/HttpHeader.cc
  490. * src/HttpHeader.h
  491. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  492. Use Option::getAsBool(...) instead of Option::get(...) and compare
  493. it with V_TRUE.
  494. * src/DefaultPieceStorage.cc
  495. * src/DownloadCommand.cc
  496. * src/FtpNegotiationCommand.cc
  497. * src/HttpRequest.cc
  498. * src/InitiateConnectionCommand.cc
  499. * src/RequestGroup.cc
  500. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  501. Made Option::get(...) return const reference of std::string.
  502. * src/Option.cc
  503. * src/Option.h
  504. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  505. Replaced std:copy with insert.
  506. * src/DefaultBtMessageDispatcher.cc
  507. * src/DefaultPieceStorage.cc
  508. * src/DownloadEngineFactory.cc
  509. * src/RequestGroup.cc
  510. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  511. Included SocketCore.h to fix compiler warning.
  512. * src/InitiateConnectionCommand.cc
  513. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  514. Put piece selection strategy algorithm to RarestPieceSelector class,
  515. Added a switch to choose whether randomized selection so that unit
  516. tests emit same results in, possibly, win32.
  517. * src/DefaultPieceStorage.cc
  518. * src/DefaultPieceStorage.h
  519. * src/RarestPieceSelector.cc
  520. * src/RarestPieceSelector.h
  521. * test/DefaultPieceStorageTest.cc
  522. * test/RarestPieceSelectorTest.cc
  523. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  524. Don't pool connection if HTTP proxy is enabled.
  525. * src/FtpFinishDownloadCommand.cc
  526. * src/FtpNegotiationCommand.cc
  527. * src/HttpSkipResponseCommand.cc
  528. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  529. Don't add closed socket to DownloadEngine::addSocketForReadCheck()
  530. * src/AbstractCommand.cc
  531. * src/AbstractCommand.h
  532. * src/ActivePeerConnectionCommand.cc
  533. * src/FtpInitiateConnectionCommand.cc
  534. * src/HttpInitiateConnectionCommand.cc
  535. * src/InitiateConnectionCommandFactory.cc
  536. * src/PeerAbstractCommand.cc
  537. * src/PeerAbstractCommand.h
  538. * src/PeerInitiateConnectionCommand.cc
  539. * src/TrackerWatcherCommand.cc
  540. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  541. Sort RequestSlot in ascending order and manipulate them using
  542. lower_bound.
  543. * src/DefaultBtMessageDispatcher.cc
  544. * src/DefaultBtMessageDispatcher.h
  545. (getMessageQueue): Added const qualifier.
  546. (getRequestSlots): Added const qualifier.
  547. (sendMessages): Use empty() instead of size().
  548. (doCancelSendingPieceAction): Use HandleEvent object.
  549. (doAbortOutstandingRequestAction): Rewritten.
  550. (doChokedAction): Rewritten.
  551. (checkRequestSlotAndDoNecessaryThing): Rewritten.
  552. (isOutstandingRequest): Rewritten.
  553. (getOutstandingRequest): Rewritten.
  554. (removeOutstandingRequest): Rewritten.
  555. (addOutstandingRequest): Rewritten.
  556. * src/RequestSlot.cc
  557. * src/RequestSlot.h
  558. (operator=): Rewritten.
  559. (operator!=): New function.
  560. (operator<): New function.
  561. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  562. * src/DefaultBtRequestFactory.cc
  563. (doChokedAction): Rewritten.
  564. (removeCompletedPiece): Rewritten.
  565. (removeTargetPiece): Rewritten.
  566. (createRequestMessages): Added the debug log.
  567. (createRequestMessagesOnEndGame: Added the debug log.
  568. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  569. Added the debug log message.
  570. * src/BtPieceMessage.cc (doReceivedAction)
  571. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  572. Sorted DHTPeerAnnounceEntry in a ascending order of info hash and
  573. used lower_bound to process them rather than linear search.
  574. * src/DHTPeerAnnounceStorage.cc
  575. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  576. Call subtractPieceStats from ~PeerInteractionCommand only when the
  577. peer has at least one completed piece.
  578. * src/Peer.cc
  579. * src/Peer.h
  580. * src/PeerInteractionCommand.cc
  581. * src/PeerSessionResource.cc
  582. * src/PeerSessionResource.h
  583. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  584. Removed unnecessary sorting
  585. * src/DefaultPieceStorage (DefaultPieceStorage)
  586. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  587. Rewritten the portion of the code that mangaes allowed fast indexes.
  588. * src/PeerSessionResource.cc
  589. * src/PeerSessionResource.h
  590. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  591. Removed the invalid string including '\r' from ru.po and
  592. did make update-po.
  593. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  594. Added --log-level and --summary-interval to man page.
  595. * doc/aria2c.1.txt
  596. * doc/aria2c.1.html
  597. * doc/aria2c.1
  598. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  599. Added --log-level option to specify log level. Log messages under
  600. the specified level are not output. Default value is `debug'.
  601. * src/HelpItemFactory.cc
  602. * src/LogFactory.cc
  603. * src/LogFactory.h
  604. * src/Logger.h
  605. * src/OptionHandlerFactory.cc
  606. * src/SimpleLogger.cc
  607. * src/SimpleLogger.h
  608. * src/main.cc
  609. * src/option_processing.cc
  610. * src/prefs.h
  611. * src/usage_text.h
  612. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  613. Print download progress summary of all parallel downloads in specified
  614. interval, default 60 secs. While aria2 could download several files
  615. in parallel (see -j option), it displayed just first download progress,
  616. and the other downloads are hidden from the users. This new feature
  617. prints all downloads currently in-progress to the console so that you
  618. can check the status of all downloads. The interval can be adjusted
  619. by --summary-interval option.
  620. The progress readout is now cut so that all fits in the one line of
  621. console.
  622. * src/ConsoleStatCalc.cc
  623. * src/ConsoleStatCalc.h
  624. * src/HelpItemFactory.cc
  625. * src/OptionHandlerFactory.cc
  626. * src/RequestGroupMan.cc
  627. * src/RequestGroupMan.h
  628. * src/main.cc
  629. * src/option_processing.cc
  630. * src/prefs.h
  631. * src/usage_text.h
  632. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  633. Call updateFdSet() to initialize rfdset, wfdset fdmax.
  634. * src/DownloadEngine.cc (DownloadEngine)
  635. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  636. Use free() to deallocate memory for _buffer if HAVE_POSIX_MEMALIGN is
  637. defined.
  638. * src/SingleFileAllocationIterator.cc (~SingleFileAllocationIterator)
  639. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  640. Use erase+lower_bound+insert instead of sort.
  641. * src/DefaultPieceStorage.cc (addPieceStats)
  642. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  643. Use A2STR::SHARP_C and A2STR::EQUAL_C.
  644. * src/A2STR.cc
  645. * src/A2STR.h
  646. * src/OptionParser.cc (parse)
  647. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  648. Defined fake filename `[tracker.announce]' as static const std::string.
  649. * src/TrackerWatcherCommand.cc (createRequestGroup)
  650. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  651. Defined default filename `index.html' as static const std::string
  652. * src/SingleFileDownloadContext.cc
  653. * src/SingleFileDownloadContext.h
  654. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  655. Defined "[MEMORY]" as static const std::string.
  656. * src/MemoryBufferPreDownloadHandler.cc (execute)
  657. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  658. Defined control file's version number as static const std::string.
  659. * src/DefaultBtProgressInfoFile.cc
  660. * src/DefaultBtProgressInfoFile.h
  661. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  662. Use Request::METHOD_GET
  663. * src/RequestGroup.cc (createNextCommandWithAdj)
  664. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  665. Defined "OK", "ERR", "INPR" as static const std::string
  666. * src/RequestGroupMan.cc (showDownloadResults)
  667. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  668. Defined default client used in extended handshake as static const
  669. std::string
  670. * src/DefaultBtInteractive.cc (addHandshakeExtendedMessageToQueue)
  671. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  672. Defined AUTH_HEADER, PROXY_AUTH_HEADER as static const std::string
  673. * src/HttpConnection.cc (eraseConfidentialInfo)
  674. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  675. Defined default ftp user and password as static const std::string
  676. * src/AuthConfigFactory.cc
  677. * src/AuthConfigFactory.h
  678. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  679. Defined strings used in netrc as static const std::string
  680. * src/Netrc.cc
  681. * src/Netrc.h
  682. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  683. Defined HTTP status as static const std::string
  684. * src/AbstractProxyResponseCommand.cc
  685. * src/HttpHeader.cc
  686. * src/HttpHeader.h
  687. * src/HttpResponse.cc
  688. * src/HttpResponseCommand.cc
  689. * src/HttpSkipResponseCommand.cc
  690. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  691. Defined "\r\n", "A", "I" as static const std::string
  692. * src/A2STR.cc
  693. * src/A2STR.h
  694. * src/FtpConnection.cc
  695. * src/FtpConnection.h
  696. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  697. Added COLON_C(".") and used it in Request::parseUrl()
  698. * src/A2STR.cc
  699. * src/A2STR.h
  700. * src/Request.cc (parseUrl)
  701. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  702. Changed the type of padName from `const std::string&' to `const char*'.
  703. * src/MSEHandshake.cc (verifyPadLength)
  704. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  705. Defined "sha1" as static const std::string.
  706. * src/MetalinkParserController.cc
  707. * src/MetalinkParserController.h
  708. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  709. Defined message digest algorithm name as static const std::string
  710. * src/DHTTokenTracker.cc
  711. * src/DHTUtil.cc
  712. * src/DefaultBtContext.cc
  713. * src/MSEHandshake.cc
  714. * src/MessageDigestHelper.cc
  715. * src/Peer.cc
  716. * src/messageDigest.cc
  717. * src/messageDigest.h
  718. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  719. Made string literals used in SAX parser static const std::string.
  720. * src/FileMetalinkParserState.cc
  721. * src/FileMetalinkParserState.h
  722. * src/FilesMetalinkParserState.cc
  723. * src/FilesMetalinkParserState.h
  724. * src/InitialMetalinkParserState.cc
  725. * src/InitialMetalinkParserState.h
  726. * src/MetalinkMetalinkParserState.cc
  727. * src/MetalinkMetalinkParserState.h
  728. * src/PiecesMetalinkParserState.cc
  729. * src/PiecesMetalinkParserState.h
  730. * src/ResourcesMetalinkParserState.cc
  731. * src/ResourcesMetalinkParserState.h
  732. * src/VerificationMetalinkParserState.cc
  733. * src/VerificationMetalinkParserState.h
  734. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  735. Use A2STR::SLASH_C, A2STR::DOT_C instead of "/", "." respectively.
  736. * src/A2STR.cc
  737. * src/A2STR.h
  738. * src/File.cc
  739. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  740. Defined static const std::string IP("ip"), PORT("port") and use them
  741. instead of string literals.
  742. * src/DefaultPeerListProcessor.cc
  743. * src/DefaultPeerListProcessor.h
  744. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  745. Made string literals for torrent file processing static const
  746. std::string.
  747. * src/BtContext.cc
  748. * src/BtContext.h
  749. * src/DefaultBtContext.cc
  750. * src/DefaultBtContext.h
  751. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  752. Made string literal for tracker response static const std::string
  753. * src/BtAnnounce.cc
  754. * src/BtAnnounce.h
  755. * src/DefaultBtAnnounce.cc
  756. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  757. Use DHTMessage::T instead of "t".
  758. * src/DHTMessageTracker.cc (messageArrived)
  759. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  760. Made keyName static const. Made trimmed charset static const
  761. std::string.
  762. * src/Util.cc (getContentDispositionFilename)
  763. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  764. Made USER_AGENT const. Made "/" static const std::string.
  765. * src/A2STR.cc
  766. * src/A2STR.h
  767. * src/HttpRequest.cc
  768. * src/HttpRequest.h
  769. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  770. Made string listeral to static const std::string:
  771. "Content-Range", "Content-Length"
  772. * src/HttpHeader.cc
  773. * src/HttpHeader.h
  774. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  775. Made string listeral to static const std::string.
  776. * src/HttpConnection.cc
  777. * src/HttpHeader.cc
  778. * src/HttpHeader.h
  779. * src/HttpResponse.cc
  780. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  781. Made string listeral to static const std::string.
  782. * src/A2STR.cc
  783. * src/A2STR.h
  784. * src/SimpleLogger.cc
  785. * src/SimpleLogger.h
  786. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  787. Made string literal to static const std::string.
  788. Rewritten CookieParser::setField.
  789. * src/A2STR.cc
  790. * src/A2STR.h
  791. * src/CookieBoxFactory.cc
  792. * src/CookieBoxFactory.h
  793. * src/CookieParser.cc
  794. * src/CookieParser.h
  795. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  796. Made string literal to static const std::string
  797. * src/DHTAbstractMessage.cc
  798. * src/DHTAnnouncePeerMessage.cc
  799. * src/DHTAnnouncePeerMessage.h
  800. * src/DHTAnnouncePeerReplyMessage.cc
  801. * src/DHTAnnouncePeerReplyMessage.h
  802. * src/DHTFindNodeMessage.cc
  803. * src/DHTFindNodeMessage.h
  804. * src/DHTFindNodeReplyMessage.cc
  805. * src/DHTFindNodeReplyMessage.h
  806. * src/DHTGetPeersMessage.cc
  807. * src/DHTGetPeersMessage.h
  808. * src/DHTGetPeersReplyMessage.cc
  809. * src/DHTGetPeersReplyMessage.h
  810. * src/DHTMessage.cc
  811. * src/DHTMessage.h
  812. * src/DHTMessageFactoryImpl.cc
  813. * src/DHTMessageReceiver.cc
  814. * src/DHTPingMessage.cc
  815. * src/DHTPingMessage.h
  816. * src/DHTPingReplyMessage.cc
  817. * src/DHTPingReplyMessage.h
  818. * src/DHTQueryMessage.cc
  819. * src/DHTQueryMessage.h
  820. * src/DHTResponseMessage.cc
  821. * src/DHTResponseMessage.h
  822. * src/DHTUnknownMessage.cc
  823. * src/DHTUnknownMessage.h
  824. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  825. Made string literal to static const std::string
  826. * src/BtChokeMessage.cc (toString)
  827. * src/BtHaveAllMessage.cc (toString)
  828. * src/BtHaveNoneMessage.cc (toString)
  829. * src/BtInterestedMessage.cc (toString)
  830. * src/BtNotInterestedMessage.cc (toString)
  831. * src/BtUnchokeMessage.cc (toString)
  832. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  833. Replaced "" with static const variable A2STR::NIL.
  834. Replaced string comparison against "" with std::string::empty().
  835. Added PROTO_* to Request class and use them as a protocol string
  836. constant.
  837. Made "started", "stopped", "completed" static const variable in
  838. AnnounceList class.
  839. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  840. Updated translations. Great thanks to translators.
  841. * po/ca.po
  842. * po/de.po
  843. * po/fr.po
  844. * po/it.po
  845. * po/ja.po
  846. * po/ru.po
  847. * po/zh_CN.po
  848. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  849. Updated man page; categorized options and fixed typo.
  850. * doc/aria2c.1.txt
  851. * doc/aria2c.1.html
  852. * doc/aria2c.1
  853. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  854. Removed const ref
  855. * src/MetalinkEntry.cc (AddProtocolPreference)
  856. * src/RequestGroup.cc (FindServerHostByHostname)
  857. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  858. Rewritten Accept-Features handling.
  859. * src/HttpRequestCommand.cc (createHttpRequest)
  860. * src/a2functional.h
  861. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  862. Changed method signature:
  863. DHTAbstractNodeLookupTask::toEntries
  864. * src/DHTAbstractNodeLookupTask.cc
  865. * src/DHTAbstractNodeLookupTask.h
  866. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  867. Changed method signature:
  868. BtContext::computeFastSet, DefaultBtContext::extractUrlList
  869. * src/BtContext.h
  870. * src/DefaultBtContext.cc
  871. * src/DefaultBtContext.h
  872. * src/DefaultBtInteractive.cc
  873. * test/DefaultBtContextTest.cc
  874. * test/MockBtContext.h
  875. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  876. Changed method signature:
  877. MultiFileAllocationIterator::makeDiskWriterEntries
  878. * src/MultiFileAllocationIterator.cc
  879. * src/MultiFileAllocationIterator.h
  880. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  881. Changed method sinature:
  882. MetalinkEntry::toFileEntry,
  883. MetalinkHelper::query, MetalinkHelper::parseAndQuery,
  884. Metalinker::queryEntry
  885. * src/Metalink2RequestGroup.cc
  886. * src/MetalinkEntry.cc
  887. * src/MetalinkEntry.h
  888. * src/MetalinkHelper.cc
  889. * src/MetalinkHelper.h
  890. * src/Metalinker.cc
  891. * src/Metalinker.h
  892. * src/main.cc
  893. * test/MetalinkHelperTest.cc
  894. * test/MetalinkerTest.cc
  895. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  896. Changed method sinature:
  897. RequestGroup::getURIs
  898. * src/RequestGroup.cc
  899. * src/RequestGroup.h
  900. * test/Metalink2RequestGroupTest.cc
  901. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  902. Changed method signature:
  903. PeerListProcessor::extractPeer
  904. * src/CompactPeerListProcessor.cc
  905. * src/CompactPeerListProcessor.h
  906. * src/DefaultBtAnnounce.cc
  907. * src/DefaultPeerListProcessor.cc
  908. * src/DefaultPeerListProcessor.h
  909. * src/DelegatingPeerListProcessor.cc
  910. * src/DelegatingPeerListProcessor.h
  911. * src/PeerListProcessor.h
  912. * src/UTPexExtensionMessage.cc
  913. * test/DefaultPeerListProcessorTest.cc
  914. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  915. Changed method signature:
  916. BtRequestFactory::createRequestMessages,
  917. BtRequestFactory::createRequestMessagesOnEndGame
  918. * src/BtRequestFactory.h
  919. * src/DefaultBtInteractive.cc
  920. * src/DefaultBtRequestFactory.cc
  921. * src/DefaultBtRequestFactory.h
  922. * test/DefaultBtRequestFactoryTest.cc
  923. * test/MockBtRequestFactory.h
  924. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  925. Changed method signature:
  926. PieceStorage::getInFlightPieces
  927. * src/DefaultBtProgressInfoFile.cc
  928. * src/DefaultPieceStorage.cc
  929. * src/DefaultPieceStorage.h
  930. * src/PieceStorage.h
  931. * src/UnknownLengthPieceStorage.cc
  932. * src/UnknownLengthPieceStorage.h
  933. * test/DefaultBtProgressInfoFileTest.cc
  934. * test/MockPieceStorage.h
  935. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  936. Changed method signature:
  937. PostDownloadHandler::getNextRequestGroups
  938. Metalink2RequestGroup::generate
  939. RequestGroup::postDownloadProcessing
  940. * src/BtPostDownloadHandler.cc
  941. * src/BtPostDownloadHandler.h
  942. * src/Metalink2RequestGroup.cc
  943. * src/Metalink2RequestGroup.h
  944. * src/MetalinkPostDownloadHandler.cc
  945. * src/MetalinkPostDownloadHandler.h
  946. * src/PostDownloadHandler.h
  947. * src/RequestGroup.cc
  948. * src/RequestGroup.h
  949. * src/RequestGroupMan.cc
  950. * src/main.cc
  951. * test/BtPostDownloadHandlerTest.cc
  952. * test/Metalink2RequestGroupTest.cc
  953. * test/MetalinkPostDownloadHandlerTest.cc
  954. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  955. Rewritten AccRequestGroup
  956. * src/main.cc
  957. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  958. Rewritten.
  959. * src/TaggedItem.cc (toTagString)
  960. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  961. Rewritten Accept-Features handling.
  962. * src/HttpRequestCommand.cc (createHttpRequest)
  963. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  964. Rewritten accept types handling.
  965. * HttpRequest.cc (createRequest)
  966. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  967. Rewritten
  968. * src/FeatureConfig.cc (featureSummary)
  969. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  970. Changed method signature:
  971. PeerStorage::getActivePeers
  972. * src/DHTPeerAnnounceEntry.cc
  973. * src/DefaultPeerStorage.cc
  974. * src/DefaultPeerStorage.h
  975. * src/PeerStorage.h
  976. * test/DefaultPeerStorageTest.cc
  977. * test/MockPeerStorage.h
  978. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  979. Changed method signature:
  980. DHTPeerAnnounceStorage::getPeers,
  981. DHTPeerAnnounceEntry::getPeers
  982. * src/DHTGetPeersMessage.cc
  983. * src/DHTPeerAnnounceEntry.cc
  984. * src/DHTPeerAnnounceEntry.h
  985. * src/DHTPeerAnnounceStorage.cc
  986. * src/DHTPeerAnnounceStorage.h
  987. * test/DHTAnnouncePeerMessageTest.cc
  988. * test/DHTPeerAnnounceEntryTest.cc
  989. * test/DHTPeerAnnounceStorageTest.cc
  990. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  991. Changed method signature:
  992. NameResolver::resolve
  993. * src/DHTEntryPointNameResolveCommand.cc
  994. * src/InitiateConnectionCommand.cc
  995. * src/NameResolver.cc
  996. * src/NameResolver.h
  997. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  998. Changed method signature:
  999. PieceStorage::getAdvertisedPieceIndexes
  1000. * src/DefaultBtInteractive.cc
  1001. * src/DefaultPieceStorage.cc
  1002. * src/DefaultPieceStorage.h
  1003. * src/PieceStorage.h
  1004. * src/UnknownLengthPieceStorage.h
  1005. * test/MockPieceStorage.h
  1006. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1007. Changed method signature:
  1008. SegmentMan::getInFlightSegment
  1009. * src/AbstractCommand.cc
  1010. * src/SegmentMan.cc
  1011. * src/SegmentMan.h
  1012. * test/SegmentManTest.cc
  1013. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1014. Changed method signature:
  1015. DHTAbstractNodeLookupTask::getNodesFromMessage
  1016. * src/DHTAbstractNodeLookupTask.cc
  1017. * src/DHTAbstractNodeLookupTask.h
  1018. * src/DHTNodeLookupTask.cc
  1019. * src/DHTNodeLookupTask.h
  1020. * src/DHTPeerLookupTask.cc
  1021. * src/DHTPeerLookupTask.h
  1022. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1023. Pass std::deque<Command*> by reference to avoid unnecessary coping.
  1024. * src/AbstractCommand.cc
  1025. * src/BtCheckIntegrityEntry.cc
  1026. * src/BtCheckIntegrityEntry.h
  1027. * src/BtFileAllocationEntry.cc
  1028. * src/BtFileAllocationEntry.h
  1029. * src/BtSetup.cc
  1030. * src/BtSetup.h
  1031. * src/CheckIntegrityCommand.cc
  1032. * src/CheckIntegrityEntry.h
  1033. * src/ChecksumCheckIntegrityEntry.cc
  1034. * src/ChecksumCheckIntegrityEntry.h
  1035. * src/DHTSetup.cc
  1036. * src/DHTSetup.h
  1037. * src/DownloadEngine.cc
  1038. * src/FileAllocationCommand.cc
  1039. * src/FileAllocationEntry.h
  1040. * src/RequestGroup.cc
  1041. * src/RequestGroup.h
  1042. * src/RequestGroupMan.cc
  1043. * src/RequestGroupMan.h
  1044. * src/StreamCheckIntegrityEntry.cc
  1045. * src/StreamCheckIntegrityEntry.h
  1046. * src/StreamFileAllocationEntry.cc
  1047. * src/StreamFileAllocationEntry.h
  1048. * src/TrackerWatcherCommand.cc
  1049. * src/a2functional.h
  1050. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1051. Changed method signature:
  1052. BNode::findClosestKNodes, BNode:: enumerateBucket,
  1053. DHTBucket::getGoodNodes,
  1054. DHTRoutingTable::getClosestKNodes, DHTRoutingTable::getBuckets
  1055. * src/BNode.cc
  1056. * src/BNode.h
  1057. * src/DHTAbstractNodeLookupTask.cc
  1058. * src/DHTAutoSaveCommand.cc
  1059. * src/DHTBucket.cc
  1060. * src/DHTBucket.h
  1061. * src/DHTBucketRefreshTask.cc
  1062. * src/DHTFindNodeMessage.cc
  1063. * src/DHTGetPeersMessage.cc
  1064. * src/DHTRoutingTable.cc
  1065. * src/DHTRoutingTable.h
  1066. * test/BNodeTest.cc
  1067. * test/DHTBucketTest.cc
  1068. * test/DHTRoutingTableTest.cc
  1069. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1070. In piece selection functions, Pass std::deque<...> by reference rather
  1071. than returning it.
  1072. * src/BitfieldMan.cc
  1073. * src/BitfieldMan.h
  1074. * src/DefaultBtRequestFactory.cc
  1075. * src/DefaultPieceStorage.cc
  1076. * src/Piece.cc
  1077. * src/Piece.h
  1078. * test/BitfieldManTest.cc
  1079. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1080. Implemented rarest piece first piece selection strategy.
  1081. * src/AbstractBtMessage.cc
  1082. * src/AbstractBtMessage.h
  1083. * src/BitfieldMan.cc
  1084. * src/BitfieldMan.h
  1085. * src/BtBitfieldMessage.cc
  1086. * src/BtHaveAllMessage.cc
  1087. * src/BtHaveMessage.cc
  1088. * src/DefaultPieceStorage.cc
  1089. * src/DefaultPieceStorage.h
  1090. * src/PeerInteractionCommand.cc
  1091. * src/PieceStorage.h
  1092. * src/UnknownLengthPieceStorage.h
  1093. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1094. Rewritten readData and writeData.
  1095. * src/MultiDiskAdaptor.cc
  1096. * src/MultiDiskAdaptor.h
  1097. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1098. Move \n out of the message "Usage: ...".
  1099. * src/version_usage.cc
  1100. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1101. Bump up version number to 0.13.2b.
  1102. * configure.ac
  1103. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1104. Added const qualifier to argument Exception& e.
  1105. * src/Logger.h
  1106. * src/SimpleLogger.cc
  1107. * src/SimpleLogger.h
  1108. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1109. Pool connection when CWD, SIZE command fails.
  1110. * src/FtpNegotiationCommand.cc
  1111. * src/FtpNegotiationCommand.h
  1112. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1113. Renamed HttpNullDownloadCommand as HttpSkipResponseCommand
  1114. * src/HttpResponseCommand.cc
  1115. * src/HttpSkipResponseCommand.cc
  1116. * src/HttpSkipResponseCommand.h
  1117. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1118. Pool connection when a server returns 4xx, 5xx responses.
  1119. * src/HttpNullDownloadCommand.cc
  1120. * src/HttpNullDownloadCommand.h
  1121. * src/HttpResponse.cc
  1122. * src/HttpResponse.h
  1123. * src/HttpResponseCommand.cc
  1124. * src/HttpResponseCommand.h
  1125. * test/HttpResponseTest.cc
  1126. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1127. Print usage when no URL is specifed or bad command-line option is
  1128. specified.
  1129. * src/HelpItemFactory.cc
  1130. * src/help_tags.h
  1131. * src/option_processing.cc
  1132. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1133. Removed duplicate log message.
  1134. * src/AbstractCommand.cc (asyncResolveHostname)
  1135. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1136. Updated man page: --async-dns and --ftp-reuse-connection were added.
  1137. Changed -j option's default value from 5 to 1.
  1138. Added new examples using protocol auto detection feature.
  1139. Removed -T, -M usage where it can be omitted.
  1140. * doc/aria2c.1.txt
  1141. * doc/aria2c.1.html
  1142. * doc/aria2c.1.txt
  1143. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1144. Updated command-line usage text, so that it tells users that they
  1145. can specify any number of torrent files and metalink files in
  1146. command-line.
  1147. * src/version_usage.cc
  1148. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1149. Changed the default value of -j option to 1.
  1150. * src/HelpItemFactory.cc
  1151. * src/option_processing.cc
  1152. * src/usage_text.h
  1153. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1154. Added the ability to reuse connection in FTP and it is enabled by
  1155. default. It can be disabled by --ftp-reuse-connection=false option.
  1156. * src/Command.cc
  1157. * src/DownloadCommand.cc
  1158. * src/FtpDownloadCommand.cc
  1159. * src/FtpDownloadCommand.h
  1160. * src/FtpFinishDownloadCommand.cc
  1161. * src/FtpFinishDownloadCommand.h
  1162. * src/FtpInitiateConnectionCommand.cc
  1163. * src/FtpNegotiationCommand.cc
  1164. * src/FtpNegotiationCommand.h
  1165. * src/HelpItemFactory.cc
  1166. * src/Makefile.am
  1167. * src/Makefile.in
  1168. * src/OptionHandlerFactory.cc
  1169. * src/option_processing.cc
  1170. * src/prefs.h
  1171. * src/usage_text.h
  1172. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1173. Call Command::transitStatus() before calling Command::execute(),
  1174. so that the status change made in execute() is not cleared.
  1175. * src/DownloadEngine.cc
  1176. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1177. Removed forward declaration of SocketCore class.
  1178. * src/HttpDownloadCommand.h
  1179. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1180. Set Request::setKeepAliveHint() and Request::setPipeliningHint()
  1181. in InitiateConnectionCommandFactory. They should be set only when
  1182. the protocol is HTTP or HTTPS.
  1183. * src/InitiateConnectionCommandFactory.cc
  1184. * src/RequestGroup.cc
  1185. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1186. Fixed infinite loop in checksum checking.
  1187. * src/IteratableChecksumValidator.cc
  1188. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1189. Set _supportsPersistentConnection to true by default.
  1190. * src/Request.cc
  1191. * src/RequestGroup.cc
  1192. * test/HttpRequestTest.cc
  1193. * test/RequestTest.cc
  1194. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1195. Added timeout to socket pool. The default timeout is 15 seconds,
  1196. which is the same value Apache uses.
  1197. * src/DownloadEngine.cc
  1198. * src/DownloadEngine.h
  1199. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1200. Fixed misuse of multimap::find()
  1201. * src/HttpHeader.cc
  1202. * test/HttpHeaderTest.cc
  1203. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1204. Rewritten name resolver. Now async DNS can be disabled by --async-dns
  1205. option.
  1206. The asynchronous DNS is not capable of IPv6 yet.
  1207. By disabling asynchronous DNS, aria2 is IPv6 enabled application, at
  1208. least for HTTP download.
  1209. * src/AbstractCommand.cc
  1210. * src/AbstractCommand.h
  1211. * src/AsyncNameResolver.cc
  1212. * src/AsyncNameResolver.h
  1213. * src/DHTEntryPointNameResolveCommand.cc
  1214. * src/DHTEntryPointNameResolveCommand.h
  1215. * src/DownloadEngine.cc
  1216. * src/DownloadEngine.h
  1217. * src/FtpInitiateConnectionCommand.cc
  1218. * src/FtpInitiateConnectionCommand.h
  1219. * src/HelpItemFactory.cc
  1220. * src/HttpInitiateConnectionCommand.cc
  1221. * src/HttpInitiateConnectionCommand.h
  1222. * src/InitiateConnectionCommand.cc
  1223. * src/InitiateConnectionCommand.h
  1224. * src/Makefile.am
  1225. * src/Makefile.in
  1226. * src/NameResolver.cc
  1227. * src/NameResolver.h
  1228. * src/OptionHandlerFactory.cc
  1229. * src/SocketCore.cc
  1230. * src/SocketCore.h
  1231. * src/Util.cc
  1232. * src/Util.h
  1233. * src/option_processing.cc
  1234. * src/prefs.h
  1235. * src/usage_text.h
  1236. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1237. Updated man page: --quiet, --header were added.
  1238. --metalink-servers and --enable-http-keep-alive option were updated.
  1239. * doc/aria2c.1
  1240. * doc/aria2c.1.html
  1241. * doc/aria2c.1.txt
  1242. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1243. Enable HTTP keep-alive by default.
  1244. * src/HelpItemFactory.cc
  1245. * src/option_processing.cc
  1246. * src/usage_text.h
  1247. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1248. Disable http keep-alive if the remote server is not HTTP/1.1.
  1249. * src/HttpConnection.cc
  1250. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1251. Receive content body of 302 response so that the connection can be
  1252. reused later when http keep-alive is enabled.
  1253. * src/HttpNullDownloadCommand.cc
  1254. * src/HttpNullDownloadCommand.h
  1255. * src/HttpResponseCommand.cc
  1256. * src/HttpResponseCommand.h
  1257. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1258. const SharedHandle<Request> -> const SharedHandle<Request>&
  1259. * src/FtpDowndloadCommand.cc
  1260. * src/FtpDowndloadCommand.h
  1261. * src/HttpDownloadCommand.cc
  1262. * src/HttpDownloadCommand.h
  1263. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1264. Fixed the bug that the control file(.aria2 file) is not renamed
  1265. according to tryAutoFileRenaming().
  1266. tryAutoFileRenaming() was rewritten so that if both renamed file and
  1267. its control file exist, use them and continue download.
  1268. The old implementation didn't take into account of control file's
  1269. existence, so basically you couldn't continue download of renamed file.
  1270. * src/BtProgressInfoFile.h
  1271. * src/DefaultBtProgressInfoFile.cc
  1272. * src/DefaultBtProgressInfoFile.h
  1273. * src/NullProgressInfoFile.h
  1274. * src/RequestGroup.cc
  1275. * test/DefaultBtProgressInfoFileTest.cc
  1276. * test/MockBtProgressInfoFile.h
  1277. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1278. Change the default value of --metalink-servers option from `5' to `1'.
  1279. * src/HelpItemFactory.cc
  1280. * src/option_processing.cc
  1281. * src/usage_text.h
  1282. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1283. Reimplemented transparent metalink using Accept request header.
  1284. * src/HttpRequest.cc
  1285. * src/HttpRequest.h
  1286. * src/HttpRequestCommand.cc
  1287. * src/Metalink2RequestGroup.cc
  1288. * src/RequestGroup.cc
  1289. * src/RequestGroup.h
  1290. * test/HttpRequestTest.cc
  1291. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1292. Bump up version number to 0.13.2a
  1293. * configure.ac
  1294. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1295. Updated configure.ac using the result of autoscan.
  1296. * configure.ac
  1297. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1298. Fixed compilation error without gcrypt/openssl.
  1299. * src/DownloadCommand.cc
  1300. * src/DownloadCommand.h
  1301. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1302. Reorganized version information so that it can be displayed in a
  1303. standard terminal screen without scrolling.
  1304. Removed http, ftp from Configuration section, because they are always
  1305. enabled.
  1306. * src/FeatureConfig.cc
  1307. * src/FeatureConfig.h
  1308. * src/main.cc
  1309. * src/messageDigest.cc
  1310. * src/messageDigest.h
  1311. * src/version_usage.cc
  1312. * test/FeatureConfigTest.cc
  1313. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1314. Masked user ID in log.
  1315. * src/FtpConnection.cc (sendUser)
  1316. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1317. Removed query part from filename in HTTP download. The query part means
  1318. the substring after "?" in URL. Firefox seems do the same thing.
  1319. A query part is sometimes very long and not suitable to filename,
  1320. so I think it is better to remove it from filename.
  1321. * src/HttpRequest.cc
  1322. * src/HttpRequest.h
  1323. * src/Request.cc
  1324. * src/Request.h
  1325. * test/HttpRequestTest.cc
  1326. * test/RequestTest.cc
  1327. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1328. Rewritten Exception class. Throw exception object, not its pointer and
  1329. catch by reference, so that remove problematic delete operator for
  1330. catched exception.
  1331. * src/Exception.cc
  1332. * src/Exception.h
  1333. * test/ExceptionTest.cc
  1334. * src/*: All files throwing/catching exception.
  1335. * test/*: All files throwing/catching exception.
  1336. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1337. Now auto protocol detection is enabled without -Z option.
  1338. But there is a important difference between with/without -Z optoin.
  1339. For example, if you type:
  1340. aria2c http://host/file file1.torrent file2.metalink http://mirror/file
  1341. then, aria2 interprets there are 3 request groups:
  1342. (1) http://host/file, http://mirror/file <-- multi-source download
  1343. (2) file1.torrent
  1344. (3) file2.metalink
  1345. On the other hand, if you invoke above command with -Z option, it is
  1346. interpreted as 4 request groups:
  1347. (1) http://host/file
  1348. (2) file1.torrent
  1349. (3) file2.metalink
  1350. (4) http://mirror/file
  1351. I think usually user don't mix multi-source URLs and torrent files, so
  1352. there is no big problem here.
  1353. * src/main.cc
  1354. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1355. Fixed the bug that causes segmentaion fault when reading XML containing
  1356. unescapsed character like '&'.
  1357. Also a modification was made which avoids adding unnecessary
  1358. characters stack and appending unused string.
  1359. * src/ExpatMetalinkProcessor.cc
  1360. * src/FileMetalinkParserState.h
  1361. * src/FilesMetalinkParserState.h
  1362. * src/FinMetalinkParserState.h
  1363. * src/HashMetalinkParserState.h
  1364. * src/InitialMetalinkParserState.h
  1365. * src/LanguageMetalinkParserState.h
  1366. * src/MetalinkMetalinkParserState.h
  1367. * src/MetalinkParserState.h
  1368. * src/MetalinkParserStateMachine.cc
  1369. * src/MetalinkParserStateMachine.h
  1370. * src/OSMetalinkParserState.h
  1371. * src/PieceHashMetalinkParserState.h
  1372. * src/PiecesMetalinkParserState.h
  1373. * src/ResourcesMetalinkParserState.h
  1374. * src/SizeMetalinkParserState.h
  1375. * src/SkipTagMetalinkParserState.h
  1376. * src/URLMetalinkParserState.h
  1377. * src/VerificationMetalinkParserState.h
  1378. * src/VersionMetalinkParserState.h
  1379. * src/XML2SAXMetalinkProcessor.cc
  1380. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1381. Added StringFormat class, which internally calls vasprintf.
  1382. operator<< is defined for this class, so it can be used with iostream
  1383. classes nicely. SimpleLogger and following functions are rewritten
  1384. using StringFormat class.
  1385. Besides, now Logger class's methods are non-const, many classes
  1386. that has a const Logger* as a member variable are modified to remove
  1387. const qualifier from the variable declaration.
  1388. * src/HelpItemFactory.cc
  1389. * src/Request.cc
  1390. * src/SimpleLogger.cc
  1391. * src/StringFormat.cc
  1392. * src/StringFormat.h
  1393. * src/Util.cc
  1394. * src/option_processing.cc
  1395. * src/version_usage.cc
  1396. * test/StringFormatTest.cc
  1397. * src/*.h: The classes that has const Logger* as a member variable.
  1398. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1399. Log error in AccRequestGroup when reading BitTorrent/Metalink file is
  1400. failed. Also fixed memory link when exception is thrown there.
  1401. * src/main.cc (AccRequestGroup)
  1402. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1403. Added build-in "Accept-Features" support. For now only "metalink" is
  1404. used in this header field.
  1405. This "metalink" value is removed from the list when connecting URLs
  1406. fed by metalink file to avoid loop in "transparent" metlaink.
  1407. * src/HttpRequest.cc
  1408. * src/HttpRequest.h: Renamed _userHeaders as _headers. Accept-Features
  1409. header is also held in this variable. Also renamed setUserHeaders as
  1410. addHeader and it was rewritten to add header not just to clear the old
  1411. value.
  1412. * src/HttpRequestCommand.cc
  1413. * src/Metalink2RequestGroup.cc: Added the code to remove "metalink"
  1414. from "Accept-Features" list.
  1415. * src/RequestGroup.cc: Added "metalink" to "Accept-Features" by
  1416. default.
  1417. * src/RequestGroup.h
  1418. * src/TaggedItem.cc: Moved Concat class to a2functional.h.
  1419. * src/a2functional.h: Included <string> because Concat class depends on
  1420. it.
  1421. * test/HttpRequestTest.cc
  1422. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1423. Added comment
  1424. * src/RequestGroup.cc (createNextCommand)
  1425. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1426. Capitalized METHOD_GET and METHOD_HEAD
  1427. * src/Request.cc
  1428. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1429. Added getDownloadResults() method
  1430. * src/RequestGroupMan.cc
  1431. * src/RequestGroupMan.h
  1432. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1433. Fixed the bug that aria2 exits when commands is empty() but
  1434. _routineCommands are not.
  1435. * src/DownloadEngine.cc
  1436. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1437. Use the default value pulled from Option object in HelpItemFactory.
  1438. except options whose defualt value is embedded in a usage text.
  1439. * src/HelpItemFactory.cc
  1440. * src/HelpItemFactory.h
  1441. * src/option_processing.cc
  1442. * src/version_usage.cc
  1443. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1444. Added --quiet option to make aria2 quiet (no console output).
  1445. --quiet option is tagged with ADVANCED.
  1446. * src/HelpItemFactory.cc
  1447. * src/LogFactory.cc
  1448. * src/LogFactory.h
  1449. * src/MultiUrlRequestInfo.cc
  1450. * src/MultiUrlRequestInfo.h
  1451. * src/NullStatCalc.h: New class. This class prints nothing.
  1452. * src/OptionHandlerFactory.cc
  1453. * src/main.cc
  1454. * src/option_processing.cc
  1455. * src/prefs.h
  1456. * src/usage_text.h
  1457. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1458. Add HTTP tag to --header option. Removed ADVANCED tag instead.
  1459. * src/HelpItemFactory.cc (createHelpItems):
  1460. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1461. Fixed compilation error in ExpatMetalinkProcessor.cc
  1462. * src/ExpatMetalinkProcessor.cc
  1463. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1464. Reuse socket if the origin server supports HTTP keep-alive and
  1465. --enable-http-keep-alive or --enable-http-pipelining is given.
  1466. The current implementation doesn't reuse the connections established
  1467. against proxy server.
  1468. * src/AbstractCommand.cc
  1469. * src/DownloadEngine.cc
  1470. * src/DownloadEngine.h
  1471. * src/HttpDownloadCommand.cc
  1472. * src/HttpInitiateConnectionCommand.cc
  1473. * src/HttpResponseCommand.cc
  1474. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1475. Rewritten HTTP keep-alive and pipelining routine.
  1476. * src/AbstractCommand.cc
  1477. * src/HttpConnection.cc
  1478. * src/HttpDownloadCommand.cc
  1479. * src/HttpRequest.cc
  1480. * src/HttpRequestCommand.cc
  1481. * src/HttpResponseCommand.cc
  1482. * src/Request.cc
  1483. * src/Request.h
  1484. * src/RequestGroup.cc
  1485. * test/HttpRequestTest.cc
  1486. * test/HttpResponseTest.cc
  1487. * test/RequestTest.cc
  1488. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1489. Added missing setUserHeaders call
  1490. * src/HttpRequestCommand.cc
  1491. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1492. Call FileAllocationMan::nextFileAllocationEntryExists() first.
  1493. Calling FileAllocationMan::isFileAllocationBeingExecuted() is somwhat
  1494. waste of time because it is more likey false.
  1495. * src/FileAllocationDispatcherCommand.cc (execute)
  1496. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1497. Now HTTP status and version are a member variable of HttpHeader.
  1498. HTTP status is processed as a string, not integer.
  1499. * src/AbstractProxyResponseCommand.cc
  1500. * src/HttpConnection.cc
  1501. * src/HttpHeader.cc
  1502. * src/HttpHeader.h
  1503. * src/HttpHeaderProcessor.cc
  1504. * src/HttpHeaderProcessor.h
  1505. * src/HttpResponse.cc
  1506. * src/HttpResponse.h
  1507. * test/HttpHeaderProcessorTest.cc
  1508. * test/HttpResponseTest.cc
  1509. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1510. Added --header option. You can specify any number of additional HTTP headers
  1511. like:
  1512. aria2 --header="X-A: 300" --header="X-B: 900" http://host/file
  1513. Unlike other commad-line option, you can use --header option multiple times.
  1514. * src/HelpItemFactory.cc
  1515. * src/HttpRequest.{cc, h}
  1516. * src/HttpRequestCommand.cc
  1517. * src/OptionHandlerFactory.cc
  1518. * src/OptionHandlerImpl.h
  1519. * src/option_processing.cc
  1520. * src/prefs.h
  1521. * src/usage_text.h
  1522. * test/HttpRequestTest.cc (testUserHeaders)
  1523. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1524. Eliminates the time lag between sequential downloads and commands in
  1525. the same RequestGroup.
  1526. In old implementation, aria2 occasionally waits 1 seconds before
  1527. executing next command or RequestGroup.
  1528. This is really a waste of time, and new implementation eliminates
  1529. this unnecessary time lag.
  1530. * src/AbstractCommand.cc
  1531. * src/AutoSaveCommand.cc
  1532. * src/CheckIntegrityCommand.cc
  1533. * src/Command.{cc, h}
  1534. * src/DownloadEngine.{cc, h}
  1535. * src/DownloadEngineFactory.cc
  1536. * src/FileAllocationCommand.cc
  1537. * src/FileAllocationDispatcherCommand.cc
  1538. * src/FillRequestGroupCommand.cc
  1539. * src/FtpInitiateConnectionCommand.cc
  1540. * src/HaveEraseCommand.cc
  1541. * src/HttpInitiateConnectionCommand.cc
  1542. * src/HttpResponseCommand.cc
  1543. * src/RealtimeCommand.cc
  1544. * src/RequestGroup.cc
  1545. * src/RequestGroupMan.cc
  1546. * src/StreamFileAllocationEntry.cc
  1547. * src/TimeBasedCommand.{cc, h}
  1548. * src/TimedHaltCommand.cc
  1549. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1550. Rewritten SharedHandle. Now copy constructor taking raw pointer has
  1551. keyword explicit and SharedHandle's default constructor initializes
  1552. its internal obj to null, old implementation initializes it using
  1553. obj's default constructor.
  1554. To assign null, write SharedHandle<T> x(...); x.reset();
  1555. TODO: test/SharedHandleTest.cc needs more tests.
  1556. * src/SharedHandle.h
  1557. 2008-04-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1558. Fixed type in man page.
  1559. * doc/aria2c.1.txt
  1560. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1561. Merged Ross's 0.13.1+1 Cygwin compile fix patch.
  1562. * src/SimpleLogger.{cc, h}
  1563. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1564. Implemented auto protocol detection.
  1565. Now you can do:
  1566. aria2c -Z http://host/file file1.torrent file2.metalink
  1567. (Note: -Z option is required for auto protcol detection.)
  1568. Then aria2c downloads 3 files simultaneously:
  1569. 1. http://host/file
  1570. 2. file1.torrent <-- read local torrent file
  1571. 3. file2.metalink <-- read local Metalink file.
  1572. Same thing goes with -i option. Assume your uris.txt contans:
  1573. http://host/file
  1574. file1.torrent
  1575. file2.metalink
  1576. Then you can do: aria2c -i uris.txt
  1577. (Note: -Z option is not needed if -i option is given.)
  1578. * src/main.cc
  1579. * src/ProtocolDetector.{cc, h}
  1580. * test/ProtocolDetectorTest.cc
  1581. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1582. Fixed compile error without gnutls/libgcrypt/libgpg-error and openSSL
  1583. installed
  1584. * src/ARC4Encryptor.h
  1585. * src/ARC4Decryptor.h
  1586. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1587. Renamed argument from 'errno' to 'err', since errno is confused with
  1588. errno defined in errno.h.
  1589. * src/LibgcryptARC4Decryptor.h
  1590. * src/LibgcryptARC4Context.h
  1591. * src/LibgcryptDHKeyExchange.h
  1592. * src/LibgcryptARC4Encryptor.h
  1593. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1594. Rewritten choking algorithm.
  1595. * src/PeerChokeCommand.{cc, h}
  1596. * src/BtInterestedMessage.cc
  1597. * src/PeerSessionResource.{cc, h}
  1598. * src/DefaultPeerStorage.{cc, h}
  1599. * src/BtNotInterestedMessage.cc
  1600. * src/DefaultBtMessageDispatcher.{cc, h}
  1601. * src/BtMessageDispatcher.h
  1602. * src/Peer.{cc, h}
  1603. * src/BtLeecherStateChoke.{cc, h}
  1604. * src/BtSetup.cc
  1605. * src/BtSeederStateChoke.{cc, h}
  1606. * src/PeerStorage.h
  1607. * test/MockPeerStorage.h
  1608. * test/MockBtMessageDispatcher.h
  1609. 2008-04-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1610. Fixed compilation error on x84-64 platform.
  1611. * src/AuthConfig.cc: Included ostream.
  1612. 2008-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1613. Rewritten getBasename() and getDirname(), without standard library
  1614. basename(), dirname().
  1615. * src/File.cc
  1616. * test/FileTest.cc
  1617. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1618. Added Simplified Chinese translation. Also updated the following
  1619. translations: Polish, Dutch, German. Great thanks to all translators.
  1620. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1621. Suppress content-range error when 'Content-Range' response header
  1622. doesn't contains bytes-unit specifier 'bytes'
  1623. * src/HttpHeader.cc (getRange)
  1624. * test/HttpHeaderTest.cc
  1625. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1626. Fixed compilation error with g++-4.3
  1627. 2008-03-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1628. Added missing include files for MinGW
  1629. * test/HttpHeaderProcessorTest.cc
  1630. * test/DHTRoutingTableSerializerTest.cc
  1631. * test/DHTRoutingTableDeserializerTest.cc
  1632. * test/UriListParserTest.cc
  1633. 2008-03-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1634. Now download line is printed nicely with no garbage at the end of
  1635. line. I use ioctl to get the columns of terminal.
  1636. If stdout is redirected to another device, instead of carriage return,
  1637. end of line '\n' character is used. This is feature request#1909659
  1638. * src/ConsoleStatCalc.cc (calculateStat)
  1639. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1640. Included a2time.h
  1641. * src/DHTMessageDispatcher.h
  1642. * src/DHTMessageEntry.h
  1643. * src/DHTReplaceNodeTask.h
  1644. * src/DHTMessageTracker.h
  1645. * src/Util.h
  1646. * src/CookieBox.h
  1647. * src/SocketCore.h
  1648. * src/DefaultBtMessageDispatcher.h
  1649. * src/SocketCore.cc
  1650. * src/Util.cc
  1651. * src/DHTPingTask.h
  1652. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1653. Fixed high memory footprint when DHT is enabled.
  1654. This is not a memory leak, but DHTReplaceNodeTask is more frequently
  1655. queued than it is processed and the queue is getting longer. As a
  1656. consequence, momory usage is increased.
  1657. As for a fix, instead of issuing DHTReplaceNodeTask, I've implemented
  1658. replacement cache in DHTBucket which is described in Kademlia paper.
  1659. * src/DHTRoutingTable.cc (addNode): Removed the issuing of
  1660. DHTReplaceNodeTask.
  1661. * src/DHTBucket.{h, cc}
  1662. (cacheNode): New function.
  1663. (getCachedNodes): New function.
  1664. (dropNode): Push back cached node to _nodes.
  1665. * test/DHTBucketTest.cc
  1666. (testCacheNode): New test
  1667. (testDropNode): New test
  1668. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1669. Allocate memory for peekBuf in initiateSecureConnection() to avoid
  1670. the unused 4KB memory when ssl is not used.
  1671. * src/SocketCore.cc
  1672. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1673. Added summary log for peer announce storage.
  1674. * src/DHTPeerAnnounceStorage.cc (handleTimeout)
  1675. Removed cast
  1676. * src/DefaultPeerStorage.cc (addPeer)
  1677. Log exception message
  1678. * src/DHTMessageTracker.cc (handleTimeout)
  1679. Fixed casting
  1680. * test/HttpRequestTest.cc
  1681. * test/MetalinkProcessorTest.cc
  1682. * test/PieceTest.cc
  1683. * test/MetalinkEntryTest.cc
  1684. * test/SequenceTest.cc
  1685. 2008-03-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1686. * src/ParameterizedStringParser.cc (createLoop):
  1687. Removed unused variable sstep.
  1688. * src/AlphaNumberDecorator.h (decode): Rewritten.
  1689. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1690. * src/Util.{h, cc}
  1691. (parseUInt): New function.
  1692. (alphaToNum): Now returns unsigned int and 0 when overflow detected.
  1693. The actual range is uint32_t.
  1694. * test/UtilTest.cc
  1695. * src/ParameterizedStringParser.cc:
  1696. Use Util::parseUInt() for loop variables.
  1697. * test/ParameterizedStringParserTest.cc
  1698. * src/PStringNumLoop.h: Make _startValue and _endValue unsigned int.
  1699. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1700. Rewritten the functions for binding port.
  1701. * src/DHTConnectionImpl.{h, cc}
  1702. * src/PeerListenCommand.{h, cc}
  1703. * src/DHTSetup.cc
  1704. * src/BtSetup.cc
  1705. * test/DHTConnectionImplTest.cc
  1706. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1707. type cleanup for allmost all remaining files.
  1708. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1709. Type clarification
  1710. * src/PeerSessionResource.{h, cc}
  1711. * src/DefaultPieceStorage.{h, cc}
  1712. * src/Peer.{h, cc}
  1713. * test/PeerSessionResourceTest.cc
  1714. Use div function
  1715. * src/BtPieceMessage.cc (erasePieceOnDisk)
  1716. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1717. Type clarification
  1718. * src/DefaultPeerStorage.{h, cc}
  1719. * test/DefaultPeerStorageTest.cc
  1720. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1721. Type clarification: size_t for length or size, uint64_t for file
  1722. length, off_t for file offset.
  1723. * src/DefaultBtProgressInfoFile.cc
  1724. * src/DefaultBtContext.{h, cc}
  1725. * src/DefaultBtInteractive.cc
  1726. * src/DownloadCommand.{h, cc}
  1727. * src/IteratableChunkChecksumValidator.{h, cc}
  1728. * src/SegmentMan.{h, cc}
  1729. * src/SingleFileDownloadContext.{h, cc}
  1730. * src/IteratableChecksumValidator.{h, cc}
  1731. * src/BtContext.h
  1732. * src/IteratableValidator.h
  1733. * src/DownloadContext.h
  1734. * test/SingleFileDownloadContextTest.cc
  1735. * test/DefaultBtContextTest.cc
  1736. * test/MockBtContext.h
  1737. * test/Metalink2RequestGroupTest.cc
  1738. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1739. Type clarification: size_t for length or size, uint64_t for file
  1740. length, off_t for file offset.
  1741. * src/PiecedSegment.cc
  1742. * src/GrowSegment.h
  1743. * src/DefaultBtRequestFactory.h
  1744. * src/DefaultBtProgressInfoFile.cc
  1745. * src/UnknownLengthPieceStorage.h
  1746. * src/DefaultPieceStorage.cc
  1747. * src/UnknownLengthPieceStorage.cc
  1748. * src/DefaultBtInteractive.cc
  1749. * src/GrowSegment.cc
  1750. * src/BitfieldMan.h
  1751. * src/DownloadCommand.cc
  1752. * src/BtRequestFactory.h
  1753. * src/PiecedSegment.h
  1754. * src/DefaultPieceStorage.h
  1755. * src/Piece.cc
  1756. * src/DefaultBtRequestFactory.cc
  1757. * src/PieceStorage.h
  1758. * src/Segment.h
  1759. * src/Piece.h
  1760. * src/BitfieldMan.cc
  1761. * src/Util.cc
  1762. * test/DefaultBtProgressInfoFileTest.cc
  1763. * test/DefaultPieceStorageTest.cc
  1764. * test/MockPieceStorage.h
  1765. * test/BtRequestMessageTest.cc
  1766. * test/DefaultBtMessageDispatcherTest.cc
  1767. * test/BitfieldManTest.cc
  1768. * test/GrowSegmentTest.cc
  1769. * test/PieceTest.cc
  1770. * test/SegmentTest.cc
  1771. * test/SegmentManTest.cc
  1772. * test/DefaultBtRequestFactoryTest.cc
  1773. * test/MockBtRequestFactory.h
  1774. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1775. Fixed compilation error with --disable-nls
  1776. It seems that defining gettext(Msgid) to ((const char *) (Msgid))
  1777. in gettext.h causes the problem.
  1778. * src/common.h
  1779. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1780. Removed subPiece related functions.
  1781. * src/Piece.{h, cc} : Also rewritten getCompletedLength().
  1782. * src/DefaultPieceStorage.{h, cc}
  1783. * test/PieceTest.cc
  1784. * test/DefaultPieceStorageTest.cc
  1785. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1786. Use unsigned char for data store.
  1787. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1788. Bump up version number to 0.13.0+1
  1789. * configure.ac
  1790. * Release 0.13.0+1
  1791. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1792. Changed inactive connection timeout to 120.
  1793. To accept more mulually interested peers, disconnect peer when there
  1794. is no interest between us after certain time passed.
  1795. * src/DefaultBtInteractive.cc (checkActiveInteraction)
  1796. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1797. Fixed the bug that aria2 only uses first dns server in resolv.conf
  1798. when compiled with async DNS support.
  1799. * src/DownloadEngine.cc
  1800. * src/option_processing.cc: Lengthened DNS timeout to 30. I think old
  1801. value '10' will be a little bit short when some DNS servers are
  1802. offline and several DNS servers are tried. It should be configured
  1803. by command-line option.
  1804. 2008-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1805. Merged Ross's mingw patch.
  1806. * src/DHTRoutingTableDeserializer.cc
  1807. * src/DHTRoutingTableSerializer.cc
  1808. * src/Platform.{h, cc}
  1809. * src/timegm.h
  1810. * src/gettimeofday.h
  1811. * src/getaddrinfo.h
  1812. * src/SocketCore.h
  1813. * src/common.h
  1814. * src/inet_aton.h
  1815. * src/DownloadEngine.h
  1816. * src/gai_strerror.h
  1817. * src/a2netcompat.h
  1818. * configure.ac
  1819. * configure
  1820. * aclocal.m4
  1821. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1822. Included missing iostream.
  1823. * test/AllTest.cc
  1824. * test/BtDependencyTest.cc
  1825. * test/BtExtendedMessageTest.cc
  1826. * test/DHTConnectionImplTest.cc
  1827. * test/DHTMessageFactoryImplTest.cc
  1828. * test/DHTMessageTrackerEntryTest.cc
  1829. * test/DHTNodeTest.cc
  1830. * test/DHTRoutingTableSerializerTest.cc
  1831. * test/DefaultBtAnnounceTest.cc
  1832. * test/DefaultBtContextTest.cc
  1833. * test/DefaultBtMessageFactoryTest.cc
  1834. * test/DefaultExtensionMessageFactoryTest.cc
  1835. * test/HandshakeExtensionMessageTest.cc
  1836. * test/HttpResponseTest.cc
  1837. * test/MetalinkProcessorTest.cc
  1838. * test/MultiFileAllocationIteratorTest.cc
  1839. * test/SocketCoreTest.cc
  1840. * test/UTPexExtensionMessageTest.cc
  1841. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1842. Reorganized includes.
  1843. * src/NameResolver.cc
  1844. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1845. Fixed compilation error without ares/c-ares
  1846. * src/NameResolver.h:
  1847. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1848. Added a test for large file.
  1849. * test/MetalinkProcessorTest.cc (testLargeFileSize):
  1850. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1851. Fixed the bug that file size is ignored if size > INT32_MAX
  1852. * src/SizeMetalinkParserState.cc (endElement):
  1853. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1854. Bump up version number to 0.13.0
  1855. * configure.ac
  1856. * Release 0.13.0
  1857. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1858. Updated Makfefile.am to make 'make dist' work.
  1859. Now packaged filename is aria2c-VERSION.tar.bz2.
  1860. Added README, README.html, and aria2c.1.html to dist_doc_DATA.
  1861. Added LICENSE.OpenSSL to dist_noinst_DATA.
  1862. Large file support is now configured by configure script.
  1863. * configure.ac
  1864. Removed unsused source files
  1865. * src/
  1866. * test/
  1867. Removed PeerDecl.h and BtContextDecl.h. typedefs are removed to
  1868. Peer.h and BtContext.h respectively.
  1869. * src/Peer.h
  1870. * src/BtContext.h
  1871. Updated translations.
  1872. Added Polish, Thai, Indonesian, Norwegian Nynorsk, Hungarian
  1873. translations. Great thanks to all translators!;)
  1874. * po/*.{po, gmo}
  1875. 2008-02-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1876. Create MessageDigestHelper::staticSHA1DigestInit() which uses
  1877. statically declared sha1 MessageDigestContext.
  1878. * src/BtPieceMessage.cc: Use staticSHA1DigestInit() to avoid
  1879. initialization of short-lived MessageDigestContext.
  1880. * src/MessageDigestHelper.{h, cc}
  1881. * src/main.cc
  1882. Now DownloadCommand has a reference to MessageDigestContext to avoid
  1883. the initialization of MessageDigestContext every time in validating
  1884. chunk checksum.
  1885. * src/DownloadCommand.{h, cc}
  1886. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1887. Add a file descriptor which connected to fast peer(latency<1500) to
  1888. select(). This change reduced CPU load.
  1889. * src/PeerInteractionCommand.cc
  1890. * src/DefaultBtInteractive.{h, cc}
  1891. * src/BtInteractive.h
  1892. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1893. Fixed the previous insufficient fix for possible busy loop.
  1894. * src/MSEHandshake.cc (identifyHandshakeType)
  1895. Removed unused functions.
  1896. * src/MSEHandshake.{h, cc} (readDataAndDecrypt)
  1897. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1898. Fixed possible busy loop if first 20 bytes are not received for a few
  1899. minutes.
  1900. * src/MSEHandshake.{h, cc} (identifyHandshakeType)
  1901. * src/ReceiverMSEHandshakeCommand.cc
  1902. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1903. Fixed compilation error
  1904. * src/ExpatMetalinkProcessor.cc
  1905. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1906. Fixed compile error on Mac OS X, on 64Bit OS maybe.
  1907. * src/DHTBucket.cc
  1908. Removed unnecessary cast.
  1909. * src/HandshakeExtensionMessage.cc
  1910. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1911. Fixed the bug that option handler for PREF_METALINK_ENABLE_UNIQUE_PROTOCOL.
  1912. is missing.
  1913. * src/OptionHandlerFactory.cc
  1914. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1915. Fixed the bug that HAVE message is not sent for a piece they are
  1916. downloaded fom http/ftp server before any BitTorrent handshake is done
  1917. with peers.
  1918. * src/DefaultBtInteractive.cc
  1919. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1920. Removed RequestInfo.h and FileAllocator.h since they have been removed.
  1921. * src/Makefile.am
  1922. * src/Makefile.in
  1923. 2008-02-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1924. Updated README. Added html version of README and man page.
  1925. * README
  1926. * README.html
  1927. * readme2html: Shell script to generate README.html from README using
  1928. asciidoc.
  1929. * doc/aria2c.1.html
  1930. * doc/makeman: Added the line to generate aria2c.1.html
  1931. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1932. Fixed offset calculation.
  1933. * src/LibgcryptDHKeyExchange.h (computeSecret)
  1934. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1935. Rewritten itos and uitos using template. llitos and ullitos are
  1936. replaced with itos and uitos respectively.
  1937. * src/Util.{h, cc}
  1938. * test/UtilTest.cc
  1939. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1940. Fixed the bug that DH key exchange sometimes fails due to bad handling
  1941. of the number of bytes required for storing public key and shared
  1942. secret.
  1943. * src/LibgcryptDHKeyExchange.h
  1944. * src/LibsslDHKeyExchange.h: Also added function name to handleError.
  1945. * src/MSEHandshake.cc
  1946. * test/DHKeyExchangeTest.cc
  1947. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1948. Removed since they are not used.
  1949. * src/Xml2MetalinkProcessor.{h, cc}
  1950. * src/Socket.cc
  1951. * src/SegmentSplitter.{h, cc}
  1952. * test/Xml2MetalinkProcessorTest.cc
  1953. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1954. Fixed the bug that prevents aria2 from stopping other than by pressing
  1955. Ctrl-C in BitTorrent download. It is reproducible using --seed-time
  1956. option. aria2 doesn't stop even after --seed-time is satisfied and
  1957. continues to output blank lines in the console.
  1958. * src/ReceiverMSEHandshakeCommand.cc
  1959. * src/PeerReceiveHandshakeCommand.cc
  1960. * src/PeerListenCommand.cc
  1961. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1962. Bump up version number to 0.13.0rc
  1963. * configure.ac
  1964. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1965. Updated man page and some usage text.
  1966. * doc/aria2c.1.txt
  1967. * src/usage_text.h
  1968. * po/*.{po, gmo}
  1969. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1970. Updated translations. Added Finnish and Hebrew translations.
  1971. Great thanks to all translators!
  1972. * po/*.{po, gmo}
  1973. * po/LINGUAS
  1974. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1975. Log more detailed information about each message.
  1976. * src/DHTQueryMessage.{h, cc}
  1977. * src/DHTGetPeersMessage.{h, cc}
  1978. * src/DHTFindNodeReplyMessage.{h, cc}
  1979. * src/DHTGetPeersReplyMessage.{h, cc}
  1980. * src/DHTAnnouncePeerMessage.{h, cc}
  1981. * src/DHTResponseMessage.{h, cc}
  1982. * src/DHTFindNodeMessage.{h, cc}
  1983. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1984. Use constants defined in prefs.h
  1985. * src/option_processing.cc
  1986. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1987. * test/AllTest.cc: Added OpenSSL, GNUTLS initialization code.
  1988. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1989. Make room for future enchancements for IPv6 addresses.
  1990. Bump up version number of dht.dat file format to 2.
  1991. Not compatible with previous version.
  1992. * src/DHTRoutingTableSerializer.cc
  1993. * src/DHTRoutingTableDeserializer.cc
  1994. * test/DHTRoutingTableSerializerTest.cc
  1995. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1996. Added handling for the return values from
  1997. PeerMessageUtil::createcompact().
  1998. * src/DefaultBtContext.cc (computeFastSet):
  1999. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2000. Fixed abort when peer's ip address is IPv4-mapped address.
  2001. * src/DefaultBtContext.cc (computeFastSet)
  2002. Removed number-and-dots criteria, since Util::isNumberAndDotsNotation()
  2003. cannot handle IPv4-mapped addresses.
  2004. * src/DefaultBtInteractive.cc (addPeerExchangeMessage)
  2005. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2006. Proper return value handling for OpenSSL functions.
  2007. * src/LibsslDHKeyExchange.h
  2008. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2009. Random bytes generation using libgcrypt and OpenSSL.
  2010. * src/DHTUtil.{h, cc}
  2011. * test/DHTUtilTest.cc
  2012. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2013. Fixed segmentation fault when a DHT message which doesn't have 'y' key
  2014. received.
  2015. * src/DHTMessageReceiver.cc (receiveMessage)
  2016. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2017. Fixed the bug that a return code is always 0. BUG#1897704
  2018. If error occurred during the download or there exist unfinished
  2019. downloads, aria2 returns with code 1.
  2020. * src/RequestGroupMan.{h, cc}
  2021. * src/MultiUrlRequestInfo.{h, cc}
  2022. * src/main.cc
  2023. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2024. IPv6 support for SocketCore class.
  2025. TODO: In SocketCore::establishConnection(), this is insufficient to
  2026. determin the failure of connect() here because the socket is
  2027. non-blocking state. The next addresses should be tried after select().
  2028. TODO: NameResolver still uses c-ares(<= 1.4) ares_gethostbyname().
  2029. If c-ares 1.5 or newer is installed, ares_getaddrinfo() should be used
  2030. instead which address family independent.
  2031. TODO: DHTRoutingTable{Deserializer,Serializer} currently saves peer
  2032. information in a compact peer format which is for IPv4 only.
  2033. Some BitTorrent functions in PeerMessageUtil still depends on IPv4 but
  2034. this is a spec of BitTorrent protocol.
  2035. * src/SocketCore.{h, cc}
  2036. * src/PeerMessageUtil.cc
  2037. * test/SocketCoreTest.cc
  2038. * test/PeerMessageUtilTest.cc
  2039. * test/DHTConnectionImplTest.cc
  2040. Handle IPv4-mapped addresses.
  2041. * src/DHTNode.cc: Now identity is determined by node id.
  2042. * src/DHTMessageTrackerEntry.cc
  2043. Because now PeerMessageUtil::unpackcompact() could fail, the caller
  2044. should handle it.
  2045. * src/DHTRoutingTableDeserializer.cc
  2046. * src/DHTMessageFactoryImpl.cc
  2047. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2048. Change the unit of --stop option from a minute to a second.
  2049. * src/usage_text.h
  2050. * src/DownloadEngineFactory.cc
  2051. * src/OptionHandlerFactory.cc
  2052. * src/message.h
  2053. * src/TimedHaltCommand.cc
  2054. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2055. Make listening socket non-block mode.
  2056. * src/FtpConnection.cc
  2057. * src/FtpNegotiationCommand.{h, cc}
  2058. * src/PeerListenCommand.cc
  2059. Fixed the bug that cause slow ftp negotiation.
  2060. * src/FtpNegotiationCommand.{h, cc}
  2061. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2062. Added basic tag to --enable-dht, --dht-listen-port option.
  2063. * src/HelpItemFactory.cc (createHelpItems)
  2064. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2065. Updated text.
  2066. * src/usage_text.h
  2067. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2068. * src/MSEHandshake.cc (encryptAndSendData): Use std::min().
  2069. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2070. Determin _threadtholdSpeed in each constructor for
  2071. ActivePeerConnectionCommand and PeerReceiveHandshakeCommand.
  2072. * src/ActivePeerConnectionCommand.{h, cc}
  2073. * src/PeerReceiveHandshakeCommand.{h, cc}
  2074. * src/BtSetup.cc
  2075. * src/BtConstants.h
  2076. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2077. Added --bt-min-crypto-level and --bt-require-crypto options.
  2078. * src/OptionHandlerFactory.cc
  2079. * src/MSEHandshake.cc
  2080. * src/HelpItemFactory.cc
  2081. * src/option_processing.cc
  2082. * src/ReceiverMSEHandshakeCommand.cc
  2083. * src/prefs.h
  2084. * src/DefaultBtAnnounce.cc
  2085. * src/InitiatorMSEHandshakeCommand.cc
  2086. * src/usage_text.h
  2087. * test/MSEHandshakeTest.cc
  2088. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2089. Bump version number to 0.13.0b
  2090. * configure.ac
  2091. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2092. Updated doc.
  2093. * src/MessageDigestHelper.h:
  2094. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2095. Use raw message digest as a token instead of its hexadecimal
  2096. representation.
  2097. * src/DHTTokenTracker.cc (generateToken)
  2098. 2008-02-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2099. Added Message Stream Encryption(MSE) support.
  2100. Currently, aria2 accepts incoming connections with Obfuscation Header
  2101. and legacy BitTorrent Header and establishes connections with
  2102. Obfuscation Header first and if failed then retry with legacy
  2103. BitTorrent header. If plain text and ARC4 is provided, aria2 always
  2104. choose ARC4. The new option to change the default behavior is planned.
  2105. For tracker extension, "supportcrypto=1" is added statically.
  2106. * src/PeerInitiateConnectionCommand.{h, cc}
  2107. * src/PeerConnection.{h, cc}
  2108. * src/HandleRegistry.h
  2109. * src/SocketCore.h
  2110. * src/PeerReceiveHandshakeCommand.{h, cc}
  2111. * src/BtRegistry.{h, cc}
  2112. * src/PeerListenCommand.cc
  2113. * src/InitiatorMSEHandshakeCommand.{h, cc}
  2114. * src/ReceiverMSEHandshakeCommand.{h, cc}
  2115. * src/MSEHandshake.{h, cc}
  2116. * src/ARC4Encryptor.h
  2117. * src/ARC4Decryptor.h
  2118. * src/LibgcryptARC4Encryptor.h
  2119. * src/LibgcryptARC4Decryptor.h
  2120. * src/LibgcryptARC4Context.h
  2121. * src/LibsslARC4Encryptor.h
  2122. * src/LibsslARC4Decryptor.h
  2123. * src/LibsslARC4Context.h
  2124. * src/DHKeyExchange.h
  2125. * src/LibgcryptDHKeyExchange.h
  2126. * src/LibsslDHKeyExchange.h
  2127. * src/DefaultBtAnnounce.cc: Just added "supportcrypto=1" parameter.
  2128. * test/DefaultBtAnnounceTest.cc
  2129. * test/ARC4Test.cc
  2130. * test/DHKeyExchangeTest.cc
  2131. Removed prepareForRetry() because it is not used.
  2132. * src/PeerAbstractCommand.{h, cc}
  2133. * src/PeerInteractionCommand.{h, cc}
  2134. * src/PeerInitiateConnectionCommand.{h, cc}
  2135. 2008-02-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2136. Added the ability to load nodes from torrent file. These nodes are
  2137. added to the routing table when downloading that torrent.
  2138. * src/BtContext.h
  2139. * src/DefaultBtContext.{h, cc}
  2140. * src/DHTSetup.cc
  2141. * src/DHTEntryPointNameResolveCommand.{h, cc}: Now accepts list of
  2142. hostname and port pair, and resolves all of them.
  2143. * src/NameResolver.{h, cc}: Added reset().
  2144. * src/RequestGroup.cc
  2145. * test/DefaultBtContextTest.cc
  2146. * test/MockBtContext.h
  2147. Removed assert() from DefaultBtContext and throw exception instead.
  2148. * src/DefaultBtContext.cc
  2149. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2150. Fixed segmentation fault bug when exiting if dht is disabled.
  2151. * src/RequestGroup.cc
  2152. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2153. Fixed typo in log message and define the message in message.h
  2154. * src/TimedHaltCommand.cc
  2155. * src/message.h
  2156. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2157. Included RecoverableException.h to fix compilation error.
  2158. * test/DHTMessageFactoryImplTest.cc
  2159. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2160. Added test 'testDoReceivedAction' for DHTQueryMessage subclasses.
  2161. * test/DHTPingMessageTest.cc
  2162. * test/DHTGetPeersMessageTest.cc
  2163. * test/DHTFindNodeMessageTest.cc
  2164. * test/DHTAnnouncePeerMessageTest.cc
  2165. * test/MockDHTMessage.h
  2166. * test/MockDHTMessageFactory.h
  2167. * test/MockDHTMessageDispatcher.h: New class.
  2168. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2169. Added DHTMessageDispatcherImpl. Now DHTMessageDispatcher is pure
  2170. virtual.
  2171. * src/DHTMessageDispatcher.h
  2172. * src/DHTMessageDispatcherImpl.{h, cc}
  2173. * src/DHTSetup.cc
  2174. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2175. Adding handling of DHT error message. Just log error message and
  2176. throw exception.
  2177. * src/DHTMessageFactoryImpl.cc
  2178. * test/DHTMessageFactoryImplTest.cc
  2179. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2180. Added handling of dynamic cast failure.
  2181. * src/DHTNodeLookupTask.cc
  2182. * src/DHTPeerLookupTask.cc
  2183. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2184. Added the ability to stop aria2 itself when given time has passed
  2185. from start. Use --stop option to specify time in minutes.
  2186. When 0 is given, this feature is disabled.
  2187. * src/OptionHandlerFactory.cc
  2188. * src/TimeBasedCommand.h: Make _interval protected scope.
  2189. * src/HelpItemFactory.cc
  2190. * src/option_processing.cc
  2191. * src/prefs.h
  2192. * src/FillRequestGroupCommand.cc: Evaluate _e->isHaltRequested()
  2193. before calling RequestGroupMan::fillRequestGroupFromReserver().
  2194. Without this modification, the result list shows "ERR" when aria2 is
  2195. stopped by --stop option. It should be "INPR".
  2196. * src/DownloadEngine.{h, cc}
  2197. * src/DownloadEngineFactory.cc
  2198. * src/usage_text.h
  2199. * src/TimedHaltCommand.{h, cc}: New class.
  2200. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2201. Bootstrap through node added by port message.
  2202. Currently bootstrap is executed if the number of buckets in routing
  2203. table is 1.
  2204. * src/BtPortMessage.{h, cc}
  2205. * src/DefaultBtMessageFactory.{h, cc}
  2206. * src/PeerInteractionCommand.cc
  2207. * test/BtPortMessageTest.cc
  2208. * test/MockDHTTask.h
  2209. 2008-02-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2210. Extract the Peer class's member variables, which are only needed after
  2211. PeerInteractionCommand, into PeerSessionResource class.
  2212. This class is instantiated in PeerInteractionCommand class's ctor and
  2213. released in its dtor.
  2214. This will make Peer class lightweight and uses less memory for peers
  2215. which are not connected and wait in the queue.
  2216. * src/PeerChokeCommand.cc
  2217. * src/PeerSessionResource.{h, cc}
  2218. * src/PeerInteractionCommand.cc
  2219. * src/PeerAbstractCommand.cc: Note: 0 is given to onAbort() function.
  2220. * src/DefaultBtInteractive.cc
  2221. * src/BtPieceMessage.cc
  2222. * src/BtInterestedMessage.cc
  2223. * src/BtUnchokeMessage.cc
  2224. * src/DefaultPeerStorage.{h, cc}
  2225. * src/PeerInitiateConnectionCommand.cc
  2226. * src/ActivePeerConnectionCommand.cc
  2227. * src/BtNotInterestedMessage.cc
  2228. * src/DefaultBtMessageDispatcher.cc
  2229. * src/BtChokeMessage.cc
  2230. * src/BtRequestMessage.cc
  2231. * src/Peer.{h, cc}
  2232. * src/BtRegistry.h
  2233. * src/TrackerWatcherCommand.cc
  2234. * src/PeerReceiveHandshakeCommand.cc
  2235. * test/BtExtendedMessageTest.cc
  2236. * test/BtAllowedFastMessageTest.cc
  2237. * test/BtCancelMessageTest.cc
  2238. * test/DefaultPieceStorageTest.cc
  2239. * test/BtBitfieldMessageTest.cc
  2240. * test/BtHaveMessageTest.cc
  2241. * test/BtNotInterestedMessageTest.cc
  2242. * test/BtRequestMessageTest.cc
  2243. * test/PeerSessionResourceTest.cc
  2244. * test/DefaultBtMessageDispatcherTest.cc
  2245. * test/PeerTest.cc
  2246. * test/BtInterestedMessageTest.cc
  2247. * test/BtRejectMessageTest.cc
  2248. * test/BtChokeMessageTest.cc
  2249. * test/DefaultPeerStorageTest.cc
  2250. * test/BtHaveNoneMessageTest.cc
  2251. * test/BtHaveAllMessageTest.cc
  2252. * test/DefaultExtensionMessageFactoryTest.cc
  2253. * test/BtUnchokeMessageTest.cc
  2254. * test/DefaultBtMessageFactoryTest.cc
  2255. * test/HandshakeExtensionMessageTest.cc
  2256. * test/UTPexExtensionMessageTest.cc
  2257. * test/DefaultBtRequestFactoryTest.cc
  2258. * test/BtPieceMessageTest.cc
  2259. Removed typedef PeerStats.
  2260. * src/PeerStat.h
  2261. * src/SegmentMan.cc
  2262. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2263. Added std namespace to copy, remove_copy, back_inserter,
  2264. front_inserter.
  2265. * src/RequestGroupMan.cc
  2266. * src/DefaultPieceStorage.cc
  2267. * src/StreamFileAllocationEntry.cc
  2268. * src/BtFileAllocationEntry.cc
  2269. * src/RequestGroup.cc
  2270. * src/MetalinkEntry.cc
  2271. * src/DelegatingPeerListProcessor.cc
  2272. * src/DefaultBtRequestFactory.cc
  2273. * src/DefaultBtMessageDispatcher.cc
  2274. * src/version_usage.cc: Included <algorithm>
  2275. * src/main.cc
  2276. * src/MetalinkParserController.cc
  2277. * src/DefaultBtContext.cc
  2278. * src/DownloadEngineFactory.cc
  2279. * src/a2algo.h
  2280. Removed.
  2281. * test/StreamUriListParserTest.cc
  2282. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2283. Use PREF_MAX_DOWNLOAD_LIMIT as a threshold for
  2284. ActivePeerConnectionCommand when it is given and
  2285. PREF_MAX_DOWNLOAD_LIMIT < default threshold.
  2286. * src/ActivePeerConnectionCommand.{h, cc}
  2287. * src/BtSetup.cc
  2288. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2289. Only add socket to DownloadEngine's select routine when peer or
  2290. localhost is unchoked and interested. This lowers CPU usage a
  2291. little bit.
  2292. * src/PeerInteractionCommand.cc
  2293. * src/PeerAbstractCommand.{h, cc}
  2294. * src/BtInteractive.h
  2295. * src/DefaultBtInteractive.{h, cc}
  2296. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2297. Revert previous change because get_peers message is needed for
  2298. announce_peer anyway.
  2299. * src/DHTGetPeersCommand.cc
  2300. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2301. Request peers thought DHT only when download hasn't finished.
  2302. * src/DHTGetPeersCommand.cc
  2303. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2304. Force refresh bucket when startup if certain time has passed(currently 15 minutes).
  2305. * src/DHTBucketRefreshTask.{h, cc}
  2306. * src/DHTSetup.cc
  2307. 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2308. Removed "using namespace std;" from all sources. Appended std:: prefix to c++
  2309. standard classes.
  2310. Included string.h where mem* function are used.
  2311. Added namespace aria2.
  2312. 2008-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2313. Create directory before saving DHT routing table.
  2314. Now ios::failure is now handled properly.
  2315. * src/DHTAutoSaveCommand.cc
  2316. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2317. Removed unnecessary cerr.
  2318. * src/DownloadEngine.cc
  2319. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2320. Catch exception inside DHTMessageReceiver::receiveMessage().
  2321. Log unknown message.
  2322. * src/DHTMessageReceiver.{h, cc}
  2323. * src/DHTMessageFactory.h
  2324. * src/DHTMessageFactoryImpl.{h, cc}
  2325. * src/DHTMessageTracker.cc (handleTimeout): Catch and handle exception.
  2326. * src/DHTInteractionCommand.cc
  2327. * src/DHTUnknownMessage.{h, cc}
  2328. * test/DHTUnknownMessageTest.cc
  2329. * test/MockDHTMessageFactory.h
  2330. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2331. Commented out ip address comparison because a host can have multiple
  2332. ip addresses and it is hard to predict the hostname is resolved into
  2333. which one.
  2334. * test/SocketCoreTest.cc (testWriteAndReadDatagram)
  2335. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2336. * po/Makefile.in: Removed since this is generated by configure.
  2337. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2338. Fixed compiler warning about redefinition of SIZE_MAX.
  2339. Use common.h instead of config.h directly here.
  2340. * src/Platform.{h, cc}
  2341. The check of ENABLE_NLS is made in gettext.h, so it is not required
  2342. here.
  2343. * common.h
  2344. 2008-02-02 gettextize <bug-gnu-gettext@gnu.org>
  2345. Updated gettext related files.
  2346. * configure.ac (AC_CONFIG_FILES): Add intl/Makefile.
  2347. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17.
  2348. 2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2349. Added DHT functionality, compatible with mainline.
  2350. DHT is disabled by default. To enable it, give --enable-dht to aria2c.
  2351. You may need to specify entry point to DHT network using
  2352. --dht-entry-point. DHT uses UDP port to listen incoming message.
  2353. Use --dht-listen-port to specify port number. Make sure that your
  2354. firewall configuration can pass through UDP traffic to the port.
  2355. The routing table is saved in $HOME/.aria2/dht.dat.
  2356. * src/DHT*
  2357. * src/BNode.{h, cc}
  2358. * src/PeerInteractionCommand.cc: enable DHT functionality for a
  2359. particular torrent.
  2360. * src/Data.cc: Rewritten ctor.
  2361. * src/OptionHandlerFactory.cc: Added --enable-dht, --dht-listen-port,
  2362. --dht-entry-point.
  2363. * src/DefaultBtInteractive.cc: Send port message if dht is enabled.
  2364. * src/RequestGroup.cc: Initialize DHT functionality. When download
  2365. ends, remove BtContext from DHTPeerAnnounceStorage.
  2366. * src/BtPortMessage.{h, cc}: Rewritten.
  2367. * src/message.h
  2368. * src/OptionHandlerImpl.cc
  2369. * src/option_processing.cc: Added --enable-dht, --dht-listen-port,
  2370. --dht-entry-point.
  2371. * src/Dictionary.{h, cc} (remove): New function.
  2372. * src/prefs.h
  2373. * src/DefaultBtMessageFactory.h
  2374. * src/BtHandshakeMessage.cc
  2375. * src/ActivePeerConnectionCommand.cc
  2376. * src/SocketCore.{h, cc}: Added datagram socket support.
  2377. * src/DefaultBtMessageFactory.cc
  2378. * src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
  2379. Create DHT commands.
  2380. * src/BtMessageFactory.h
  2381. * src/PeerMessageUtil.{h, cc}
  2382. 2008-01-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2383. Fixed the bug that log file is not written when configuration file doesn't exist.
  2384. This is caused by using Logger class before LogFactory is not configured.
  2385. BUG #1875079
  2386. * src/option_processing.cc
  2387. Warning message "configuration doesn't exist" is only printed when --conf is
  2388. given.
  2389. * src/option_processing.cc
  2390. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2391. Use BencodeVisitor and MessageDigestHelper instead of ShaVisitor.
  2392. ShaVisitor is now deprecated and slated to be removed.
  2393. * src/DefaultBtContext.cc
  2394. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2395. Externalize message to message.h
  2396. * src/Platform.cc
  2397. * src/message.h
  2398. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2399. Set default domain and default path to cookie.
  2400. * src/HttpResponse.cc
  2401. * src/CookieBox.{h, cc}
  2402. * src/CookieParser.{h, cc}
  2403. * test/CookieParserTest.cc
  2404. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2405. Added --no-conf and --conf-path command-line option.
  2406. --no-conf option disables loading aria2.conf file.
  2407. --conf-path option changes the configuration file path. The default
  2408. file path is $HOME/.aria2/aria2.conf
  2409. Added a warning message when the configuration file is not found.
  2410. * src/HelpItemFactory.cc
  2411. * src/option_processing.cc
  2412. * src/prefs.h
  2413. * src/usage_text.h
  2414. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2415. Added the message to inform users that other help categories are
  2416. available in -h option.
  2417. * src/version_usage.cc
  2418. * src/TagContainer.{h, cc}
  2419. * test/TagContainerTest.cc
  2420. * src/TaggedItem.{h, cc}
  2421. * test/TaggedItemTest.cc
  2422. * src/HelpItem.h
  2423. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2424. Added Piece::getFirstMissingBlockIndexWithoutLock() and it is called
  2425. from PiecedSegment's ctor.
  2426. Previously Piece::getAllMissingBlockIndexes() is called from
  2427. PiecedSegment() but it is rather expensive since only first element is
  2428. used.
  2429. * src/PiecedSegment.cc
  2430. * src/Piece.{h, cc}
  2431. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2432. Rewritten get*Missing*Index functions. Now no need to allocate memory
  2433. each time these functions are called.
  2434. * src/BitfieldMan.{h, cc}
  2435. * test/BitfieldManTest.cc
  2436. * src/array_fun.h
  2437. * test/array_funTest.cc
  2438. Now BitfieldMan::countBlock() returns BitfieldMan::blocks.
  2439. Added new BitfieldMan::countFilteredBlock() to get the number of blocks
  2440. filtered. Removed unnecessary cast to int32_t.
  2441. * src/BitfieldMan.{h, cc}
  2442. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2443. Fixed the bug that EX_TOO_LONG_PAYLOAD exception is thrown if just
  2444. payload length(4bytes) are received. This happens because lenbufLength
  2445. is not updated in this particular case and successive call of
  2446. receiveMessage() overwrites payload length with bytes recieved which
  2447. are payload body.
  2448. * src/PeerConnection.{h, cc}
  2449. * src/message.h
  2450. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2451. Fixed the bug that DefaultPeerStorage::returnPeer() may delete wrong
  2452. peer if there are peers that have same ipaddr and port.
  2453. I've experiened segmentation fault and "pure virtual function was
  2454. called" error.
  2455. * src/Peer.h
  2456. * test/PeerTest.cc
  2457. * src/DefaultPeerStorage.cc
  2458. * test/DefaultPeerStorageTest.cc
  2459. 2008-01-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2460. Removed a call to isPowerOf() because it is no longer necessary here
  2461. and a request block is not always power of 2.
  2462. BUG#1866924
  2463. * src/PeerMessageUtil.cc (checkLength)
  2464. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2465. Fixed the bug that always first found Segment is removed from
  2466. usedSegmentEntries. Removed unused functions.
  2467. * src/SegmentMan.{h, cc}
  2468. * test/SegmentManTest.cc
  2469. Fixed the bug that ServerHost is not removed.
  2470. * src/RequestGroup.cc
  2471. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2472. Fixed the bug that SegmentMan::completeSegment() is not called
  2473. even if Segment is complete when --lowest-speed-limit is enabled.
  2474. BUG#1864525
  2475. * src/DownloadCommand.{h, cc}
  2476. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2477. Fixed: hash algorithm 'sha1' is always used.
  2478. * src/DownloadCommand.cc (validatePieceHash)
  2479. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2480. Added --enable-peer-exchange command-line option.
  2481. * src/OptionHandlerFactory.cc
  2482. * src/HelpItemFactory.cc
  2483. * src/option_processing.cc
  2484. * src/usage_text.h
  2485. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2486. Move extension from BtRuntime to ExtensionMessageFactory, because
  2487. extension can be specified per peer, not per torrent.
  2488. * src/DefaultBtInteractive.cc
  2489. * src/BtRuntime.h
  2490. * src/ExtendedMessagingAware.h
  2491. * src/ExtensionMessageFactory.h
  2492. * src/DefaultExtensionMessageFactory.cc
  2493. * test/DefaultExtensionMessageFactoryTest.cc
  2494. 2008-01-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2495. Added categorized option help. Specify category using --help option.
  2496. Also added the ability to search options in forward match.
  2497. * src/HelpItem.{h, cc}
  2498. * test/HelpItemTest.cc
  2499. * src/HelpItemFactory.{h, cc}
  2500. * src/TagContainer.{h, cc}
  2501. * test/TagContainerTest.cc
  2502. * src/option_processing.cc
  2503. * src/prefs.h
  2504. * src/TaggedItem.{h, cc}
  2505. * test/TaggedItemTest.cc
  2506. * src/version_usage.cc
  2507. * src/help_tags.h
  2508. * src/usage_text.h
  2509. 2008-01-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2510. Fixed segmentation fault when bad torrent metainfo is parsed.
  2511. Added dynamic_cast properly to detect the misconfiguration of metainfo
  2512. and then throw exception or skip it.
  2513. * src/DefaultBtContext.{h, cc}
  2514. * test/DefaultBtContextTest.cc
  2515. * src/AnnounceList.cc
  2516. * src/CompactPeerListProcessor.cc
  2517. * src/message.h
  2518. * src/DefaultBtAnnounce.{h, cc}
  2519. * test/DefaultBtAnnounceTest.cc
  2520. * src/BencodeVisitor.cc
  2521. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2522. Added missing "B"(=Byte). So now the message looks like this:
  2523. Your share ratio was 1.0, uploaded/downloaded=12MiB/12MiB
  2524. * src/message.h (MSG_SHARE_RATIO_REPORT)
  2525. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2526. Show the seed ratio after torrent downloads.
  2527. For example, after torrent download completed and --seed-time and
  2528. --seed-ratio conditions are fulfilled, following message is printed
  2529. right after "Download complete: .....":
  2530. Your share ratio was 1.0, uploaded/downloaded=12M/12M
  2531. * src/RequestGroupMan.cc
  2532. * src/RequestGroup.{h, cc}
  2533. * src/message.h
  2534. 2007-12-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2535. Remove a defunct control file. A defunct control file means that while
  2536. it exists, but the corresponding download file is missing.
  2537. After its removal, a download restarts from the beginning.
  2538. * src/RequestGroup.cc
  2539. * src/message.h
  2540. 2007-12-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2541. Allocate bitfield in Peer when it is really used. More specifically,
  2542. bitfield in Peer is allocated after the connection is established and
  2543. deallocated when the connection is dropped.
  2544. Since 2 parameters(piece length and total length) was removed from the
  2545. constructor of Peer class, many test classes were modified accordingly.
  2546. See svn log for more detailed information.
  2547. * src/PeerInteractionCommand.cc
  2548. * src/CompactPeerListProcessor.cc
  2549. * src/Peer.cc
  2550. * src/DefaultPeerListProcessor.cc
  2551. * src/PeerListenCommand.cc
  2552. * src/PeerReceiveHandshakeCommand.cc
  2553. Fixed memory leak
  2554. * src/Piece.cc
  2555. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2556. Changed the default value of PREF_PEER_CONNECTION_TIMEOUT and
  2557. lowestSpeedLimit in ActivePeerConnectionCommand. TODO: Make them
  2558. command-line options.
  2559. * src/option_processing.cc
  2560. * src/ActivePeerConnectionCommand.cc
  2561. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2562. Send have message to peer if it already has the piece.
  2563. * src/BtHaveMessage.{h, cc}
  2564. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2565. Removed incomingPeer. Set 0 to peer's port if it is not a listening
  2566. port.
  2567. * src/DefaultPeerStorage.{h, cc}
  2568. * test/DefaultPeerStorageTest.cc
  2569. * src/HandshakeExtensionMessage.cc
  2570. * test/HandshakeExtensionMessageTest.cc
  2571. * src/Peer.{h, cc}: Added ipaddr and port to identity comparison.
  2572. * src/PeerStorage.h
  2573. * test/MockPeerStorage.h
  2574. * src/PeerListenCommand.cc
  2575. * src/PeerReceiveHandshakeCommand.cc
  2576. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2577. Added --metalink-enable-unique-protocol option.
  2578. * src/Metalink2RequestGroup.cc
  2579. * src/option_processing.cc
  2580. * src/prefs.h
  2581. * src/version_usage.cc
  2582. * doc/aria2c.1.txt
  2583. * doc/aria2c.1
  2584. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2585. Allow a peer in incomingPeer to be added peers.
  2586. * src/DefaultPeerStorage.cc
  2587. * test/DefaultPeerStorageTest.cc
  2588. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2589. Fixed the bug that causes aria2 not to finish download. BUG#1855875.
  2590. I could reproduce this bug in following procedure:
  2591. 1. Stop the download at the very beginning(1% or 100KB downloaded).
  2592. 2. Restart aria2.
  2593. 3. You see the download stopped around 99%.
  2594. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  2595. * src/StreamFileAllocationEntry.cc: Removed the timeout handling.
  2596. If timeout is reached, then _nextCommand is unused and it may contains
  2597. segments and they won't be canceled. Actually, timeout is not needed
  2598. here because if the server dropped connection, then retry is made.
  2599. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2600. Added uTorrent compatible Peer Exchange.
  2601. * src/BencodeVisitor.{h, cc}
  2602. * test/BencodeVisitorTest.cc
  2603. * src/BtConstants.h
  2604. * src/BtContext.h: Added 'private' flag.
  2605. * src/BtExtendedMessage.{h, cc}
  2606. * test/BtExtendedMessageTest.cc
  2607. * src/BtHandshakeMessage.{h, cc}: Set extended messaging bit in
  2608. reserved field.
  2609. * test/BtHandshakeMessageTest.cc
  2610. * src/BtMessageFactory.h
  2611. * src/BtRegistry.h
  2612. * src/BtRuntime.h: This class holds default extension message IDs for
  2613. aria2. By default, aria2 uses ID 8 for ut_pex.
  2614. * src/DefaultBtContext.cc
  2615. * src/DefaultBtInteractive.{h, cc}: This class holds _utPexEnabled.
  2616. When it is true, aria2 enables ut_pex. This value is set by
  2617. PeerInteractionCommand.
  2618. * src/DefaultBtMessageFactory.{h, cc}
  2619. * test/DefaultBtMessageFactoryTest.cc
  2620. * src/DefaultBtMessageReceiver.cc: Moved the code of fast extension
  2621. handling to DefaultBtInteractive class.
  2622. * src/DefaultExtensionMessageFactory.{h, cc}
  2623. * test/DefaultExtensionMessageFactoryTest.cc
  2624. * src/DefaultPeerStorage.cc: Returns false if a peer is already in
  2625. the container(peers and incomingPeers. The equality is determined by
  2626. Peer::id).
  2627. * test/DefaultPeerStorageTest.cc
  2628. * src/ExtensionMessage.h
  2629. * test/MockExtensionMessage.h
  2630. * src/ExtensionMessageFactory.h
  2631. * test/MockExtensionMessageFactory.h
  2632. * src/HandshakeExtensionMessage.{h, cc}
  2633. * test/HandshakeExtensionMessageTest.cc
  2634. * src/MetaEntry.h
  2635. * src/Peer.{h, cc}
  2636. * src/PeerInteractionCommand.cc
  2637. * src/PeerReceiveHandshakeCommand.cc: Evaluate the return value of
  2638. addIncomingPeer.
  2639. * src/PeerMessageUtil.{h, cc}
  2640. * src/PeerObject.h
  2641. * src/UTPexExtensionMessage.{h, cc}
  2642. * test/UTPexExtensionMessageTest.cc
  2643. * src/message.h
  2644. * src/prefs.h
  2645. Fixed the bug that returns incomplete data when it contains null
  2646. character. A convenient constructor was also added.
  2647. * src/Data.{h, cc}
  2648. Rewritten.
  2649. * src/CompactPeerListProcessor.cc
  2650. Fixed typos.
  2651. * src/message.h
  2652. * src/MetaFileUtil.cc
  2653. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2654. Added "Status Legend" label to the explanation text of 'stat' in
  2655. download result and moved it to the last. BUG#1848214
  2656. * src/RequestGroupMan.cc
  2657. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2658. Fixed the bug that -lexpat is always added to aria2c_LDADD.
  2659. * src/Makefie.am
  2660. * test/Makefile.am
  2661. 2007-12-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2662. Fixed the bug that prevents aria2 from loading cookie file when expire
  2663. value is greater than 2^31-1. BUG#1851066
  2664. * src/CookieBoxFactory.cc
  2665. * test/CookieBoxFactoryTest.cc
  2666. 2007-12-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2667. Fixed possible memory leak when an exception is thrown.
  2668. * src/XML2SAXMetalinkProcessor.cc
  2669. Added Expat support. If both libxml2 and Expat are installed, then
  2670. libxml2 is used by default.
  2671. MetalinkProcessorFactory chooses from XML2SAXMetalinkProcessor and
  2672. ExpatMetalinkProcessor according to the configuration.
  2673. * src/ExpatMetalinkProcessor.{h, cc}
  2674. * src/main.cc: Removed libxml2 specific header and init/free function.
  2675. * src/MetalinkProcessorFactory.{h, cc}
  2676. * src/MetalinkHelper.cc
  2677. * src/Metalinker.h: Removed unnecessary libxml2 header.
  2678. * src/MetalinkProcessor.h
  2679. * test/XML2SAXMetalinkProcessorTest.cc: Removed because
  2680. MetalinkProcessorTest is used instead.
  2681. * test/MetalinkProcessorTest.cc: Added. It is actually the same with
  2682. XML2SAXMetalinkProcessor, replaced XML2SAXMetalinkProcessor with
  2683. MetalinkProcessorFactory::newInstance().
  2684. * m4/libexpat.m4
  2685. * configure.ac: Added configuration options for libexpat.
  2686. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2687. Disabled -s option in metalink download.
  2688. * src/Metalink2RequestGroup.cc
  2689. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2690. If several protocols are available for a mirror in metalink file,
  2691. aria2 now use one of them. --metalink-preferred-protocol option was
  2692. added to specify the preference of protocol.
  2693. * src/AbstractCommand.cc
  2694. * src/OptionHandlerFactory.cc
  2695. * src/ServerHost.{h, cc}
  2696. * src/Metalink2RequestGroup.cc
  2697. * src/RequestGroup.{h, cc}
  2698. * test/RequestGroupTest.cc
  2699. * src/option_processing.cc
  2700. * src/prefs.h
  2701. * src/HttpResponseCommand.cc
  2702. * src/MetalinkResource.{h, cc}
  2703. * src/FtpNegotiationCommand.cc
  2704. * src/MetalinkEntry.{h, cc}
  2705. * src/MetalinkEntryTest.cc
  2706. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2707. Code cleanup and added debug log.
  2708. * src/PeerConnection.cc
  2709. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2710. Compiler error fix: applied the patch by Tiziano Mueller
  2711. * src/RequestGroup.cc
  2712. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2713. Fixed the bug: only first announce URL is tried in AnnounceTier,
  2714. in stopped and completed event.
  2715. * src/AnnounceList.{h, cc}
  2716. * test/AnnounceListTest.cc
  2717. * src/DefaultBtAnnounce.cc
  2718. * test/DefaultBtAnnounceTest.cc
  2719. Sorted URLs.
  2720. * test/Metalink2RequestGroupTest.cc
  2721. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2722. Removed unnecessary string copy. Updated doc and corrected indentation.
  2723. * src/Base64.cc
  2724. Fixed compilation warnings
  2725. * test/DataTest.cc
  2726. * test/HttpRequestTest.cc
  2727. * test/MetaFileUtilTest.cc
  2728. * test/RequestTest.cc
  2729. * Release 0.12.0
  2730. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2731. Updated translations
  2732. * po/{de,fr,ja,nl,ru}.po
  2733. Added Brazilian Portuguese, Catalan, Italian, Spanish, Swedish
  2734. translations. Many thanks to translators.
  2735. * po/{ca,es,it,pt_BR,sv}.po
  2736. * po/LINGUAS
  2737. 2007-12-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2738. Added a notice about URL
  2739. * src/version_usage.cc
  2740. 2007-12-07 Tatsuhiro Tsujikawa <tujikawa at rednoah com>
  2741. Fixed the bug#1845750; CTRL+C does not stop torrent.
  2742. aria2 repeatedly sends stopped request when tracker returns error code.
  2743. * src/AnnounceList.cc
  2744. * test/AnnounceListTest.cc
  2745. * src/AnnounceTier.h
  2746. Added a message when ctrl-c is hit.
  2747. Now second ctrl-c is also handled in signal handler.
  2748. * src/RequestGroupMan.{h, cc}
  2749. * src/RequestGroup.{h, cc}
  2750. * src/MultiUrlRequestInfo.cc
  2751. * src/DownloadEngine.cc
  2752. * src/TrackerWatcherCommand.cc
  2753. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2754. Code cleanup
  2755. * src/Base64.cc (encode)
  2756. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2757. Changed Direct/IO enable/disable procesure in file allocation routine.
  2758. * src/SingleFileAllocationIterator.cc
  2759. (SingleFileAllocationIterator):
  2760. Disable directIO if offset is not multiple of 512.
  2761. (~SingleFileAllocationIterator): Removed a call to disableDirectIO.
  2762. * src/MultiFileAllocationIterator.cc (allocateChunk):
  2763. Enable created SingleFileAllocationIterator's directIO.
  2764. * src/FileAllocationEntry.cc
  2765. (FileAllocationEntry): Enable directIO here.
  2766. (~FileAllocationEntry): Disable directIO here.
  2767. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2768. Fixed the bug: aria2 doesn't utilize fast set index offered by peer.
  2769. * src/Peer.{h, cc}
  2770. * src/DefaultPieceStorage.cc
  2771. * test/DefaultPieceStorageTest.cc
  2772. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2773. Rewritten direct I/O support routine
  2774. * src/SingleFileAllocationIterator.cc
  2775. * src/MultiDiskAdaptor.{h, cc}
  2776. * src/ByteArrayDiskWriter.h
  2777. * src/AbstractSingleDiskAdaptor.h
  2778. * src/AbstractDiskWriter.cc
  2779. * src/DefaultPieceStorage.cc
  2780. * src/DiskWriter.h
  2781. * src/BinaryStream.h
  2782. * src/IteratableChunkChecksumValidator.cc
  2783. * src/IteratableChecksumValidator.cc
  2784. * src/CheckIntegrityEntry.cc
  2785. * src/FileAllocationEntry.cc
  2786. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2787. Fixed typo
  2788. * src/version_usage.cc
  2789. Updated doc
  2790. * doc/aria2c.1.txt
  2791. * doc/aria2c.1
  2792. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2793. Fixed compile error without message digest support.
  2794. * src/FileMetalinkParserState.cc
  2795. * src/MetalinkParserController.{h, cc}
  2796. * test/XML2SAXMetalinkProcessorTest.cc
  2797. * test/MetalinkParserControllerTest.cc
  2798. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2799. Enable direct I/O support in checksum checking.
  2800. * src/IteratableChunkChecksumValidator.{h, cc}
  2801. * test/IteratableChunkChecksumValidatorTest.cc
  2802. * src/CheckIntegrityEntry.cc
  2803. * src/PieceHashCheckIntegrityEntry.cc
  2804. * src/IteratableChecksumValidator.{h, cc}
  2805. * src/BtCheckIntegrityEntry.cc: Added doc.
  2806. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2807. Added --allow-piece-length-change option.
  2808. * src/DefaultBtProgressInfoFile.cc
  2809. * test/DefaultBtProgressInfoFileTest.cc
  2810. * src/OptionHandlerFactory.cc
  2811. * src/option_processing.cc
  2812. * src/prefs.h
  2813. * src/version_usage.cc
  2814. * doc/aria2c.1.txt
  2815. * doc/aria2c.1
  2816. Fixed: duplicated result entry appears when exception is thrown in
  2817. RequestGroup::createInitiateConnectionCommand().
  2818. * src/RequestGroupMan.cc (fillRequestGroupFromReserver):
  2819. Add RequestGroup to _requestGroup after RequetGroup::
  2820. createInitiateConnectionCommand() succeeds.
  2821. Externalized message
  2822. * src/XML2SAXMetalinkProcessor.cc
  2823. * src/message.h
  2824. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2825. Forced download abort when received negative response from http/ftp
  2826. server.
  2827. * src/HttpResponseCommand.cc
  2828. * src/FtpNegotiationCommand.cc
  2829. * src/HttpResponse.cc
  2830. * src/FtpConnection.cc
  2831. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2832. Added XML2SAXMetalinkProcessor class, which is a lot faster than
  2833. the predecessor, Xml2MetalinkParser class.
  2834. I tested them against 94KB metalink file with 1234 chunk checksums.
  2835. The new one parsed it in 22msec, while it took 6000msec with old one.
  2836. * src/XML2SAXMetalinkProcessor.{h, cc}
  2837. * test/XML2SAXMetalinkProcessorTest.cc
  2838. * src/MetalinkParserController.{h, cc}
  2839. * test/MetalinkParserControllerTest.cc
  2840. * src/MetalinkParserState.h: Also added 16 subclasses.
  2841. * src/main.cc
  2842. * src/Metalink2RequestGroup.cc
  2843. * src/MetalinkHelper.cc
  2844. * src/MetalinkEntry.cc
  2845. * src/ChunkChecksum.h
  2846. Rewritten Base64 class for better performance.
  2847. * src/Base64.{h, cc}
  2848. * test/Base64Test.cc
  2849. * src/HttpRequest.cc
  2850. 2007-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2851. Fixed the bug#1841757: aria2 will connect to server to only get
  2852. file size.
  2853. * src/StreamFileAllocationEntry.cc
  2854. * src/option_processing.cc
  2855. * src/HttpResponseCommand.cc: Now reuse connection in segmented
  2856. downloads.
  2857. * src/FtpNegotiationCommand.cc
  2858. Suppressed wrong message when finding PreDownloadHandler
  2859. * src/RequestGroup.cc
  2860. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2861. Updated usage
  2862. * src/version_usage.cc
  2863. Updated man page
  2864. * doc/aria2c.1.txt
  2865. * doc/aria2c.1
  2866. Updated po files
  2867. * po/aria2c.pot
  2868. * po/*.po
  2869. * po/*.gmo
  2870. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2871. Eliminated g++-4.2 warning
  2872. * src/DownloadHandlerConstants.{h, cc}
  2873. * src/Util.cc
  2874. * test/MetaFileUtilTest.cc
  2875. * test/PStringBuildVisitorTest.cc
  2876. Fixed bug: --check-integrity doesn't work for multi file torrent.
  2877. * src/RequestGroup.cc
  2878. * src/BtCheckIntegrityEntry.cc
  2879. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2880. Fixed a2io.h
  2881. * src/a2io.h
  2882. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2883. Added direct I/O support. The current implementation uses O_DIRECT,
  2884. which is not posix standard and is tested on linux 2.6.21.
  2885. Currently only file allocation uses direct I/O.
  2886. * src/SingleFileAllocationIterator.{h, cc}
  2887. * test/SingleFileAllocationIteratorTest.cc
  2888. * src/MultiFileAllocationIterator.{h, cc}
  2889. * test/MultiFileAllocationIteratorTest.cc
  2890. * src/BinaryStream.h
  2891. * src/DiskWriter.h
  2892. * src/AbstractDiskWriter.{h, cc}
  2893. * src/ByteArrayDiskWriter.h
  2894. * src/DiskAdaptor.h
  2895. * src/AbstractSingleDiskAdaptor.{h, cc}
  2896. * src/MultiDiskAdaptor.{h, cc}
  2897. * src/FileAllocationEntry.cc
  2898. * src/Util.{h, cc}
  2899. * src/OptionHandlerFactory.cc
  2900. * src/prefs.h
  2901. * src/version_usage.cc
  2902. * src/option_processing.cc
  2903. Moved FileAllocationMan::markCurrentFileAllocationEntryDone() to
  2904. handleException.
  2905. * src/MultiFileAllocationIterator.cc
  2906. Added EINTR handling
  2907. * src/SocketCore.cc
  2908. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2909. Updated usage
  2910. * src/version_usage.cc
  2911. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2912. Applied Ross's patch for MinGW port.
  2913. * src/DownloadEngine.h
  2914. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2915. Set Content-Type to SingleFileDownloadContext when http response is
  2916. received.
  2917. * src/HttpResponseCommand.cc
  2918. * src/HttpResponse.{h, cc}
  2919. * test/HttpResponseTest.cc
  2920. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2921. Rewritten to add content-type support.
  2922. * src/DownloadHandler.{h, cc}
  2923. * src/BtPostDownloadHandler.{h, cc}
  2924. * test/BtPostDownloadHandlerTest.cc
  2925. * src/MetalinkPostDownloadHandler.{h, cc}
  2926. * test/MetalinkPostDownloadHandlerTest.cc
  2927. * src/PostDownloadHandler.{h, cc}
  2928. * src/DownloadHandlerConstants.{h, cc}
  2929. * src/RequestGroup.cc
  2930. * src/HttpResponseCommand.cc
  2931. * src/FtpNegotiationCommand.cc
  2932. * src/SingleFileDownloadContext.{h, cc}
  2933. * src/RequestGroup.h
  2934. * src/RequestGroupCriteria.h
  2935. * src/ContentTypeRequestGroupCriteria.h
  2936. Added 'mem' option value for --follow-metalink, --follow-torrent.
  2937. If it is give, metalink/torrent file is not written to the disk, but
  2938. just is kept in memory. Parsing is occurred on memory.
  2939. * src/MetalinkHelper.{h, cc}
  2940. * src/MetalinkProcessor.h
  2941. * src/Xml2MetalinkProcessor.{h, cc}
  2942. * test/Xml2MetalinkProcessorTest.cc
  2943. * src/DownloadHandlerFactory.{h, cc}
  2944. * test/DownloadHandlerFactoryTest.cc
  2945. * src/PreDownloadHandler.{h, cc}
  2946. * src/OptionHandlerFactory.cc
  2947. * src/DefaultBtContext.{h, cc}
  2948. * test/DefaultBtContextTest.cc
  2949. * src/version_usage.cc
  2950. * src/Metalink2RequestGroup.{h, cc}
  2951. * src/RequestGroup.{h, cc}
  2952. * src/a2functional.h
  2953. * test/a2functionalTest.cc
  2954. * src/MemoryBufferPreDownloadHandler.{h, cc}
  2955. * src/OptionHandlerImpl.h
  2956. * src/prefs.h
  2957. * src/Util.{h, cc}
  2958. * test/UtilTest.cc
  2959. Keep DownloadResult rather than RequestGroup after downloads to reduce
  2960. memory usage.
  2961. * src/RequestGroupMan.{h, cc}
  2962. * src/DownloadEngine.cc
  2963. * src/BtDependency.{h, cc}: Changed the type of dependee from
  2964. WeakHandle to SharedHandle because WeakHandle could be null.
  2965. * src/RequestGroup.{h, cc}
  2966. * src/DownloadEngineFactory.cc
  2967. * src/DownloadResult.h
  2968. Set totalLength after download finished
  2969. * src/UnknownLengthPieceStorage.{h, cc}
  2970. Keep torrent file specified in metalink in memory.
  2971. * src/Metalink2RequestGroup.cc
  2972. * src/BtDependency.cc
  2973. * src/TrueRequestGroupCriteria.h
  2974. Fixed the bug: seekg is used where seekp should be used.
  2975. * src/ByteArrayDiskWriter.cc
  2976. * test/ByteArraydiskWriterTest.cc
  2977. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2978. Fixed syntax error
  2979. * test/SequenceTest.cc
  2980. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2981. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  2982. * src/RequestGroupMan.cc (isSameFileBeingDownloaded)
  2983. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  2984. * src/RequestGroup.cc (downloadFinishedByFileLength)
  2985. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2986. Added the check to see whether ares_host_callback accepts timeouts
  2987. with c-ares; only c-ares 1.5.0 or newer accepts it.
  2988. * src/NameResolver.{h, cc}
  2989. * m4/libcares.m4
  2990. * configure.ac: Set C++ for language choice.
  2991. 2007-11-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2992. Fixed: compilation fails without c-ares/ares
  2993. * src/DownloadEngine.cc (addCommand): Moved outside #ifdef
  2994. Generate http/ftp commands only when download is incomplete.
  2995. * src/BtFileAllocationEntry.cc (prepareForNextAction)
  2996. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2997. Corrected typo. Examples are removed since they are available in man
  2998. page.
  2999. * src/version_usage.cc
  3000. Updated man page.
  3001. * doc/aria2c.1
  3002. * doc/aria2c.1.txt
  3003. * doc/makeman: Commented out sed command.
  3004. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3005. Throw DlAbortEx when a remote file is not found.
  3006. * src/HttpResponse.cc
  3007. * src/FtpNegotiationCommand.cc
  3008. * src/message.h
  3009. Overwrite an existing file if --allow-overwrite=true is given.
  3010. * src/RequestGroup.cc
  3011. Removed unused functions
  3012. * src/AbstractCommand.h
  3013. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3014. Removed 'extern' from 'extern typedef ...' in src/*.h
  3015. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3016. Updated usage
  3017. * src/version_usage.cc
  3018. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3019. Trim announce URL
  3020. * src/DefaultBtContext.cc
  3021. * test/ShaVisitorTest.cc
  3022. Trim argument s. Give trimed s to exception constructor.
  3023. * src/Util.cc (parseInt)(parseLLInt)
  3024. * test/UtilTest.cc
  3025. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3026. Set precision back to 1.
  3027. * src/ConsoleStatCalc.cc (calculateStat)
  3028. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3029. Replaced strtol with Util::parseInt
  3030. * src/ChunkedEncoding.cc
  3031. * src/HttpConnection.cc
  3032. * src/CookieBoxFactory.cc
  3033. * src/ParameterizedStringParser.cc
  3034. * src/Util.cc
  3035. * test/UtilTest.cc
  3036. * test/OptionHandlerTest.cc
  3037. * src/Request.cc
  3038. Throw exception when empty string is given. The message for exception
  3039. changed.
  3040. * src/Util.cc (parseInt)(parseLLInt)
  3041. * src/message.h
  3042. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3043. Set precision to 2 because share ratio is rounded into 1.0 if precision
  3044. set to 1.
  3045. * src/ConsoleStatCalc.cc (calculateStat)
  3046. 2007-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3047. Preallocate non-requested file which is adjacent forward to requested
  3048. file('requested' files means the files given in --select-file option)
  3049. if they share a same piece.
  3050. This fixes long pause in the file system which doesn't support sparse
  3051. files like FAT32 while downloading.
  3052. * src/MultiFileAllocationIterator.{h, cc}
  3053. * test/MultiFileAllocationIteratorTest.cc
  3054. * src/FileEntry.{h, cc}
  3055. Removed unused _option.
  3056. * src/MultiDiskAdaptor.h
  3057. * test/MultiDiskAdaptorTest.cc
  3058. * src/DefaultPieceStorage.cc
  3059. Set the default value of --seed-ratio to 1.0.
  3060. If 0.0 is given, then seeding continues regardless of share ratio.
  3061. * src/version_usage.cc
  3062. * src/option_processing.cc
  3063. * src/BtSetup.cc
  3064. * doc/aria2c.1.txt
  3065. * doc/aria2c.1
  3066. Fixed: Selective download is not working in BitTorrent
  3067. * src/RequestGroup.cc
  3068. Introduced Sequence class. Use this instead of Util::unfoldRange()
  3069. * src/PieceStorage.h
  3070. * test/MockPieceStorage.h
  3071. * src/UnknownLengthPieceStorage.h
  3072. * src/DefaultPieceStorage.{h, cc}
  3073. * src/Metalink2RequestGroup.cc
  3074. * src/RequestGroup.cc
  3075. * src/Sequence.h
  3076. * test/SequenceTest.cc
  3077. * src/IntSequence.h
  3078. * src/message.h
  3079. * src/Util.{h, cc}
  3080. * test/UtilTest.cc
  3081. Added new function 'parse' to catch exception thrown by subclass's
  3082. parseArg
  3083. * src/OptionHandler.h
  3084. * src/OptionParser.cc
  3085. * src/NameMatchOptionHandler.h
  3086. * src/OptionHandlerImpl.h
  3087. * test/OptionHandlerTest.cc
  3088. Added IntegerRangeOptionHandler. Used for --listen-port and
  3089. --select-file. Now --listen-port accepts range of port.
  3090. * src/OptionHandlerFactory.cc
  3091. * src/version_usage.cc
  3092. * src/OptionHandlerImpl.h
  3093. * src/option_processing.cc
  3094. * src/BtSetup.cc
  3095. * src/PeerListenCommand.{h, cc}
  3096. * doc/aria2c.1.txt
  3097. * doc/aria2c.1
  3098. Implemented operator< for Exception class to provide easy way to print
  3099. exception stack trace.
  3100. * src/Exception.{h, cc}
  3101. * src/main.cc
  3102. * src/option_processing.cc
  3103. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3104. * src/version_usage.cc
  3105. (showVersion): Reworked.
  3106. (showUsage): Added examples.
  3107. Removed Hint for total length and file name.
  3108. * src/Metalink2RequestGroup.cc
  3109. * src/RequestGroup.{h, cc}
  3110. * src/HttpResponseCommand.cc
  3111. * src/FtpNegotiationCommand.cc
  3112. Now --follow-torrent and --follow-metalink option work properly.
  3113. * src/RequestGroup.cc
  3114. Updated man page
  3115. * doc/aria2c.1.txt
  3116. * doc/aria2c.1
  3117. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3118. Removed.
  3119. * src/PiecedSegment.{h, cc} (operator==)(operator!=)
  3120. Use Segment::operator==()
  3121. * src/HttpConnection.cc
  3122. * src/Segment.h
  3123. Updated usage
  3124. * src/version_usage.cc
  3125. Added EINTR treatment.
  3126. * src/SocketCore.cc
  3127. * src/AbstractDiskWriter.cc
  3128. Rewritten.
  3129. * src/Util.cc (rangedFileCopy)
  3130. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3131. Fixed typo.
  3132. * src/version_usage.cc
  3133. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3134. Implemented. Now -c option works fine.
  3135. * src/DefaultPieceStorage.cc (markPiecesDone)
  3136. * test/DefaultPieceStorageTest.cc
  3137. Removed.
  3138. * src/SegmentMan.{h, cc}
  3139. (markAllPiecesDone)
  3140. (markPieceDone)
  3141. Synchronized po files with
  3142. https://translations.launchpad.net/aria2/trunk/+pots/aria2c
  3143. * src/fr.po
  3144. * src/ru.po
  3145. * src/de.po
  3146. * src/ja.po
  3147. 2007-11-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3148. Added ifdef and some modifications to compile without BitTorrent,
  3149. Metalink, MessageDigest
  3150. support.
  3151. * src/PieceHashCheckIntegrityEntry.cc
  3152. * src/MetalinkEntry.h
  3153. * src/version_usage.cc
  3154. * src/main.cc
  3155. * src/DownloadEngine.{h, cc}
  3156. * src/Metalink2RequestGroup.cc
  3157. * src/Peer.cc
  3158. * src/RequestGroup.cc
  3159. * src/MetalinkHelper.cc
  3160. * test/DefaultPieceStorageTest.cc
  3161. * test/MetalinkPostDownloadHandlerTest.cc
  3162. * test/Metalink2RequestGroupTest.cc
  3163. Hide TOTAL SPD when all downloads complete.
  3164. * src/ConsoleStatCalc.cc
  3165. Log target system information.
  3166. * src/main.cc
  3167. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3168. Now --metalink-location accepts a comma-deliminated list of locations.
  3169. * src/MetalinkEntry.{h, cc}
  3170. * test/MetalinkEntryTest.cc
  3171. * src/version_usage.cc
  3172. * src/Metalink2RequestGroup.cc
  3173. * src/Xml2MetalinkProcessor.cc
  3174. * test/Xml2MetalinkProcessorTest.cc
  3175. * doc/aria2c.1.txt
  3176. * doc/aria2c.1
  3177. * src/Util.cc (toUpper)(toLower): Rewritten.
  3178. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3179. Added the ability to detect duplicate download entry which is about to
  3180. download the same file other RequestGroup is downloading.
  3181. * src/RequestGroup.cc
  3182. * src/HttpResponseCommand.cc
  3183. * src/FtpNegotiationCommand.cc
  3184. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3185. Recalculates download progress when loading a control file,
  3186. if the piece length of DownloadContext is different from the one saved
  3187. in the control file. Currently in-flight pieces are ignored.
  3188. * src/DefaultBtProgressInfoFile.cc
  3189. * test/DefaultBtProgressInfoFileTest.cc
  3190. * src/Util.{h, cc}
  3191. * test/UtilTest.cc
  3192. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3193. Do not rotate tiers in announce-list.
  3194. * src/DefaultBtAnnounce.{h, cc}: Removed trackerNumTry.
  3195. AnnounceList::allTiersFailed() used instead to detect whether all
  3196. tiers are tried and failed.
  3197. * test/DefaultBtAnnounceTest.cc
  3198. * src/AnnounceList.{h, cc}: If all tiers are tried and failed then
  3199. allTiersFailed() returns true. To reset tier pointer, call resetTier();
  3200. * test/AnnounceListTest.cc
  3201. * src/TrackerWatcherCommand.cc (execute): Removed DlAbortEx catch
  3202. clause. Catch RecoverableException instead of DlRetryEx instead.
  3203. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3204. Implemented checksum validation feature(1 checksum for each file)
  3205. The validation takes place after the download.
  3206. * src/PieceHashCheckIntegrityEntry.{h, cc}: New class.
  3207. * src/IteratableChecksumValidator.{h, cc}: Rewritten.
  3208. * src/CheckIntegrityCommand.cc: Changed log message.
  3209. * src/Metalink2RequestGroup.cc: Set checksum to
  3210. SingleFileDownloadContext.
  3211. * src/StreamCheckIntegrityEntry.{h, cc}: Now derived from
  3212. PieceHashCheckIntegrity class.
  3213. * src/BtCheckIntegrityEntry.{h, cc}: Now derived from
  3214. PieceHashCheckIntegrity class.
  3215. * src/ChecksumCheckIntegrityEntry.{h, cc}: New class.
  3216. * src/IteratableValidator.h: New class.
  3217. * src/message.h
  3218. * src/CheckIntegrityEntry.{h, cc}
  3219. * src/IteratableChunkChecksumValidator.{h, cc}
  3220. * src/SingleFileDownloadContext.h
  3221. * src/DownloadCommand.cc
  3222. --allow-overwrite=true is no longer needed to check file integrity
  3223. before download in BitTorrent download.
  3224. * src/RequestGroup.cc (getInitialCommand)
  3225. Removed RequestGroup from queue when RequestGroup::getInitialCommand()
  3226. throws exception.
  3227. * src/RequestGroupMan.cc (getInitialCommands)
  3228. 2007-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3229. urlencode the given url inside Request::parseUrl(...)
  3230. * src/Request.{h, cc}
  3231. * src/Util.{h, cc}
  3232. * test/RequestTest.cc
  3233. Removed #!metalink3! notation support because it is deleted from
  3234. the metalink specification.
  3235. * src/Request.{h, cc}
  3236. * test/RequestTest.cc
  3237. 2007-11-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3238. Don't connect server before checking file integrity at startup, if
  3239. filesize and output file path are known.
  3240. * src/AbstractCommand.cc
  3241. * src/StreamFileAllocationEntry.cc
  3242. * src/Metalink2RequestGroup.cc
  3243. * src/RequestGroup.{h, cc}
  3244. * src/HttpResponseCommand.cc
  3245. * src/FtpNegotiationCommand.cc
  3246. Added DownloadFailureException. If it is thrown, RequestGroup should
  3247. halt.
  3248. * src/AbstractCommand.cc
  3249. * src/DownloadFailureException.h
  3250. * src/RequestGroup.cc
  3251. Catch RecoverableException, instead of DlAbortEx.
  3252. * src/RequestGroupMan.cc
  3253. * src/FillRequestGroupCommand.cc
  3254. * src/MetaFileUtil.cc
  3255. * src/IteratableChunkChecksumValidator.cc
  3256. Now first parameter of MSG_DOWNLOAD_ABORTED is gid(RequestGroup::
  3257. getGID())
  3258. * src/CheckIntegrityCommand.cc
  3259. * src/message.h
  3260. Print gid instead of idx.
  3261. * src/RequestGroupMan.cc
  3262. Removed exception throwers declaration.
  3263. * src/DirectDiskAdaptor.{h, cc}
  3264. * src/SocketCore.{h, cc}
  3265. * src/MultiDiskAdaptor.{h, cc}
  3266. * src/HttpConnection.{h, cc}
  3267. * src/HttpResponse.{h, cc}
  3268. * src/DiskAdaptor.{h, cc}
  3269. * src/CopyDiskAdaptor.{h, cc}
  3270. * src/MultiDiskAdaptor.{h, cc}
  3271. * src/HttpHeaderProcessor.{h, cc}
  3272. * src/AbstractSingleDiskAdaptor.{h, cc}
  3273. * src/Util.{h, cc}
  3274. * test/UtilTest.cc
  3275. * src/DefaultDiskWriter.{h, cc}
  3276. * src/FtpConnection.{h, cc}
  3277. * src/AbstractDiskWriter.{h, cc}
  3278. Removed duplicate code.
  3279. * src/StreamCheckIntegrityEntry.cc
  3280. Removed unnecessary include.
  3281. * src/DiskWriter.h
  3282. Included Exception.h
  3283. * src/option_processing.cc
  3284. Included 2 files and added doc
  3285. * src/TrackerWatcherCommand.cc
  3286. * src/SocketCore.cc (writeData): Fixed send error with GnuTLS.
  3287. 2007-11-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3288. Changed CheckIntegrityEntry interface so that it can define
  3289. the action when all the chunk checksums are valid.
  3290. * src/CheckIntegrityEntry.h
  3291. * src/StreamCheckIntegrityEntry.{h, cc}
  3292. * src/BtCheckIntegrityEntry.{h, cc}: Currently,when all the checksums
  3293. are valid, then aira2 goes to seeding mode. Sometimes it is better
  3294. to exit rather than doing seeding. So, it would be good to toggle this
  3295. behavior.
  3296. * src/CheckIntegrityCommand.cc
  3297. * src/AbstractCommand.cc
  3298. * src/RequestGroup.cc
  3299. 2007-11-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3300. Reflect the download length of in-flight pieces.
  3301. It makes the download length readout more precise.
  3302. * src/DefaultPieceStorage.{h, cc}
  3303. * test/DefaultPieceStorageTest.cc
  3304. * src/a2functional.h
  3305. * test/a2functionalTest.cc
  3306. Lower CPU load when --max-download-limit is used.
  3307. There is up and down in speed indicator when enabling
  3308. http-pipelining but a download goes well. I think the problem is that
  3309. because http-pipelining is enabled, DownloadCommand is created for
  3310. each segment and in its constructor, PeerStat::downloadStart() is
  3311. called. In PeerStat::downloadStart(), speed calculation object is
  3312. reseted, which makes download speed zero.
  3313. * src/DownloadCommand.cc
  3314. Rewritten using accumulate.
  3315. * src/RequestGroupMan.cc (calculateStat)
  3316. Code clearnup.
  3317. * src/FtpNegotiationCommand.cc
  3318. * src/HttpResponseCommand.cc
  3319. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3320. Fixed: Can not resume: aria2 reports download already finished.
  3321. * src/AbstractCommand.{h, cc}
  3322. * src/HttpResponseCommand.cc
  3323. * src/FtpNegotiateCommand.cc
  3324. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3325. Now a file is stored in the directory specified in .metalnk file
  3326. (file[@name]).
  3327. * src/Metalink2RequestGroup.cc
  3328. Create the directory structure when opening the file if it doesn't
  3329. exist.
  3330. * src/AbstractDiskWriter.cc
  3331. * src/Util.{h, cc}
  3332. * src/File.h
  3333. * test/UtilTest.cc
  3334. Removed file name comparison
  3335. * src/Metalink2RequestGroup.cc
  3336. * src/HttpResponseCommand.cc
  3337. Rewritten using Util::mkdirs()
  3338. * src/FileEntry.cc (setupDir)
  3339. * test/FileEntryTest.cc
  3340. Updated doc
  3341. * src/SingleFileDownloadContext.h
  3342. 2007-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3343. Now SleepCommand dispatches nextCommand when halt is requested.
  3344. It avoids a possible long wait after hitting CTRL-C.
  3345. * src/SleepCommand.{h, cc}
  3346. * src/RequestGroupAware.{h, cc}
  3347. 2007-11-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3348. Fixed: the listen port sent to the tracker is wrong. If aria2 fails
  3349. to open listen port, then remove the port number from the tracker
  3350. request.
  3351. * src/DefaultBtAnnounce.cc
  3352. * test/DefaultBtAnnounceTest.cc
  3353. * test/MockPieceStorage.h
  3354. Inject randomizer to DefaultBtAnnounce and DefaultBtContext to make
  3355. them more testable.
  3356. * src/DefaultBtAnnounce.{h, cc}
  3357. * src/DefaultBtContext.{h, cc}
  3358. * src/Util.{h, cc}
  3359. * test/DefaultBtAnnounceTest.cc
  3360. * test/DefaultBtContextTest.cc
  3361. * test/UtilTest.cc
  3362. Added 'B' to upload bytes readout.
  3363. * src/ConsoleStatCalc.cc
  3364. Now the listen port for BitTorrent download is opened when it is
  3365. needed.
  3366. * src/DownloadEngineFactory.cc
  3367. * src/BtSetup.{h, cc}
  3368. * src/PeerListenCommand.{h, cc}
  3369. Now an exception thrown while parsing tracker response is now logged.
  3370. If DlAbortEx is catched, then btAnnounce->resetAnnounce() immediately
  3371. called, which means no retry is made in this case, assuming a tracker
  3372. has a problem.
  3373. * src/TrackerWatcherCommand.cc
  3374. Fixed: downloading a file whose length is unkown fails.
  3375. * src/DownloadCommand.cc
  3376. Simplified prepareForNextSegment()
  3377. * src/DownloadCommand.cc
  3378. Updated
  3379. * po/POTFILES.in
  3380. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3381. Re-implemented a file listing for Metalink, which was dropped while
  3382. http/ftp/torrent integration was being implemented.
  3383. * src/MetalinkHelper.{h, cc}: New class.
  3384. * test/MetalinkHelperTest.cc
  3385. * src/main.cc
  3386. * src/Metalink2RequestGroup.cc
  3387. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3388. Added the ability to display the detailed torrent file information.
  3389. Now -S option gives not only a file listing, but also total download
  3390. length, info hash, announce URI, piece length, the number of pieces,
  3391. and mode(single or multi-torrent).
  3392. * src/DefaultBtContext.{h, cc} (operator<<): New function.
  3393. * src/Util.cc (toStream): Show file length in a abbreviated form(like
  3394. KiB)
  3395. * test/UtilTest.cc
  3396. * src/main.cc
  3397. 2007-10-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3398. Added ftp://USER:PASSWD@Servername automatic parsing.
  3399. * src/Request.{h, cc}: Removed AuthResolvers. Added _username and
  3400. _password. Recognize username and password in URI.
  3401. * src/main.cc: Use AuthConfigFactory instead of RequestFactory.
  3402. * src/RequestGroup.cc: Use AuthConfigFactory instead of RequestFactory.
  3403. * src/RequestFactory.{h, cc}: Removed.
  3404. * src/AuthConfigFactory.{h, cc}: New class.
  3405. * src/FtpConnection.cc: Use AuthConfigFactory.
  3406. * src/HttpRequest.cc: Use AuthConfigFactory.
  3407. * test/HttpRequestTest.cc: Updated.
  3408. * test/RequestTest.cc: Updated.
  3409. * test/AuthConfigFactoryTest.cc: New class.
  3410. * test/RequestFactoryTest.cc: Removed.
  3411. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3412. Use RequestGroup::allDownloadFinished() to decide whether the control
  3413. file should be removed or saved.
  3414. * src/RequestGroup.{h, cc} (allDownloadFinished): New function.
  3415. * src/RequestGroupMan.cc (removeStoppedGroup) (save)
  3416. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3417. Use File::renameTo()
  3418. * src/DefaultBtProgressInfoFile.cc
  3419. Added --no-file-allocation-limit command-line option.
  3420. * src/version_usage.cc
  3421. * src/option_processing.cc
  3422. * src/OptionHandlerFactory.cc
  3423. * src/RequestGroup.{h, cc}
  3424. * src/BtCheckIntegrityEntry.cc
  3425. * src/StreamCheckIntegrityEntry.cc
  3426. * src/prefs.h
  3427. * doc/aria2c.1.txt
  3428. * doc/aria2c.1
  3429. Now prealloc is the default value for --file-allocation option.
  3430. * src/version_usage.cc
  3431. * src/option_processing.cc
  3432. * doc/aria2c.1.txt
  3433. * doc/aria2c.1
  3434. Don't URL-encode user-agent.
  3435. * src/HttpRequest.cc
  3436. Updated translations
  3437. * po/LINGUAS: Added nl for Dutch translation.
  3438. * po/nl.po: Added Dutch translation, thanks to A. Bram Neijt.
  3439. * po/de.po: Updated German translation, thanks to Patrick Ruckstuhl.
  3440. * po/POTFILES.in: Updated.
  3441. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3442. Added the ability to recognize url-list in a torrent file.
  3443. The retrieved URLs are attached to the corresponding FileEntry.
  3444. * src/DefaultBtContext.{h, cc}
  3445. * src/FileEntry.{h, cc}
  3446. * test/DefaultBtContextTest.cc
  3447. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3448. * src/ConsoleStatCalc.cc: Let the user know that aria2 is now seeding
  3449. after the download finishes.
  3450. 2007-10-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3451. * src/Piece.{h, cc}: Added SubPiece infrastructure to track down
  3452. the data smaller than block length.
  3453. A block length can be specified by constructor's argument.
  3454. * src/DefaultPieceStorage.{h, cc} (getMissingPiece):
  3455. Get a missing piece in the range of given FileEntry. This function is
  3456. not used in the program yet.
  3457. * src/Util.h: Added some macros.
  3458. 2007-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3459. Added HTTP/1.1 keep alive and pipelining support.
  3460. See --enable-http-keep-alive and --enable-http-pipelining option.
  3461. * src/AbstractCommand.{h, cc}: Now it has one-to-many relation to
  3462. Segment.
  3463. * src/HttpDownloadCommand.{h, cc}
  3464. * src/OptionHandlerFactory.cc
  3465. * src/HttpConnection.{h, cc}
  3466. * src/version_usage.cc
  3467. * src/HttpInitiateConnectionCommand.cc
  3468. * src/FtpInitiateConnectionCommand.cc
  3469. * src/Segment.h
  3470. * src/HttpRequestCommand.{h, cc}
  3471. * src/option_processing.cc
  3472. * src/prefs.h
  3473. * src/HttpResponseCommand.cc
  3474. * src/SegmentMan.{h, cc}
  3475. * src/FtpNegotiateCommand.cc
  3476. * src/HttpProxyResponseCommand.cc
  3477. * src/Request.cc
  3478. * src/HttpRequest.cc
  3479. * src/DownloadCommand.cc
  3480. * test/HttpRequestTest.cc
  3481. * test/RequestTest.cc
  3482. 2007-10-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3483. * src/ConsoleCalc.cc (calculateStat): Hide SPD after the download
  3484. finished.
  3485. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3486. * src/Metalink2RequestGroup.cc (generate): Throw exception instead of
  3487. catching it inside the method.
  3488. When no file entry is found in a metalink without querying user
  3489. preferences, throw the exception with the error message that suggests
  3490. metalink file is probably broken.
  3491. * src/RequestGroup.cc (postDownloadProcessing): Catch exception here.
  3492. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3493. Fixed the bug that prevents remote Metalink/Torrent file from begin
  3494. processed.
  3495. * src/RequestGroupMan.cc (removeStoppedGroup)
  3496. Added debug message.
  3497. * src/BtPostDownloadHandler.cc
  3498. * src/MetalinkPostDownloadHandler.cc
  3499. * src/PostDownloadHandler.{h, cc}
  3500. * src/RequestGroup.cc
  3501. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3502. * src/Request.cc (parseUrl): Removed unnecessary slashes around dir.
  3503. 2007-10-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3504. * src/MultiUrlRequestInfo.h: Updated the message shown when program
  3505. stops and there are any unfinished or in-progress downloads.
  3506. Added the legend of "stat".
  3507. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3508. Throw exception when chunck checksum verification fails.
  3509. * src/DownloadCommand.cc (validatePieceHash): New function.
  3510. * src/PiecedSegment.{h, cc} (clear): New function.
  3511. * src/GrowSegment.{h, cc} (clear): New function.
  3512. * src/Segment.h (clear): New function.
  3513. * src/SegmentMan.{h, cc} (validatePieceHash): Removed.
  3514. * test/SegmentTest.cc
  3515. * test/GrowSegmentTest.cc
  3516. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3517. Do not send referer when redirected.
  3518. * src/Request.cc (redirectUrl)
  3519. * test/RequestTest.cc
  3520. * test/HttpRequestTest.cc
  3521. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3522. Implemented BitTorrent/http/ftp integrated download.
  3523. I've rewritten lots of files and now some headers have forward
  3524. class declarations to reduce compile time.
  3525. The implementation is extremely alpha stage, I recommend to use this
  3526. for testing purpose only.
  3527. 2007-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3528. Fixed the compilation error on 64bit platform.
  3529. * test/HttpHeaderProcessorTest.cc
  3530. 2007-09-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3531. Merged Ross's patch that fixes compilation problem in MinGW
  3532. * test/DefaultBtProgressInfoFileTest.cc
  3533. 2007-09-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3534. Updated fr.po by sebone
  3535. * po/fr.po
  3536. Updated man page.
  3537. * doc/aria2c.1.txt
  3538. * Release 0.11.3
  3539. 2007-09-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3540. * src/MetalinkRequestInfo.cc (execute): Fixed BitTorrent download
  3541. failure in Metalink.
  3542. 2007-09-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3543. Automatically save *.aria2 control file of http/ftp download in every
  3544. 60 seconds.
  3545. * src/AutoSaveCommand.{h, cc}: New class.
  3546. * src/TimeBasedCommand.{h, cc}: New class.
  3547. * src/DownloadEngineFactory.cc (newConsoleEngine)
  3548. Disable parameterized URI support by default. Added -P option to
  3549. enable the feature.
  3550. * src/prefs.h: Added PREF_PARAMETERIZED_URI
  3551. * src/OptionHandlerFactory.cc
  3552. * src/main.cc: Also updated usages for -Z and --auto-file-renaming
  3553. Updated Japanese translation.
  3554. * po/ja.po
  3555. Updated man page.
  3556. * doc/aria2c.1.txt
  3557. * Release 0.11.3-rc
  3558. 2007-09-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3559. Now *.aria2 contorol file is first saved to *.aria2__temp and if
  3560. it is successful, then renamed to *.aria2.
  3561. This prevents *.aria2 file from being truncated or corrupted when
  3562. file system becomes out of space.
  3563. * src/DefaultBtProgressInfoFile.cc (save)
  3564. * src/SegmentMan.cc (save)
  3565. * test/DefaultBtProgressInfoFileTest.cc (testSave): Implemented.
  3566. 2007-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3567. Reduced the fragmentation of bitfield in http/ftp download.
  3568. * src/BitfieldMan.cc (getSparseMissingUnusedIndex)
  3569. * test/BitfieldManTest.cc
  3570. 2007-08-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3571. Added the ability to disable segmented download in .metalink.
  3572. aria2 can now recognize 'maxconnections' attribute in 'resources' and
  3573. 'url' tag.
  3574. * src/MetalinkEntry.{h, cc}
  3575. * src/RequestResource.{h, cc}
  3576. * src/MetalinkRequestInfo.cc
  3577. * src/Xml2MetalinkProcessor.cc
  3578. * test/Xml2MetalinkProcessorTest.cc
  3579. 2007-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3580. Added parameterized URI support.
  3581. * src/main.cc: -Z option added.
  3582. * src/OptionHandlerFactory.cc
  3583. * src/prefs.h: Added PREF_FORCE_SEQUENTIAL.
  3584. * src/PStringDatum.h: New class.
  3585. * src/PStringSegment.{h,cc}: New class.
  3586. * src/PStringNumLoop.h: New class.
  3587. * src/PStringSelect.h: New class.
  3588. * src/NumberDecorator.h: New class.
  3589. * src/FixedWidthNumberDecorator.h: New class.
  3590. * src/AlphaNumberDecorator.h: New class.
  3591. * src/PStringVisitor.h: New class.
  3592. * src/PStringBuildVisitor.{h,cc}: New class.
  3593. * src/ParameterizedStringParser.{h,cc}: New class.
  3594. * src/Util.{h,cc}
  3595. (isNumber): New function.
  3596. (isLowercase): New function.
  3597. (isUppercase): New function.
  3598. (alphaToNum): New function.
  3599. * test/ParameterizedStringParserTest.cc: New class.
  3600. * test/AlphaNumberDecoratorTest.cc: New class.
  3601. * test/PStringBuildVisitorTest.cc: New class.
  3602. * test/UtilTest.cc
  3603. (testIsNumber): New function.
  3604. (testIsLowercase): New function.
  3605. (testIsUppercase): New function.
  3606. (testAlphaToNum): New function.
  3607. Added '\n' after the error message
  3608. * src/RequestInfo.h (printDownloadAbortMessage)
  3609. Added auto file renaming feature in http(s)/ftp download.
  3610. * src/main.cc: Added --auto-file-renaming command-line option.
  3611. * src/OptionHandlerFactory.cc
  3612. * src/prefs.h: Added PREF_AUTO_FILE_RENAMING
  3613. * src/RequestGroup.{h, cc}
  3614. (shouldCancelDownloadForSafety): Rewritten
  3615. (tryAutoFileRenaming): New function.
  3616. * src/SegmentMan.{h, cc} (shouldCancelDownloadForSafety): Removed.
  3617. * src/HttpResponseCommand.cc
  3618. (executeInternal): Removed the call to RequestGroupMan::
  3619. isSameFileBeingDownloaded()
  3620. * src/FtpNegotiateCommand.cc
  3621. (recvSize): Removed the call to RequestGroupMan::
  3622. isSameFileBeingDownloaded()
  3623. * test/RequestGroupTest.cc: New class.
  3624. 2007-08-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3625. Merged Ross's patch: Removed setmode(). Use _CRT_fmode to enable binary
  3626. IO.
  3627. * src/DefaultBtProgressInfoFile.cc
  3628. * src/MetaFileUtil.cc
  3629. * src/SimpleLogger.cc
  3630. * src/SegmentMan.cc
  3631. * src/Util.cc
  3632. * src/Platform.cc
  3633. 2007-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3634. * src/Xml2MetalinkProcessor.cc (getPieceHash): Added missing .c_str().
  3635. 2007-08-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3636. Avoid sparse files if possible, because VFAT32 doesn't support it.
  3637. * src/DefaultDiskWriter.cc (initAndOpenFile)
  3638. Fixed the bug that prevents file allocation is not done when
  3639. dowloading multi-torrent file.
  3640. * src/AbstractDiskWriter.cc (openFile)
  3641. Increase the maximum number of -j option from 15 to 45.
  3642. * src/OptionHandlerFactory.cc (createOptionHandlers)
  3643. Added fr.po, thanks to Charles Landemaine.
  3644. * po/fr.po
  3645. * po/LINGUAS
  3646. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  3647. gcc 3.4.4 support:
  3648. * src/DefaultBtContext.cc: int32_t -> int
  3649. * src/main.cc: int -> int32_t, int32_t -> int
  3650. * src/messageDigest.h: uint32_t -> unsigned int
  3651. * src/NameResolver.h: int32_t -> int
  3652. * src/PeerConnection.cc: int -> int32_t
  3653. * src/SpeedCalc.cc: int32_t -> int
  3654. * src/TrackerUpdateCommand.h: int -> int32_t
  3655. * src/Util.cc: int32_t -> int
  3656. * src/Util.h: int32_t -> int
  3657. * src/Xml2MetalinkProcessor.cc: int -> uint32_t, int64_t -> uint64_t
  3658. * test/AnnounceListTest.cc: int -> int32_t
  3659. * test/ChunkedEncodingTest.cc: int -> int32_t
  3660. * test/DataTest.cc: int -> int32_t
  3661. * test/DefaultBtRequestFactoryTest.cc: int -> int32_t
  3662. * test/DefaultPeerListProcessorTest.cc: int -> int32_t
  3663. * test/DefaultPieceStorageTest.cc: int -> int32_t
  3664. * test/FeatureConfigTest.cc: int -> int32_t
  3665. * test/MetalinkEntryTest.cc: int -> int32_t
  3666. * test/MockBtRequestFactory.h: int -> int32_t
  3667. * test/MockPieceStorage.h: int -> int32_t
  3668. * test/OptionTest.cc: int -> int32_t
  3669. * test/RequestTest.cc: int -> int32_t
  3670. * test/SegmentManTest.cc: int -> int32_t
  3671. * test/Xml2MetalinkProcessorTest.cc: int -> int32_t
  3672. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  3673. Move sleep functions to Util class:
  3674. * src/Util.cc
  3675. (sleep): New function.
  3676. (usleep): New function.
  3677. * src/DownloadCommand.cc: sleep -> Util::sleep
  3678. * test/TimeSeedCriteriaTest.cc: sleep -> Util::sleep
  3679. MinGW build enhancements. The following files are added:
  3680. * src/timegm.{c,h}
  3681. Changes to support the above new files:
  3682. * configure.ac
  3683. * src/Makefile.am
  3684. * src/a2time.h
  3685. * src/Util.cc:
  3686. * src/strptime.c: Added support for %Z option.
  3687. Fixed MinGW non-blocking bug.
  3688. * src/SocketCore.cc
  3689. * src/HttpRequestCommand.cc
  3690. Miscellenous build fixes/enhancements.
  3691. * configure.ac: Added summary report.
  3692. * src/Platform.h: Tweaked #include's.
  3693. * src/a2netcompat.h: Tweaked #include's.
  3694. * src/strptime.h: Tweaked #include's.
  3695. * src/gai_strerror.c: Tweaked #include's.
  3696. * src/gai_strerror.h: _D_GETADDRINFO_H -> _D_GAI_STRERROR_H
  3697. * src/getaddrinfo.h: Moved #ifndef __MINGW32__
  3698. * src/gettimeofday.h: Added HAVE_CONFIG_H
  3699. 2007-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3700. Increased the initial connection size in BitTorrent download to 40.
  3701. * src/BtRuntime.h
  3702. Added the usage message of --peer-id-prefix option.
  3703. * src/main.cc
  3704. * Release 0.11.2
  3705. 2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3706. MessageDigestHelper is introduced in order to simplify the use
  3707. of message digest. Removed repeated code.
  3708. The message digest algorithm is now specified by string, like "sha1",
  3709. "md5".
  3710. * src/messageDigest.{h, cc}
  3711. * src/MessageDigestHelper.{h, cc}: New class.
  3712. * src/DefaultPieceStorage.cc
  3713. * src/DefaultBtContext.{h, cc}
  3714. (computeFastSet): New function.
  3715. (setInfoHash): Added for unit testing.
  3716. (setNumPieces): Added for unit testing.
  3717. * src/DefaultBtInteractive.cc
  3718. * src/BtPieceMessage.cc
  3719. * src/Peer.cc
  3720. * src/Checksum.h
  3721. * src/message.h
  3722. * src/IteratableChecksumValidator.h
  3723. * src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator
  3724. inside it.
  3725. * src/SegmentMan.{h, cc}
  3726. (checkIntegrity): Removed.
  3727. * src/IteratableChunkChecksumValidator.{h, cc}
  3728. * src/Util.h
  3729. (sha1Sum): Removed.
  3730. (simpleMessageDigest): Removed.
  3731. (fileChecksum): Removed.
  3732. (computeFastSet): Removed.
  3733. * src/ShaVisitor.cc
  3734. * src/ChunkChecksum.h
  3735. * src/DownloadCommand.cc
  3736. Removed messageDigest virtual functions.
  3737. * src/MultiDiskAdaptor.{h, cc}
  3738. * src/DiskAdaptor.h
  3739. * src/ByteArrayDiskWriter.h
  3740. * src/DiskWriter.h
  3741. * src/DiskAdaptorWriter.h
  3742. * src/AbstractSingleDiskAdaptor.{h, cc}
  3743. * src/AbstractDiskWriter.{h, cc}
  3744. Fixed comilation error when message digest is disabled.
  3745. * src/MetalinkEntry.{h, cc}
  3746. * src/MetalinkRequestInfo.cc
  3747. Removed srandom and random.
  3748. * src/SimpleRandomizer.h
  3749. Added size() virtual function to DiskAdaptor
  3750. * src/MultiDiskAdaptor.h
  3751. Fixed the bug that causes that files are not opened correctly in
  3752. multi-file torrent.
  3753. * src/TorrentRequestInfo.cc
  3754. * src/MultiDiskAdaptor.cc
  3755. Added SHA256 support
  3756. * src/messageDigest.cc
  3757. * src/Xml2MetalinkProcessor.cc
  3758. Show supported message digest algorithms
  3759. * src/main.cc
  3760. Updated contact info.
  3761. * src/main.cc
  3762. Applied Ross's patch
  3763. * src/a2netcompat.h
  3764. * src/main.cc
  3765. Fixed the bug that prevents a remote metalink from not being processed
  3766. even if '-o foo.metalink' is specified.
  3767. * src/MetalinkRequestInfo.cc
  3768. 2007-08-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3769. Merged Dan's patch:
  3770. * src/ByteArrayDiskWriter.cc: ios_base -> ios
  3771. Use va_copy to avoid core dump on amd64:
  3772. * src/SimpleLogger.cc
  3773. Updated contact info.
  3774. * src/main.cc
  3775. Added #ifdef ENABLE_MESSAGE_DIGEST to fix test errors when message
  3776. digest is not available.
  3777. * src/MetalinkEntry.h
  3778. 2007-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3779. Make a2netcompat.h include a2io.h to fix compilation error:
  3780. * src/a2netcompat.h
  3781. * src/SocketCore.cc: Removed include of a2io.h
  3782. * src/Util.cc: Removed include of a2io.h
  3783. Gather time related functions to a2time.h:
  3784. * src/a2time.h: New file.
  3785. * src/DefaultPeerStorage.cc
  3786. * src/SimpleLogger.cc
  3787. * src/Util.{h, cc}
  3788. * src/SimpleRandomizer.h
  3789. * src/TimeA2.{h,cc}
  3790. * src/DownloadCommand.cc
  3791. * src/main.cc
  3792. Removed #ifdef __MINGW32__ since gai_strerror is included in
  3793. a2netcompat.h:
  3794. * src/NameResolver.cc
  3795. Fixed compilation error without openssl:
  3796. * src/SocketCore.{h,cc}: Moved include of openssl/err.h to SocketCore.h
  3797. Added default block to suppress compiler warnings:
  3798. * src/MetalinkRequestInfo.cc (AccumulateNonP2PUrl::operator())
  3799. 2007-07-26 Ross Smith II <aria2spam at smithii dot com>
  3800. MinGW build enhancements. The following files are added:
  3801. * src/gai_strerror.{c,h}
  3802. * src/gettimeofday.{c,h}
  3803. Changes to support the above new files:
  3804. * configure.ac
  3805. * src/Makefile.am
  3806. * src/a2netcompat.h
  3807. * src/TimeA2.cc
  3808. * src/DefaultPeerStorage.cc
  3809. * src/NameResolver.cc: removed mingw_strerror() function.
  3810. * src/SocketCore.cc: removed mingw_strerror() function.
  3811. Miscellaneous MinGW build fixes.
  3812. * src/a2io.h: Use _lseeki64() instead of lseek()
  3813. * src/common.h
  3814. * src/DefaultFileAllocator.cc
  3815. * src/GlowFileAllocator.cc
  3816. * src/main.cc: Moved #include "prefs.h" to quiet compile error.
  3817. * src/NameResolver.cc
  3818. (callback): Changed int32_t to int.
  3819. (resolve): Changed int32_t to int.
  3820. * src/Platform.cc
  3821. * src/Platform.h
  3822. * test/MultiDiskWriterTest.cc
  3823. * test/PeerMessageUtilTest.cc
  3824. * src/localtime_r.c: Add DeleteCriticalSection() and at exit().
  3825. Other enhancements and fixes.
  3826. * src/HttpRequestCommand.cc
  3827. (executeInternal) Use non-blocking socket for HTTPS (MinGW only).
  3828. * src/SocketCore.cc:
  3829. (error): New function to abstract errno/WSAGetLastError().
  3830. (errorMsg): New function to abstract errno/WSAGetLastError().
  3831. (initiateSecureConnection): Added more detailed error reporting.
  3832. * src/SocketCore.h: Added private variable blocking, to allow
  3833. proper handling of OpenSSL psuedo-errors.
  3834. * src/message.h
  3835. (EX_SSL_INIT_FAILURE)
  3836. (EX_SSL_IO_ERROR)
  3837. (EX_SSL_PROTOCOL_ERROR)
  3838. (EX_SSL_UNKNOWN_ERROR)
  3839. (EX_SSL_CONNECT_ERROR)
  3840. (EX_SOCKET_BLOCKING)
  3841. (EX_SOCKET_NONBLOCKING)
  3842. (EX_SOCKET_UNKNOWN_ERROR)
  3843. * src/Util.cc
  3844. (setGlobalSignalHandler): Renamed signal to sig as signal is a
  3845. reserved name.
  3846. (httpGMT): Fixed typo.
  3847. 2007-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3848. Merged Ross's win32 patch(manually)
  3849. In the course of merging, following files are added.
  3850. * src/strptime.{h,c}
  3851. * src/libgen.{h,c}
  3852. * src/inet_aton.{h,c}
  3853. * src/Platform.{h,cc}
  3854. * src/localtime_r.{h,c}
  3855. * src/getaddrinfo.{h,c}
  3856. I've gethered network related things, and put them to following file:
  3857. * src/a2netcompat.h
  3858. Also io related things are put to following file:
  3859. * src/a2io.h
  3860. Changed %lld to %s because mingw32 doesn't recognize %lld.
  3861. * src/message.h
  3862. (MSG_ALLOCATION_COMPLETED)
  3863. (EX_TOO_LARGE_FILE)
  3864. (EX_SIZE_MISMATCH)
  3865. (EX_FILE_OFFSET_OUT_OF_RANGE)
  3866. (EX_INVALID_CHUNK_CHECKSUM)
  3867. (EX_INVALID_RANGE_HEADER)
  3868. * src/FileAllocationCommand.cc
  3869. * src/HttpResponse.cc
  3870. * src/RequestGroup.cc
  3871. * src/MultiDiskAdaptor.cc
  3872. * src/OptionHandlerImpl.h
  3873. * src/HttpResponseCommand.cc
  3874. * src/FtpNegotiateCommand.cc
  3875. * src/IteratableChecksumValidator.cc
  3876. * src/SegmentMan.cc
  3877. * src/ChunkChecksumValidator.cc
  3878. Added Randomizer::getRandomNumber(long int)
  3879. * src/Randomizer.h (getRandomNumber)
  3880. * src/SimpleRandomizer.h (getRandomNumber)
  3881. * src/BitfieldMan.cc (getMissingIndexRandomly): Use this new function.
  3882. * src/Util.cc (randomAlpha): Use this new function.
  3883. 2007-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3884. Converted int's to in32_t. long long int's are also converted to
  3885. int64_t
  3886. 2007-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3887. Fixed the bug that prevents cookies from being sent to the server
  3888. if the domain of cookie is FQDN and starts with ".".
  3889. * src/Cookie.cc (match)
  3890. To add the ability to change peer id.
  3891. * src/DefaultBtContext.h
  3892. (_peerIdPrefix): New variable
  3893. (setPeerIdPrefix): New function.
  3894. * src/torrentRequestInfo.cc
  3895. (execute): Set the option value of PREF_PEER_ID_PREFIX to
  3896. DefaultBtContext.
  3897. * src/main.cc (main): Added peer-id-prefix command-line option.
  3898. The usage message is not added yet.
  3899. * src/DefaultBtContext.cc
  3900. (generatePeerId): Use _peerIdPrefix.
  3901. * src/prefs.h (PREF_PEER_ID_PREFIX): New definition.
  3902. 2007-07-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3903. Fixed the bug that prevents filename in content-disposition from
  3904. being retrieved when filename is not quoted.
  3905. * src/Util.cc (getContentDispositionFilename)
  3906. Fixed the bug that causes infinate loop and memory leak when file open
  3907. operation failed.
  3908. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  3909. 2007-07-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3910. Fixed the bug that causes segfault when all URIs specified are
  3911. unsupported.
  3912. * src/RequestGroupMan.cc (getInitialCommands)
  3913. Check if RequestGroup::createNextCommand() returns empty list of
  3914. commands.
  3915. * src/RequestGroup.cc (createNextCommand)
  3916. Change log level from info to error so that users can notice that
  3917. an error occurred.
  3918. Fixed the bug that causes segfault when a zero-sized file is
  3919. downloaded.
  3920. * src/BitfieldMan.cc (isAllBitSet)
  3921. Return true if bitfieldLength is 0.
  3922. 2007-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3923. * src/main.cc
  3924. (showUsage): Added 3 usage examples for metalink download.
  3925. Replace MetalinkChunkChecksum with ChunkChecksum.
  3926. * src/MetalinkChunkChecksum.h: Removed.
  3927. * src/MetalinkEntry.h: MetalinkChunkChecksum -> ChunkChecksum.
  3928. * src/Xml2MetalinkProcessor.h: MetalinkChunkChecksum -> ChunkChecksum.
  3929. * src/Xml2MetalinkProcessor.cc
  3930. (getPieceHash): Use ChunkChecksum instead of MetalinkChunkChecksum.
  3931. * src/MetalinkRequestInfo.cc (execute)
  3932. * Release 0.11.1
  3933. 2007-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3934. Reads URIs from stdin when "-i -" is specified.
  3935. * src/UriFileListParser.h, src/UriFileListParser.cc: Removed.
  3936. * src/UriListParser.h, src/UriListParser.cc: New class.
  3937. * src/StreamUriListParser.h: New class.
  3938. * src/FileUriListParser.h: New class.
  3939. * src/main.cc (main): Use StreamUriListParser and FileUriListParser
  3940. instead of UriFileListParser.
  3941. 2007-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3942. Made console readout more readable.
  3943. * src/ConsoleDownloadEngine.cc (sendStatistics)
  3944. 2007-07-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3945. Fix the bug that causes -s option not to work.
  3946. * src/main.cc (main)
  3947. * src/a2algo.h: New file.
  3948. 2007-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3949. Create directory structure specified in metalink file.
  3950. * src/RequestGroup.h, src/RequestGroup.cc
  3951. (initAndOpenFile): Create a directory to store files if it does not
  3952. exist.
  3953. (getDir): New function.
  3954. Added ETA and download speed for an individual file to readout.
  3955. * src/ConsoleDownloadEngine.cc (sendStatistics)
  3956. * src/RequestGroup.h
  3957. (calculateDownloadSpeed): New function.
  3958. 2007-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3959. Made -S option work with metalink file and provided selective download
  3960. to metalink.
  3961. * src/MetalinkEntry.h, src/MetalinkEntry.cc
  3962. (filename): Removed.
  3963. (file): New variable.
  3964. (size): Removed.
  3965. (operator=): Updated.
  3966. (getPath): New function.
  3967. (getLength): New function.
  3968. (toFileEntry): New function.
  3969. * src/TorrentRequestInfo.h, src/TorrentRequestInfo.cc
  3970. (execute): Use toStream.
  3971. (showFileEntry): Removed.
  3972. * src/MetalinkRequestInfo.h
  3973. (targetFiles): New variable.
  3974. (setTargetFiles): New variable.
  3975. * src/MetalinkRequestInfo.cc
  3976. (execute): Added the ability to print file information included in
  3977. a metalink file.
  3978. Added selective download mode to metalink.
  3979. * src/main.cc
  3980. (showUsage): Updated to denote that -S and --select-file options are
  3981. applicable to metalink.
  3982. * src/FileEntry.h
  3983. (operator=): New function.
  3984. (getBasename): New function.
  3985. (getDirname): New function.
  3986. * src/Util.h, src/Util.cc
  3987. (toStream): New function.
  3988. * src/Xml2MetalinkProcessor.cc: Updated.
  3989. Made aria2 work with metalink with directory structure.
  3990. * src/File.h, src/File.cc
  3991. (getBasename): New function.
  3992. (getDirname): New function.
  3993. * src/RequestGroup.h, src/RequestGroup.cc
  3994. (_topDir): New variable.
  3995. (setTopDir): New function.
  3996. (initSegmentMan): A directory structure is added to _segmentMan->dir.
  3997. Rewrote HTTP header parsing with stringstream.
  3998. * src/HttpConnection.h, src/HttpConnection.cc
  3999. (HttpRequestEntry): New class.
  4000. (headerBuf): Removed.
  4001. (headerBufLength): Removed.
  4002. (outstandingHttpRequests): Now its element type is
  4003. HttpRequestEntryHandle.
  4004. (findEndOfHeader): Removed.
  4005. (receiveResponse): Rewritten.
  4006. * src/HttpHeaderProcessor.h, src/HttpHeaderProcessor.cc: New class.
  4007. Updated doc for -j option to notice that it should be used with -i
  4008. option.
  4009. * src/main.cc (showUsage)
  4010. Removed unused classes.
  4011. * src/RequestInfo.h
  4012. (FileInfo): Removed.
  4013. (checksum): Removed.
  4014. (fileInfo): Removed.
  4015. (setChecksum): Removed.
  4016. (getChecksum): Removed.
  4017. (getFileInfo): Removed.
  4018. Use ISO units.
  4019. * src/ConsoleDownloadEngine.cc
  4020. * src/TorrentConsoleDownloadEngine.cc
  4021. * src/Util.cc (abbrevSize)
  4022. 2007-06-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4023. Added the default listening ports to the help message.
  4024. * src/main.cc (showUsage)
  4025. 2007-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4026. Reduce the number of calls to gettimeofday to lower CPU load.
  4027. * src/TimeA2.h, src/TimeA2.cc (differenceInMillis): New function.
  4028. * src/SpeedCalc.h, src/SpeedCalc.cc (calculateSpeed): New function.
  4029. * src/Peer.h (calculateUploadSpeed): New function.
  4030. (calculateDownloadSpeed): New function.
  4031. * src/DefaultPeerStorage.cc
  4032. (CalculateStat): Added _now variable.
  4033. In operator(), call Peer::calculateDownloadSpeed(const struct timeval&)
  4034. and Peer::calculateUploadSpeed(const struct timeval&)
  4035. Drop connection if no request or piece message is exchanged in
  4036. a certain interval.
  4037. * src/DefaultBtInteractive.h
  4038. (btRuntime): New variable.
  4039. (inactiveCheckPoint): New variable.
  4040. (checkActiveInteraction): New function.
  4041. * src/DefaultBtInteractive.cc (receiveMessages): Reset timer when
  4042. request or piece message is received.
  4043. (checkActiveInteraction): New function.
  4044. (doInteractionProcessing): Call checkActiveInteraction.
  4045. Fixed the bug that causes remote Metalink and Torrent files are not
  4046. processed.
  4047. * src/MultiUrlRequestInfo.cc (createNextRequestInfo): Fixed the bug.
  4048. 2007-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4049. Changed format of log file.
  4050. * src/SimpleLogger.cc
  4051. * Release 0.11.0
  4052. 2007-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4053. * src/AbstractCommand.cc
  4054. (execute): Changed log level of MSG_RESTARTING_DOWNLOAD and
  4055. MSG_MAX_TRY from error to info.
  4056. Added MSG_DOWNLOAD_ABORTED after MSG_MAX_TRY.
  4057. * src/message.h
  4058. (MSG_TORRENT_DOWNLOAD_ABORTED): New definition.
  4059. (MSG_DOWNLOAD_ABORTED): Added %s.
  4060. (MSG_RESTARTING_DOWNLOAD): Added %s.
  4061. (MSG_DOWNLOAD_ALREADY_COMPLETED): Updated.
  4062. * src/PeerAbstractCommand.cc
  4063. (execute): MSG_DOWNLOAD_ABORTED -> MSG_TORRENT_DOWNLOAD_ABORTED
  4064. * src/Request.h
  4065. (cookieBox): Made ShardHandle.
  4066. * src/RequestGroup.h, src/RequestGroup.cc
  4067. (createNextCommandWithAdj): New function.
  4068. * src/FileAllocationCommand.cc
  4069. (executeInternal): Use createNextCommandWithAdj().
  4070. * src/CheckIntegrityCommand.cc
  4071. (executeInternal): Use createNextCommandWithAdj().
  4072. Added --load-cookies command-option.
  4073. * src/OptionHandlerFactory.cc
  4074. (createOptionHandlers): Added PREF_LOAD_COOKIES.
  4075. * src/CookieBox.h, src/CookieBox.cc: Rwritten using CookieParser.
  4076. Now aria2 can handle cookie's expiration date.
  4077. * src/Cookie.h (expires): Changed its type to time_t.
  4078. * src/main.cc: Added --load-cookies command-line option.
  4079. * src/prefs.h (PREF_LOAD_COOKIES): New definition.
  4080. * src/Util.h, src/Util.cc (httpGMT): New function.
  4081. * src/Request.cc (Request): Initialize cookieBox using
  4082. CookieBoxFactory.
  4083. * src/CookieBoxFactory.h, src/CookieBoxFactory.cc: New class.
  4084. * src/CookieParser.h, src/CookieParser.cc: New class.
  4085. * src/main.cc: Chagned the default value of --metalink-servers to 5.
  4086. * src/HttpResponseCommand.cc
  4087. (handleOtherEncoding): Call RequestGroup::shouldCancelDownloadForSafety
  4088. * src/MetalinkRequestInfo.cc: Now -s option is ignored in Metalink
  4089. download.
  4090. 2007-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4091. Added -j command-line option.
  4092. * src/OptionHandlerFactory.cc (createOptionHandlers)
  4093. * src/main.cc
  4094. * src/ByteArrayDiskWriter.h, src/ByteArrayDiskWriter.cc
  4095. Rewritten using stringstream.
  4096. * src/TrackerUpdateCommand.h, src/TrackerUpdateCommand.cc
  4097. Rewritten using stringstream.
  4098. 2007-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4099. Make download size shown in MB, KB.
  4100. * src/ConsoleDownloadEngine.h (sendStatistics)
  4101. * src/Util.h, srcUtil.cc (abbrevSize): New function.
  4102. 2007-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4103. Accept incoming connections if download rate is low.
  4104. * src/PeerListenCommand.h, src/PeerListenCommand.cc:
  4105. (_lowestSpeedLimit): New variable.
  4106. (setLowestSpeedLimit): New function.
  4107. (execute): Accept incoming connections if download rate is low.
  4108. MAX_PEERS is ignored in this case.
  4109. Disable PREF_OUT in multiple concurrent download:
  4110. * src/RequestGroup.h, src/RequestGroup.cc
  4111. (setUserDefinedFilename): New function.
  4112. * src/DownloadEngineFactory.cc
  4113. (newConsoleEngine): Do not set PREF_OUT to requestGroup in multiple
  4114. concurrent download.
  4115. * src/DefaultSegmentManFactory.cc
  4116. (createNewInstance): Comment out the line: segmentMan->ufilename = ...
  4117. 2007-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4118. RequestGroup::getNextCommand() was renamed to createNextCommand().
  4119. Added its overloaded method.
  4120. * src/RequestGroup.h
  4121. (_numConcurrentCommand): New variable.
  4122. (setNumConcurrentCommand): New function.
  4123. * src/RequestGroup.cc
  4124. Abort download if same file is being downloaded concurrently.
  4125. * src/RequestGroup.h, src/RequestGroupMan.cc
  4126. (isSameFileBeingDownloaded): New function.
  4127. * src/HttpResponseCommand.cc (executeInternal)
  4128. * src/FtpNegotiateCommand.cc (recvSize)
  4129. * src/message.h (EX_DUPLICATE_FILE_DOWNLOAD): New definition.
  4130. * main.cc: Added help message for -i option.
  4131. 2007-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4132. * src/FileAllocationCommand.cc: Derived from RealtimeCommand.
  4133. * src/CheckIntegrityCommand.cc: Derived from RealtimeCommand.
  4134. * src/MetalinkEntry.h
  4135. (checksum): Changed to ChecksumHandle
  4136. * src/MetalinkRequestInfo.cc
  4137. (checksum): Changed to ChecksumHandle
  4138. * src/File.cc
  4139. (mkdirs): OPEN_MODE -> DIR_OPEN_MODE
  4140. * src/common.h
  4141. (DIR_OPEN_MODE): New definition
  4142. * src/RequestGroup.cc
  4143. (prepareForNextAction): Added an argument.
  4144. * src/message.h
  4145. (MSG_GOOD_CHECKSUM): New definition
  4146. (MSG_BAD_CHECKSUM): New definition
  4147. * src/HttpResponseCommand.cc
  4148. (handleDefaultEncoding): Continue download sequence in new
  4149. non-segmented download.
  4150. * src/FileAllocationEntry.h
  4151. (_nextDownloadCommand): New variable.
  4152. * src/DownloadCommand.cc
  4153. (prepareForNextSegment): Create ChecksumCommand if checksum is
  4154. available.
  4155. * src/RealtimeCommand.h, src/RealtimeCommand.cc: New class.
  4156. * src/IteratableChecksumValidator.h,
  4157. src/IteratableChecksumValidator.cc: New class.
  4158. * src/ChecksumCommand.h, src/ChecksumCommand.cc: New class.
  4159. 2007-05-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4160. Change file mode to 666:
  4161. * src/common.h (OPEN_MODE): New definition.
  4162. * src/File.cc
  4163. * src/Util.cc
  4164. * src/Directry.cc
  4165. * src/AbstractDiskWriter.cc
  4166. Change the level of log message "download aborted" to debug:
  4167. * src/PeerAbstractCommand.cc (execute)
  4168. * src/RequestGroup.h (RequestGroup): Initialized _hintTotalLength to 0.
  4169. * src/TrackerWatcherCommand.cc
  4170. (createCommand): Sleep some seconds after request failed.
  4171. If tracker request fails more than value of PREF_TRACKER_MAX_TRIES,
  4172. then abort tracker request.
  4173. 2007-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4174. * Added the simultaneous download feature.
  4175. * src/main.cc: Print "Exception caught: " when exception is caught.
  4176. Use CUIDCounter instead of BtRuntime::getNewCuid():
  4177. * src/ActivePeerConnectionCommand.cc
  4178. * src/PeerInteractionCommand.cc
  4179. * src/BtRuntime.h
  4180. (cuidCounter): Removed.
  4181. (getNewCuid): Removed.
  4182. * src/DownloadEngineFactory.cc
  4183. * src/PeerListenCommand.cc
  4184. * src/TrackerUpdateCommand.cc
  4185. * src/PeerInitiateConnectionCommand.cc
  4186. 2007-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4187. * src/PeerAbstractCommand.cc
  4188. (onAbort): Call PeerStorage::returnPeer()
  4189. * src/DefaultPeerStorage.h, src/DefaultPeerStorage.cc
  4190. (incomingPeers): New variable.
  4191. (addIncomingPeer): New function.
  4192. (returnPeer): New function.
  4193. (onErasingPeer): New function.
  4194. (addPeer): push_back -> push_front
  4195. (getActivePeers): Rewritten.
  4196. (calculateStat): Rewritten.
  4197. * src/PeerStorage.h
  4198. (TransferStat::copy): New function.
  4199. (TransferStat::TransferStat): New function.
  4200. (TransferStat::operator=): New function.
  4201. (addIncomingPeer): New function.
  4202. (returnPeer): New function.
  4203. * src/PeerListenCommand.cc
  4204. (execute): Use PeerStorage::addIncomingPeer() instead of
  4205. Peer::addPeer().
  4206. 2007-04-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4207. Connect to a peer actively when download speed is lower than specified
  4208. speed in torrent download:
  4209. * src/ActivePeerConnectionCommand.h: New class.
  4210. 2007-03-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4211. * src/HttpRequest.cc (createRequest): url-encode user-agent
  4212. * src/main.cc: Fixed the bug that prevents download if .netrc
  4213. doesn't exist.
  4214. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4215. To cache resolved hostname:
  4216. * src/AbstractCommand.h, src/AbstractCommand.cc
  4217. (resolveHostname): Put outside #ifdef ENABLE_ASYNC_DNS clause.
  4218. Added dns cache.
  4219. * src/FtpInitiateConnectionCommand.cc
  4220. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS.
  4221. * src/NameResolver.h, src/NameResolver.cc: Added synchronized
  4222. NameResolver working without ares.
  4223. * src/TorrentRequestInfo.cc
  4224. (execute): Don't cache dns in torrent download.
  4225. * src/HttpInitiateConnectionCommand.cc
  4226. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS
  4227. * src/DNSCache.h: New class.
  4228. * src/UrlRequestInfo.cc
  4229. (execute): Use dns cache.
  4230. In http request, suppress port number in http request header if port
  4231. is 80 or 443:
  4232. * src/HttpRequest.cc (getHostText): Suppress port number in http
  4233. request header if port is 80 or 443.
  4234. (createProxyRequest): Allways send port number.
  4235. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4236. To add the command-line option which disables netrc support:
  4237. * src/OptionHandlerFactory.cc
  4238. (createOptionHandlers): Added PREF_NO_NETRC.
  4239. * src/main.cc: Added -n option.
  4240. * src/prefs.h (PREF_NO_NETRC): New definition.
  4241. * src/RequestFactory.cc: Do not use netrc in ftp if PREF_NO_NETRC is
  4242. V_TRUE.
  4243. Note that netrc is not used in http, http proxy even if PREF_NO_NETRC
  4244. is V_FALSE. This may get configurable in the future release.
  4245. To clear peer's error status by time basis:
  4246. * src/PeerAbstractCommand.cc
  4247. (onAbort): Call Peer::startBadCondition().
  4248. * src/Peer.h, src/Peer.cc
  4249. (error): Removed.
  4250. (_badConditionStartTime): New variable.
  4251. (_badConditionInterval): New variable. Initialized to 10 seconds.
  4252. (startBadCondition): New function.
  4253. (isGood): New function.
  4254. * src/DefaultPeerStorage.cc
  4255. (addPeer): Use Peer::isGood().
  4256. (FindFinePeer): Use Peer::isGood().
  4257. Always include port number in http request header:
  4258. * src/HttpRequest.cc (getHostText): Always include port number in
  4259. http request header.
  4260. 2007-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4261. To the ability to read options from a config file:
  4262. * src/main.cc: Command-line parameter validation is delegated to
  4263. OptionHandler class.
  4264. * src/OptionHandlerFactory.h, src/OptionHandlerFactory.cc: New class.
  4265. * src/Option.h, src/Option.cc (clear): New function.
  4266. * src/OptionParser.h, src/OptionParser.cc: New class.
  4267. * src/OptionHandler.h: New class.
  4268. * src/NameMatchOptionHandler.h: New class.
  4269. * src/OptionHandlerImpl.h: New classes.
  4270. * src/prefs.h: '_' -> '-'
  4271. (FTP_PASV_ENABLED): Renamed to FTP_PASV.
  4272. (FTP_PASV): New definition.
  4273. * src/Util.h, src/Util.cc (getRealSize): New function.
  4274. To disable netrc support if .netrc file does not have correct
  4275. permissions:
  4276. * src/File.h, src/File.cc (mode): New function.
  4277. To prevent confidential information to be logged:
  4278. * src/HttpConnection.h, src/HttpConnection.cc
  4279. (eraseConfidentialInfo): New function.
  4280. (sendRequest): Call eraseConfidentialInfo().
  4281. (sendProxyRequest): Call eraseConfidentialInfo().
  4282. * src/main.cc: Validate permissions of .netrc file.
  4283. To add --user-agent command-line option:
  4284. * src/main.cc: Added new command line option: --user-agent
  4285. * src/prefs.h (PREF_USER_AGENT): New definition.
  4286. * src/HttpRequestCommand.cc (executeInternal): Set user-agent option
  4287. parameter to HttpRequest object.
  4288. * src/AbstractProxyRequestCommand.cc
  4289. (executeInternal): Set user-agent option parameter to HttpRequest
  4290. object.
  4291. Marged the patches from Dan Fandrich.
  4292. 2007-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4293. Use filename and size from Metalink file instead of sending HEAD
  4294. request:
  4295. * src/UrlRequestInfo.h
  4296. (_filename): New variable.
  4297. (_totalLength): New variable.
  4298. (setTotalLength): New variable.
  4299. (setFilename): New variable.
  4300. * src/MetalinkRequestInfo.cc
  4301. (execute): Set filename and size to UrlRequestInfo
  4302. * src/UrlRequestInfo.cc
  4303. (execute): Use filename and size from Metalink instead of seding
  4304. HEAD request to servers.
  4305. 2007-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4306. To add the ability to resume downloading a partially downloaded file
  4307. which is downloaded from the beginning:
  4308. * src/FileAllocator.h: Made abstract class. New DefaultFileAllocator
  4309. takes this role.
  4310. * src/main.cc: Added -c option.
  4311. * src/BitfieldMan.h, src/BitfieldMan.cc (setBitRange): New function.
  4312. * src/DiskWriter.h (openExistingFile): Added totalLength argument.
  4313. * src/prefs.h (PREF_CONTINUE): New definition.
  4314. * src/SegmentMan.h, src/SegmentMan.cc (markPieceDone): New function.
  4315. * src/DefaultDiskWriter.cc
  4316. (createNewDiskWriter): Add GlowFileAllocator to the new object.
  4317. * src/AbstractDiskWriter.h
  4318. (glowFileAllocator): New variable.
  4319. * src/AbstractDiskWriter.cc
  4320. (openExistingFile): Now preallocate file space from the end of the
  4321. existing file if totalLength argument is specified and grater than 0.
  4322. * src/UrlRequestInfo.cc: If -c option is specified and the file
  4323. to download exists in local, continue the download of the file.
  4324. --allow-overwrite=true is assumed in this context.
  4325. * src/DefaultFileAllocator.h, src/DefaultFileAllocator.cc: New class.
  4326. * src/GlowFileAllocator.h, src/GlowFileAllocator.cc: New class.
  4327. Throw exception if --check-integrity=true is specified but chunk
  4328. checksums are not provided:
  4329. * src/UrlRequestInfo.cc
  4330. Do not print URLs to stdout:
  4331. * src/UrlRequestInfo.cc
  4332. 2007-03-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4333. * src/Request.h: Use AuthResolver to get authentication information.
  4334. * src/main.cc: Made RequestFactory a singleton object. Netrc is now
  4335. set to RequestFactory object.
  4336. * src/AuthConfigItem.h, src/AuthConfigItem.cc: Removed.
  4337. * src/AuthConfig.h, src/AuthConfig.cc: Rewritten.
  4338. * src/TrackerWatcherComand.cc: Use RequestFactorySingletonHolder to
  4339. create Request object.
  4340. 2007-03-19 Tatsuhiro Tsujikawa <tujikawa at valkyrie dot rednoah com>
  4341. To integrate Netrc into exsiting classes:
  4342. * src/Request.h
  4343. (_userDefinedAuthConfig): New variable.
  4344. (findNetrcAuthenticator): New function.
  4345. (segment): Removed.
  4346. (setUserDefinedAuthConfig): New function.
  4347. (resolveHttpAuthConfigItem): New function.
  4348. (resolveFtpAuthConfigItem): New function.
  4349. (resolveHttpProxyAuthConfigItem): New function.
  4350. * src/HttpRequest.h
  4351. (authConfig): Removed.
  4352. (proxyAuthConfig): Removed.
  4353. (setAuthConfig): Removed.
  4354. (setProxyAuthConfig): Removed.
  4355. * src/UrlRequest.h
  4356. (getHeadResult): Added a parameter: authConfigHandle
  4357. * src/common.h
  4358. (SingletonHolder.h): New include.
  4359. * src/main.cc
  4360. (Netrc.h): New include.
  4361. (main): Removed initial values of PREF_FTP_USER, PREF_FTP_PASSWD.
  4362. Added initial value of PREF_NETRC_PATH.
  4363. Added the initialization of netrc.
  4364. * src/AuthConfig.h: New class.
  4365. * src/prefs.h
  4366. (PREF_NETRC_PATH): New definition.
  4367. * src/HttpAuthConfig.h: Removed.
  4368. * src/Netrc.cc
  4369. (getRequiredNextToken): New function.
  4370. (skipMacdef): New function.
  4371. (parse): Rewritten.
  4372. * src/Netrc.h
  4373. (getRequiredNextToken): New function.
  4374. (skipMacdef): New function.
  4375. * src/Util.h, src/Util.cc
  4376. (getHomeDir): New function.
  4377. * src/TrackerWatcherComand.cc
  4378. (createRequestCommand): Use AuthConfig.
  4379. * src/FtpConnection.cc
  4380. (sendUser): Use Request::resolveFtpAuthConfigItem().
  4381. (sendPass): Use Request::resolveFtpAuthConfigItem().
  4382. * src/Request.cc
  4383. (findNetrcAuthenticator): New function.
  4384. (resolveHttpAuthConfigItem): New function.
  4385. (resolveFtpAuthConfigItem): New function.
  4386. (resolveHttpProxyAuthConfigItem): New function.
  4387. * src/UrlRequestInfo.cc: Use AuthConfig.
  4388. * src/HttpRequest.cc
  4389. (createRequest): Use authConfig.
  4390. (getProxyAuthString): Use authConfig.
  4391. (configure): Removed PREF_HTTP_USER, PREF_HTTP_PASSWD,
  4392. PREF_HTTP_PROXY_USER, PREF_HTTP_PROXY_PASSWD.
  4393. 2007-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4394. To reduce overhead to find commands whose socket is either
  4395. readable or writable in the download engine loop:
  4396. * src/Command.h, src/Command.cc
  4397. (STATUS): New enum.
  4398. (status): New variable.
  4399. (statusMatch): New function.
  4400. (setStatusActive): New function.
  4401. (setStatusInactive): New function.
  4402. * src/DownloadEngine.h, src/DownloadEngine.cc
  4403. (executeCommand): New function.
  4404. (run): Simplified.
  4405. (waitData): Call Command::setStatusActive() when command's socket is
  4406. readable or writable.
  4407. 2007-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4408. To handle Segment as SegmentHandle:
  4409. * src/AbstractCommand.cc (execute): Rewritten.
  4410. * src/SegmentMan.h: Segment -> SegmentHandle
  4411. Introducded HttpResponse class, HttpRequest class to improve code
  4412. extensiveness and make it clear:
  4413. * src/HttpDownloadCommand.cc: transfer encoders are now managed by
  4414. HttpResponse class.
  4415. * src/HttpRequest.h, src/HttpRequest.cc: New class.
  4416. * src/HttpResponse.h, src/HttpResponse.cc: New class.
  4417. * src/HttpConnection.cc: Contruction of http request were moved to
  4418. HttpRequest class.
  4419. * src/HttpResponseCommand.h, src/HttpResponseCommand.cc: Refactored.
  4420. * src/HttpRequestCommand.cc (executeInternal): Rewritten.
  4421. * src/HttpAuthConfig.h: New class.
  4422. * src/Range.h: New class.
  4423. To make FtpTunnel{Request, Response}Command and
  4424. HttpProxy{Request, Response}Command derived from
  4425. AbstractProxy{Request, Response}Command:
  4426. * src/FtpTunnelResponseCommand.h, src/FtpTunnelResponseCommand.cc:
  4427. Derived from AbstractProxyRequestCommand class.
  4428. * src/FtpTunnelRequestCommand.h, src/FtpTunnelRequestCommand.cc:
  4429. Derived from AbstractProxyResponseCommand class.
  4430. * src/HttpProxyRequestCommand.h, src/HttpProxyRequestCommand.cc:
  4431. Derived from AbstractProxyRequestCommand class.
  4432. * src/HttpProxyResponseCommand.h, src/HttpProxyResponseCommand.cc:
  4433. Derived from AbstractProxyResponseCommand class.
  4434. * src/AbstractProxyRequestCommand.h, src/AbstractProxyRequestCommand.cc
  4435. : New class.
  4436. * src/AbstractProxyResponseCommand.h,
  4437. src/AbstractProxyResponseCommand.cc: New class.
  4438. To add netrc support:
  4439. * src/Netrc.h, src/Netrc.cc: New class.
  4440. * src/Util.h, src/Util.cc (split): New function.
  4441. * src/HttpHeader.cc (getRange): Fixed so that it inspects
  4442. "Content-Range" header instead of "Range" header.
  4443. * src/HttpHeader.h
  4444. (getStatus): Removed.
  4445. (setStatus): Removed.
  4446. * src/Segment.h
  4447. (getPositionToWrite): New function.
  4448. 2007-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4449. * src/HttpHeader.h
  4450. (Range.h): New include.
  4451. (status): New variable.
  4452. (HttpHeader): Initialized status with 0.
  4453. (getStatus): New function.
  4454. (setStatus): New function.
  4455. (getRange): New function.
  4456. (HttpHeaderHandle): New function.
  4457. * src/HttpHeader.cc
  4458. (getRange): New function.
  4459. * src/Request.h
  4460. (RequestWeakHandle): New definition.
  4461. * src/HttpConnection.h
  4462. (HttpConnectionHandle): New type definition.
  4463. * src/HttpConnection.cc
  4464. (receiveResponse): Set HTTP status to headers.
  4465. * src/main.cc
  4466. (showUsage): Fixed typo.
  4467. * src/Segment.h
  4468. (SegmentHandle): New type definition.
  4469. * src/BitfieldMan.h
  4470. (getMissingUnusedLength): New function.
  4471. * src/BitfieldMan.cc
  4472. (getMissingUnusedLength): New function.
  4473. 2007-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4474. To fix static initialization order problem:
  4475. * src/BitfieldManFactory.h
  4476. (defaultRandomizer): Removed.
  4477. (factory): New variable.
  4478. (getNewFactory): Removed.
  4479. (getFactoryInstance): New function.
  4480. (setDefaultRandomizer): Rewritten.
  4481. (getDefaultRandomizer): Rewritten.
  4482. * src/BitfieldManFactory.cc
  4483. (defaultRandomizer): Removed.
  4484. (factory): Initialized to 0.
  4485. (BitfieldManFactory): Initialized randomizer to 0.
  4486. * src/DefaultPieceStorage.cc
  4487. (DefaultPieceStorage): getNewFactory() -> getFactoryInstance()
  4488. * src/Peer.cc
  4489. (Peer): getNewFactory() -> getFactoryInstance()
  4490. * src/SegmentMan.cc
  4491. (initBitfield): getNewFactory() -> getFactoryInstance()
  4492. * src/Piece.cc
  4493. (Piece): getNewFactory() -> getFactoryInstance()
  4494. 2007-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4495. To fix the bug that causes crash on Max OS X:
  4496. * src/SimpleRandomizer.h
  4497. (getInstance): Create new instance if the static variable is null.
  4498. * src/SimpleRandomizer.cc
  4499. (randomizer): Initialized to 0.
  4500. * src/BitfieldManFactory.h
  4501. (getNewFactory): Removed the call to setRandomizer().
  4502. To fix the miscalculation of the range of checksum:
  4503. * src/BitfieldMan.h
  4504. (isBitSetOffsetRange): New function.
  4505. * src/BitfieldMan.cc
  4506. (isBitSetOffsetRange): New function.
  4507. * src/SegmentMan.cc
  4508. (tryChunkChecksumValidation): Use BitfieldMan::isBitSetOffsetRange().
  4509. Use bitfield->getBlockLength() instead of segment.segmentLength.
  4510. * Release 0.10.1
  4511. 2007-02-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4512. To lower CPU usage in BitTorrent download when --max-upload-limit
  4513. command-line option specified:
  4514. * src/DefaultBtMessageDispatcher.cc
  4515. (sendMessages): Calculate uploading speed only when current message
  4516. is uploading data and is not sent yet.
  4517. * src/DefaultPeerStorage.h
  4518. (MAX_PEER_LIST_SIZE): 100 -> 60, because 60 is well enough.
  4519. * src/HttpResponseCommand.cc
  4520. (handleDefaultEncoding): Added the cast to int32_t to itos.
  4521. This fixes compile error in Soralis 10.
  4522. 2007-01-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4523. To fix segfault in Metalink download:
  4524. * src/UrlRequestInfo.h
  4525. (filename): Removed.
  4526. (totalLength): Removed.
  4527. (setTotalLength): Removed.
  4528. (setFilename): Removed.
  4529. * src/MetalinkRequestInfo.cc
  4530. (execute): Do not set filename and totalLength to reqInfo.
  4531. Set chunk checksum to reqInfo if it is not null.
  4532. * src/HttpResponseCommand.cc
  4533. (executeInternal): Fixed filename in log.
  4534. (handleDefaultEncoding): Removed the call to initBitfield() and
  4535. markAllPiecesDone().
  4536. (handleOtherEncoding): Added HEAD method handling.
  4537. * src/FtpNegotiateCommand.cc
  4538. (executeInternal): Added SEQ_HEAD_OK handling.
  4539. (recvSize): In HEAD handling, set sequence to SEQ_HEAD_OK and
  4540. return false.
  4541. * src/FtpNegotiateCommand.h
  4542. (SEQ_HEAD_OK): New definition.
  4543. * src/SegmentMan.cc
  4544. (initBitfield): Delete bitfield.
  4545. (isChunkChecksumValidationReady): Fixed the condition.
  4546. * src/UrlRequestInfo.cc: Fixed so that Metalink and Torrent download
  4547. works fine.
  4548. 2007-01-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4549. * src/Xml2MetalinkProcessor.h
  4550. (xpathExists): New function.
  4551. * src/Xml2MetalinkProcessor.cc
  4552. (xpathExists): New function.
  4553. Not to send HEAD request if filename and size are available in Metalink
  4554. file:
  4555. * src/UrlRequestInfo.h
  4556. (filename): New variable.
  4557. (totalLength): New variable.
  4558. (setTotalLength): New function.
  4559. (setFilename): New function.
  4560. * src/MetalinkRequestInfo.cc
  4561. (execute): Set filename and size to UrlRequestInfo.
  4562. * src/MetalinkEntry.cc
  4563. (MetalinkEntry): Initialize size with 0.
  4564. * src/UrlRequestInfo.cc
  4565. (execute): Set filename and size to SegmentMan.
  4566. Not to download rest of the files after selected files are downloaded
  4567. in BitTorrent:
  4568. * src/PieceStorage.h
  4569. (allDownloadFinished): New function.
  4570. * src/DefaultBtAnnounce.cc
  4571. (isCompleteAnnounceReady): Use allDownloadFinished instead of
  4572. downloadFinished.
  4573. (getAnnounceUrl): Use allDownloadFinished instead of downloadFinished.
  4574. * src/DefaultPieceStorage.cc
  4575. (completePiece): Use allDownloadFinished instead of downloadFinished.
  4576. Commented out the call to finishSelectiveDownloadingMode().
  4577. (downloadFinished): Call isFilteredAllBitSet() instead of
  4578. isAllBitSet().
  4579. (allDownloadFinished): New function.
  4580. * src/DefaultBtInteractive.cc
  4581. (addBitfieldMessageToQueue): Call allDownloadFinished() instead of
  4582. downloadFinished().
  4583. (checkHave): Call allDownloadFinished() instead of downloadFinished().
  4584. * src/TorrentDownloadEngine.cc
  4585. (onEndOfRun): Call allDownloadFinished() instead of downloadFinished().
  4586. * src/BitfieldMan.h
  4587. (isFilteredAllBitSet): New function.
  4588. * src/ShareRatioSeedCriteria.h
  4589. (PieceStorage.h): New include.
  4590. (pieceStorage): New variable.
  4591. (evaluate):
  4592. btContext->getTotalLength() -> pieceStorage->getCompletedLength()
  4593. * src/BitfieldMan.cc
  4594. (isFilteredAllBitSet): New function.
  4595. (isAllBitSet): Filter is not took into account.
  4596. Rename --force-truncate as --allow-overwrite:
  4597. * src/TorrentRequestInfo.cc
  4598. (execute): PREF_FORCE_TRUNCATE -> PREF_ALLOW_OVERWRITE
  4599. * src/main.cc
  4600. (showUsage): --force-truncate -> --allow-overwrite
  4601. * src/message.h
  4602. (EX_FILE_ALREADY_EXISTS): --force-truncate -> --allow-overwrite
  4603. * src/prefs.h
  4604. (PREF_FORCE_TRUNCATE): Removed.
  4605. (PREF_ALLOW_OVERWRITE): New definition.
  4606. * src/SegmentMan.cc
  4607. (shouldCancelDownloadForSafety): --force-truncate -> --allow-overwrite
  4608. * src/MetalinkRequestInfo.cc
  4609. (execute): Queueing message are now logged in info level.
  4610. * src/common.h
  4611. (LONG_LONG_MAX): Removed.
  4612. (LONG_LONG_MIN): Removed.
  4613. * src/HttpResponseCommand.cc
  4614. (handleDefaultEncoding): LONG_LONG_MAX -> INT64_MAX
  4615. * src/FtpNegotiateCommand.cc
  4616. (recvSize): LONG_LONG_MAX -> INT64_MAX
  4617. * src/main.cc
  4618. (showUsage): Added --check-integriy and --realtime-chunk-checksum
  4619. command-line option.
  4620. (main): Added --check-integriy and --realtime-chunk-checksum
  4621. command-line option.
  4622. --force-truncate -> --allow-overwrite
  4623. Set initial value of --check-integrity option to false.
  4624. Don't show usage when error occurs while persing command-line options.
  4625. Removed deprecated --upload-limit option.
  4626. 2007-01-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4627. * src/message.h: Added EX_INVALID_PAYLOAD_SIZE and
  4628. EX_INVALID_BT_MESSAGE_ID. Following source files affected.
  4629. * src/BtAllowedFastMessage.cc:
  4630. * src/BtBitfieldMessage.cc
  4631. * src/BtCancelMessage.cc
  4632. * src/BtChokeMessage.cc
  4633. * src/BtHaveAllMessage.cc
  4634. * src/BtHaveMessage.cc
  4635. * src/BtHaveNoneMessage.cc
  4636. * src/BtInterestedMessage.cc
  4637. * src/BtNotInterestedMessage.cc
  4638. * src/BtPieceMessage.cc
  4639. * src/BtPortMessage.cc
  4640. * src/BtRejectMessage.cc
  4641. * src/BtRequestMessage.cc
  4642. * src/BtSuggestPieceMessage.cc
  4643. * src/BtUnchokeMessage.cc
  4644. * src/message.h: Added EX_INVALID_CHUNK_CHECKSUM. Following source
  4645. files are affected.
  4646. * src/ChunkChecksumValidator.cc
  4647. * src/SegmentMan.cc
  4648. 2007-01-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4649. To add chunk checksum validation:
  4650. * src/MetalinkEntry.h
  4651. (MetalinkChunkChecksum.h): New include.
  4652. (chunkChecksum): New variable.
  4653. * src/Request.h
  4654. (method): New variable.
  4655. (setMethod): New function.
  4656. (getMethod): New function.
  4657. (METHOD_GET): New static constant.
  4658. (METHOD_HEAD): New static constant.
  4659. * src/Xml2MetalinkProcessor.h
  4660. (getPieceHash): New function.
  4661. * src/PieceStorage.h
  4662. (markAllPiecesDone): New function.
  4663. (checkIntegrity): New function.
  4664. * src/FileAllocator.h
  4665. (NullFileAllocationMonitor.h): New include.
  4666. (FileAllocator): Initialize fileAllocationMonitor with new
  4667. NullFileAllocationMonitor().
  4668. * src/MultiDiskAdaptor.h
  4669. (messageDigest.h): Remove include.
  4670. (ctx): Removed.
  4671. (hashUpdate): Added ctx.
  4672. (MultiDiskAdaptor): Removed ctx.
  4673. (sha1Sum): Renamed as messageDigest.
  4674. (messageDigest): New function.
  4675. * src/UrlRequestInfo.h
  4676. (HeadResult): New class.
  4677. (digestAlgo): New variable.
  4678. (chunkChecksumLength): New variable.
  4679. (chunkChecksums): New variable.
  4680. (getHeadResult): New function.
  4681. (UrlRequestInfo): Added digestAlgo, chunkChecksumLength.
  4682. (setDigestAlgo): New function.
  4683. (setChunkChecksumLength): New function.
  4684. (setChunkChecksums): New function.
  4685. * src/DefaultPieceStorage.cc
  4686. (DiskAdaptorWriter.h): New include.
  4687. (ChunkChecksumValidator.h): New include.
  4688. (markAllPiecesDone): New function.
  4689. (checkIntegrity): New function.
  4690. * src/DefaultBtContext.h
  4691. (getPieceHashes): New function.
  4692. * src/TorrentRequestInfo.cc
  4693. (execute): Try to validate chunk checksum if file already exists and
  4694. .aria2 file doesn't there and user allows aria2 to overwrite it.
  4695. * src/messageDigest.h
  4696. (~MessageDigestContext): Added digestFree().
  4697. * src/MetalinkRequestInfo.cc
  4698. (execute): Set digestAlgo, chunkChecksum, chunkChecksums to reqInfo.
  4699. * src/DiskAdaptor.h
  4700. (messageDigest.h): New include.
  4701. (sha1Sum): Renamed as messageDigest.
  4702. (messageDigest): New function.
  4703. * src/DownloadCommand.h
  4704. (PeerStat.h): New include.
  4705. (maxDownloadSpeedLimit): New variable.
  4706. (startupIdleTime): New variable.
  4707. (lowestDownloadSpeedLimit): New variable.
  4708. (peerStat): New variable.
  4709. (setMaxDownloadSpeedLimit): New function.
  4710. (setStartupIdleTime): New function.
  4711. (setLowestDownloadSPeedLimit): New function.
  4712. * src/BtContext.h
  4713. (getPieceHashes): New function.
  4714. * src/main.cc
  4715. (main): Set PREF_REALTIME_CHUNK_CHECKSUM and PREF_CHECK_INTEGRITY
  4716. option to true for testing purpose.
  4717. * src/BtPieceMessage.cc
  4718. (checkPieceHash): Use messageDigest
  4719. * src/DownloadEngine.cc
  4720. (SetDescriptor): Removed.
  4721. (AccumulateActiveCommand): Removed.
  4722. (waitData): Rewritten.
  4723. (updateFdSet): Rewritten.
  4724. * src/MultiDiskAdaptor.cc
  4725. (hashUpdate): Added ctx.
  4726. (sha1Sum): Renamed as messageDigest.
  4727. (messageDigest): New function.
  4728. * src/BitfieldMan.h
  4729. (isBitRangeSet): New function.
  4730. (unsetBitRange): New function.
  4731. * src/ByteArrayDiskWriter.h
  4732. (sha1Sum): Renamed as messageDigest.
  4733. (messageDigest): New function.
  4734. * src/ConsoleDownloadEngine.cc
  4735. (calculateStatistics): If nspeed < 0 then set nspeed to 0.
  4736. * src/DiskWriter.h
  4737. (messageDigest.h): New include.
  4738. (sha1Sum): Renamed as messageDigest.
  4739. (messageDigest): New function.
  4740. * src/ChunkChecksumValidator.h: New class.
  4741. * src/DiskAdaptorWriter.h: New class.
  4742. * src/prefs.h
  4743. (PREF_REALTIME_CHUNK_CHECKSUM): New definition.
  4744. (PREF_CHECK_INTEGRITY): New definition.
  4745. * src/HttpResponseCommand.cc
  4746. (handleDefaultEncoding): Added method "HEAD" handling.
  4747. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  4748. (handleOtherEncoding):
  4749. Added the call to e->segmentMan->shouldCancelDownloadForSafety().
  4750. (createHttpDownloadCommand): Set maxDownloadSpeedLimit,
  4751. startupIdleTime, lowestDownloadSpeedLimit to command.
  4752. * src/SegmentMan.h
  4753. (getSegmentEntryByIndex): New function.
  4754. (getSegmentEntryByCuid): New function.
  4755. (getSegmentEntryIteratorByCuid): New function.
  4756. (diskWriter): DiskWriter -> DiskWriterHandle
  4757. (pieceHashes): New variable.
  4758. (chunkHashLength): New variable.
  4759. (digestAlgo): New variable.
  4760. (FindPeerStat): Removed.
  4761. (getPeerStat): Rewritten.
  4762. (markAllPiecesDone): New function.
  4763. (checkIntegrity): New function.
  4764. (tryChunkChecksumValidation): New function.
  4765. (isChunkChecksumValidationReady): New function.
  4766. * src/BitfieldMan.cc
  4767. (BitfieldMan): Initialized bitfieldLength, blocks to 0.
  4768. (BitfieldMan): Initialized blockLength, totalLength, bitfieldLength,
  4769. blocks to 0.
  4770. (isBitRangeSet): New function.
  4771. (unsetBitRange): New function.
  4772. * src/FtpNegotiateCommand.cc
  4773. (executeInternal): Set maxDownloadSpeedLimit,
  4774. startupIdleTime, lowestDownloadSpeedLimit to command.
  4775. (recvSize): Added method "HEAD" handling.
  4776. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  4777. * src/AbstractSingleDiskAdaptor.cc
  4778. (sha1Sum): Renamed as messageDigest.
  4779. (messageDigest): New function.
  4780. * src/AbstractSingleDiskAdaptor.h
  4781. (sha1Sum): Renamed as messageDigest.
  4782. (messageDigest): New function.
  4783. * src/Util.h
  4784. (indexRange): New function.
  4785. * src/MetalinkEntry.cc
  4786. (MetalinkEntry): Initialized chunkChecksum to 0.
  4787. * src/ShaVisitor.cc
  4788. (~ShaVisitor): Removed the call to ctx.digestFree().
  4789. * src/SegmentMan.cc
  4790. (ChunkChecksumValidator.h): New include.
  4791. (SegmentMan): Initialized chunkHashLength to 0. Initialized digestAlgo
  4792. to DIGEST_ALGO_SHA1.
  4793. (~SegmentMan): Removed diskWriter.
  4794. (FindSegmentEntryByIndex): Removed.
  4795. (FindSegmentEntryByCuid): Removed.
  4796. (checkoutSegment): Rewritten.
  4797. (findSlowerSegmentEntry): Rewritten.
  4798. (getSegment): Rewritten.
  4799. (updateSegment): Rewritten.
  4800. (completeSegment): Rewritten.
  4801. (markAllPiecesDone): New function.
  4802. (checkIntegrity): New function.
  4803. (isChunkChecksumValidationReady): New function.
  4804. (tryChunkChecksumValidation): New function.
  4805. * src/Xml2MetalinkProcessor.cc
  4806. (getEntry): Get size and set it to entry.
  4807. Get chunk checksum and set it to entry.
  4808. (getPieceHash): New function.
  4809. * src/Util.cc
  4810. (sha1Sum): Removed ctx.digestFree()
  4811. (fileChecksum): Removed ctx.digestFree()
  4812. (indexRange): New function.
  4813. * src/Request.cc
  4814. (METHOD_GET): New variable.
  4815. (METHOD_HEAD): New variable.
  4816. (Request): Added method.
  4817. * src/UrlRequestInfo.cc
  4818. (FatalException.h): New include.
  4819. (message.h): New include.
  4820. (operator<<): Added operator<< for class HeadResult.
  4821. (getHeadResult): New function.
  4822. (execute): Get filename and size in separate download engine.
  4823. * src/ChunkChecksumValidator.cc: New class.
  4824. * src/DownloadCommand.cc:
  4825. (DownloadCommand): Added peerStat.
  4826. (executeInternal): Use maxDownloadSpeedLimit member instead of getting
  4827. the value from Option.
  4828. The buffer size is now 16KB.
  4829. Use peerStat member instead of getting it from SegmentMan.
  4830. Use startupIdleTime member instead of gettingit from Option.
  4831. Added chunk checksum validation.
  4832. * src/AbstractDiskWriter.cc
  4833. (AbstractDiskWriter): Removed ctx.
  4834. (~AbstractDiskWriter): Removed ctx.digestFree()
  4835. (writeDataInternal): Returns the return value of write.
  4836. (readDataInternal): Returns the return value of read.
  4837. (sha1Sum): Renamed as messageDigest
  4838. (messageDigest): New function.
  4839. * src/AbstractDiwkWriter.h
  4840. (messageDigest.h): Removed include.
  4841. (ctx): Removed.
  4842. (sha1Sum): Renamed as messageDigest
  4843. (messageDigest): New function.
  4844. * src/DefaultPieceStorage.h
  4845. (markAllPiecesDone): New function.
  4846. (checkIntegrity): New function.
  4847. * src/NullFileAllocationMonitor.h: New class.
  4848. * src/MetalinkChunkChecksum.h: New class.
  4849. 2007-01-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4850. To decrease CPU usage in bittorrent download, calculation results in
  4851. BitfieldMan were cached and realtime fetching PeerObject was removed
  4852. with WeakHandle introduced. Option values are set to the objects
  4853. by setter before download begins.
  4854. * src/DefaultBtRequestFactory.cc: Use messageFactory member.
  4855. * src/DefaultBtRequestFactory.h
  4856. (dispatcher): BtMessageDispatcherHandle ->
  4857. BtMessageDispatcherWeakHandle.
  4858. (messageFactory): New variable.
  4859. (setBtMessageDispatcher): BtMessageDispatcherHandle ->
  4860. BtMessageDispatcherWeakHandle.
  4861. (setBtMessageFactory): New function.
  4862. * src/DefaultBtMessageDispatcher.cc:
  4863. (sendMessages): Use maxUploadSpeedLimit instead of fetching the value
  4864. from Option.
  4865. (checkRequestSlotAndDoNecessaryThing): Use requestTimeout instead of
  4866. feating the value from Option.
  4867. Use messageFactory member.
  4868. * src/PeerInteractionCommand.cc
  4869. (PeerInteractionCommand): Added maxDownloadSpeedLimit.
  4870. Add reverse dependencies to factory object.
  4871. Set maxUploadSpeedLimit and requestTimeout and messageFactory to
  4872. dispatcher.
  4873. Set messageFactory to receiver.
  4874. Set keepAliveInterval and maxDownloadSpeedLimit and messageFactory to
  4875. btInteractive.
  4876. Set receiver to peerObject.
  4877. Set maxDownloadSpeedLimit to this.
  4878. (executeInternal): Use maxDownloadSpeedLimit member.
  4879. * src/BtChokeMessage.cc
  4880. (doReceivedAction): Use dispatcher, requestFactory member.
  4881. (onSendComplete): Use dispatcher member.
  4882. * src/PeerInteractionCommand.h
  4883. (maxDownloadSpeedLimit): New variable.
  4884. * src/DefaultBtMessageReceiver.h
  4885. (peerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  4886. (dispatcher):
  4887. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  4888. (messageFactory): New variable.
  4889. (setPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  4890. (getPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  4891. (setDispatcher):
  4892. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  4893. (setBtMessageFactory): New function.
  4894. * src/DefaultBtInteractive.cc
  4895. (initiateHandshake): Use messageFactory member.
  4896. (addBitfieldMessageToQueue): Use messageFactory member.
  4897. (addAllowedFastMessageToQueue): Use messageFactory member.
  4898. (decideChoking): Use messageFactory member.
  4899. (checkHave): Use messageFactory member.
  4900. (sendKeepAlive): Use keepAliveInterval, messageFactory member.
  4901. (receiveMessages): Use maxDownloadSpeedLimit member.
  4902. (decideInterest): Use messageFactory member.
  4903. * src/BtRequestMessage.cc
  4904. (doReceivedAction): Use messageFactory, dispatcher member.
  4905. (onQueued): Use dispatcher member.
  4906. * src/BtPieceMessage.cc
  4907. (doReceivedAction): Use dispatcher member.
  4908. (send): Use peerConnection member.
  4909. (onWrongPiece): Use requestFactory member.
  4910. (handleChokingEvent): Use messageFactory, dispatcher member.
  4911. (handleCancelSendingPieceEvent): Use messageFactory, dispatcher member.
  4912. * src/BtMessageDispatcher.h
  4913. (BtMessageDispatcherWeakHandle): New type definition.
  4914. * src/SimpleBtMessage.cc
  4915. (send): Use peerConnection member.
  4916. * src/BtRejectMessage.cc
  4917. (doReceivedAction): Use dispatcher member.
  4918. * src/DefaultBtMessageDispatcher.h
  4919. (Option.h): Removed include.
  4920. (messageFactory): New variable.
  4921. (option): Removed.
  4922. (maxUploadSpeedLimit): New variable.
  4923. (requestTimeout): New variable.
  4924. (DefaultBtMessageDispatcher): Removed option.
  4925. Added maxUploadSpeedLimit, requestTimeout.
  4926. (setOption): Removed.
  4927. (getOption): Removed.
  4928. (setMaxUploadSpeedLimit): New function.
  4929. (setRequestTimeout): New function.
  4930. (setBtMessageFactory): New function.
  4931. * src/DefaultBtInteractive.h
  4932. (btMessageReceiver):
  4933. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  4934. (dispatcher):
  4935. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  4936. (btRequestFactory):
  4937. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  4938. (peerConnection):
  4939. PeerConnectionHandle -> PeerConnectionWeakHandle
  4940. (messageFactory): New variable.
  4941. (option): Removed.
  4942. (keepAliveInterval): New variable.
  4943. (maxDownloadSpeedLimit): New variable.
  4944. (DefaultBtInteractive): Added keepAliveInterval, maxDownloadSpeedLimit.
  4945. (setBtMessageReceiver):
  4946. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  4947. (setDispatcher):
  4948. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  4949. (setBtRequestFactory):
  4950. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  4951. (setPeerConnection):
  4952. PeerConnectionHandle -> PeerConnectionWeakHandle
  4953. (setOption): Removed.
  4954. (setKeepAliveInterval): New function.
  4955. (setMaxDownloadSpeedLimit): New function.
  4956. (setBtMessageFactory): New function.
  4957. * src/BitfieldMan.h
  4958. (cachedNumMissingBlock): New variable.
  4959. (cachedNumFilteredBlock): New variable.
  4960. (cachedCompletedLength): New variable.
  4961. (cachedFilteredComletedLength): New variable.
  4962. (cachedFilteredTotalLength): New variable.
  4963. (countMissingBlockNow): New function.
  4964. (countFilteredBlockNow): New function.
  4965. (getFilteredTotalLengthNow): New function.
  4966. (getCompletedLengthNow): New function.
  4967. (getFilteredCompletedLengthNow): New function.
  4968. (updateCache): New function.
  4969. * src/AbstractBtMessage.h
  4970. (BtMessageDispatcher.h): New include.
  4971. (PeerConnection.h): New include.
  4972. (BtRequestFactory.h): New include
  4973. (BtMessageFactory.h): New include.
  4974. (dispatcher): New variable.
  4975. (messageFactory): New variable.
  4976. (peerConnection: New variable.
  4977. (setBtMessageDispatcher): New function.
  4978. (setPeerConnection): New function.
  4979. (setBtMessageFactory): New function.
  4980. (setBtRequestFactory): New function.
  4981. * src/DefaultBtMessageFactory.cc
  4982. (setCommonProperty): Set dispatcher, requestFactory, this,
  4983. peerConnection to msg.
  4984. * src/BtRegistry.h
  4985. (BT_MESSAGE_RECEIVER): New macro.
  4986. * src/PeerConnection.h
  4987. (PeerConnectionWeakHandle): New type definition.
  4988. * src/BtMessageFactory.h
  4989. (BtMessageFactoryWeakHandle): New type definition.
  4990. * src/BitfieldMan.cc
  4991. (BitfieldMan): Added cachedNumMissingBlock, cachedNumFilteredBlock,
  4992. cachedCompletedLength, cachedFilteredComletedLength,
  4993. cachedFilteredTotalLength.
  4994. Call updateCache().
  4995. (countMissingBlock): Return cachedNumMissingBlock.
  4996. (countMissingBlockNow): New function.
  4997. (countBlock): Return cachedNumFilteredBlock if filterEnabled is true.
  4998. (countFilteredBlockNow): New function.
  4999. (setBit): Call updateCache().
  5000. (unsetBit): Call updateCache().
  5001. (setBitfield): Call updateCache().
  5002. (clearAllBit): Call updateCache().
  5003. (setAllBit): Use setBitInternal instead of setBit.
  5004. Call updateCache().
  5005. (addFilter): Call updateCache().
  5006. (enableFilter): Call updateCache().
  5007. (disableFilter): Call updateCache().
  5008. (clearFilter): Call updateCache().
  5009. (getFilteredTotalLength): Return cachedFilteredTotalLength.
  5010. (getFilteredTotalLengthNow): New function.
  5011. (getCompletedLength): Return cachedCompletedLength.
  5012. (getCompletedLengthNow): New function.
  5013. (getFilteredCompletedLength): Return cachedFilteredComletedLength.
  5014. (getFilteredCompletedLengthNow): New function.
  5015. (updateCache): New function.
  5016. * src/BtMessageReceiver.h
  5017. (BtMessageReceiverWeakHandle): New type definition.
  5018. * src/DefaultBtMessageReceiver.cc
  5019. (receiveHandshake): Use messageFactory member.
  5020. (sendHandshake): Use messageFactory member.
  5021. (receiveMessage): Use messageFactory member.
  5022. * src/DefaultBtMessageFactory.h
  5023. (dispatcher): New variable.
  5024. (requestFactory): New variable.
  5025. (peerConnection): New variablle.
  5026. (setBtMessageDispatcher): New function.
  5027. (setBtRequestFactory): New function.
  5028. (setPeerConnection): New function.
  5029. * src/SharedHandle.h
  5030. (RefCount): New class.
  5031. (WeakHandle): New class.
  5032. * src/PeerObject.h
  5033. (BtMessageReceiver.h): New include.
  5034. (PeerObject): Added btMessageReceiver.
  5035. (btMessageReceiver): New variable.
  5036. * src/Util.cc
  5037. (countBit): Simplified.
  5038. * src/BtCancelMessage.cc
  5039. (doReceivedAction): Use dispatcher member.
  5040. * src/BtRequestFactory.h
  5041. (BtRequestFactoryWeakHandle): New type definition.
  5042. * src/PeerStorage.h
  5043. (downloadSpeed): int -> uint32_t
  5044. (uploadSpeed): int -> uint32_t
  5045. (sessionDownloadLength): long long int -> uint64_t
  5046. (sessionUploadLength): long long int -> uint64_t
  5047. 2007-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5048. To add RecoverableException, FatalException:
  5049. * src/AbstractCommand.cc
  5050. (onAbort): Exception -> RecoverableException
  5051. * src/PeerAbstractCommand.h
  5052. (RecoverableException.h): New include.
  5053. (onAbort): Exception -> RecoverableException.
  5054. * src/PeerInteractionCommand.cc
  5055. (onAbort): Exception -> RecoverableException.
  5056. * src/PeerAbstractCommand.cc
  5057. (execute): Exception -> RecoverableException.
  5058. (onAbort): Exception -> RecoverableException.
  5059. * src/TorrentRequestInfo.cc
  5060. (execute): Exception -> RecoverableException.
  5061. * src/MetalinkRequestInfo.cc
  5062. (execute): Exception -> RecoverableException.
  5063. * src/MetaFileUtil.cc: RecoverableException.
  5064. * src/AbstractCommand.h
  5065. (onAbort): Exception -> RecoverableException.
  5066. * src/DlRetryEx.h: Exception -> RecoverableException.
  5067. * src/DlAbortEx.h: Exception -> RecoverableException.
  5068. * src/PeerListenCommand.cc: Exception -> RecoverableException.
  5069. * src/Util.cc: Exception -> RecoverableException.
  5070. * src/DefauldDiskWriter.cc: Exception -> RecoverableException.
  5071. * src/TrackerUpdateCommand.cc: Exception -> RecoverableException.
  5072. * src/UrlRequestInfo.cc: Exception -> RecoverableException.
  5073. To make ID static const int
  5074. * src/BtInterestedMessage.h
  5075. (ID_t): Removed.
  5076. (ID): New variable.
  5077. (getId): Made non-const.
  5078. * src/BtPieceMessage.h
  5079. (ID_t): Removed.
  5080. (ID): New variable.
  5081. (getId): Made non-const.
  5082. * src/BtChokeMessage.h
  5083. (ID_t): Removed.
  5084. (ID): New variable.
  5085. (getId): Made non-const.
  5086. * src/BtHaveAllMessage.h
  5087. (ID_t): Removed.
  5088. (ID): New variable.
  5089. (getId): Made non-const.
  5090. * src/BtKeepAliveMessage.h
  5091. (ID_t): Removed.
  5092. (ID): New variable.
  5093. (getId): Made non-const.
  5094. * src/BtHandshakeMessage.h
  5095. (ID): New variable.
  5096. (getId): Made non-const.
  5097. * src/BtSuggestPieceMessage.h
  5098. (ID_t): Removed.
  5099. (ID): New variable.
  5100. (getId): Made non-const.
  5101. * src/BtPortMessage.h
  5102. (ID_t): Removed.
  5103. (ID): New variable.
  5104. (getId): Made non-const.
  5105. * src/AbstractBtMessage.h
  5106. (id): Removed.
  5107. (AbstractBtMessage): Removed id.
  5108. (getId): Removed.
  5109. * src/BtHaveMessage.h
  5110. (ID_t): Removed.
  5111. (ID): New variable.
  5112. (getId): Made non-const.
  5113. * src/BtAllowedFastMessage.h
  5114. (ID_t): Removed.
  5115. (ID): New variable.
  5116. (getId): Made non-const.
  5117. * src/BtCancelMessage.h
  5118. (ID_t): Removed.
  5119. (ID): New variable.
  5120. (getId): Made non-const.
  5121. * src/BtNotInterestedMessage.h
  5122. (ID_t): Removed.
  5123. (ID): New variable.
  5124. (getId): Made non-const.
  5125. * src/BtChokeMessage.h
  5126. (ID_t): Removed.
  5127. (ID): New variable.
  5128. (getId): Made non-const.
  5129. * src/BtRejectMessage.h
  5130. (ID_t): Removed.
  5131. (ID): New variable.
  5132. (getId): Made non-const.
  5133. * src/BtBitfieldMessage.h
  5134. (ID_t): Removed.
  5135. (ID): New variable.
  5136. (getId): Made non-const.
  5137. * src/BtUnchokeMessage.h
  5138. (ID_t): Removed.
  5139. (ID): New variable.
  5140. (getId): Made non-const.
  5141. * src/BtRequestMessage.h
  5142. (ID_t): Removed.
  5143. (ID): New variable.
  5144. (getId): Made non-const.
  5145. * src/BtHaveMessage.h
  5146. (ID_t): Removed.
  5147. (ID): New variable.
  5148. (getId): Made non-const.
  5149. To add --force-truncate command-line option and a check whether
  5150. the file already exists:
  5151. * src/DirectDiskAdaptor.h
  5152. (getFilePath): Made virtual public.
  5153. * src/MultiDiskAdaptor.h
  5154. (File.h): New include.
  5155. (DiskWriterEntry::fileEntry): Made private.
  5156. (DiskWriterEntry::fileExists): New function.
  5157. (DiskWriterEntry::getFileEntry): New function.
  5158. (fileExists): New function.
  5159. (getFilePath): New function.
  5160. * src/TorrentRequestInfo.cc
  5161. (FatalException.h): New include.
  5162. (message.h): New include.
  5163. (RecoverableException.h): New include.
  5164. (execute): Added a check whether file is already exists or not.
  5165. * src/DiskAdaptor.h
  5166. (fileExists): New function.
  5167. (getFilePath): New function.
  5168. * src/main.cc
  5169. (showUsage): Added an explanation of --force-truncate command-line
  5170. option.
  5171. (main): Added --force-truncate command-line option.
  5172. * src/Exception.h
  5173. (setMsg): buf[256] -> buf[1024]
  5174. * src/CopyDiskWriter.h
  5175. (getFilePath): Made public virtual.
  5176. * src/MultiDiskAdaptor.cc: fileEntry -> getFileEntry()
  5177. (fileExists): New function.
  5178. * src/DownloadEngineFactory.cc
  5179. (newTorrentConsoleEngine): Don't open file here.
  5180. * src/message.h
  5181. (EX_FILE_ALREADY_EXISTS): New definition.
  5182. * src/prefs.h
  5183. (PREF_FOECE_TRUNCATE): New definition.
  5184. * src/HttpResponseCommand.cc
  5185. (handleDefaultEncoding): Added a check whether the file already exists.
  5186. * src/SegmentMan.h
  5187. (fileExists): New function.
  5188. (shouldCancelDownloadForSafety): New function.
  5189. * src/FtpNegotiateCommand.cc
  5190. (recvSize): Added a check whether the file already exists.
  5191. * src/AbstractSingleDiskAdaptor.cc
  5192. (File.h): New include.
  5193. (fileExists): New function.
  5194. * src/AbstractSingleDiskAdaptor.h
  5195. (getFilePath): Removed.
  5196. (fileExists): New function.
  5197. * src/SegmentMan.cc
  5198. (fileExists): New function.
  5199. (shouldCancelDownloadForSafety): New function.
  5200. To fix regression bug in torrent downloading:
  5201. * src/DefaultBtRequestFactory.cc
  5202. (doChokedAction): New function.
  5203. * src/DefaultBtRequestFactory.h
  5204. (doChokedAction): New function.
  5205. * src/DefaultBtMessageDispatcher.cc
  5206. (doChokedAction): Do not delete request if its target is in allowed
  5207. fast set.
  5208. * src/DefaultBtInteractive.cc
  5209. (doPostHandshakeProcessing): Added a call to sendPendingMessage().
  5210. (sendKeepAlive): Send keep alive message even if the outgoing message
  5211. queue is not empty.
  5212. (decideInterest): Simplified the code.
  5213. (fillPiece): Remove a call to dispatcher->doChokedAction() because
  5214. it is already called when BtChokeMessage is received from a peer.
  5215. * src/BtRequestFactory.h
  5216. (doChokedAction): New function.
  5217. To clean up code:
  5218. * src/PeerInteractionCommand.h
  5219. (executeInternal): Added virtual keyword explicitly.
  5220. (prepareForRetry): Added virtual keyword explicitly.
  5221. (prepareForNextPeer): Added virtual keyword explicitly.
  5222. (onAbort): Added virtual keyword explicitly.
  5223. * src/RequestSlot.cc
  5224. (isTimeout): Use Time::elapsed() instead of differenceInMillis().
  5225. * src/BtPieceMessage.cc
  5226. (doReceivedAction): Added a debug log of piece's bitfield.
  5227. * src/Piece.h
  5228. (getBitfieldLength): New function.
  5229. * src/ByteArrayDiskWriter.cc
  5230. (clear): Added buf = 0 to avoid double free corruption.
  5231. * src/FileAllocator.cc
  5232. (allocate): Fixed an assignment of fileAllocationMonitor->currentValue.
  5233. Added cp.reset().
  5234. * src/BitfieldMan.h
  5235. (operator=): Rewritten.
  5236. * src/BitfieldMan.cc
  5237. (BitfieldMan): Initialized bitfield, useBitfield.
  5238. * src/PeerConnection.cc
  5239. (receiveMessage): Added a call to socket->readable() after getting
  5240. message length to avoid possible EOF.
  5241. * src/Util.cc
  5242. (torrentUrlencode): Fixed an encodeing bug. BUG#1629912
  5243. 2007-01-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5244. To add an ability to pre-allocate file space:
  5245. * src/DirectDiskAdaptor.h: Rewritten.
  5246. * src/PieceStorage.h: DiskAdaptor -> DiskAdaptorHandle
  5247. * src/MultiDiskAdaptor.h: Rewritten.
  5248. * src/DefaultPieceStorage.cc
  5249. (MultiDiskWriter.h): Removed include.
  5250. (PreAllocationDiskWriter.h): Removed include.
  5251. (FileAllocationMonitor.h): New include.
  5252. (~DefaultPieceStorage): Removed deletion of diskAdaptor.
  5253. (initStorage): Rewritten.
  5254. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5255. * src/FileAllocator.h: New class.
  5256. * src/FileAllocator.cc: New class.
  5257. * src/FileAllocationMonitor.h: New class.
  5258. * src/FileAllocationMonitor.cc: New class.
  5259. * src/ConsoleFileAllocationMonitor.h: New class.
  5260. * src/ConsoleFileAllocationMonitor.cc: New class.
  5261. * src/AbstractSingleDiskAdaptor.h: New class.
  5262. * src/AbstractSingleDiskAdaptor.cc: New class.
  5263. * src/DiskAdaptor.h
  5264. (Directory.h): Removed include.
  5265. (DiskWriter.h): Removed include.
  5266. (FileEntry.h): Removed include.
  5267. (diskWriter): Removed.
  5268. (DiskAdaptor): Removed diskWriter.
  5269. (openFile): Made pure virtual.
  5270. (closeFile): Made pure virtual.
  5271. (openExistingFile): Made pure virtual.
  5272. (initAndOpenFile): Made pure virtual.
  5273. (writeData): Made pure virtual.
  5274. (readData): Made pure virtual.
  5275. (sha1Sum): Made pure virtual.
  5276. (getStoreDir): Returns const reference of storeDir.
  5277. (DiskAdaptorHandle): New type definition.
  5278. * src/main.cc
  5279. (ConsoleFileAllocationMonitor.h): New include.
  5280. (showUsage): Added default value description of -s option.
  5281. Added the description of --file-allocation option.
  5282. (main): Set default value of --file-allocation option to 'none'.
  5283. Added --file-allocation command-line option.
  5284. Setup FileAllocationMonitorFactory.
  5285. * src/FtpInitiateConnectionCommand.cc
  5286. (executeInternal): Removed diskWriter related processing, which was
  5287. moved to FtpNegotiationCommand.cc.
  5288. * src/DirectDiskAdaptor.cc
  5289. (getFilePath): Made non-const.
  5290. * src/CopyDiskAdaptor.h
  5291. (DiskAdaptor.h): Removed include.
  5292. (DiskWriter.h): Removed include.
  5293. (AbstractSingleDiskAdaptor.h): New include.
  5294. (getFilePath): Made non-const. Added virtual keyword.
  5295. (CopyDiskAdaptor): Removed diskWriter.
  5296. (getTempFile): Returns const reference.
  5297. (CopyDiskAdaptorHandle): New type definition.
  5298. * src/ByteArrayDiskWriter.cc
  5299. (clear): Simplified.
  5300. (initAndOpenFile): Rewritten.
  5301. (openFile): Call initAndOpenFile()
  5302. * src/MultiDiskAdaptor.cc: Rewritten.
  5303. * src/DownloadEngineFactory.cc
  5304. (FileAllocator.h): New include.
  5305. (FileAllocationMonitor.h): New include.
  5306. (newConsoleEngine): Call DefaultDiskWriter::createNewDiskWriter() to
  5307. create DefaultDiskWriter with file allocator.
  5308. * src/DiskWriter.h
  5309. (initAndOpenFile): Added totalLength argument.
  5310. (openFile): Added totalLength argument.
  5311. * src/prefs.h
  5312. (PREF_FILE_ALLOCATION): New definition.
  5313. (V_PREALLOC): New definition.
  5314. (V_NONE): New definition.
  5315. * src/HttpResponseCommand.cc
  5316. (handleDefaultEncoding): Call DefaultDiskWriter::initAndOpenFile with
  5317. size.
  5318. * src/FtpNegotiateCommand.cc
  5319. (Util.h): New include.
  5320. (recvSize): Open file here.
  5321. * src/Util.h
  5322. (ullitos): New function.
  5323. * src/CopyDiskWriter.h
  5324. (getFilePath): Made non-const.
  5325. * src/DefaultDiskWriter.h
  5326. (Option.h): New include.
  5327. (totalLength): Removed.
  5328. (DefaultDiskWriter): Removed totalLength.
  5329. (initAndOpenFile): Added totalLength argument.
  5330. (DefaultDiskWriterHandle): New type definition.
  5331. (createNewDiskWriter): New function.
  5332. * src/Util.cc
  5333. (ullitos): New function.
  5334. * src/DefaultDiskWriter.cc
  5335. (message.h): New include.
  5336. (FileAllocator.h): New include.
  5337. (prefs.h): New include.
  5338. (Util.h): New include.
  5339. (DefaultDiskWriter): Removed totalLength.
  5340. (initAndOpenFile): Added file allocation.
  5341. (createNewDiskWriter): New function. Just for temporary solution.
  5342. It will be rewritten later.
  5343. * src/DiskAdaptor.cc
  5344. (DiskAdaptor): Removed diskWriter.
  5345. * src/AbstractDiskWriter.cc
  5346. (LogFactory.h): New include.
  5347. (AbstractDiskWriter): Added fileAllocator, logger.
  5348. (openFile): Added totalLength argument.
  5349. * src/AbstractDiskWriter.h
  5350. (FileAllocator.h): New include.
  5351. (Logger.h): New include.
  5352. (fileAllocator): New variable.
  5353. (logger): New variable.
  5354. (openFile): Added totalLength argument. Added virtual keyword
  5355. explicitly.
  5356. (openExistingFile): Added totalLength argument. Added virtual keyword
  5357. explicitly.
  5358. (closeFile): Added virtual keyword explicitly.
  5359. (sha1Sum): Added virtual keyword explicitly.
  5360. (writeData): Added virtual keyword explicitly.
  5361. (readData): Added virtual keyword explicitly.
  5362. (setFileAllocator): New function.
  5363. * src/DefaultPieceStorage.h
  5364. (FileAllocator.h): New include.
  5365. (diskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5366. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5367. * src/FileProgressMonitor.h: New class.
  5368. To compile aria2 on PC-BSD:
  5369. * src/DefaultBtContext.cc
  5370. (libgen.h): New include.
  5371. To fix memory leak:
  5372. * src/Exception.h
  5373. (~Exception): Delete cause. Fixed memory leak.
  5374. 2006-12-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5375. Rewritten a portion of bittorrent implementation:
  5376. * src/BtMessageValidator.h: New class.
  5377. * src/BtBitfieldMessageValidator.h: New class.
  5378. * src/BtHandshakeMessageValidator.h: New class.
  5379. * src/BtRequestMessageValidator.h: New class.
  5380. * src/BtSuggestPieceMessageValidator.h: New class.
  5381. * src/BtAllowedFastMessageValidator.h: New class.
  5382. * src/BtRejectMessageValidator.h: New class.
  5383. * src/BtCancelMessageValidator.h: New class.
  5384. * src/BtPieceMessageValidator.h: New class.
  5385. * src/BtHaveMessageValidator.h: New class.
  5386. * src/BtEventListener.h: New class.
  5387. * src/AbstractBtEventListener.h: New class.
  5388. * src/BtEvent.h: New class.
  5389. * src/BtChokingEvent.h: New class.
  5390. * src/BtChokedEvent.h: New class.
  5391. * src/BtCancelSendingPieceEvent.h: New class.
  5392. * src/BtAbortOutstandingRequestEvent.h: New class.
  5393. * src/Randomizer.h: New class.
  5394. * src/SimpleRandomizer.h: New class.
  5395. * src/BtMessage.h: New class.
  5396. * src/AbstractBtMessage.h: New class.
  5397. * src/SimpleBtMessage.h: New class.
  5398. * src/BtHaveMessage.h: New class.
  5399. * src/BtInterestedMessage.h: New class.
  5400. * src/BtAllowedFastMessage.h: New class.
  5401. * src/BtUnchokeMessage.h: New class.
  5402. * src/BtCancelMessage.h: New class.
  5403. * src/BtNotInterestedMessage.h: New class.
  5404. * src/BtChokeMessage.h: New class.
  5405. * src/BtHaveNoneMessage.h: New class.
  5406. * src/BtHandshakeMessage.h: New class.
  5407. * src/BtSuggestPieceMessage.h: New class.
  5408. * src/BtHaveMessage.h: New class.
  5409. * src/BtPieceMessage.h: New class.
  5410. * src/BtHaveAllMessage.h: New class.
  5411. * src/BtKeepAliveMessage.h: New class.
  5412. * src/BtPortMessage.h: New class.
  5413. * src/BtRejectMessage.h: New class.
  5414. * src/BtBitfieldMessage.h: New class.
  5415. * src/BtRequestMessage.h: New class.
  5416. * src/DefaultBtRequestFactory.h: New class.
  5417. * src/DefaultBtMessageReceiver.h: New class.
  5418. * src/BtInteractive.h: New class.
  5419. * src/BtMessageDispatcher.h: New class.
  5420. * src/DefaultBtMessageDispatcher.h: New class.
  5421. * src/DefaultBtInteractive.h: New class.
  5422. * src/BitfieldManFactory.h: New class.
  5423. * src/HandleRegistry.h: New class.
  5424. * src/BtMessageFactory.h: New class.
  5425. * src/BtMessageReceiver.h: New class.
  5426. * src/DefaultBtMessageFactory.h: New class.
  5427. * src/PeerObject.h: New class.
  5428. * src/BtRequestFactory.h: New class.
  5429. * src/SuggestPieceMessage.h: Removed.
  5430. * src/PortMessage.h: Removed.
  5431. * src/SuggestPieceMessage.h: Removed.
  5432. * src/KeepAliveMessage.h: Removed.
  5433. * src/HandshakeMessage.h: Removed.
  5434. * src/PeerInteraction.h: Removed.
  5435. * src/UnchokeMessage.h: Removed.
  5436. * src/PieceMessage.h: Removed.
  5437. * src/RequestMessage.h: Removed.
  5438. * src/InterestedMessage.h: Removed.
  5439. * src/HaveMessage.h: Removed.
  5440. * src/CancelMessage.h: Removed.
  5441. * src/RejectMessage.h: Removed.
  5442. * src/AllowedFastMessage.h: Removed.
  5443. * src/HaveNoneMessage.h: Removed.
  5444. * src/SimplePeerMessage.h: Removed.
  5445. * src/HaveAllMessage.h: Removed.
  5446. * src/BitfieldMessage.h: Removed.
  5447. * src/PeerMessageFactory.h: Removed.
  5448. * src/NotInterestedMessage.h: Removed.
  5449. * src/ChokeMessage.h: Removed.
  5450. * src/PeerMessage.h: Removed.
  5451. 2006-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5452. To know root cause of exception:
  5453. * src/Exception.h
  5454. (cause): New variable.
  5455. (Exception): Added a parameter.
  5456. (getMsg): Return const reference to msg.
  5457. (getCause): New function.
  5458. * src/DlRetryEx.h
  5459. (DlRetryEx): Added a parameter 'cause'.
  5460. Added an overloaded constructor.
  5461. (DlAbortEx): Added a parameter 'cause'.
  5462. Added an overloaded constructor.
  5463. * src/SimpleLogger.cc
  5464. (writeLog): Log nested exception messages recursively.
  5465. 2006-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5466. * src/DefaultBtProgressInfoFile.cc
  5467. (load): Fixed memory leak when the infohash doesn't match.
  5468. 2006-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5469. * src/DefaultPeerStorage.cc
  5470. (calculateStat): Simplified the code by combining 2 loops into 1.
  5471. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5472. Introduce new preference PREF_BT_TIMEOUT. This is the timeout value
  5473. for BitTorrent download:
  5474. * src/PeerAbstractCommand.cc
  5475. (PeerAbstractCommand): PREF_TIMEOUT -> PREF_BT_TIMEOUT
  5476. * src/main.cc:
  5477. (timeoutSpecified): Removed.
  5478. (main): Set the initial value of PREF_BT_TIMEOUT to 180.
  5479. Removed timeoutSpecified. TODO: Add --bt-timeout command line option.
  5480. * src/TorrentRequestInfo.cc
  5481. (timeoutSpecified): Removed.
  5482. (torrentHandler): Removed timeoutSpecified and the adjustment of
  5483. timeout value.
  5484. * src/prefs.h
  5485. (PREF_BT_TIMEOUT): New definition.
  5486. Delete unused variables:
  5487. * src/TorrentRequestInfo.cc
  5488. (requestInfo): Removed.
  5489. Move setSignalHander to Util::setGlobalSignalHandler:
  5490. * src/TorrentRequestInfo.cc:
  5491. setSignalHander -> Util::setGlobalSignalHandler
  5492. * src/main.cc
  5493. (setSignalHander): Removed.
  5494. (main): setSignalHander -> Util::setGlobalSignalHandler
  5495. * src/Util.h
  5496. (setGlobalSignalHandler): New function.
  5497. * src/Util.cc
  5498. (setGlobalSignalHandler): New function.
  5499. * src/UrlRequestInfo.cc:
  5500. setSignalHander -> Util::setGlobalSignalHandler
  5501. Reset peer status in order to exit gracefully:
  5502. * src/PeerAbstractCommand.cc
  5503. (execute): Call peer->resetStatus() when btRuntime->isHalt() is true.
  5504. To fix the bug that causes the number of bytes uploaded is not saved
  5505. to .aria2 file:
  5506. * src/DefaultPeerStorage.h
  5507. (removedPeerSessionDownloadLength): New variable.
  5508. (removedPeerSessionUploadLength): New variable.
  5509. * src/DefaultPeerStorage.cc
  5510. (DefaultPieceStorage): Added removedPeerSessionDownloadLength(0),
  5511. removedPeerSessionUploadLength(0).
  5512. (calculateStat): Calculate the number of bytes downloaded(uploaded)
  5513. through all peers, and then add removedPeerSessionDownloadLength(
  5514. removedPeerSessionUploadLength) to it.
  5515. (deleteUnusedPeer): Add the number of bytes downloaded(uploaded) from
  5516. (to) the peer to removedPeerSessionDownloadLength
  5517. (removedPeerSessionUploadLength).
  5518. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5519. To add Metalink location option:
  5520. * src/MetalinkRequestInfo.cc
  5521. (execute): Call MetalinkEntry::setLocationPreference()
  5522. * src/main.cc
  5523. (showUsage): Added the help message for --metalink-location option.
  5524. (main): Added --metalink-location option.
  5525. * src/prefs.h
  5526. (PREF_METALINK_LOCATION): New definition.
  5527. * src/MetalinkEntry.cc
  5528. (AddLocationPreference): New function object.
  5529. (setLocationPreference): New function.
  5530. * src/Xml2MetalinkProcessor.cc
  5531. (getResource): Set location attribute to MetalinkResource
  5532. To show URLs to download
  5533. * src/UrlRequestInfo.h
  5534. (printUrls): New function.
  5535. To add multiple <file> Metalink support:
  5536. * src/MetalinkEntry.h
  5537. (MetalinkResources): Removed.
  5538. (setLocationPreference): New function.
  5539. (MetalinkEntryHandle): New type definition.
  5540. (MetalinkEntries): New type definition.
  5541. * src/Xml2MetalinkProcessor.h
  5542. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  5543. (getResource): MetalinkResource* -> MetalinkResourceHandle
  5544. (parseFile): Metalinker* -> MetalinkerHandle
  5545. * src/UrlRequestInfo.h
  5546. (execute): RequestInfo* -> RequestInfos
  5547. * src/MetalinkRequestInfo.cc
  5548. (AccumulateNonP2PUrl): MetalinkResource* -> MetalinkResourceHandle
  5549. (FindBitTorrentUrl): MetalinkResource* -> MetalinkResourceHandle
  5550. (execute): RequestInfo* -> RequestInfos
  5551. Added multiple <file> support. Print filename when it is queued.
  5552. * src/MetalinkRequestInfo.h
  5553. (execute): RequestInfo* -> RequestInfos
  5554. (getDownloadEngine): Removed.
  5555. * src/RequestInfo.h
  5556. (RequestInfoHandle): New type definition.
  5557. (RequestInfos): New type definition.
  5558. (execute): RequestInfo* -> RequestInfos
  5559. (getDownloadEngine): Removed.
  5560. * src/MetalinkResource.h
  5561. (MetalinkResourceHandle): New type definition.
  5562. (MetalinkResources): New type definition.
  5563. * src/MetalinkEntry.cc
  5564. (~MetalinkEntry): Removed the deletion of the elements of resources,
  5565. because the element is now of type MetalinkResourceHandle.
  5566. (PrefOrder): MetalinkResource* -> MetalinkResourceHandle
  5567. (Supported): MetalinkResource* -> MetalinkResourceHandle
  5568. (dropUnsupportedResource): Removed the deletion of the elements of
  5569. resources because the element is now of type MetalinkResourceHandle.
  5570. * src/Xml2MetalinkProcessor.cc
  5571. (parseFile): Metalinker* -> MetalinkerHandle
  5572. MetalinkEntry* -> MetalinkEntryHandle
  5573. Removed try-catch block.
  5574. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  5575. MetalinkResource* -> MetalinkResourceHandle
  5576. Removed try-catch block.
  5577. (getResource): MetalinkResource* -> MetalinkResourceHandle
  5578. Free result by using xmlXPathFreeObject()
  5579. * src/Metalinker.cc
  5580. (~Metalinker): Removed the deletion of entries.
  5581. MetalinkEntry* -> MetalinkEntryHandle
  5582. (queryEntry): Add multiple <file> Metalink support.
  5583. * src/Metalinker.h
  5584. (MetalinkEntries): Removed.
  5585. (queryEntry): MetalinkEntry* -> MetalinkEntries
  5586. * src/MetalinkProcessor.h
  5587. (parseFile): Metalinker* -> MetalinkerHandle
  5588. Bug fixes:
  5589. * src/PeerChokeCommand.cc
  5590. (execute): cat01->cat02
  5591. * src/DefaultPieceStorage.cc
  5592. (DefaultPieceStorage): Added diskAdaptor(0)
  5593. * src/TrackerWatcherComand.cc:
  5594. (execute): Use btAnnounce->noMoreAnnounce()
  5595. to determin whether the function returns true or not.
  5596. * src/TrackerUpdateCommand.cc:
  5597. (execute): Use btAnnounce->noMoreAnnounce()
  5598. to determin whether the function returns true or not.
  5599. * src/FtpConnection.cc
  5600. (bulkReceiveResponse): Throw DlRetryEx if EOF got.
  5601. This is the fix of the busy loop bug.
  5602. * src/DownloadCommand.cc
  5603. (DownloadCommand): Reuse PeerStat. segmentMan->getPeerStat() returns
  5604. cached PeerStat.
  5605. The value of "name" entry in torrent file is now set by
  5606. *DiskAdaptor::setTopDir(...) methods.
  5607. * src/MultiDiskAdaptor.h
  5608. (topDir): New variable.
  5609. (setTopDir): New function.
  5610. (getTopDir): New function.
  5611. * src/MultiDiskAdaptor.cc
  5612. (getFilePath): Concat storDir, "/" and topDir.
  5613. (mkdir): Use getFilePath() to get the directory path for output.
  5614. * src/DefaultPieceStorage.cc
  5615. (initStorage): Set the value of "name" entry to MultiDiskAdaptor,
  5616. CopyDiskAdaptor.
  5617. * src/CopyDiskAdaptor.h
  5618. (topDir): New variable.
  5619. (setTopDir): New function.
  5620. (getTopDir): New function.
  5621. * src/CopyDiskAdaptor.cc
  5622. (fixFilename): Updated.
  5623. Misc
  5624. * src/UrlRequestInfo.h
  5625. (e): Removed.
  5626. (UrlRequestInfo): Removed e.
  5627. (getDownloadEngine): Removed.
  5628. * src/UrlRequestInfo.cc
  5629. (handler): Rewritten.
  5630. (printUrls): New function.
  5631. (execute): Call printUrls().
  5632. * src/HandshakeMessage.cc
  5633. (check): peerinteraction->getBtContext() -> btContext
  5634. * src/PeerInteraction.h
  5635. (getBtContext): Removed.
  5636. * src/TorrentRequestInfo.h
  5637. (execute): RequestInfo* -> RequestInfos
  5638. (getDownloadEngine): Removed.
  5639. * src/TorrentRequestInfo.cc
  5640. (haltRequested): Removed.
  5641. (btHaltRequested): New variable.
  5642. (torrentHandler): haltRequested -> btHaltRequested
  5643. (execute): RequestInfo* -> RequestInfos
  5644. * src/TorrentConsoleDownloadEngine.cc
  5645. (afterEachIteration): haltRequested -> btHaltRequested.
  5646. * src/ConsoleDownloadEngine.h
  5647. (initStatistics): Added virtual.
  5648. (calculateStatistics): Added virtual.
  5649. (onEndOfRun): Added virtual.
  5650. (afterEachIteration): Added virtual.
  5651. * src/ConsoleDownloadEngine.cc
  5652. (haltRequested): New variable.
  5653. (afterEachIteration): New function.
  5654. * src/main.cc
  5655. (requestInfo): Removed.
  5656. * src/SegmentMan.cc
  5657. (findSlowerSegmentEntry): Refactored.
  5658. * Release 0.9.0
  5659. 2006-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5660. To divide TorrentMan into 6 classes: BtContext, BtRuntime,
  5661. PeerStorage, PieceStorage, BtAnnounce and BtProgressInfoFile
  5662. * src/TorrentMan.h: Removed.
  5663. * src/TorrentMan.cc: Removed.
  5664. * src/TrackerWatcherComand.h: Made subclass of BtContextAwareCommand.
  5665. * src/SeedCheckCommand.cc: Use pieceStorage, btRuntime
  5666. * src/PeerAbstractCommand.h: Made subclass of BtContextAwareCommand.
  5667. * src/PeerAbstractCommand.cc: Use btRuntime.
  5668. * src/BtContextAwareCommand.h: New class.
  5669. * src/FileEntry.h: Added accessor methods for following variables.
  5670. (path): Made private.
  5671. (length): Made private.
  5672. (offset): Made private.
  5673. (extracted): Made private.
  5674. (requested): Made private.
  5675. (FileEntries): New definition.
  5676. (FileEntryHandle): New definition.
  5677. * src/FileEntry.cc: New file.
  5678. * src/HaveEraseCommand.h: Made subclass of BtContextAwareCommand.
  5679. * src/HaveEraseCommand.cc: Use btRuntime, pieceStorage.
  5680. * src/PeerChokeCommand.h: Made subclass of BtContextAwareCommand.
  5681. * src/PeerChokeCommand.cc: Use btRuntime, peerStorage, pieceStorage.
  5682. * src/PieceStorage.h: New file.
  5683. * src/PeerInteractionCommand.h: Use btContext.
  5684. * src/PeerInteractionCommand.cc: Use pieceStorage, peerStorage,
  5685. btRuntime.
  5686. * src/DefaultBtProgressInfoFile.h: New file.
  5687. * src/DefaultBtProgressInfoFile.cc: New file.
  5688. * src/File.cc
  5689. (Util.h): New include.
  5690. (mkdirs): New function.
  5691. * src/MultiDiskAdaptor.h
  5692. (mkdir): New function.
  5693. * src/PeerListProcessor.h
  5694. (Peers): Removed.
  5695. * src/PeerInteraction.h
  5696. (torrentMan): Removed.
  5697. (btContext): New variable.
  5698. (peerStorage): New variable.
  5699. (pieceStorage): New variable.
  5700. (btAnnounce): New variable.
  5701. (getTorrentMan): Removed.
  5702. (getBtContext): New function.
  5703. * src/PeerInteraction.cc: Use btContext, peerStorage, pieceStorage,
  5704. btAnnounce.
  5705. * src/HandshakeMessage.h
  5706. (TorrentMan.h): Removed.
  5707. * src/HandshakeMessage.cc: Use btContext.
  5708. * src/DefaultBtAnnounce.cc: New file.
  5709. * src/MultiDiskWriter.cc: Use the accessor methods of FileEntry.
  5710. * src/DefaultPieceStorage.cc: New file.
  5711. * src/DefaultBtContext.h: New file.
  5712. * src/TorrentRequestInfo.cc: Use btContext, pieceStorage.
  5713. Use the accessor methods of FileEntry.
  5714. * src/CookieBox.cc: Updated to use Util::slice().
  5715. * src/PieceMessage.cc: Use btContext, pieceStorage.
  5716. * src/common.h (SharedHandle.h): New include.
  5717. * src/PeerMessage.cc (PeerMessage): Added btContext, peerStorage,
  5718. pieceStorage.
  5719. * src/TorrentAutoSaveCommand.h: Made subclass of BtContextAwareCommand.
  5720. * src/DiskAdaptor.h
  5721. (topDir): Removed.
  5722. (getFileEntryFromPath): Changed the return type to FileEntryHandle.
  5723. (setTopDir): Removed.
  5724. (getTopDir): Removed.
  5725. * src/BtContext.h: New file.
  5726. * src/DefaultPeerStorage.h: New file.
  5727. * src/PieceMessage.h (TorrentMan.h): Removed.
  5728. * src/RequestMessage.h (TorrentMan.h): Removed.
  5729. * src/TorrentDownloadEngine.h
  5730. (uploadLength): New variable.
  5731. (btContext): New variable.
  5732. (btRuntime): New variable.
  5733. (pieceStorage): New variable.
  5734. (peerStorage): New variable.
  5735. (btAnnounce): New variable.
  5736. (btProgressInfoFile): New variable.
  5737. (torrentMan): Removed.
  5738. (setBtContext): New function.
  5739. * src/TorrentDownloadEngine.cc: Use BtContext, BtRuntime, pieceStorage,
  5740. peerStorage, btAnnounce, btProgressInfoFile.
  5741. * src/Piece.h
  5742. (toString): New function.
  5743. (Pieces): New type definition.
  5744. * src/Peer.h
  5745. (active): New variable.
  5746. (Peer): Added active.
  5747. (activate): Set active to true.
  5748. (deactivate): Set active to false.
  5749. (isActive): New function.
  5750. (Peers): New type definition.
  5751. * src/DirectDiskAdaptor.cc
  5752. (getFilePath): Use the accessor methods of FileEntry.
  5753. * src/TorrentConsoleDownloadEngine.h
  5754. (afterEachIteration): New function.
  5755. * src/TorrentConsoleDownloadEngine.cc
  5756. (haltRequested): New variable.
  5757. (sendStatistics): Use pieceStorage, btRuntime.
  5758. (afterEachIteration): New function.
  5759. * src/AnnounceList: AnnounceTier->AnnounceTierHandle.
  5760. * src/Directry.h
  5761. (Directory): New function.
  5762. (DirectoryHandle): New type definition.
  5763. * src/BtProgressInfoFile.h: New file.
  5764. * src/RequestMessage.cc: Use pieceStorage.
  5765. * src/BtRuntime.h: New file.
  5766. * src/DefaultBtContext.cc: New file.
  5767. * src/BitfieldMan.h
  5768. (getCompletedLength): New function(private).
  5769. (getCompletedLength): New function.
  5770. (getFilteredCompletedLength): New function.
  5771. * src/BitfieldMan.h
  5772. (getCompletedLength): New function(private).
  5773. (getCompletedLength): New function.
  5774. (getFilteredCompletedLength): New function.
  5775. * src/MultiDiskAdaptor.cc
  5776. (mkdir): New function.
  5777. (openFile): Call mkdir().
  5778. (initAndOpenFile): Call mkdir().
  5779. * src/CancelMessage.h
  5780. (TorrentMan.h): Removed.
  5781. * src/RejectMessage.h
  5782. (TorrentMan.h): Removed.
  5783. * src/DownloadEngineFactory.cc
  5784. (DefaultPieceStorage.h): New include.
  5785. (DefaultPeerStorage.h): New include.
  5786. (DefaultBtAnnounce.h): New include.
  5787. (DefaultBtProgressInfoFile.h): New include.
  5788. (newTorrentConsoleEngine): Rewritten.
  5789. * src/ShareRatioSeedCriteria.h
  5790. (torrentMan): Removed.
  5791. (btContext): New variable.
  5792. (peerStorage): New variable.
  5793. (btRuntime): New variable.
  5794. (evaluate): Use btContext, btRuntime, peerStorage.
  5795. * src/AnnounceTier.h: New file.
  5796. * src/BtAnnounce.h: New file.
  5797. * src/BtRegistry.h: New file.
  5798. * src/PeerInitiateConnectionCommand.h: Added btContext.
  5799. * src/PeerConnection.h (TorrentMan.h): Removed.
  5800. * src/PeerMessageFactory.cc: Use btContext, pieceStorage.
  5801. * src/Util.h
  5802. (slice): Added an argument.
  5803. * src/Util.cc
  5804. (slice): Added an argument to control whether trim is made or not.
  5805. * src/PeerStorage.h: New file.
  5806. * src/BtRegistry.cc: New file.
  5807. * src/TrackerUpdateCommand.h: Made subclass of BtContextAwareCommand.
  5808. * src/CopyDiskAdaptor.cc: Use the accessor methods of FileEntry.
  5809. * src/MultiDiskWriter.h: FileEntry -> FileEntryHandle
  5810. * src/PeerListenCommand.cc: Use btRuntime, peerStorage, btContext.
  5811. * src/TorrentRequestInfo.h
  5812. (e): Removed.
  5813. (showFileEntry): Added an argument.
  5814. (getDownloadEngine): Return 0.
  5815. * src/DefaultBtAnnounce.h: New file.
  5816. * src/TorrentAutoSaveCommand.cc: Use btRuntime, btProgressInfoFile.
  5817. * src/TrackerWatcherComand.cc: Use btRuntime, btAnnounce,
  5818. * src/PeerMessageFactory.h
  5819. (btContext): New variable.
  5820. (pieceStorage): New variable.
  5821. * src/TrackerUpdateCommand.cc: Use btRuntime, peerStorage, btContext,
  5822. btAnnounce.
  5823. * src/DiskAdaptor.cc
  5824. (DiskAdaptor): Removed topDir.
  5825. (~DiskAdaptor): Removed topDir.
  5826. * src/PeerListenCommand.h: Made subclass of BtContextAwareCommand.
  5827. * src/SeedCheckCommand.h: Made subclass of BtContextAwareCommand.
  5828. * src/File.h (mkdirs): New function.
  5829. * src/DefaultPeerStorage): New file.
  5830. * src/DownloadEngineFactory.h
  5831. (newTorrentConsoleEngine): Use btContext.
  5832. * src/BtContextAwareCommand.cc: New file.
  5833. * src/PeerInitiateConnectionCommand.cc: Use btRuntime, peerStorage.
  5834. * src/PeerMessage.h
  5835. (btContext): New variable.
  5836. (peerStorage): New variable.
  5837. (pieceStorage): New variable.
  5838. (setBtContext): New function.
  5839. * src/Directry.cc
  5840. (Directory): New function.
  5841. (createDir): Do nothing if name.size() == 0.
  5842. * src/AnnounceList.h
  5843. (AnnounceTier): Removed.
  5844. (AnnounceTiers): Removed.
  5845. * src/DefaultPieceStorage.h: New file.
  5846. * src/Piece.cc (toString): New function.
  5847. To fix typo:
  5848. * src/main.cc (showVersion): Fixed typo.
  5849. To fix compile warning:
  5850. * src/DelegatingPeerListProcessor.cc
  5851. (canHandle): Added "return false".
  5852. 2006-10-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5853. To simplify TrackerWatherCommand, TrackerUpdateCommand and
  5854. make the process of announce request testable.
  5855. * src/TrackerWatcherCommand.h
  5856. (TimeA2.h): Removed.
  5857. (interval): Removed.
  5858. (checkPoint): Removed.
  5859. (createRequestCommand): Added an argument 'url'.
  5860. (TrackerWatherCommand): Removed interval.
  5861. (createCommand): New function.
  5862. * src/DownloadEngineFactory.cc
  5863. (newTorrentConsoleEngine): Updated according to the changes in
  5864. TrackerWatherCommand.
  5865. * src/TorrentMan.cc
  5866. (DelegatingPeerListProcessor.h): New includes.
  5867. (TorrentMan): Added the initialization of announceInterval.
  5868. (isStoppedAnnounceReady): New function.
  5869. (isCompletedAnnounceReady): New function.
  5870. (isDefaultAnnounceReady): New function.
  5871. (isAnnounceReady): New function.
  5872. (getAnnounceUrl): New function.
  5873. (announceStart): New function.
  5874. (announceFailure): New function.
  5875. (announceSuccess): New function.
  5876. (isAllAnnounceFailed): New function.
  5877. (resetAnnounce): New function.
  5878. (processAnnounceResponse): New function.
  5879. (needMorePeerConnection): New function.
  5880. (noMoreAnnounce): New function.
  5881. * src/TrackerUpdateCommand.h
  5882. (getTrackerResponse): int->size_t
  5883. * src/TorrentMan.h
  5884. (isStoppedAnnounceReady): New function.
  5885. (isCompletedAnnounceReady): New function.
  5886. (isDefaultAnnounceReady): New function.
  5887. (announceInterval): New variable.
  5888. (isAnnounceReady): New function.
  5889. (getAnnounceUrl): New function.
  5890. (announceStart): New function.
  5891. (announceFailure): New function.
  5892. (announceSuccess): New function.
  5893. (isAllAnnounceFailed): New function.
  5894. (resetAnnounce): New function.
  5895. (processAnnounceResponse): New function.
  5896. (needMorePeerConnection): New function.
  5897. (noMoreAnnounce): New function.
  5898. * src/TrackerWatcherCommand.cc
  5899. (TrackerWatherCommand): Removed interval and checkPoint.
  5900. (execute): Rewritten.
  5901. (createCommand): New function.
  5902. (createRequestCommand): Rewritten.
  5903. * src/TrackerUpdateCommand.cc
  5904. (MetaFileUtil.h): Removed.
  5905. (DelegatingPeerListProcessor.h): Removed.
  5906. (getTrackerResponse): int->size_t. Use torrentMan's new functions.
  5907. 2006-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5908. Request -> RequestHandle:
  5909. * src/HttpResponseCommand.h: Request->RequestHandle
  5910. * src/AbstractCommand.cc: Request->RequestHandle
  5911. * src/HttpDownloadCommand.cc: Request->RequestHandle
  5912. * src/HttpRequestCommand.cc: Request->RequestHandle
  5913. * src/FtpInitiateConnectionCommand.h: Request->RequestHandle
  5914. * src/AbstractCommand.h: Request->RequestHandle
  5915. * src/HttpProxyRequestCommand.h: Request->RequestHandle
  5916. * src/HttpResponseCommand.cc: Request->RequestHandle
  5917. * src/HttpInitiateConnectionCommand.h: Request->RequestHandle
  5918. * src/FtpNegotiateCommand.cc: Request->RequestHandle
  5919. * src/FtpTunnelResponseCommand.h: Request->RequestHandle
  5920. * src/HttpConnection.h: Request->RequestHandle
  5921. * src/HttpProxyResponseCommand.cc: Request->RequestHandle
  5922. * src/InitiateConnectionCommandFactory.h: Request->RequestHandle
  5923. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  5924. * src/DownloadCommand.h: Request->RequestHandle
  5925. * src/FtpDowndloadCommand.cc: Request->RequestHandle
  5926. * src/HttpInitiateConnectionCommand.cc: Request->RequestHandle
  5927. * src/HttpRequestCommand.h: Request->RequestHandle
  5928. * src/FtpNegotiateCommand.h: Request->RequestHandle
  5929. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  5930. * src/FtpInitiateConnectionCommand.cc: Request->RequestHandle
  5931. * src/HttpDownloadCommand.h: Request->RequestHandle
  5932. * src/FtpConnection.cc: Request->RequestHandle
  5933. * src/InitiateConnectionCommandFactory.cc: Request->RequestHandle
  5934. * src/UrlRequestInfo.cc: Request->RequestHandle
  5935. * src/HttpProxyResponseCommand.h: Request->RequestHandle
  5936. * src/HttpConnection.h: Request->RequestHandle
  5937. * src/DownloadCommand.cc: Request->RequestHandle
  5938. * src/FtpConnection.h: Request->RequestHandle
  5939. * src/FtpDowndloadCommand.h: Request->RequestHandle
  5940. * src/HttpProxyRequestCommand.cc: Request->RequestHandle
  5941. * src/FtpTunnelRequestCommand.h: Request->RequestHandle
  5942. * src/Request.h
  5943. (SharedHandle.h): New include.
  5944. (RequestHandle): New type definition.
  5945. (Requests): Redefined.
  5946. To add MULTITRACKER support:
  5947. * src/TrackerWatcherCommand.h
  5948. (createRequestCommand): New function.
  5949. * src/DownloadEngineFactory.cc
  5950. (newTorrentConsoleEngine): Removed req.
  5951. * src/prefs.h
  5952. (PREF_TRACKER_MAX_TRIES): New definition.
  5953. * src/TorrentMan.cc
  5954. (TorrentMan): Removed req. Added trackerNumTry.
  5955. (~TorrentMan): Removed req.
  5956. (setupInternal1): Added announceList.
  5957. * src/TorrentRequestInfo.cc
  5958. (execute): Set PREF_MAX_TIRES to 1. The max number of tries for
  5959. announces is now specified by PREF_TRACKER_MAX_TRIES.
  5960. * src/main.cc
  5961. (main): Added PREF_TRACKER_MAX_TRIES.
  5962. * src/TorrentMan.h
  5963. (Request.h): Removed.
  5964. (AnnounceList.h): New include.
  5965. (trackerNumTry): New variable.
  5966. (req): Removed.
  5967. (announceList): New variable.
  5968. * src/TrackerWatcherCommand.cc
  5969. (execute): Rewritten.
  5970. (createRequestCommand): New function.
  5971. * src/TrackerUpdateCommand.cc
  5972. (execute): Updated with the use of AnnounceList.
  5973. * src/AnnounceList.cc: New class.
  5974. * src/AnnounceList.h: New class.
  5975. To fix typo:
  5976. * src/prefs.h
  5977. (PREF_MAX_TRIES): max_try->max_tries
  5978. To not to decode "+" as space in URL decode:
  5979. * src/Util.cc
  5980. (urldecode): Removed "+"->space decoding rule. Test case was updated.
  5981. 2006-10-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5982. To add timeout to async name resolution:
  5983. * src/AbstractCommand.h
  5984. (nameResolveFinished): New function. This is not elegant way. It needs
  5985. to be more refined.
  5986. (nameResolverCheck): New variable.
  5987. * src/AbstractCommand.cc
  5988. (AbstractCommand): Added nameResolverCheck.
  5989. (execute): Added the check whether the name resolution has finished.
  5990. (setNameResolverCheck): Set nameResolverCheck to true.
  5991. (disableNameResolverCheck): Set nameResolverCheck to false.
  5992. (nameResolverFinished): New function.
  5993. * src/FtpInitiateConnectionCommand.h
  5994. (nameResolverFinished): New function.
  5995. * src/FtpInitiateConnectionCommand.cc
  5996. (FtpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  5997. * src/HttpInitiateConnectionCommand.h
  5998. (nameResolverFinished): New function.
  5999. * src/HttpInitiateConnectionCommand.cc
  6000. (HttpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  6001. * src/prefs.h
  6002. (PREF_DNS_TIMEOUT): New definition.
  6003. * src/main.cc
  6004. (main): Added PREF_DNS_TIMEOUT.
  6005. To add the support for a non-compact response from a tracker:
  6006. * src/PeerListProcessor.h: New class.
  6007. * src/DefaultPeerListProcessor.h: New class.
  6008. * src/DefaultPeerListProcessor.cc: New class.
  6009. * src/CompactPeerListProcessor.h: New class.
  6010. * src/CompactPeerListProcessor.cc: New class.
  6011. * src/DelegatingPeerListProcessor.h: New class.
  6012. * src/DelegatingPeerListProcessor.cc: New class.
  6013. * src/TorrentMan.cc
  6014. (addPeer): New function(overload).
  6015. (addPeer): Delete unused peers only when new peer is added.
  6016. * src/TorrentMan.h
  6017. (PeerListProcessor.h): Included.
  6018. (Peers): Removed.
  6019. (addPeer): New function(overload).
  6020. * src/TrackerUpdateCommand.cc
  6021. (netinet/in.h): Removed.
  6022. (DelegatingPeerListProcessor.h): Included.
  6023. (execute): Updated to use DelegatingPeerListProcessor.
  6024. To fix the memory leak in TorrentMan::peers:
  6025. * src/PeerAbstractCommand.cc
  6026. (onAbort): Added peer->resetStatus().
  6027. * src/Peer.h
  6028. (resetStatus): Made public.
  6029. To improve the precision of the speed calculation:
  6030. * src/SpeedCalc.h
  6031. (nextInterval): New variable.
  6032. * src/SpeedCalc.cc
  6033. (reset): Added nextInterval.
  6034. (isIntervalOver): Use nextInterval instead of CHANGE_INTERVAL_SEC.
  6035. (changeSw): Set nextInterval to 15 seconds relative to the current
  6036. instant time.
  6037. * src/main.cc
  6038. (showVersion): Updated.
  6039. (showUsage): Updated.
  6040. * Release 0.8.1
  6041. 2006-09-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6042. * src/main.cc
  6043. (showUsage): Commented out --min-segment-size option.
  6044. (main): Commented out --min-segment-size option.
  6045. * Release 0.8.0
  6046. 2006-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6047. * src/*.{h,cc}:
  6048. Added an exception to the license which allows linking with OpenSSL.
  6049. 2006-09-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6050. * src/AbstractCommand.cc
  6051. (execute): Check whether the download has finished before checking
  6052. socket status.
  6053. Return true if peerStat->getStatus() == REQUEST_IDLE.
  6054. Do not exit even if no segment is available.
  6055. * src/prefs.h
  6056. (PREF_STARTUP_IDLE_TIME): New definition.
  6057. * src/PeerInteractionCommand.cc
  6058. (executeInternal): Removed max speed limit. Because it performs bad.
  6059. (receiveMessages): Added max speed limit. This was better than above,
  6060. but still a little bit to be desired. Sometimes the download speed
  6061. became much faster than I specified.
  6062. * src/SpeedCalc.h
  6063. (start): New variable.
  6064. (accumulatedLength): New variable.
  6065. (getAvgSpeed): New function.
  6066. * src/SpeedCalc.cc
  6067. (reset): Added start, accumulatedLength.
  6068. (update): Added calculation of an average speed.
  6069. (getAvgSpeed): New function.
  6070. * src/DownloadCommand.h
  6071. (sw): Removed.
  6072. * src/main.cc
  6073. (main): Added PREF_STARTUP_IDLE_TIME.
  6074. * src/PeerStat.h
  6075. (STATUS): Added REQUEST_IDLE.
  6076. (getMaxSpeed): Renamed as getMaxDownloadSpeed().
  6077. (getAvgDownloadSpeed): New function
  6078. (requestIdle): New function.
  6079. * src/SegmentMan.h
  6080. (SegmentEntryHandle): New type definition.
  6081. (SegmentEntries): Now holds SegmentEntryHandle.
  6082. (findSlowerSegmentEntry): New funtion.
  6083. * src/SegmentMan.cc
  6084. (save): Updated according to the changes in SegmentEntries.
  6085. (read): Updated according to the changes in SegmentEntries.
  6086. (FindSegmentEntryByIndex): Updated according to the changes in
  6087. SegmentEntries.
  6088. (FindSegmentEntryByCuid): Updated according to the changes in
  6089. SegmentEntries.
  6090. (checkoutSegment): Updated according to the changes in SegmentEntries.
  6091. (onNullBitfield): Updated according to the changes in SegmentEntries.
  6092. Renamed uitr as itr.
  6093. (findSlowerSegmentEntry): New function.
  6094. (getSegment): Updated according to the changes in SegmentEntries.
  6095. Added the feature that cancels the segment with slow server and fast
  6096. one takes it over.
  6097. (cancelSegment): Updated according to the changes in SegmentEntries.
  6098. (getDownloadLength): Updated according to the changes in
  6099. SegmentEntries.
  6100. (init): Assigned 0 to bitfield after deleting it.
  6101. * src/DownloadCommand.cc
  6102. (STARTUP_IDLE_TIME): Removed.
  6103. (executeInternal): Use PREF_STARTUP_IDLE_TIME.
  6104. * src/PeerChokeCommand.cc
  6105. (optUnchokingPeer): Updated according to the changes in Peer.
  6106. (ResetDelta): Removed.
  6107. (UploadFaster): Updated according to the changes in Peer.
  6108. (DownloadFaster): Updated according to the changes in Peer.
  6109. (execute): I clarify the meaning of "upload" and "download" here.
  6110. "upload" means the transfer from localhost to remote host.
  6111. "download" means the transfer from remote host to localhost.
  6112. Based on this rule, I swapped orderByUploadRate and
  6113. orderByDownloadRate.
  6114. * src/PeerInteractionCommand.cc
  6115. (PeerInteraction): Removed peerInteraction->setUploadLImit().
  6116. (executeInternal): Removed the argument of
  6117. peerInteraction->sendMessages().
  6118. (receiveMessages): Rewritten download speed limit.
  6119. (sendKeepAlive): Removed peerInteraction->sendMessages().
  6120. * src/HttpResponseCommand.cc
  6121. (handleDefaultEncoding): If file size is unknown in torrent request,
  6122. do not call segmentMan->initBitfield() here.
  6123. Disabled persistent connection feature in torrent request.
  6124. * src/UrlRequestInfo.h
  6125. (UrlRequestInfo): Removed const qualifier from option.
  6126. * src/TorrentMan.h
  6127. (TransferStat): New class.
  6128. (deltaDownloadLength): Removed.
  6129. (deltaUploadLength): Removed.
  6130. (addDeltaDownloadLength): Removed.
  6131. (getDeltaDownloadLength): Removed.
  6132. (resetDeltaDownloadLength): Removed.
  6133. (addDeltaUploadLength): Removed.
  6134. (getDeltaUploadLength): Removed.
  6135. (resetDeltaUploadLength): Removed.
  6136. (addActivePeer): Added peer->activate().
  6137. (deleteActivePeer): Added peer->deactivate().
  6138. (calculateStat): New function.
  6139. * src/TorrentMan.cc
  6140. (TorrentMan): Removed deltaDownloadLength and deltaUploadLength.
  6141. (calculateStat): New function.
  6142. * src/PeerInteraction.h
  6143. (uploadLimit): Removed.
  6144. (option): New variable.
  6145. (setUploadLimit): Removed.
  6146. (getUploadSpeed): Removed.
  6147. (sendMessages): Removed the argument "currentUploadSpeed".
  6148. * src/PeerInteraction.cc
  6149. (prefs.h): Included.
  6150. (PeerInteraction): Removed uploadLimit. Added option.
  6151. (sendMessages): Rewritten upload speed limit.
  6152. (sendHandshake): Removed the argument from sendMessages().
  6153. (sendBitfield): Removed the argument from sendMessages().
  6154. * src/PeerAbstractCommand.cc
  6155. (execute): Commented out the portion of upload limit.
  6156. (onAbort): Removed peer->resetStatus().
  6157. * src/TorrentRequestInfo.cc
  6158. (timeoutSpecified): Declared extern.
  6159. (execute): Set timeout to 180 if timeout is not specified by.
  6160. command-line.
  6161. * src/PieceMessage.cc
  6162. (receivedAction): Added peer->updateDownloadLength().
  6163. Removed peer->addPeerUpload().
  6164. Removed torrentMan->addDeltaDownloadLength().
  6165. (send): Added peer->updateUploadLength().
  6166. Removed peer->addPeerDownload().
  6167. Removed torrentMan->addDeltaUploadLength().
  6168. * src/main.cc
  6169. (timeoutSpecified): New variable.
  6170. (main): Set timeoutSpecified to false.
  6171. If the command-line option "--upload-limit" is specified, then
  6172. timeoutSpecified is set to true. This option will remain in the next
  6173. release, but be deprecated in the future release.
  6174. * src/TorrentRequestInfo.h
  6175. (TorrentRequestInfo): Removed const qualifier from op.
  6176. * src/PeerStat.h
  6177. (uploadSpeed): New variable.
  6178. (PeerStat): Added default value to cuid.
  6179. (calculateUploadSpeed): New function.
  6180. (updateUploadLength): New function.
  6181. (getMaxUploadSpeed): New function.
  6182. (getAvgUploadSpeed): New function.
  6183. (reset): Added uploadSpeed. Set status to IDLE.
  6184. * src/TorrentDownloadEngine.h
  6185. (cp): Declared as Time.
  6186. (sessionDownloadLengthArray): Removed.
  6187. (sessionUploadLengthArray): Removed.
  6188. (currentCp): Removed.
  6189. (lastCalcStat): New variable
  6190. (lastElapsed): Removed.
  6191. (sessionDownloadLength): Removed.
  6192. (calculateStat): New function.
  6193. * src/TorrentDownloadEngine.cc
  6194. (initStatistics): Removed lastElapsed, cp[],
  6195. sessionDownloadLengthArray[], sessionUploadLengthArray[],
  6196. currentCp, sessionDownloadLength.
  6197. Added cp.reset() and lastCalcStat.reset().
  6198. (calculateSpeed): Changed the name of the argument.
  6199. (calculateStatistics): Rewritten.
  6200. (calculateStat): New function.
  6201. * src/Peer.h
  6202. (PeerStat.h): Included.
  6203. (peerUpload): Removed.
  6204. (peerDownload): Removed.
  6205. (peerStat): New variable.
  6206. (sessionUploadLength): New variable.
  6207. (sessionDownloadLength): New variable.
  6208. (deltaUpload): Removed.
  6209. (deltaDownload): Removed.
  6210. (resetStatus): Made private.
  6211. (Peer): Added sessionUploadLength, sessionDownloadLength.
  6212. Removed peerUpload, peerDownload.
  6213. (updateUploadLength): New function.
  6214. (addDeltaUpload): Removed.
  6215. (updateDownloadLength): New function.
  6216. (resetDeltaUpload): Removed.
  6217. (getDeltaUpload): Removed.
  6218. (addDeltaDownload): Removed.
  6219. (calculateUploadSpeed): New function.
  6220. (resetDeltaDownload): Removed.
  6221. (getDeltaDownload): Removed.
  6222. (calculateDownloadSpeed): New function.
  6223. (getSessionUploadLength): New function.
  6224. (getSessionDownloadLength): New function.
  6225. (activate): New function.
  6226. (deactivate): New function.
  6227. (addPeerUpload): Removed.
  6228. (setPeerUpload): Removed.
  6229. (getPeerUpload): Removed.
  6230. (addPeerDownload): Removed.
  6231. (setPeerDownload): Removed.
  6232. (getPeerDownload): Removed.
  6233. * src/Peer.cc
  6234. (resetStatus): Removed resetDeltaUpload() and resetDeltaDownload().
  6235. * src/MetalinkRequestInfo.h
  6236. (MetalinkRequestInfo): Removed const qualifier from op.
  6237. * src/RequestInfo.h
  6238. (op): Removed const qualifier.
  6239. (RequestInfo): Removed const qualifier from op.
  6240. * src/prefs.h
  6241. (PREF_MAX_SPEED_LIMIT): Renamed as PREF_MAX_DOWNLOAD_LIMIT.
  6242. (PREF_UPLOAD_LIMIT): Renamed as PREF_MAX_UPLOAD_LIMIT.
  6243. * src/PeerInteractionCommand.cc
  6244. (PeerInteractionCommand): Use PREF_MAX_UPLOAD_LIMIT.
  6245. (receiveMessages): Use PREF_MAX_DOWNLOAD_LIMIT.
  6246. * src/PeerInteraction.cc
  6247. (sendMessages): Use PREF_MAX_UPLOAD_LIMIT.
  6248. * src/main.cc
  6249. (showUsage): Updated the description of "--lowest-speed-limit" option.
  6250. Added the description of "--max-download-limit" option.
  6251. Removed the description of "--upload-limit" option.
  6252. Added the description of "--max-upload-limit" option.
  6253. (main): Use PREF_MAX_UPLOAD_LIMIT, PREF_MAX_DOWNLOAD_LIMIT.
  6254. Added "--max-download-limit" option and "--max-upload-limit" option.
  6255. Added the warning message if "--upload-limit" option is used.
  6256. * src/DownloadCommand.cc
  6257. (executeInternal): Use PREF_MAX_DOWNLOAD_LIMIT.
  6258. 2006-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6259. To rewrite segment download mechanism for HTTP/FTP download.
  6260. Use BitfieldMan to manage segment download.
  6261. * src/HttpResponseCommand.h
  6262. (executeInternal): Pass the reference of segment.
  6263. * src/AbstractCommand.cc
  6264. (prepareForRetry): Call segmentMan->cancelSegment here.
  6265. (onAbort): Call segmentMan->cancelSegment here.
  6266. * src/HttpDownloadCommand.cc
  6267. (prepareForNextSegment): New function.
  6268. * src/DownloadEngineFactory.cc
  6269. (newConsoleEngine): Removed splitter.
  6270. (newTorrentConsoleEngine): Removed splitter.
  6271. * src/Request.h
  6272. (segment): Renamed from seg.
  6273. * src/FtpInitiateConnectionCommand.h
  6274. (executeInternal): Pass the reference of segment.
  6275. * src/AbstractCommand.h
  6276. (executeInternal): Pass the reference of segment.
  6277. * src/pref.h
  6278. (PREF_SEGMENT_SIZE): New definition.
  6279. * src/HttpProxyRequestCommand.h
  6280. (executeInternal): Pass the reference of segment.
  6281. * src/HttpResponseCommand.cc
  6282. (checkResponse): Allowed status 206 when a request range starts 0.
  6283. (handleDefaultEncoding): Rewritten the code related to Segment.
  6284. (handleOtherEncoding): Rewritten the code related to Segment.
  6285. * src/SegmentMan.h
  6286. (SegmentEntry): New class.
  6287. (SegmentEntries): New type definition.
  6288. (bitfield): New variable.
  6289. (usedSegmentEntries): New variable.
  6290. (onNullBitfield): New function.
  6291. (checkoutSegment): New function.
  6292. (segments): Removed.
  6293. (splitter): Removed.
  6294. (unregisterId): Removed.
  6295. (getSegment): New function(overload)
  6296. (getDownloadedSize): Removed.
  6297. (cancelSegment): New function.
  6298. (completeSegment): New function.
  6299. (initBitfield): New function.
  6300. (hasSegment): New function.
  6301. (getDownloadLength): New function.
  6302. * src/BitfieldMan.h
  6303. (getStartIndex): New function.
  6304. (getEndIndex): New function.
  6305. (getMissingUnusedIndex): New function(overload).
  6306. (getSparseMissingUnusedIndex): New function.
  6307. * src/BitfieldMan.cc
  6308. (getMissingIndexRandomly): Handle the last byte of bitfield properly.
  6309. (getMissingUnusedIndex): New function(overload).
  6310. (Range): New class.
  6311. (getStartIndex): New function.
  6312. (getEndIndex): New function.
  6313. (getSparseMissingUnusedIndex): New function.
  6314. (isBitSetInternal): Return false if the given index is less than 0.
  6315. * src/HttpInitiateConnectionCommand.h
  6316. (executeInternal): Pass the reference of segment.
  6317. * src/FtpNegotiateCommand.h
  6318. (executeInternal): Pass the reference of segment.
  6319. * src/FtpNegotiateCommand.cc
  6320. (recvSize): Initialize bitfield here.
  6321. * src/FtpTunnelResponseCommand.h
  6322. (executeInternal): Pass the reference of segment.
  6323. * src/HttpConnection.cc
  6324. (createRequest): Rewritten range header processing.
  6325. * src/DownloadCommand.h
  6326. (executeInternal): Pass the reference of segment.
  6327. (prepareForRetry): Removed.
  6328. (prepareForNextSegment): Added an argument segment. Made it a virtual
  6329. function.
  6330. * src/main.cc
  6331. (main): Set the initial value of PREF_SEGMENT_SIZE to 1MB.
  6332. * src/SegmentMan.cc
  6333. (SegmentMan): Added bitfield. Removed splitter.
  6334. (~SegmentMan): Added bitfield. Removed splitter.
  6335. (unregisterId): Removed.
  6336. (getSegment): Rewritten.
  6337. (updateSegment): Rewritten.
  6338. (save): Rewritten.
  6339. (read): Rewritten.
  6340. (finished): Rewritten.
  6341. (getDownloadedSize): Removed.
  6342. (initBitfield): New function.
  6343. (FindSegmentEntryByIndex): New function object.
  6344. (FindSegmentEntryByCuid): New function object.
  6345. (checkoutSegment): New function.
  6346. (onNullBitfield): New function.
  6347. (getSegment): New function(overload).
  6348. (CancelSegment): New function object.
  6349. (cancelSegment): New function.
  6350. (completeSegment): New function.
  6351. (hasSegment): New function.
  6352. (getDownloadLength): New function.
  6353. * src/FtpInitiateConnectionCommand.cc
  6354. (executeInternal): Load .aria2 file after hostname resolution finishes.
  6355. * src/Segment.h: Rewritten.
  6356. * src/Segment.cc (operator<<): New function.
  6357. * src/HttpDownloadCommand.h
  6358. (prepareForNextSegment): New function.
  6359. * src/Request.cc
  6360. (resetUrl): Made segment null.
  6361. * src/DownloadEngine.cc
  6362. (~DownloadEngine): Call cleanQueue before deleting segmentMan.
  6363. * src/HttpProxyRequestCommand.h
  6364. (executeInternal): Pass the reference of segment.
  6365. * src/DownloadCommand.cc
  6366. (executeInternal): Rewritten the code related to Segment.
  6367. (prepareForRetry): Removed.
  6368. (prepareForNextSegment): Rewritten.
  6369. * src/FtpTunnelResponseCommand.h
  6370. (executeInternal): Pass the reference of segment.
  6371. To add HTTP 1.1 persistent connection support(experimental)
  6372. * src/HttpRequestCommand.cc
  6373. (executeInternal): Disable keep alive if it is disabled by
  6374. configuration.
  6375. * src/Request.h
  6376. (keepAlive): New variable.
  6377. (isKeepAlive): New function.
  6378. (setKeepAlive): New function.
  6379. * src/pref.h
  6380. (PREF_HTTP_KEEP_ALIVE): New definition.
  6381. * src/HttpResponseCommand.cc
  6382. (executeInternal): Check the remote server supports keep alive.
  6383. * src/HttpConnection.cc
  6384. (createRequest): Send "Connection: close" only if keep alive is
  6385. disabled.
  6386. * src/main.cc
  6387. (main):
  6388. Set the initial value(false) of PREF_KEEP_ALIVE to false.
  6389. To add max download speed limit:
  6390. * src/pref.h
  6391. (PREF_MAX_SPEED_LIMIT): New definition.
  6392. * src/PeerInteractionCommand.cc
  6393. (executeInternal): Added max download speed limit. Not tested yet.
  6394. * src/SegmentMan.h
  6395. (PeerStats): New type definition.
  6396. (peerStats): New variable.
  6397. (registerPeerStat): New function.
  6398. (FindPeerStat): New function object.
  6399. (getPeerStat): New function.
  6400. (calculateDownloadSpeed): New function.
  6401. * src/SpeedCalc.h: New class.
  6402. * src/SpeedCalc.cc: New class.
  6403. * src/main.cc
  6404. (main):
  6405. Set the initial value of PREF_MAX_SPEED_LIMIT to 0(which means the
  6406. download speed is not restricted).
  6407. * src/PeerStat.h: New class.
  6408. * src/SegmentMan.cc
  6409. (registerPeerStat): New function.
  6410. (calculateDownloadSpeed): New function.
  6411. * src/DownloadCommand.cc
  6412. (STARTUP_IDLE_TIME): New definition.
  6413. (DownloadCommand): Register peerStat to segmentMan. Call peerStat->
  6414. downloadStart.
  6415. (~DownloadCommand): Call peerStat->downloadStop.
  6416. (executeInternal): Added download speed limitter. Rewritten lowest
  6417. speed limitter.
  6418. * src/HttpConnection.cc
  6419. (receiveResponse): Fixed: eohIndex[headerBuf] -> headerBuf[eohIndex].
  6420. * src/AbstractCommand.cc
  6421. (resolveHostname): Throw DlAbortEx if a name resolution failes.
  6422. Added hostname to the error message.
  6423. * src/ConsoleDownloadEngine.cc
  6424. (calculateStatistics): Initialize psize with dlSize.
  6425. * src/PieceMessage.cc
  6426. (receivedAction): Do not call peerInteraction->abortPiece here.
  6427. (onGotWrongPiece): Call peerInteraction->abortPiece here.
  6428. * src/BitfieldMan.h
  6429. (clearAllUseBit): New function.
  6430. (setAllUseBit): New function.
  6431. * src/BitfieldMan.cc
  6432. (clearAllBit): Do not clear useBitfield here.
  6433. (clearAllUseBit): New function.
  6434. (setAllUseBit): New function.
  6435. * src/Piece.cc
  6436. (clearAllBlock): Call bitfield->clearAllUseBit().
  6437. 2006-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6438. To make filename URL-decoded:
  6439. * src/HttpResponseCommand.h: Updated doc.
  6440. * src/HttpResponseCommand.cc
  6441. (determinFilename): Made filename URL-decoded.
  6442. * src/FtpInitiateConnectionCommand.cc
  6443. (executeInternal): Made filename URL-decoded.
  6444. * src/Util.h (urldecode): New function.
  6445. * src/Util.cc (urldecode): New function.
  6446. To fix a bug that caused assertion failure in ares_strerror:
  6447. * src/NameResolver.cc (callback): Fixed the bug.
  6448. * Release 0.7.3
  6449. 2006-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6450. To add --seed-time and --seed-ratio command-line option:
  6451. * src/Option.h (getAsDouble): New function.
  6452. * src/Option.cc (getAsDouble): New function.
  6453. * src/SeedCheckCommand.h: New class.
  6454. * src/SeedCheckCommand.cc: New class.
  6455. * src/DownloadEngineFactory.cc
  6456. (SeedCheckCommand.h): Included.
  6457. (UnionSeedCriteria.h): Included.
  6458. (TimeSeedCriteria.h): Included.
  6459. (ShareRatioSeedCriteria.h): Included.
  6460. (newTorrentConsoleEngine): Added the processing of seed option.
  6461. * src/SeedCriteria.h: New class.
  6462. * src/ShareRatioSeedCriteria.h: New class.
  6463. * src/TimeSeedCriteria.h: New class.
  6464. * src/UnionSeedCriteria.h: New class.
  6465. * src/prefs.h
  6466. (PREF_SEED_TIME): New definition.
  6467. (PREF_SEED_RATIO): New definition.
  6468. * src/main.cc
  6469. (showUsage): Added --seed-time and --seed-ratio option.
  6470. (main): Added --seed-time and --seed-ratio option.
  6471. Made default log file name "/dev/null".
  6472. * src/SharedHandle.h
  6473. (SharedHandle): Copy constructor. Made it assignable from the
  6474. SharedHandle of the subclasses.
  6475. (operator=): Made it assignable from the SharedHandle of the
  6476. subclasses.
  6477. (getRefCount): New function.
  6478. To add notice log level and the switch to write log to stdout. This
  6479. switch is configurable per log level.
  6480. * src/Logger.h
  6481. (notice): New function.
  6482. (LEVEL): Added NOTICE. Assigned an explicit value to each log level
  6483. constant.
  6484. * src/LogFactory.cc
  6485. (getInstance): The use of NullLogger was removed. A log message with
  6486. notice log level was made written to stdout along with log file.
  6487. * src/NullLogger.h
  6488. (notice): New function.
  6489. * src/SimpleLogger.h
  6490. (writeHeader): Added the 'file' argument.
  6491. (writeLog): Added the 'file' argument.
  6492. (writeFile): New function.
  6493. (stdoutField): New variable.
  6494. (SimpleLogger): Removed the default constructor.
  6495. (SimpleLogger): Made the default value of logfile 0.
  6496. (debug): Added 'virtual' keyword.
  6497. (info): Added 'virtual' keyword.
  6498. (warn): Added 'virtual' keyword.
  6499. (error): Added 'virtual' keyword.
  6500. (notice): New function.
  6501. (setStdout): New function.
  6502. * src/SimpleLogger.cc
  6503. (WRITE_LOG): Replaced writeLog with writeFile.
  6504. (WRITE_LOG_EX): Replaced writeLog with writeFile.
  6505. (SimpleLogger): Removed the default constructor.
  6506. (setStdout): New function.
  6507. (writeLog): Added the handling of NOTICE log level.
  6508. (writeFile): New function.
  6509. (notice): New function.
  6510. * src/TorrentMan.h: Updated doc.
  6511. * src/BitfieldMan.h: Updated doc.
  6512. * src/TrackerWatcherCommand.cc
  6513. (execute): Return true if error occurred in the request to the tracker
  6514. and halt is requested.
  6515. * src/TrackerUpdateCommand.cc
  6516. (execute): Return true if error occurred in the request to the tracker
  6517. and halt is requested.
  6518. To call onDownloadComplete from TorrentMan::completePiece(), not from
  6519. DownloadEngine:
  6520. * src/TorrentConsoleDownloadEngine.h
  6521. (onSelectiveDownloadingCompletes): Removed.
  6522. * src/TorrentConsoleDownloadEngine.cc
  6523. (onSelectiveDownloadingCompletes): Removed.
  6524. * src/TorrentDownloadEngine.h
  6525. (onEndOfRun): Added 'virtual' keyword.
  6526. (afterEachIteration): Removed.
  6527. (onSelectiveDownloadingCompletes): Removed.
  6528. * src/TorrentDownloadEngine.cc
  6529. (onEndOfRun): Removed filenameFixed.
  6530. (afterEachIteration): Removed.
  6531. * src/TorrentMan.cc
  6532. (completePiece): Call onDownloadComplete here.
  6533. (onDownloadComplete): Added 2 log messages.
  6534. 2006-08-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6535. To fix compilation problem on gcc4.1.1(patch#1542283 by tizianomueller)
  6536. * src/NameResolver.h: Added the prototype declaration of callback().
  6537. To support c-ares library:
  6538. * src/AbstractCommand.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6539. * src/FeatureConfig.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6540. * src/FtpInitiateConnectionCommand.h:
  6541. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6542. * src/AbstractCommand.h: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6543. * src/HttpInitiateConnectionCommand.h:
  6544. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6545. * src/NameResolver.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS.
  6546. Added thes upport of c-ares's ares_strerror(the idea came from patch
  6547. #1542285 by tizianomueller)
  6548. * src/HttpInitiateConnectionCommand.cc:
  6549. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6550. * src/FtpInitiateConnectionCommand.cc:
  6551. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6552. * src/DownloadEngine.h:
  6553. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6554. * src/DownloadEngine.cc:
  6555. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6556. To fix the bug that causes compilation failure with metalink-support
  6557. disabled(bug#1543587):
  6558. * src/main.cc: Fixed with the patch by tizianomueller.
  6559. * Release 0.7.2
  6560. 2006-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6561. * src/main.cc
  6562. (main): Added a message to inform users that aria2 is starting to
  6563. verify checksum.
  6564. * src/RequestInfo.cc
  6565. (printDownloadAbortMessage): Added a message to inform users that
  6566. transfer can be resumed.
  6567. * src/FeatureConfig.cc
  6568. (FEATURE_ASYNC_DNS): New definition.
  6569. (FeatureConfig): Added aysnc DNS entry.
  6570. To replace CommandUuid with Command* in SocketEntry and
  6571. NameResolverEntry:
  6572. * src/DownloadEngine.h
  6573. (CommandUuids): Removed.
  6574. (SocketEntry::commandUuid): Removed.
  6575. (SocketEntry::command): New variable.
  6576. (SocketEntry::SocketEntry): Updated.
  6577. (SocketEntry::operator==): Updated.
  6578. (NameResolverEntry::commandUuid): Removed.
  6579. (NameResolverEntry::command): New variable.
  6580. (NameResolverEntry::NameResolverEntry): Updated.
  6581. (NameResolverEntry::operator==): Updated.
  6582. (waitData): Changed the argument type.
  6583. (addSocketForReadCheck): Changed the argument type.
  6584. (deleteSocketForReadCheck): Changed the argument type.
  6585. (addSocketForWriteCheck): Changed the argument type.
  6586. (deleteSocketForWriteCheck): Changed the argument type.
  6587. (addNameResolverCheck): Changed the argument type.
  6588. (deleteNameResolverCheck): Changed the argument type.
  6589. * src/DownloadEngine.cc
  6590. (FindCommand): Removed.
  6591. (run): Removed activeUuid. Added activeCommands instead.
  6592. (AccumulateActiveUuid): Renamed as AccumulateActiveCommand.
  6593. (AccumulateActiveCommand): New function object.
  6594. (waitData): Use AccumulateActiveCommand.
  6595. (addSocketForReadCheck): Use Command instead of CommandUuid.
  6596. (deleteSocketForReadCheck): Use Command instead of CommandUuid.
  6597. (addSocketForWriteCheck): Use Command instead of CommandUuid.
  6598. (deleteSocketForWriteCheck): Use Command instead of CommandUuid.
  6599. (addNameResolverCheck): Use Command instead of CommandUuid.
  6600. (deleteNameResolverCheck): Use Command instead of CommandUuid.
  6601. * src/AbstractCommand.cc
  6602. (disableReadCheckSocket): Updated according to the changes in
  6603. DownloadEngine.
  6604. (setReadCheckSocket): Updated according to the changes in
  6605. DownloadEngine.
  6606. (disableWriteCheckSocket): Updated according to the changes in
  6607. DownloadEngine.
  6608. (setWriteCheckSocket): Updated according to the changes in
  6609. DownloadEngine.
  6610. (setNameResolverCheck): Updated according to the changes in
  6611. DownloadEngine.
  6612. (disableNameResolverCheck): Updated according to the changes in
  6613. DownloadEngine.
  6614. * src/AbstractCommand.cc
  6615. (disableReadCheckSocket): Updated according to the changes in
  6616. DownloadEngine.
  6617. (setReadCheckSocket): Updated according to the changes in
  6618. DownloadEngine.
  6619. (disableWriteCheckSocket): Updated according to the changes in
  6620. DownloadEngine.
  6621. (setWriteCheckSocket): Updated according to the changes in
  6622. DownloadEngine.
  6623. * release 0.7.1
  6624. 2006-08-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6625. To handle the case where some BitTorrent tracker requires all letters
  6626. except for [A-Za-z0-9] is URL encoded.
  6627. * src/Util.h
  6628. (torrentUrlencode): New function.
  6629. * src/Util.cc
  6630. (ctype.h): Included.
  6631. (torrentUrlencode): New function.
  6632. * src/TrackerWatcherCommand.cc
  6633. (execute): Use Util::torrentUrlencode() instead of Util::urlencode().
  6634. 2006-08-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6635. To add asynchronous DNS support(libares):
  6636. * src/AbstractCommand.h
  6637. (setNameResolverCheck): New function.
  6638. (disableNameResolverCheck): New function
  6639. (resolveHostname): New function.
  6640. * src/AbstractCommand.cc
  6641. (setNameResolverCheck): New function.
  6642. (disableNameResolverCheck): New function
  6643. (resolveHostname): New function.
  6644. * src/FtpInitiateConnectionCommand.h
  6645. (nameResolver): New function.
  6646. * src/FtpInitiateConnectionCommand.cc
  6647. (Util.h): Included.
  6648. (FtpInitiateConnectionCommand): Call disableReadCheckSocket,
  6649. disableWriteCheckSocket.
  6650. (~FtpInitiateConnectionCommand): Call disableNameResolverCheck.
  6651. (executeInternal): Added async DNS support.
  6652. * src/HttpInitiateConnectionCommand.h
  6653. (nameResolver): New function.
  6654. * src/HttpInitiateConnectionCommand.cc
  6655. (DlRetryEx.h): Included.
  6656. (HttpInitiateConnectionCommand): Call disableReadCheckSocket,
  6657. disableWriteCheckSocket.
  6658. (~HttpInitiateConnectionCommand): Call disableNameResolverCheck.
  6659. (executeInternal): Added async DNS support.
  6660. * src/NameResolver.h: New class. Note: #include <ares.h> is surrounded
  6661. by extern "C" declaration.
  6662. * src/NameResolver.cc: New class.
  6663. * src/Util.h:
  6664. (isNumberAndDotsNotation): New function
  6665. * src/Util.cc
  6666. (isNumberAndDotsNotation): New function.
  6667. * src/DownloadEngine.h
  6668. (NameResolver.h): Included.
  6669. (NameResolverEntry): New class.
  6670. (NameResolverEntries): New type definition.
  6671. (addNameResolverCheck): New function.
  6672. (deleteNameResolverCheck): New function.
  6673. * src/DownloadEngine.cc
  6674. (run): Initialize cp with 0.
  6675. (SetDescriptor::operator()): Added for NameResolverEntry.
  6676. (AccumulateActiveUuid::operator()): Added for NameResolverEntry.
  6677. (waitData): Check nameResolver entries.
  6678. (updateFdSet): Update fds in nameResolver entries.
  6679. (addNameResolverCheck): New function.
  6680. (deleteNameResolverCheck): new function.
  6681. * src/PeerInteractionCommand.cc
  6682. (executeInternal): Fixed wrong socket handling.
  6683. * src/main.cc
  6684. (main): Fixed the initial value of PREF_LOWEST_SPEED_LIMIT option to 0.
  6685. * src/Util.cc
  6686. (fileChecksum): Removed the call to ctx.digestReset().
  6687. 2006-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6688. * po/ru.po: Azamat sent me Russian translation.
  6689. * src/FtpNegotiateCommand.cc
  6690. (recvGreeting): Call disableWriteCheckSocket just after
  6691. socket->setBlockingMode(). This avoids unnecessary CPU-hog loop.
  6692. (recvRetr): Recognized status code 125 as a acceptable response code.
  6693. Rename Time.h to TimeA2.h to avoid compilation ploblem on
  6694. case-insesitive filesystem(BUG#1531057).
  6695. * src/Time.h: Renamed as TimeA2.h.
  6696. * src/Time.cc: Renamed as TimeA2.cc.
  6697. * src/TimeA2.h: New class.
  6698. * src/TimeA2.cc: New class.
  6699. * src/PeerChokeCommand.h: Replaced Time.h with TimeA2.h.
  6700. * src/TrackerWatcherCommand.h: Replaced Time.h with TimeA2.h.
  6701. * src/PeerAbstractCommand.h: Replaced Time.h with TimeA2.h.
  6702. * src/AbstractCommand.h: Replaced Time.h with TimeA2.h.
  6703. * src/PeerInteractionCommand.h: Replaced Time.h with TimeA2.h.
  6704. * src/ConsoleDownloadEngine.h: Replaced Time.h with TimeA2.h.
  6705. * src/TorrentAutoSaveCommand.h: Replaced Time.h with TimeA2.h.
  6706. * src/DownloadCommand.h: Replaced Time.h with TimeA2.h.
  6707. * src/TorrentMan.h: Replaced Time.h with TimeA2.h.
  6708. * src/TorrentDownloadEngine.h: Replaced Time.h with TimeA2.h.
  6709. * src/RequestSlot.h: Replaced Time.h with TimeA2.h.
  6710. * src/SleepCommand.h: Replaced Time.h with TimeA2.h.
  6711. * src/DownloadEngine.cc: Replaced Time.h with TimeA2.h.
  6712. * release 0.7.0
  6713. 2006-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6714. * src/PeerChokeCommand.h
  6715. (PeerChokeCommand): Rearranged the arguments.
  6716. * src/PeerChokeCommand.cc
  6717. (PeerChokeCommand): Rearranged the arguments.
  6718. * src/MetalinkEntry.h
  6719. (Checksum.h): Included.
  6720. (md5): Removed.
  6721. (sha1): Removed.
  6722. (checksum): New variable.
  6723. (operator=): Updated.
  6724. (check): Removed.
  6725. * src/prefs.h
  6726. (PREF_LOWEST_SPEED_LIMIT): New definition.
  6727. (PREF_FOLLOW_TORRENT): New definition.
  6728. (PREF_SELECT_FILE): New definition.
  6729. (PREF_FOLLOW_METALINK): New definition.
  6730. * src/MetalinkResource.h
  6731. (TYPE_HTTPS): Added to enum TYPE.
  6732. * src/TorrentMan.cc
  6733. (~TorrentMan): Rewritten.
  6734. * src/MultiDiskWriter.cc
  6735. (MultiDiskAdaptor): Updated according to the changes in
  6736. MessageDigestContext.
  6737. (~MultiDiskAdaptor): Updated according to the changes in
  6738. MessageDigestContext.
  6739. (hashUpdate): Updated according to the changes in MessageDigestContext.
  6740. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6741. * src/Util.h
  6742. (fileChecksum): Updated according to the changes in
  6743. MessageDigestContext.
  6744. * src/Util.cc
  6745. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6746. (fileChecksum): Updated according to the changes in
  6747. MessageDigestContext.
  6748. * src/messageDigest.h: Rewritten.
  6749. * src/MetalinkEntry.cc
  6750. (check): Removed.
  6751. (Supported): Updated.
  6752. (dropUnsupportedResource): Fixed a memory leak.
  6753. * src/ShaVisitor.cc
  6754. (ShaVisitor): Updated according to the changes in MessageDigestContext.
  6755. (~ShaVisitor): Updated according to the changes in
  6756. MessageDigestContext.
  6757. (visit): Updated according to the changes in MessageDigestContext.
  6758. * src/main.cc
  6759. (main): Rewritten the portion of download loop. --lowest-speed-limit
  6760. command-line option added.
  6761. * src/DownloadEngine.h
  6762. (SocketEntry): New class.
  6763. (SocketEntries): New definition.
  6764. (PairFind): Removed.
  6765. (SockCmdMap): Removed.
  6766. * src/DownloadEngine.cc
  6767. (DownloadEngine): Rewritten.
  6768. (~DownloadEngine): Rewritten.
  6769. (run): Renamed activeCommandUuids as activeUuids.
  6770. (SetDescriptor): Rewritten.
  6771. (AccumulateActiveCommandUuid): Removed.
  6772. (AccumulateActiveUuid): New function object.
  6773. (waitData): Rewritten.
  6774. (updateFdSet): Rewritten.
  6775. (addSocket): Rewritten.
  6776. (deleteSocket): Rewritten.
  6777. (addSocketForReadCheck): Rewritten.
  6778. (deleteSocketForReadCheck): Rewritten.
  6779. (addSocketForWriteCheck): Rewritten.
  6780. (deleteSocketForWriteCheck): Rewritten.
  6781. * src/Xml2MetalinkProcessor.cc
  6782. (getEntry): Rewritten the portion of MetalinkEntry creation.
  6783. * src/DownloadCommand.cc
  6784. (executeInternal): Added the check routine for lowest speed limit.
  6785. * src/AbstractDiskWriter.cc
  6786. (AbstractDiskWriter): Updated according to the changes in
  6787. MessageDigestContext.
  6788. (~AbstractDiskWriter): Updated according to the changes in
  6789. MessageDigestContext.
  6790. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6791. * src/RequestInfo.h: New class.
  6792. * src/UrlRequestInfo.h: New class.
  6793. * src/UrlRequestInfo.cc: New class.
  6794. * src/TorrentRequestInfo.h: New class.
  6795. * src/TorrentRequestInfo.cc: New class.
  6796. * src/MetalinkRequestInfo.h: New class.
  6797. * src/MetalinkRequestInfo.cc: New class.
  6798. * src/Checksum.h: New class.
  6799. * src/DownloadEngineFactory.h: New class.
  6800. * src/DownloadEngineFactory.cc: New class.
  6801. 2006-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6802. * src/Option.h
  6803. (getAsBool): New function.
  6804. * src/Option.cc
  6805. (prefs.h): Included.
  6806. (defined): 0-length value is now recognized as undefined.
  6807. (getAsInt): Rewritten.
  6808. (getAsLLInt): Rewritten.
  6809. (getAsBool): New function.
  6810. * src/FeatureConfig.h: Rewritten.
  6811. * src/FeatureConfig.cc: Rewritten.
  6812. * src/prefs.h
  6813. (PREF_STDOUT_LOG): New definition.
  6814. (PREF_LOG): New definition.
  6815. (PREF_DIR): New definition.
  6816. (PREF_OUT): New definition.
  6817. (PREF_SPLIT): New definition.
  6818. (PREF_DAEMON): New definition.
  6819. (PREF_REFERER): New definition.
  6820. (PREF_TORRENT_FILE): New definition.
  6821. (PREF_LISTEN_PORT): New definition.
  6822. (PREF_METALINK_FILE): New definition.
  6823. (PREF_METALINK_VERSION): New definition.
  6824. (PREF_METALINK_LANGUAGE): New definition.
  6825. (PREF_METALINK_OS): New definition.
  6826. (PREF_METALINK_SERVERS): New definition.
  6827. * src/main.cc
  6828. (main): Following command-line parameters are now put into Option
  6829. class: stdoutLog, logfile, dir, ufilename, split, daemonMode,
  6830. referer, torrentFile, metalinkFile, listenPort, metalinkVersion,
  6831. metalinkLanguage, metalinkOs, metalinkServers
  6832. To fix the bug that aria2 can not handle http response header properly.
  6833. * src/HttpHeader.cc
  6834. (put): Made name lowercased.
  6835. (defined): Made name lowercased.
  6836. (getFirst): Made name lowercased.
  6837. (get): Made name lowercased.
  6838. (getFirstAsInt): Rewritten.
  6839. (getFirstAsLLInt): Rewritten.
  6840. 2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6841. * src/TorrentMan.h:
  6842. (advertisePiece): Updated doc.
  6843. (getAdvertisedPieceIndexes): Updated doc.
  6844. (removeAdvertisedPiece); New function.
  6845. * src/TorrentMan.cc
  6846. (FindElapsedHave): New function object.
  6847. (removeAdvertisedPiece): New function.
  6848. * src/HaveEraseCommand.h: New class.
  6849. * src/HaveEraseCommand.cc: New class.
  6850. * src/FeatureConfig.h: New class.
  6851. * src/FeatureConfig.cc: New class.
  6852. * src/Request.h
  6853. (defaultPorts): Removed.
  6854. * src/Request.cc
  6855. (FeatureConfig.h): Included.
  6856. (Request): Removed the statements related to defaultPorts.
  6857. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead.
  6858. A default port number is now retrieved from FeatureConfig.
  6859. * src/main.cc
  6860. (HaveEraseCommand.h): Included.
  6861. (showVersion): Added the output of feature list.
  6862. (main): Added HaveEraseCommand to command queue in BitTorrent
  6863. downloading.
  6864. * src/PeerInteractionCommand.h
  6865. (chokeCheckPoint): Commented out.
  6866. (periodicExecPoint): New variable.
  6867. * src/PeerInteractionCommand.cc
  6868. (executeInternal): Following methods are now called in at least every
  6869. 0.5 seconds to reduce CPU usage:
  6870. detectMessageFlooding(), peerInteraction->checkRequestSlot(),
  6871. checkHave(), sendKeepAlive().
  6872. (checkLongTimePeerChoking): Commented out.
  6873. * src/BitfieldMan.h
  6874. (getNthBitIndex): Changed the method signature.
  6875. (getMissingIndexRandomly): Changed the method signature.
  6876. * src/BitfieldMan.cc
  6877. (getNthBitIndex): Rewritten
  6878. (getMissingIndexRandomly): Rewritten.
  6879. (hasMissingPiece): Rewritten.
  6880. (getMissingIndex): Refactored.
  6881. (getMissingUnusedIndex); Refactored.
  6882. (getMissingIndex): Refactored.
  6883. 2006-07-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6884. * src/PeerMessage.h
  6885. (Piece.h): Included.
  6886. (SharedHandle.h): Included.
  6887. (invalidate): New variable.
  6888. (uploading): New variable.
  6889. (isInvalidate): New function.
  6890. (isUploading): New function.
  6891. (onPush): New function.
  6892. (onChoked): New function.
  6893. (onCanceled): New function.
  6894. (onAbortPiece): New function.
  6895. (PeerMessageHandle): New type definition.
  6896. * src/PeerMessage.cc
  6897. (PeerMessage): Added the initialization for invalidate and uploading.
  6898. * src/CancelMessage.h
  6899. (CancelMessage): Rewritten.
  6900. * src/RejectMessage.h
  6901. (RejectMessage): Rewritten.
  6902. * src/Metalinker.h
  6903. (operator=): Defined.
  6904. * src/MetaEntry.h
  6905. (operator=): Defined.
  6906. * src/MetalinkResource.h
  6907. (operator=): Defined.
  6908. * src/AllowedFastMessage.h
  6909. (AllowedFastMessage): Rewritten.
  6910. * src/HandshakeMessage.h
  6911. (HandshakeMessage): New function(overload).
  6912. * src/HandshakeMessage.cc
  6913. (HandshakeMessage): Rewritten.
  6914. (init): New function.
  6915. * src/HaveMessage.h
  6916. (HaveMessage): Rewritten.
  6917. * src/Time.h
  6918. (operator=): Defined the function body here.
  6919. * src/Time.cc
  6920. (operator=): Removed.
  6921. * src/SocketCore.h
  6922. (operator==): Defined here.
  6923. (operator!=): Defined here.
  6924. (operator<): Defined here.
  6925. * src/SocketCore.cc
  6926. (operator==): Removed.
  6927. (operator<): Removed.
  6928. * src/BitfieldMan.h
  6929. (operator=): Defined the function body here.
  6930. * src/BitfieldMan.cc
  6931. (operator=): Removed.
  6932. * src/TorrentMan.h
  6933. (deleteErrorPeer): Removed.
  6934. (deleteUnusedPeer); New function.
  6935. * src/TorrentMan.cc
  6936. (addPeer): Call deleteUnusedPeer.
  6937. (deleteErrorPeer): Removed.
  6938. (deleteUnusedPeer): New function.
  6939. * src/PeerAbstractCommand.h
  6940. (setNoCheck): New function.
  6941. (noCheck): New variable.
  6942. * src/PeerAbstractCommand.cc
  6943. (PeerAbstractCommand): Added the initialization of noCheck.
  6944. (execute): Added a check for noCheck.
  6945. (setNoCheck): New function.
  6946. * src/Util.h
  6947. (stdio.h): Included.
  6948. * src/Util.cc
  6949. (unistd.h): Included.
  6950. * src/DefaultDiskWriter.cc
  6951. (unistd.h): Included.
  6952. * src/Peer.h
  6953. (operator==): Defined the function body here.
  6954. (operator!=): Defined the function body here.
  6955. * src/Peer.cc
  6956. (operator==): Removed.
  6957. (operator!=): Removed.
  6958. * src/Piece.h
  6959. (Piece): Defined the function body here(copy constructor).
  6960. (operator=): Defined the function body here.
  6961. (operator==): Defined the function body here.
  6962. * src/Piece.cc
  6963. (Piece): Removed(copy constructor).
  6964. (operator=): Removed.
  6965. (operator==): Removed.
  6966. * src/PeerMessageUtil.h
  6967. (ChokeMessage.h): Removed.
  6968. (UnchokeMessage.h): Removed.
  6969. (InterestedMessage.h): Removed.
  6970. (NotInterestedMessage.h): Removed.
  6971. (HaveMessage.h): Removed.
  6972. (BitfieldMessage.h): Removed.
  6973. (RequestMessage.h): Removed.
  6974. (CancelMessage.h): Removed.
  6975. (PieceMessage.h): Removed.
  6976. (HandshakeMessage.h): Removed.
  6977. (KeepAliveMessage.h): Removed.
  6978. (PortMessage.h): Removed.
  6979. (HaveAllMessage.h): Removed.
  6980. (HaveNoneMessage.h): Removed.
  6981. (PeerConnection.h): Removed.
  6982. (HandshakeMessage.h): Included.
  6983. * src/BitfieldMessage.h
  6984. (init): New function.
  6985. (BitfieldMessage): Rewritten.
  6986. (BitfieldMessage): New function(overload).
  6987. * src/RequestSlot.h
  6988. (operator=): Defined the function body here.
  6989. (operator==): Defined the function body here.
  6990. * src/RequestSlot.cc
  6991. (operator=): Removed.
  6992. (operator==): Removed.
  6993. To remove the dependency on the PeerMessage subclass from
  6994. PeerInteraction:
  6995. * src/PeerMessageFactory.h: New class.
  6996. * src/PeerMessageFactory.cc: New class.
  6997. * src/SimplePeerMessage.cc
  6998. (send): If invalidate is true then do nothing.
  6999. * src/PeerInteractionCommand.cc
  7000. (HandshakeMessage.h): Included.
  7001. (KeepAliveMessage.h): Included.
  7002. (ChokeMessage.h): Included.
  7003. (UnchokeMessage.h): Included.
  7004. (HaveMessage.h): Included.
  7005. (executeInternal): Call setNoCheck().
  7006. Removed setWriteCheckSocket(socket).
  7007. * src/PeerInteraction.h
  7008. (ChokeMessage.h): Removed.
  7009. (UnchokeMessage.h): Removed.
  7010. (InterestedMessage.h): Removed.
  7011. (NotInterestedMessage.h): Removed.
  7012. (HaveMessage.h): Removed.
  7013. (BitfieldMessage.h): Removed.
  7014. (RequestMessage.h): Removed.
  7015. (CancelMessage.h): Removed.
  7016. (PieceMessage.h): Removed.
  7017. (HandshakeMessage.h): Removed.
  7018. (KeepAliveMessage.h): Removed.
  7019. (PortMessage.h): Removed.
  7020. (HaveAllMessage.h): Removed.
  7021. (HaveNoneMessage.h): Removed.
  7022. (RejectMessage.h): Removed.
  7023. (AllowedFastMessage.h): Removed.
  7024. (SuggestPieceMessage.h): Removed.
  7025. (PeerMessageFactory.h): Included.
  7026. (PeerMessageHandle): Removed typedef of PeerMessageHandle.
  7027. (HandshakeMessageHandle): Removed typedef of HandshakeMessageHandle.
  7028. (PeerMessageFactory): New variable.
  7029. (createPeerMessage): Removed.
  7030. (createHandshakeMessage): Removed.
  7031. (setPeerMessageCommonProperty): Removed.
  7032. (addRequestSlot): New function.
  7033. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  7034. (getPeerMessageFactory): New function.
  7035. (createRequestMessage): Removed.
  7036. (createCancelMessage): Removed.
  7037. (createPieceMessage): Removed.
  7038. (createHaveMessage): Removed.
  7039. (createChokeMessage): Removed.
  7040. (createUnchokeMessage): Removed.
  7041. (createInterestedMessage): Removed.
  7042. (createNotInterestedMessage): Removed.
  7043. (createBitfieldMessage): Removed.
  7044. (createKeepAliveMessage): Removed.
  7045. (createHaveAllMessage): Removed.
  7046. (createHaveNoneMessage): Removed.
  7047. (createRejectMessage): Removed.
  7048. (createAllowedFastMessage): Removed.
  7049. * src/PeerInteraction.cc
  7050. (PeerInteraction): Allocate PeerMessageFactory here.
  7051. (~PeerInteraction): Deallocate PeerMessageFactory here.
  7052. (sendMessages): Use msg->isUploading() instead of msg->getId() ==
  7053. PieceMessage::ID.
  7054. (addMessage): Simplified by using PeerMessage::onPush().
  7055. (addRequestSlot): New function.
  7056. (rejectAllPieceMessageInQueue): Simplified by using
  7057. PeerMessage::onChoked().
  7058. (rejectPieceMessageInQueue): Simplified by using
  7059. PeerMessage::onCanceled().
  7060. (abortPiece): Simplified by using PeerMessage::abortPiece().
  7061. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  7062. (createHandshakeMessage): Removed.
  7063. (createPeerMessage): Removed.
  7064. (sendHandshake): Call PeerMessageFactory::createHandshakeMessage().
  7065. (setPeerMessageCommonProperty): Removed.
  7066. (createRequestMessage): Removed.
  7067. (createCancelMessage): Removed.
  7068. (createPieceMessage): Removed.
  7069. (createHaveMessage): Removed.
  7070. (createChokeMessage): Removed.
  7071. (createUnchokeMessage): Removed.
  7072. (createInterestedMessage): Removed.
  7073. (createNotInterestedMessage): Removed.
  7074. (createBitfieldMessage): Removed.
  7075. (createKeepAliveMessage): Removed.
  7076. (createHaveAllMessage): Removed.
  7077. (createHaveNoneMessage): Removed.
  7078. (createRejectMessage): Removed.
  7079. (createAllowedFastMessage): Removed.
  7080. * src/PieceMessage.h
  7081. (createRejectMessage): New function.
  7082. (PieceMessage): Rewritten.
  7083. (onChoked): New function.
  7084. (onCanceled): New function.
  7085. * src/PieceMessage.cc
  7086. (send): If invalidate is true then do nothing, just return.
  7087. (createRejectMessage): New function.
  7088. (onChoked): New function.
  7089. (onCanceled): New function.
  7090. * src/RequestMessage.h
  7091. (RequestMessage): Rewritten.
  7092. (onPush): New function.
  7093. (onAbortPiece): New function.
  7094. * src/RequestMessage.cc
  7095. (onPush): New function.
  7096. (onAbortPiece): New function.
  7097. Update fd_set when a socket is added or deleted in order to improve
  7098. performance:
  7099. * src/DownloadEngine.h
  7100. (rfdset): New variable.
  7101. (wfdset): New variable.
  7102. (updateFdSet): New function.
  7103. * src/DownloadEngine.cc
  7104. (SetDescriptor::operator()): Use SockCmdMap::value_type.
  7105. (AccumulateActiveCommandUuid::operator()): Use SockCmdMap::value_type.
  7106. (waitData): Copy rfdset and wfdset.
  7107. (updateFdSet): New function.
  7108. (addSocket): Call updateFdSet.
  7109. (deleteSocket): Call updateFdSet.
  7110. 2006-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7111. To add the support for Metalink3.0 backward compatible links:
  7112. * src/Request.h
  7113. (SAFE_CHARS): Added '#'.
  7114. (METALINK_MARK): New definition.
  7115. * src/Request.cc
  7116. (parseUrl): Added the support for Metalink3.0 backward compatible
  7117. links.
  7118. etc
  7119. * src/PeerInteraction.cc
  7120. (MsgPushBack): Removed.
  7121. (sendMessages): Use STL copy and back_inserter.
  7122. (rejectAllPieceMessageInQueue): Use STL copy and back_inserter.
  7123. (rejectPieceMessageInQueue): Use STL copy and back_inserter.
  7124. * src/TorrentMan.h
  7125. (MAX_PEER_LIST_SIZE): Changed to 100 from 250.
  7126. 2006-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7127. * src/SharedHandle.h: New class.
  7128. To wrap Socket, Command, PeerMessage and Peer with SharedHandle:
  7129. * src/HttpResponseCommand.h
  7130. (HttpResponseCommand): Wrapped Socket.
  7131. * src/SocketCore.h
  7132. (operator==): New function.
  7133. (operator!=): New function.
  7134. (operator<): New function.
  7135. (getSockfd): New function.
  7136. (isOpen): New function.
  7137. (writeData): New function.
  7138. * src/SocketCore.cc
  7139. (operator==): New function.
  7140. (operator!=): New function.
  7141. (operator<): New function.
  7142. * src/AbstractCommand.h
  7143. (socket): Changed its type to SocketHandle.
  7144. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7145. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7146. (disableReadCheckSocket): New function.
  7147. (disableWriteCheckSocket): New function.
  7148. (readCheckTarget): Changed its type to SocketHandle.
  7149. (writeCheckTarget): Changed its type to SocketHandle.
  7150. (AbstractCommand): Replaced Socket with SocketHandle.
  7151. * src/AbstractCommand.cc
  7152. (AbstractCommand): Replaced Socket with SocketHandle.
  7153. (~AbstractCommand): Removed the deallocation for Socket object.
  7154. (disableReadCheckSocket): New function.
  7155. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7156. (disableWriteCheckSocket): New function.
  7157. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7158. * src/HttpDownloadCommand.cc
  7159. (DownloadCommand): Replaced Socket with SocketHandle.
  7160. * src/PeerAbstractCommand.h
  7161. (socket): Changed its type to SocketHandle.
  7162. (peer): Changed its type to PeerHandle.
  7163. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7164. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7165. (disableReadCheckSocket): New function.
  7166. (disableWriteCheckSocket): New function.
  7167. (readCheckTarget): Changed its type to SocketHandle.
  7168. (writeCheckTarget): Changed its type to SocketHandle.
  7169. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  7170. Replaced Peer with PeerHandle.
  7171. * src/HttpRequestCommand.cc
  7172. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7173. Use disableReadCheckSocket.
  7174. * src/PeerInitiateConnectionCommand.h
  7175. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7176. * src/PeerChokeCommand.cc
  7177. (UploadFaster::operator()): Replaced Peer with PeerHandle.
  7178. (DownloadFaster::operator()): Replaced Peer with PeerHandle.
  7179. (execute): Use PeerHandle.
  7180. * src/PeerConnection.h
  7181. (HandshakeMessage.h): Removed include of HandshakeMessage.h.
  7182. (socket): Changed its type to SocketHandle.
  7183. (PeerConnection): Replaced Socket with SocketHandle.
  7184. * src/PeerConnection.cc
  7185. (PeerConnection): Replaced Socket with SocketHandle.
  7186. * src/PeerInteractionCommand.h
  7187. (PeerInteractionCommand): Replaced socket with SocketHandle.
  7188. Replaced Peer with PeerHandle.
  7189. * src/PeerInteractionCommand.cc
  7190. (PeerInteractionCommand): Replaced Socket with SocketHandle.
  7191. Replaced Peer with PeerHandle.
  7192. (executeInternal): Use disableWriteCheckSocket.
  7193. Use HandshakeMessageHandle.
  7194. (receiveMessages): Use PeerMessageHandle.
  7195. (prepareForNextPeer): Use PeerHandle.
  7196. * src/HttpProxyRequestCommand.h
  7197. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7198. * src/HttpResponseCommand.cc
  7199. (HttpResponseCommand): Replaced Socket with SocketHandle.
  7200. * src/TorrentMan.cc
  7201. (nullPeer): Added external reference.
  7202. (~TorrentMan): Removed the deallocation of the elements of peers.
  7203. (addPeer): Rewritten.
  7204. (isPeerAvailable): Use nullPeer.
  7205. (deleteOldpeers): Replaced with deleteErrorPeer.
  7206. (deleteErrorPeer): New function.
  7207. (getPeer): Use PeerHandle and nullPeer.
  7208. (hasMissingPiece): Replaced Peer with PeerHandle.
  7209. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7210. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7211. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7212. (getMissingPiece): Replaced Peer with PeerHandle.
  7213. * src/FtpNegotiateCommand.cc
  7214. (FtpNegotiationCommand): Replaced Peer with PeerHandle.
  7215. (~FtpNegotiationCommand): Removed the deallocation of Sockets.
  7216. (recvGreeting): Use disableWriteCheckSocket.
  7217. (recvPasv): Removed the allocation of Socket.
  7218. Use disableReadCheckSocket.
  7219. (sendRestPasv): Use disableWriteCheckSocket.
  7220. (recvRetr): Changed assertion.
  7221. * src/PeerInteraction.h
  7222. (SharedHandle.h): Included SharedHandle.h.
  7223. (PeerMessageHandle): New type definition.
  7224. (HandshakeMessageHandle): New type definition.
  7225. (MessageQueue): Changed. Now its element is of type PeerMessageHandle.
  7226. (peer): Changed its type to PeerHandle.
  7227. (createHandshakeMessage): Replaced HandshakeMessage with
  7228. HandshakeMessageHandle.
  7229. (createPeerMessage): Replaced PeerMessageHandle with PeerMessage.
  7230. (PeerInteraction): Replaced Peer with PeerHandle.
  7231. Replaced Socket with SocketHandle.
  7232. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  7233. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  7234. (receiveHandshake): Replaced HandshakeMessage with
  7235. HandshakeMessageHandle.
  7236. * src/PeerInteraction.cc
  7237. (PeerInteraction): Replaced Peer with PeerHandle.
  7238. Replaced Socket with SocketHandle.
  7239. (~PeerInteraction): Removed the deallocation of the elements of
  7240. messageQueue.
  7241. (MsgPushBack::operator()): Replaced PeerMessage with PeerMessageHandle.
  7242. (isSendingMessageInProgress): Replaced PeerMessage with
  7243. PeerMessageHandle.
  7244. (sendMessages): Use PeerMessageHandle. Removed try-catch block.
  7245. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  7246. (rejectAllPieceMessageInQueue): Use PeerMessageHandle.
  7247. (rejectPieceMessageInQueue): Use PeerMessageHandle.
  7248. (abortPiece): Use PeerMessageHandle.
  7249. (receiveHandshake): Replaced HandshakeMessage with
  7250. HandshakeMessageHandle. Removed try-catch block.
  7251. (createHandshakeMessage): Replaced HandshakeMessage with
  7252. HandshakeMessageHandle.
  7253. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  7254. Removed try-catch block.
  7255. (createPeerMessage): Replaced PeerMessage with PeerMessageHandle.
  7256. * src/HttpProxyResponseCommand.cc
  7257. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7258. * src/FtpTunnelResponseCommand.h
  7259. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7260. * src/HttpConnection.cc
  7261. (HttpConnection): Replaced Socket with SocketHandle.
  7262. * src/PeerAbstractCommand.cc
  7263. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  7264. (~PeerAbstractCommand): Removed the deallocation of socket.
  7265. Use disableReadCheckSocket, disableWriteCheckSocket.
  7266. (disableReadCheckSocket): New function.
  7267. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7268. (disableWriteCheckSocket): New function.
  7269. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7270. * src/InitiateConnectionCommandFactory.h: Corrected indentation.
  7271. * src/FtpTunnelRequestCommand.cc
  7272. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7273. (~FtpTunnelRequestCommand): Corrected indentation.
  7274. * src/DownloadCommand.h
  7275. (DownloadCommand): Replaced Socket with SocketHandle.
  7276. * src/PeerListenCommand.cc
  7277. (PeerListenCommand): Removed the initialization of socket.
  7278. (~PeerListenCommand): Removed the deallocation of socket.
  7279. (bindPort): Use SocketHandle.
  7280. (execute): Use SocketHandle and PeerHandle.
  7281. * src/FtpDowndloadCommand.cc
  7282. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7283. (~FtpDownloadCommand): Removed the deallocation of ctrlSocket.
  7284. * src/main.cc
  7285. (main): Corrected indentation.
  7286. * src/HttpInitiateConnectionCommand.cc
  7287. (HttpInitiateConnectionCommand): Replaced Socket with SocketHandle.
  7288. (executeInternal): Removed the allocation of socket.
  7289. * src/HttpRequestCommand.h
  7290. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7291. * src/FtpNegotiationCommand.h
  7292. (dataSocket): Changed its type to SocketHandle.
  7293. (serverSocket): Changed its type to SocketHandle.
  7294. (FtpNegotiationCommand): Replaced Socket with SocketHandle.
  7295. * src/TorrentMan.h
  7296. (MAX_PEER_UPDATE): Removed.
  7297. (MAX_PEERS): New definition.
  7298. (Peers): The element is now of type PeerHandle.
  7299. (addPeer): Replaced Peer with PeerHandle. Removed 'duplicate' argument.
  7300. (getPeer): Replaced Peer with PeerHandle.
  7301. (deleteOldErrorPeers): Removed.
  7302. (deleteErrorPeer): New function.
  7303. (hasMissingPiece): Replaced Peer with PeerHandle.
  7304. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7305. (getMissingPiece): Replaced Peer with PeerHandle.
  7306. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7307. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7308. (addActivePeer): Replaced Peer with PeerHandle.
  7309. (deleteActivePeer): Replaced Peer with PeerHandle.
  7310. Added a check for the return value of find.
  7311. * src/FtpTunnelResponseCommand.cc
  7312. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7313. * src/FtpInitiateConnectionCommand.cc
  7314. (executeInternal): Removed the allocation of socket.
  7315. * src/DownloadEngine.h
  7316. (Sockets): An element is now of type SocketHandle.
  7317. (SockCmdMap): A key is of type SocketHandle, a value is of type int.
  7318. (CommandUuids): New type definition.
  7319. (rsockets): Changed its type to SockCmdMap.
  7320. (wsockets): Changed its type to SockCmdMap.
  7321. (addSocket): Rewritten.
  7322. (deleteSocket): Rewritten.
  7323. (addSocketForReadCheck): Rewritten.
  7324. (deleteSocketForReadCheck): Rewritten.
  7325. (addSocketForWriteCheck): Rewritten.
  7326. (deleteSocketForWriteCheck): Rewritten.
  7327. (PairFind): New template class.
  7328. * src/HttpDownloadCommand.h
  7329. (HttpDownloadCommand): Replaced Socket with SocketHandle.
  7330. * src/FtpConnection.cc
  7331. (FtpConnection): Replaced Socket with SocketHandle.
  7332. (sendPort): Removed the allocation of serverSocket. Removed try-catch
  7333. block.
  7334. * src/InitiateConnectionCommandFactory.cc
  7335. (DlAbortEx.h): Included DlAbortEx.h.
  7336. (createInitiateConnectionCommand): Throw exception if the protocol of
  7337. requested URI is not supported.
  7338. * src/Peer.cc
  7339. (nullPeer): Changed its type to PeerHandle.
  7340. (operator==): New function.
  7341. (operator!=): New function.
  7342. * src/Peer.h
  7343. (SharedHandle.h): Included SharedHandle.h.
  7344. (operator==): New function.
  7345. (operator!=): New function.
  7346. (Peer): Added the default constructor.
  7347. Use resetStatus() to initialize member variables.
  7348. (nullPeer): Removed.
  7349. * src/TrackerUpdateCommand.cc
  7350. (execute): Brushed up using SharedHandle. Replaced MAX_PEER_UPDATE
  7351. with MIN_PEERS.
  7352. * src/PeerListenCommand.h
  7353. (socket): Changed its type to SocketHandle.
  7354. * src/Command.h
  7355. (CommandUuid): New type definition.
  7356. (uuid): New variable.
  7357. (uuidGen): New variable.
  7358. (Command): Added the initialization of uuid.
  7359. (getUuid): New function.
  7360. * src/Socket.h
  7361. (Socket): Removed.
  7362. (SocketHandle): New type definition.
  7363. * src/DownloadEngine.h
  7364. (FindCommand): New function object.
  7365. (run): The portion of socket check was rewritten.
  7366. (SetDescriptor): New function object.
  7367. (AccumulateActiveCommandUuid): New function object.
  7368. (waitData): Rewritten.
  7369. (addSocket): Rewritten.
  7370. (deleteSocket): Rewritten.
  7371. (addSocketForReadCheck): Rewritten.
  7372. (addSocketForWriteCheck): Rewritten.
  7373. (deleteSocketForReadCheck): Rewritten.
  7374. (deleteSocketForWriteCheck): Rewritten.
  7375. * src/HttpProxyResponseCommand.h
  7376. (HttpProxyResponseCommand): Replaced Socket with SocketHandle.
  7377. * src/HttpConnection.h
  7378. (socket): Changed its type to SocketHandle.
  7379. (HttpConnection): Replaced Socket with SocketHandle.
  7380. * src/PeerInitiateConnectionCommand.cc
  7381. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7382. (executeInternal): Removed the allocation of socket.
  7383. (prepareForNextPeer): Use PeerHandle.
  7384. * src/PeerMessage.h
  7385. (peer): Changed its type to PeerHandle.
  7386. (getPeer): Replaced Peer with PeerHandle.
  7387. (setPeer): Replaced Peer with PeerHandle.
  7388. * src/DownloadCommand.cc
  7389. (DownloadCommand): Replaced Socket with SocketHandle.
  7390. * src/FtpConnection.h
  7391. (socket): Changed its type to SocketHandle.
  7392. (FtpConnection): Replaced Socket with SocketHandle.
  7393. (sendPort); Replaced Socket with SocketHandle.
  7394. * src/FtpDowndloadCommand.h
  7395. (ctrlSocket): Changed its type to SocketHandle.
  7396. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7397. * src/HttpProxyRequestCommand.cc
  7398. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7399. * src/FtpTunnelRequestCommand.h
  7400. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7401. etc
  7402. * src/PeerChokeCommand.h
  7403. (setAllPeerChoked): Removed.
  7404. (setAllPeerResetDelta): Removed.
  7405. * src/PeerChokeCommand.cc
  7406. (setAllPeerChoked): Removed.
  7407. (ChokePeer): New function object.
  7408. (setAllPeerResetDelta): Removed.
  7409. (ResetDelta): New function object.
  7410. (orderByDownloadRate): Fixed a bug: use DowloadFaster, not UploadFaster
  7411. (execute): Show download speed when the local node is a seeder.
  7412. setAllPeerChoked and setAllPeerResetDelta were rewritten
  7413. using STL.
  7414. * src/TrackerWatcherCommand.h
  7415. (MIN_PEERS): Removed.
  7416. * src/TorrentMan.cc
  7417. (getPeer): Replaced MAX_PEER_UPDATE with MIN_PEERS.
  7418. 2006-07-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7419. To fix the bug that .aria2 file is not saved if downloading is stopped
  7420. by the errors:it results that aria2 can not resume downloading:
  7421. * src/main.cc
  7422. (normalDownload): Added the call to save().
  7423. (main): Added the deletion of the elements in 'reserved'.
  7424. To fix log:
  7425. * src/PeerInteraction.cc
  7426. (receiveHandshake): Fixed log.
  7427. 2006-07-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7428. To improve download performance in BitTorrent:
  7429. * src/TorrentMan.cc
  7430. (getPeer): Check the number of connections. Return nullPeer if
  7431. it is greater than MAX_PEER_UPDATE.
  7432. This code was originally here, but was removed in 0.5.1.
  7433. 2006-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7434. To improve the conditional compilation:
  7435. * src/MultiDiskWriter.h:
  7436. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7437. * src/MultiDiskWriter.cc:
  7438. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7439. * src/Util.h:
  7440. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7441. Added ENABLE_BITTORRENT around computeFastSet().
  7442. * src/Util.cc:
  7443. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7444. Added ENABLE_BITTORRENT around computeFastSet().
  7445. * src/messageDigest.h:
  7446. Replaced ENABLE_BITTORRENT with ENABLE_SSL.
  7447. * src/ShaVisitor.h:
  7448. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7449. * src/ShaVisitor.cc:
  7450. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7451. * src/main.cc:
  7452. Added ENABLE_BITTORRENT around includes and blocks related to
  7453. BitTorrent.
  7454. Added ENABLE_MESSAGE_DIGEST to skip checksum checking when the message
  7455. digest support is not available.
  7456. * src/AbstractDiskWriter.h:
  7457. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7458. * src/AbstractDiskWriter.cc:
  7459. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7460. * src/MetalinkEntry.cc
  7461. (check): Added ENABLE_MESSAGE_DIGEST. Return true if the message digest
  7462. support is not available.
  7463. To add command-line options for Metalink:
  7464. * src/main.cc:
  7465. Added metalink-version, metalink-language, metalink-os,
  7466. follow-metalink.
  7467. To use EXIT_SUCCESS and EXIT_FAILURE with exit():
  7468. * src/main.cc: Use these definition.
  7469. * Release 0.6.0
  7470. 2006-07-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7471. To add Metalink support(http/ftp only):
  7472. * src/AbstractCommand.h
  7473. (tryReserved): New function.
  7474. * src/AbstractCommand.cc
  7475. (execute): Call tryReserved().
  7476. (tryReserved): New function.
  7477. * src/Request.h
  7478. (Requests): New type definition.
  7479. * src/SegmentMan.h
  7480. (reserved): New variable.
  7481. * src/Util.h
  7482. (fileChecksum): New function.
  7483. (toUpper): New function.
  7484. (toLower): New function.
  7485. * src/Util.cc
  7486. (messageDigest.h): Included.
  7487. (trim): Trim \r\n\t.
  7488. (fileChecksum): New function.
  7489. (toUpper): New function.
  7490. (toLower): New function.
  7491. * src/main.cc
  7492. (normalDownload): New function.
  7493. (main): Added 2 command-line options: metalink-file,
  7494. metalink-connection. Their usage has not been written yet.
  7495. * src/MetalinkProcessor.h: New class.
  7496. * src/Xml2MetalinkProcessor.h: New class.
  7497. * src/Xml2MetalinkProcessor.cc: New class.
  7498. * src/MetalinkEntry.h: New class.
  7499. * src/MetalinkEntry.cc: New class.
  7500. * src/MetalinkResource.h: New class.
  7501. * src/MetalinkResource.cc: New class.
  7502. To add md5 message digest checking:
  7503. * src/messageDigest.h: Rewritten.
  7504. * src/MultiDiskWriter.cc: Updated according to the changes in
  7505. messageDigest.h.
  7506. * src/ShaVisitor.cc: Updated according to the changes in
  7507. messageDigest.h.
  7508. * src/Util.cc: Updated according to the changes in messageDigest.h.
  7509. * src/AbstractDiskWriter.cc: Updated according to the changes in
  7510. messageDigest.h.
  7511. To fix a bug that causes segfault when the payload length in peer
  7512. message is less than 0:
  7513. * src/PeerConnection.cc:
  7514. (receiveMessage): Fixed the bug.
  7515. * src/PeerMessageUtil.cc
  7516. (checkLength): Throw an exception if length is less than or equals to
  7517. 0.
  7518. To add new interfaces to Base64 encoding/decoding:
  7519. * src/Base64.h
  7520. (part_encode): Changed the method signature.
  7521. (encode): New function(overload).
  7522. (decode): New function(overload).
  7523. * src/Base64.cc
  7524. (part_encode): Rewritten.
  7525. (encode): Rewritten.
  7526. (encode): New function(overload).
  7527. To prevent a peer to download same piece if there is an error in
  7528. checksum:
  7529. * src/PieceMessage.cc
  7530. (receivedAction): Call peerInteraction->abortPiece().
  7531. 2006-06-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7532. To fix the bug that causes same have message is sent many times to
  7533. a single peer.
  7534. * src/Time.cc
  7535. (isNewer): Use Util::difftv().
  7536. * src/Util.cc
  7537. (difftv): Added a cast to (long long int).
  7538. * src/TorrentMan.cc
  7539. (advertisePiece): Use push_front.
  7540. (getAdvertisedPieceIndexes): A performance improvement was made.
  7541. To fix the bug that sends tracker requests without a sleep interval
  7542. when the number of connections is less than 15.
  7543. * src/TrackerWatcherCommand.cc
  7544. (execute): Now the number of connections is not a factor to decide
  7545. whether or not a tracker request should be sent or not.
  7546. * src/Time.h
  7547. (setTimeInSec): New function.
  7548. * src/Time.cc
  7549. (setTimeInSec): New function.
  7550. etc.
  7551. * src/ChokeMessage.cc
  7552. (receivedAction): Removed peer->snubbing = false
  7553. * src/PeerConnection.h
  7554. (receiveHandshake): Updated doc.
  7555. * src/TorrentMan.h
  7556. (getAdvertisedPieceIndexes): Updated the method signature.
  7557. * src/TorrentMan.cc
  7558. (getAdvertisedPieceIndexes): Updated the method signature.
  7559. * src/Time.h
  7560. (getTimeInMicros): Added a cast to (long long int).
  7561. (getTimeInMillis): Added a cast to (long long int).
  7562. * Release 0.5.2
  7563. 2006-06-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7564. To make a listening socket non-block:
  7565. * src/SocketCore.h
  7566. (setNonBlockingMode): New function.
  7567. * src/SocketCore.cc
  7568. (setNonBlockingMode): New function.
  7569. (beginListen): Added a call to setNonBlockingMode().
  7570. (acceptConnection): Call setNonBlockingMode().
  7571. (setBlockingMode): Updated.
  7572. To handle tracker's NAT-checking:
  7573. * src/PeerConnection.cc
  7574. (receiveHandshake): 'msg' param is filled with received data and
  7575. its length is assigned to 'length' param, even if all handshake
  7576. message is not yet received.
  7577. * src/PeerInteractionCommand.cc
  7578. (executeInternal): Use peerInteraction->receiveHandshake(true) when
  7579. a new peer connects to localhost.
  7580. A call to peerInteraction->sendHandshake() was removed because
  7581. it is called from peerInteraction->receiveHandshake(true).
  7582. * src/PeerInteraction.h
  7583. (quickReplied): New variable.
  7584. (receiveHandshake): Added an argument.
  7585. * src/PeerInteraction.cc
  7586. (PeerInteraction): Added the initialization of quickReplied.
  7587. (receiveHandshake): Send handshake message as soon as the info hash
  7588. in a handshake message from a peer is correct.
  7589. To change the random part of peer id and key parameter:
  7590. * src/TorrentMan.h
  7591. (key): New variable.
  7592. * src/TorrentMan.cc
  7593. (setupInternal1): Use Util::randomAlpha() to generate random part
  7594. of peer id, which is now "-aria2-"+13 alphabet characters([A-Za-z]).
  7595. key is also generated by Util::randomAlpha() and it is now 8 character
  7596. long.
  7597. * src/Util.h
  7598. (randomAlpha): New function.
  7599. * src/Util.cc
  7600. (randomAlpha): New function.
  7601. * src/TrackerWatcherCommand.cc
  7602. (execute): In a tracker request: Use torrentMan->key as key parameter.
  7603. Added no_peer_id=1.
  7604. Set snubbing flag to false when a choke message is received from a
  7605. snubbed peer.
  7606. * src/ChokeMessage.cc
  7607. (receivedAction): Set snubbing flag to false.
  7608. 2006-06-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7609. * src/TorrentMan.cc (setupInternal1): Fixed peerId generation bug.
  7610. * src/SimpleLogger.h (writeHeader): New function.
  7611. * src/SimpleLogger.cc (writeHeader): New function.
  7612. (writeLog): Fixed the bug that causes segfaults if exception message
  7613. contains an unescaped "%" character.
  7614. * src/TrackerWatcherCommand.cc (execute): Added a short sleep
  7615. when a tracker request fails.
  7616. * src/Request.cc (parseUrl): Query string is now handled properly.
  7617. * Release 0.5.1
  7618. 2006-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7619. To add Time class which represents a specific instant in time and
  7620. its precision is microseconds. Time checking procedures were rewritten
  7621. using this object.
  7622. * src/Time.h: New class.
  7623. * src/Time.cc: New class.
  7624. * src/AbstractCommand.h
  7625. (updateCheckPoint): Removed.
  7626. (isTimeoutDetected): Removed.
  7627. (checkPoint): Changed the type to Time.
  7628. (timeout): New variable.
  7629. (setTimeout): New function.
  7630. * src/AbstractCommand.cc
  7631. (AbstractCommand): Removed the initialization of checkPoint.
  7632. Added the initialization of timeout.
  7633. (updateCheckPoint): Removed.
  7634. (isTimeoutDetected): Removed.
  7635. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  7636. * src/PeerChokeCommand.h
  7637. (checkPoint): Changed the type to Time.
  7638. * src/PeerChokeCommand.cc
  7639. (PeerChokeCommand): Removed the initialization of checkPoint.
  7640. (execute): Rewritten using Time object.
  7641. * src/TrackerWatcherCommand.h
  7642. (checkPoint): Changed the type to Time.
  7643. * src/TrackerWatcherCommand.cc
  7644. (TrackerWatcherCommand): Removed the initialization of checkPoint.
  7645. (execute): Rewritten.
  7646. * src/ConsoleDownloadEngine.h
  7647. (cp): Changed the type to Time.
  7648. (startup): Changed the type to Time.
  7649. * src/ConsoleDownloadEngine.cc
  7650. (initStatistics): Use cp.reset(), startup.reset().
  7651. (calculateStatistics): Rewritten using Time object.
  7652. * src/PeerAbstractCommand.h
  7653. (updateCheckPoint): Removed.
  7654. (isTimeoutDetected): Removed.
  7655. (checkPoint): Changed the type to Time.
  7656. * src/PeerAbstractCommand.cc
  7657. (PeerAbstractCommand): Removed the initialization of checkPoint.
  7658. (updateCheckPoint): Removed.
  7659. (isTimeoutDetected): Removed.
  7660. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  7661. * src/PeerInteractionCommand.cc
  7662. (PeerInteractionCommand): Removed the initializations of struct
  7663. timeval variables.
  7664. * src/PeerInteractionCommand.h
  7665. (keepAliveCheckPoint): Changed the type to Time.
  7666. (chokeCheckPoint): Changed the type to Time.
  7667. (freqCheckPoint): Changed the type to Time.
  7668. (haveCheckTime): Changed the type to Time.
  7669. * src/PeerInteractionCommand.cc
  7670. (executeInternal): Rewritten using Time object.
  7671. (detectMessageFlooding): Rewritten using Time object.
  7672. (checkLongTimePeerChoking): Rewritten using Time object.
  7673. (sendKeepAlive): Rewritten using Time object.
  7674. (checkHave): Rewritten using Time object.
  7675. * src/SleepCommand.h
  7676. (checkPoint): Changed the type to Time.
  7677. * src/SleepCommand.cc
  7678. (SleepCommand): Removed the initialization of checkPoint.
  7679. (execute): Rewritten using Time object.
  7680. * src/TorrentAutoSaveCommand.h
  7681. (checkPoint): Changed the type to Time.
  7682. * src/TorrentAutoSaveCommand.cc
  7683. (TorrentAutoSaveCommand): Removed the initialization of checkPoint.
  7684. (execute): Rewritten.
  7685. * src/DownloadCommand.h
  7686. (sw): Changed the type to Time.
  7687. * src/DownloadCommand.cc
  7688. (DownloadCommand): Removed the initialization of sw.
  7689. (executeInternal): Rewritten.
  7690. * src/RequestSlot.h
  7691. (dispatchedTime): Changed the type to Time.
  7692. * src/RequestSlot.cc
  7693. (RequestSlot): Removed the call to setDispatchedTime().
  7694. (setDispatchedTime): Rewirtten.
  7695. (isTimeout): Rewritten.
  7696. (getLatencyInMillis): Rewritten.
  7697. * src/TorrentDownloadEngine.h
  7698. (cp): Changed the type to Time[2].
  7699. (startup): Changed the type to Time.
  7700. * src/TorrentDownloadEngine.cc
  7701. (initStatistics): Rewritten.
  7702. (calculateStatistics): Rewritten.
  7703. * src/DownloadEngine.cc
  7704. (run): Rewritten.
  7705. To detect all attempts to connect to the tracker are failed:
  7706. * src/AbstractCommand.cc
  7707. (execute): Increment e->segmentMan->errors if a command aborted.
  7708. * src/SegmentMan.h
  7709. (errors): New variable.
  7710. * src/SegmentMan.cc
  7711. (SegmentMan): Added the initialization of errors.
  7712. (init): Added the initialization of errors.
  7713. * src/TrackerWatcherCommand.cc
  7714. (execute): If e->segmentMan->errors > 0 then assume that the tracker
  7715. request was failed.
  7716. To handle snubbed peers:
  7717. * src/PeerChokeCommand.cc
  7718. (optUnchokingPeer): Snubbed peers don't get unchoked.
  7719. (execute): Snubbed peers don't get unchoked.
  7720. * src/PeerInteraction.h
  7721. (REQUEST_TIME_OUT): Changed the value from 120 to 60.
  7722. * src/PeerInteraction.cc
  7723. (checkRequestSlot): A peer get marked as "snubbed" if it doesn't send
  7724. back the requested 16k block in 60 seconds.
  7725. * src/PieceMessage.cc
  7726. (receivedAction): A peer's snubbed state is cleard if it sends
  7727. the requested 16k block in 60 seconds.
  7728. * src/Peer.h
  7729. (snubbing): New variable.
  7730. * src/Peer.cc
  7731. (resetStatus): Added snubbed = false.
  7732. To fix the bug that causes have message is not sent:
  7733. * src/PeerInteractionCommand.cc
  7734. (~PeerInteractionCommand): Removed e->torrentMan->unadvertisePiece().
  7735. (FLOODING_CHECK_INTERVAL): New definition(temporal).
  7736. (detectMessageFlooding): Use FLOODING_CHECK_INTERVAL.
  7737. * src/TorrentMan.h
  7738. (HaveEntry): New class.
  7739. (advertisePiece): Rewritten.
  7740. (getAdvertisedPieceIndexes): Rewritten.
  7741. (Haves): Changed the type.
  7742. (getAdvertisedPieceIndexes): Added an argument.
  7743. Others:
  7744. * src/TorrentMan.h
  7745. (DEFAULT_ANNOUNCE_INTERVAL): Changed the value to 1800.
  7746. (DEFAULT_ANNOUNCE_MIN_INTERVAL): Changed the value to 1800.
  7747. * src/TorrentMan.cc
  7748. (getPeer): Don't check the number of connections here.
  7749. (setupInternal1): Changed peerId.
  7750. * src/PeerInteractionCommand.h
  7751. (KEEP_ALIVE_INTERVAL): New definition.
  7752. (sendKeepAlive): Use KEEP_ALIVE_INTERVAL.
  7753. * src/main.cc
  7754. (main): SA_ONESHOT was replaced with SA_RESETHAND.
  7755. * src/DownloadEngine.h: Removed unnecessary header includes.
  7756. 2006-05-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7757. To fix the bug that causes segfaults if a tracker returns a zero-length
  7758. list as "peers":
  7759. * src/TrackerUpdateCommand.cc
  7760. (execute): Added a check to see wether the type of peers is Data*.
  7761. 2006-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7762. * Release 0.5.0
  7763. To fix compile issue with gcc3:
  7764. * src/CancelMessage.h
  7765. (ID): Renamed as ID_t
  7766. (ID_t): New enum.
  7767. * src/RejectMessage.h
  7768. (ID): Renamed as ID_t
  7769. (ID_t): New enum.
  7770. * src/SuggestPieceMessage.h
  7771. (ID): Renamed as ID_t
  7772. (ID_t): New enum.
  7773. * src/AllowedFastMessage.h
  7774. (ID): Renamed as ID_t
  7775. (ID_t): New enum.
  7776. * src/PortMessage.h
  7777. (ID): Renamed as ID_t
  7778. (ID_t): New enum.
  7779. * src/HaveNoneMessage.h
  7780. (ID): Renamed as ID_t
  7781. (ID_t): New enum.
  7782. * src/KeepAliveMessage.h
  7783. (ID): Renamed as ID_t
  7784. (ID_t): New enum.
  7785. * src/HaveAllMessage.h
  7786. (ID): Renamed as ID_t
  7787. (ID_t): New enum.
  7788. * src/UnchokeMessage.h
  7789. (ID): Renamed as ID_t
  7790. (ID_t): New enum.
  7791. * src/BitfieldMessage.h
  7792. (ID): Renamed as ID_t
  7793. (ID_t): New enum.
  7794. * src/PieceMessage.h
  7795. (ID): Renamed as ID_t
  7796. (ID_t): New enum.
  7797. * src/RequestMessage.h
  7798. (ID): Renamed as ID_t
  7799. (ID_t): New enum.
  7800. * src/NotInterestedMessage.h
  7801. (ID): Renamed as ID_t
  7802. (ID_t): New enum.
  7803. * src/ChokeMessage.h
  7804. (ID): Renamed as ID_t
  7805. (ID_t): New enum.
  7806. * src/InterestedMessage.h
  7807. (ID): Renamed as ID_t
  7808. (ID_t): New enum.
  7809. * src/HaveMessage.h
  7810. (ID): Renamed as ID_t
  7811. (ID_t): New enum.
  7812. 2006-05-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7813. * src/PeerAbstractCommand.h
  7814. (beforeSocketCheck): Removed.
  7815. * src/PeerAbstractCommand.cc
  7816. Modified in order to call executeInternal() even if socket check
  7817. and upload limit check fail.
  7818. * src/PeerInteractionCommand.h
  7819. (keepAlive): Removed.
  7820. (sendKeepAlive): New function.
  7821. (checkHave): New function.
  7822. (beforeSocketCheck): Removed.
  7823. * src/PeerInteractionCommand.cc
  7824. (executeInternal): Use peerInteraction->checkRequestSlot(). Added
  7825. calls to checkHave() and sendKeepAlive().
  7826. (keepAlive): Renamed to sendKeepAlive().
  7827. (sendKeepAlive): New function.
  7828. (beforeSocketCheck): Removed.
  7829. (checkHave): New function.
  7830. * src/BitfieldMan.cc
  7831. (getMissingIndex): Don't call getMissingIndexRandomly() if max is 0.
  7832. (getMissingUnusedIndex): Don't call getMissingIndexRandomly() if max is
  7833. 0.
  7834. (getMissingIndex): Dont't call getMissingIndexRandomly() if max is 0.
  7835. * src/TorrentMan.h
  7836. (UsedPieces): Removed.
  7837. (Pieces): New type definition.
  7838. * src/Piece.h: Updated doc.
  7839. * src/Peer.h
  7840. (totalLength): Removed.
  7841. * src/Peer.cc
  7842. (updateLatency): Fixed the latency calculation.
  7843. * src/TorrentMan.cc
  7844. (addPeer): Call deleteOldErrorPeers() only if peers.size() is higher
  7845. than or equal to MAX_PEER_LIST_SIZE.
  7846. If duplicate is false and peer.size() >= MAX_PEER_LIST_SIZE,
  7847. then return false.
  7848. (deleteOldErrorPeers): Rewritten.
  7849. (deleteUsedPiece): Fixed the miss use of STL remove.
  7850. * src/PeerInteraction.h
  7851. (Pieces): Removed.
  7852. (deleteTimeoutRequestSlot): Removed.
  7853. (deleteCompletedRequestSlot): Removed.
  7854. (checkRequestSlot): New function.
  7855. * src/PeerInteraction.cc
  7856. (deleteTimeoutRequestSlot): Merged to checkRequestSlot().
  7857. (deleteCompletedRequestSlot): Merged to checkRequestSlot().
  7858. (checkRequestSlot): New function.
  7859. * src/DownloadEngine.cc
  7860. (run): Clear activeSockets before calling waitData().
  7861. (waitData): Removed a call to activeSockets.clear().
  7862. 2006-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7863. To attempt to handle EINTR:
  7864. * src/SocketCore.cc
  7865. (isReadable): Added EINTR handling.
  7866. (isWritable): Added EINTR handling.
  7867. To improve the performance:
  7868. * src/AbstractCommand.cc
  7869. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  7870. * src/PeerInteractionCommand.h
  7871. (receiveMessage): Renamed as receiveMessages().
  7872. (receiveMessages): New function.
  7873. * src/PeerInteractionCommand.cc
  7874. (executeInternal): receiveMessage loop is moved to new receiveMessages
  7875. () function. detectMessageFlooding() is moved here.
  7876. (detectMessageFlooding): Use Util::difftvsec() instead of Util::difftv
  7877. (). The flooding detection for have message is comment out.
  7878. (checkLongTimePeerChoking): Use Util::difftvsec() instead of
  7879. Util::difftv().
  7880. (receiveMessage): Renamed as receiveMessages().
  7881. (receiveMessages): New function.
  7882. (keepAlive): Use Util::difftvsec() instead of Util::difftv().
  7883. (beforeSocketCheck): Commented out checkLongTimePeerChoking().
  7884. * src/SleepCommand.cc
  7885. (execute): Use Util::difftvsec() instead of Util::difftv().
  7886. * src/BitfieldMan.h
  7887. (getNthBitIndex): New function.
  7888. (hasMissingPiece): New function.
  7889. (getAllMissingIndexes): New function.
  7890. * src/BitfieldMan.cc
  7891. (countSetBit): Rewritten.
  7892. (getNthBitIndex): New function.
  7893. (getMissingIndexRandomly): Rewritten.
  7894. (hasMissingPiece): New function.
  7895. (getAllMissingIndexes): New function.
  7896. * src/TorrentMan.cc
  7897. (hasMissingPiece): New function.
  7898. (deleteUsedPiece): Rewritten using STL.
  7899. * src/PeerInteraction.cc
  7900. (getNewPieceAndSendInterest): Use TorrentMan::hasMissingPiece(), which
  7901. is a little bit faster then TorrentMan::getMissingPieceIndex().
  7902. (addRequests): Updated the number of pending requests.
  7903. * src/PeerAbstractCommand.cc
  7904. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  7905. (execute): Returns true if TorrentMan::isHalt() is true.
  7906. Corrected the condition of upload limit checking.
  7907. * src/Util.h
  7908. (countBit): New function.
  7909. * src/Util.cc
  7910. (nbits): New variable.
  7911. (countBit): New function.
  7912. * src/DownloadEngine.h
  7913. (SockCmdMap): New type definition.
  7914. (waitData): Added an argument.
  7915. (addSocket): Added an argument.
  7916. (addSocketForReadCheck): Added an argument.
  7917. (addSocketForWriteCheck): Added an argument.
  7918. * src/DownloadEngine.cc
  7919. (run): Executes only commands whose sockets are ready to read or write.
  7920. All commands are executed in every 1 second.
  7921. (waitData): Calls select() again if it returned
  7922. EINTR.
  7923. (addSocket): Saves socket and command object pair to the map.
  7924. (deleteSocket): Deletes socket and command object pair from the map.
  7925. (addSocketForReadCheck): Added an argument.
  7926. (addSocketForWriteCheck): Added an argument.
  7927. * src/DownloadCommand.cc
  7928. (executeInternal): Use Util::difftvsec() instead of Util::difftv().
  7929. To send "event=stopped" to the tracker when the application finishes:
  7930. * src/PeerChokeCommand.h
  7931. (checkPoint): New variable.
  7932. * src/PeerChokeCommand.cc
  7933. (PeerChokeCommand): Added the initialization of checkPoint.
  7934. (execute): The interval check is now done by checkPoint, not
  7935. SleepCommand. Return true if TorrentMan::isHalt() is true.
  7936. * src/TorrentMan.h
  7937. (halt): New function.
  7938. (hasMissingPiece): New function.
  7939. (isHalt): New function.
  7940. (setHalt): New function.
  7941. * src/TorrentMan.cc
  7942. (TorrentMan): Added the initialization of halt.
  7943. * src/TorrentAutoSaveCommand.h
  7944. (checkPoint): New variable.
  7945. * src/PeerListenCommand.cc
  7946. (execute): Returns true if TorrentMan::isHalt() is true.
  7947. * src/main.cc
  7948. (setSignalHander): Added flags argument.
  7949. (torrentHandler): Just calls TorrentMan::setHalt(true) and returns.
  7950. (main): Set SA_ONESHOT flag of the signal hander of SIGINT and SIGTERM.
  7951. Removed printDownloadAbortMessage() after torrent downloading loop.
  7952. * src/TorrentAutoSaveCommand.cc
  7953. (TorrentAutoSaveCommand): Added the initialization of checkPoint.
  7954. (execute): Returns true if TorrentMan::isHalt() is true.
  7955. The interval check is now done by checkPoint, not SleepCommand.
  7956. * src/TrackerWatcherCommand.cc
  7957. (execute): If TorrentMan::isHalt(), then create a tracker request with
  7958. event=stopped.
  7959. * src/TrackerUpdateCommand.cc
  7960. (prepareForRetry): Do not use SleepCommand here.
  7961. (execute): Returns true if TorrentMan::isHalt() is true.
  7962. Others:
  7963. * src/TorrentMan.cc
  7964. (getMissingPieceIndex): Updated log message.
  7965. * src/PeerInteraction.cc
  7966. (createPeerMessag): Updated log message.
  7967. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7968. To add the ability to download several pieces in mix in a command and
  7969. increase the number of request slots according to request-cancel
  7970. latency:
  7971. * src/PeerInteractionCommand.cc
  7972. (executeInternal): The number of messages to be received at a time
  7973. is increased from 10 to 50.
  7974. * src/LogFactory
  7975. (getInstance): Added NullLogger.
  7976. * src/NullLogger.h: New class.
  7977. * src/BitfieldMan.h
  7978. (getMissingIndex): New function.
  7979. * src/BitfieldMan.cc
  7980. (getMissingIndex): New function.
  7981. * src/TorrentMan.h
  7982. (checkOutPiece): New function.
  7983. (getMissingPieceIndex): New function.
  7984. (getMissingFastPieceIndex): New function.
  7985. (getMissingFastPiece): New function.
  7986. * src/TorrentMan.cc
  7987. (updatePiece): Rewritten using STL.
  7988. (syncPiece): Rewritten using STL.
  7989. (getMissingPiece): Rewritten using getMissingPieceIndex() and
  7990. checkOutPiece().
  7991. (getMissingPieceIndex): New function.
  7992. (getMissingFastPieceIndex): New function.
  7993. (getMissingFastPiece): New function.
  7994. (checkOutPiece): New function.
  7995. * src/PeerInteraction.h
  7996. (Pieces): New type definition.
  7997. (piece): Removed.
  7998. (pieces): New variable.
  7999. (getNewPieceAndSendInterest): Added the "piece" argument.
  8000. (abortPiece): Added the "piece" argument.
  8001. (abortAllPieces): New function.
  8002. (isInRequestSlot): New function.
  8003. (hasDownloadPiece): Added the "index" argument.
  8004. (setDownloadPiece): Removed.
  8005. (getDownloadPiece): Added the "index" argument.
  8006. (updatePiece): New function.
  8007. (createRequestMessage): Added the "index" argument.
  8008. * src/PeerInteraction.cc
  8009. (onChoked): Rewritten.
  8010. (abortPiece): Rewirtten.
  8011. (abortAllPieces): New function.
  8012. (deleteTimeoutRequestSlot): Rewritten.
  8013. Clarified code a little bit.
  8014. (deleteCompletedRequestSlot): Rewritten.
  8015. (isInRequestSlot): New function.
  8016. (syncPiece): Rewritten.
  8017. (updatePiece): New function.
  8018. (getNewPieceAndSendInterest): Rewritten.
  8019. (addRequests): Rewritten.
  8020. (getDownloadPiece): Rewritten.
  8021. (hasDownloadPiece): Rewritten.
  8022. (createRequestMessage): Added the "index" argument.
  8023. * src/common.h
  8024. (BITFIELD_LEN_FROM_PIECES): Enclosed the variable in parentheses.
  8025. (DIV_FLOOR): New definition.
  8026. * src/PieceMessage.cc
  8027. (receivedAction): Update request-piece latency here.
  8028. * src/RequestSlot.h
  8029. (getLatencyInMillis): New function.
  8030. * src/RequestSlot.cc
  8031. (isTimeout): Rewritten using getLatencyInMillis.
  8032. (getLatencyInMillis): New function.
  8033. * src/Piece.h
  8034. (operator==): New function.
  8035. (getMissingBlockIndex): New function.
  8036. * src/Piece.cc
  8037. (operator==): New function.
  8038. (getMissingBlockIndex): New function.
  8039. * src/Peer.h
  8040. (DEFAULT_LATENCY): New definition.
  8041. (latency): New variable.
  8042. (updateLatency): New function.
  8043. (getLatency): New function.
  8044. * src/Peer.cc
  8045. (resetStatus): Reset latecy.
  8046. (updateLatency): New function.
  8047. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8048. * src/SocketCore.cc
  8049. (isReadable): Added secure to the condition.
  8050. * src/HttpConnection.cc
  8051. (receiveResponse): Fixed a bug that causes no response header
  8052. exception.
  8053. * src/Peer.h
  8054. (getFastSet): Fixed the return value type.
  8055. 2006-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8056. To remove a wait from download loop:
  8057. * src/DownloadEngine.cc
  8058. (run): Comment out shortSleep.
  8059. To rewrite the message handling:
  8060. * src/SimplePeerMessage.h: New class.
  8061. * src/SimplePeerMessage.cc: New class.
  8062. * src/CancelMessage.h: Derived from SimplePeerMessage.
  8063. (msg): New variable.
  8064. (create): New function.
  8065. (send): Removed.
  8066. (getMessage): New function.
  8067. (getMessageLength): New function.
  8068. * src/CancelMessage.cc
  8069. (create): New function.
  8070. (receivedAction): Replaced deleteRequestMessageInQueue with
  8071. rejectPieceMessageInQueue.
  8072. (send): Removed.
  8073. (getMessage): New function.
  8074. (getMessageLength): New function.
  8075. * src/BitfieldMessage.h: Derived from SimplePeerMessage.
  8076. (msg): New variable.
  8077. (msgLength): New variable.
  8078. (~BitfieldMessage): Deleted msg.
  8079. (send): Removed.
  8080. (getMessage): New function.
  8081. (getMessageLength): New function.
  8082. * src/BitfieldMessage.cc
  8083. (create): New function.
  8084. (send): Removed.
  8085. (getMessage): New function.
  8086. (getMessageLength): New function.
  8087. * src/ChokeMessage.h: Derived from SimplePeerMessage.
  8088. (msg): New variable.
  8089. (sendPredicate): New function.
  8090. (onSendComplete): New function.
  8091. (send): Removed.
  8092. (getMessage): New function.
  8093. (getMessageLength): New function.
  8094. (create): New function.
  8095. * src/ChokeMessage.cc
  8096. (create): New function.
  8097. (send): Removed.
  8098. (sendPredicate): New function.
  8099. (getMessage): New function.
  8100. (getMessageLength): New function.
  8101. (onSendComplete): New function.
  8102. * src/KeepAliveMessage.h: Derived from SimplePeerMessage.
  8103. (msg): New variable.
  8104. (send): Removed.
  8105. (getMessage): New function.
  8106. (getMessageLength): New function.
  8107. * src/KeepAliveMessage.cc
  8108. (send): Removed.
  8109. (getMessage): New function.
  8110. (getMessageLength): New function.
  8111. * src/PortMessage.h
  8112. (create): New function.
  8113. (receivedAction): Updated log message.
  8114. * src/PortMessage.cc: New file.
  8115. * src/UnchokeMessage.h: Derived from SimplePeerMessage.
  8116. (msg): New variable.
  8117. (sendPredicate): New function.
  8118. (onSendComplete): New function.
  8119. (create): New function.
  8120. (send): Removed.
  8121. (getMessage): New function.
  8122. (getMessageLength): New function.
  8123. * src/UnchokeMessage.cc
  8124. (create): New function.
  8125. (send): Removed.
  8126. (sendPredicate): New function.
  8127. (getMessage): New function.
  8128. (getMessageLength): New function.
  8129. (onSendComplete): New function.
  8130. * src/PieceMessage.h
  8131. (leftPieceDataLength): Removed.
  8132. (leftDataLength): New variable.
  8133. (headerSend): New variable.
  8134. (pendingCount): New variable.
  8135. (msgHeader): New variable.
  8136. (sendPieceData): New function.
  8137. (incrementPendingCount): New function.
  8138. (isPendingCountMax): New function.
  8139. (create): New function.
  8140. (getMessageHeader): New function.
  8141. (getMessageHeaderLength): New function.
  8142. * src/PieceMessage.cc
  8143. (create): New function.
  8144. (getMessageHeader): New function.
  8145. (getMessageHeaderLength): New function.
  8146. (send): Rewritten.
  8147. (sendPieceData): New function.
  8148. * src/HaveMessage.h: Derived from SimplePeerMessage.
  8149. (msg): New variable.
  8150. (create): New function.
  8151. (getMessage): New function.
  8152. (getMessageLength): New function.
  8153. * src/HaveMessage.cc
  8154. (create): New function.
  8155. (send): Removed.
  8156. (sendPieceData): New function.
  8157. (getMessage): New function.
  8158. (getMessageLength): New function.
  8159. * src/RequestMessage.h: Derived from SimplePeerMessage.
  8160. (msg): New variable.
  8161. (create): New function.
  8162. (send): Removed.
  8163. (getMessage): New function.
  8164. (getMessageLength): New function.
  8165. * src/RequestMessage.cc
  8166. (create): New function.
  8167. (receivedAction): Added the handling of fast extension.
  8168. Deleted torrentMan->addUploadLength, torrentMan->addDeltaUploadLength.
  8169. (send): Removed.
  8170. (getMessage): New function.
  8171. (getMessageLength): New function.
  8172. * src/InterestedMessage.h: Derived from SimplePeerMessage.
  8173. (msg): New variable.
  8174. (sendPredicate): New function.
  8175. (onSendComplete): New function.
  8176. (create): New function.
  8177. (getMessage): New function.
  8178. (getMessageLength): New function.
  8179. * src/InterestedMessage.cc
  8180. (create): New function.
  8181. (send): Removed.
  8182. (sendPieceData): New function.
  8183. (getMessage): New function.
  8184. (getMessageLength): New function.
  8185. (onSendComplete): New function.
  8186. * src/NotInterestedMessage.h: Derived from SimplePeerMessage.
  8187. (msg): New variable.
  8188. (sendPieceData): New function.
  8189. (onSendComplete): New function.
  8190. (create): New function.
  8191. (send): Removed.
  8192. (getMessage): New function.
  8193. (getMessageLength): New function.
  8194. * src/NotInterestedMessage.cc
  8195. (create): New function.
  8196. (send): Removed.
  8197. (sendPredicate): New function.
  8198. (getMessage): New function.
  8199. (getMessageLength): New function.
  8200. (onSendComplete): New function.
  8201. * src/AllowedFastMessage.h: New class.
  8202. * src/AllowedFastMessage.cc: New class.
  8203. * src/RejectMessage.h: New class.
  8204. * src/RejectMessage.cc: New class.
  8205. * src/SuggestPieceMessage.h: New class.
  8206. * src/SuggestPieceMessage.cc: New class.
  8207. * src/HaveAllMessage.h: New class.
  8208. * src/HaveAllMessage.cc: New class.
  8209. * src/HaveNoneMessage.h: New class.
  8210. * src/HaveNoneMessage.cc: New class.
  8211. * src/HandshakeMessage.h: Derived from SimplePeerMessage.
  8212. (msg): New variable.
  8213. (reserved): New variable.
  8214. (create): New function.
  8215. (getId): New function.
  8216. (receivedAction): New function.
  8217. (getMessage): New function.
  8218. (getMessageLength): New function.
  8219. (isFastExtensionSupported): New function.
  8220. * src/HandshakeMessage.cc
  8221. (HandshakeMessage): Moved here from HandshakeMessage.h.
  8222. (create): New function.
  8223. (getMessage): New function.
  8224. (getMessageLength): New function.
  8225. (toString): Added the output of reserved field.
  8226. (check): Added const qualifier.
  8227. (isFastExtensionSupported): New function.
  8228. * src/PeerMessageUtil.h
  8229. (createChokeMessage): Removed.
  8230. (createUnchokeMessage): Removed.
  8231. (createInterestedMessage): Removed.
  8232. (createNotInterestedMessage): Removed.
  8233. (createHaveMessage): Removed.
  8234. (createBitfieldMessage): Removed.
  8235. (createRequestMessage): Removed.
  8236. (createCancelMessage): Removed.
  8237. (createPieceMessage): Removed.
  8238. (createPortMessage): Removed.
  8239. (createChokeMessage): Removed.
  8240. (createUnchokeMessage): Removed.
  8241. (createInterestedMessage): Removed.
  8242. (createNotInterestedMessage): Removed.
  8243. (createHaveMessage): Removed.
  8244. (createBitfieldMessage): Removed.
  8245. (createRequestMessage): Removed.
  8246. (createCancelMessage): Removed.
  8247. (createPieceMessage): Removed.
  8248. (createKeepAliveMessage): Removed.
  8249. (createHandshakeMessage): Removed.
  8250. (setIntParam): New function.
  8251. (createPeerMessageString): New function.
  8252. * src/PeerMessageUtil.cc
  8253. (createChokeMessage): Removed.
  8254. (createUnchokeMessage): Removed.
  8255. (createInterestedMessage): Removed.
  8256. (createNotInterestedMessage): Removed.
  8257. (createHaveMessage): Removed.
  8258. (createBitfieldMessage): Removed.
  8259. (createRequestMessage): Removed.
  8260. (createCancelMessage): Removed.
  8261. (createPieceMessage): Removed.
  8262. (createPortMessage): Removed.
  8263. (createRequestMessage): Removed.
  8264. (createCancelMessage): Removed.
  8265. (createPieceMessage): Removed.
  8266. (createHaveMessage): Removed.
  8267. (createChokeMessage): Removed.
  8268. (createUnchokeMessage): Removed.
  8269. (createInterestedMessage): Removed.
  8270. (createNotInterestedMessage): Removed.
  8271. (createBitfieldMessage): Removed.
  8272. (createKeepAliveMessage): Removed.
  8273. (createHandshakeMessage): Removed.
  8274. (setIntParam): New function.
  8275. (createPeerMessageString): New function.
  8276. * src/PeerConnection.h
  8277. (peer): Removed.
  8278. (torrentMan): Removed.
  8279. (createNLengthMessage): Removed.
  8280. (setIntParam): Removed.
  8281. (writeOutgoingMessageLog): Removed all overloaded functions.
  8282. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8283. (sendMessage): New function.
  8284. (sendHandshake): Removed.
  8285. (sendKeepAlive): Removed.
  8286. (sendChoke): Removed.
  8287. (sendUnchoke): Removed.
  8288. (sendInterested): Removed.
  8289. (sendNotInterested): Removed.
  8290. (sendHave): Removed.
  8291. (sendBitfield): Removed.
  8292. (sendRequest): Removed.
  8293. (sendPiece): Removed.
  8294. (sendPieceHeader): Removed.
  8295. (sendPieceData): Removed.
  8296. (sendCancel): Removed.
  8297. (getPeer): Removed.
  8298. * src/PeerConnection.cc
  8299. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8300. (sendHandshake): Removed.
  8301. (sendKeepAlive): Removed.
  8302. (createNLengthMessage): Removed.
  8303. (setIntParam): Removed.
  8304. (writeOutgoingMessageLog): Removed all overloaded functions.
  8305. (sendChoke): Removed.
  8306. (sendUnchoke): Removed.
  8307. (sendInterested): Removed.
  8308. (sendNotInterested): Removed.
  8309. (sendHave): Removed.
  8310. (sendBitfield): Removed.
  8311. (sendRequest): Removed.
  8312. (sendPiece): Removed.
  8313. (sendPieceHeader): Removed.
  8314. (sendPieceData): Removed.
  8315. (sendMessage): New function.
  8316. (sendCancel): Removed.
  8317. * src/PeerInteractionCommand.cc
  8318. (PeerInteractionCommand): Call setUploadLimit.
  8319. (executeInternal): Call setUploadLimit.
  8320. Added the handling of "inProgress" state of handshake message.
  8321. Call sendBitfield() or sendAllowdFast() instead of deprecated
  8322. sendNow().
  8323. (keepAlive): Call addMessage and sendMessage instead of deprecated
  8324. sendNow().
  8325. (beforeSocketCheck): Call addMessage instead of deprecated trySendNow()
  8326. * src/TorrentMan.h
  8327. (PEER_ID_LENGTH): New definition.
  8328. (hasAllPieces): New function.
  8329. * src/TorrentMan.cc
  8330. (getMissingPiece): Added the handling of fast extension.
  8331. (cancelPiece): Call updatePiece().
  8332. (hasAllPieces): New function.
  8333. * src/PeerInteraction.h
  8334. (fastSet): New variable.
  8335. (getNewPieceAndSendInterest): Changed the return type to void.
  8336. (send): Renamed as sendMessages.
  8337. (deleteAllRequestSlot): Removed.
  8338. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8339. (cancelAllRequest): Removed all overloaded functions.
  8340. (deleteAllRequestSlot): Removed.
  8341. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8342. (rejectPieceMessageInQueue): New function.
  8343. (rejectAllPieceMessageInQueue): New function.
  8344. (onChoked): New function.
  8345. (isSendingMessageInProgress): New function.
  8346. (getCorrespondingRequestSlot): Changed its arguments.
  8347. (isInFastSet): New function.
  8348. (addFastSetIndex): New function.
  8349. (addRequests): New function.
  8350. (sendNow): Removed.
  8351. (trySendNow): Removed.
  8352. (sendBitfield): New function.
  8353. (sendAllowdFast): New function.
  8354. (createHaveAllMessage): New function.
  8355. (createHaveNoneMessage): New function.
  8356. (createRejectMessage): New function.
  8357. (createAllowedFastMessage): New function.
  8358. * src/PeerInteraction.cc
  8359. (send): Renamed as sendMessages.
  8360. (sendMessages): New function.
  8361. (MsgPushBack): New class.
  8362. (isSendingMessageInProgress): New function.
  8363. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8364. (rejectAllPieceMessageInQueue): New function.
  8365. Added the handling of fast extension.
  8366. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8367. (rejectPieceMessageInQueue): New function.
  8368. Added the handling of fast extension.
  8369. (deleteRequestSlot): Replaced for loop with std::find.
  8370. (onChoked): New function.
  8371. (deleteAllRequestSlot): Removed.
  8372. (abortPiece): Rewirtten.
  8373. (deleteTimeoutRequestSlot): Updated log messages.
  8374. (getCorrespondingRequestSlot): Changed its arguments.
  8375. (cancelAllRequest): Removed all overloaded functions.
  8376. (receiveHandshake): Added the check to see whether an incoming peer
  8377. supports fast extension.
  8378. (createHandshakeMessage): Use HandshakeMessage::create instead of
  8379. PeerMessageUtil.
  8380. (createPeerMessage): Use create() of each message class instead of
  8381. PeerMessageUtil.
  8382. HaveAllMessage, HaveNoneMessage, RejectMessage, SuggestPieceMessage,
  8383. AllowedFastMessage were added.
  8384. (getNewPieceAndSendInterest): Changed its return value type to void.
  8385. Added the handling of fast extension.
  8386. (addRequests): New function.
  8387. (sendNow): Removed.
  8388. (sendHandshake): Rewritten.
  8389. (trySendNow): Removed.
  8390. (sendBitfield): New function.
  8391. (sendAllowdFast): New function.
  8392. (isInFastSet): New function.
  8393. (addFastSetIndex): New function.
  8394. (createRequestMessage): Use RequestMessage::create instead of
  8395. PeerMessageUtil.
  8396. (createCancelMessage): Use CancelMessage::create instead of
  8397. PeerMessageUtil.
  8398. (createPieceMessage): Use PieceMessage::create instead of
  8399. PeerMessageUtil.
  8400. (createHaveMessage): Use HaveMessage::create instead of
  8401. PeerMessageUtil.
  8402. (createChokeMessage): Use ChokeMessage::create instead of
  8403. PeerMessageUtil.
  8404. (createUnchokeMessage): Use UnchokeMessage::create instead of
  8405. PeerMessageUtil.
  8406. (createInterestedMessage): Use InterestedMessage::create instead of
  8407. PeerMessageUtil.
  8408. (createNotInterestedMessage): Use NotInterestedMessage::create instead
  8409. of PeerMessageUtil.
  8410. (createBitfieldMessage): Use BitfieldMessage::create instead of
  8411. PeerMessageUtil.
  8412. (createKeepAliveMessage): Use KeepAliveMessage::create instead of
  8413. PeerMessageUtil.
  8414. (createHaveAllMessage): New function.
  8415. (createHaveNoneMessage): New function.
  8416. (createRejectMessage): New function.
  8417. (createAllowedFastMessage: New function.
  8418. * src/Util.h
  8419. (sha1Sum): New function.
  8420. (computeFastSet): New function.
  8421. * src/Util.cc
  8422. (sha1Sum): New function.
  8423. (computeFastSet): New function.
  8424. * src/Peer.h
  8425. (fastExtensionEnabled): New variable.
  8426. (fastSet): New variable.
  8427. (setAllBitfield): New function.
  8428. (setFastExtensionEnabled): New function.
  8429. (isFastExtensionEnabled): New function.
  8430. (addFastSetIndex): New function.
  8431. (getFastSet): New function.
  8432. (isInFastSet): New function.
  8433. (countFastSet): New function.
  8434. * src/Peer.cc
  8435. (isInFastSet): New function.
  8436. (addFastSetIndex): New function.
  8437. (setAllBitfield): New function.
  8438. * src/AbstractCommand.cc (execute): Changed the procedure of checking
  8439. sockets.
  8440. * src/PeerAbstractCommand.cc
  8441. (PeerAbstractCommand): Added the initialization for uploadLimitCheck
  8442. and uploadLimit.
  8443. (execute): Changed the procedure of checking sockets. The upload speed
  8444. checking were added.
  8445. (setUploadLimit): New function.
  8446. (setUploadLimitCheck): New function.
  8447. * src/PeerAbstractCommand.h
  8448. (setUploadLimit): New function.
  8449. (setUploadLimitCheck): New function.
  8450. (uploadLimit): New variable.
  8451. (uploadLimitCheck): New variable.
  8452. To contact a tracker regularly:
  8453. * src/TrackerWatcherCommand.h (interval): New variable.
  8454. (checkPoint): New variable.
  8455. (TrackerWatcherCommand): Added interval argument.
  8456. * src/TrackerWatcherCommand.cc
  8457. (TrackerWatcherCommand): Initialized checkPoint.
  8458. (execute): Now a tracker is contacted in every specified period.
  8459. If peer list is not needed, send request with numwant=0.
  8460. * src/TrackerUpdateCommand.cc
  8461. (execute): Updated log messages.
  8462. * src/DownloadEngine.cc
  8463. (~DownloadEngine): Removed two asserts.
  8464. (waitData): Uncommented wfds. May be a bug fix.
  8465. 2006-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8466. * src/PeerInteractionCommand.h
  8467. (checkInactiveConnection): Removed.
  8468. * src/PeerInteractionCommand.cc
  8469. (executeInternal): Removed following function calls:
  8470. detectMessageFlooding(), checkLongTimePeerChoking and
  8471. checkInactiveConnection().
  8472. (checkInactiveConnection): Removed.
  8473. (detectMessageFlooding): Removed function call to
  8474. checkInactiveConnection().
  8475. * src/PeerMessageUtil.h
  8476. (createChokeMessage): New function. Overload.
  8477. (createUnchokeMessage): New function. Overload.
  8478. (createInterestedMessage): New function. Overload.
  8479. (createNotInterestedMessage): New function. Overload.
  8480. (createHaveMessage): New function. Overload.
  8481. (createBitfieldMessage): New function. Overload.
  8482. (createRequestMessage): New function. Overload.
  8483. (createCancelMessage): New function. Overload.
  8484. (createPieceMessage): New function. Overload.
  8485. (createKeepAliveMessage): New function. Overload.
  8486. * src/PeerMessageUtil.cc
  8487. (createChokeMessage): New function. Overload.
  8488. (createUnchokeMessage): New function. Overload.
  8489. (createInterestedMessage): New function. Overload.
  8490. (createNotInterestedMessage): New function. Overload.
  8491. (createHaveMessage): New function. Overload.
  8492. (createBitfieldMessage): New function. Overload.
  8493. (createRequestMessage): New function. Overload.
  8494. (createCancelMessage): New function. Overload.
  8495. (createPieceMessage): New function. Overload.
  8496. (createKeepAliveMessage): New function. Overload.
  8497. * src/SendMessageQueue.cc
  8498. (createRequestMessage): Use PeerMessageUtil.
  8499. (createCancelMessage): Use PeerMessageUtil.
  8500. (createPieceMessage): Use PeerMessageUtil.
  8501. (createHaveMessage): Use PeerMessageUtil.
  8502. (createChokeMessage): Use PeerMessageUtil.
  8503. (createUnchokeMessage): Use PeerMessageUtil.
  8504. (createInterestedMessage): Use PeerMessageUtil.
  8505. (createNotInterestedMessage): Use PeerMessageUtil.
  8506. (createBitfieldMessage): Use PeerMessageUtil.
  8507. (createKeepAliveMessage): Use PeerMessageUtil.
  8508. * src/SendMessageQueue.h: Renamed to PeerInteraction.h
  8509. * src/SendMessageQueue.cc: Renamed to PeerInteraction.cc
  8510. * src/PeerInteraction.h: New class.
  8511. * src/PeerInteraction.cc: New class.
  8512. 2006-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8513. Each peer message has its own class.
  8514. * src/PendingMessages.h: Removed.
  8515. * src/PendingMessages.cc: Removed. The sending process was moved to
  8516. each message class.
  8517. * src/RequestSlotMan.h: Removed.
  8518. * src/RequestSlotMan.cc: Removed. All functionarities were moved to
  8519. SendMessageQueue.
  8520. * src/RequestMessage.h: New class.
  8521. * src/RequestMessage.cc: New class.
  8522. * src/CancelMessage.h: New class.
  8523. * src/CancelMessage.cc: New class.
  8524. * src/BitfieldMessage.h: New class.
  8525. * src/BitfieldMessage.cc: New class.
  8526. * src/ChokeMessage.h: New class.
  8527. * src/ChokeMessage.cc: New class.
  8528. * src/KeepAliveMessage.h: New class.
  8529. * src/KeepAliveMessage.cc: New class.
  8530. * src/PortMessage.h: New class.
  8531. * src/UnchokeMessage.h: New class.
  8532. * src/UnchokeMessage.cc: New class.
  8533. * src/PieceMessage.h: New class.
  8534. * src/PieceMessage.cc: New class.
  8535. * src/HaveMessage.h: New class.
  8536. * src/HaveMessage.cc: New class.
  8537. * src/BitfieldMessage.h: New class.
  8538. * src/BitfieldMessage.cc: New class.
  8539. * src/NotInterestedMessage.h: New class.
  8540. * src/NotInterestedMessage.cc: New class.
  8541. * src/InterestedMessage.h: New class.
  8542. * src/InterestedMessage.cc: New class.
  8543. * src/HandshakeMessage.h (sendMessageQueue): New variable.
  8544. (getSendMessageQueue): New function.
  8545. (setSendMessageQueue): New function.
  8546. * src/HandshakeMessage.cc: New class.
  8547. * src/PeerConnection.h (receiveMessage): Changed return value and
  8548. arguments.
  8549. (receiveHandshake): Changed return value and arguments.
  8550. * src/PeerConnection.cc (receiveMessage): Do not create message class
  8551. here.
  8552. (receiveHandshake): Do not create handshake class here.
  8553. * src/PeerInteractionCommand.h (peerConnection): Removed.
  8554. (piece): Removed.
  8555. (syncPiece): Removed.
  8556. (sendInterest): Removed.
  8557. (sendMessages): Removed.
  8558. (createRequestPendingMessage): Removed.
  8559. (checkPieceHash): Removed.
  8560. (erasePieceOnDisk): Removed.
  8561. (getNewPieceAndSendInterest): Removed.
  8562. (onGotNewPice): Removed.
  8563. (onGotWrongPiece): Removed.
  8564. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  8565. Removed peerConnection, piece.
  8566. (~PeerInteractionCommand): Removed peerConnection.
  8567. (executeInternal): Use sendMessageQueue instead of peerConnection.
  8568. (syncPiece): Moved to SendMessageQueue.
  8569. (decideChoking): Removed PendingMessage.
  8570. (receiveMessage): Use sendMessageQueue instead of peerConnection.
  8571. The action after receiving peer message was moved to each message
  8572. class.
  8573. (onGotNewPice): Moved to SendMessageQueue.
  8574. (onGotWrongPiece): Moved to SendMessageQueue.
  8575. (getNewPieceAndSendInterest): Moved to SendMessageQueue.
  8576. (sendInterest): Moved to SendMessageQueue.
  8577. (createRequestPendingMessage): Removed.
  8578. (sendMessages): Moved to SendMessageQueue.
  8579. (onAbort): Use SendMessageQueue::abortPiece()
  8580. (keepAlive): Use sendMessageQueue instead of peerConnection.
  8581. (beforeSocketCheck): Use sendMessageQueue instead of peerConnection.
  8582. (checkPieceHash): Moved to SendMessageQueue.
  8583. (erasePieceOnDisk): Moved to SendMessageQueue.
  8584. * src/PeerMessageUtil.h
  8585. (createBitfieldMessage): Removed.
  8586. (createHaveMessage): Changed return value and arguments.
  8587. (createBitfieldMessage): Changed return value and arguments.
  8588. (createRequestCancelMessage): Removed.
  8589. (createPieceMessage): Changed return value and arguments.
  8590. (getShortIntParam): New function.
  8591. (checkIndex): Changed arguments.
  8592. (checkBegin): Changed arguments.
  8593. (checkLength): Changed arguments.
  8594. (checkPieceOffset): Removed.
  8595. (checkRange): New function.
  8596. (checkBitfield): Changed arguments.
  8597. (createPeerMessage): Removed.
  8598. (checkIntegrity): Removed.
  8599. (createHandshakeMessage): Changed arguments.
  8600. (createChokeMessage): New function.
  8601. (createUnchokeMessage): New function.
  8602. (createInterestedMessage): New function.
  8603. (createNotInterestedMessage): New function.
  8604. (createRequestMessage): New function.
  8605. (createCancelMessage): New function.
  8606. (createPortMessage): New function.
  8607. * src/PeerMessageUtil.cc
  8608. (createBitfieldMessage): Removed.
  8609. (createHaveMessage): Changed return value and arguments.
  8610. (createBitfieldMessage): Changed return value and arguments.
  8611. (createRequestCancelMessage): Removed.
  8612. (createPieceMessage): Changed return value and arguments.
  8613. (getShortIntParam): New function.
  8614. (checkIndex): Changed arguments.
  8615. (checkBegin): Changed arguments.
  8616. (checkLength): Changed arguments.
  8617. (checkPieceOffset): Removed.
  8618. (checkRange): New function.
  8619. (checkBitfield): Changed arguments.
  8620. (createPeerMessage): Removed.
  8621. (checkIntegrity): Removed.
  8622. (createHandshakeMessage): Changed arguments.
  8623. (createChokeMessage): New function.
  8624. (createUnchokeMessage): New function.
  8625. (createInterestedMessage): New function.
  8626. (createNotInterestedMessage): New function.
  8627. (createRequestMessage): New function.
  8628. (createCancelMessage): New function.
  8629. (createPortMessage): New function.
  8630. * src/PeerMessage.h
  8631. (id): Removed.
  8632. (index): Removed.
  8633. (begin): Removed.
  8634. (length): Removed.
  8635. (bitfield): Removed.
  8636. (bitfieldLength): Removed.
  8637. (block): Removed.
  8638. (blockLength): Removed.
  8639. (inProgress): New variable.
  8640. (cuid): New variable.
  8641. (peer): New variable.
  8642. (sendMessageQueue): New variable.
  8643. (logger): New variable.
  8644. (setBitfield): Removed.
  8645. (getBitfield): Removed.
  8646. (setBlock): Removed.
  8647. (getBlock): Removed.
  8648. (getBitfieldLength): Removed.
  8649. (getBlockLength): Removed.
  8650. (isInProgress): New function.
  8651. (toString): Made pure virtual.
  8652. (check): New function.
  8653. (send): New function.
  8654. (receivedAction): New function.
  8655. (getId): Made pure virtual.
  8656. (setId): Removed.
  8657. (getIndex): Removed.
  8658. (setIndex): Removed.
  8659. (getBegin): Removed.
  8660. (setBegin): Removed.
  8661. (getLength): Removed.
  8662. (setLength): Removed.
  8663. (getCuid): New function.
  8664. (setCuid): New function.
  8665. (getPeer): New function.
  8666. (setPeer): New function.
  8667. (getSendMessageQueue): New function.
  8668. (setSendMessageQueue): New function.
  8669. (ID): Removed.
  8670. * src/PeerMessage.cc
  8671. (setBitfield): Removed.
  8672. (setBlock): Removed.
  8673. (toString): Removed.
  8674. * src/TorrentMan.h
  8675. (getPieceLength): New function.
  8676. (getPieceLength): New function.
  8677. * src/SendMessageQueue.h
  8678. (REQUEST_TIME_OUT): New definition.
  8679. (RequestSlots): New definition.
  8680. (MessageQueue): New definition.
  8681. (requestSlotMan): Removed.
  8682. (pendingMessages): Removed.
  8683. (requestSlots): New variable.
  8684. (messageQueue): New variable.
  8685. (torrentMan): New variable.
  8686. (peerConnection): New variable.
  8687. (peer): New variable.
  8688. (piece): New variable.
  8689. (getNewPieceAndSendInterest): New function.
  8690. (createPeerMessage): New function.
  8691. (createHandshakeMessage): New function.
  8692. (send): Made private.
  8693. (setPeerMessageCommonProperty): New function.
  8694. (deleteAllRequestSlot): New function.
  8695. (deleteRequestMessageInQueue): New function.
  8696. (cancelAllRequest): Made private.
  8697. (cancelAllRequest): Made private.
  8698. (countRequestSlot): Made private.
  8699. (addPendingMessage): Removed.
  8700. (deletePendingPieceMessage): Removed.
  8701. (deletePendingRequestMessage): Removed.
  8702. (addMessage): New function.
  8703. (deletePieceMessageInQueue): New function.
  8704. (deleteTimeoutRequestSlot): Changed argument.
  8705. (deleteCompletedRequestSlot): Changed argument.
  8706. (getCorrespoindingRequestSlot): Renamed to getCorrespondingRequestSlot.
  8707. (getCorrespondingRequestSlot): New function.
  8708. (countPendingMessage): Removed.
  8709. (countMessageInQueue): New function.
  8710. (getTorrentMan): New function.
  8711. (getPeerConnection): New function.
  8712. (hasDownloadPiece): New function.
  8713. (getDownloadPiece): New function.
  8714. (setDownloadPiece): New function.
  8715. (syncPiece): New function.
  8716. (sendMessages): New function.
  8717. (sendNow): New function.
  8718. (trySendNow): New function.
  8719. (abortPiece): New function.
  8720. (sendHandshake): New function.
  8721. (receiveMessage): New function.
  8722. (receiveHandshake): New function.
  8723. (createRequestMessage): New function.
  8724. (createCancelMessage): New function.
  8725. (createPieceMessage): New function.
  8726. (createHaveMessage): New function.
  8727. (createChokeMessage): New function.
  8728. (createUnchokeMessage): New function.
  8729. (createInterestedMessage): New function.
  8730. (createNotInterestedMessage): New function.
  8731. (createBitfieldMessage): New function.
  8732. (createKeepAliveMessage): New function.
  8733. * src/SendMessageQueue.cc
  8734. (SendMessageQueue): Removed requestSlotMan.
  8735. Instantiated peerConnection here.
  8736. (~SendMessageQueue): Removed requestSlotMan.
  8737. Added deletion of peerConnection and the contents of messageQueue.
  8738. (send): Updated according to the change of messageQueue.
  8739. (addPendingMessage): Renamed to addMessage.
  8740. (addMessage): New function.
  8741. (deletePendingPieceMessage): Renamed to deletePieceMessageInQueue.
  8742. (deletePieceMessageInQueue): New function.
  8743. (deletePendingRequestMessage): Renamed to deleteRequestMessageInQueue.
  8744. (deleteRequestMessageInQueue): New function.
  8745. (deleteRequestSlot): RequestSlotMan::deleteRequestSlot(...) was moved
  8746. here.
  8747. (deleteTimeoutRequestSlot): RequestSlotMan::deleteTimeoutRequestSlot
  8748. (...) was moved here.
  8749. (deleteAllRequestSlot): RequestSlotMan::deleteAllRequestSlot(...) was
  8750. moved here.
  8751. (deleteCompletedRequestSlot):
  8752. RequestSlotMan::deleteCompletedRequestSlot(...) was moved here.
  8753. (getCorrespondingRequestSlot):
  8754. RequestSlotMan::getCorrespoindingRequestSlot(...) was moved here.
  8755. And renamed to getCorrespondingRequestSlot, correcting a typo.
  8756. (countPendingMessage): Renamed to countMessageInQueue.
  8757. (countMessageInQueue): New function.
  8758. (countRequestSlot): RequestSlotMan::countRequestSlot() was moved here.
  8759. (receiveHandshake): New function.
  8760. (createHandshakeMessage): New function.
  8761. (receiveMessage): New function.
  8762. (createPeerMessage): New function.
  8763. (syncPiece): New function.
  8764. (getNewPieceAndSendInterest): New function.
  8765. (sendMessages): New function.
  8766. (sendNow): New function.
  8767. (trySendNow): New function.
  8768. (sendHandshake): New function.
  8769. (abortPiece): New function.
  8770. (getDownloadPiece): New function.
  8771. (getPeerMessageCommonProperty): New function.
  8772. (createRequestMessage): New function.
  8773. (createCancelMessage): New function.
  8774. (createPieceMessage): New function.
  8775. (createHaveMessage): New function.
  8776. (createChokeMessage): New function.
  8777. (createUnchokeMessage): New function.
  8778. (createInterestedMessage): New function.
  8779. (createNotInterestedMessage): New function.
  8780. (createBitfieldMessage): New function.
  8781. (createKeepAliveMessage): New function.
  8782. To add simple Content-Disposition support:
  8783. * src/HttpResponseCommand.h (determinFilename): New function.
  8784. * src/HttpResponseCommand.cc (executeInternal):
  8785. Use determinFilename(headers) instead of req->getFile() when comparing
  8786. filename.
  8787. (determinFilename): New function.
  8788. (handleDefaultEncoding): Use determinFilename(headers) instead of
  8789. req->getFile().
  8790. (handleOtherEncoding): Use determinFilename(headers) instead of
  8791. req->getFile().
  8792. * src/Util.h (getContentDispositionFilename): New function.
  8793. * src/Util.cc (getContentDispositionFilename): New function.
  8794. * src/LogFactory.h (release): New function.
  8795. * src/LogFactory.cc (release): New function.
  8796. To fix a bug that causes out-of-bound exception when HTTP status
  8797. line is wrong:
  8798. * src/HttpConnection.cc (receiveResponse): Added a check for header
  8799. size.
  8800. * src/common.h (Deleter): New class.
  8801. * src/SegmentMan.cc
  8802. (~SegmentMan): Added deletion of splitter and diskWriter.
  8803. * src/DownloadEngine.h
  8804. (Commands): Use deque.
  8805. (clearQueue): New function.
  8806. * src/DownloadEngine.cc
  8807. (~DownloadEngine): Added deletion of segmentMan.
  8808. (cleanQueue): New function.
  8809. * src/TorrentDownloadEngine.h
  8810. (TorrentDownloadEngine): The implementation was moved to
  8811. TorrentDownloadEngine.cc.
  8812. (~TorrentDownloadEngine): The implementation was moved to
  8813. TorrentDownloadEngine.cc.
  8814. * src/TorrentDownloadEngine.cc
  8815. (~TorrentDownloadEngine): Added deletion of torrentMan.
  8816. * src/main.cc
  8817. (clearRequest): Removed.
  8818. (handler): Added deletion of e.
  8819. (torrentHandler): Added deletion of te.
  8820. (main): Do not share splitter.
  8821. Use Deleter instead of clearRequest.
  8822. Deletion of classes were updated.
  8823. 2006-05-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8824. * src/main.cc (main): Fixed typo.
  8825. * src/message.h: Fixed typo.
  8826. * po/de.po: Added German translation, thanks to Hermann J. Beckers.
  8827. 2006-04-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8828. To add --select-file command-line option:
  8829. * src/Util.cc
  8830. (unfoldRange): New function.
  8831. (getNum): New function.
  8832. (unfoldSubRange): New function
  8833. * src/main.cc
  8834. (showUsage): Added help message.
  8835. (main): Added --select-file command-line option. Updated the layout of
  8836. file listing.
  8837. * src/common.h
  8838. (Integers): New definition.
  8839. * src/SocketCore.cc
  8840. (writeData): Removed timeout argument.
  8841. (readData): Removed timeout argument.
  8842. (peekData): Removed timeout argument.
  8843. * src/Socket.cc
  8844. (writeData): Removed timeout argument.
  8845. (readData): Removed timeout argument.
  8846. (peekData): Removed timeout argument.
  8847. * Release 0.4.1
  8848. 2006-04-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8849. To deploy upload rate based choking algorithm:
  8850. * src/PeerInteractionCommand.cc
  8851. (PeerInteractionCommand): Add peer to TorrentMan::activePeers to track
  8852. peer currently used.
  8853. (decideChoking): Deleted the choke/unchoke decision algorithm when
  8854. download completes. Simplified.
  8855. (receiveMessage): Updated.
  8856. * src/TorrentMan.h
  8857. (activePeers): New variable.
  8858. (addActivePeer): New function.
  8859. (getActivePeers): New function.
  8860. (deleteActivePeer): New function.
  8861. * src/TorrentMan.cc
  8862. (addPeer): deleteOldErrorPeers is moved to the begining of the function
  8863. * src/PeerAbstractCommand.cc
  8864. (onAbort): Use peer->resetStatus().
  8865. * src/main.cc
  8866. (PeerChokeCommand.h): Included.
  8867. (main): Added the instance of ChokingCommand to the command queue.
  8868. * src/Peer.h
  8869. (amChoking): Renamed from amChocking
  8870. (chokingRequired): New variable.
  8871. (optUnchoking): New variable.
  8872. (deltaUpload): New variable.
  8873. (deltaDownload): New variable.
  8874. (addDeltaUpload): New function.
  8875. (resetDeltaUpload): New function.
  8876. (addDeltaDownload): New function.
  8877. (resetDeltaDownload): New function.
  8878. (addPeerUpload): Added a call to addDeltaUpload.
  8879. (addPeerDownload): Added a call to addDeltaDownload.
  8880. * src/Peer.cc
  8881. (shouldBeChoking): Renamed from shouldChoke.
  8882. (resetStatus): New function.
  8883. * src/PeerChokeCommand.h: New class.
  8884. * src/PeerChokeCommand.cc: New class.
  8885. To add lazy upload speed limiter:
  8886. * src/TorrentConsoleDownloadEngine.h: Moved the variables for
  8887. statistics calculation to TorrentDownloadEngine.
  8888. * src/TorrentConsoleDownloadEngine.cc
  8889. (sendStatistics): Renamed from printStatistics.
  8890. (initStatistics): Removed. Moved to TorrentDownloadEngine.
  8891. (calculateSpeed): Removed. Moved to TorrentDownloadEngine.
  8892. (calculateStatistics): Removed. Moved to TorrentDownloadEngine.
  8893. * src/TorrentDownloadEngine.h: Added the variables for statistics
  8894. calculation.
  8895. (sendStatistics): New function as pure virtual function.
  8896. (getUploadSpeed): New function.
  8897. * src/TorrentDownloadEngine.cc
  8898. (initStatistics): New function.
  8899. (calculateSpeed): New function.
  8900. (calculateStatistics): New function.
  8901. * src/SendMessageQueue.h
  8902. (uploadLength): New variable.
  8903. (send): Added an argument.
  8904. (setUploadLimit): New function.
  8905. (getUploadLimit): New function.
  8906. * src/SendMessageQueue.cc
  8907. (send): Added upload speed limiter.
  8908. * src/prefs.h
  8909. (PREF_UPLOAD_LIMIT): New definition.
  8910. * src/PeerInteractionCommand.cc
  8911. (PeerInteractionCommand): Set upload speed limit to sendMessageQueue.
  8912. * src/main.cc
  8913. (main): Added --upload-limit option
  8914. For bug fixes:
  8915. * src/main.cc
  8916. (showUsage): Corrected --listen-port help
  8917. Other changes:
  8918. * src/TorrentMan.cc
  8919. (getPeer): Return nullPeer if connection is grather than
  8920. MAX_PEER_UPDATE(15) in order to leave space for incoming peers.
  8921. 2006-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8922. To add some useful information to the exception message:
  8923. * src/SocketCore.cc : Updated messages.
  8924. * src/SegmentMan.cc :
  8925. * src/TorrentMan.cc : Updated messages.
  8926. * src/MultiDiskWriter.cc : Updated messages.
  8927. * src/Util.cc : Updated messages.
  8928. * src/AbstractDiskWriter.cc : Updated messages.
  8929. * src/PreAllocationDiskWriter.cc : Updated messages.
  8930. * src/message.cc : Added new messages. Updated some messages.
  8931. * src/TrackerWatcherCommand.h (MIN_PEERS): New definition.
  8932. * src/TrackerWatcherCommand.cc (execute): Use MIN_PEERS.
  8933. Updated threshold from 30 to 15.
  8934. * src/AbstractDiskWriter.h (filename): New variable.
  8935. * src/AbstractDiskWriter.cc (openExistingFile): Assigned filename.
  8936. (createFile): Assigned filename.
  8937. * src/main.cc: Updated the help message for http-auth-scheme.
  8938. * Release 0.4.0
  8939. 2006-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8940. To add TrackerUpdateCommand with which replaces
  8941. CompactTrackerResponseProcessor:
  8942. * src/TrackerWatcherCommand.h (req): Removed.
  8943. * src/TrackerWatcherCommand.cc (execute): Send a request to tracker
  8944. if the number of peer connections are less than 30.
  8945. * src/ByteArrayDiskWriter.h (readData): Implemented.
  8946. * src/SegmentMan.h (diskWriter): New function.
  8947. * src/SegmentMan.cc (init): Added a call to diskWriter->closeFile()
  8948. * src/main.cc : Removed #include "CompactTrackerResponseProcessor.h"
  8949. (main): Use TrackerUpdateCommand.
  8950. * src/TorrentMan.h (CompactTrackerResponseProcessor): Removed.
  8951. (req): New variable.
  8952. (setTrackerResponseProcessor): Removed.
  8953. (getTrackerResponseProcessor): Removed.
  8954. (processTrackerResponse): Removed.
  8955. * src/DownloadEngine.h (diskWriter): Removed.
  8956. * src/TorrentDownloadEngine.cc (afterEachIteration): Removed a call
  8957. to torrentMan->processTrackerResponse().
  8958. To add Util::expandBuffer:
  8959. * src/ByteArrayDiskWriter.h (expandBuffer): Removed.
  8960. * src/ByteArrayDiskWriter.cc (writeData): Use Util::expandBuffer().
  8961. * src/Util.h (expandBuffer): New function.
  8962. To fix the bug that causes segmentation fault when "-l ." is specified
  8963. in command-line option:
  8964. * src/SimpleLogger.h (SimpleLogger): Removed "filename" argument.
  8965. (openFile): New function.
  8966. (closeFile): New function.
  8967. * src/SimpleLogger.cc (SimpleLogger): Removed fopen.
  8968. (~SimpleLogger): Call closeFile();
  8969. * src/LogFactory.cc (getInstance): Added a call to slogger->openFile().
  8970. * src/main.cc (main): Added a check to see logger is configured
  8971. properly.
  8972. To enable HTTP authentication without specifying "--http-auth-scheme"
  8973. * src/prefs.h (PREF_HTTP_AUTH_ENABLED): New definition.
  8974. * src/HttpConnection.cc (createRequest): Send Authorization header
  8975. if PREF_HTTP_AUTH_ENABLED == V_TRUE.
  8976. * src/main.cc (main): Preset PREF_HTTP_AUTH_SCHEME to V_TRUE
  8977. If "--http-user" is specified, set PREF_HTTP_AUTH_ENABLED to V_TRUE
  8978. * src/Peer.cc (shouldChoke): Updated algorithm.
  8979. * src/message.h (EX_AUTH_FAILED): New definition.
  8980. (EX_FILE_OPEN): New definition.
  8981. * src/HttpResponseCommand.cc (checkResponse): Throw DlAbortEx
  8982. if status == 401.
  8983. (handleDefaultEncoding): Added a call to diskWriter->initAndOpenFile()
  8984. if req->isTorrent == true.
  8985. * src/main.cc (handler): Removed the check to see e->diskWriter != NULL
  8986. (torrentHandler): Removed the check to see diskAdaptor != NULL.
  8987. * src/AbstractDiskWriter.cc (openExistingFile): Updated messsage.
  8988. (createFile): Updated message.
  8989. 2006-04-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8990. To add a readout of estimated remaining time to normal HTTP/FTP
  8991. downloads:
  8992. * src/ConsoleDownloadEngine.h (startup): New variable.
  8993. (startupLength): New variable.
  8994. (isStartupLengthSet): New variable.
  8995. (avgSpeed): New variable.
  8996. (eta): New variable.
  8997. * src/ConsoleDownloadEngine.cc (sendStatistics): Added a readout of
  8998. estimated remaining time.
  8999. (initStatistics): Initialized newly added variables.
  9000. (calculateStatistics): Calculate average speed and estimated remaining
  9001. time.
  9002. To decouple TorrentDownloadEngine from HttpResponseCommand:
  9003. * src/TrackerDownloadCommand.h: Removed.
  9004. * src/TrackerDownloadCommand.cc: Removed.
  9005. * src/TrackerInitCommand.h: Removed.
  9006. * src/TrackerInitCommand.cc: Removed.
  9007. * src/TrackerUpdateCommand.h: Removed.
  9008. * src/TrackerUpdateCommand.cc: Removed.
  9009. * src/TrackerWatcherCommand.cc (execute): The construction of request
  9010. url written in TrackerInitCommand was moved here. Do not create
  9011. tracker request command if torrentMan->trackers != 0.
  9012. * src/CompactTrackerResponseProcessor.h: New class.
  9013. * src/CompactTrackerResponseProcessor.cc: New class.
  9014. * src/message.h (MSG_TRACKER_WARNING_MESSAGE): Updated.
  9015. * src/HttpResponseCommand.cc (createHttpDownloadCommand):
  9016. Decoupled TorrentDownloadEngine from this.
  9017. * src/SegmentMan.h (init): New function.
  9018. * src/SegmentMan.cc (init): New function.
  9019. * src/TorrentMan.h (responseProcessor): New variable.
  9020. (trackers): New variable.
  9021. (setTrackerResponseProcessor): New function.
  9022. (getTrackerResponseProcessor): New function.
  9023. (processTrackerResponse): New function.
  9024. * src/TorrentMan.cc (Constructor): Initialized new variable trackers.
  9025. (processTrackerResponse): New function.
  9026. * src/main.cc (main): Use ByteArrayDiskWriter and
  9027. CompactTrackerResponseProcessor.
  9028. * src/TorrentDownloadEngine.cc (afterEachIteration): Call torrentMan->
  9029. processTrackerResponse().
  9030. * src/TorrentConsoleDownloadEngine.cc (printStatistics): Updated a
  9031. readout.
  9032. * src/TorrentDownloadEngine.cc (afterEachIteration): Added log message
  9033. which indicates download has completed.
  9034. * src/AbstractDiskWriter.cc (Destructor): fd >= 0, not fd >0
  9035. (closeFile): fd >= 0, not fd > 0
  9036. * src/main.cc (main): Added short cut for show-files.
  9037. Added short cut for torrent-file.
  9038. Added new command-line option listen-port.
  9039. Updated i18n messages.
  9040. 2006-04-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9041. To add LogFactory which creates singleton logger:
  9042. * src/LogFactory.h: New class.
  9043. * src/LogFactory.cc: New class.
  9044. * src/Command.h (logger): New variable.
  9045. (Constructor): Use LogFactory.
  9046. * src/AbstractCommand.cc: Use Command::logger
  9047. * src/PeerConnection.cc (Constructor): Deleted the argument logger.
  9048. Use LogFactory.
  9049. * src/SegmentSplitter.h : Made logger protected.
  9050. * src/SegmentSplitter.cc (Constructor): Use LogFactory.
  9051. * src/SegmentMan.cc (Constructor): Use LogFactory.
  9052. * src/DownloadEngine.h : Made logger protected.
  9053. * src/DownloadEngine.cc (Constructor): Use LogFactory.
  9054. * src/PeerInteractionCommand.cc : Use Command::logger.
  9055. * src/HttpResponseCommand.cc : Use Command::logger.
  9056. * src/SegmentMan.h : Made logger private.
  9057. * src/TorrentMan.h : Made logger private.
  9058. * src/TorrentMan.cc : Use LogFactory.
  9059. * src/FtpNegotiateCommand.cc : Use Command::logger.
  9060. * src/HttpConnection.h (Constructor): Deleted the argument logger.
  9061. * src/HttpConnection.cc (Constructor): Deleted the argument logger.
  9062. Use LogFactory.
  9063. * src/FtpConnection.h (Constructor): Deleted the argument logger.
  9064. * src/FtpConnection.cc (Constructor): Deleted the argument logger.
  9065. Use LogFactory.
  9066. * src/DownloadCommand.cc : Use Command::logger.
  9067. * src/PeerAbstractCommand.cc : Use Command::logger.
  9068. * src/PeerListenCommand.cc : Use Command::logger.
  9069. * src/PeerInitiateConnectionCommand.cc : Use Command::logger.
  9070. * src/HttpInitiateConnectionCommand.cc : Use Command::logger.
  9071. * src/FtpInitiateConnectionCommand.cc : Use Command::logger.
  9072. * src/TrackerWatcherCommand.cc : Use Command::logger.
  9073. * src/TrackerUpdateCommand.cc : Use Command::logger.
  9074. * src/TrackerDownloadCommand.cc : Use Command::logger.
  9075. * src/RequestSlotMan.cc (Constructor): Deleted the argument logger.
  9076. Use LogFactory.
  9077. * src/SendMessageQueue.h (Constructor): Deleted the argument logger.
  9078. * src/SendMessageQueue.cc (Constructor): Deleted the argument logger.
  9079. Use LogFactory.
  9080. * src/main.cc (main): Use LogFactory.
  9081. * src/DiskAdaptor.h (logger): New variable.
  9082. * src/DiskAdaptor.cc (Constructor): Use LogFactory.
  9083. * src/CopyDiskAdaptor.cc (fixFilename): Added a log message.
  9084. 2006-04-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9085. * src/TrackerInitCommand.cc (TrackerInitCommand): Added a "key"
  9086. parameter to a tracker request.
  9087. * src/TorrentMan.cc (readFileEntryFromMetaInfoFile): Bug fix.
  9088. * src/TrackerWatcherCommand.cc (execute): Call req->resetTryCount().
  9089. * src/main.cc (setSignalHander): New function.
  9090. (main): Added a handler for SIGTERM.
  9091. (handler): Updated message.
  9092. (torrentHandler): Updated message.
  9093. 2006-04-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9094. * src/TorrentConsoleDownloadEngine.cc
  9095. (onPartialDownloadingCompletes): Renamed as
  9096. onSelectiveDownloadingCompletes.
  9097. (onSelectiveDownloadingCompletes): Updated message.
  9098. To add DiskAdaptor which abstract DiskWriter family:
  9099. * src/PeerConnection.cc: Use diskAdaptor instead of diskWriter.
  9100. * src/PeerInteractionCommand.cc: Use diskAdaptor instead of diskWriter.
  9101. * src/BitfieldMan.cc (isAllBitSet): bug fix.
  9102. * src/TorrentMan.cc : Included CopyDiskAdaptor.h, DirectDiskAdaptor.h,
  9103. MultiDiskAdaptor.h.
  9104. (readFileEntry): Changed its arguments.
  9105. (setup): setupDiskWriter is merged into this function.
  9106. (setupDiskWriter): Removed.
  9107. (setFileFilter): New function.
  9108. (readFileEntryFromMetaInfoFile): Updated according to the changes
  9109. made in readFileEntry.
  9110. (getFilePath): Removed.
  9111. (getTempFilePath): Removed.
  9112. (getSegmentFilePath): Updated due to the removal of getFilePath.
  9113. (fixFilename): Removed.
  9114. (copySingleFile): Removed.
  9115. (splitMultiFile): Removed.
  9116. (deleteTempFile): Removed.
  9117. (setFileEntriesToDownload): Removed.
  9118. (isPartialDownloadingMode): Renamed as isSelectiveDownloadingMode.
  9119. (isSelectiveDownloadingMode): New function.
  9120. (setAllMultiFileRequestedState): Removed.
  9121. (finishPartialDownloadingMode): Renamed as
  9122. finishSelectiveDownloadingMode.
  9123. (finishSelectiveDownloadingMode): New function.
  9124. (getPartialTotalLength): Renamed as getSelectedTotalLength.
  9125. (getSelectedTotalLength): New function.
  9126. (onDownloadComplete): Use diskAdaptor.
  9127. * src/MultiDiskWriter.cc (Constructor): Added the argument pieceLength
  9128. (Range): Removed.
  9129. (setMultiFileEntries): Renamed as setFileEntries.
  9130. (setFileEntries): New function.
  9131. * src/MultiDiskWriter.h [DiskWriterEntry](enabled): Removed.
  9132. (pieceLength): New variable.
  9133. * src/main.cc (printDownloadCompeleteMessage): New function.
  9134. (torrentHandler): Use diskAdaptor instead of diskWriter.
  9135. (main): Renamed torrent-show-files to show-files.
  9136. Rewritten file contents listing.
  9137. * src/TorrentMan.h (FileEntry): Removed.
  9138. (multiFileTopDir): Removed.
  9139. (multiFileEntries): Removed.
  9140. (diskWriter): Removed.
  9141. (diskAdaptor): New variable.
  9142. * src/DefaultDiskWriter.h (totalLength): New variable.
  9143. * src/DefaultDiskWriter.cc (initAndOpenFile): Added ftruncate.
  9144. * src/TorrentDownloadEngine.cc (onEndOfRun): Use diskAdaptor instead of
  9145. diskWriter.
  9146. * src/TorrentConsoleDownloadEngine.h
  9147. (partialDownloadLengthDiff): Renamed as selectedDownloadLengthDiff.
  9148. (partialTotalLength): Renamed as selectedTotalLength.
  9149. * src/AbstractDiskWriter.cc (openFile): If file exists, call
  9150. openExistingFile, otherwise call initAndOpenFile.
  9151. (closeFile): fd > 0, not fd != 0.
  9152. * src/DirectDiskAdaptor.h: New class.
  9153. * src/DirectDiskAdaptor.cc: New class.
  9154. * src/MultiDiskAdaptor.h: New class.
  9155. * src/MultiDiskAdaptor.cc: New class.
  9156. * src/CopyDiskAdaptor.h: New class.
  9157. * src/CopyDiskAdaptor.cc: New class.
  9158. * src/DiskAdaptor.h: New class.
  9159. * src/DiskAdaptor.cc: New class.
  9160. * src/prefs.h (PREF_TORRENT_SHOW_FILES): Renamed as PREF_SHOW_FILES
  9161. (PREF_SHOW_FILES): New definition.
  9162. 2006-04-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9163. To add the ability to download multi torrent into respective files
  9164. directly:
  9165. * src/DiskWriter.h (openFile): New function.
  9166. (seek): Removed.
  9167. * src/MultiDiskWriter.h: New class.
  9168. * src/MultiDiskWriter.cc: New class.
  9169. * src/AbstractDiskWriter.h (seek): Changed its scope from public to
  9170. protected.
  9171. (openFile): New function.
  9172. * src/AbstractDiskWriter.cc (openFile): New function.
  9173. * src/prefs.h (V_FALSE): New definition.
  9174. (PREF_DIRECT_FILE_MAPPING): New definition.
  9175. * src/TorrentMan.h (setupDiskWriter): New function.
  9176. (setAllMultiFileRequestedState): New function.
  9177. (onDownloadComplete): New function.
  9178. * src/TorrentMan.cc : Included MultiDiskWriter.h
  9179. (setupDiskWriter): New function.
  9180. (getFilePath): Updated.
  9181. (getTempFilePath): Updated.
  9182. (getSegmentFilePath): Updated.
  9183. (fixFilename): Updated.
  9184. (deleteTempFile): Updated.
  9185. (setAllMultiFileRequestedState): New function.
  9186. (setFileEntriesToDownload): Use setAllMultiFileRequestedState().
  9187. (finishPartialDownloadingMode): Reset requested flags.
  9188. (onDownloadComplete): New function.
  9189. * src/main.cc: Added --direct-file-mapping option.
  9190. Use TorrentMan::setupDiskWriter().
  9191. * src/TorrentDownloadEngine.cc (afterEachIteration): Use TorrentMan::
  9192. onDownloadComplete().
  9193. To fix ETA bug:
  9194. * src/Util.h (difftvsec): New function.
  9195. * src/Util.cc (difftvsec): New function.
  9196. * src/TorrentConsoleDownloadEngine.cc (calculateSpeed): Use int for the
  9197. type of "elapsed" instead of long long int.
  9198. (calculateStatistics): Use Util::difftvsec instead of Util::difftv.
  9199. The updates of statistics takes place every 1 seconds.
  9200. * src/TorrentConsoleDownloadEngine.h (lastElapsed): Changed its type.
  9201. (calculateSpeed): Changed its argument signature.
  9202. * src/PeerMessage.cc (toString): Fixed message.
  9203. 2006-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9204. To print ETA:
  9205. * src/TorrentDownloadEngine.cc (afterEachIteration): Added download
  9206. completion handling when dealing with
  9207. TorrentMan::isPartialDownloadingMode() == true.
  9208. * src/TorrentDownloadEngine.h (onPartialDownloadingCompletes):
  9209. New function.
  9210. * src/TorrentConsoleDownloadEngine.h (startup): New variable.
  9211. (sessionDownloadLength): New variable.
  9212. (avgSpeed): New variable.
  9213. (eta): New variable.
  9214. * src/TorrentConsoleDownloadEngine.cc (initStatistics): Initialized
  9215. new variables: eta, avgSpeed, startup.
  9216. (calculateSpeed): Calculate average speed and ETA.
  9217. (printStatistics): Added ETA.
  9218. * src/Util.h (secfmt): New function.
  9219. * src/Util.cc (secfmt): New function.
  9220. 2006-04-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9221. To detect "keep alive" flooding:
  9222. * src/PeerInteractionCommand.h (keepAliveCount): New variable
  9223. * src/PeerInteractionCommand.cc (Constructor): Initialized new
  9224. variable: keepAliveCount.
  9225. (detectMessageFlooding): Added "keep alive" flooding detection.
  9226. (receiveMessage): Increase keepAliveCount when "keep alive" message
  9227. received.
  9228. To add the ability to download only specified files in multi-file
  9229. torrent:
  9230. * src/BitfieldMan.h (filterBitfield): New variable.
  9231. (filterEnabled): New variable.
  9232. (setFilterBit): New function.
  9233. (enableFilter): New function.
  9234. (disableFilter): New function.
  9235. (isFilterEnabled): New function.
  9236. (getFilteredTotalLength): New function.
  9237. (getCompletedLength): New function.
  9238. * src/BitfieldMan.cc (Constructor): Initialized new variable:
  9239. filterBitfield, filterEnabled.
  9240. (CopyConstructor): Added filterBitfield and filterEnabled.
  9241. (operator==): Added filterBitfield and filterEnabled.
  9242. (Destructor): Added filterBitfield.
  9243. (getMissingIndex): Use filterBitfield.
  9244. (getMissingUnusedIndex): Use filterBitfield.
  9245. (getFirstMissingUnusedIndex): Use filterBitfield.
  9246. (getFirstMissingUnusedIndex): Use filterBitfield.
  9247. (getAllMissingIndexes): Use filterBitfield.
  9248. (countMissingBlock): Use filterBitfield.
  9249. (countBlock): Use filterBitfield.
  9250. (setBitInternal): Added new argument on.
  9251. (setUseBit): Use setBitInternal.
  9252. (unsetUseBit): Use setBitInternal.
  9253. (setBit): Use setBitInternal.
  9254. (unsetBit): Use setBitInternal.
  9255. (isAllBitSet): Use filterBitfield.
  9256. (setFilterBit): New function.
  9257. (addFilter): New function.
  9258. (enableFilter): New function.
  9259. (disableFilter): New function.
  9260. (clearFilter): New function.
  9261. (isFilterEnabled): New function.
  9262. (getFilteredTotalLength): New function.
  9263. (getCompletedLength): New function.
  9264. * src/TorrentMan.h [FileEntry](Constructor): Updated signature.
  9265. Initalized newly added variables.
  9266. [FileEntry](offset): New variable.
  9267. [FileEntry](extracted): New variable.
  9268. [FileEntry](requested): New variable.
  9269. (readFileEntry): New function.
  9270. (option): New variable.
  9271. (splitMultiFile): Removed const qualifier.
  9272. (fixFilename): Removed const qualifier.
  9273. (readFileEntryFromMetaInfoFile): New function.
  9274. (finishPartialDownloadingMode): New function.
  9275. (isPartialDownloadingMode): New function.
  9276. (setFileEntriesToDownload): New function.
  9277. (getCompletedLength): New function.
  9278. (getPartialTotalLength): New function.
  9279. * src/TorrentMan.cc (readFileEntry): New function.
  9280. (setup): Use readFileEntry. If no-preallocation option is specified,
  9281. use DefaultDiskWriter.
  9282. (readFileEntryFromMetaInfoFile): New function.
  9283. (fixFilename): Removed const qualifier.
  9284. (splitMultiFile): Removed const qualifier.
  9285. (setFileEntriesToDownload): New function.
  9286. (isPartialDownloadingMode): New function.
  9287. (finishPartialDownloadingMode): New function.
  9288. (getCompletedLength): New function.
  9289. (getPartialTotalLength): New function.
  9290. * src/TorrentConsoleDownloadEngine.h (partialDownloadLengthDiff):
  9291. New variable.
  9292. (partialTotalLength): New variable.
  9293. (downloadLength): New variable.
  9294. (totalLength): New variable.
  9295. * src/TorrentConsoleDownloadEngine.cc (onPartialDownloadingCompletes):
  9296. Added log.
  9297. (initStatistics): Initialized new variables: partialDownloadLengthDiff,
  9298. partialTotalLength, downloadLength, totalLength.
  9299. (calculate): Calculate downloadLength and totalLength.
  9300. * src/prefs.h :New definition PREF_NO_PREALLOCATION
  9301. * src/main.cc (addCommand): Changed argument signature.
  9302. (main): Added new variable: args. Added new option "torrent-show-files"
  9303. "no-preallocation". Usage is not updated yet.
  9304. 2006-04-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9305. * src/PeerMessage.cc (setBitfield): Fixed invalid memory de-allocation.
  9306. 2006-04-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9307. Attempt to add the ability to listing file entries in a .torrent file.
  9308. This feature is not yet complete.
  9309. * src/prefs.h (PREF_TORRENT_SHOW_FILES): New definition
  9310. * src/TorrentMan.cc (getMultiFileEntries): New function.
  9311. (getName): New function.
  9312. * src/TorrentMan.h (getMultiFileEntries): New function.
  9313. (getName): New function.
  9314. * src/main.cc (main): Use above 2 funtion.
  9315. * Release 0.3.2
  9316. 2006-03-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9317. * src/PeerInteractionCommand.cc (checkInactiveConnection): New function
  9318. (detectMessageFlooding): Updated threshold value.
  9319. (checkLongTimePeerChoking): Updated timeout value.
  9320. (getNewPieceAndSendInterest): Added debug log.
  9321. * src/PeerInteractionCommand.h (checkInactiveConnection): New function
  9322. * src/TorrentMan.cc (deleteOldErrorPeers): Updated.
  9323. (getPeer): Updated.
  9324. * src/TorrentMan.h: Added MAX_PEER_ERROR.
  9325. * src/PeerAbstractCommand.cc (onAbort): Increment error counter.
  9326. * src/PeerListenCommand.cc (execute): Close connection if incoming peer
  9327. is localhost.
  9328. * src/main.cc (main): Updated PREF_PEER_CONNECTION_TIMEOUT to 60.
  9329. * src/PendingMessage.cc (processMessage): Not to send piece message
  9330. if peer is not interested in the pieces localhost has.
  9331. * src/Peer.cc (shouldChoke): Updated.
  9332. * src/SendMessageQueue.cc (cancelAllRequest): Fixed.
  9333. * src/Util.cc (isPowerOf): New function.
  9334. * src/Util.h (isPowerOf): New function.
  9335. * src/PeerMessageUtil.cc (checkLength): Added a check for length
  9336. whether or not it is power of 2.
  9337. 2006-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9338. Added new class SendMessageQueue that includes PendingMessages and
  9339. RequestSlotMan.
  9340. * src/SendMessageQueue.h: New class.
  9341. * src/SendMessageQueue.cc: New class.
  9342. * src/PendingMessage.h: Added new member variable blockIndex and its
  9343. accessors.
  9344. (createRequestMessage): Updated.
  9345. * src/PendingMessage.cc (createRequestMessage): Updated.
  9346. * src/PeerInteractionCommand.cc (executeInternal): Updated with
  9347. SendMessageQueue.
  9348. (checkLongTimePeerChoking): Updated with SendMessageQueue.
  9349. (receiveMessage): Updated with SendMessageQueue.
  9350. (deletePendingPieceMessage): Removed.
  9351. (getNewPieceAndSendInterest): Updated with SendMessageQueue.
  9352. (sendInterest): Updated with SendMessageQueue.
  9353. (createRequestPendingMessage): Updated with SendMessageQueue.
  9354. (sendMessages): Updated with SendMessageQueue.
  9355. (onAbort): Updated with SendMessageQueue.
  9356. (keepAlive): Updated with SendMessageQueue.
  9357. (beforeSocketCheck): Updated SendMessageQueue.
  9358. * src/PeerInteractionCommand (sendMessages): Shuffle
  9359. missingBLockIndexes before using it.
  9360. Added its own timeout for peer connection.
  9361. * src/PeerAbstractCommand.h: Added member variable timeout and its
  9362. setter.
  9363. * src/prefs.h: Added PREF_PEER_CONNECTION_TIMEOUT.
  9364. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  9365. Added setTimeout() call.
  9366. (executeInternal): Added setTimeout() call.
  9367. * src/PeerAbstractCommand.cc (PeerAbstractCommand):
  9368. Added timeout.
  9369. (isTimeoutDetected): Updated.
  9370. * src/main.cc (main): Added PREF_PEER_CONNECTION_TIMEOUT entry to
  9371. option.
  9372. Added *simple* message flooding checker.
  9373. * src/PeerInteractionCommand.cc (executeInternal):
  9374. Added detectMessageFlooding() call.
  9375. (detectMessageFlooding): New function.
  9376. (receiveMessage): Count up CHOKE, UNCHOKE, HAVE message.
  9377. (beforeSocketCheck): Added detectMessageFlooding() call.
  9378. * src/PeerInteractionCommand.h: Added sendMessageQueue,
  9379. chokeUnchokeCount, haveCount, detectMessageFlooding().
  9380. Removed deletePendingPieceMessage(), getRequestSlot(),
  9381. deleteRequestSlot(), deleteAllRequestSlot().
  9382. * src/PeerInteractionCommand.cc (beforeSocketCheck):
  9383. Added checkLongTimePeerChoking() call.
  9384. * src/RequestSlotMan.h: Renamed deleteTimeoutRequestSlot().
  9385. * src/TorrentMan.cc (addPeer): Delete at most MAX_PEER_LIST_SIZE peers
  9386. if duplicate == false.
  9387. The parameter "uploaded" and "downloaded" in the tracker request are
  9388. the size since the client sent the "started" event to the tracker.
  9389. * src/TorrentMan.cc (setup): Assigned saved downloaded Size and
  9390. uploaded size to preDownloadedSize, preUploadedSize respectively.
  9391. * src/TorrentMan.h: Added preDownloadedSize, preUploadedSize,
  9392. getSessionDownloadedSize(), getSessionUploadedSize().
  9393. * src/TrackerInitCommand.cc (execute): Use getSessionDownloadedSize(),
  9394. getSessionUploadedSize() instead of getDownloadedSize(),
  9395. getUploadedSize().
  9396. * src/PendingMessage.cc (processMessage): Do not send request message
  9397. if the peer is choking the client.
  9398. * src/TrackerUpdateCommand.cc (execute): Check wtheher minInterval is
  9399. less than interval.
  9400. 2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9401. * configure.in: Added gnutls support. Added several CPP macros.
  9402. * m4/openssl.m4: Added.
  9403. * src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
  9404. readData(), peekData(). Added gnutls support.
  9405. * src/HttpDownloadCommand.cc: Removed SleepCommand.h
  9406. * src/TrackerWatcherCommand.{h,cc}: Added. This command creates
  9407. TrackerInitCommand periodicaly(TorrentMan::minInterval).
  9408. * src/TorrentMan.cc: Remove downloadedSize == 0 check from save().
  9409. Instead, added a check for whether setup method has executed
  9410. successfully.
  9411. * src/TorrentMan.h: Added member vaiable setupComplete. Updated
  9412. DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to 300.
  9413. * src/Makefile.am: Updated.
  9414. * src/messageDigest.h: Added. This is a macro calculating SHA1 digest
  9415. using whether OpenSSL or gcrypt, depending on the result of configure
  9416. script.
  9417. * src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by using
  9418. messageDigest.h.
  9419. * src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
  9420. * src/PeerListenCommand.cc: Added log about port binded successfully.
  9421. Fixed memory leak.
  9422. * src/main.cc: Added gnutls support. Replaced LIB_SSL with
  9423. ENABLE_BITTORRENT where they are not related to OpenSSL but BitTorrent.
  9424. Removed instantiation of TrackerInitCommand. Instead,
  9425. TrackerWatcherCommand is instantiated and pushed to the command queue.
  9426. * src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL with
  9427. ENABLE_SSL.
  9428. * src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
  9429. * src/RequestSlotMan.cc (deleteCompletedRequestSlot):
  9430. If a piece is already acquired by another command, delete the request
  9431. slots for the piece.
  9432. * src/TrackerUpdateCommand.cc (execute):
  9433. Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to warn.
  9434. Added a check whether peer list is null.
  9435. Fixed the bug that causes sending completed event to the tracker
  9436. several times.
  9437. * src/TrackerInitCommand.cc (execute):
  9438. Fixed the bug that causes sending completed event to the tracker
  9439. several times.
  9440. * src/AbstractDiskWriter.{h,cc}: Removed direct dependency on OpenSSL
  9441. by using messageDigest.h.
  9442. 2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9443. * PeerConnection.cc: Replaced log message "keep-alive" with
  9444. "keep alive".
  9445. * PeerInteractionCommand.{h,cc}: Close connection if peer is choking
  9446. localhost long time.
  9447. * TorrentMan.cc: When adding new peer with duplicate = true, if the
  9448. number of peer list is equal to or grater than MAX_PEER_LIST, delete
  9449. at most 100 failure entry from the list. If with duplicate = false,
  9450. MAX_PEER_LIST is not checked.
  9451. * PeerListenCommand.cc: Fixed the argument order of log message.
  9452. 2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9453. * Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
  9454. Added warn().
  9455. * SimpleLogger.h: Moved enum LEVEL to Logger.h.
  9456. Implemented warn().
  9457. Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated code.
  9458. 2006-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9459. * Request.h: Added AFTER_COMPLETED event.
  9460. * TorrentDownloadEngine.cc: Prints "Download complete" message
  9461. instead of downloaded size and progress(%) after download completes.
  9462. * PeerInteractionCommand.cc: After download completes, sends unchoke
  9463. message to the peer if it is interested in what localhost has
  9464. downloaded.
  9465. * TorrentMan.cc: In single-file mode, copy temporary file to the final
  9466. destination instead of just renaming it.
  9467. * TorrentMan.cc: Added deleteTempFile().
  9468. * PeerAbstractCommand.cc: do not stop execution after download
  9469. completes. This makes localhost a seeder.
  9470. * Util.{h,cc}: Added fileCopy().
  9471. * PeerListenCommand.cc: do not stop execution after download completes.
  9472. This makes localhost a seeder.
  9473. * main.cc: Do not call TorrentMan::fixFilename() in torrentHandler.
  9474. Added TorrentMan::deleteTempFile() to torrentHandler.
  9475. Initialized the variable dir as ".".
  9476. * TorrentMan.h: Changed DEFAULT_ANNOUNCE_INTERVAL to 120 seconds.
  9477. Deleted renameSingleFile().
  9478. Added copySingleFile(), deleteTempFile().
  9479. * DownloadEngine.h: Added virtual function afterEachIteration().
  9480. * TorrentDownloadEngine.cc: Move a call to TorrentMan::fixFilename()
  9481. in onEndOfRun() to afterEachIteration().
  9482. In onEndOfRun(), changed if condition to check whether filenameFixed is
  9483. true.
  9484. * Util.cc: Implemented fileCopy() using rangedFileCopy().
  9485. In rangedFileCopy(), added try-catch block to properly close file
  9486. descriptors.
  9487. * TorrentDownloadEngine.cc: Added a member variable filenameFixed.
  9488. Added afterEachIteration(), isFilenameFixed().
  9489. * Peer.cc: Changed choking strategy.
  9490. * PreAllocationDiskWriter.cc: Drop O_DIRECT flag.
  9491. * TrackerInitCommand.cc: Send completed event only once.
  9492. * DownloadEngine.cc: Added a call to afterEachIteration().
  9493. * TrackerUpdateCommand.cc: Do not stop execution after download
  9494. completes.
  9495. * TorrentMan.h: Defined MAX_PEER_UPDATE as 15. aria2 attempts to
  9496. connect the peers at most MAX_PEER_UPDATE when a peer list is
  9497. received from a tracker.
  9498. * TrackerUpdateCommand.cc: Implemented above mentioned behavior.
  9499. Decreased the number of failure peers to delete to 0(just comment out
  9500. the line).
  9501. * Release 0.3.1
  9502. 2006-03-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9503. * PeerInteractionCommand.cc: added a call to
  9504. TorrentMan::unadvertisePiece in Destructor.
  9505. * PeerInteractionCommand.cc: make have message sent immediately
  9506. if the size of pending message queue is zero.
  9507. * TorrentMan.cc: set the maximum size of peer list to 250.
  9508. * TorrentMan.h: changed the container type of Peers and UsedPieces
  9509. to deque.
  9510. * Util.cc: fixed rangedFileCopy.
  9511. * AbstractDiskWriter.{h,cc}: moved digest context initialization
  9512. to Constructor. Also, moved digest cleanup to Destructor.
  9513. * MetaFileUtil.cc: fixed memory leak
  9514. * replaced std::vector with std::deque.
  9515. * AbstractCommand.cc: casted timeout value to long long int.
  9516. * ChunkedEncoding.cc: fixed memory leak.
  9517. * PeerInteractionCommand.cc: casted timeout value to long long int.
  9518. * SleepCommand.cc: casted timeout value to long long int.
  9519. * Data.cc: fixed memory leak.
  9520. * Data.cc: fixed toLLInt().
  9521. * BitfieldMan.cc: fixed memory leak.
  9522. * TorrentMan.cc: initialized storeDir to ".".
  9523. * TorrentMan.cc: fixed memory leak.
  9524. * TorrentMan.cc: corrected file paths of splitted files.
  9525. * PeerAbstractCommand.cc: casted timeout to long long int.
  9526. * main.cc: added delete(req) and delete(te->diskWriter).
  9527. * RequestSlot.cc: casted timeout value to long long int.
  9528. * Request.cc: fixed memory leak.
  9529. * PendingMessage.cc: make HAVE messages sent only when peer does not
  9530. have the piece.
  9531. * Peer.{h,cc}: added hasPiece(int index).
  9532. * main.cc: corrected addCommand.
  9533. 2006-03-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9534. * BitTorrent protocol support added.
  9535. * Release 0.3.0
  9536. 2006-03-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9537. * SocketCore.cc: remove the assignment of addrinfo.ai_addr.
  9538. 2006-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9539. * ChunkedEncoding.{h,cc}: fixed the bug that if chunk data is binary,
  9540. decoding did not work properly.
  9541. 2006-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9542. * DownloadEngine.h: included sys/time.h
  9543. * DownloadEngine.cc: remove sys/time.h
  9544. * Makefile.am (SUBDIRS): Add intl.
  9545. * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
  9546. 2006-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9547. * main.cc: correct help message for --http-auth-scheme.
  9548. * main.cc: changed e-mail address for bug reports.
  9549. * ja.po: added japanese translation.
  9550. 2006-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9551. * SimpleLogger.cc: flush log file instead of stdout.
  9552. 2006-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9553. * main.cc: Fixed command-line option: max-tries
  9554. * HttpResponseCommand.cc: Make the request re-sent only if req->seg.sp
  9555. does not equal to seg.sp.
  9556. * DownloadCommand.cc: If EOF is got from the server and the total size
  9557. of file is not zero, then throw DlRetryEx.
  9558. * main.cc: Set the minium value of min-segment-size to 1024.
  9559. * HttpResponseCommand.cc: Fixed the bug that http segmented downloading
  9560. fails because of a regression since 0.2.0 release.
  9561. 2006-03-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9562. * HttpConnection.cc:
  9563. * common.h: defined the user agent name as macro
  9564. * DownloadEngine.{h, cc}:
  9565. * ConsoleDownloadEngine.{h, cc}: Console output message(size, speed)
  9566. is now generated by ConsoleDownloadEngine not by DownloadEngine.
  9567. * main.cc: Download complete/abort message is now generated by main.
  9568. * Makefile.am (SUBDIRS): Add m4.
  9569. (ACLOCAL_AMFLAGS): New variable.
  9570. (EXTRA_DIST): New variable.
  9571. * configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
  9572. * gettext: added gettext functionality
  9573. 2006-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9574. * AbstractCommand.cc:
  9575. * DownloadCommand.{h, cc}: Aborted downloading commands now properly
  9576. unregister its cuid from SegmentMan.
  9577. * DownloadEngine.cc: .aria2 file was written when a downloading
  9578. failed with errors.
  9579. * HttpConnection.cc: Added "Proxy-Connection" header to proxy request.
  9580. Added "User-Agent" header to CONNECT proxy request.
  9581. Fixed "Proxy-Authorization" header. Now proxy authorization works
  9582. properly.
  9583. * Logger.h:
  9584. * SimpleLogger.{h,cc}: Changed the type of msg to const char*.
  9585. * ChunkedEncoding.cc: Added #include directive for strings.h
  9586. * Release 0.2.1
  9587. 2006-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9588. * Util.{h,cc}: added startsWith().
  9589. * CookieBox.cc: rewrited criteriaFind() using Util::startsWith() and
  9590. Util::endsWith().
  9591. * SocketCore.cc: struct addrinfo is now zero-initialized.
  9592. * common.h: added #include directive of limit.h.
  9593. * DownloadEngine.cc: added #include directive of sys/time.h and
  9594. algorithm.
  9595. * Exception.h: added #include directive of stdio.h.
  9596. * AbstractCommand.h: added #include directive of sys/time.h.
  9597. * DownloadCommand.h: added #include directive of sys/time.h.
  9598. * *.h: added #include directive of common.h to all base classes.
  9599. subclasses' one was removed.
  9600. * common.h: defined LONG_LONG_MAX and LONG_LONG_MIN if a compiler
  9601. does not define these macros.
  9602. 2006-02-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9603. * Release 0.2.0
  9604. * main.cc:
  9605. * HttpInitiateConnectionCommand.{h,cc}:
  9606. * prefs.h:
  9607. * HttpConnection.{h,cc}: added --http-proxy-method option.
  9608. We can now use GET command in http proxy.
  9609. 2006-02-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9610. * SplitSlowestSegmentSplitter.{h,cc}: This class provies algorithm
  9611. that splits slowest segment of SegmentMan::commands vector.
  9612. This is the default split algorithm of aria2.
  9613. * SplitFirstSegmentSplitter.{h,cc}: This class provides algorithm
  9614. that splits first segment of SegmentMan::commands vector.
  9615. * SegmentSplitter.{h,cc}: Added. This class provides split algorithm.
  9616. * DownloadCommand.{h,cc}: Added downloading speed calculation.
  9617. * Segment.h:
  9618. * SegmentMan.cc: Added speed field to Segment.h
  9619. * main.cc: -s option now affects all URLs in command-line arguemtns.
  9620. * HttpResponseCommand.cc: Fixed bug that segment file is not loaded.
  9621. * message.h: Change file size related %d to %lld.
  9622. 2006-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9623. * FtpInitiateConnectionCommand.{h,cc}:
  9624. * FtpNegotiationCommand.{h,cc}:
  9625. * FtpDownloadCommand.{h,cc}:
  9626. * FtpConnection.{h,cc}: Added FTP support
  9627. * SimpleLogger.cc: Log message now includes time information.
  9628. * main.cc: The value of --http-auth-scheme option is chagned from
  9629. 'BASIC' to 'basic'
  9630. * main.cc: Added --timeout command-line option.
  9631. * main.cc: Added --min-segment-size command-line option.
  9632. * main.cc: Added --max-retries command-line option.
  9633. * prefs.h: option string constants are now defined in prefs.h
  9634. 2006-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9635. * AbstractCommand.cc: Fixed timeout bug in AbstractCommand
  9636. * SegmentMan.cc: Added totalSize entry to .aria2 file. No compatibility
  9637. with version 0.1.0's one.
  9638. 2006-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9639. * configure.in: Added --enable-ssl option to configure script.
  9640. * HttpConnection.cc: Make Request-URI an absolute path. Some servers
  9641. cannot permit absoluteURI as Request-URI.
  9642. * HttpConnection.cc: Added Referer support.
  9643. * main.cc: Added referer command-line option.
  9644. * main.cc: Added rety-wait command-line option.
  9645. * Exception.h: Fixed formating bug in Exception::setMsg()
  9646. * SocketCore.{h,cc}:
  9647. * Socket.{h, cc}:
  9648. * Request.cc:
  9649. * InitiateConnectionCommandFactory.cc:
  9650. * HttpRequestCommand.cc: Added HTTPS support.
  9651. * SocketCore.{h,cc}: Added SocketCore. Socket becomes a handle class
  9652. for SocketCore.
  9653. * ChunkedEncoding.cc: Fixed bug in ChunkedEncoding: expanding buffer
  9654. size is wrong
  9655. * DownloadCommand.cc: Fixed bug in DownloadCommand: In Chunked
  9656. Encoding, it wrongly adds to Segment.ds buff length from the socket.
  9657. 2006-02-17 Tatsuhiro Tsujikawa <tsujikawa at rednoah dot com>
  9658. * Release 0.1.0