| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829 | 
							- 2007-12-05  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Enable direct I/O support in checksum checking.
 
- 	* src/IteratableChunkChecksumValidator.{h, cc}
 
- 	* test/IteratableChunkChecksumValidatorTest.cc
 
- 	* src/CheckIntegrityEntry.cc
 
- 	* src/PieceHashCheckIntegrityEntry.cc
 
- 	* src/IteratableChecksumValidator.{h, cc}
 
- 	* src/BtCheckIntegrityEntry.cc: Added doc.
 
- 2007-12-04  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Added --allow-piece-length-change option.
 
- 	* src/DefaultBtProgressInfoFile.cc
 
- 	* test/DefaultBtProgressInfoFileTest.cc
 
- 	* src/OptionHandlerFactory.cc
 
- 	* src/option_processing.cc
 
- 	* src/prefs.h
 
- 	* src/version_usage.cc
 
- 	* doc/aria2c.1.txt
 
- 	* doc/aria2c.1
 
- 	
 
- 	Fixed: duplicated result entry appears when exception is thrown in
 
- 	RequestGroup::createInitiateConnectionCommand().
 
- 	* src/RequestGroupMan.cc (fillRequestGroupFromReserver):
 
- 	Add RequestGroup to _requestGroup after RequetGroup::
 
- 	createInitiateConnectionCommand() succeeds.
 
- 	Externalized  message
 
- 	* src/XML2SAXMetalinkProcessor.cc
 
- 	* src/message.h
 
- 	
 
- 2007-12-04  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Forced download abort when received negative response from http/ftp
 
- 	server.
 
- 	* src/HttpResponseCommand.cc
 
- 	* src/FtpNegotiationCommand.cc
 
- 	* src/HttpResponse.cc
 
- 	* src/FtpConnection.cc
 
- 2007-12-04  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Added XML2SAXMetalinkProcessor class, which is a lot faster than
 
- 	the predecessor, Xml2MetalinkParser class.
 
- 	I tested them against 94KB metalink file with 1234 chunk checksums.
 
- 	The new one parsed it in 22msec, while it took 6000msec with old one.
 
- 	* src/XML2SAXMetalinkProcessor.{h, cc}
 
- 	* test/XML2SAXMetalinkProcessorTest.cc
 
- 	* src/MetalinkParserController.{h, cc}
 
- 	* test/MetalinkParserControllerTest.cc
 
- 	* src/MetalinkParserState.h: Also added 16 subclasses.
 
- 	* src/main.cc
 
- 	* src/Metalink2RequestGroup.cc
 
- 	* src/MetalinkHelper.cc
 
- 	* src/MetalinkEntry.cc
 
- 	* src/ChunkChecksum.h
 
- 	
 
- 	Rewritten Base64 class for better performance.
 
- 	* src/Base64.{h, cc}
 
- 	* test/Base64Test.cc
 
- 	* src/HttpRequest.cc
 
- 2007-12-01  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Fixed the bug#1841757: aria2 will connect to server to only get
 
- 	file size.
 
- 	* src/StreamFileAllocationEntry.cc
 
- 	* src/option_processing.cc
 
- 	* src/HttpResponseCommand.cc: Now reuse connection in segmented
 
- 	downloads.
 
- 	* src/FtpNegotiationCommand.cc
 
- 	
 
- 	Suppressed wrong message when finding PreDownloadHandler
 
- 	* src/RequestGroup.cc
 
- 	
 
- 2007-11-29  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Updated usage
 
- 	* src/version_usage.cc
 
- 	Updated man page
 
- 	* doc/aria2c.1.txt
 
- 	* doc/aria2c.1
 
- 	Updated po files
 
- 	* po/aria2c.pot
 
- 	* po/*.po
 
- 	* po/*.gmo
 
- 2007-11-29  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Eliminated g++-4.2 warning
 
- 	* src/DownloadHandlerConstants.{h, cc}
 
- 	* src/Util.cc
 
- 	* test/MetaFileUtilTest.cc
 
- 	* test/PStringBuildVisitorTest.cc
 
- 	
 
- 	Fixed bug: --check-integrity doesn't work for multi file torrent.
 
- 	* src/RequestGroup.cc
 
- 	* src/BtCheckIntegrityEntry.cc
 
- 	
 
- 2007-11-29  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Fixed a2io.h
 
- 	* src/a2io.h
 
- 2007-11-28  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Added direct I/O support. The current implementation uses O_DIRECT,
 
- 	which is not posix standard and is tested on linux 2.6.21.
 
- 	Currently only file allocation uses direct I/O.
 
- 	* src/SingleFileAllocationIterator.{h, cc}
 
- 	* test/SingleFileAllocationIteratorTest.cc
 
- 	* src/MultiFileAllocationIterator.{h, cc}
 
- 	* test/MultiFileAllocationIteratorTest.cc
 
- 	* src/BinaryStream.h
 
- 	* src/DiskWriter.h
 
- 	* src/AbstractDiskWriter.{h, cc}
 
- 	* src/ByteArrayDiskWriter.h
 
- 	* src/DiskAdaptor.h
 
- 	* src/AbstractSingleDiskAdaptor.{h, cc}
 
- 	* src/MultiDiskAdaptor.{h, cc}
 
- 	* src/FileAllocationEntry.cc
 
- 	* src/Util.{h, cc}
 
- 	* src/OptionHandlerFactory.cc
 
- 	* src/prefs.h
 
- 	* src/version_usage.cc
 
- 	* src/option_processing.cc
 
- 	Moved FileAllocationMan::markCurrentFileAllocationEntryDone() to
 
- 	handleException.
 
- 	* src/MultiFileAllocationIterator.cc
 
- 	Added EINTR handling
 
- 	* src/SocketCore.cc
 
- 	
 
- 2007-11-28  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Updated usage
 
- 	* src/version_usage.cc
 
- 2007-11-27  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Applied Ross's patch for MinGW port.
 
- 	* src/DownloadEngine.h
 
- 2007-11-27  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Set Content-Type to SingleFileDownloadContext when http response is
 
- 	received.
 
- 	* src/HttpResponseCommand.cc
 
- 	* src/HttpResponse.{h, cc}
 
- 	* test/HttpResponseTest.cc
 
- 2007-11-27  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Rewritten to add content-type support.
 
- 	* src/DownloadHandler.{h, cc}
 
- 	* src/BtPostDownloadHandler.{h, cc}
 
- 	* test/BtPostDownloadHandlerTest.cc
 
- 	* src/MetalinkPostDownloadHandler.{h, cc}
 
- 	* test/MetalinkPostDownloadHandlerTest.cc
 
- 	* src/PostDownloadHandler.{h, cc}
 
- 	* src/DownloadHandlerConstants.{h, cc}
 
- 	* src/RequestGroup.cc
 
- 	* src/HttpResponseCommand.cc
 
- 	* src/FtpNegotiationCommand.cc
 
- 	* src/SingleFileDownloadContext.{h, cc}
 
- 	* src/RequestGroup.h
 
- 	* src/RequestGroupCriteria.h
 
- 	* src/ContentTypeRequestGroupCriteria.h
 
- 	Added 'mem' option value for --follow-metalink, --follow-torrent.
 
- 	If it is give, metalink/torrent file is not written to the disk, but
 
- 	just is kept in memory. Parsing is occurred on memory.
 
- 	* src/MetalinkHelper.{h, cc}
 
- 	* src/MetalinkProcessor.h
 
- 	* src/Xml2MetalinkProcessor.{h, cc}
 
- 	* test/Xml2MetalinkProcessorTest.cc
 
- 	* src/DownloadHandlerFactory.{h, cc}
 
- 	* test/DownloadHandlerFactoryTest.cc
 
- 	* src/PreDownloadHandler.{h, cc}
 
- 	* src/OptionHandlerFactory.cc
 
- 	* src/DefaultBtContext.{h, cc}
 
- 	* test/DefaultBtContextTest.cc
 
- 	* src/version_usage.cc
 
- 	* src/Metalink2RequestGroup.{h, cc}
 
- 	* src/RequestGroup.{h, cc}
 
- 	* src/a2functional.h
 
- 	* test/a2functionalTest.cc
 
- 	* src/MemoryBufferPreDownloadHandler.{h, cc}
 
- 	* src/OptionHandlerImpl.h
 
- 	* src/prefs.h
 
- 	* src/Util.{h, cc}
 
- 	* test/UtilTest.cc
 
- 	
 
- 	Keep DownloadResult rather than RequestGroup after downloads to reduce
 
- 	memory usage.
 
- 	* src/RequestGroupMan.{h, cc}
 
- 	* src/DownloadEngine.cc
 
- 	* src/BtDependency.{h, cc}: Changed the type of dependee from
 
- 	WeakHandle to SharedHandle because WeakHandle could be null.
 
- 	* src/RequestGroup.{h, cc}
 
- 	* src/DownloadEngineFactory.cc
 
- 	* src/DownloadResult.h
 
- 	
 
- 	Set totalLength after download finished
 
- 	* src/UnknownLengthPieceStorage.{h, cc}
 
- 	Keep torrent file specified in metalink in memory.
 
- 	* src/Metalink2RequestGroup.cc
 
- 	* src/BtDependency.cc
 
- 	* src/TrueRequestGroupCriteria.h
 
- 	Fixed the bug: seekg is used where seekp should be used.
 
- 	* src/ByteArrayDiskWriter.cc
 
- 	* test/ByteArraydiskWriterTest.cc
 
- 	
 
- 2007-11-25  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Fixed syntax error
 
- 	* test/SequenceTest.cc
 
- 2007-11-25  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
 
- 	* src/RequestGroupMan.cc (isSameFileBeingDownloaded)
 
- 	Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
 
- 	* src/RequestGroup.cc (downloadFinishedByFileLength)
 
- 	
 
- 2007-11-25  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Added the check to see whether ares_host_callback accepts timeouts
 
- 	with c-ares; only c-ares 1.5.0 or newer accepts it.
 
- 	* src/NameResolver.{h, cc}
 
- 	* m4/libcares.m4
 
- 	* configure.ac: Set C++ for language choice.
 
- 2007-11-24  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Fixed: compilation fails without c-ares/ares
 
- 	* src/DownloadEngine.cc (addCommand): Moved outside #ifdef
 
- 	Generate http/ftp commands only when download is incomplete.
 
- 	* src/BtFileAllocationEntry.cc (prepareForNextAction)
 
- 2007-11-23  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Corrected typo. Examples are removed since they are available in man
 
- 	page.
 
- 	* src/version_usage.cc
 
- 	Updated man page.
 
- 	* doc/aria2c.1
 
- 	* doc/aria2c.1.txt
 
- 	* doc/makeman: Commented out sed command.
 
- 	
 
- 2007-11-23  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Throw DlAbortEx when a remote file is not found.
 
- 	* src/HttpResponse.cc
 
- 	* src/FtpNegotiationCommand.cc
 
- 	* src/message.h
 
- 	Overwrite an existing file if --allow-overwrite=true is given.
 
- 	* src/RequestGroup.cc
 
- 	Removed unused functions
 
- 	* src/AbstractCommand.h
 
- 	
 
- 2007-11-23  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Removed 'extern' from 'extern typedef ...' in src/*.h
 
- 2007-11-22  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Updated usage
 
- 	* src/version_usage.cc
 
- 2007-11-22  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Trim announce URL
 
- 	* src/DefaultBtContext.cc
 
- 	* test/ShaVisitorTest.cc
 
- 	
 
- 	Trim argument s. Give trimed s to exception constructor.
 
- 	* src/Util.cc (parseInt)(parseLLInt)
 
- 	* test/UtilTest.cc
 
- 2007-11-22  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Set precision back to 1.
 
- 	* src/ConsoleStatCalc.cc (calculateStat)
 
- 2007-11-22  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Replaced strtol with Util::parseInt
 
- 	* src/ChunkedEncoding.cc
 
- 	* src/HttpConnection.cc
 
- 	* src/CookieBoxFactory.cc
 
- 	* src/ParameterizedStringParser.cc
 
- 	* src/Util.cc
 
- 	* test/UtilTest.cc
 
- 	* test/OptionHandlerTest.cc
 
- 	* src/Request.cc
 
- 	Throw exception when empty string is given. The message for exception
 
- 	changed.
 
- 	* src/Util.cc (parseInt)(parseLLInt)
 
- 	* src/message.h
 
- 2007-11-22  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Set precision to 2 because share ratio is rounded into 1.0 if precision
 
- 	set to 1.
 
- 	* src/ConsoleStatCalc.cc (calculateStat)
 
- 2007-11-20  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Preallocate non-requested file which is adjacent forward to requested
 
- 	file('requested' files means the files given in --select-file option)
 
- 	if they share a same piece.
 
- 	This fixes long pause in the file system which doesn't support sparse
 
- 	files like FAT32 while downloading.
 
- 	* src/MultiFileAllocationIterator.{h, cc}
 
- 	* test/MultiFileAllocationIteratorTest.cc
 
- 	* src/FileEntry.{h, cc}
 
- 	Removed unused _option.
 
- 	* src/MultiDiskAdaptor.h
 
- 	* test/MultiDiskAdaptorTest.cc
 
- 	* src/DefaultPieceStorage.cc
 
- 	Set the default value of --seed-ratio to 1.0.
 
- 	If 0.0 is given, then seeding continues regardless of share ratio.
 
- 	* src/version_usage.cc
 
- 	* src/option_processing.cc
 
- 	* src/BtSetup.cc
 
- 	* doc/aria2c.1.txt
 
- 	* doc/aria2c.1
 
- 	Fixed: Selective download is not working in BitTorrent
 
- 	* src/RequestGroup.cc
 
- 	Introduced Sequence class. Use this instead of Util::unfoldRange()
 
- 	* src/PieceStorage.h
 
- 	* test/MockPieceStorage.h
 
- 	* src/UnknownLengthPieceStorage.h
 
- 	* src/DefaultPieceStorage.{h, cc}
 
- 	* src/Metalink2RequestGroup.cc
 
- 	* src/RequestGroup.cc
 
- 	* src/Sequence.h
 
- 	* test/SequenceTest.cc
 
- 	* src/IntSequence.h
 
- 	* src/message.h
 
- 	* src/Util.{h, cc}
 
- 	* test/UtilTest.cc
 
- 	Added new function 'parse' to catch exception thrown by subclass's
 
- 	parseArg
 
- 	* src/OptionHandler.h
 
- 	* src/OptionParser.cc
 
- 	* src/NameMatchOptionHandler.h
 
- 	* src/OptionHandlerImpl.h
 
- 	* test/OptionHandlerTest.cc
 
- 	Added IntegerRangeOptionHandler. Used for --listen-port and
 
- 	--select-file. Now --listen-port accepts range of port.
 
- 	* src/OptionHandlerFactory.cc
 
- 	* src/version_usage.cc
 
- 	* src/OptionHandlerImpl.h
 
- 	* src/option_processing.cc
 
- 	* src/BtSetup.cc
 
- 	* src/PeerListenCommand.{h, cc}
 
- 	* doc/aria2c.1.txt
 
- 	* doc/aria2c.1
 
- 	
 
- 	Implemented operator< for Exception class to provide easy way to print
 
- 	exception stack trace.
 
- 	* src/Exception.{h, cc}
 
- 	* src/main.cc
 
- 	* src/option_processing.cc
 
- 	
 
- 2007-11-18  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/version_usage.cc
 
- 	(showVersion): Reworked.
 
- 	(showUsage): Added examples.
 
- 	Removed Hint for total length and file name.
 
- 	* src/Metalink2RequestGroup.cc
 
- 	* src/RequestGroup.{h, cc}
 
- 	* src/HttpResponseCommand.cc
 
- 	* src/FtpNegotiationCommand.cc
 
- 	Now --follow-torrent and --follow-metalink option work properly.
 
- 	* src/RequestGroup.cc
 
- 	Updated man page
 
- 	* doc/aria2c.1.txt
 
- 	* doc/aria2c.1
 
- 	
 
- 2007-11-18  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Removed.
 
- 	* src/PiecedSegment.{h, cc} (operator==)(operator!=)
 
- 	Use Segment::operator==()
 
- 	* src/HttpConnection.cc
 
- 	* src/Segment.h
 
- 	Updated usage
 
- 	* src/version_usage.cc
 
- 	Added EINTR treatment.
 
- 	* src/SocketCore.cc
 
- 	* src/AbstractDiskWriter.cc
 
- 	Rewritten.
 
- 	* src/Util.cc (rangedFileCopy)
 
- 	
 
- 2007-11-17  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Fixed typo.
 
- 	* src/version_usage.cc
 
- 2007-11-17  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Implemented. Now -c option works fine.
 
- 	* src/DefaultPieceStorage.cc (markPiecesDone)
 
- 	* test/DefaultPieceStorageTest.cc
 
- 	Removed.
 
- 	* src/SegmentMan.{h, cc}
 
- 	(markAllPiecesDone)
 
- 	(markPieceDone)
 
- 	Synchronized po files with 
 
- 	https://translations.launchpad.net/aria2/trunk/+pots/aria2c
 
- 	* src/fr.po
 
- 	* src/ru.po
 
- 	* src/de.po
 
- 	* src/ja.po
 
- 	
 
- 2007-11-14  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Added ifdef and some modifications to compile without BitTorrent,
 
- 	Metalink, MessageDigest
 
- 	support.
 
- 	* src/PieceHashCheckIntegrityEntry.cc
 
- 	* src/MetalinkEntry.h
 
- 	* src/version_usage.cc
 
- 	* src/main.cc
 
- 	* src/DownloadEngine.{h, cc}
 
- 	* src/Metalink2RequestGroup.cc
 
- 	* src/Peer.cc
 
- 	* src/RequestGroup.cc
 
- 	* src/MetalinkHelper.cc
 
- 	* test/DefaultPieceStorageTest.cc
 
- 	* test/MetalinkPostDownloadHandlerTest.cc
 
- 	* test/Metalink2RequestGroupTest.cc
 
- 	Hide TOTAL SPD when all downloads complete.
 
- 	* src/ConsoleStatCalc.cc
 
- 	Log target system information.
 
- 	* src/main.cc
 
- 	
 
- 2007-11-13  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Now --metalink-location accepts a comma-deliminated list of locations.
 
- 	* src/MetalinkEntry.{h, cc}
 
- 	* test/MetalinkEntryTest.cc
 
- 	* src/version_usage.cc
 
- 	* src/Metalink2RequestGroup.cc
 
- 	* src/Xml2MetalinkProcessor.cc
 
- 	* test/Xml2MetalinkProcessorTest.cc
 
- 	* doc/aria2c.1.txt
 
- 	* doc/aria2c.1
 
- 	* src/Util.cc (toUpper)(toLower): Rewritten.
 
- 2007-11-13  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Added the ability to detect duplicate download entry which is about to
 
- 	download the same file other RequestGroup is downloading.
 
- 	* src/RequestGroup.cc
 
- 	* src/HttpResponseCommand.cc
 
- 	* src/FtpNegotiationCommand.cc
 
- 2007-11-13  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Recalculates download progress when loading a control file,
 
- 	if the piece length of DownloadContext is different from the one saved
 
- 	in the control file. Currently in-flight pieces are ignored.
 
- 	* src/DefaultBtProgressInfoFile.cc
 
- 	* test/DefaultBtProgressInfoFileTest.cc
 
- 	* src/Util.{h, cc}
 
- 	* test/UtilTest.cc
 
- 2007-11-12  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Do not rotate tiers in announce-list.
 
- 	* src/DefaultBtAnnounce.{h, cc}: Removed trackerNumTry.
 
- 	AnnounceList::allTiersFailed() used instead to detect whether all
 
- 	tiers are tried and failed.
 
- 	* test/DefaultBtAnnounceTest.cc
 
- 	* src/AnnounceList.{h, cc}: If all tiers are tried and failed then
 
- 	allTiersFailed() returns true. To reset tier pointer, call resetTier();
 
- 	* test/AnnounceListTest.cc
 
- 	* src/TrackerWatcherCommand.cc (execute): Removed DlAbortEx catch
 
- 	clause. Catch RecoverableException instead of DlRetryEx instead.
 
- 2007-11-12  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Implemented checksum validation feature(1 checksum for each file)
 
- 	The validation takes place after the download.
 
- 	* src/PieceHashCheckIntegrityEntry.{h, cc}: New class.
 
- 	* src/IteratableChecksumValidator.{h, cc}: Rewritten.
 
- 	* src/CheckIntegrityCommand.cc: Changed log message.
 
- 	* src/Metalink2RequestGroup.cc: Set checksum to
 
- 	SingleFileDownloadContext.
 
- 	* src/StreamCheckIntegrityEntry.{h, cc}: Now derived from
 
- 	PieceHashCheckIntegrity class.
 
- 	* src/BtCheckIntegrityEntry.{h, cc}: Now derived from
 
- 	PieceHashCheckIntegrity class.
 
- 	* src/ChecksumCheckIntegrityEntry.{h, cc}: New class.
 
- 	* src/IteratableValidator.h: New class.
 
- 	* src/message.h
 
- 	* src/CheckIntegrityEntry.{h, cc}
 
- 	* src/IteratableChunkChecksumValidator.{h, cc}
 
- 	* src/SingleFileDownloadContext.h
 
- 	* src/DownloadCommand.cc
 
- 	
 
- 	--allow-overwrite=true is no longer needed to check file integrity
 
- 	before download in BitTorrent download.
 
- 	* src/RequestGroup.cc (getInitialCommand)
 
- 	Removed RequestGroup from queue when RequestGroup::getInitialCommand()
 
- 	throws exception.
 
- 	* src/RequestGroupMan.cc (getInitialCommands)
 
- 	
 
- 2007-11-11  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	urlencode the given url inside Request::parseUrl(...)
 
- 	* src/Request.{h, cc}
 
- 	* src/Util.{h, cc}
 
- 	* test/RequestTest.cc
 
- 	Removed #!metalink3! notation support because it is deleted from
 
- 	the metalink specification.
 
- 	* src/Request.{h, cc}
 
- 	* test/RequestTest.cc
 
- 2007-11-10  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Don't connect server before checking file integrity at startup, if
 
- 	filesize and output file path are known.
 
- 	* src/AbstractCommand.cc
 
- 	* src/StreamFileAllocationEntry.cc
 
- 	* src/Metalink2RequestGroup.cc
 
- 	* src/RequestGroup.{h, cc}
 
- 	* src/HttpResponseCommand.cc
 
- 	* src/FtpNegotiationCommand.cc
 
- 	Added DownloadFailureException. If it is thrown, RequestGroup should
 
- 	halt.
 
- 	* src/AbstractCommand.cc
 
- 	* src/DownloadFailureException.h
 
- 	* src/RequestGroup.cc
 
- 	Catch RecoverableException, instead of DlAbortEx.
 
- 	* src/RequestGroupMan.cc
 
- 	* src/FillRequestGroupCommand.cc
 
- 	* src/MetaFileUtil.cc
 
- 	* src/IteratableChunkChecksumValidator.cc
 
- 	Now first parameter of MSG_DOWNLOAD_ABORTED is gid(RequestGroup::
 
- 	getGID())
 
- 	* src/CheckIntegrityCommand.cc
 
- 	* src/message.h
 
- 	
 
- 	Print gid instead of idx.
 
- 	* src/RequestGroupMan.cc
 
- 	Removed exception throwers declaration.
 
- 	* src/DirectDiskAdaptor.{h, cc}
 
- 	* src/SocketCore.{h, cc}
 
- 	* src/MultiDiskAdaptor.{h, cc}
 
- 	* src/HttpConnection.{h, cc}
 
- 	* src/HttpResponse.{h, cc}
 
- 	* src/DiskAdaptor.{h, cc}
 
- 	* src/CopyDiskAdaptor.{h, cc}
 
- 	* src/MultiDiskAdaptor.{h, cc}
 
- 	* src/HttpHeaderProcessor.{h, cc}
 
- 	* src/AbstractSingleDiskAdaptor.{h, cc}
 
- 	* src/Util.{h, cc}
 
- 	* test/UtilTest.cc
 
- 	* src/DefaultDiskWriter.{h, cc}
 
- 	* src/FtpConnection.{h, cc}
 
- 	* src/AbstractDiskWriter.{h, cc}
 
- 	Removed duplicate code.
 
- 	* src/StreamCheckIntegrityEntry.cc
 
- 	Removed unnecessary include.
 
- 	* src/DiskWriter.h
 
- 	Included Exception.h
 
- 	* src/option_processing.cc
 
- 	Included 2 files and added doc
 
- 	* src/TrackerWatcherCommand.cc
 
- 	* src/SocketCore.cc (writeData): Fixed send error with GnuTLS.
 
- 2007-11-08  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	
 
- 	Changed CheckIntegrityEntry interface so that it can define
 
- 	the action when all the chunk checksums are valid.
 
- 	* src/CheckIntegrityEntry.h
 
- 	* src/StreamCheckIntegrityEntry.{h, cc}
 
- 	* src/BtCheckIntegrityEntry.{h, cc}: Currently,when all the checksums
 
- 	are valid, then aira2 goes to seeding mode. Sometimes it is better
 
- 	to exit rather than doing seeding. So, it would be good to toggle this
 
- 	behavior.
 
- 	* src/CheckIntegrityCommand.cc
 
- 	* src/AbstractCommand.cc
 
- 	* src/RequestGroup.cc
 
- 2007-11-07  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Reflect the download length of in-flight pieces.
 
- 	It makes the download length readout more precise.
 
- 	* src/DefaultPieceStorage.{h, cc}
 
- 	* test/DefaultPieceStorageTest.cc
 
- 	* src/a2functional.h
 
- 	* test/a2functionalTest.cc
 
- 	
 
- 	Lower CPU load when --max-download-limit is used.
 
- 	There is up and down in speed indicator when enabling
 
- 	http-pipelining but a download goes well. I think the problem is that
 
- 	because http-pipelining is enabled, DownloadCommand is created for
 
- 	each segment and in its constructor, PeerStat::downloadStart() is
 
- 	called. In PeerStat::downloadStart(), speed calculation object is
 
- 	reseted, which makes download speed zero.
 
- 	* src/DownloadCommand.cc
 
- 	Rewritten using accumulate.
 
- 	* src/RequestGroupMan.cc (calculateStat)
 
- 	
 
- 	Code clearnup.
 
- 	* src/FtpNegotiationCommand.cc
 
- 	* src/HttpResponseCommand.cc
 
- 2007-11-06  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Fixed: Can not resume: aria2 reports download already finished.
 
- 	* src/AbstractCommand.{h, cc}
 
- 	* src/HttpResponseCommand.cc
 
- 	* src/FtpNegotiateCommand.cc
 
- 2007-11-06  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Now a file is stored in the directory specified in .metalnk file
 
- 	(file[@name]).
 
- 	* src/Metalink2RequestGroup.cc
 
- 	Create the directory structure when opening the file if it doesn't
 
- 	exist.
 
- 	* src/AbstractDiskWriter.cc
 
- 	* src/Util.{h, cc}
 
- 	* src/File.h
 
- 	* test/UtilTest.cc
 
- 	
 
- 	Removed file name comparison
 
- 	* src/Metalink2RequestGroup.cc
 
- 	* src/HttpResponseCommand.cc
 
- 	Rewritten using Util::mkdirs()
 
- 	* src/FileEntry.cc (setupDir)
 
- 	* test/FileEntryTest.cc
 
- 	
 
- 	Updated doc
 
- 	* src/SingleFileDownloadContext.h
 
- 	
 
- 2007-11-05  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Now SleepCommand dispatches nextCommand when halt is requested.
 
- 	It avoids a possible long wait after hitting CTRL-C.
 
- 	* src/SleepCommand.{h, cc}
 
- 	* src/RequestGroupAware.{h, cc}
 
- 2007-11-04  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Fixed: the listen port sent to the tracker is wrong. If aria2 fails
 
- 	to open listen port, then remove the port number from the tracker
 
- 	request.
 
- 	* src/DefaultBtAnnounce.cc 
 
- 	* test/DefaultBtAnnounceTest.cc
 
- 	* test/MockPieceStorage.h
 
- 	
 
- 	Inject randomizer to DefaultBtAnnounce and DefaultBtContext to make
 
- 	them more testable.
 
- 	* src/DefaultBtAnnounce.{h, cc}
 
- 	* src/DefaultBtContext.{h, cc}
 
- 	* src/Util.{h, cc}
 
- 	* test/DefaultBtAnnounceTest.cc
 
- 	* test/DefaultBtContextTest.cc
 
- 	* test/UtilTest.cc
 
- 	
 
- 	Added 'B' to upload bytes readout.
 
- 	* src/ConsoleStatCalc.cc
 
- 	Now the listen port for BitTorrent download is opened when it is
 
- 	needed.
 
- 	* src/DownloadEngineFactory.cc
 
- 	* src/BtSetup.{h, cc}
 
- 	* src/PeerListenCommand.{h, cc}
 
- 	
 
- 	Now an exception thrown while parsing tracker response is now logged.
 
- 	If DlAbortEx is catched, then btAnnounce->resetAnnounce() immediately
 
- 	called, which means no retry is made in this case, assuming a tracker
 
- 	has a problem.
 
- 	* src/TrackerWatcherCommand.cc
 
- 	
 
- 	Fixed: downloading a file whose length is unkown fails.
 
- 	* src/DownloadCommand.cc
 
- 	Simplified prepareForNextSegment()
 
- 	* src/DownloadCommand.cc
 
- 	Updated
 
- 	* po/POTFILES.in
 
- 	
 
- 2007-11-03  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Re-implemented a file listing for Metalink, which was dropped while
 
- 	http/ftp/torrent integration was being implemented.
 
- 	* src/MetalinkHelper.{h, cc}: New class.
 
- 	* test/MetalinkHelperTest.cc
 
- 	* src/main.cc
 
- 	* src/Metalink2RequestGroup.cc
 
- 2007-11-03  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Added the ability to display the detailed torrent file information.
 
- 	Now -S option gives not only a file listing, but also total download
 
- 	length, info hash, announce URI, piece length, the number of pieces,
 
- 	and mode(single or multi-torrent).
 
- 	* src/DefaultBtContext.{h, cc} (operator<<): New function.
 
- 	* src/Util.cc (toStream): Show file length in a abbreviated form(like
 
- 	KiB)
 
- 	* test/UtilTest.cc
 
- 	* src/main.cc
 
- 2007-10-30  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Added ftp://USER:PASSWD@Servername automatic parsing.
 
- 	* src/Request.{h, cc}: Removed AuthResolvers. Added _username and
 
- 	_password. Recognize username and password in URI.
 
- 	* src/main.cc: Use AuthConfigFactory instead of RequestFactory.
 
- 	* src/RequestGroup.cc: Use AuthConfigFactory instead of RequestFactory.
 
- 	* src/RequestFactory.{h, cc}: Removed.
 
- 	* src/AuthConfigFactory.{h, cc}: New class.
 
- 	* src/FtpConnection.cc: Use AuthConfigFactory.
 
- 	* src/HttpRequest.cc: Use AuthConfigFactory.
 
- 	* test/HttpRequestTest.cc: Updated.
 
- 	* test/RequestTest.cc: Updated.
 
- 	* test/AuthConfigFactoryTest.cc: New class.
 
- 	* test/RequestFactoryTest.cc: Removed.
 
- 2007-10-29  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Use RequestGroup::allDownloadFinished() to decide whether the control
 
- 	file should be removed or saved.
 
- 	* src/RequestGroup.{h, cc} (allDownloadFinished): New function.
 
- 	* src/RequestGroupMan.cc (removeStoppedGroup) (save)
 
- 2007-10-29  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Use File::renameTo()
 
- 	* src/DefaultBtProgressInfoFile.cc
 
- 	Added --no-file-allocation-limit command-line option.
 
-         * src/version_usage.cc
 
- 	* src/option_processing.cc
 
-         * src/OptionHandlerFactory.cc
 
-         * src/RequestGroup.{h, cc}
 
- 	* src/BtCheckIntegrityEntry.cc
 
- 	* src/StreamCheckIntegrityEntry.cc
 
-         * src/prefs.h
 
-         * doc/aria2c.1.txt
 
-         * doc/aria2c.1
 
- 	Now prealloc is the default value for --file-allocation option.
 
-         * src/version_usage.cc
 
- 	* src/option_processing.cc
 
-         * doc/aria2c.1.txt
 
-         * doc/aria2c.1
 
- 	Don't URL-encode user-agent.
 
- 	* src/HttpRequest.cc
 
- 	Updated translations
 
-         * po/LINGUAS: Added nl for Dutch translation.
 
-         * po/nl.po: Added Dutch translation, thanks to A. Bram Neijt.
 
-         * po/de.po: Updated German translation, thanks to Patrick Ruckstuhl.
 
- 	* po/POTFILES.in: Updated.
 
- 	
 
- 2007-10-27  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Added the ability to recognize url-list in a torrent file.
 
- 	The retrieved URLs are attached to the corresponding FileEntry.
 
- 	* src/DefaultBtContext.{h, cc}
 
- 	* src/FileEntry.{h, cc}
 
- 	* test/DefaultBtContextTest.cc
 
- 2007-10-27  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/ConsoleStatCalc.cc: Let the user know that aria2 is now seeding
 
- 	after the download finishes.
 
- 2007-10-24  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/Piece.{h, cc}: Added SubPiece infrastructure to track down
 
- 	the data smaller than block length.
 
- 	A block length can be specified by constructor's argument.
 
- 	* src/DefaultPieceStorage.{h, cc} (getMissingPiece):
 
- 	Get a missing piece in the range of given FileEntry. This function is
 
- 	not used in the program yet.
 
- 	* src/Util.h: Added some macros.
 
- 2007-10-18  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Added HTTP/1.1 keep alive and pipelining support.
 
- 	See --enable-http-keep-alive and --enable-http-pipelining option.
 
- 	* src/AbstractCommand.{h, cc}: Now it has one-to-many relation to
 
- 	Segment.
 
- 	* src/HttpDownloadCommand.{h, cc}
 
- 	* src/OptionHandlerFactory.cc
 
- 	* src/HttpConnection.{h, cc}
 
- 	* src/version_usage.cc
 
- 	* src/HttpInitiateConnectionCommand.cc
 
- 	* src/FtpInitiateConnectionCommand.cc
 
- 	* src/Segment.h
 
- 	* src/HttpRequestCommand.{h, cc}
 
- 	* src/option_processing.cc
 
- 	* src/prefs.h
 
- 	* src/HttpResponseCommand.cc
 
- 	* src/SegmentMan.{h, cc}
 
- 	* src/FtpNegotiateCommand.cc
 
- 	* src/HttpProxyResponseCommand.cc
 
- 	* src/Request.cc
 
- 	* src/HttpRequest.cc
 
- 	* src/DownloadCommand.cc
 
- 	* test/HttpRequestTest.cc
 
- 	* test/RequestTest.cc
 
- 2007-10-16  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/ConsoleCalc.cc (calculateStat): Hide SPD after the download
 
- 	finished.
 
- 2007-10-15  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/Metalink2RequestGroup.cc (generate): Throw exception instead of
 
- 	catching it inside the method.
 
- 	When no file entry is found in a metalink without querying user
 
- 	preferences, throw the exception with the error message that suggests
 
- 	metalink file is probably broken. 
 
- 	* src/RequestGroup.cc (postDownloadProcessing): Catch exception here.
 
- 2007-10-15  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Fixed the bug that prevents remote Metalink/Torrent file from begin
 
- 	processed.
 
- 	* src/RequestGroupMan.cc (removeStoppedGroup)
 
- 	Added debug message.
 
- 	* src/BtPostDownloadHandler.cc
 
- 	* src/MetalinkPostDownloadHandler.cc
 
- 	* src/PostDownloadHandler.{h, cc}
 
- 	* src/RequestGroup.cc
 
- 2007-10-15  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/Request.cc (parseUrl): Removed unnecessary slashes around dir.
 
- 2007-10-14  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/MultiUrlRequestInfo.h: Updated the message shown when program
 
- 	stops and there are any unfinished or in-progress downloads.
 
- 	Added the legend of "stat".
 
- 	
 
- 2007-10-12  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Throw exception when chunck checksum verification fails.
 
- 	* src/DownloadCommand.cc (validatePieceHash): New function.
 
- 	* src/PiecedSegment.{h, cc} (clear): New function.
 
- 	* src/GrowSegment.{h, cc} (clear): New function.
 
- 	* src/Segment.h (clear): New function.
 
- 	* src/SegmentMan.{h, cc} (validatePieceHash): Removed.
 
- 	* test/SegmentTest.cc
 
- 	* test/GrowSegmentTest.cc
 
- 2007-10-12  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Do not send referer when redirected.
 
- 	* src/Request.cc (redirectUrl)
 
- 	* test/RequestTest.cc
 
- 	* test/HttpRequestTest.cc
 
- 2007-10-12  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Implemented BitTorrent/http/ftp integrated download.
 
- 	I've rewritten lots of files and now some headers have forward
 
- 	class declarations to reduce compile time.
 
- 	The implementation is extremely alpha stage, I recommend to use this
 
- 	for testing purpose only.
 
- 2007-09-14  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Fixed the compilation error on 64bit platform.
 
- 	* test/HttpHeaderProcessorTest.cc
 
- 2007-09-12  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Merged Ross's patch that fixes compilation problem in MinGW
 
- 	* test/DefaultBtProgressInfoFileTest.cc
 
- 2007-09-09  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Updated fr.po by sebone
 
- 	* po/fr.po
 
- 	Updated man page.
 
- 	* doc/aria2c.1.txt
 
- 	
 
- 	* Release 0.11.3
 
- 	
 
- 2007-09-05  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/MetalinkRequestInfo.cc (execute): Fixed BitTorrent download
 
- 	failure in Metalink.
 
- 2007-09-03  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Automatically save *.aria2 control file of http/ftp download in every
 
- 	60 seconds.
 
- 	* src/AutoSaveCommand.{h, cc}: New class.
 
- 	* src/TimeBasedCommand.{h, cc}: New class.
 
- 	* src/DownloadEngineFactory.cc (newConsoleEngine)
 
- 	Disable parameterized URI support by default. Added -P option to
 
- 	enable the feature.
 
- 	* src/prefs.h: Added PREF_PARAMETERIZED_URI
 
- 	* src/OptionHandlerFactory.cc
 
- 	* src/main.cc: Also updated usages for -Z and --auto-file-renaming
 
- 	Updated Japanese translation.
 
- 	* po/ja.po
 
- 	Updated man page.
 
- 	* doc/aria2c.1.txt
 
- 	
 
- 	* Release 0.11.3-rc
 
- 2007-09-02  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Now *.aria2 contorol file is first saved to *.aria2__temp and if
 
- 	it is successful, then renamed to *.aria2.
 
- 	This prevents *.aria2 file from being truncated	or corrupted when
 
- 	file system becomes out of space.
 
- 	* src/DefaultBtProgressInfoFile.cc (save)
 
- 	* src/SegmentMan.cc (save)
 
- 	* test/DefaultBtProgressInfoFileTest.cc (testSave): Implemented.
 
- 2007-09-01  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Reduced the fragmentation of bitfield in http/ftp download.
 
- 	* src/BitfieldMan.cc (getSparseMissingUnusedIndex)
 
- 	* test/BitfieldManTest.cc
 
- 2007-08-30  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Added the ability to disable segmented download in .metalink.
 
- 	aria2 can now recognize 'maxconnections' attribute in 'resources' and
 
- 	'url' tag.
 
- 	* src/MetalinkEntry.{h, cc}
 
- 	* src/RequestResource.{h, cc}
 
- 	* src/MetalinkRequestInfo.cc
 
- 	* src/Xml2MetalinkProcessor.cc
 
- 	* test/Xml2MetalinkProcessorTest.cc
 
- 	
 
- 2007-08-28  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Added parameterized URI support.
 
- 	* src/main.cc: -Z option added.
 
- 	* src/OptionHandlerFactory.cc
 
- 	* src/prefs.h: Added PREF_FORCE_SEQUENTIAL.
 
- 	* src/PStringDatum.h: New class.
 
- 	* src/PStringSegment.{h,cc}: New class.
 
- 	* src/PStringNumLoop.h: New class.
 
- 	* src/PStringSelect.h: New class.
 
- 	* src/NumberDecorator.h: New class.
 
- 	* src/FixedWidthNumberDecorator.h: New class.
 
- 	* src/AlphaNumberDecorator.h: New class.
 
- 	* src/PStringVisitor.h: New class.
 
- 	* src/PStringBuildVisitor.{h,cc}: New class.
 
- 	* src/ParameterizedStringParser.{h,cc}: New class.
 
- 	* src/Util.{h,cc}
 
- 	(isNumber): New function.
 
- 	(isLowercase): New function.
 
- 	(isUppercase): New function.
 
- 	(alphaToNum): New function.
 
- 	* test/ParameterizedStringParserTest.cc: New class.
 
- 	* test/AlphaNumberDecoratorTest.cc: New class.
 
- 	* test/PStringBuildVisitorTest.cc: New class.
 
- 	* test/UtilTest.cc
 
- 	(testIsNumber): New function.
 
- 	(testIsLowercase): New function.
 
- 	(testIsUppercase): New function.
 
- 	(testAlphaToNum): New function.
 
- 	
 
- 	Added '\n' after the error message
 
- 	* src/RequestInfo.h (printDownloadAbortMessage)
 
- 	Added auto file renaming feature in http(s)/ftp download.
 
- 	* src/main.cc: Added --auto-file-renaming command-line option.
 
- 	* src/OptionHandlerFactory.cc
 
- 	* src/prefs.h: Added PREF_AUTO_FILE_RENAMING
 
- 	* src/RequestGroup.{h, cc}
 
- 	(shouldCancelDownloadForSafety): Rewritten
 
- 	(tryAutoFileRenaming): New function.
 
- 	* src/SegmentMan.{h, cc} (shouldCancelDownloadForSafety): Removed.
 
- 	* src/HttpResponseCommand.cc
 
- 	(executeInternal): Removed the call to RequestGroupMan::
 
- 	isSameFileBeingDownloaded()
 
- 	* src/FtpNegotiateCommand.cc
 
- 	(recvSize): Removed the call to RequestGroupMan::
 
- 	isSameFileBeingDownloaded()
 
- 	* test/RequestGroupTest.cc: New class.
 
- 	
 
- 2007-08-26  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Merged Ross's patch: Removed setmode(). Use _CRT_fmode to enable binary
 
- 	IO.
 
- 	* src/DefaultBtProgressInfoFile.cc
 
- 	* src/MetaFileUtil.cc
 
- 	* src/SimpleLogger.cc
 
- 	* src/SegmentMan.cc
 
- 	* src/Util.cc
 
- 	* src/Platform.cc
 
- 2007-08-24  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/Xml2MetalinkProcessor.cc (getPieceHash): Added missing .c_str().
 
- 2007-08-18  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Avoid sparse files if possible, because VFAT32 doesn't support it.
 
- 	* src/DefaultDiskWriter.cc (initAndOpenFile)
 
- 	Fixed the bug that prevents file allocation is not done when
 
- 	dowloading multi-torrent file.
 
- 	* src/AbstractDiskWriter.cc (openFile)
 
- 	
 
- 	Increase the maximum number of -j option from 15 to 45.
 
- 	* src/OptionHandlerFactory.cc (createOptionHandlers)
 
- 	Added fr.po, thanks to Charles Landemaine.
 
- 	* po/fr.po
 
- 	* po/LINGUAS
 
- 	
 
- 2007-08-10  Ross Smith II  <aria2spam at smithii dot com>
 
- 	gcc 3.4.4 support:
 
- 	* src/DefaultBtContext.cc: int32_t -> int
 
- 	* src/main.cc: int -> int32_t, int32_t -> int
 
- 	* src/messageDigest.h: uint32_t -> unsigned int
 
- 	* src/NameResolver.h: int32_t -> int
 
- 	* src/PeerConnection.cc: int -> int32_t
 
- 	* src/SpeedCalc.cc: int32_t -> int
 
- 	* src/TrackerUpdateCommand.h: int -> int32_t
 
- 	* src/Util.cc: int32_t -> int
 
- 	* src/Util.h: int32_t -> int
 
- 	* src/Xml2MetalinkProcessor.cc: int -> uint32_t, int64_t -> uint64_t
 
- 	* test/AnnounceListTest.cc: int -> int32_t
 
- 	* test/ChunkedEncodingTest.cc: int -> int32_t
 
- 	* test/DataTest.cc: int -> int32_t
 
- 	* test/DefaultBtRequestFactoryTest.cc: int -> int32_t
 
- 	* test/DefaultPeerListProcessorTest.cc: int -> int32_t
 
- 	* test/DefaultPieceStorageTest.cc: int -> int32_t
 
- 	* test/FeatureConfigTest.cc: int -> int32_t
 
- 	* test/MetalinkEntryTest.cc: int -> int32_t
 
- 	* test/MockBtRequestFactory.h: int -> int32_t
 
- 	* test/MockPieceStorage.h: int -> int32_t
 
- 	* test/OptionTest.cc: int -> int32_t
 
- 	* test/RequestTest.cc: int -> int32_t
 
- 	* test/SegmentManTest.cc: int -> int32_t
 
- 	* test/Xml2MetalinkProcessorTest.cc: int -> int32_t
 
- 	
 
- 2007-08-10  Ross Smith II  <aria2spam at smithii dot com>
 
- 	Move sleep functions to Util class:
 
- 	* src/Util.cc
 
- 	(sleep): New function.
 
- 	(usleep): New function.
 
- 	* src/DownloadCommand.cc: sleep -> Util::sleep
 
- 	* test/TimeSeedCriteriaTest.cc: sleep -> Util::sleep
 
- 	MinGW build enhancements. The following files are added:
 
- 	* src/timegm.{c,h}
 
- 	Changes to support the above new files:
 
- 	* configure.ac
 
- 	* src/Makefile.am
 
- 	* src/a2time.h
 
- 	* src/Util.cc:
 
- 	* src/strptime.c: Added support for %Z option.
 
- 	Fixed MinGW non-blocking bug.
 
- 	* src/SocketCore.cc
 
- 	* src/HttpRequestCommand.cc
 
- 	Miscellenous build fixes/enhancements.
 
- 	* configure.ac: Added summary report.
 
- 	* src/Platform.h: Tweaked #include's.
 
- 	* src/a2netcompat.h: Tweaked #include's.
 
- 	* src/strptime.h: Tweaked #include's.
 
- 	* src/gai_strerror.c: Tweaked #include's.
 
- 	* src/gai_strerror.h: _D_GETADDRINFO_H -> _D_GAI_STRERROR_H
 
- 	* src/getaddrinfo.h: Moved #ifndef __MINGW32__
 
- 	* src/gettimeofday.h: Added HAVE_CONFIG_H
 
- 2007-08-09  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Increased the initial connection size in BitTorrent download to 40.
 
- 	* src/BtRuntime.h
 
- 	Added the usage message of --peer-id-prefix option.
 
- 	* src/main.cc
 
- 	* Release 0.11.2
 
- 	
 
- 2007-08-08  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	MessageDigestHelper is introduced in order to simplify the use
 
- 	of message digest. Removed repeated code.
 
- 	The message digest algorithm is now specified by string, like "sha1",
 
- 	"md5".
 
- 	* src/messageDigest.{h, cc}
 
- 	* src/MessageDigestHelper.{h, cc}: New class.
 
- 	* src/DefaultPieceStorage.cc
 
- 	* src/DefaultBtContext.{h, cc}
 
- 	(computeFastSet): New function.
 
- 	(setInfoHash): Added for unit testing.
 
- 	(setNumPieces): Added for unit testing.
 
- 	* src/DefaultBtInteractive.cc
 
- 	* src/BtPieceMessage.cc
 
- 	* src/Peer.cc
 
- 	* src/Checksum.h
 
- 	* src/message.h
 
- 	* src/IteratableChecksumValidator.h
 
- 	* src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator
 
- 	inside it.
 
- 	* src/SegmentMan.{h, cc}
 
- 	(checkIntegrity): Removed.
 
- 	* src/IteratableChunkChecksumValidator.{h, cc}
 
- 	* src/Util.h
 
- 	(sha1Sum): Removed.
 
- 	(simpleMessageDigest): Removed.
 
- 	(fileChecksum): Removed.
 
- 	(computeFastSet): Removed.
 
- 	* src/ShaVisitor.cc
 
- 	* src/ChunkChecksum.h
 
- 	* src/DownloadCommand.cc
 
- 	Removed messageDigest virtual functions.
 
- 	* src/MultiDiskAdaptor.{h, cc}
 
- 	* src/DiskAdaptor.h
 
- 	* src/ByteArrayDiskWriter.h
 
- 	* src/DiskWriter.h
 
- 	* src/DiskAdaptorWriter.h
 
- 	* src/AbstractSingleDiskAdaptor.{h, cc}
 
- 	* src/AbstractDiskWriter.{h, cc}
 
- 	
 
- 	Fixed comilation error when message digest is disabled.
 
- 	* src/MetalinkEntry.{h, cc}
 
- 	* src/MetalinkRequestInfo.cc
 
- 	
 
- 	Removed srandom and random.
 
- 	* src/SimpleRandomizer.h
 
- 	Added size() virtual function to DiskAdaptor
 
- 	* src/MultiDiskAdaptor.h
 
- 	Fixed the bug that causes that files are not opened correctly in
 
- 	multi-file torrent.
 
- 	* src/TorrentRequestInfo.cc
 
- 	* src/MultiDiskAdaptor.cc
 
- 	
 
- 	Added SHA256 support
 
- 	* src/messageDigest.cc
 
- 	* src/Xml2MetalinkProcessor.cc
 
- 	Show supported message digest algorithms
 
- 	* src/main.cc
 
- 	Updated contact info.
 
- 	* src/main.cc
 
- 	Applied Ross's patch
 
- 	* src/a2netcompat.h
 
- 	* src/main.cc
 
- 	Fixed the bug that prevents a remote metalink from not being processed
 
- 	even if '-o foo.metalink' is specified.
 
- 	* src/MetalinkRequestInfo.cc
 
- 	
 
- 2007-08-02  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Merged Dan's patch:
 
- 	* src/ByteArrayDiskWriter.cc: ios_base -> ios
 
- 	Use va_copy to avoid core dump on amd64:
 
- 	* src/SimpleLogger.cc
 
- 	Updated contact info.
 
- 	* src/main.cc
 
- 	Added #ifdef ENABLE_MESSAGE_DIGEST to fix test errors when message
 
- 	digest is not available.
 
- 	* src/MetalinkEntry.h
 
- 	
 
- 2007-08-01  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Make a2netcompat.h include a2io.h to fix compilation error:
 
- 	* src/a2netcompat.h
 
- 	* src/SocketCore.cc: Removed include of a2io.h
 
- 	* src/Util.cc: Removed include of a2io.h
 
- 	
 
- 	Gather time related functions to a2time.h:
 
- 	* src/a2time.h: New file.
 
- 	* src/DefaultPeerStorage.cc
 
- 	* src/SimpleLogger.cc
 
- 	* src/Util.{h, cc}
 
- 	* src/SimpleRandomizer.h
 
- 	* src/TimeA2.{h,cc}
 
- 	* src/DownloadCommand.cc
 
- 	* src/main.cc
 
- 	Removed #ifdef __MINGW32__ since gai_strerror is included in
 
- 	a2netcompat.h:
 
- 	* src/NameResolver.cc
 
- 	
 
- 	Fixed compilation error without openssl:
 
- 	* src/SocketCore.{h,cc}: Moved include of openssl/err.h to SocketCore.h
 
- 	Added default block to suppress compiler warnings:
 
- 	* src/MetalinkRequestInfo.cc (AccumulateNonP2PUrl::operator())
 
- 	
 
- 2007-07-26  Ross Smith II  <aria2spam at smithii dot com>
 
- 	MinGW build enhancements. The following files are added:
 
- 	* src/gai_strerror.{c,h}
 
- 	* src/gettimeofday.{c,h}
 
- 	Changes to support the above new files:
 
- 	* configure.ac
 
- 	* src/Makefile.am
 
- 	* src/a2netcompat.h
 
- 	* src/TimeA2.cc
 
- 	* src/DefaultPeerStorage.cc
 
- 	* src/NameResolver.cc: removed mingw_strerror() function.
 
- 	* src/SocketCore.cc: removed mingw_strerror() function.
 
- 	Miscellaneous MinGW build fixes. 
 
- 	* src/a2io.h: Use _lseeki64() instead of lseek()
 
- 	* src/common.h
 
- 	* src/DefaultFileAllocator.cc
 
- 	* src/GlowFileAllocator.cc
 
- 	* src/main.cc: Moved #include "prefs.h" to quiet compile error.
 
- 	* src/NameResolver.cc
 
- 	(callback): Changed int32_t to int.
 
- 	(resolve): Changed int32_t to int.
 
- 	* src/Platform.cc
 
- 	* src/Platform.h
 
- 	* test/MultiDiskWriterTest.cc
 
- 	* test/PeerMessageUtilTest.cc
 
- 	* src/localtime_r.c: Add DeleteCriticalSection() and at exit().
 
- 	Other enhancements and fixes.
 
- 	* src/HttpRequestCommand.cc
 
- 	(executeInternal) Use non-blocking socket for HTTPS (MinGW only).
 
- 	* src/SocketCore.cc: 
 
- 	(error): New function to abstract errno/WSAGetLastError().
 
- 	(errorMsg): New function to abstract errno/WSAGetLastError().
 
- 	(initiateSecureConnection): Added more detailed error reporting.
 
- 	* src/SocketCore.h: Added private variable blocking, to allow
 
- 	proper handling of OpenSSL psuedo-errors.
 
- 	* src/message.h
 
- 	(EX_SSL_INIT_FAILURE)
 
- 	(EX_SSL_IO_ERROR)
 
- 	(EX_SSL_PROTOCOL_ERROR)
 
- 	(EX_SSL_UNKNOWN_ERROR)
 
- 	(EX_SSL_CONNECT_ERROR)
 
- 	(EX_SOCKET_BLOCKING)
 
- 	(EX_SOCKET_NONBLOCKING)
 
- 	(EX_SOCKET_UNKNOWN_ERROR)
 
- 	* src/Util.cc
 
- 	(setGlobalSignalHandler): Renamed signal to sig as signal is a
 
- 	reserved name.
 
- 	(httpGMT): Fixed typo.
 
- 2007-07-23  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Merged Ross's win32 patch(manually)
 
- 	In the course of merging, following files are added.
 
- 	* src/strptime.{h,c}
 
- 	* src/libgen.{h,c}
 
- 	* src/inet_aton.{h,c}
 
- 	* src/Platform.{h,cc}
 
- 	* src/localtime_r.{h,c}
 
- 	* src/getaddrinfo.{h,c}
 
- 	I've gethered network related things, and put them to following file:
 
- 	* src/a2netcompat.h
 
- 	Also io related things are put to following file:
 
- 	* src/a2io.h
 
- 	
 
- 	Changed %lld to %s because mingw32 doesn't recognize %lld.
 
- 	* src/message.h
 
- 	(MSG_ALLOCATION_COMPLETED)
 
- 	(EX_TOO_LARGE_FILE)
 
- 	(EX_SIZE_MISMATCH)
 
- 	(EX_FILE_OFFSET_OUT_OF_RANGE)
 
- 	(EX_INVALID_CHUNK_CHECKSUM)
 
- 	(EX_INVALID_RANGE_HEADER)
 
- 	* src/FileAllocationCommand.cc
 
- 	* src/HttpResponse.cc
 
- 	* src/RequestGroup.cc
 
- 	* src/MultiDiskAdaptor.cc
 
- 	* src/OptionHandlerImpl.h
 
- 	* src/HttpResponseCommand.cc
 
- 	* src/FtpNegotiateCommand.cc
 
- 	* src/IteratableChecksumValidator.cc
 
- 	* src/SegmentMan.cc
 
- 	* src/ChunkChecksumValidator.cc
 
- 	
 
- 	Added Randomizer::getRandomNumber(long int)
 
- 	* src/Randomizer.h (getRandomNumber)
 
- 	* src/SimpleRandomizer.h (getRandomNumber)
 
- 	* src/BitfieldMan.cc (getMissingIndexRandomly): Use this new function.
 
- 	* src/Util.cc (randomAlpha): Use this new function.
 
- 	
 
- 2007-07-21  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Converted int's to in32_t. long long int's are also converted to
 
- 	int64_t
 
- 2007-07-20  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Fixed the bug that prevents cookies from being sent to the server
 
- 	if the domain of cookie is FQDN and starts with ".".
 
- 	* src/Cookie.cc (match)
 
- 	To add the ability to change peer id.
 
- 	* src/DefaultBtContext.h
 
- 	(_peerIdPrefix): New variable
 
- 	(setPeerIdPrefix): New function.
 
- 	* src/torrentRequestInfo.cc
 
- 	(execute): Set the option value of PREF_PEER_ID_PREFIX to
 
- 	DefaultBtContext.
 
- 	* src/main.cc (main): Added peer-id-prefix command-line option.
 
- 	The usage message is not added yet.
 
- 	* src/DefaultBtContext.cc
 
- 	(generatePeerId): Use _peerIdPrefix.
 
- 	* src/prefs.h (PREF_PEER_ID_PREFIX): New definition.
 
- 	
 
- 2007-07-18  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Fixed the bug that prevents filename in content-disposition from
 
- 	being retrieved when filename is not quoted.
 
- 	* src/Util.cc (getContentDispositionFilename)
 
- 	Fixed the bug that causes infinate loop and memory leak when file open
 
- 	operation failed.
 
- 	* src/HttpResponseCommand.cc (handleDefaultEncoding)
 
- 2007-07-09  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Fixed the bug that causes segfault when all URIs specified are
 
- 	unsupported.
 
- 	* src/RequestGroupMan.cc (getInitialCommands)
 
- 	Check if RequestGroup::createNextCommand() returns empty list of
 
- 	commands.
 
- 	* src/RequestGroup.cc (createNextCommand)
 
- 	Change log level from info to error so that users can notice that
 
- 	an error occurred.
 
- 	Fixed the bug that causes segfault when a zero-sized file is
 
- 	downloaded.
 
- 	* src/BitfieldMan.cc (isAllBitSet)
 
- 	Return true if bitfieldLength is 0.
 
- 	
 
- 2007-07-08  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/main.cc
 
- 	(showUsage): Added 3 usage examples for metalink download.
 
- 	Replace MetalinkChunkChecksum with ChunkChecksum.
 
- 	* src/MetalinkChunkChecksum.h: Removed.
 
- 	* src/MetalinkEntry.h: MetalinkChunkChecksum -> ChunkChecksum.
 
- 	* src/Xml2MetalinkProcessor.h: MetalinkChunkChecksum -> ChunkChecksum.
 
- 	* src/Xml2MetalinkProcessor.cc
 
- 	(getPieceHash): Use ChunkChecksum instead of MetalinkChunkChecksum.
 
- 	* src/MetalinkRequestInfo.cc (execute)
 
- 	* Release 0.11.1
 
- 	
 
- 2007-07-06  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Reads URIs from stdin when "-i -" is specified.
 
- 	* src/UriFileListParser.h, src/UriFileListParser.cc: Removed.
 
- 	* src/UriListParser.h, src/UriListParser.cc: New class.
 
- 	* src/StreamUriListParser.h: New class.
 
- 	* src/FileUriListParser.h: New class.
 
- 	* src/main.cc (main): Use StreamUriListParser and FileUriListParser
 
- 	instead of UriFileListParser.
 
- 2007-07-04  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Made console readout more readable.
 
- 	* src/ConsoleDownloadEngine.cc (sendStatistics)
 
- 2007-07-02  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Fix the bug that causes -s option not to work.
 
- 	* src/main.cc (main)
 
- 	* src/a2algo.h: New file.
 
- 2007-07-01  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Create directory structure specified in metalink file.
 
- 	* src/RequestGroup.h, src/RequestGroup.cc
 
- 	(initAndOpenFile): Create a directory to store files if it does not
 
- 	exist.
 
- 	(getDir): New function.
 
- 	Added ETA and download speed for an individual file to readout.
 
- 	* src/ConsoleDownloadEngine.cc (sendStatistics)
 
- 	* src/RequestGroup.h
 
- 	(calculateDownloadSpeed): New function.
 
- 	
 
- 2007-06-30  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Made -S option work with metalink file and provided selective download
 
- 	to metalink.
 
- 	* src/MetalinkEntry.h, src/MetalinkEntry.cc
 
- 	(filename): Removed.
 
- 	(file): New variable.
 
- 	(size): Removed.
 
- 	(operator=): Updated.
 
- 	(getPath): New function.
 
- 	(getLength): New function.
 
- 	(toFileEntry): New function.
 
- 	* src/TorrentRequestInfo.h, src/TorrentRequestInfo.cc
 
- 	(execute): Use toStream.
 
- 	(showFileEntry): Removed.
 
- 	* src/MetalinkRequestInfo.h
 
- 	(targetFiles): New variable.
 
- 	(setTargetFiles): New variable.
 
- 	* src/MetalinkRequestInfo.cc
 
- 	(execute): Added the ability to print file information included in
 
- 	a metalink file.
 
- 	Added selective download mode to metalink.
 
- 	* src/main.cc
 
- 	(showUsage): Updated to denote that -S and --select-file options are
 
- 	applicable to metalink.
 
- 	* src/FileEntry.h
 
- 	(operator=): New function.
 
- 	(getBasename): New function.
 
- 	(getDirname): New function.
 
- 	* src/Util.h, src/Util.cc
 
- 	(toStream): New function.
 
- 	* src/Xml2MetalinkProcessor.cc: Updated.
 
- 	
 
- 	Made aria2 work with metalink with directory structure.
 
- 	* src/File.h, src/File.cc
 
- 	(getBasename): New function.
 
- 	(getDirname): New function.
 
- 	* src/RequestGroup.h, src/RequestGroup.cc
 
- 	(_topDir): New variable.
 
- 	(setTopDir): New function.
 
- 	(initSegmentMan): A directory structure is added to _segmentMan->dir.
 
- 	
 
- 	Rewrote HTTP header parsing with stringstream.
 
- 	* src/HttpConnection.h, src/HttpConnection.cc
 
- 	(HttpRequestEntry): New class.
 
- 	(headerBuf): Removed.
 
- 	(headerBufLength): Removed.
 
- 	(outstandingHttpRequests): Now its element type is
 
- 	HttpRequestEntryHandle.
 
- 	(findEndOfHeader): Removed.
 
- 	(receiveResponse): Rewritten.
 
- 	* src/HttpHeaderProcessor.h, src/HttpHeaderProcessor.cc: New class.
 
- 	
 
- 	Updated doc for -j option to notice that it should be used with -i
 
- 	option.
 
- 	* src/main.cc (showUsage)
 
- 	Removed unused classes.
 
- 	* src/RequestInfo.h
 
- 	(FileInfo): Removed.
 
- 	(checksum): Removed.
 
- 	(fileInfo): Removed.
 
- 	(setChecksum): Removed.
 
- 	(getChecksum): Removed.
 
- 	(getFileInfo): Removed.
 
- 	Use ISO units.
 
- 	* src/ConsoleDownloadEngine.cc
 
- 	* src/TorrentConsoleDownloadEngine.cc
 
- 	* src/Util.cc (abbrevSize)
 
- 	
 
- 2007-06-23  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Added the default listening ports to the help message.
 
- 	* src/main.cc (showUsage)
 
- 2007-06-20  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Reduce the number of calls to gettimeofday to lower CPU load.
 
- 	* src/TimeA2.h, src/TimeA2.cc (differenceInMillis): New function.
 
- 	* src/SpeedCalc.h, src/SpeedCalc.cc (calculateSpeed): New function.
 
- 	* src/Peer.h (calculateUploadSpeed): New function.
 
- 	(calculateDownloadSpeed): New function.
 
- 	* src/DefaultPeerStorage.cc
 
- 	(CalculateStat): Added _now variable.
 
- 	In operator(), call Peer::calculateDownloadSpeed(const struct timeval&)
 
- 	and Peer::calculateUploadSpeed(const struct timeval&)
 
- 	
 
- 	Drop connection if no request or piece message is exchanged in
 
- 	a certain interval.
 
- 	* src/DefaultBtInteractive.h
 
- 	(btRuntime): New variable.
 
- 	(inactiveCheckPoint): New variable.
 
- 	(checkActiveInteraction): New function.
 
- 	* src/DefaultBtInteractive.cc (receiveMessages): Reset timer when
 
- 	request or piece message is received.
 
- 	(checkActiveInteraction): New function.
 
- 	(doInteractionProcessing): Call checkActiveInteraction.
 
- 	Fixed the bug that causes remote Metalink and Torrent files are not
 
- 	processed.
 
- 	* src/MultiUrlRequestInfo.cc (createNextRequestInfo): Fixed the bug.
 
- 2007-06-12  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Changed format of log file.
 
- 	* src/SimpleLogger.cc
 
- 	* Release 0.11.0
 
- 	
 
- 2007-06-10  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/AbstractCommand.cc
 
- 	(execute): Changed log level of MSG_RESTARTING_DOWNLOAD and
 
- 	MSG_MAX_TRY from error to info.
 
- 	Added MSG_DOWNLOAD_ABORTED after MSG_MAX_TRY.
 
- 	* src/message.h
 
- 	(MSG_TORRENT_DOWNLOAD_ABORTED): New definition.
 
- 	(MSG_DOWNLOAD_ABORTED): Added %s.
 
- 	(MSG_RESTARTING_DOWNLOAD): Added %s.
 
- 	(MSG_DOWNLOAD_ALREADY_COMPLETED): Updated.
 
- 	
 
- 	* src/PeerAbstractCommand.cc
 
- 	(execute): MSG_DOWNLOAD_ABORTED -> MSG_TORRENT_DOWNLOAD_ABORTED
 
- 	
 
- 	* src/Request.h
 
- 	(cookieBox): Made ShardHandle.
 
- 	
 
- 	* src/RequestGroup.h, src/RequestGroup.cc
 
- 	(createNextCommandWithAdj): New function.
 
- 	* src/FileAllocationCommand.cc
 
- 	(executeInternal): Use createNextCommandWithAdj().
 
- 	* src/CheckIntegrityCommand.cc
 
- 	(executeInternal): Use createNextCommandWithAdj().
 
- 	Added --load-cookies command-option.
 
- 	* src/OptionHandlerFactory.cc
 
- 	(createOptionHandlers): Added PREF_LOAD_COOKIES.
 
- 	* src/CookieBox.h, src/CookieBox.cc: Rwritten using CookieParser.
 
- 	Now aria2 can handle cookie's expiration date.
 
- 	* src/Cookie.h (expires): Changed its type to time_t.
 
- 	* src/main.cc: Added --load-cookies command-line option.
 
- 	* src/prefs.h (PREF_LOAD_COOKIES): New definition.
 
- 	* src/Util.h, src/Util.cc (httpGMT): New function.
 
- 	* src/Request.cc (Request): Initialize cookieBox using
 
- 	CookieBoxFactory.
 
- 	* src/CookieBoxFactory.h, src/CookieBoxFactory.cc: New class.
 
- 	* src/CookieParser.h, src/CookieParser.cc: New class.
 
- 	
 
- 	* src/main.cc: Chagned the default value of --metalink-servers to 5.
 
- 	* src/HttpResponseCommand.cc
 
- 	(handleOtherEncoding): Call RequestGroup::shouldCancelDownloadForSafety
 
- 	* src/MetalinkRequestInfo.cc: Now -s option is ignored in Metalink
 
- 	download.
 
- 	
 
- 2007-06-09  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Added -j command-line option.
 
- 	* src/OptionHandlerFactory.cc (createOptionHandlers)
 
- 	* src/main.cc
 
- 	* src/ByteArrayDiskWriter.h, src/ByteArrayDiskWriter.cc
 
- 	Rewritten using stringstream.
 
- 	* src/TrackerUpdateCommand.h, src/TrackerUpdateCommand.cc
 
- 	Rewritten using stringstream.
 
- 	
 
- 2007-06-05  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Make download size shown in MB, KB.
 
- 	* src/ConsoleDownloadEngine.h (sendStatistics)
 
- 	* src/Util.h, srcUtil.cc (abbrevSize): New function.
 
- 2007-06-04  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	
 
- 	Accept incoming connections if download rate is low.
 
- 	* src/PeerListenCommand.h, src/PeerListenCommand.cc:
 
- 	(_lowestSpeedLimit): New variable.
 
- 	(setLowestSpeedLimit): New function.
 
- 	(execute): Accept incoming connections if download rate is low.
 
- 	MAX_PEERS is ignored in this case.
 
- 	Disable PREF_OUT in multiple concurrent download:
 
- 	* src/RequestGroup.h, src/RequestGroup.cc
 
- 	(setUserDefinedFilename): New function.
 
- 	* src/DownloadEngineFactory.cc
 
- 	(newConsoleEngine): Do not set PREF_OUT to requestGroup in multiple
 
- 	concurrent download.
 
- 	* src/DefaultSegmentManFactory.cc
 
- 	(createNewInstance): Comment out the line: segmentMan->ufilename = ...
 
- 	
 
- 2007-06-03  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	RequestGroup::getNextCommand() was renamed to createNextCommand().
 
- 	Added its overloaded method.
 
- 	* src/RequestGroup.h 
 
- 	(_numConcurrentCommand): New variable.
 
- 	(setNumConcurrentCommand): New function.
 
- 	* src/RequestGroup.cc
 
- 	
 
- 	Abort download if same file is being downloaded concurrently.
 
- 	* src/RequestGroup.h, src/RequestGroupMan.cc
 
- 	(isSameFileBeingDownloaded): New function.
 
- 	* src/HttpResponseCommand.cc (executeInternal)
 
- 	* src/FtpNegotiateCommand.cc (recvSize)
 
- 	* src/message.h (EX_DUPLICATE_FILE_DOWNLOAD): New definition.
 
- 	
 
- 	* main.cc: Added help message for -i option.
 
- 	
 
- 2007-06-01  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/FileAllocationCommand.cc: Derived from RealtimeCommand.
 
- 	* src/CheckIntegrityCommand.cc: Derived from RealtimeCommand.
 
- 	
 
- 	* src/MetalinkEntry.h
 
- 	(checksum): Changed to ChecksumHandle
 
- 	* src/MetalinkRequestInfo.cc
 
- 	(checksum): Changed to ChecksumHandle
 
- 	* src/File.cc
 
- 	(mkdirs): OPEN_MODE -> DIR_OPEN_MODE
 
- 	* src/common.h
 
- 	(DIR_OPEN_MODE): New definition
 
- 	* src/RequestGroup.cc
 
- 	(prepareForNextAction): Added an argument.
 
- 	* src/message.h
 
- 	(MSG_GOOD_CHECKSUM): New definition
 
- 	(MSG_BAD_CHECKSUM): New definition
 
- 	* src/HttpResponseCommand.cc
 
- 	(handleDefaultEncoding): Continue download sequence in new
 
- 	non-segmented download.
 
- 	* src/FileAllocationEntry.h
 
- 	(_nextDownloadCommand): New variable.
 
- 	* src/DownloadCommand.cc
 
- 	(prepareForNextSegment): Create ChecksumCommand if checksum is
 
- 	available.	
 
- 	* src/RealtimeCommand.h, src/RealtimeCommand.cc: New class.
 
- 	* src/IteratableChecksumValidator.h,
 
- 	src/IteratableChecksumValidator.cc: New class.
 
- 	* src/ChecksumCommand.h, src/ChecksumCommand.cc: New class.
 
- 	
 
- 2007-05-23  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Change file mode to 666:
 
- 	* src/common.h (OPEN_MODE): New definition.
 
- 	* src/File.cc
 
- 	* src/Util.cc
 
- 	* src/Directry.cc
 
- 	* src/AbstractDiskWriter.cc
 
- 	Change the level of log message "download aborted" to debug:
 
- 	* src/PeerAbstractCommand.cc (execute)
 
- 	
 
- 	* src/RequestGroup.h (RequestGroup): Initialized _hintTotalLength to 0.
 
- 	* src/TrackerWatcherCommand.cc
 
- 	(createCommand): Sleep some seconds after request failed.
 
- 	If tracker request fails more than value of PREF_TRACKER_MAX_TRIES,
 
- 	then abort tracker request.
 
- 	
 
- 2007-05-20  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* Added the simultaneous download feature.
 
- 	* src/main.cc: Print "Exception caught: " when exception is caught.
 
- 	Use CUIDCounter instead of BtRuntime::getNewCuid():
 
- 	* src/ActivePeerConnectionCommand.cc
 
- 	* src/PeerInteractionCommand.cc
 
- 	* src/BtRuntime.h
 
- 	(cuidCounter): Removed.
 
- 	(getNewCuid): Removed.
 
- 	* src/DownloadEngineFactory.cc
 
- 	* src/PeerListenCommand.cc
 
- 	* src/TrackerUpdateCommand.cc
 
- 	* src/PeerInitiateConnectionCommand.cc
 
- 	
 
- 2007-04-06  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/PeerAbstractCommand.cc
 
- 	(onAbort): Call PeerStorage::returnPeer()
 
- 	* src/DefaultPeerStorage.h, src/DefaultPeerStorage.cc
 
- 	(incomingPeers): New variable.
 
- 	(addIncomingPeer): New function.
 
- 	(returnPeer): New function.
 
- 	(onErasingPeer): New function.
 
- 	(addPeer): push_back -> push_front
 
- 	(getActivePeers): Rewritten.
 
- 	(calculateStat): Rewritten.
 
- 	* src/PeerStorage.h
 
- 	(TransferStat::copy): New function.
 
- 	(TransferStat::TransferStat): New function.
 
- 	(TransferStat::operator=): New function.
 
- 	(addIncomingPeer): New function.
 
- 	(returnPeer): New function.
 
- 	* src/PeerListenCommand.cc
 
- 	(execute): Use PeerStorage::addIncomingPeer() instead of
 
- 	Peer::addPeer().
 
- 2007-04-03  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Connect to a peer actively when download speed is lower than specified
 
- 	speed in torrent download:
 
- 	* src/ActivePeerConnectionCommand.h: New class.
 
- 2007-03-29  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	
 
- 	* src/HttpRequest.cc (createRequest): url-encode user-agent
 
- 	* src/main.cc: Fixed the bug that prevents download if .netrc
 
- 	doesn't exist.
 
- 2007-03-28  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To cache resolved hostname:
 
- 	* src/AbstractCommand.h, src/AbstractCommand.cc
 
- 	(resolveHostname): Put outside #ifdef ENABLE_ASYNC_DNS clause.
 
- 	Added dns cache.
 
- 	* src/FtpInitiateConnectionCommand.cc
 
- 	(executeInternal): Removed #ifdef ENABLE_ASYNC_DNS.
 
- 	* src/NameResolver.h, src/NameResolver.cc: Added synchronized
 
- 	NameResolver working without ares.
 
- 	* src/TorrentRequestInfo.cc
 
- 	(execute): Don't cache dns in torrent download.
 
- 	* src/HttpInitiateConnectionCommand.cc
 
- 	(executeInternal): Removed #ifdef ENABLE_ASYNC_DNS
 
- 	* src/DNSCache.h: New class.
 
- 	* src/UrlRequestInfo.cc
 
- 	(execute): Use dns cache.
 
- 	In http request, suppress port number in http request header if port
 
- 	is 80 or 443:
 
- 	* src/HttpRequest.cc (getHostText): Suppress port number in http
 
- 	request header if port is 80 or 443.
 
- 	(createProxyRequest): Allways send port number.
 
- 2007-03-28  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add the command-line option which disables netrc support:
 
- 	* src/OptionHandlerFactory.cc
 
- 	(createOptionHandlers): Added PREF_NO_NETRC.
 
- 	* src/main.cc: Added -n option.
 
- 	* src/prefs.h (PREF_NO_NETRC): New definition.
 
- 	* src/RequestFactory.cc: Do not use netrc in ftp if PREF_NO_NETRC is
 
- 	V_TRUE.
 
- 	Note that netrc is not used in http, http proxy even if PREF_NO_NETRC
 
- 	is V_FALSE. This may get configurable in the future release.
 
- 	
 
- 	To clear peer's error status by time basis:
 
- 	* src/PeerAbstractCommand.cc
 
- 	(onAbort): Call Peer::startBadCondition().
 
- 	* src/Peer.h, src/Peer.cc
 
- 	(error): Removed.
 
- 	(_badConditionStartTime): New variable.
 
- 	(_badConditionInterval): New variable. Initialized to 10 seconds.
 
- 	(startBadCondition): New function.
 
- 	(isGood): New function.
 
- 	* src/DefaultPeerStorage.cc
 
- 	(addPeer): Use Peer::isGood().
 
- 	(FindFinePeer): Use Peer::isGood().
 
- 	Always include port number in http request header:
 
- 	* src/HttpRequest.cc (getHostText): Always include port number in
 
- 	http request header.
 
- 	
 
- 2007-03-26  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To the ability to read options from a config file:
 
- 	* src/main.cc: Command-line parameter validation is delegated to
 
- 	OptionHandler class.
 
- 	* src/OptionHandlerFactory.h, src/OptionHandlerFactory.cc: New class.
 
- 	* src/Option.h, src/Option.cc (clear): New function.
 
- 	* src/OptionParser.h, src/OptionParser.cc: New class.
 
- 	* src/OptionHandler.h: New class.
 
- 	* src/NameMatchOptionHandler.h: New class.
 
- 	* src/OptionHandlerImpl.h: New classes.
 
- 	* src/prefs.h: '_' -> '-'
 
- 	(FTP_PASV_ENABLED): Renamed to FTP_PASV.
 
- 	(FTP_PASV): New definition.
 
- 	* src/Util.h, src/Util.cc (getRealSize): New function.
 
- 	
 
- 	To disable netrc support if .netrc file does not have correct
 
- 	permissions:
 
- 	* src/File.h, src/File.cc (mode): New function.
 
- 	To prevent confidential information to be logged:
 
- 	* src/HttpConnection.h, src/HttpConnection.cc
 
- 	(eraseConfidentialInfo): New function.
 
- 	(sendRequest): Call eraseConfidentialInfo().
 
- 	(sendProxyRequest): Call eraseConfidentialInfo().
 
- 	* src/main.cc: Validate permissions of .netrc file.
 
- 	
 
- 	To add --user-agent command-line option:
 
- 	* src/main.cc: Added new command line option: --user-agent
 
- 	* src/prefs.h (PREF_USER_AGENT): New definition.
 
- 	* src/HttpRequestCommand.cc (executeInternal): Set user-agent option
 
- 	parameter to HttpRequest object.
 
- 	* src/AbstractProxyRequestCommand.cc
 
- 	(executeInternal): Set user-agent option parameter to HttpRequest
 
- 	object.
 
- 	
 
- 	Marged the patches from Dan Fandrich.
 
- 	
 
- 2007-03-25  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Use filename and size from Metalink file instead of sending HEAD
 
- 	request:
 
- 	* src/UrlRequestInfo.h
 
- 	(_filename): New variable.
 
- 	(_totalLength): New variable.
 
- 	(setTotalLength): New variable.
 
- 	(setFilename): New variable.
 
- 	* src/MetalinkRequestInfo.cc
 
- 	(execute): Set filename and size to UrlRequestInfo
 
- 	* src/UrlRequestInfo.cc
 
- 	(execute): Use filename and size from Metalink instead of seding
 
- 	HEAD request to servers.
 
- 2007-03-24  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add the ability to resume downloading a partially downloaded file
 
- 	which is downloaded from the beginning:
 
- 	* src/FileAllocator.h: Made abstract class. New DefaultFileAllocator
 
- 	takes this role.
 
- 	* src/main.cc: Added -c option.
 
- 	* src/BitfieldMan.h, src/BitfieldMan.cc (setBitRange): New function.
 
- 	* src/DiskWriter.h (openExistingFile): Added totalLength argument.
 
- 	* src/prefs.h (PREF_CONTINUE): New definition.
 
- 	* src/SegmentMan.h, src/SegmentMan.cc (markPieceDone): New function.
 
- 	* src/DefaultDiskWriter.cc
 
- 	(createNewDiskWriter): Add GlowFileAllocator to the new object.
 
- 	* src/AbstractDiskWriter.h
 
- 	(glowFileAllocator): New variable.
 
- 	* src/AbstractDiskWriter.cc
 
- 	(openExistingFile): Now preallocate file space from the end of the
 
- 	existing file if totalLength argument is specified and grater than 0.
 
- 	* src/UrlRequestInfo.cc: If -c option is specified and the file
 
- 	to download exists in local, continue the download of the file.
 
- 	--allow-overwrite=true is assumed in this context.
 
- 	* src/DefaultFileAllocator.h, src/DefaultFileAllocator.cc: New class.
 
- 	* src/GlowFileAllocator.h, src/GlowFileAllocator.cc: New class.
 
- 	Throw exception if --check-integrity=true is specified but chunk
 
- 	checksums are not provided:
 
- 	* src/UrlRequestInfo.cc
 
- 	Do not print URLs to stdout:
 
- 	* src/UrlRequestInfo.cc
 
- 	
 
- 2007-03-21  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/Request.h: Use AuthResolver to get authentication information.
 
- 	* src/main.cc: Made RequestFactory a singleton object. Netrc is now
 
- 	set to RequestFactory object.
 
- 	* src/AuthConfigItem.h, src/AuthConfigItem.cc: Removed.
 
- 	* src/AuthConfig.h, src/AuthConfig.cc: Rewritten.
 
- 	* src/TrackerWatcherComand.cc: Use RequestFactorySingletonHolder to
 
- 	create Request object.
 
- 	
 
- 2007-03-19  Tatsuhiro Tsujikawa  <tujikawa at valkyrie dot rednoah com>
 
- 	To integrate Netrc into exsiting classes:
 
- 	* src/Request.h
 
- 	(_userDefinedAuthConfig): New variable.
 
- 	(findNetrcAuthenticator): New function.
 
- 	(segment): Removed.
 
- 	(setUserDefinedAuthConfig): New function.
 
- 	(resolveHttpAuthConfigItem): New function.
 
- 	(resolveFtpAuthConfigItem): New function.
 
- 	(resolveHttpProxyAuthConfigItem): New function.
 
- 	* src/HttpRequest.h
 
- 	(authConfig): Removed.
 
- 	(proxyAuthConfig): Removed.
 
- 	(setAuthConfig): Removed.
 
- 	(setProxyAuthConfig): Removed.
 
- 	* src/UrlRequest.h
 
- 	(getHeadResult): Added a parameter: authConfigHandle
 
- 	* src/common.h
 
- 	(SingletonHolder.h): New include.
 
- 	* src/main.cc
 
- 	(Netrc.h): New include.
 
- 	(main): Removed initial values of PREF_FTP_USER, PREF_FTP_PASSWD.
 
- 	Added initial value of PREF_NETRC_PATH.
 
- 	Added the initialization of netrc.
 
- 	* src/AuthConfig.h: New class.
 
- 	* src/prefs.h
 
- 	(PREF_NETRC_PATH): New definition.
 
- 	* src/HttpAuthConfig.h: Removed.
 
- 	* src/Netrc.cc
 
- 	(getRequiredNextToken): New function.
 
- 	(skipMacdef): New function.
 
- 	(parse): Rewritten.
 
- 	* src/Netrc.h
 
- 	(getRequiredNextToken): New function.
 
- 	(skipMacdef): New function.
 
- 	* src/Util.h, src/Util.cc
 
- 	(getHomeDir): New function.
 
- 	* src/TrackerWatcherComand.cc
 
- 	(createRequestCommand): Use AuthConfig.
 
- 	* src/FtpConnection.cc
 
- 	(sendUser): Use Request::resolveFtpAuthConfigItem().
 
- 	(sendPass): Use Request::resolveFtpAuthConfigItem().
 
- 	* src/Request.cc
 
- 	(findNetrcAuthenticator): New function.
 
- 	(resolveHttpAuthConfigItem): New function.
 
- 	(resolveFtpAuthConfigItem): New function.
 
- 	(resolveHttpProxyAuthConfigItem): New function.
 
- 	* src/UrlRequestInfo.cc: Use AuthConfig.
 
- 	* src/HttpRequest.cc
 
- 	(createRequest): Use authConfig.
 
- 	(getProxyAuthString): Use authConfig.
 
- 	(configure): Removed PREF_HTTP_USER, PREF_HTTP_PASSWD,
 
- 	PREF_HTTP_PROXY_USER, PREF_HTTP_PROXY_PASSWD.
 
- 	
 
- 2007-03-16  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To reduce overhead to find commands whose socket is either
 
- 	readable or writable in the download engine loop:
 
- 	* src/Command.h, src/Command.cc
 
- 	(STATUS): New enum.
 
- 	(status): New variable.
 
- 	(statusMatch): New function.
 
- 	(setStatusActive): New function.
 
- 	(setStatusInactive): New function.
 
- 	* src/DownloadEngine.h, src/DownloadEngine.cc
 
- 	(executeCommand): New function.
 
- 	(run): Simplified.
 
- 	(waitData): Call Command::setStatusActive() when command's socket is
 
- 	readable or writable.
 
- 2007-03-15  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To handle Segment as SegmentHandle:
 
- 	* src/AbstractCommand.cc (execute): Rewritten.
 
- 	* src/SegmentMan.h: Segment -> SegmentHandle
 
- 	Introducded HttpResponse class, HttpRequest class to improve code
 
- 	extensiveness and make it clear:
 
- 	* src/HttpDownloadCommand.cc: transfer encoders are now managed by
 
- 	HttpResponse class.
 
- 	* src/HttpRequest.h, src/HttpRequest.cc: New class.
 
- 	* src/HttpResponse.h, src/HttpResponse.cc: New class.
 
- 	* src/HttpConnection.cc: Contruction of http request were moved to
 
- 	HttpRequest class.
 
- 	* src/HttpResponseCommand.h, src/HttpResponseCommand.cc: Refactored.
 
- 	* src/HttpRequestCommand.cc (executeInternal): Rewritten.
 
- 	* src/HttpAuthConfig.h: New class.
 
- 	* src/Range.h: New class.
 
- 	
 
- 	To make FtpTunnel{Request, Response}Command and
 
- 	HttpProxy{Request, Response}Command derived from
 
- 	AbstractProxy{Request, Response}Command:
 
- 	* src/FtpTunnelResponseCommand.h, src/FtpTunnelResponseCommand.cc:
 
- 	Derived from AbstractProxyRequestCommand class.
 
- 	* src/FtpTunnelRequestCommand.h, src/FtpTunnelRequestCommand.cc:
 
- 	Derived from AbstractProxyResponseCommand class.
 
- 	* src/HttpProxyRequestCommand.h, src/HttpProxyRequestCommand.cc:
 
- 	Derived from AbstractProxyRequestCommand class.
 
- 	* src/HttpProxyResponseCommand.h, src/HttpProxyResponseCommand.cc:
 
- 	Derived from AbstractProxyResponseCommand class.
 
- 	* src/AbstractProxyRequestCommand.h, src/AbstractProxyRequestCommand.cc
 
- 	: New class.
 
- 	* src/AbstractProxyResponseCommand.h,
 
- 	src/AbstractProxyResponseCommand.cc: New class.
 
- 	To add netrc support:
 
- 	* src/Netrc.h, src/Netrc.cc: New class.
 
- 	* src/Util.h, src/Util.cc (split): New function.
 
- 	
 
- 	* src/HttpHeader.cc (getRange): Fixed so that it inspects
 
- 	"Content-Range" header instead of "Range" header.
 
- 	* src/HttpHeader.h
 
- 	(getStatus): Removed.
 
- 	(setStatus): Removed.
 
- 	* src/Segment.h
 
- 	(getPositionToWrite): New function.
 
- 	
 
- 2007-03-05  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/HttpHeader.h
 
- 	(Range.h): New include.
 
- 	(status): New variable.
 
- 	(HttpHeader): Initialized status with 0.
 
- 	(getStatus): New function.
 
- 	(setStatus): New function.
 
- 	(getRange): New function.
 
- 	(HttpHeaderHandle): New function.
 
- 	* src/HttpHeader.cc
 
- 	(getRange): New function.
 
- 	* src/Request.h
 
- 	(RequestWeakHandle): New definition.
 
- 	* src/HttpConnection.h
 
- 	(HttpConnectionHandle): New type definition.
 
- 	* src/HttpConnection.cc
 
- 	(receiveResponse): Set HTTP status to headers.
 
- 	* src/main.cc
 
- 	(showUsage): Fixed typo.
 
- 	* src/Segment.h
 
- 	(SegmentHandle): New type definition.
 
- 	* src/BitfieldMan.h
 
- 	(getMissingUnusedLength): New function.
 
- 	* src/BitfieldMan.cc
 
- 	(getMissingUnusedLength): New function.
 
- 	
 
- 2007-02-12  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To fix static initialization order problem:
 
- 	* src/BitfieldManFactory.h
 
- 	(defaultRandomizer): Removed.
 
- 	(factory): New variable.
 
- 	(getNewFactory): Removed.
 
- 	(getFactoryInstance): New function.
 
- 	(setDefaultRandomizer): Rewritten.
 
- 	(getDefaultRandomizer): Rewritten.
 
- 	* src/BitfieldManFactory.cc
 
- 	(defaultRandomizer): Removed.
 
- 	(factory): Initialized to 0.
 
- 	(BitfieldManFactory): Initialized randomizer to 0.
 
- 	* src/DefaultPieceStorage.cc
 
- 	(DefaultPieceStorage): getNewFactory() -> getFactoryInstance()
 
- 	* src/Peer.cc
 
- 	(Peer): getNewFactory() -> getFactoryInstance()
 
- 	* src/SegmentMan.cc
 
- 	(initBitfield): getNewFactory() -> getFactoryInstance()
 
- 	* src/Piece.cc
 
- 	(Piece): getNewFactory() -> getFactoryInstance()
 
- 	
 
- 2007-02-06  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To fix the bug that causes crash on Max OS X:
 
- 	
 
- 	* src/SimpleRandomizer.h
 
- 	(getInstance): Create new instance if the static variable is null.
 
- 	* src/SimpleRandomizer.cc
 
- 	(randomizer): Initialized to 0.
 
- 	* src/BitfieldManFactory.h
 
- 	(getNewFactory): Removed the call to setRandomizer().
 
- 	
 
- 	To fix the miscalculation of the range of checksum:
 
- 	
 
- 	* src/BitfieldMan.h
 
- 	(isBitSetOffsetRange): New function.
 
- 	* src/BitfieldMan.cc
 
- 	(isBitSetOffsetRange): New function.
 
- 	* src/SegmentMan.cc
 
- 	(tryChunkChecksumValidation): Use BitfieldMan::isBitSetOffsetRange().
 
- 	Use bitfield->getBlockLength() instead of segment.segmentLength.
 
- 	* Release 0.10.1
 
- 	
 
- 2007-02-03  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To lower CPU usage in BitTorrent download when --max-upload-limit
 
- 	command-line option specified:
 
- 	
 
- 	* src/DefaultBtMessageDispatcher.cc
 
- 	(sendMessages): Calculate uploading speed only when current message
 
- 	is uploading data and is not sent yet.
 
- 	
 
- 	* src/DefaultPeerStorage.h
 
- 	(MAX_PEER_LIST_SIZE): 100 -> 60, because 60 is well enough.
 
- 	* src/HttpResponseCommand.cc
 
- 	(handleDefaultEncoding): Added the cast to int32_t to itos.
 
- 	This fixes compile error in Soralis 10.
 
- 2007-01-30  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To fix segfault in Metalink download:
 
- 	
 
- 	* src/UrlRequestInfo.h
 
- 	(filename): Removed.
 
- 	(totalLength): Removed.
 
- 	(setTotalLength): Removed.
 
- 	(setFilename): Removed.
 
- 	* src/MetalinkRequestInfo.cc
 
- 	(execute): Do not set filename and totalLength to reqInfo.
 
- 	Set chunk checksum to reqInfo if it is not null.
 
- 	
 
- 	* src/HttpResponseCommand.cc
 
- 	(executeInternal): Fixed filename in log.
 
- 	(handleDefaultEncoding): Removed the call to initBitfield() and
 
- 	markAllPiecesDone().
 
- 	(handleOtherEncoding): Added HEAD method handling.
 
- 	
 
- 	* src/FtpNegotiateCommand.cc
 
- 	(executeInternal): Added SEQ_HEAD_OK handling.
 
- 	(recvSize): In HEAD handling, set sequence to SEQ_HEAD_OK and
 
- 	return false.
 
- 	
 
- 	* src/FtpNegotiateCommand.h
 
- 	(SEQ_HEAD_OK): New definition.
 
- 	
 
- 	* src/SegmentMan.cc
 
- 	(initBitfield): Delete bitfield.
 
- 	(isChunkChecksumValidationReady): Fixed the condition.
 
- 	* src/UrlRequestInfo.cc: Fixed so that Metalink and Torrent download
 
- 	works fine.
 
- 	
 
- 2007-01-28  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/Xml2MetalinkProcessor.h
 
- 	(xpathExists): New function.
 
- 	* src/Xml2MetalinkProcessor.cc
 
- 	(xpathExists): New function.
 
- 	Not to send HEAD request if filename and size are available in Metalink
 
- 	file:
 
- 	* src/UrlRequestInfo.h
 
- 	(filename): New variable.
 
- 	(totalLength): New variable.
 
- 	(setTotalLength): New function.
 
- 	(setFilename): New function.
 
- 	* src/MetalinkRequestInfo.cc
 
- 	(execute): Set filename and size to UrlRequestInfo.
 
- 	* src/MetalinkEntry.cc
 
- 	(MetalinkEntry): Initialize size with 0.
 
- 	* src/UrlRequestInfo.cc
 
- 	(execute): Set filename and size to SegmentMan.
 
- 	
 
- 	Not to download rest of the files after selected files are downloaded
 
- 	in BitTorrent:
 
- 	* src/PieceStorage.h
 
- 	(allDownloadFinished): New function.
 
- 	* src/DefaultBtAnnounce.cc
 
- 	(isCompleteAnnounceReady): Use allDownloadFinished instead of
 
- 	downloadFinished.
 
- 	(getAnnounceUrl): Use allDownloadFinished instead of downloadFinished.
 
- 	* src/DefaultPieceStorage.cc
 
- 	(completePiece): Use allDownloadFinished instead of downloadFinished.
 
- 	Commented out the call to finishSelectiveDownloadingMode().
 
- 	(downloadFinished): Call isFilteredAllBitSet() instead of
 
- 	isAllBitSet().
 
- 	(allDownloadFinished): New function.
 
- 	* src/DefaultBtInteractive.cc
 
- 	(addBitfieldMessageToQueue): Call allDownloadFinished() instead of
 
- 	downloadFinished().
 
- 	(checkHave): Call allDownloadFinished() instead of downloadFinished().
 
- 	* src/TorrentDownloadEngine.cc
 
- 	(onEndOfRun): Call allDownloadFinished() instead of downloadFinished().
 
- 	* src/BitfieldMan.h
 
- 	(isFilteredAllBitSet): New function.
 
- 	* src/ShareRatioSeedCriteria.h
 
- 	(PieceStorage.h): New include.
 
- 	(pieceStorage): New variable.
 
- 	(evaluate):
 
- 	btContext->getTotalLength() -> pieceStorage->getCompletedLength()
 
- 	* src/BitfieldMan.cc
 
- 	(isFilteredAllBitSet): New function.
 
- 	(isAllBitSet): Filter is not took into account.
 
- 	
 
- 	Rename --force-truncate as --allow-overwrite:
 
- 	* src/TorrentRequestInfo.cc
 
- 	(execute): PREF_FORCE_TRUNCATE -> PREF_ALLOW_OVERWRITE
 
- 	* src/main.cc
 
- 	(showUsage): --force-truncate -> --allow-overwrite
 
- 	* src/message.h
 
- 	(EX_FILE_ALREADY_EXISTS): --force-truncate -> --allow-overwrite
 
- 	* src/prefs.h
 
- 	(PREF_FORCE_TRUNCATE): Removed.
 
- 	(PREF_ALLOW_OVERWRITE): New definition.
 
- 	* src/SegmentMan.cc
 
- 	(shouldCancelDownloadForSafety): --force-truncate -> --allow-overwrite
 
- 	
 
- 	* src/MetalinkRequestInfo.cc
 
- 	(execute): Queueing message are now logged in info level.
 
- 	* src/common.h
 
- 	(LONG_LONG_MAX): Removed.
 
- 	(LONG_LONG_MIN): Removed.
 
- 	* src/HttpResponseCommand.cc
 
- 	(handleDefaultEncoding): LONG_LONG_MAX -> INT64_MAX
 
- 	* src/FtpNegotiateCommand.cc
 
- 	(recvSize): LONG_LONG_MAX -> INT64_MAX
 
- 	
 
- 	* src/main.cc
 
- 	(showUsage): Added --check-integriy and --realtime-chunk-checksum
 
- 	command-line option.
 
- 	(main): Added --check-integriy and --realtime-chunk-checksum
 
- 	command-line option.
 
- 	--force-truncate -> --allow-overwrite
 
- 	Set initial value of --check-integrity option to false.
 
- 	Don't show usage when error occurs while persing command-line options.
 
- 	Removed deprecated --upload-limit option.
 
- 2007-01-26  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/message.h: Added EX_INVALID_PAYLOAD_SIZE and
 
- 	EX_INVALID_BT_MESSAGE_ID. Following source files affected.
 
- 	* src/BtAllowedFastMessage.cc:
 
- 	* src/BtBitfieldMessage.cc
 
- 	* src/BtCancelMessage.cc
 
- 	* src/BtChokeMessage.cc
 
- 	* src/BtHaveAllMessage.cc
 
- 	* src/BtHaveMessage.cc
 
- 	* src/BtHaveNoneMessage.cc
 
- 	* src/BtInterestedMessage.cc
 
- 	* src/BtNotInterestedMessage.cc
 
- 	* src/BtPieceMessage.cc
 
- 	* src/BtPortMessage.cc
 
- 	* src/BtRejectMessage.cc
 
- 	* src/BtRequestMessage.cc
 
- 	* src/BtSuggestPieceMessage.cc
 
- 	* src/BtUnchokeMessage.cc
 
- 	* src/message.h: Added EX_INVALID_CHUNK_CHECKSUM. Following source
 
- 	files are affected.
 
- 	* src/ChunkChecksumValidator.cc
 
- 	* src/SegmentMan.cc
 
- 2007-01-23  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add chunk checksum validation:
 
- 	* src/MetalinkEntry.h
 
- 	(MetalinkChunkChecksum.h): New include.
 
- 	(chunkChecksum): New variable.
 
- 	* src/Request.h
 
- 	(method): New variable.
 
- 	(setMethod): New function.
 
- 	(getMethod): New function.
 
- 	(METHOD_GET): New static constant.
 
- 	(METHOD_HEAD): New static constant.
 
- 	* src/Xml2MetalinkProcessor.h
 
- 	(getPieceHash): New function.
 
- 	* src/PieceStorage.h
 
- 	(markAllPiecesDone): New function.
 
- 	(checkIntegrity): New function.
 
- 	* src/FileAllocator.h
 
- 	(NullFileAllocationMonitor.h): New include.
 
- 	(FileAllocator): Initialize fileAllocationMonitor with new
 
- 	NullFileAllocationMonitor().
 
- 	* src/MultiDiskAdaptor.h
 
- 	(messageDigest.h): Remove include.
 
- 	(ctx): Removed.
 
- 	(hashUpdate): Added ctx.
 
- 	(MultiDiskAdaptor): Removed ctx.
 
- 	(sha1Sum): Renamed as messageDigest.
 
- 	(messageDigest): New function.
 
- 	* src/UrlRequestInfo.h
 
- 	(HeadResult): New class.
 
- 	(digestAlgo): New variable.
 
- 	(chunkChecksumLength): New variable.
 
- 	(chunkChecksums): New variable.
 
- 	(getHeadResult): New function.
 
- 	(UrlRequestInfo): Added digestAlgo, chunkChecksumLength.
 
- 	(setDigestAlgo): New function.
 
- 	(setChunkChecksumLength): New function.
 
- 	(setChunkChecksums): New function.
 
- 	* src/DefaultPieceStorage.cc
 
- 	(DiskAdaptorWriter.h): New include.
 
- 	(ChunkChecksumValidator.h): New include.
 
- 	(markAllPiecesDone): New function.
 
- 	(checkIntegrity): New function.
 
- 	* src/DefaultBtContext.h
 
- 	(getPieceHashes): New function.
 
- 	* src/TorrentRequestInfo.cc
 
- 	(execute): Try to validate chunk checksum if file already exists and
 
- 	.aria2 file doesn't there and user allows aria2 to overwrite it.
 
- 	* src/messageDigest.h
 
- 	(~MessageDigestContext): Added digestFree().
 
- 	* src/MetalinkRequestInfo.cc
 
- 	(execute): Set digestAlgo, chunkChecksum, chunkChecksums to reqInfo.
 
- 	* src/DiskAdaptor.h
 
- 	(messageDigest.h): New include.
 
- 	(sha1Sum): Renamed as messageDigest.
 
- 	(messageDigest): New function.
 
- 	* src/DownloadCommand.h
 
- 	(PeerStat.h): New include.
 
- 	(maxDownloadSpeedLimit): New variable.
 
- 	(startupIdleTime): New variable.
 
- 	(lowestDownloadSpeedLimit): New variable.
 
- 	(peerStat): New variable.
 
- 	(setMaxDownloadSpeedLimit): New function.
 
- 	(setStartupIdleTime): New function.
 
- 	(setLowestDownloadSPeedLimit): New function.
 
- 	* src/BtContext.h
 
- 	(getPieceHashes): New function.
 
- 	* src/main.cc
 
- 	(main): Set PREF_REALTIME_CHUNK_CHECKSUM and PREF_CHECK_INTEGRITY
 
- 	option to true for testing purpose.
 
- 	* src/BtPieceMessage.cc
 
- 	(checkPieceHash): Use messageDigest
 
- 	* src/DownloadEngine.cc
 
- 	(SetDescriptor): Removed.
 
- 	(AccumulateActiveCommand): Removed.
 
- 	(waitData): Rewritten.
 
- 	(updateFdSet): Rewritten.
 
- 	* src/MultiDiskAdaptor.cc
 
- 	(hashUpdate): Added ctx.
 
- 	(sha1Sum): Renamed as messageDigest.
 
- 	(messageDigest): New function.
 
- 	* src/BitfieldMan.h
 
- 	(isBitRangeSet): New function.
 
- 	(unsetBitRange): New function.
 
- 	* src/ByteArrayDiskWriter.h
 
- 	(sha1Sum): Renamed as messageDigest.
 
- 	(messageDigest): New function.
 
- 	* src/ConsoleDownloadEngine.cc
 
- 	(calculateStatistics): If nspeed < 0 then set nspeed to 0.
 
- 	* src/DiskWriter.h
 
- 	(messageDigest.h): New include.
 
- 	(sha1Sum): Renamed as messageDigest.
 
- 	(messageDigest): New function.
 
- 	* src/ChunkChecksumValidator.h: New class.
 
- 	* src/DiskAdaptorWriter.h: New class.
 
- 	* src/prefs.h
 
- 	(PREF_REALTIME_CHUNK_CHECKSUM): New definition.
 
- 	(PREF_CHECK_INTEGRITY): New definition.
 
- 	* src/HttpResponseCommand.cc
 
- 	(handleDefaultEncoding): Added method "HEAD" handling.
 
- 	Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
 
- 	(handleOtherEncoding):
 
- 	Added the call to e->segmentMan->shouldCancelDownloadForSafety().
 
- 	(createHttpDownloadCommand): Set maxDownloadSpeedLimit,
 
- 	startupIdleTime, lowestDownloadSpeedLimit to command.
 
- 	* src/SegmentMan.h
 
- 	(getSegmentEntryByIndex): New function.
 
- 	(getSegmentEntryByCuid): New function.
 
- 	(getSegmentEntryIteratorByCuid): New function.
 
- 	(diskWriter): DiskWriter -> DiskWriterHandle
 
- 	(pieceHashes): New variable.
 
- 	(chunkHashLength): New variable.
 
- 	(digestAlgo): New variable.
 
- 	(FindPeerStat): Removed.
 
- 	(getPeerStat): Rewritten.
 
- 	(markAllPiecesDone): New function.
 
- 	(checkIntegrity): New function.
 
- 	(tryChunkChecksumValidation): New function.
 
- 	(isChunkChecksumValidationReady): New function.
 
- 	* src/BitfieldMan.cc
 
- 	(BitfieldMan): Initialized bitfieldLength, blocks to 0.
 
- 	(BitfieldMan): Initialized blockLength, totalLength, bitfieldLength,
 
- 	blocks to 0.
 
- 	(isBitRangeSet): New function.
 
- 	(unsetBitRange): New function.
 
- 	* src/FtpNegotiateCommand.cc
 
- 	(executeInternal): Set maxDownloadSpeedLimit,
 
- 	startupIdleTime, lowestDownloadSpeedLimit to command.
 
- 	(recvSize): Added method "HEAD" handling.
 
- 	Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
 
- 	* src/AbstractSingleDiskAdaptor.cc
 
- 	(sha1Sum): Renamed as messageDigest.
 
- 	(messageDigest): New function.
 
- 	* src/AbstractSingleDiskAdaptor.h
 
- 	(sha1Sum): Renamed as messageDigest.
 
- 	(messageDigest): New function.
 
- 	* src/Util.h
 
- 	(indexRange): New function.
 
- 	* src/MetalinkEntry.cc
 
- 	(MetalinkEntry): Initialized chunkChecksum to 0.
 
- 	* src/ShaVisitor.cc
 
- 	(~ShaVisitor): Removed the call to ctx.digestFree().
 
- 	* src/SegmentMan.cc
 
- 	(ChunkChecksumValidator.h): New include.
 
- 	(SegmentMan): Initialized chunkHashLength to 0. Initialized digestAlgo
 
- 	to DIGEST_ALGO_SHA1.
 
- 	(~SegmentMan): Removed diskWriter.
 
- 	(FindSegmentEntryByIndex): Removed.
 
- 	(FindSegmentEntryByCuid): Removed.
 
- 	(checkoutSegment): Rewritten.
 
- 	(findSlowerSegmentEntry): Rewritten.
 
- 	(getSegment): Rewritten.
 
- 	(updateSegment): Rewritten.
 
- 	(completeSegment): Rewritten.
 
- 	(markAllPiecesDone): New function.
 
- 	(checkIntegrity): New function.
 
- 	(isChunkChecksumValidationReady): New function.
 
- 	(tryChunkChecksumValidation): New function.
 
- 	* src/Xml2MetalinkProcessor.cc
 
- 	(getEntry): Get size and set it to entry.
 
- 	Get chunk checksum and set it to entry.
 
- 	(getPieceHash): New function.
 
- 	* src/Util.cc
 
- 	(sha1Sum): Removed ctx.digestFree()
 
- 	(fileChecksum): Removed ctx.digestFree()
 
- 	(indexRange): New function.
 
- 	* src/Request.cc
 
- 	(METHOD_GET): New variable.
 
- 	(METHOD_HEAD): New variable.
 
- 	(Request): Added method.
 
- 	* src/UrlRequestInfo.cc
 
- 	(FatalException.h): New include.
 
- 	(message.h): New include.
 
- 	(operator<<): Added operator<< for class HeadResult.
 
- 	(getHeadResult): New function.
 
- 	(execute): Get filename and size in separate download engine.
 
- 	* src/ChunkChecksumValidator.cc: New class.
 
- 	* src/DownloadCommand.cc:
 
- 	(DownloadCommand): Added peerStat.
 
- 	(executeInternal): Use maxDownloadSpeedLimit member instead of getting
 
- 	the value from Option.
 
- 	The buffer size is now 16KB.
 
- 	Use peerStat member instead of getting it from SegmentMan.
 
- 	Use startupIdleTime member instead of gettingit from Option.
 
- 	Added chunk checksum validation.
 
- 	* src/AbstractDiskWriter.cc
 
- 	(AbstractDiskWriter): Removed ctx.
 
- 	(~AbstractDiskWriter): Removed ctx.digestFree()
 
- 	(writeDataInternal): Returns the return value of write.
 
- 	(readDataInternal): Returns the return value of read.
 
- 	(sha1Sum): Renamed as messageDigest
 
- 	(messageDigest): New function.
 
- 	* src/AbstractDiwkWriter.h
 
- 	(messageDigest.h): Removed include.
 
- 	(ctx): Removed.
 
- 	(sha1Sum): Renamed as messageDigest
 
- 	(messageDigest): New function.
 
- 	* src/DefaultPieceStorage.h
 
- 	(markAllPiecesDone): New function.
 
- 	(checkIntegrity): New function.
 
- 	* src/NullFileAllocationMonitor.h: New class.
 
- 	* src/MetalinkChunkChecksum.h: New class.
 
- 	
 
- 2007-01-16  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To decrease CPU usage in bittorrent download, calculation results in
 
- 	BitfieldMan were cached and realtime fetching PeerObject was removed
 
- 	with WeakHandle introduced. Option values are set to the objects
 
- 	by setter before download begins.
 
- 	* src/DefaultBtRequestFactory.cc: Use messageFactory member.
 
- 	* src/DefaultBtRequestFactory.h
 
- 	(dispatcher): BtMessageDispatcherHandle ->
 
- 	BtMessageDispatcherWeakHandle.
 
- 	(messageFactory): New variable.
 
- 	(setBtMessageDispatcher): BtMessageDispatcherHandle ->
 
- 	BtMessageDispatcherWeakHandle.
 
- 	(setBtMessageFactory): New function.
 
- 	* src/DefaultBtMessageDispatcher.cc:
 
- 	(sendMessages): Use maxUploadSpeedLimit instead of fetching the value
 
- 	from Option.
 
- 	(checkRequestSlotAndDoNecessaryThing): Use requestTimeout instead of
 
- 	feating the value from Option.
 
- 	Use messageFactory member.
 
- 	* src/PeerInteractionCommand.cc
 
- 	(PeerInteractionCommand): Added maxDownloadSpeedLimit.
 
- 	Add reverse dependencies to factory object.
 
- 	Set maxUploadSpeedLimit and requestTimeout and messageFactory to
 
- 	dispatcher.
 
- 	Set messageFactory to receiver.
 
- 	Set keepAliveInterval and maxDownloadSpeedLimit and messageFactory to
 
- 	btInteractive.
 
- 	Set receiver to peerObject.
 
- 	Set maxDownloadSpeedLimit to this.
 
- 	(executeInternal): Use maxDownloadSpeedLimit member.
 
- 	* src/BtChokeMessage.cc
 
- 	(doReceivedAction): Use dispatcher, requestFactory member.
 
- 	(onSendComplete): Use dispatcher member.
 
- 	* src/PeerInteractionCommand.h
 
- 	(maxDownloadSpeedLimit): New variable.
 
- 	* src/DefaultBtMessageReceiver.h
 
- 	(peerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
 
- 	(dispatcher):
 
- 	BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
 
- 	(messageFactory): New variable.
 
- 	(setPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
 
- 	(getPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
 
- 	(setDispatcher):
 
- 	BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
 
- 	(setBtMessageFactory): New function.
 
- 	* src/DefaultBtInteractive.cc
 
- 	(initiateHandshake): Use messageFactory member.
 
- 	(addBitfieldMessageToQueue): Use messageFactory member.
 
- 	(addAllowedFastMessageToQueue): Use messageFactory member.
 
- 	(decideChoking): Use messageFactory member.
 
- 	(checkHave): Use messageFactory member.
 
- 	(sendKeepAlive): Use keepAliveInterval, messageFactory member.
 
- 	(receiveMessages): Use maxDownloadSpeedLimit member.
 
- 	(decideInterest): Use messageFactory member.
 
- 	* src/BtRequestMessage.cc
 
- 	(doReceivedAction): Use messageFactory, dispatcher member.
 
- 	(onQueued): Use dispatcher member.
 
- 	* src/BtPieceMessage.cc
 
- 	(doReceivedAction): Use dispatcher member.
 
- 	(send): Use peerConnection member.
 
- 	(onWrongPiece): Use requestFactory member.
 
- 	(handleChokingEvent): Use messageFactory, dispatcher member.
 
- 	(handleCancelSendingPieceEvent): Use messageFactory, dispatcher member.
 
- 	* src/BtMessageDispatcher.h
 
- 	(BtMessageDispatcherWeakHandle): New type definition.
 
- 	* src/SimpleBtMessage.cc
 
- 	(send): Use peerConnection member.
 
- 	* src/BtRejectMessage.cc
 
- 	(doReceivedAction): Use dispatcher member.
 
- 	* src/DefaultBtMessageDispatcher.h
 
- 	(Option.h): Removed include.
 
- 	(messageFactory): New variable.
 
- 	(option): Removed.
 
- 	(maxUploadSpeedLimit): New variable.
 
- 	(requestTimeout): New variable.
 
- 	(DefaultBtMessageDispatcher): Removed option.
 
- 	Added maxUploadSpeedLimit, requestTimeout.
 
- 	(setOption): Removed.
 
- 	(getOption): Removed.
 
- 	(setMaxUploadSpeedLimit): New function.
 
- 	(setRequestTimeout): New function.
 
- 	(setBtMessageFactory): New function.
 
- 	* src/DefaultBtInteractive.h
 
- 	(btMessageReceiver):
 
- 	BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
 
- 	(dispatcher):
 
- 	BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
 
- 	(btRequestFactory):
 
- 	BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
 
- 	(peerConnection):
 
- 	PeerConnectionHandle -> PeerConnectionWeakHandle
 
- 	(messageFactory): New variable.
 
- 	(option): Removed.
 
- 	(keepAliveInterval): New variable.
 
- 	(maxDownloadSpeedLimit): New variable.
 
- 	(DefaultBtInteractive): Added keepAliveInterval, maxDownloadSpeedLimit.
 
- 	(setBtMessageReceiver):
 
- 	BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
 
- 	(setDispatcher):
 
- 	BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
 
- 	(setBtRequestFactory):
 
- 	BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
 
- 	(setPeerConnection):
 
- 	PeerConnectionHandle -> PeerConnectionWeakHandle
 
- 	(setOption): Removed.
 
- 	(setKeepAliveInterval): New function.
 
- 	(setMaxDownloadSpeedLimit): New function.
 
- 	(setBtMessageFactory): New function.
 
- 	* src/BitfieldMan.h
 
- 	(cachedNumMissingBlock): New variable.
 
- 	(cachedNumFilteredBlock): New variable.
 
- 	(cachedCompletedLength): New variable.
 
- 	(cachedFilteredComletedLength): New variable.
 
- 	(cachedFilteredTotalLength): New variable.
 
- 	(countMissingBlockNow): New function.
 
- 	(countFilteredBlockNow): New function.
 
- 	(getFilteredTotalLengthNow): New function.
 
- 	(getCompletedLengthNow): New function.
 
- 	(getFilteredCompletedLengthNow): New function.
 
- 	(updateCache): New function.
 
- 	* src/AbstractBtMessage.h
 
- 	(BtMessageDispatcher.h): New include.
 
- 	(PeerConnection.h): New include.
 
- 	(BtRequestFactory.h): New include
 
- 	(BtMessageFactory.h): New include.
 
- 	(dispatcher): New variable.
 
- 	(messageFactory): New variable.
 
- 	(peerConnection: New variable.
 
- 	(setBtMessageDispatcher): New function.
 
- 	(setPeerConnection): New function.
 
- 	(setBtMessageFactory): New function.
 
- 	(setBtRequestFactory): New function.
 
- 	* src/DefaultBtMessageFactory.cc
 
- 	(setCommonProperty): Set dispatcher, requestFactory, this,
 
- 	peerConnection to msg.
 
- 	* src/BtRegistry.h
 
- 	(BT_MESSAGE_RECEIVER): New macro.
 
- 	* src/PeerConnection.h
 
- 	(PeerConnectionWeakHandle): New type definition.
 
- 	* src/BtMessageFactory.h
 
- 	(BtMessageFactoryWeakHandle): New type definition.
 
- 	* src/BitfieldMan.cc
 
- 	(BitfieldMan): Added cachedNumMissingBlock, cachedNumFilteredBlock,
 
- 	cachedCompletedLength, cachedFilteredComletedLength,
 
- 	cachedFilteredTotalLength.
 
- 	Call updateCache().
 
- 	(countMissingBlock): Return cachedNumMissingBlock.
 
- 	(countMissingBlockNow): New function.
 
- 	(countBlock): Return cachedNumFilteredBlock if filterEnabled is true.
 
- 	(countFilteredBlockNow): New function.
 
- 	(setBit): Call updateCache().
 
- 	(unsetBit): Call updateCache().
 
- 	(setBitfield): Call updateCache().
 
- 	(clearAllBit): Call updateCache().
 
- 	(setAllBit): Use setBitInternal instead of setBit.
 
- 	Call updateCache().
 
- 	(addFilter): Call updateCache().
 
- 	(enableFilter): Call updateCache().
 
- 	(disableFilter): Call updateCache().
 
- 	(clearFilter): Call updateCache().
 
- 	(getFilteredTotalLength): Return cachedFilteredTotalLength.
 
- 	(getFilteredTotalLengthNow): New function.
 
- 	(getCompletedLength): Return cachedCompletedLength.
 
- 	(getCompletedLengthNow): New function.
 
- 	(getFilteredCompletedLength): Return cachedFilteredComletedLength.
 
- 	(getFilteredCompletedLengthNow): New function.
 
- 	(updateCache): New function.
 
- 	* src/BtMessageReceiver.h
 
- 	(BtMessageReceiverWeakHandle): New type definition.
 
- 	* src/DefaultBtMessageReceiver.cc
 
- 	(receiveHandshake): Use messageFactory member.
 
- 	(sendHandshake): Use messageFactory member.
 
- 	(receiveMessage): Use messageFactory member.
 
- 	* src/DefaultBtMessageFactory.h
 
- 	(dispatcher): New variable.
 
- 	(requestFactory): New variable.
 
- 	(peerConnection): New variablle.
 
- 	(setBtMessageDispatcher): New function.
 
- 	(setBtRequestFactory): New function.
 
- 	(setPeerConnection): New function.
 
- 	* src/SharedHandle.h
 
- 	(RefCount): New class.
 
- 	(WeakHandle): New class.
 
- 	* src/PeerObject.h
 
- 	(BtMessageReceiver.h): New include.
 
- 	(PeerObject): Added btMessageReceiver.
 
- 	(btMessageReceiver): New variable.
 
- 	* src/Util.cc
 
- 	(countBit): Simplified.
 
- 	* src/BtCancelMessage.cc
 
- 	(doReceivedAction): Use dispatcher member.
 
- 	* src/BtRequestFactory.h
 
- 	(BtRequestFactoryWeakHandle): New type definition.
 
- 	
 
- 	* src/PeerStorage.h
 
- 	(downloadSpeed): int -> uint32_t
 
- 	(uploadSpeed): int -> uint32_t
 
- 	(sessionDownloadLength): long long int -> uint64_t
 
- 	(sessionUploadLength): long long int -> uint64_t
 
- 	
 
- 2007-01-11  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add RecoverableException, FatalException:
 
- 	
 
- 	* src/AbstractCommand.cc
 
- 	(onAbort): Exception -> RecoverableException
 
- 	* src/PeerAbstractCommand.h
 
- 	(RecoverableException.h): New include.
 
- 	(onAbort): Exception -> RecoverableException.
 
- 	* src/PeerInteractionCommand.cc
 
- 	(onAbort): Exception -> RecoverableException.
 
- 	* src/PeerAbstractCommand.cc
 
- 	(execute): Exception -> RecoverableException.
 
- 	(onAbort): Exception -> RecoverableException.
 
- 	* src/TorrentRequestInfo.cc
 
- 	(execute): Exception -> RecoverableException.
 
- 	* src/MetalinkRequestInfo.cc
 
- 	(execute): Exception -> RecoverableException.
 
- 	* src/MetaFileUtil.cc: RecoverableException.
 
- 	* src/AbstractCommand.h
 
- 	(onAbort): Exception -> RecoverableException.
 
- 	* src/DlRetryEx.h: Exception -> RecoverableException.
 
- 	* src/DlAbortEx.h: Exception -> RecoverableException.
 
- 	* src/PeerListenCommand.cc: Exception -> RecoverableException.
 
- 	* src/Util.cc: Exception -> RecoverableException.
 
- 	* src/DefauldDiskWriter.cc: Exception -> RecoverableException.
 
- 	* src/TrackerUpdateCommand.cc: Exception -> RecoverableException.
 
- 	* src/UrlRequestInfo.cc: Exception -> RecoverableException.
 
- 	
 
- 	To make ID static const int
 
- 	* src/BtInterestedMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/BtPieceMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/BtChokeMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/BtHaveAllMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/BtKeepAliveMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/BtHandshakeMessage.h
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/BtSuggestPieceMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/BtPortMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/AbstractBtMessage.h
 
- 	(id): Removed.
 
- 	(AbstractBtMessage): Removed id.
 
- 	(getId): Removed.
 
- 	* src/BtHaveMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/BtAllowedFastMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/BtCancelMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/BtNotInterestedMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/BtChokeMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/BtRejectMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/BtBitfieldMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/BtUnchokeMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/BtRequestMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	* src/BtHaveMessage.h
 
- 	(ID_t): Removed.
 
- 	(ID): New variable.
 
- 	(getId): Made non-const.
 
- 	To add --force-truncate command-line option and a check whether
 
- 	the file already exists:
 
- 	
 
- 	* src/DirectDiskAdaptor.h
 
- 	(getFilePath): Made virtual public.
 
- 	* src/MultiDiskAdaptor.h
 
- 	(File.h): New include.
 
- 	(DiskWriterEntry::fileEntry): Made private.
 
- 	(DiskWriterEntry::fileExists): New function.
 
- 	(DiskWriterEntry::getFileEntry): New function.
 
- 	(fileExists): New function.
 
- 	(getFilePath): New function.
 
- 	* src/TorrentRequestInfo.cc
 
- 	(FatalException.h): New include.
 
- 	(message.h): New include.
 
- 	(RecoverableException.h): New include.
 
- 	(execute): Added a check whether file is already exists or not.
 
- 	* src/DiskAdaptor.h
 
- 	(fileExists): New function.
 
- 	(getFilePath): New function.
 
- 	* src/main.cc
 
- 	(showUsage): Added an explanation of --force-truncate command-line
 
- 	option.
 
- 	(main): Added --force-truncate command-line option.
 
- 	* src/Exception.h
 
- 	(setMsg): buf[256] -> buf[1024]
 
- 	* src/CopyDiskWriter.h
 
- 	(getFilePath): Made public virtual.
 
- 	* src/MultiDiskAdaptor.cc: fileEntry -> getFileEntry()
 
- 	(fileExists): New function.
 
- 	* src/DownloadEngineFactory.cc
 
- 	(newTorrentConsoleEngine): Don't open file here.
 
- 	* src/message.h
 
- 	(EX_FILE_ALREADY_EXISTS): New definition.
 
- 	* src/prefs.h
 
- 	(PREF_FOECE_TRUNCATE): New definition.
 
- 	* src/HttpResponseCommand.cc
 
- 	(handleDefaultEncoding): Added a check whether the file already exists.
 
- 	* src/SegmentMan.h
 
- 	(fileExists): New function.
 
- 	(shouldCancelDownloadForSafety): New function.
 
- 	* src/FtpNegotiateCommand.cc
 
- 	(recvSize): Added a check whether the file already exists.
 
- 	* src/AbstractSingleDiskAdaptor.cc
 
- 	(File.h): New include.
 
- 	(fileExists): New function.
 
- 	* src/AbstractSingleDiskAdaptor.h
 
- 	(getFilePath): Removed.
 
- 	(fileExists): New function.
 
- 	* src/SegmentMan.cc
 
- 	(fileExists): New function.
 
- 	(shouldCancelDownloadForSafety): New function.
 
- 	To fix regression bug in torrent downloading:
 
- 	
 
- 	* src/DefaultBtRequestFactory.cc
 
- 	(doChokedAction): New function.
 
- 	* src/DefaultBtRequestFactory.h
 
- 	(doChokedAction): New function.
 
- 	* src/DefaultBtMessageDispatcher.cc
 
- 	(doChokedAction): Do not delete request if its target is in allowed
 
- 	fast set.
 
- 	* src/DefaultBtInteractive.cc
 
- 	(doPostHandshakeProcessing): Added a call to sendPendingMessage().
 
- 	(sendKeepAlive): Send keep alive message even if the outgoing message
 
- 	queue is not empty.
 
- 	(decideInterest): Simplified the code.
 
- 	(fillPiece): Remove a call to dispatcher->doChokedAction() because
 
- 	it is already called when BtChokeMessage is received from a peer.
 
- 	* src/BtRequestFactory.h
 
- 	(doChokedAction): New function.
 
- 	To clean up code:
 
- 	
 
- 	* src/PeerInteractionCommand.h
 
- 	(executeInternal): Added virtual keyword explicitly.
 
- 	(prepareForRetry): Added virtual keyword explicitly.
 
- 	(prepareForNextPeer): Added virtual keyword explicitly.
 
- 	(onAbort): Added virtual keyword explicitly.
 
- 	* src/RequestSlot.cc
 
- 	(isTimeout): Use Time::elapsed() instead of differenceInMillis().
 
- 	* src/BtPieceMessage.cc
 
- 	(doReceivedAction): Added a debug log of piece's bitfield.
 
- 	* src/Piece.h
 
- 	(getBitfieldLength): New function.
 
- 	* src/ByteArrayDiskWriter.cc
 
- 	(clear): Added buf = 0 to avoid double free corruption.
 
- 	* src/FileAllocator.cc
 
- 	(allocate): Fixed an assignment of fileAllocationMonitor->currentValue.
 
- 	Added cp.reset().
 
- 	* src/BitfieldMan.h
 
- 	(operator=): Rewritten.
 
- 	* src/BitfieldMan.cc
 
- 	(BitfieldMan): Initialized bitfield, useBitfield.
 
- 	
 
- 	* src/PeerConnection.cc
 
- 	(receiveMessage): Added a call to socket->readable() after getting
 
- 	message length to avoid possible EOF.
 
- 	* src/Util.cc
 
- 	(torrentUrlencode): Fixed an encodeing bug. BUG#1629912
 
- 	
 
- 2007-01-08  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add an ability to pre-allocate file space:
 
- 	
 
- 	* src/DirectDiskAdaptor.h: Rewritten.
 
- 	* src/PieceStorage.h: DiskAdaptor -> DiskAdaptorHandle
 
- 	* src/MultiDiskAdaptor.h: Rewritten.
 
- 	* src/DefaultPieceStorage.cc
 
- 	(MultiDiskWriter.h): Removed include.
 
- 	(PreAllocationDiskWriter.h): Removed include.
 
- 	(FileAllocationMonitor.h): New include.
 
- 	(~DefaultPieceStorage): Removed deletion of diskAdaptor.
 
- 	(initStorage): Rewritten.
 
- 	(getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
 
- 	* src/FileAllocator.h: New class.
 
- 	* src/FileAllocator.cc: New class.
 
- 	* src/FileAllocationMonitor.h: New class.
 
- 	* src/FileAllocationMonitor.cc: New class.
 
- 	* src/ConsoleFileAllocationMonitor.h: New class.
 
- 	* src/ConsoleFileAllocationMonitor.cc: New class.
 
- 	* src/AbstractSingleDiskAdaptor.h: New class.
 
- 	* src/AbstractSingleDiskAdaptor.cc: New class.
 
- 	* src/DiskAdaptor.h
 
- 	(Directory.h): Removed include.
 
- 	(DiskWriter.h): Removed include.
 
- 	(FileEntry.h): Removed include.
 
- 	(diskWriter): Removed.
 
- 	(DiskAdaptor): Removed diskWriter.
 
- 	(openFile): Made pure virtual.
 
- 	(closeFile): Made pure virtual.
 
- 	(openExistingFile): Made pure virtual.
 
- 	(initAndOpenFile): Made pure virtual.
 
- 	(writeData): Made pure virtual.
 
- 	(readData): Made pure virtual.
 
- 	(sha1Sum): Made pure virtual.
 
- 	(getStoreDir): Returns const reference of storeDir.
 
- 	(DiskAdaptorHandle): New type definition.
 
- 	* src/main.cc
 
- 	(ConsoleFileAllocationMonitor.h): New include.
 
- 	(showUsage): Added default value description of -s option.
 
- 	Added the description of --file-allocation option.
 
- 	(main): Set default value of --file-allocation option to 'none'.
 
- 	Added --file-allocation command-line option.
 
- 	Setup FileAllocationMonitorFactory.
 
- 	* src/FtpInitiateConnectionCommand.cc
 
- 	(executeInternal): Removed diskWriter related processing, which was
 
- 	moved to FtpNegotiationCommand.cc.
 
- 	* src/DirectDiskAdaptor.cc
 
- 	(getFilePath): Made non-const.
 
- 	* src/CopyDiskAdaptor.h
 
- 	(DiskAdaptor.h): Removed include.
 
- 	(DiskWriter.h): Removed include.
 
- 	(AbstractSingleDiskAdaptor.h): New include.
 
- 	(getFilePath): Made non-const. Added virtual keyword.
 
- 	(CopyDiskAdaptor): Removed diskWriter.
 
- 	(getTempFile): Returns const reference.
 
- 	(CopyDiskAdaptorHandle): New type definition.
 
- 	* src/ByteArrayDiskWriter.cc
 
- 	(clear): Simplified.
 
- 	(initAndOpenFile): Rewritten.
 
- 	(openFile): Call initAndOpenFile()
 
- 	* src/MultiDiskAdaptor.cc: Rewritten.
 
- 	* src/DownloadEngineFactory.cc
 
- 	(FileAllocator.h): New include.
 
- 	(FileAllocationMonitor.h): New include.
 
- 	(newConsoleEngine): Call DefaultDiskWriter::createNewDiskWriter() to
 
- 	create DefaultDiskWriter with file allocator.
 
- 	* src/DiskWriter.h
 
- 	(initAndOpenFile): Added totalLength argument.
 
- 	(openFile): Added totalLength argument.
 
- 	* src/prefs.h
 
- 	(PREF_FILE_ALLOCATION): New definition.
 
- 	(V_PREALLOC): New definition.
 
- 	(V_NONE): New definition.
 
- 	* src/HttpResponseCommand.cc
 
- 	(handleDefaultEncoding): Call DefaultDiskWriter::initAndOpenFile with
 
- 	size.
 
- 	* src/FtpNegotiateCommand.cc
 
- 	(Util.h): New include.
 
- 	(recvSize): Open file here.
 
- 	* src/Util.h
 
- 	(ullitos): New function.
 
- 	* src/CopyDiskWriter.h
 
- 	(getFilePath): Made non-const.
 
- 	* src/DefaultDiskWriter.h
 
- 	(Option.h): New include.
 
- 	(totalLength): Removed.
 
- 	(DefaultDiskWriter): Removed totalLength.
 
- 	(initAndOpenFile): Added totalLength argument.
 
- 	(DefaultDiskWriterHandle): New type definition.
 
- 	(createNewDiskWriter): New function.
 
- 	* src/Util.cc
 
- 	(ullitos): New function.
 
- 	* src/DefaultDiskWriter.cc
 
- 	(message.h): New include.
 
- 	(FileAllocator.h): New include.
 
- 	(prefs.h): New include.
 
- 	(Util.h): New include.
 
- 	(DefaultDiskWriter): Removed totalLength.
 
- 	(initAndOpenFile): Added file allocation.
 
- 	(createNewDiskWriter): New function. Just for temporary solution.
 
- 	It will be rewritten later.
 
- 	* src/DiskAdaptor.cc
 
- 	(DiskAdaptor): Removed diskWriter.
 
- 	* src/AbstractDiskWriter.cc
 
- 	(LogFactory.h): New include.
 
- 	(AbstractDiskWriter): Added fileAllocator, logger.
 
- 	(openFile): Added totalLength argument.
 
- 	* src/AbstractDiskWriter.h
 
- 	(FileAllocator.h): New include.
 
- 	(Logger.h): New include.
 
- 	(fileAllocator): New variable.
 
- 	(logger): New variable.
 
- 	(openFile): Added totalLength argument. Added virtual keyword
 
- 	explicitly.
 
- 	(openExistingFile): Added totalLength argument. Added virtual keyword
 
- 	explicitly.
 
- 	(closeFile): Added virtual keyword explicitly.
 
- 	(sha1Sum): Added virtual keyword explicitly.
 
- 	(writeData): Added virtual keyword explicitly.
 
- 	(readData): Added virtual keyword explicitly.
 
- 	(setFileAllocator): New function.
 
- 	* src/DefaultPieceStorage.h
 
- 	(FileAllocator.h): New include.
 
- 	(diskAdaptor): DiskAdaptor -> DiskAdaptorHandle
 
- 	(getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
 
- 	* src/FileProgressMonitor.h: New class.
 
- 	To compile aria2 on PC-BSD:
 
- 	
 
- 	* src/DefaultBtContext.cc
 
- 	(libgen.h): New include.
 
- 	
 
- 	To fix memory leak:
 
- 	
 
- 	* src/Exception.h
 
- 	(~Exception): Delete cause. Fixed memory leak.
 
- 	
 
- 2006-12-24  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Rewritten a portion of bittorrent implementation:
 
- 	
 
- 	* src/BtMessageValidator.h: New class.
 
- 	* src/BtBitfieldMessageValidator.h: New class.
 
- 	* src/BtHandshakeMessageValidator.h: New class.
 
- 	* src/BtRequestMessageValidator.h: New class.
 
- 	* src/BtSuggestPieceMessageValidator.h: New class.
 
- 	* src/BtAllowedFastMessageValidator.h: New class.
 
- 	* src/BtRejectMessageValidator.h: New class.
 
- 	* src/BtCancelMessageValidator.h: New class.
 
- 	* src/BtPieceMessageValidator.h: New class.
 
- 	* src/BtHaveMessageValidator.h: New class.
 
- 	* src/BtEventListener.h: New class.
 
- 	* src/AbstractBtEventListener.h: New class.
 
- 	* src/BtEvent.h: New class.
 
- 	* src/BtChokingEvent.h: New class.
 
- 	* src/BtChokedEvent.h: New class.
 
- 	* src/BtCancelSendingPieceEvent.h: New class.
 
- 	* src/BtAbortOutstandingRequestEvent.h: New class.
 
- 	* src/Randomizer.h: New class.
 
- 	* src/SimpleRandomizer.h: New class.
 
- 	* src/BtMessage.h: New class.
 
- 	* src/AbstractBtMessage.h: New class.
 
- 	* src/SimpleBtMessage.h: New class.
 
- 	* src/BtHaveMessage.h: New class.
 
- 	* src/BtInterestedMessage.h: New class.
 
- 	* src/BtAllowedFastMessage.h: New class.
 
- 	* src/BtUnchokeMessage.h: New class.
 
- 	* src/BtCancelMessage.h: New class.
 
- 	* src/BtNotInterestedMessage.h: New class.
 
- 	* src/BtChokeMessage.h: New class.
 
- 	* src/BtHaveNoneMessage.h: New class.
 
- 	* src/BtHandshakeMessage.h: New class.
 
- 	* src/BtSuggestPieceMessage.h: New class.
 
- 	* src/BtHaveMessage.h: New class.
 
- 	* src/BtPieceMessage.h: New class.
 
- 	* src/BtHaveAllMessage.h: New class.
 
- 	* src/BtKeepAliveMessage.h: New class.
 
- 	* src/BtPortMessage.h: New class.
 
- 	* src/BtRejectMessage.h: New class.
 
- 	* src/BtBitfieldMessage.h: New class.
 
- 	* src/BtRequestMessage.h: New class.
 
- 	* src/DefaultBtRequestFactory.h: New class.
 
- 	* src/DefaultBtMessageReceiver.h: New class.
 
- 	* src/BtInteractive.h: New class.
 
- 	* src/BtMessageDispatcher.h: New class.
 
- 	* src/DefaultBtMessageDispatcher.h: New class.
 
- 	* src/DefaultBtInteractive.h: New class.
 
- 	* src/BitfieldManFactory.h: New class.
 
- 	* src/HandleRegistry.h: New class.
 
- 	* src/BtMessageFactory.h: New class.
 
- 	* src/BtMessageReceiver.h: New class.
 
- 	* src/DefaultBtMessageFactory.h: New class.
 
- 	* src/PeerObject.h: New class.
 
- 	* src/BtRequestFactory.h: New class.
 
- 	* src/SuggestPieceMessage.h: Removed.
 
- 	* src/PortMessage.h: Removed.
 
- 	* src/SuggestPieceMessage.h: Removed.
 
- 	* src/KeepAliveMessage.h: Removed.
 
- 	* src/HandshakeMessage.h: Removed.
 
- 	* src/PeerInteraction.h: Removed.
 
- 	* src/UnchokeMessage.h: Removed.
 
- 	* src/PieceMessage.h: Removed.
 
- 	* src/RequestMessage.h: Removed.
 
- 	* src/InterestedMessage.h: Removed.
 
- 	* src/HaveMessage.h: Removed.
 
- 	* src/CancelMessage.h: Removed.
 
- 	* src/RejectMessage.h: Removed.
 
- 	* src/AllowedFastMessage.h: Removed.
 
- 	* src/HaveNoneMessage.h: Removed.
 
- 	* src/SimplePeerMessage.h: Removed.
 
- 	* src/HaveAllMessage.h: Removed.
 
- 	* src/BitfieldMessage.h: Removed.
 
- 	* src/PeerMessageFactory.h: Removed.
 
- 	* src/NotInterestedMessage.h: Removed.
 
- 	* src/ChokeMessage.h: Removed.
 
- 	* src/PeerMessage.h: Removed.
 
- 2006-12-01  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To know root cause of exception:
 
- 	
 
- 	* src/Exception.h
 
- 	(cause): New variable.
 
- 	(Exception): Added a parameter.
 
- 	(getMsg): Return const reference to msg.
 
- 	(getCause): New function.
 
- 	* src/DlRetryEx.h
 
- 	(DlRetryEx): Added a parameter 'cause'.
 
- 	Added an overloaded constructor.
 
- 	(DlAbortEx): Added a parameter 'cause'.
 
- 	Added an overloaded constructor.
 
- 	* src/SimpleLogger.cc
 
- 	(writeLog): Log nested exception messages recursively.
 
- 2006-11-20  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/DefaultBtProgressInfoFile.cc
 
- 	(load): Fixed memory leak when the infohash doesn't match.
 
- 2006-11-11  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/DefaultPeerStorage.cc
 
- 	(calculateStat): Simplified the code by combining 2 loops into 1.
 
- 2006-11-09  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Introduce new preference PREF_BT_TIMEOUT. This is the timeout value
 
- 	for BitTorrent download:
 
- 	* src/PeerAbstractCommand.cc
 
- 	(PeerAbstractCommand): PREF_TIMEOUT -> PREF_BT_TIMEOUT
 
- 	* src/main.cc: 
 
- 	(timeoutSpecified): Removed.
 
- 	(main): Set the initial value of PREF_BT_TIMEOUT to 180.
 
- 	Removed timeoutSpecified. TODO: Add --bt-timeout command line option.
 
- 	* src/TorrentRequestInfo.cc
 
- 	(timeoutSpecified): Removed.
 
- 	(torrentHandler): Removed timeoutSpecified and the adjustment of
 
- 	timeout value.
 
- 	* src/prefs.h
 
- 	(PREF_BT_TIMEOUT): New definition.
 
- 	
 
- 	Delete unused variables:
 
- 	
 
- 	* src/TorrentRequestInfo.cc
 
- 	(requestInfo): Removed.
 
- 	Move setSignalHander to Util::setGlobalSignalHandler:
 
- 	* src/TorrentRequestInfo.cc:
 
- 	setSignalHander -> Util::setGlobalSignalHandler
 
- 	* src/main.cc
 
- 	(setSignalHander): Removed.
 
- 	(main): setSignalHander -> Util::setGlobalSignalHandler
 
- 	* src/Util.h
 
- 	(setGlobalSignalHandler): New function.
 
- 	* src/Util.cc
 
- 	(setGlobalSignalHandler): New function.
 
- 	* src/UrlRequestInfo.cc:
 
- 	setSignalHander -> Util::setGlobalSignalHandler
 
- 	Reset peer status in order to exit gracefully:
 
- 	* src/PeerAbstractCommand.cc
 
- 	(execute): Call peer->resetStatus() when btRuntime->isHalt() is true.
 
- 	To fix the bug that causes the number of bytes uploaded is not saved
 
- 	to .aria2 file:
 
- 	* src/DefaultPeerStorage.h
 
- 	(removedPeerSessionDownloadLength): New variable.
 
- 	(removedPeerSessionUploadLength): New variable.
 
- 	* src/DefaultPeerStorage.cc
 
- 	(DefaultPieceStorage): Added removedPeerSessionDownloadLength(0),
 
- 	removedPeerSessionUploadLength(0).
 
- 	(calculateStat): Calculate the number of bytes downloaded(uploaded)
 
- 	through all peers, and then add removedPeerSessionDownloadLength(
 
- 	removedPeerSessionUploadLength) to it.
 
- 	(deleteUnusedPeer): Add the number of bytes downloaded(uploaded) from
 
- 	 (to) the peer to removedPeerSessionDownloadLength
 
- 	 (removedPeerSessionUploadLength).
 
- 	
 
- 2006-11-09  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add Metalink location option:
 
- 	
 
- 	* src/MetalinkRequestInfo.cc
 
- 	(execute): Call MetalinkEntry::setLocationPreference()
 
- 	* src/main.cc
 
- 	(showUsage): Added the help message for --metalink-location option.
 
- 	(main): Added --metalink-location option.
 
- 	* src/prefs.h
 
- 	(PREF_METALINK_LOCATION): New definition.
 
- 	* src/MetalinkEntry.cc
 
- 	(AddLocationPreference): New function object.
 
- 	(setLocationPreference): New function.
 
- 	* src/Xml2MetalinkProcessor.cc
 
- 	(getResource): Set location attribute to MetalinkResource
 
- 	To show URLs to download
 
- 	* src/UrlRequestInfo.h
 
- 	(printUrls): New function.
 
- 	To add multiple <file> Metalink support:
 
- 	* src/MetalinkEntry.h
 
- 	(MetalinkResources): Removed.
 
- 	(setLocationPreference): New function.
 
- 	(MetalinkEntryHandle): New type definition.
 
- 	(MetalinkEntries): New type definition.
 
- 	* src/Xml2MetalinkProcessor.h
 
- 	(getEntry): MetalinkEntry* -> MetalinkEntryHandle
 
- 	(getResource): MetalinkResource* -> MetalinkResourceHandle
 
- 	(parseFile): Metalinker* -> MetalinkerHandle
 
- 	* src/UrlRequestInfo.h
 
- 	(execute): RequestInfo* -> RequestInfos
 
- 	* src/MetalinkRequestInfo.cc
 
- 	(AccumulateNonP2PUrl): MetalinkResource* -> MetalinkResourceHandle
 
- 	(FindBitTorrentUrl): MetalinkResource* -> MetalinkResourceHandle
 
- 	(execute): RequestInfo* -> RequestInfos
 
- 	Added multiple <file> support. Print filename when it is queued.
 
- 	* src/MetalinkRequestInfo.h
 
- 	(execute): RequestInfo* -> RequestInfos
 
- 	(getDownloadEngine): Removed.
 
- 	* src/RequestInfo.h
 
- 	(RequestInfoHandle): New type definition.
 
- 	(RequestInfos): New type definition.
 
- 	(execute): RequestInfo* -> RequestInfos
 
- 	(getDownloadEngine): Removed.
 
- 	* src/MetalinkResource.h
 
- 	(MetalinkResourceHandle): New type definition.
 
- 	(MetalinkResources): New type definition.
 
- 	* src/MetalinkEntry.cc
 
- 	(~MetalinkEntry): Removed the deletion of the elements of resources,
 
- 	because the element is now of type MetalinkResourceHandle.
 
- 	(PrefOrder): MetalinkResource* -> MetalinkResourceHandle
 
- 	(Supported): MetalinkResource* -> MetalinkResourceHandle
 
- 	(dropUnsupportedResource): Removed the deletion of the elements of
 
- 	resources because the element is now of type MetalinkResourceHandle.
 
- 	* src/Xml2MetalinkProcessor.cc
 
- 	(parseFile): Metalinker* -> MetalinkerHandle
 
- 	MetalinkEntry* -> MetalinkEntryHandle
 
- 	Removed try-catch block.
 
- 	(getEntry): MetalinkEntry* -> MetalinkEntryHandle
 
- 	MetalinkResource* -> MetalinkResourceHandle
 
- 	Removed try-catch block.
 
- 	(getResource): MetalinkResource* -> MetalinkResourceHandle
 
- 	Free result by using xmlXPathFreeObject()
 
- 	* src/Metalinker.cc
 
- 	(~Metalinker): Removed the deletion of entries.
 
- 	MetalinkEntry* -> MetalinkEntryHandle
 
- 	(queryEntry): Add multiple <file> Metalink support.
 
- 	* src/Metalinker.h
 
- 	(MetalinkEntries): Removed.
 
- 	(queryEntry): MetalinkEntry* -> MetalinkEntries
 
- 	* src/MetalinkProcessor.h
 
- 	(parseFile): Metalinker* -> MetalinkerHandle
 
- 	
 
- 	Bug fixes:
 
- 	* src/PeerChokeCommand.cc
 
- 	(execute): cat01->cat02
 
- 	* src/DefaultPieceStorage.cc
 
- 	(DefaultPieceStorage): Added diskAdaptor(0)
 
- 	* src/TrackerWatcherComand.cc:
 
- 	(execute): Use btAnnounce->noMoreAnnounce()
 
- 	to determin whether the function returns true or not.
 
- 	* src/TrackerUpdateCommand.cc:
 
- 	(execute): Use btAnnounce->noMoreAnnounce()
 
- 	to determin whether the function returns true or not.
 
- 	* src/FtpConnection.cc
 
- 	(bulkReceiveResponse): Throw DlRetryEx if EOF got.
 
- 	This is the fix of the busy loop bug.
 
- 	* src/DownloadCommand.cc
 
- 	(DownloadCommand): Reuse PeerStat. segmentMan->getPeerStat() returns
 
- 	cached PeerStat.
 
- 	
 
- 	The value of "name" entry in torrent file is now set by
 
- 	*DiskAdaptor::setTopDir(...) methods.
 
- 	
 
- 	* src/MultiDiskAdaptor.h
 
- 	(topDir): New variable.
 
- 	(setTopDir): New function.
 
- 	(getTopDir): New function.
 
- 	* src/MultiDiskAdaptor.cc
 
- 	(getFilePath): Concat storDir, "/" and topDir.
 
- 	(mkdir): Use getFilePath() to get the directory path for output.
 
- 	* src/DefaultPieceStorage.cc
 
- 	(initStorage): Set the value of "name" entry to MultiDiskAdaptor,
 
- 	CopyDiskAdaptor.
 
- 	* src/CopyDiskAdaptor.h
 
- 	(topDir): New variable.
 
- 	(setTopDir): New function.
 
- 	(getTopDir): New function.
 
- 	* src/CopyDiskAdaptor.cc
 
- 	(fixFilename): Updated.
 
- 	
 
- 	Misc
 
- 	* src/UrlRequestInfo.h
 
- 	(e): Removed.
 
- 	(UrlRequestInfo): Removed e.
 
- 	(getDownloadEngine): Removed.
 
- 	* src/UrlRequestInfo.cc
 
- 	(handler): Rewritten.
 
- 	(printUrls): New function.
 
- 	(execute): Call printUrls().
 
- 	
 
- 	* src/HandshakeMessage.cc
 
- 	(check): peerinteraction->getBtContext() -> btContext
 
- 	* src/PeerInteraction.h
 
- 	(getBtContext): Removed.
 
- 	* src/TorrentRequestInfo.h
 
- 	(execute): RequestInfo* -> RequestInfos
 
- 	(getDownloadEngine): Removed.
 
- 	* src/TorrentRequestInfo.cc
 
- 	(haltRequested): Removed.
 
- 	(btHaltRequested): New variable.
 
- 	(torrentHandler): haltRequested -> btHaltRequested
 
- 	(execute): RequestInfo* -> RequestInfos
 
- 	* src/TorrentConsoleDownloadEngine.cc
 
- 	(afterEachIteration): haltRequested -> btHaltRequested.
 
- 	
 
- 	* src/ConsoleDownloadEngine.h
 
- 	(initStatistics): Added virtual.
 
- 	(calculateStatistics): Added virtual.
 
- 	(onEndOfRun): Added virtual.
 
- 	(afterEachIteration): Added virtual.
 
- 	* src/ConsoleDownloadEngine.cc
 
- 	(haltRequested): New variable.
 
- 	(afterEachIteration): New function.
 
- 	* src/main.cc
 
- 	(requestInfo): Removed.
 
- 	* src/SegmentMan.cc
 
- 	(findSlowerSegmentEntry): Refactored.
 
- 	* Release 0.9.0
 
- 	
 
- 2006-11-05  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To divide TorrentMan into 6 classes: BtContext, BtRuntime,
 
- 	PeerStorage, PieceStorage, BtAnnounce and BtProgressInfoFile
 
- 	* src/TorrentMan.h: Removed.
 
- 	* src/TorrentMan.cc: Removed.
 
- 	* src/TrackerWatcherComand.h: Made subclass of BtContextAwareCommand.
 
- 	* src/SeedCheckCommand.cc: Use pieceStorage, btRuntime
 
- 	* src/PeerAbstractCommand.h: Made subclass of BtContextAwareCommand.
 
- 	* src/PeerAbstractCommand.cc: Use btRuntime.
 
- 	* src/BtContextAwareCommand.h: New class.
 
- 	* src/FileEntry.h: Added accessor methods for following variables.
 
- 	(path): Made private.
 
- 	(length): Made private.
 
- 	(offset): Made private.
 
- 	(extracted): Made private.
 
- 	(requested): Made private.
 
- 	(FileEntries): New definition.
 
- 	(FileEntryHandle): New definition.
 
- 	* src/FileEntry.cc: New file.
 
- 	* src/HaveEraseCommand.h: Made subclass of BtContextAwareCommand.
 
- 	* src/HaveEraseCommand.cc: Use btRuntime, pieceStorage.
 
- 	* src/PeerChokeCommand.h: Made subclass of BtContextAwareCommand.
 
- 	* src/PeerChokeCommand.cc: Use btRuntime, peerStorage, pieceStorage.
 
- 	* src/PieceStorage.h: New file.
 
- 	* src/PeerInteractionCommand.h: Use btContext.
 
- 	* src/PeerInteractionCommand.cc: Use pieceStorage, peerStorage,
 
- 	btRuntime.
 
- 	* src/DefaultBtProgressInfoFile.h: New file.
 
- 	* src/DefaultBtProgressInfoFile.cc: New file.
 
- 	* src/File.cc
 
- 	(Util.h): New include.
 
- 	(mkdirs): New function.
 
- 	* src/MultiDiskAdaptor.h
 
- 	(mkdir): New function.
 
- 	* src/PeerListProcessor.h
 
- 	(Peers): Removed.
 
- 	* src/PeerInteraction.h
 
- 	(torrentMan): Removed.
 
- 	(btContext): New variable.
 
- 	(peerStorage): New variable.
 
- 	(pieceStorage): New variable.
 
- 	(btAnnounce): New variable.
 
- 	(getTorrentMan): Removed.
 
- 	(getBtContext): New function.
 
- 	* src/PeerInteraction.cc: Use btContext, peerStorage, pieceStorage,
 
- 	btAnnounce.
 
- 	* src/HandshakeMessage.h
 
- 	(TorrentMan.h): Removed.
 
- 	* src/HandshakeMessage.cc: Use btContext.
 
- 	* src/DefaultBtAnnounce.cc: New file.
 
- 	* src/MultiDiskWriter.cc: Use the accessor methods of FileEntry.
 
- 	* src/DefaultPieceStorage.cc: New file.
 
- 	* src/DefaultBtContext.h: New file.
 
- 	* src/TorrentRequestInfo.cc: Use btContext, pieceStorage.
 
- 	Use the accessor methods of FileEntry.
 
- 	* src/CookieBox.cc: Updated to use Util::slice().
 
- 	* src/PieceMessage.cc: Use btContext, pieceStorage.
 
- 	* src/common.h (SharedHandle.h): New include.
 
- 	* src/PeerMessage.cc (PeerMessage): Added btContext, peerStorage,
 
- 	pieceStorage.
 
- 	* src/TorrentAutoSaveCommand.h: Made subclass of BtContextAwareCommand.
 
- 	* src/DiskAdaptor.h
 
- 	(topDir): Removed.
 
- 	(getFileEntryFromPath): Changed the return type to FileEntryHandle.
 
- 	(setTopDir): Removed.
 
- 	(getTopDir): Removed.
 
- 	* src/BtContext.h: New file.
 
- 	* src/DefaultPeerStorage.h: New file.
 
- 	* src/PieceMessage.h (TorrentMan.h): Removed.
 
- 	* src/RequestMessage.h (TorrentMan.h): Removed.
 
- 	* src/TorrentDownloadEngine.h
 
- 	(uploadLength): New variable.
 
- 	(btContext): New variable.
 
- 	(btRuntime): New variable.
 
- 	(pieceStorage): New variable.
 
- 	(peerStorage): New variable.
 
- 	(btAnnounce): New variable.
 
- 	(btProgressInfoFile): New variable.
 
- 	(torrentMan): Removed.
 
- 	(setBtContext): New function.
 
- 	* src/TorrentDownloadEngine.cc: Use BtContext, BtRuntime, pieceStorage,
 
- 	peerStorage, btAnnounce, btProgressInfoFile.
 
- 	* src/Piece.h
 
- 	(toString): New function.
 
- 	(Pieces): New type definition.
 
- 	* src/Peer.h
 
- 	(active): New variable.
 
- 	(Peer): Added active.
 
- 	(activate): Set active to true.
 
- 	(deactivate): Set active to false.
 
- 	(isActive): New function.
 
- 	(Peers): New type definition.
 
- 	* src/DirectDiskAdaptor.cc
 
- 	(getFilePath): Use the accessor methods of FileEntry.
 
- 	* src/TorrentConsoleDownloadEngine.h
 
- 	(afterEachIteration): New function.
 
- 	* src/TorrentConsoleDownloadEngine.cc
 
- 	(haltRequested): New variable.
 
- 	(sendStatistics): Use pieceStorage, btRuntime.
 
- 	(afterEachIteration): New function.
 
- 	* src/AnnounceList: AnnounceTier->AnnounceTierHandle.
 
- 	* src/Directry.h
 
- 	(Directory): New function.
 
- 	(DirectoryHandle): New type definition.
 
- 	* src/BtProgressInfoFile.h: New file.
 
- 	* src/RequestMessage.cc: Use pieceStorage.
 
- 	* src/BtRuntime.h: New file.
 
- 	* src/DefaultBtContext.cc: New file.
 
- 	* src/BitfieldMan.h
 
- 	(getCompletedLength): New function(private).
 
- 	(getCompletedLength): New function.
 
- 	(getFilteredCompletedLength): New function.
 
- 	* src/BitfieldMan.h
 
- 	(getCompletedLength): New function(private).
 
- 	(getCompletedLength): New function.
 
- 	(getFilteredCompletedLength): New function.
 
- 	* src/MultiDiskAdaptor.cc
 
- 	(mkdir): New function.
 
- 	(openFile): Call mkdir().
 
- 	(initAndOpenFile): Call mkdir().
 
- 	* src/CancelMessage.h
 
- 	(TorrentMan.h): Removed.
 
- 	* src/RejectMessage.h
 
- 	(TorrentMan.h): Removed.
 
- 	* src/DownloadEngineFactory.cc
 
- 	(DefaultPieceStorage.h): New include.
 
- 	(DefaultPeerStorage.h): New include.
 
- 	(DefaultBtAnnounce.h): New include.
 
- 	(DefaultBtProgressInfoFile.h): New include.
 
- 	(newTorrentConsoleEngine): Rewritten.
 
- 	* src/ShareRatioSeedCriteria.h
 
- 	(torrentMan): Removed.
 
- 	(btContext): New variable.
 
- 	(peerStorage): New variable.
 
- 	(btRuntime): New variable.
 
- 	(evaluate): Use btContext, btRuntime, peerStorage.
 
- 	* src/AnnounceTier.h: New file.
 
- 	* src/BtAnnounce.h: New file.
 
- 	* src/BtRegistry.h: New file.
 
- 	* src/PeerInitiateConnectionCommand.h: Added btContext.
 
- 	* src/PeerConnection.h (TorrentMan.h): Removed.
 
- 	* src/PeerMessageFactory.cc: Use btContext, pieceStorage.
 
- 	* src/Util.h
 
- 	(slice): Added an argument.
 
- 	* src/Util.cc
 
- 	(slice): Added an argument to control whether trim is made or not.
 
- 	* src/PeerStorage.h: New file.
 
- 	* src/BtRegistry.cc: New file.
 
- 	* src/TrackerUpdateCommand.h: Made subclass of BtContextAwareCommand.
 
- 	* src/CopyDiskAdaptor.cc: Use the accessor methods of FileEntry.
 
- 	* src/MultiDiskWriter.h: FileEntry -> FileEntryHandle
 
- 	* src/PeerListenCommand.cc: Use btRuntime, peerStorage, btContext.
 
- 	* src/TorrentRequestInfo.h
 
- 	(e): Removed.
 
- 	(showFileEntry): Added an argument.
 
- 	(getDownloadEngine): Return 0.
 
- 	* src/DefaultBtAnnounce.h: New file.
 
- 	* src/TorrentAutoSaveCommand.cc: Use btRuntime, btProgressInfoFile.
 
- 	* src/TrackerWatcherComand.cc: Use btRuntime, btAnnounce,
 
- 	* src/PeerMessageFactory.h
 
- 	(btContext): New variable.
 
- 	(pieceStorage): New variable.
 
- 	* src/TrackerUpdateCommand.cc: Use btRuntime, peerStorage, btContext,
 
- 	btAnnounce.
 
- 	* src/DiskAdaptor.cc
 
- 	(DiskAdaptor): Removed topDir.
 
- 	(~DiskAdaptor): Removed topDir.
 
- 	* src/PeerListenCommand.h: Made subclass of BtContextAwareCommand.
 
- 	* src/SeedCheckCommand.h: Made subclass of BtContextAwareCommand.
 
- 	* src/File.h (mkdirs): New function.
 
- 	* src/DefaultPeerStorage): New file.
 
- 	* src/DownloadEngineFactory.h
 
- 	(newTorrentConsoleEngine): Use btContext.
 
- 	* src/BtContextAwareCommand.cc: New file.
 
- 	* src/PeerInitiateConnectionCommand.cc: Use btRuntime, peerStorage.
 
- 	* src/PeerMessage.h
 
- 	(btContext): New variable.
 
- 	(peerStorage): New variable.
 
- 	(pieceStorage): New variable.
 
- 	(setBtContext): New function.
 
- 	* src/Directry.cc
 
- 	(Directory): New function.
 
- 	(createDir): Do nothing if name.size() == 0.
 
- 	* src/AnnounceList.h
 
- 	(AnnounceTier): Removed. 
 
- 	(AnnounceTiers): Removed.
 
- 	* src/DefaultPieceStorage.h: New file.
 
- 	* src/Piece.cc (toString): New function.
 
- 	
 
- 	To fix typo:
 
- 	
 
- 	* src/main.cc (showVersion): Fixed typo.
 
- 	To fix compile warning:
 
- 	
 
- 	* src/DelegatingPeerListProcessor.cc
 
- 	(canHandle): Added "return false".
 
- 	
 
- 2006-10-20  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To simplify TrackerWatherCommand, TrackerUpdateCommand and
 
- 	make the process of announce request testable.
 
- 	
 
- 	* src/TrackerWatcherCommand.h
 
- 	(TimeA2.h): Removed.
 
- 	(interval): Removed.
 
- 	(checkPoint): Removed.
 
- 	(createRequestCommand): Added an argument 'url'.
 
- 	(TrackerWatherCommand): Removed interval.
 
- 	(createCommand): New function.
 
- 	* src/DownloadEngineFactory.cc
 
- 	(newTorrentConsoleEngine): Updated according to the changes in
 
- 	TrackerWatherCommand.
 
- 	* src/TorrentMan.cc
 
- 	(DelegatingPeerListProcessor.h): New includes.
 
- 	(TorrentMan): Added the initialization of announceInterval.
 
- 	(isStoppedAnnounceReady): New function.
 
- 	(isCompletedAnnounceReady): New function.
 
- 	(isDefaultAnnounceReady): New function.
 
- 	(isAnnounceReady): New function.
 
- 	(getAnnounceUrl): New function.
 
- 	(announceStart): New function.
 
- 	(announceFailure): New function.
 
- 	(announceSuccess): New function.
 
- 	(isAllAnnounceFailed): New function.
 
- 	(resetAnnounce): New function.
 
- 	(processAnnounceResponse): New function.
 
- 	(needMorePeerConnection): New function.
 
- 	(noMoreAnnounce): New function.
 
- 	* src/TrackerUpdateCommand.h
 
- 	(getTrackerResponse): int->size_t
 
- 	* src/TorrentMan.h
 
- 	(isStoppedAnnounceReady): New function.
 
- 	(isCompletedAnnounceReady): New function.
 
- 	(isDefaultAnnounceReady): New function.
 
- 	(announceInterval): New variable.
 
- 	(isAnnounceReady): New function.
 
- 	(getAnnounceUrl): New function.
 
- 	(announceStart): New function.
 
- 	(announceFailure): New function.
 
- 	(announceSuccess): New function.
 
- 	(isAllAnnounceFailed): New function.
 
- 	(resetAnnounce): New function.
 
- 	(processAnnounceResponse): New function.
 
- 	(needMorePeerConnection): New function.
 
- 	(noMoreAnnounce): New function.
 
- 	* src/TrackerWatcherCommand.cc
 
- 	(TrackerWatherCommand): Removed interval and checkPoint.
 
- 	(execute): Rewritten.
 
- 	(createCommand): New function.
 
- 	(createRequestCommand): Rewritten.
 
- 	* src/TrackerUpdateCommand.cc
 
- 	(MetaFileUtil.h): Removed.
 
- 	(DelegatingPeerListProcessor.h): Removed.
 
- 	(getTrackerResponse): int->size_t. Use torrentMan's new functions.
 
- 	
 
- 2006-10-18  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Request -> RequestHandle:
 
- 	
 
- 	* src/HttpResponseCommand.h: Request->RequestHandle
 
- 	* src/AbstractCommand.cc: Request->RequestHandle
 
- 	* src/HttpDownloadCommand.cc: Request->RequestHandle
 
- 	* src/HttpRequestCommand.cc: Request->RequestHandle
 
- 	* src/FtpInitiateConnectionCommand.h: Request->RequestHandle
 
- 	* src/AbstractCommand.h: Request->RequestHandle
 
- 	* src/HttpProxyRequestCommand.h: Request->RequestHandle
 
- 	* src/HttpResponseCommand.cc: Request->RequestHandle
 
- 	* src/HttpInitiateConnectionCommand.h: Request->RequestHandle
 
- 	* src/FtpNegotiateCommand.cc: Request->RequestHandle
 
- 	* src/FtpTunnelResponseCommand.h: Request->RequestHandle
 
- 	* src/HttpConnection.h: Request->RequestHandle
 
- 	* src/HttpProxyResponseCommand.cc: Request->RequestHandle
 
- 	* src/InitiateConnectionCommandFactory.h: Request->RequestHandle
 
- 	* src/FtpTunnelResponseCommand.cc: Request->RequestHandle
 
- 	* src/DownloadCommand.h: Request->RequestHandle
 
- 	* src/FtpDowndloadCommand.cc: Request->RequestHandle
 
- 	* src/HttpInitiateConnectionCommand.cc: Request->RequestHandle
 
- 	* src/HttpRequestCommand.h: Request->RequestHandle
 
- 	* src/FtpNegotiateCommand.h: Request->RequestHandle
 
- 	* src/FtpTunnelResponseCommand.cc: Request->RequestHandle
 
- 	* src/FtpInitiateConnectionCommand.cc: Request->RequestHandle
 
- 	* src/HttpDownloadCommand.h: Request->RequestHandle
 
- 	* src/FtpConnection.cc: Request->RequestHandle
 
- 	* src/InitiateConnectionCommandFactory.cc: Request->RequestHandle
 
- 	* src/UrlRequestInfo.cc: Request->RequestHandle
 
- 	* src/HttpProxyResponseCommand.h: Request->RequestHandle
 
- 	* src/HttpConnection.h: Request->RequestHandle
 
- 	* src/DownloadCommand.cc: Request->RequestHandle
 
- 	* src/FtpConnection.h: Request->RequestHandle
 
- 	* src/FtpDowndloadCommand.h: Request->RequestHandle
 
- 	* src/HttpProxyRequestCommand.cc: Request->RequestHandle
 
- 	* src/FtpTunnelRequestCommand.h: Request->RequestHandle
 
- 	* src/Request.h
 
- 	(SharedHandle.h): New include.
 
- 	(RequestHandle): New type definition.
 
- 	(Requests): Redefined.
 
- 	
 
- 	To add MULTITRACKER support:
 
- 	* src/TrackerWatcherCommand.h
 
- 	(createRequestCommand): New function.
 
- 	* src/DownloadEngineFactory.cc
 
- 	(newTorrentConsoleEngine): Removed req.
 
- 	* src/prefs.h
 
- 	(PREF_TRACKER_MAX_TRIES): New definition.
 
- 	* src/TorrentMan.cc
 
- 	(TorrentMan): Removed req. Added trackerNumTry.
 
- 	(~TorrentMan): Removed req.
 
- 	(setupInternal1): Added announceList.
 
- 	* src/TorrentRequestInfo.cc
 
- 	(execute): Set PREF_MAX_TIRES to 1. The max number of tries for
 
- 	announces is now specified by PREF_TRACKER_MAX_TRIES.
 
- 	* src/main.cc
 
- 	(main): Added PREF_TRACKER_MAX_TRIES.
 
- 	* src/TorrentMan.h
 
- 	(Request.h): Removed.
 
- 	(AnnounceList.h): New include.
 
- 	(trackerNumTry): New variable.
 
- 	(req): Removed.
 
- 	(announceList): New variable.
 
- 	* src/TrackerWatcherCommand.cc
 
- 	(execute): Rewritten.
 
- 	(createRequestCommand): New function.
 
- 	* src/TrackerUpdateCommand.cc
 
- 	(execute): Updated with the use of AnnounceList.
 
- 	* src/AnnounceList.cc: New class.
 
- 	* src/AnnounceList.h: New class.
 
- 	
 
- 	To fix typo:
 
- 	* src/prefs.h
 
- 	(PREF_MAX_TRIES): max_try->max_tries
 
- 	To not to decode "+" as space in URL decode:
 
- 	* src/Util.cc
 
- 	(urldecode): Removed "+"->space decoding rule. Test case was updated.
 
- 	
 
- 2006-10-01  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add timeout to async name resolution:
 
- 	* src/AbstractCommand.h
 
- 	(nameResolveFinished): New function. This is not elegant way. It needs
 
- 	to be more refined.
 
- 	(nameResolverCheck): New variable.
 
- 	* src/AbstractCommand.cc
 
- 	(AbstractCommand): Added nameResolverCheck.
 
- 	(execute): Added the check whether the name resolution has finished.
 
- 	(setNameResolverCheck): Set nameResolverCheck to true.
 
- 	(disableNameResolverCheck): Set nameResolverCheck to false.
 
- 	(nameResolverFinished): New function.
 
- 	* src/FtpInitiateConnectionCommand.h
 
- 	(nameResolverFinished): New function.
 
- 	* src/FtpInitiateConnectionCommand.cc
 
- 	(FtpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
 
- 	* src/HttpInitiateConnectionCommand.h
 
- 	(nameResolverFinished): New function.
 
- 	* src/HttpInitiateConnectionCommand.cc
 
- 	(HttpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
 
- 	* src/prefs.h
 
- 	(PREF_DNS_TIMEOUT): New definition.
 
- 	* src/main.cc
 
- 	(main): Added PREF_DNS_TIMEOUT.
 
- 	To add the support for a non-compact response from a tracker:
 
- 	* src/PeerListProcessor.h: New class.
 
- 	* src/DefaultPeerListProcessor.h: New class.
 
- 	* src/DefaultPeerListProcessor.cc: New class.
 
- 	* src/CompactPeerListProcessor.h: New class.
 
- 	* src/CompactPeerListProcessor.cc: New class.
 
- 	* src/DelegatingPeerListProcessor.h: New class.
 
- 	* src/DelegatingPeerListProcessor.cc: New class.	
 
- 	* src/TorrentMan.cc
 
- 	(addPeer): New function(overload).
 
- 	(addPeer): Delete unused peers only when new peer is added.
 
- 	* src/TorrentMan.h
 
- 	(PeerListProcessor.h): Included.
 
- 	(Peers): Removed.
 
- 	(addPeer): New function(overload).
 
- 	* src/TrackerUpdateCommand.cc
 
- 	(netinet/in.h): Removed.
 
- 	(DelegatingPeerListProcessor.h): Included.
 
- 	(execute): Updated to use DelegatingPeerListProcessor.
 
- 	
 
- 	To fix the memory leak in TorrentMan::peers:
 
- 	* src/PeerAbstractCommand.cc
 
- 	(onAbort): Added peer->resetStatus().
 
- 	* src/Peer.h
 
- 	(resetStatus): Made public.
 
- 	
 
- 	To improve the precision of the speed calculation:
 
- 	* src/SpeedCalc.h
 
- 	(nextInterval): New variable.
 
- 	* src/SpeedCalc.cc
 
- 	(reset): Added nextInterval.
 
- 	(isIntervalOver): Use nextInterval instead of CHANGE_INTERVAL_SEC.
 
- 	(changeSw): Set nextInterval to 15 seconds relative to the current
 
- 	instant time.
 
- 	* src/main.cc
 
- 	(showVersion): Updated.
 
- 	(showUsage): Updated.
 
- 	* Release 0.8.1
 
- 	
 
- 2006-09-23  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/main.cc
 
- 	(showUsage): Commented out --min-segment-size option.
 
- 	(main): Commented out --min-segment-size option.
 
- 	* Release 0.8.0
 
- 	
 
- 2006-09-22  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/*.{h,cc}:
 
- 	Added an exception to the license which allows linking with OpenSSL.
 
- 2006-09-21  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/AbstractCommand.cc
 
- 	(execute): Check whether the download has finished before checking
 
- 	socket status.
 
- 	Return true if peerStat->getStatus() == REQUEST_IDLE.
 
- 	Do not exit even if no segment is available.
 
- 	* src/prefs.h
 
- 	(PREF_STARTUP_IDLE_TIME): New definition.
 
- 	* src/PeerInteractionCommand.cc
 
- 	(executeInternal): Removed max speed limit. Because it performs bad.
 
- 	(receiveMessages): Added max speed limit. This was better than above,
 
- 	but still a little bit to be desired. Sometimes the download speed
 
- 	became much faster than I specified.
 
- 	* src/SpeedCalc.h
 
- 	(start): New variable.
 
- 	(accumulatedLength): New variable.
 
- 	(getAvgSpeed): New function.
 
- 	* src/SpeedCalc.cc
 
- 	(reset): Added start, accumulatedLength.
 
- 	(update): Added calculation of an average speed.
 
- 	(getAvgSpeed): New function.
 
- 	* src/DownloadCommand.h
 
- 	(sw): Removed.
 
- 	* src/main.cc
 
- 	(main): Added PREF_STARTUP_IDLE_TIME.
 
- 	* src/PeerStat.h
 
- 	(STATUS): Added REQUEST_IDLE.
 
- 	(getMaxSpeed): Renamed as getMaxDownloadSpeed().
 
- 	(getAvgDownloadSpeed): New function
 
- 	(requestIdle): New function.
 
- 	* src/SegmentMan.h
 
- 	(SegmentEntryHandle): New type definition.
 
- 	(SegmentEntries): Now holds SegmentEntryHandle.
 
- 	(findSlowerSegmentEntry): New funtion.
 
- 	* src/SegmentMan.cc
 
- 	(save): Updated according to the changes in SegmentEntries.
 
- 	(read): Updated according to the changes in SegmentEntries.
 
- 	(FindSegmentEntryByIndex): Updated according to the changes in
 
- 	SegmentEntries.
 
- 	(FindSegmentEntryByCuid): Updated according to the changes in
 
- 	SegmentEntries.
 
- 	(checkoutSegment): Updated according to the changes in SegmentEntries.
 
- 	(onNullBitfield): Updated according to the changes in SegmentEntries.
 
- 	Renamed uitr as itr.
 
- 	(findSlowerSegmentEntry): New function.
 
- 	(getSegment): Updated according to the changes in SegmentEntries.
 
- 	Added the feature that cancels the segment with slow server and fast
 
- 	one takes it over.
 
- 	(cancelSegment): Updated according to the changes in SegmentEntries.
 
- 	(getDownloadLength): Updated according to the changes in
 
- 	SegmentEntries.
 
- 	(init): Assigned 0 to bitfield after deleting it.
 
- 	
 
- 	* src/DownloadCommand.cc
 
- 	(STARTUP_IDLE_TIME): Removed.
 
- 	(executeInternal): Use PREF_STARTUP_IDLE_TIME.
 
- 	* src/PeerChokeCommand.cc
 
- 	(optUnchokingPeer): Updated according to the changes in Peer.
 
- 	(ResetDelta): Removed.
 
- 	(UploadFaster): Updated according to the changes in Peer.
 
- 	(DownloadFaster): Updated according to the changes in Peer.
 
- 	(execute): I clarify the meaning of "upload" and "download" here.
 
- 	"upload" means the transfer from localhost to remote host.
 
- 	"download" means the transfer from remote host to localhost.
 
- 	Based on this rule, I swapped orderByUploadRate and
 
- 	orderByDownloadRate.
 
- 	* src/PeerInteractionCommand.cc
 
- 	(PeerInteraction): Removed peerInteraction->setUploadLImit().
 
- 	(executeInternal): Removed the argument of
 
- 	peerInteraction->sendMessages().
 
- 	(receiveMessages): Rewritten download speed limit.
 
- 	(sendKeepAlive): Removed peerInteraction->sendMessages().
 
- 	* src/HttpResponseCommand.cc
 
- 	(handleDefaultEncoding): If file size is unknown in torrent request,
 
- 	do not call segmentMan->initBitfield() here.
 
- 	Disabled persistent connection feature in torrent request.
 
- 	* src/UrlRequestInfo.h
 
- 	(UrlRequestInfo): Removed const qualifier from option.
 
- 	* src/TorrentMan.h
 
- 	(TransferStat): New class.
 
- 	(deltaDownloadLength): Removed.
 
- 	(deltaUploadLength): Removed.
 
- 	(addDeltaDownloadLength): Removed.
 
- 	(getDeltaDownloadLength): Removed.
 
- 	(resetDeltaDownloadLength): Removed.
 
- 	(addDeltaUploadLength): Removed.
 
- 	(getDeltaUploadLength): Removed.
 
- 	(resetDeltaUploadLength): Removed.
 
- 	(addActivePeer): Added peer->activate().
 
- 	(deleteActivePeer): Added peer->deactivate().
 
- 	(calculateStat): New function.
 
- 	* src/TorrentMan.cc
 
- 	(TorrentMan): Removed deltaDownloadLength and deltaUploadLength.
 
- 	(calculateStat): New function.
 
- 	* src/PeerInteraction.h
 
- 	(uploadLimit): Removed.
 
- 	(option): New variable.
 
- 	(setUploadLimit): Removed.
 
- 	(getUploadSpeed): Removed.
 
- 	(sendMessages): Removed the argument "currentUploadSpeed".
 
- 	* src/PeerInteraction.cc
 
- 	(prefs.h): Included.
 
- 	(PeerInteraction): Removed uploadLimit. Added option.
 
- 	(sendMessages): Rewritten upload speed limit.
 
- 	(sendHandshake): Removed the argument from sendMessages().
 
- 	(sendBitfield): Removed the argument from sendMessages().
 
- 	* src/PeerAbstractCommand.cc
 
- 	(execute): Commented out the portion of upload limit.
 
- 	(onAbort): Removed peer->resetStatus().
 
- 	* src/TorrentRequestInfo.cc
 
- 	(timeoutSpecified): Declared extern.
 
- 	(execute): Set timeout to 180 if timeout is not specified by.
 
- 	command-line.
 
- 	* src/PieceMessage.cc
 
- 	(receivedAction): Added peer->updateDownloadLength().
 
- 	Removed peer->addPeerUpload().
 
- 	Removed torrentMan->addDeltaDownloadLength().
 
- 	(send): Added peer->updateUploadLength().
 
- 	Removed peer->addPeerDownload().
 
- 	Removed torrentMan->addDeltaUploadLength().
 
- 	* src/main.cc
 
- 	(timeoutSpecified): New variable.
 
- 	(main): Set timeoutSpecified to false.
 
- 	If the command-line option "--upload-limit" is specified, then
 
- 	timeoutSpecified is set to true. This option will remain in the next
 
- 	release, but be deprecated in the future release.
 
- 	* src/TorrentRequestInfo.h
 
- 	(TorrentRequestInfo): Removed const qualifier from op.
 
- 	* src/PeerStat.h
 
- 	(uploadSpeed): New variable.
 
- 	(PeerStat): Added default value to cuid.
 
- 	(calculateUploadSpeed): New function.
 
- 	(updateUploadLength): New function.
 
- 	(getMaxUploadSpeed): New function.
 
- 	(getAvgUploadSpeed): New function.
 
- 	(reset): Added uploadSpeed. Set status to IDLE.
 
- 	* src/TorrentDownloadEngine.h
 
- 	(cp): Declared as Time.
 
- 	(sessionDownloadLengthArray): Removed.
 
- 	(sessionUploadLengthArray): Removed.
 
- 	(currentCp): Removed.
 
- 	(lastCalcStat): New variable
 
- 	(lastElapsed): Removed.
 
- 	(sessionDownloadLength): Removed.
 
- 	(calculateStat): New function.
 
- 	* src/TorrentDownloadEngine.cc
 
- 	(initStatistics): Removed lastElapsed, cp[],
 
- 	sessionDownloadLengthArray[], sessionUploadLengthArray[],
 
- 	currentCp, sessionDownloadLength.
 
- 	Added cp.reset() and lastCalcStat.reset().
 
- 	(calculateSpeed): Changed the name of the argument.
 
- 	(calculateStatistics): Rewritten.
 
- 	(calculateStat): New function.
 
- 	* src/Peer.h
 
- 	(PeerStat.h): Included.
 
- 	(peerUpload): Removed.
 
- 	(peerDownload): Removed.
 
- 	(peerStat): New variable.
 
- 	(sessionUploadLength): New variable.
 
- 	(sessionDownloadLength): New variable.
 
- 	(deltaUpload): Removed.
 
- 	(deltaDownload): Removed.
 
- 	(resetStatus): Made private.
 
- 	(Peer): Added sessionUploadLength, sessionDownloadLength.
 
- 	Removed peerUpload, peerDownload.
 
- 	(updateUploadLength): New function.
 
- 	(addDeltaUpload): Removed.
 
- 	(updateDownloadLength): New function.
 
- 	(resetDeltaUpload): Removed.
 
- 	(getDeltaUpload): Removed.
 
- 	(addDeltaDownload): Removed.
 
- 	(calculateUploadSpeed): New function.
 
- 	(resetDeltaDownload): Removed.
 
- 	(getDeltaDownload): Removed.
 
- 	(calculateDownloadSpeed): New function.
 
- 	(getSessionUploadLength): New function.
 
- 	(getSessionDownloadLength): New function.
 
- 	(activate): New function.
 
- 	(deactivate): New function.
 
- 	(addPeerUpload): Removed.
 
- 	(setPeerUpload): Removed.
 
- 	(getPeerUpload): Removed.
 
- 	(addPeerDownload): Removed.
 
- 	(setPeerDownload): Removed.
 
- 	(getPeerDownload): Removed.
 
- 	
 
- 	* src/Peer.cc
 
- 	(resetStatus): Removed resetDeltaUpload() and resetDeltaDownload().
 
- 	
 
- 	* src/MetalinkRequestInfo.h
 
- 	(MetalinkRequestInfo): Removed const qualifier from op.
 
- 	* src/RequestInfo.h
 
- 	(op): Removed const qualifier.
 
- 	(RequestInfo): Removed const qualifier from op.
 
- 	* src/prefs.h
 
- 	(PREF_MAX_SPEED_LIMIT): Renamed as PREF_MAX_DOWNLOAD_LIMIT.
 
- 	(PREF_UPLOAD_LIMIT): Renamed as PREF_MAX_UPLOAD_LIMIT.
 
- 	* src/PeerInteractionCommand.cc
 
- 	(PeerInteractionCommand): Use PREF_MAX_UPLOAD_LIMIT.
 
- 	(receiveMessages): Use PREF_MAX_DOWNLOAD_LIMIT.
 
- 	* src/PeerInteraction.cc
 
- 	(sendMessages): Use PREF_MAX_UPLOAD_LIMIT.
 
- 	* src/main.cc
 
- 	(showUsage): Updated the description of "--lowest-speed-limit" option.
 
- 	Added the description of "--max-download-limit" option.
 
- 	Removed the description of "--upload-limit" option.
 
- 	Added the description of "--max-upload-limit" option.
 
- 	(main): Use PREF_MAX_UPLOAD_LIMIT, PREF_MAX_DOWNLOAD_LIMIT.
 
- 	Added "--max-download-limit" option and "--max-upload-limit" option.
 
- 	Added the warning message if "--upload-limit" option is used.
 
- 	* src/DownloadCommand.cc
 
- 	(executeInternal): Use PREF_MAX_DOWNLOAD_LIMIT.
 
- 	
 
- 2006-09-19  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To rewrite segment download mechanism for HTTP/FTP download.
 
- 	Use BitfieldMan to manage segment download.
 
- 	* src/HttpResponseCommand.h
 
- 	(executeInternal): Pass the reference of segment.
 
- 	* src/AbstractCommand.cc
 
- 	(prepareForRetry): Call segmentMan->cancelSegment here.
 
- 	(onAbort): Call segmentMan->cancelSegment here.
 
- 	* src/HttpDownloadCommand.cc
 
- 	(prepareForNextSegment): New function.
 
- 	* src/DownloadEngineFactory.cc
 
- 	(newConsoleEngine): Removed splitter.
 
- 	(newTorrentConsoleEngine): Removed splitter.
 
- 	* src/Request.h
 
- 	(segment): Renamed from seg.
 
- 	* src/FtpInitiateConnectionCommand.h
 
- 	(executeInternal): Pass the reference of segment.
 
- 	* src/AbstractCommand.h
 
- 	(executeInternal): Pass the reference of segment.
 
- 	* src/pref.h
 
- 	(PREF_SEGMENT_SIZE): New definition.
 
- 	* src/HttpProxyRequestCommand.h
 
- 	(executeInternal): Pass the reference of segment.
 
- 	* src/HttpResponseCommand.cc
 
- 	(checkResponse): Allowed status 206 when a request range starts 0.
 
- 	(handleDefaultEncoding): Rewritten the code related to Segment.
 
- 	(handleOtherEncoding): Rewritten the code related to Segment.
 
- 	* src/SegmentMan.h
 
- 	(SegmentEntry): New class.
 
- 	(SegmentEntries): New type definition.
 
- 	(bitfield): New variable.
 
- 	(usedSegmentEntries): New variable.
 
- 	(onNullBitfield): New function.
 
- 	(checkoutSegment): New function.
 
- 	(segments): Removed.
 
- 	(splitter): Removed.
 
- 	(unregisterId): Removed.
 
- 	(getSegment): New function(overload)
 
- 	(getDownloadedSize): Removed.
 
- 	(cancelSegment): New function.
 
- 	(completeSegment): New function.
 
- 	(initBitfield): New function.
 
- 	(hasSegment): New function.
 
- 	(getDownloadLength): New function.
 
- 	* src/BitfieldMan.h
 
- 	(getStartIndex): New function.
 
- 	(getEndIndex): New function.
 
- 	(getMissingUnusedIndex): New function(overload).
 
- 	(getSparseMissingUnusedIndex): New function.	
 
- 	* src/BitfieldMan.cc
 
- 	(getMissingIndexRandomly): Handle the last byte of bitfield properly.
 
- 	(getMissingUnusedIndex): New function(overload).
 
- 	(Range): New class.
 
- 	(getStartIndex): New function.
 
- 	(getEndIndex): New function.
 
- 	(getSparseMissingUnusedIndex): New function.
 
- 	(isBitSetInternal): Return false if the given index is less than 0.
 
- 	* src/HttpInitiateConnectionCommand.h
 
- 	(executeInternal): Pass the reference of segment.
 
- 	* src/FtpNegotiateCommand.h
 
- 	(executeInternal): Pass the reference of segment.
 
- 	* src/FtpNegotiateCommand.cc
 
- 	(recvSize): Initialize bitfield here.
 
- 	* src/FtpTunnelResponseCommand.h
 
- 	(executeInternal): Pass the reference of segment.
 
- 	* src/HttpConnection.cc
 
- 	(createRequest): Rewritten range header processing.
 
- 	* src/DownloadCommand.h
 
- 	(executeInternal): Pass the reference of segment.
 
- 	(prepareForRetry): Removed.
 
- 	(prepareForNextSegment): Added an argument segment. Made it a virtual
 
- 	function.
 
- 	* src/main.cc
 
- 	(main): Set the initial value of PREF_SEGMENT_SIZE to 1MB.
 
- 	* src/SegmentMan.cc
 
- 	(SegmentMan): Added bitfield. Removed splitter.
 
- 	(~SegmentMan): Added bitfield. Removed splitter.
 
- 	(unregisterId): Removed.
 
- 	(getSegment): Rewritten.
 
- 	(updateSegment): Rewritten.
 
- 	(save): Rewritten.
 
- 	(read): Rewritten.
 
- 	(finished): Rewritten.
 
- 	(getDownloadedSize): Removed.
 
- 	(initBitfield): New function.
 
- 	(FindSegmentEntryByIndex): New function object.
 
- 	(FindSegmentEntryByCuid): New function object.
 
- 	(checkoutSegment): New function.
 
- 	(onNullBitfield): New function.
 
- 	(getSegment): New function(overload).
 
- 	(CancelSegment): New function object.
 
- 	(cancelSegment): New function.
 
- 	(completeSegment): New function.
 
- 	(hasSegment): New function.
 
- 	(getDownloadLength): New function.
 
- 	* src/FtpInitiateConnectionCommand.cc
 
- 	(executeInternal): Load .aria2 file after hostname resolution finishes.
 
- 	* src/Segment.h: Rewritten.
 
- 	* src/Segment.cc (operator<<): New function.
 
- 	* src/HttpDownloadCommand.h
 
- 	(prepareForNextSegment): New function.
 
- 	* src/Request.cc
 
- 	(resetUrl): Made segment null.
 
- 	* src/DownloadEngine.cc
 
- 	(~DownloadEngine): Call cleanQueue before deleting segmentMan.
 
- 	* src/HttpProxyRequestCommand.h
 
- 	(executeInternal): Pass the reference of segment.
 
- 	* src/DownloadCommand.cc
 
- 	(executeInternal): Rewritten the code related to Segment.
 
- 	(prepareForRetry): Removed.
 
- 	(prepareForNextSegment): Rewritten.
 
- 	* src/FtpTunnelResponseCommand.h
 
- 	(executeInternal): Pass the reference of segment.
 
- 	
 
- 	To add HTTP 1.1 persistent connection support(experimental)
 
- 	* src/HttpRequestCommand.cc
 
- 	(executeInternal): Disable keep alive if it is disabled by
 
- 	configuration.
 
- 	* src/Request.h
 
- 	(keepAlive): New variable.
 
- 	(isKeepAlive): New function.
 
- 	(setKeepAlive): New function.
 
- 	* src/pref.h
 
- 	(PREF_HTTP_KEEP_ALIVE): New definition.
 
- 	* src/HttpResponseCommand.cc
 
- 	(executeInternal): Check the remote server supports keep alive.
 
- 	* src/HttpConnection.cc
 
- 	(createRequest): Send "Connection: close" only if keep alive is
 
- 	disabled.
 
- 	* src/main.cc
 
- 	(main):
 
- 	Set the initial value(false) of PREF_KEEP_ALIVE to false.
 
- 	To add max download speed limit:
 
- 	* src/pref.h
 
- 	(PREF_MAX_SPEED_LIMIT): New definition.
 
- 	* src/PeerInteractionCommand.cc
 
- 	(executeInternal): Added max download speed limit. Not tested yet.
 
- 	* src/SegmentMan.h
 
- 	(PeerStats): New type definition.
 
- 	(peerStats): New variable.
 
- 	(registerPeerStat): New function.
 
- 	(FindPeerStat): New function object.
 
- 	(getPeerStat): New function.
 
- 	(calculateDownloadSpeed): New function.
 
- 	* src/SpeedCalc.h: New class.
 
- 	* src/SpeedCalc.cc: New class.
 
- 	* src/main.cc
 
- 	(main):
 
- 	Set the initial value of PREF_MAX_SPEED_LIMIT to 0(which means the
 
- 	download speed is not restricted).
 
- 	* src/PeerStat.h: New class.
 
- 	* src/SegmentMan.cc
 
- 	(registerPeerStat): New function.
 
- 	(calculateDownloadSpeed): New function.
 
- 	* src/DownloadCommand.cc
 
- 	(STARTUP_IDLE_TIME): New definition.
 
- 	(DownloadCommand): Register peerStat to segmentMan. Call peerStat->
 
- 	downloadStart.
 
- 	(~DownloadCommand): Call peerStat->downloadStop.
 
- 	(executeInternal): Added download speed limitter. Rewritten lowest
 
- 	speed limitter.
 
- 	* src/HttpConnection.cc
 
- 	(receiveResponse): Fixed: eohIndex[headerBuf] -> headerBuf[eohIndex].
 
- 	
 
- 	* src/AbstractCommand.cc
 
- 	(resolveHostname): Throw DlAbortEx if a name resolution failes.
 
- 	Added hostname to the error message.
 
- 	
 
- 	* src/ConsoleDownloadEngine.cc
 
- 	(calculateStatistics): Initialize psize with dlSize.
 
- 	* src/PieceMessage.cc
 
- 	(receivedAction): Do not call peerInteraction->abortPiece here.
 
- 	(onGotWrongPiece): Call peerInteraction->abortPiece here.
 
- 	* src/BitfieldMan.h
 
- 	(clearAllUseBit): New function.
 
- 	(setAllUseBit): New function.
 
- 	* src/BitfieldMan.cc
 
- 	(clearAllBit): Do not clear useBitfield here.
 
- 	(clearAllUseBit): New function.
 
- 	(setAllUseBit): New function.
 
- 	* src/Piece.cc
 
- 	(clearAllBlock): Call bitfield->clearAllUseBit().
 
- 2006-08-28  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To make filename URL-decoded:
 
- 	* src/HttpResponseCommand.h: Updated doc.
 
- 	* src/HttpResponseCommand.cc
 
- 	(determinFilename): Made filename URL-decoded.
 
- 	* src/FtpInitiateConnectionCommand.cc
 
- 	(executeInternal): Made filename URL-decoded.
 
- 	* src/Util.h (urldecode): New function.
 
- 	* src/Util.cc (urldecode): New function.
 
- 	To fix a bug that caused assertion failure in ares_strerror:
 
- 	* src/NameResolver.cc (callback): Fixed the bug.
 
- 	* Release 0.7.3
 
- 	
 
- 2006-08-27  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add --seed-time and --seed-ratio command-line option:
 
- 	* src/Option.h (getAsDouble): New function.
 
- 	* src/Option.cc (getAsDouble): New function.
 
- 	* src/SeedCheckCommand.h: New class.
 
- 	* src/SeedCheckCommand.cc: New class.
 
- 	* src/DownloadEngineFactory.cc
 
- 	(SeedCheckCommand.h): Included.
 
- 	(UnionSeedCriteria.h): Included.
 
- 	(TimeSeedCriteria.h): Included.
 
- 	(ShareRatioSeedCriteria.h): Included.
 
- 	(newTorrentConsoleEngine): Added the processing of seed option.
 
- 	* src/SeedCriteria.h: New class.
 
- 	* src/ShareRatioSeedCriteria.h: New class.
 
- 	* src/TimeSeedCriteria.h: New class.
 
- 	* src/UnionSeedCriteria.h: New class.
 
- 	* src/prefs.h
 
- 	(PREF_SEED_TIME): New definition.
 
- 	(PREF_SEED_RATIO): New definition.
 
- 	* src/main.cc
 
- 	(showUsage): Added --seed-time and --seed-ratio option.
 
- 	(main): Added --seed-time and --seed-ratio option.
 
- 	Made default log file name "/dev/null".
 
- 	* src/SharedHandle.h
 
- 	(SharedHandle): Copy constructor. Made it assignable from the
 
- 	SharedHandle of the subclasses.
 
- 	(operator=): Made it assignable from the SharedHandle of the
 
- 	subclasses.
 
- 	(getRefCount): New function.
 
- 	
 
- 	To add notice log level and the switch to write log to stdout. This
 
- 	switch is configurable per log level.
 
- 	* src/Logger.h
 
- 	(notice): New function.
 
- 	(LEVEL): Added NOTICE. Assigned an explicit value to each log level
 
- 	constant.
 
- 	* src/LogFactory.cc
 
- 	(getInstance): The use of NullLogger was removed. A log message with
 
- 	notice log level was made written to stdout along with log file.
 
- 	* src/NullLogger.h
 
- 	(notice): New function.
 
- 	* src/SimpleLogger.h
 
- 	(writeHeader): Added the 'file' argument.
 
- 	(writeLog): Added the 'file' argument.
 
- 	(writeFile): New function.
 
- 	(stdoutField): New variable.
 
- 	(SimpleLogger): Removed the default constructor.
 
- 	(SimpleLogger): Made the default value of logfile 0.
 
- 	(debug): Added 'virtual' keyword.
 
- 	(info): Added 'virtual' keyword.
 
- 	(warn): Added 'virtual' keyword.
 
- 	(error): Added 'virtual' keyword.
 
- 	(notice): New function.
 
- 	(setStdout): New function.
 
- 	* src/SimpleLogger.cc
 
- 	(WRITE_LOG): Replaced writeLog with writeFile.
 
- 	(WRITE_LOG_EX): Replaced writeLog with writeFile.
 
- 	(SimpleLogger): Removed the default constructor.
 
- 	(setStdout): New function.
 
- 	(writeLog): Added the handling of NOTICE log level.
 
- 	(writeFile): New function.
 
- 	(notice): New function.
 
- 	* src/TorrentMan.h: Updated doc.
 
- 	* src/BitfieldMan.h: Updated doc.
 
- 	
 
- 	* src/TrackerWatcherCommand.cc
 
- 	(execute): Return true if error occurred in the request to the tracker
 
- 	and halt is requested.
 
- 	* src/TrackerUpdateCommand.cc
 
- 	(execute): Return true if error occurred in the request to the tracker
 
- 	and halt is requested.
 
- 	To call onDownloadComplete from TorrentMan::completePiece(), not from
 
- 	DownloadEngine:
 
- 	* src/TorrentConsoleDownloadEngine.h
 
- 	(onSelectiveDownloadingCompletes): Removed.
 
- 	* src/TorrentConsoleDownloadEngine.cc
 
- 	(onSelectiveDownloadingCompletes): Removed.
 
- 	* src/TorrentDownloadEngine.h
 
- 	(onEndOfRun): Added 'virtual' keyword.
 
- 	(afterEachIteration): Removed.
 
- 	(onSelectiveDownloadingCompletes): Removed.
 
- 	* src/TorrentDownloadEngine.cc
 
- 	(onEndOfRun): Removed filenameFixed.
 
- 	(afterEachIteration): Removed.	
 
- 	* src/TorrentMan.cc
 
- 	(completePiece): Call onDownloadComplete here.
 
- 	(onDownloadComplete): Added 2 log messages.
 
- 2006-08-21  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
-         To fix compilation problem on gcc4.1.1(patch#1542283 by tizianomueller)
 
- 	* src/NameResolver.h: Added the prototype declaration of callback().
 
- 	
 
- 	To support c-ares library:
 
- 	* src/AbstractCommand.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
 
- 	* src/FeatureConfig.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
 
- 	* src/FtpInitiateConnectionCommand.h:
 
- 	Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
 
- 	* src/AbstractCommand.h: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
 
- 	* src/HttpInitiateConnectionCommand.h:
 
- 	Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
 
- 	* src/NameResolver.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS.
 
- 	Added thes upport of c-ares's ares_strerror(the idea came from patch
 
- 	#1542285 by tizianomueller)
 
- 	* src/HttpInitiateConnectionCommand.cc:
 
- 	Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
 
- 	* src/FtpInitiateConnectionCommand.cc:
 
- 	Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
 
- 	* src/DownloadEngine.h:
 
- 	Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
 
- 	* src/DownloadEngine.cc:
 
- 	Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS	
 
- 	To fix the bug that causes compilation failure with metalink-support
 
- 	disabled(bug#1543587):
 
- 	* src/main.cc: Fixed with the patch by tizianomueller.
 
- 	* Release 0.7.2
 
- 	
 
- 2006-08-14  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/main.cc
 
- 	(main): Added a message to inform users that aria2 is starting to
 
- 	verify checksum.
 
- 	* src/RequestInfo.cc
 
- 	(printDownloadAbortMessage): Added a message to inform users that
 
- 	transfer can be resumed.
 
- 	* src/FeatureConfig.cc
 
- 	(FEATURE_ASYNC_DNS): New definition.
 
- 	(FeatureConfig): Added aysnc DNS entry.
 
- 	To replace CommandUuid with Command* in SocketEntry and
 
- 	NameResolverEntry:
 
- 	
 
- 	* src/DownloadEngine.h
 
- 	(CommandUuids): Removed.
 
- 	(SocketEntry::commandUuid): Removed.
 
- 	(SocketEntry::command): New variable.
 
- 	(SocketEntry::SocketEntry): Updated.
 
- 	(SocketEntry::operator==): Updated.
 
- 	(NameResolverEntry::commandUuid): Removed.
 
- 	(NameResolverEntry::command): New variable.
 
- 	(NameResolverEntry::NameResolverEntry): Updated.
 
- 	(NameResolverEntry::operator==): Updated.
 
- 	(waitData): Changed the argument type.
 
- 	(addSocketForReadCheck): Changed the argument type.
 
- 	(deleteSocketForReadCheck): Changed the argument type.
 
- 	(addSocketForWriteCheck): Changed the argument type.
 
- 	(deleteSocketForWriteCheck): Changed the argument type.
 
- 	(addNameResolverCheck): Changed the argument type.
 
- 	(deleteNameResolverCheck): Changed the argument type.
 
- 	* src/DownloadEngine.cc
 
- 	(FindCommand): Removed.
 
- 	(run): Removed activeUuid. Added activeCommands instead.
 
- 	(AccumulateActiveUuid): Renamed as AccumulateActiveCommand.
 
- 	(AccumulateActiveCommand): New function object.
 
- 	(waitData): Use AccumulateActiveCommand.
 
- 	(addSocketForReadCheck): Use Command instead of CommandUuid.
 
- 	(deleteSocketForReadCheck): Use Command instead of CommandUuid.
 
- 	(addSocketForWriteCheck): Use Command instead of CommandUuid.
 
- 	(deleteSocketForWriteCheck): Use Command instead of CommandUuid.
 
- 	(addNameResolverCheck): Use Command instead of CommandUuid.
 
- 	(deleteNameResolverCheck): Use Command instead of CommandUuid.	
 
- 	* src/AbstractCommand.cc
 
- 	(disableReadCheckSocket): Updated according to the changes in
 
- 	DownloadEngine.
 
- 	(setReadCheckSocket): Updated according to the changes in
 
- 	DownloadEngine.
 
- 	(disableWriteCheckSocket): Updated according to the changes in
 
- 	DownloadEngine.
 
- 	(setWriteCheckSocket): Updated according to the changes in
 
- 	DownloadEngine.
 
- 	(setNameResolverCheck): Updated according to the changes in
 
- 	DownloadEngine.
 
- 	(disableNameResolverCheck): Updated according to the changes in
 
- 	DownloadEngine.
 
- 	* src/AbstractCommand.cc
 
- 	(disableReadCheckSocket): Updated according to the changes in
 
- 	DownloadEngine.
 
- 	(setReadCheckSocket): Updated according to the changes in
 
- 	DownloadEngine.
 
- 	(disableWriteCheckSocket): Updated according to the changes in
 
- 	DownloadEngine.
 
- 	(setWriteCheckSocket): Updated according to the changes in
 
- 	DownloadEngine.
 
- 	* release 0.7.1
 
- 	
 
- 2006-08-12  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To handle the case where some BitTorrent tracker requires all letters
 
- 	except for [A-Za-z0-9] is URL encoded.
 
- 	
 
- 	* src/Util.h
 
- 	(torrentUrlencode): New function.
 
- 	* src/Util.cc
 
- 	(ctype.h): Included.
 
- 	(torrentUrlencode): New function.
 
- 	* src/TrackerWatcherCommand.cc
 
- 	(execute): Use Util::torrentUrlencode() instead of Util::urlencode().
 
- 	
 
- 2006-08-11  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add asynchronous DNS support(libares):
 
- 	* src/AbstractCommand.h
 
- 	(setNameResolverCheck): New function.
 
- 	(disableNameResolverCheck): New function
 
- 	(resolveHostname): New function.
 
- 	* src/AbstractCommand.cc
 
- 	(setNameResolverCheck): New function.
 
- 	(disableNameResolverCheck): New function
 
- 	(resolveHostname): New function.
 
- 	* src/FtpInitiateConnectionCommand.h
 
- 	(nameResolver): New function.
 
- 	* src/FtpInitiateConnectionCommand.cc
 
- 	(Util.h): Included.
 
- 	(FtpInitiateConnectionCommand): Call disableReadCheckSocket,
 
- 	disableWriteCheckSocket.
 
- 	(~FtpInitiateConnectionCommand): Call disableNameResolverCheck.
 
- 	(executeInternal): Added async DNS support.
 
- 	* src/HttpInitiateConnectionCommand.h
 
- 	(nameResolver): New function.
 
- 	* src/HttpInitiateConnectionCommand.cc
 
- 	(DlRetryEx.h): Included.
 
- 	(HttpInitiateConnectionCommand): Call disableReadCheckSocket,
 
- 	disableWriteCheckSocket.
 
- 	(~HttpInitiateConnectionCommand): Call disableNameResolverCheck.
 
- 	(executeInternal): Added async DNS support.
 
- 	* src/NameResolver.h: New class. Note: #include <ares.h> is surrounded
 
- 	by extern "C" declaration.
 
- 	* src/NameResolver.cc: New class.
 
- 	* src/Util.h:
 
- 	(isNumberAndDotsNotation): New function
 
- 	* src/Util.cc
 
- 	(isNumberAndDotsNotation): New function.
 
- 	* src/DownloadEngine.h
 
- 	(NameResolver.h): Included.
 
- 	(NameResolverEntry): New class.
 
- 	(NameResolverEntries): New type definition.
 
- 	(addNameResolverCheck): New function.
 
- 	(deleteNameResolverCheck): New function.
 
- 	* src/DownloadEngine.cc
 
- 	(run): Initialize cp with 0.
 
- 	(SetDescriptor::operator()): Added for NameResolverEntry.
 
- 	(AccumulateActiveUuid::operator()): Added for NameResolverEntry.
 
- 	(waitData): Check nameResolver entries.
 
- 	(updateFdSet): Update fds in nameResolver entries.
 
- 	(addNameResolverCheck): New function.
 
- 	(deleteNameResolverCheck): new function.
 
- 	
 
- 	* src/PeerInteractionCommand.cc
 
- 	(executeInternal): Fixed wrong socket handling.
 
- 	* src/main.cc
 
- 	(main): Fixed the initial value of PREF_LOWEST_SPEED_LIMIT option to 0.
 
- 	* src/Util.cc
 
- 	(fileChecksum): Removed the call to ctx.digestReset().
 
- 	
 
- 2006-08-08  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* po/ru.po: Azamat sent me Russian translation.
 
- 	
 
- 	* src/FtpNegotiateCommand.cc
 
- 	(recvGreeting): Call disableWriteCheckSocket just after
 
- 	socket->setBlockingMode(). This avoids unnecessary CPU-hog loop.
 
- 	(recvRetr): Recognized status code 125 as a acceptable response code.
 
- 	
 
- 	Rename Time.h to TimeA2.h to avoid compilation ploblem on
 
- 	case-insesitive filesystem(BUG#1531057).
 
- 	* src/Time.h: Renamed as TimeA2.h.
 
- 	* src/Time.cc: Renamed as TimeA2.cc.
 
- 	* src/TimeA2.h: New class.
 
- 	* src/TimeA2.cc: New class.
 
- 	* src/PeerChokeCommand.h: Replaced Time.h with TimeA2.h.
 
- 	* src/TrackerWatcherCommand.h: Replaced Time.h with TimeA2.h.
 
- 	* src/PeerAbstractCommand.h: Replaced Time.h with TimeA2.h.
 
- 	* src/AbstractCommand.h: Replaced Time.h with TimeA2.h.
 
- 	* src/PeerInteractionCommand.h: Replaced Time.h with TimeA2.h.
 
- 	* src/ConsoleDownloadEngine.h: Replaced Time.h with TimeA2.h.
 
- 	* src/TorrentAutoSaveCommand.h: Replaced Time.h with TimeA2.h.
 
- 	* src/DownloadCommand.h: Replaced Time.h with TimeA2.h.
 
- 	* src/TorrentMan.h: Replaced Time.h with TimeA2.h.
 
- 	* src/TorrentDownloadEngine.h: Replaced Time.h with TimeA2.h.
 
- 	* src/RequestSlot.h: Replaced Time.h with TimeA2.h.
 
- 	* src/SleepCommand.h: Replaced Time.h with TimeA2.h.
 
- 	* src/DownloadEngine.cc: Replaced Time.h with TimeA2.h.
 
- 	* release 0.7.0
 
- 	
 
- 2006-08-07  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/PeerChokeCommand.h
 
- 	(PeerChokeCommand): Rearranged the arguments.
 
- 	* src/PeerChokeCommand.cc
 
- 	(PeerChokeCommand): Rearranged the arguments.
 
- 	* src/MetalinkEntry.h
 
- 	(Checksum.h): Included.
 
- 	(md5): Removed.
 
- 	(sha1): Removed.
 
- 	(checksum): New variable.
 
- 	(operator=): Updated.
 
- 	(check): Removed.
 
- 	* src/prefs.h
 
- 	(PREF_LOWEST_SPEED_LIMIT): New definition.
 
- 	(PREF_FOLLOW_TORRENT): New definition.
 
- 	(PREF_SELECT_FILE): New definition.
 
- 	(PREF_FOLLOW_METALINK): New definition.
 
- 	* src/MetalinkResource.h
 
- 	(TYPE_HTTPS): Added to enum TYPE.
 
- 	* src/TorrentMan.cc
 
- 	(~TorrentMan): Rewritten.
 
- 	* src/MultiDiskWriter.cc
 
- 	(MultiDiskAdaptor): Updated according to the changes in
 
- 	MessageDigestContext.
 
- 	(~MultiDiskAdaptor): Updated according to the changes in
 
- 	MessageDigestContext.
 
- 	(hashUpdate): Updated according to the changes in MessageDigestContext.
 
- 	(sha1Sum): Updated according to the changes in MessageDigestContext.
 
- 	* src/Util.h
 
- 	(fileChecksum): Updated according to the changes in
 
- 	MessageDigestContext.
 
- 	* src/Util.cc
 
- 	(sha1Sum): Updated according to the changes in MessageDigestContext.
 
- 	(fileChecksum): Updated according to the changes in
 
- 	MessageDigestContext.
 
- 	* src/messageDigest.h: Rewritten.
 
- 	* src/MetalinkEntry.cc
 
- 	(check): Removed.
 
- 	(Supported): Updated.
 
- 	(dropUnsupportedResource): Fixed a memory leak.
 
- 	* src/ShaVisitor.cc
 
- 	(ShaVisitor): Updated according to the changes in MessageDigestContext.
 
- 	(~ShaVisitor): Updated according to the changes in
 
- 	MessageDigestContext.
 
- 	(visit): Updated according to the changes in MessageDigestContext.
 
- 	* src/main.cc
 
- 	(main): Rewritten the portion of download loop. --lowest-speed-limit
 
- 	command-line option added.
 
- 	* src/DownloadEngine.h
 
- 	(SocketEntry): New class.
 
- 	(SocketEntries): New definition.
 
- 	(PairFind): Removed.
 
- 	(SockCmdMap): Removed.
 
- 	* src/DownloadEngine.cc
 
- 	(DownloadEngine): Rewritten.
 
- 	(~DownloadEngine): Rewritten.
 
- 	(run): Renamed activeCommandUuids as activeUuids.
 
- 	(SetDescriptor): Rewritten.
 
- 	(AccumulateActiveCommandUuid): Removed.
 
- 	(AccumulateActiveUuid): New function object.
 
- 	(waitData): Rewritten.
 
- 	(updateFdSet): Rewritten.
 
- 	(addSocket): Rewritten.
 
- 	(deleteSocket): Rewritten.
 
- 	(addSocketForReadCheck): Rewritten.
 
- 	(deleteSocketForReadCheck): Rewritten.
 
- 	(addSocketForWriteCheck): Rewritten.
 
- 	(deleteSocketForWriteCheck): Rewritten.
 
- 	
 
- 	* src/Xml2MetalinkProcessor.cc
 
- 	(getEntry): Rewritten the portion of MetalinkEntry creation.
 
- 	* src/DownloadCommand.cc
 
- 	(executeInternal): Added the check routine for lowest speed limit.
 
- 	* src/AbstractDiskWriter.cc
 
- 	(AbstractDiskWriter): Updated according to the changes in
 
- 	MessageDigestContext.
 
- 	(~AbstractDiskWriter): Updated according to the changes in
 
- 	MessageDigestContext.
 
- 	(sha1Sum): Updated according to the changes in MessageDigestContext.
 
- 	* src/RequestInfo.h: New class.
 
- 	* src/UrlRequestInfo.h: New class.
 
- 	* src/UrlRequestInfo.cc: New class.
 
- 	* src/TorrentRequestInfo.h: New class.
 
- 	* src/TorrentRequestInfo.cc: New class.
 
- 	* src/MetalinkRequestInfo.h: New class.
 
- 	* src/MetalinkRequestInfo.cc: New class.
 
- 	* src/Checksum.h: New class.
 
- 	* src/DownloadEngineFactory.h: New class.
 
- 	* src/DownloadEngineFactory.cc: New class.
 
- 	
 
- 2006-08-03  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/Option.h
 
- 	(getAsBool): New function.
 
- 	* src/Option.cc
 
- 	(prefs.h): Included.
 
- 	(defined): 0-length value is now recognized as undefined.
 
- 	(getAsInt): Rewritten.
 
- 	(getAsLLInt): Rewritten.
 
- 	(getAsBool): New function.
 
- 	
 
- 	* src/FeatureConfig.h: Rewritten.
 
- 	* src/FeatureConfig.cc: Rewritten.
 
- 	* src/prefs.h
 
- 	(PREF_STDOUT_LOG): New definition.
 
- 	(PREF_LOG): New definition.
 
- 	(PREF_DIR): New definition.
 
- 	(PREF_OUT): New definition.
 
- 	(PREF_SPLIT): New definition.
 
- 	(PREF_DAEMON): New definition.
 
- 	(PREF_REFERER): New definition.
 
- 	(PREF_TORRENT_FILE): New definition.
 
- 	(PREF_LISTEN_PORT): New definition.
 
- 	(PREF_METALINK_FILE): New definition.
 
- 	(PREF_METALINK_VERSION): New definition.
 
- 	(PREF_METALINK_LANGUAGE): New definition.
 
- 	(PREF_METALINK_OS): New definition.
 
- 	(PREF_METALINK_SERVERS): New definition.
 
- 	* src/main.cc
 
- 	(main): Following command-line parameters are now put into Option
 
- 	class: stdoutLog, logfile, dir, ufilename, split, daemonMode,
 
- 	referer, torrentFile, metalinkFile, listenPort, metalinkVersion,
 
- 	metalinkLanguage, metalinkOs, metalinkServers
 
- 	
 
- 	To fix the bug that aria2 can not handle http response header properly.
 
- 	
 
- 	* src/HttpHeader.cc
 
- 	(put): Made name lowercased.
 
- 	(defined): Made name lowercased.
 
- 	(getFirst): Made name lowercased.
 
- 	(get): Made name lowercased.
 
- 	(getFirstAsInt): Rewritten.
 
- 	(getFirstAsLLInt): Rewritten.
 
- 2006-07-30  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/TorrentMan.h:
 
- 	(advertisePiece): Updated doc.
 
- 	(getAdvertisedPieceIndexes): Updated doc.
 
- 	(removeAdvertisedPiece); New function.
 
- 	
 
- 	* src/TorrentMan.cc
 
- 	(FindElapsedHave): New function object.
 
- 	(removeAdvertisedPiece): New function.
 
- 	* src/HaveEraseCommand.h: New class.
 
- 	* src/HaveEraseCommand.cc: New class.
 
- 	* src/FeatureConfig.h: New class.
 
- 	* src/FeatureConfig.cc: New class.
 
- 	
 
- 	* src/Request.h
 
- 	(defaultPorts): Removed.
 
- 	* src/Request.cc
 
- 	(FeatureConfig.h): Included.
 
- 	(Request): Removed the statements related to defaultPorts.
 
- 	(parseUrl): Removed metalinkEnabled. Use FeatureConfig instead.
 
- 	A default port number is now retrieved from FeatureConfig.
 
- 	
 
- 	* src/main.cc
 
- 	(HaveEraseCommand.h): Included.
 
- 	(showVersion): Added the output of feature list.
 
- 	(main): Added HaveEraseCommand to command queue in BitTorrent
 
- 	downloading.
 
- 	
 
- 	* src/PeerInteractionCommand.h
 
- 	(chokeCheckPoint): Commented out.
 
- 	(periodicExecPoint): New variable.
 
- 	* src/PeerInteractionCommand.cc
 
- 	(executeInternal): Following methods are now called in at least every
 
- 	0.5 seconds to reduce CPU usage:
 
- 	detectMessageFlooding(), peerInteraction->checkRequestSlot(),
 
- 	checkHave(), sendKeepAlive().
 
- 	(checkLongTimePeerChoking): Commented out.
 
- 	* src/BitfieldMan.h
 
- 	(getNthBitIndex): Changed the method signature.
 
- 	(getMissingIndexRandomly): Changed the method signature.
 
- 	* src/BitfieldMan.cc
 
- 	(getNthBitIndex): Rewritten
 
- 	(getMissingIndexRandomly): Rewritten.
 
- 	(hasMissingPiece): Rewritten.
 
- 	(getMissingIndex): Refactored.
 
- 	(getMissingUnusedIndex); Refactored.
 
- 	(getMissingIndex): Refactored.
 
- 	
 
- 2006-07-27  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/PeerMessage.h
 
- 	(Piece.h): Included.
 
- 	(SharedHandle.h): Included.
 
- 	(invalidate): New variable.
 
- 	(uploading): New variable.
 
- 	(isInvalidate): New function.
 
- 	(isUploading): New function.
 
- 	(onPush): New function.
 
- 	(onChoked): New function.
 
- 	(onCanceled): New function.
 
- 	(onAbortPiece): New function.
 
- 	(PeerMessageHandle): New type definition.
 
- 	
 
- 	* src/PeerMessage.cc
 
- 	(PeerMessage): Added the initialization for invalidate and uploading.
 
- 	
 
- 	* src/CancelMessage.h
 
- 	(CancelMessage): Rewritten.
 
- 	* src/RejectMessage.h
 
- 	(RejectMessage): Rewritten.
 
- 	* src/Metalinker.h
 
- 	(operator=): Defined.
 
- 	
 
- 	* src/MetaEntry.h
 
- 	(operator=): Defined.
 
- 	* src/MetalinkResource.h
 
- 	(operator=): Defined.
 
- 	
 
- 	* src/AllowedFastMessage.h
 
- 	(AllowedFastMessage): Rewritten.
 
- 	* src/HandshakeMessage.h
 
- 	(HandshakeMessage): New function(overload).
 
- 	
 
- 	* src/HandshakeMessage.cc
 
- 	(HandshakeMessage): Rewritten.
 
- 	(init): New function.
 
- 	* src/HaveMessage.h
 
- 	(HaveMessage): Rewritten.
 
- 	
 
- 	* src/Time.h
 
- 	(operator=): Defined the function body here.
 
- 	* src/Time.cc
 
- 	(operator=): Removed.
 
- 	
 
- 	* src/SocketCore.h
 
- 	(operator==): Defined here.
 
- 	(operator!=): Defined here.
 
- 	(operator<): Defined here.
 
- 	* src/SocketCore.cc
 
- 	(operator==): Removed.
 
- 	(operator<): Removed.
 
- 	* src/BitfieldMan.h
 
- 	(operator=): Defined the function body here.
 
- 	* src/BitfieldMan.cc
 
- 	(operator=): Removed.
 
- 	* src/TorrentMan.h
 
- 	(deleteErrorPeer): Removed.
 
- 	(deleteUnusedPeer); New function.
 
- 	* src/TorrentMan.cc
 
- 	(addPeer): Call deleteUnusedPeer.
 
- 	(deleteErrorPeer): Removed.
 
- 	(deleteUnusedPeer): New function.
 
- 	* src/PeerAbstractCommand.h
 
- 	(setNoCheck): New function.
 
- 	(noCheck): New variable.
 
- 	* src/PeerAbstractCommand.cc
 
- 	(PeerAbstractCommand): Added the initialization of noCheck.
 
- 	(execute): Added a check for noCheck.
 
- 	(setNoCheck): New function.
 
- 	* src/Util.h
 
- 	(stdio.h): Included.
 
- 	* src/Util.cc
 
- 	(unistd.h): Included.
 
- 	* src/DefaultDiskWriter.cc
 
- 	(unistd.h): Included.
 
- 	* src/Peer.h
 
- 	(operator==): Defined the function body here.
 
- 	(operator!=): Defined the function body here.
 
- 	* src/Peer.cc
 
- 	(operator==): Removed.
 
- 	(operator!=): Removed.
 
- 	* src/Piece.h
 
- 	(Piece): Defined the function body here(copy constructor).
 
- 	(operator=): Defined the function body here.
 
- 	(operator==): Defined the function body here.
 
- 	* src/Piece.cc
 
- 	(Piece): Removed(copy constructor).
 
- 	(operator=): Removed.
 
- 	(operator==): Removed.
 
- 	
 
- 	* src/PeerMessageUtil.h
 
- 	(ChokeMessage.h): Removed.
 
- 	(UnchokeMessage.h): Removed.
 
- 	(InterestedMessage.h): Removed.
 
- 	(NotInterestedMessage.h): Removed.
 
- 	(HaveMessage.h): Removed.
 
- 	(BitfieldMessage.h): Removed.
 
- 	(RequestMessage.h): Removed.
 
- 	(CancelMessage.h): Removed.
 
- 	(PieceMessage.h): Removed.
 
- 	(HandshakeMessage.h): Removed.
 
- 	(KeepAliveMessage.h): Removed.
 
- 	(PortMessage.h): Removed.
 
- 	(HaveAllMessage.h): Removed.
 
- 	(HaveNoneMessage.h): Removed.
 
- 	(PeerConnection.h): Removed.
 
- 	(HandshakeMessage.h): Included.
 
- 	* src/BitfieldMessage.h
 
- 	(init): New function.
 
- 	(BitfieldMessage): Rewritten.
 
- 	(BitfieldMessage): New function(overload).
 
- 	* src/RequestSlot.h
 
- 	(operator=): Defined the function body here.
 
- 	(operator==): Defined the function body here.
 
- 	* src/RequestSlot.cc
 
- 	(operator=): Removed.
 
- 	(operator==): Removed.
 
- 	
 
- 	To remove the dependency on the PeerMessage subclass from
 
- 	PeerInteraction:
 
- 	* src/PeerMessageFactory.h: New class.
 
- 	* src/PeerMessageFactory.cc: New class.
 
- 	* src/SimplePeerMessage.cc
 
- 	(send): If invalidate is true then do nothing.
 
- 	* src/PeerInteractionCommand.cc
 
- 	(HandshakeMessage.h): Included.
 
- 	(KeepAliveMessage.h): Included.
 
- 	(ChokeMessage.h): Included.
 
- 	(UnchokeMessage.h): Included.
 
- 	(HaveMessage.h): Included.
 
- 	(executeInternal): Call setNoCheck().
 
- 	Removed setWriteCheckSocket(socket).
 
- 	* src/PeerInteraction.h
 
- 	(ChokeMessage.h): Removed.
 
- 	(UnchokeMessage.h): Removed.
 
- 	(InterestedMessage.h): Removed.
 
- 	(NotInterestedMessage.h): Removed.
 
- 	(HaveMessage.h): Removed.
 
- 	(BitfieldMessage.h): Removed.
 
- 	(RequestMessage.h): Removed.
 
- 	(CancelMessage.h): Removed.
 
- 	(PieceMessage.h): Removed.
 
- 	(HandshakeMessage.h): Removed.
 
- 	(KeepAliveMessage.h): Removed.
 
- 	(PortMessage.h): Removed.
 
- 	(HaveAllMessage.h): Removed.
 
- 	(HaveNoneMessage.h): Removed.
 
- 	(RejectMessage.h): Removed.
 
- 	(AllowedFastMessage.h): Removed.
 
- 	(SuggestPieceMessage.h): Removed.
 
- 	(PeerMessageFactory.h): Included.
 
- 	(PeerMessageHandle): Removed typedef of PeerMessageHandle.
 
- 	(HandshakeMessageHandle): Removed typedef of HandshakeMessageHandle.
 
- 	(PeerMessageFactory): New variable.
 
- 	(createPeerMessage): Removed.
 
- 	(createHandshakeMessage): Removed.
 
- 	(setPeerMessageCommonProperty): Removed.
 
- 	(addRequestSlot): New function.
 
- 	(receiveHandshake): Changed the return value type to PeerMessageHandle.
 
- 	(getPeerMessageFactory): New function.
 
- 	(createRequestMessage): Removed.
 
- 	(createCancelMessage): Removed.
 
- 	(createPieceMessage): Removed.
 
- 	(createHaveMessage): Removed.
 
- 	(createChokeMessage): Removed.
 
- 	(createUnchokeMessage): Removed.
 
- 	(createInterestedMessage): Removed.
 
- 	(createNotInterestedMessage): Removed.
 
- 	(createBitfieldMessage): Removed.
 
- 	(createKeepAliveMessage): Removed.
 
- 	(createHaveAllMessage): Removed.
 
- 	(createHaveNoneMessage): Removed.
 
- 	(createRejectMessage): Removed.
 
- 	(createAllowedFastMessage): Removed.	
 
- 	* src/PeerInteraction.cc
 
- 	(PeerInteraction): Allocate PeerMessageFactory here.
 
- 	(~PeerInteraction): Deallocate PeerMessageFactory here.
 
- 	(sendMessages): Use msg->isUploading() instead of msg->getId() ==
 
- 	PieceMessage::ID.
 
- 	(addMessage): Simplified by using PeerMessage::onPush().
 
- 	(addRequestSlot): New function.
 
- 	(rejectAllPieceMessageInQueue): Simplified by using
 
- 	PeerMessage::onChoked().
 
- 	(rejectPieceMessageInQueue): Simplified by using
 
- 	PeerMessage::onCanceled().
 
- 	(abortPiece): Simplified by using PeerMessage::abortPiece().
 
- 	(receiveHandshake): Changed the return value type to PeerMessageHandle.
 
- 	(createHandshakeMessage): Removed.
 
- 	(createPeerMessage): Removed.
 
- 	(sendHandshake): Call PeerMessageFactory::createHandshakeMessage().
 
- 	(setPeerMessageCommonProperty): Removed.
 
- 	(createRequestMessage): Removed.
 
- 	(createCancelMessage): Removed.
 
- 	(createPieceMessage): Removed.
 
- 	(createHaveMessage): Removed.
 
- 	(createChokeMessage): Removed.
 
- 	(createUnchokeMessage): Removed.
 
- 	(createInterestedMessage): Removed.
 
- 	(createNotInterestedMessage): Removed.
 
- 	(createBitfieldMessage): Removed.
 
- 	(createKeepAliveMessage): Removed.
 
- 	(createHaveAllMessage): Removed.
 
- 	(createHaveNoneMessage): Removed.
 
- 	(createRejectMessage): Removed.
 
- 	(createAllowedFastMessage): Removed.
 
- 	* src/PieceMessage.h
 
- 	(createRejectMessage): New function.
 
- 	(PieceMessage): Rewritten.
 
- 	(onChoked): New function.
 
- 	(onCanceled): New function.
 
- 	* src/PieceMessage.cc
 
- 	(send): If invalidate is true then do nothing, just return.
 
- 	(createRejectMessage): New function.
 
- 	(onChoked): New function.
 
- 	(onCanceled): New function.
 
- 	* src/RequestMessage.h
 
- 	(RequestMessage): Rewritten.
 
- 	(onPush): New function.
 
- 	(onAbortPiece): New function.
 
- 	* src/RequestMessage.cc
 
- 	(onPush): New function.
 
- 	(onAbortPiece): New function.
 
- 	
 
- 	Update fd_set when a socket is added or deleted in order to improve
 
- 	performance:
 
- 	* src/DownloadEngine.h
 
- 	(rfdset): New variable.
 
- 	(wfdset): New variable.
 
- 	(updateFdSet): New function.
 
- 	* src/DownloadEngine.cc
 
- 	(SetDescriptor::operator()): Use SockCmdMap::value_type.
 
- 	(AccumulateActiveCommandUuid::operator()): Use SockCmdMap::value_type.
 
- 	(waitData): Copy rfdset and wfdset.
 
- 	(updateFdSet): New function.
 
- 	(addSocket): Call updateFdSet.
 
- 	(deleteSocket): Call updateFdSet.
 
- 	
 
- 2006-07-21  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
-         To add the support for Metalink3.0 backward compatible links:
 
- 	
 
- 	* src/Request.h
 
- 	(SAFE_CHARS): Added '#'.
 
- 	(METALINK_MARK): New definition.
 
- 	* src/Request.cc
 
- 	(parseUrl): Added the support for Metalink3.0 backward compatible
 
- 	links.
 
- 	etc
 
- 	* src/PeerInteraction.cc
 
- 	(MsgPushBack): Removed.
 
- 	(sendMessages): Use STL copy and back_inserter.
 
- 	(rejectAllPieceMessageInQueue): Use STL copy and back_inserter.
 
- 	(rejectPieceMessageInQueue): Use STL copy and back_inserter.
 
- 	* src/TorrentMan.h
 
- 	(MAX_PEER_LIST_SIZE): Changed to 100 from 250.
 
- 	
 
- 2006-07-19  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/SharedHandle.h: New class.
 
- 	To wrap Socket, Command, PeerMessage and Peer with SharedHandle:
 
- 	* src/HttpResponseCommand.h
 
- 	(HttpResponseCommand): Wrapped Socket.
 
- 	* src/SocketCore.h
 
- 	(operator==): New function.
 
- 	(operator!=): New function.
 
- 	(operator<): New function.
 
- 	(getSockfd): New function.
 
- 	(isOpen): New function.
 
- 	(writeData): New function.
 
- 	* src/SocketCore.cc
 
- 	(operator==): New function.
 
- 	(operator!=): New function.
 
- 	(operator<): New function.
 
- 	* src/AbstractCommand.h
 
- 	(socket): Changed its type to SocketHandle.
 
- 	(setReadCheckSocket): Replaced Socket with SocketHandle.
 
- 	(setWriteCheckSocket): Replaced Socket with SocketHandle.
 
- 	(disableReadCheckSocket): New function.
 
- 	(disableWriteCheckSocket): New function.
 
- 	(readCheckTarget): Changed its type to SocketHandle.
 
- 	(writeCheckTarget): Changed its type to SocketHandle.
 
- 	(AbstractCommand): Replaced Socket with SocketHandle.
 
- 	* src/AbstractCommand.cc
 
- 	(AbstractCommand): Replaced Socket with SocketHandle.
 
- 	(~AbstractCommand): Removed the deallocation for Socket object.
 
- 	(disableReadCheckSocket): New function.
 
- 	(setReadCheckSocket): Replaced Socket with SocketHandle.
 
- 	(disableWriteCheckSocket): New function.
 
- 	(setWriteCheckSocket): Replaced Socket with SocketHandle.
 
- 	* src/HttpDownloadCommand.cc
 
- 	(DownloadCommand): Replaced Socket with SocketHandle.
 
- 	* src/PeerAbstractCommand.h
 
- 	(socket): Changed its type to SocketHandle.
 
- 	(peer): Changed its type to PeerHandle.
 
- 	(setReadCheckSocket): Replaced Socket with SocketHandle.
 
- 	(setWriteCheckSocket): Replaced Socket with SocketHandle.
 
- 	(disableReadCheckSocket): New function.
 
- 	(disableWriteCheckSocket): New function.
 
- 	(readCheckTarget): Changed its type to SocketHandle.
 
- 	(writeCheckTarget): Changed its type to SocketHandle.
 
- 	(PeerAbstractCommand): Replaced Socket with SocketHandle.
 
- 	Replaced Peer with PeerHandle.
 
- 	* src/HttpRequestCommand.cc
 
- 	(HttpRequestCommand): Replaced Socket with SocketHandle.
 
- 	Use disableReadCheckSocket.
 
- 	* src/PeerInitiateConnectionCommand.h
 
- 	(PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
 
- 	* src/PeerChokeCommand.cc
 
- 	(UploadFaster::operator()): Replaced Peer with PeerHandle.
 
- 	(DownloadFaster::operator()): Replaced Peer with PeerHandle.
 
- 	(execute): Use PeerHandle.
 
- 	* src/PeerConnection.h
 
- 	(HandshakeMessage.h): Removed include of HandshakeMessage.h.
 
- 	(socket): Changed its type to SocketHandle.
 
- 	(PeerConnection): Replaced Socket with SocketHandle.	
 
- 	* src/PeerConnection.cc
 
- 	(PeerConnection): Replaced Socket with SocketHandle.
 
- 	* src/PeerInteractionCommand.h
 
- 	(PeerInteractionCommand): Replaced socket with SocketHandle.
 
- 	Replaced Peer with PeerHandle.	
 
- 	* src/PeerInteractionCommand.cc
 
- 	(PeerInteractionCommand): Replaced Socket with SocketHandle.
 
- 	Replaced Peer with PeerHandle.
 
- 	(executeInternal): Use disableWriteCheckSocket.
 
- 	Use HandshakeMessageHandle.
 
- 	(receiveMessages): Use PeerMessageHandle.
 
- 	(prepareForNextPeer): Use PeerHandle.
 
- 	* src/HttpProxyRequestCommand.h
 
- 	(HttpProxyRequestCommand): Replaced Socket with SocketHandle.
 
- 	* src/HttpResponseCommand.cc
 
- 	(HttpResponseCommand): Replaced Socket with SocketHandle.
 
- 	* src/TorrentMan.cc
 
- 	(nullPeer): Added external reference.
 
- 	(~TorrentMan): Removed the deallocation of the elements of peers.
 
- 	(addPeer): Rewritten.
 
- 	(isPeerAvailable): Use nullPeer.
 
- 	(deleteOldpeers): Replaced with deleteErrorPeer.
 
- 	(deleteErrorPeer): New function.
 
- 	(getPeer): Use PeerHandle and nullPeer.
 
- 	(hasMissingPiece): Replaced Peer with PeerHandle.
 
- 	(getMissingPieceIndex): Replaced Peer with PeerHandle.
 
- 	(getMissingFastPieceIndex): Replaced Peer with PeerHandle.
 
- 	(getMissingFastPiece): Replaced Peer with PeerHandle.
 
- 	(getMissingPiece): Replaced Peer with PeerHandle.
 
- 	* src/FtpNegotiateCommand.cc
 
- 	(FtpNegotiationCommand): Replaced Peer with PeerHandle.
 
- 	(~FtpNegotiationCommand): Removed the deallocation of Sockets.
 
- 	(recvGreeting): Use disableWriteCheckSocket.
 
- 	(recvPasv): Removed the allocation of Socket.
 
- 	Use disableReadCheckSocket.
 
- 	(sendRestPasv): Use disableWriteCheckSocket.
 
- 	(recvRetr): Changed assertion.
 
- 	* src/PeerInteraction.h
 
- 	(SharedHandle.h): Included SharedHandle.h.
 
- 	(PeerMessageHandle): New type definition.
 
- 	(HandshakeMessageHandle): New type definition.
 
- 	(MessageQueue): Changed. Now its element is of type PeerMessageHandle.
 
- 	(peer): Changed its type to PeerHandle.
 
- 	(createHandshakeMessage): Replaced HandshakeMessage with
 
- 	HandshakeMessageHandle.
 
- 	(createPeerMessage): Replaced PeerMessageHandle with PeerMessage.
 
- 	(PeerInteraction): Replaced Peer with PeerHandle.
 
- 	Replaced Socket with SocketHandle.
 
- 	(addMessage): Replaced PeerMessage with PeerMessageHandle.
 
- 	(receiveMessage): Replaced PeerMessage with PeerMessageHandle.
 
- 	(receiveHandshake): Replaced HandshakeMessage with
 
- 	HandshakeMessageHandle.
 
- 	* src/PeerInteraction.cc
 
- 	(PeerInteraction): Replaced Peer with PeerHandle.
 
- 	Replaced Socket with SocketHandle.
 
- 	(~PeerInteraction): Removed the deallocation of the elements of
 
- 	messageQueue.
 
- 	(MsgPushBack::operator()): Replaced PeerMessage with PeerMessageHandle.
 
- 	(isSendingMessageInProgress): Replaced PeerMessage with
 
- 	PeerMessageHandle.
 
- 	(sendMessages): Use PeerMessageHandle. Removed try-catch block.
 
- 	(addMessage): Replaced PeerMessage with PeerMessageHandle.
 
- 	(rejectAllPieceMessageInQueue): Use PeerMessageHandle.
 
- 	(rejectPieceMessageInQueue): Use PeerMessageHandle.
 
- 	(abortPiece): Use PeerMessageHandle.
 
- 	(receiveHandshake): Replaced HandshakeMessage with
 
- 	HandshakeMessageHandle. Removed try-catch block.
 
- 	(createHandshakeMessage): Replaced HandshakeMessage with
 
- 	HandshakeMessageHandle.
 
- 	(receiveMessage): Replaced PeerMessage with PeerMessageHandle.
 
- 	Removed try-catch block.
 
- 	(createPeerMessage): Replaced PeerMessage with PeerMessageHandle.
 
- 	* src/HttpProxyResponseCommand.cc
 
- 	(HttpProxyRequestCommand): Replaced Socket with SocketHandle.
 
- 	* src/FtpTunnelResponseCommand.h
 
- 	(FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
 
- 	* src/HttpConnection.cc
 
- 	(HttpConnection): Replaced Socket with SocketHandle.
 
- 	* src/PeerAbstractCommand.cc
 
- 	(PeerAbstractCommand): Replaced Socket with SocketHandle.
 
- 	(~PeerAbstractCommand): Removed the deallocation of socket.
 
- 	Use disableReadCheckSocket, disableWriteCheckSocket.
 
- 	(disableReadCheckSocket): New function.
 
- 	(setReadCheckSocket): Replaced Socket with SocketHandle.
 
- 	(disableWriteCheckSocket): New function.
 
- 	(setWriteCheckSocket): Replaced Socket with SocketHandle.
 
- 	* src/InitiateConnectionCommandFactory.h: Corrected indentation.
 
- 	* src/FtpTunnelRequestCommand.cc
 
- 	(FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
 
- 	(~FtpTunnelRequestCommand): Corrected indentation.
 
- 	* src/DownloadCommand.h
 
- 	(DownloadCommand): Replaced Socket with SocketHandle.
 
- 	* src/PeerListenCommand.cc
 
- 	(PeerListenCommand): Removed the initialization of socket.
 
- 	(~PeerListenCommand): Removed the deallocation of socket.
 
- 	(bindPort): Use SocketHandle.
 
- 	(execute): Use SocketHandle and PeerHandle.
 
- 	* src/FtpDowndloadCommand.cc
 
- 	(FtpDownloadCommand): Replaced Socket with SocketHandle.
 
- 	(~FtpDownloadCommand): Removed the deallocation of ctrlSocket.
 
- 	* src/main.cc
 
- 	(main): Corrected indentation.
 
- 	* src/HttpInitiateConnectionCommand.cc
 
- 	(HttpInitiateConnectionCommand): Replaced Socket with SocketHandle.
 
- 	(executeInternal): Removed the allocation of socket.
 
- 	* src/HttpRequestCommand.h
 
- 	(HttpRequestCommand): Replaced Socket with SocketHandle.
 
- 	* src/FtpNegotiationCommand.h
 
- 	(dataSocket): Changed its type to SocketHandle.
 
- 	(serverSocket): Changed its type to SocketHandle.
 
- 	(FtpNegotiationCommand): Replaced Socket with SocketHandle.
 
- 	* src/TorrentMan.h
 
- 	(MAX_PEER_UPDATE): Removed.
 
- 	(MAX_PEERS): New definition.
 
- 	(Peers): The element is now of type PeerHandle.
 
- 	(addPeer): Replaced Peer with PeerHandle. Removed 'duplicate' argument.
 
- 	(getPeer): Replaced Peer with PeerHandle.
 
- 	(deleteOldErrorPeers): Removed.
 
- 	(deleteErrorPeer): New function.
 
- 	(hasMissingPiece): Replaced Peer with PeerHandle.
 
- 	(getMissingPieceIndex): Replaced Peer with PeerHandle.
 
- 	(getMissingPiece): Replaced Peer with PeerHandle.
 
- 	(getMissingFastPieceIndex): Replaced Peer with PeerHandle.
 
- 	(getMissingFastPiece): Replaced Peer with PeerHandle.
 
- 	(addActivePeer): Replaced Peer with PeerHandle.
 
- 	(deleteActivePeer): Replaced Peer with PeerHandle.
 
- 	Added a check for the return value of find.
 
- 	* src/FtpTunnelResponseCommand.cc
 
- 	(FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
 
- 	* src/FtpInitiateConnectionCommand.cc
 
- 	(executeInternal): Removed the allocation of socket.
 
- 	* src/DownloadEngine.h
 
- 	(Sockets): An element is now of type SocketHandle.
 
- 	(SockCmdMap): A key is of type SocketHandle, a value is of type int.
 
- 	(CommandUuids): New type definition.
 
- 	(rsockets): Changed its type to SockCmdMap.
 
- 	(wsockets): Changed its type to SockCmdMap.
 
- 	(addSocket): Rewritten.
 
- 	(deleteSocket): Rewritten.
 
- 	(addSocketForReadCheck): Rewritten.
 
- 	(deleteSocketForReadCheck): Rewritten.
 
- 	(addSocketForWriteCheck): Rewritten.
 
- 	(deleteSocketForWriteCheck): Rewritten.
 
- 	(PairFind): New template class.
 
- 	* src/HttpDownloadCommand.h
 
- 	(HttpDownloadCommand): Replaced Socket with SocketHandle.
 
- 	* src/FtpConnection.cc
 
- 	(FtpConnection): Replaced Socket with SocketHandle.
 
- 	(sendPort): Removed the allocation of serverSocket. Removed try-catch
 
- 	block.
 
- 	* src/InitiateConnectionCommandFactory.cc
 
- 	(DlAbortEx.h): Included DlAbortEx.h.
 
- 	(createInitiateConnectionCommand): Throw exception if the protocol of
 
- 	requested URI is not supported.
 
- 	* src/Peer.cc
 
- 	(nullPeer): Changed its type to PeerHandle.
 
- 	(operator==): New function.
 
- 	(operator!=): New function.
 
- 	* src/Peer.h
 
- 	(SharedHandle.h): Included SharedHandle.h.
 
- 	(operator==): New function.
 
- 	(operator!=): New function.
 
- 	(Peer): Added the default constructor.
 
- 	Use resetStatus() to initialize member variables.
 
- 	(nullPeer): Removed.
 
- 	* src/TrackerUpdateCommand.cc
 
- 	(execute): Brushed up using SharedHandle. Replaced MAX_PEER_UPDATE
 
- 	with MIN_PEERS.
 
- 	* src/PeerListenCommand.h
 
- 	(socket): Changed its type to SocketHandle.
 
- 	* src/Command.h
 
- 	(CommandUuid): New type definition.
 
- 	(uuid): New variable.
 
- 	(uuidGen): New variable.
 
- 	(Command): Added the initialization of uuid.
 
- 	(getUuid): New function.
 
- 	* src/Socket.h
 
- 	(Socket): Removed.
 
- 	(SocketHandle): New type definition.
 
- 	* src/DownloadEngine.h
 
- 	(FindCommand): New function object.
 
- 	(run): The portion of socket check was rewritten.
 
- 	(SetDescriptor): New function object.
 
- 	(AccumulateActiveCommandUuid): New function object.
 
- 	(waitData): Rewritten.
 
- 	(addSocket): Rewritten.
 
- 	(deleteSocket): Rewritten.
 
- 	(addSocketForReadCheck): Rewritten.
 
- 	(addSocketForWriteCheck): Rewritten.
 
- 	(deleteSocketForReadCheck): Rewritten.
 
- 	(deleteSocketForWriteCheck): Rewritten.
 
- 	* src/HttpProxyResponseCommand.h
 
- 	(HttpProxyResponseCommand): Replaced Socket with SocketHandle.
 
- 	* src/HttpConnection.h
 
- 	(socket): Changed its type to SocketHandle.
 
- 	(HttpConnection): Replaced Socket with SocketHandle.
 
- 	* src/PeerInitiateConnectionCommand.cc
 
- 	(PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
 
- 	(executeInternal): Removed the allocation of socket.
 
- 	(prepareForNextPeer): Use PeerHandle.
 
- 	* src/PeerMessage.h
 
- 	(peer): Changed its type to PeerHandle.
 
- 	(getPeer): Replaced Peer with PeerHandle.
 
- 	(setPeer): Replaced Peer with PeerHandle.
 
- 	* src/DownloadCommand.cc
 
- 	(DownloadCommand): Replaced Socket with SocketHandle.
 
- 	* src/FtpConnection.h
 
- 	(socket): Changed its type to SocketHandle.
 
- 	(FtpConnection): Replaced Socket with SocketHandle.
 
- 	(sendPort); Replaced Socket with SocketHandle.
 
- 	* src/FtpDowndloadCommand.h
 
- 	(ctrlSocket): Changed its type to SocketHandle.
 
- 	(FtpDownloadCommand): Replaced Socket with SocketHandle.
 
- 	* src/HttpProxyRequestCommand.cc
 
- 	(HttpProxyRequestCommand): Replaced Socket with SocketHandle.
 
- 	* src/FtpTunnelRequestCommand.h
 
- 	(FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
 
- 	
 
- 	etc
 
- 	
 
- 	* src/PeerChokeCommand.h
 
- 	(setAllPeerChoked): Removed.
 
- 	(setAllPeerResetDelta): Removed.
 
- 	* src/PeerChokeCommand.cc
 
- 	(setAllPeerChoked): Removed.
 
- 	(ChokePeer): New function object.
 
- 	(setAllPeerResetDelta): Removed.
 
- 	(ResetDelta): New function object.
 
- 	(orderByDownloadRate): Fixed a bug: use DowloadFaster, not UploadFaster
 
- 	(execute): Show download speed when the local node is a seeder.
 
- 	setAllPeerChoked and setAllPeerResetDelta were rewritten
 
- 	using STL.
 
- 	* src/TrackerWatcherCommand.h
 
- 	(MIN_PEERS): Removed.
 
- 	* src/TorrentMan.cc
 
- 	(getPeer): Replaced MAX_PEER_UPDATE with MIN_PEERS.
 
- 	
 
- 2006-07-07  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To fix the bug that .aria2 file is not saved if downloading is stopped
 
- 	by the errors:it results that aria2 can not resume downloading:
 
- 	
 
- 	* src/main.cc
 
- 	(normalDownload): Added the call to save().
 
- 	(main): Added the deletion of the elements in 'reserved'.
 
- 	To fix log:
 
- 	* src/PeerInteraction.cc
 
- 	(receiveHandshake): Fixed log.
 
- 2006-07-05  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To improve download performance in BitTorrent:
 
- 	
 
- 	* src/TorrentMan.cc
 
- 	(getPeer): Check the number of connections. Return nullPeer if
 
- 	it is greater than MAX_PEER_UPDATE.
 
- 	This code was originally here, but was removed in 0.5.1.
 
- 2006-07-04  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
-         To improve the conditional compilation:
 
- 	* src/MultiDiskWriter.h:
 
- 	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.	
 
- 	* src/MultiDiskWriter.cc:
 
- 	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
 
- 	* src/Util.h:
 
- 	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
 
- 	Added ENABLE_BITTORRENT around computeFastSet().
 
- 	* src/Util.cc:
 
- 	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
 
- 	Added ENABLE_BITTORRENT around computeFastSet().	
 
- 	* src/messageDigest.h:
 
- 	Replaced ENABLE_BITTORRENT with ENABLE_SSL.
 
- 	* src/ShaVisitor.h:
 
- 	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
 
- 	* src/ShaVisitor.cc:
 
- 	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
 
- 	* src/main.cc:
 
- 	Added ENABLE_BITTORRENT around includes and blocks related to
 
- 	BitTorrent.
 
- 	Added ENABLE_MESSAGE_DIGEST to skip checksum checking when the message
 
- 	digest support is not available.
 
- 	* src/AbstractDiskWriter.h:
 
- 	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
 
- 	* src/AbstractDiskWriter.cc:
 
- 	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
 
- 	* src/MetalinkEntry.cc
 
- 	(check): Added ENABLE_MESSAGE_DIGEST. Return true if the message digest
 
- 	support is not available.
 
- 	
 
- 	To add command-line options for Metalink:
 
- 	* src/main.cc:
 
- 	Added metalink-version, metalink-language, metalink-os,
 
- 	follow-metalink.
 
- 	To use EXIT_SUCCESS and EXIT_FAILURE with exit():
 
- 	* src/main.cc: Use these definition.
 
- 	* Release 0.6.0
 
- 	
 
- 2006-07-03  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add Metalink support(http/ftp only):
 
- 	* src/AbstractCommand.h
 
- 	(tryReserved): New function.
 
- 	* src/AbstractCommand.cc
 
- 	(execute): Call tryReserved().
 
- 	(tryReserved): New function.
 
- 	* src/Request.h
 
- 	(Requests): New type definition.
 
- 	* src/SegmentMan.h
 
- 	(reserved): New variable.
 
- 	* src/Util.h
 
- 	(fileChecksum): New function.
 
- 	(toUpper): New function.
 
- 	(toLower): New function.
 
- 	* src/Util.cc
 
- 	(messageDigest.h): Included.
 
- 	(trim): Trim \r\n\t.
 
- 	(fileChecksum): New function.
 
- 	(toUpper): New function.
 
- 	(toLower): New function.
 
- 	* src/main.cc
 
- 	(normalDownload): New function.
 
- 	(main): Added 2 command-line options: metalink-file,
 
- 	metalink-connection. Their usage has not been written yet.
 
- 	* src/MetalinkProcessor.h: New class.
 
- 	* src/Xml2MetalinkProcessor.h: New class.
 
- 	* src/Xml2MetalinkProcessor.cc: New class.
 
- 	* src/MetalinkEntry.h: New class.
 
- 	* src/MetalinkEntry.cc: New class.
 
- 	* src/MetalinkResource.h: New class.
 
- 	* src/MetalinkResource.cc: New class.
 
- 	
 
- 	To add md5 message digest checking:
 
- 	* src/messageDigest.h: Rewritten.
 
- 	* src/MultiDiskWriter.cc: Updated according to the changes in
 
- 	messageDigest.h.
 
- 	* src/ShaVisitor.cc: Updated according to the changes in
 
- 	messageDigest.h.
 
- 	* src/Util.cc: Updated according to the changes in messageDigest.h.
 
- 	* src/AbstractDiskWriter.cc: Updated according to the changes in
 
- 	messageDigest.h.
 
- 	
 
- 	To fix a bug that causes segfault when the payload length in peer
 
- 	message is less than 0:
 
- 	* src/PeerConnection.cc:
 
- 	(receiveMessage): Fixed the bug.
 
- 	* src/PeerMessageUtil.cc
 
- 	(checkLength): Throw an exception if length is less than or equals to
 
- 	0.
 
- 	
 
- 	To add new interfaces to Base64 encoding/decoding:
 
- 	* src/Base64.h
 
- 	(part_encode): Changed the method signature.
 
- 	(encode): New function(overload).
 
- 	(decode): New function(overload).
 
- 	* src/Base64.cc
 
- 	(part_encode): Rewritten.
 
- 	(encode): Rewritten.
 
- 	(encode): New function(overload).
 
- 	To prevent a peer to download same piece if there is an error in
 
- 	checksum:
 
- 	* src/PieceMessage.cc
 
- 	(receivedAction): Call peerInteraction->abortPiece().
 
- 	
 
- 2006-06-25  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
-         To fix the bug that causes same have message is sent many times to
 
- 	a single peer.
 
- 	* src/Time.cc
 
- 	(isNewer): Use Util::difftv().
 
- 	* src/Util.cc
 
- 	(difftv): Added a cast to (long long int).
 
- 	* src/TorrentMan.cc
 
- 	(advertisePiece): Use push_front.
 
- 	(getAdvertisedPieceIndexes): A performance improvement was made.
 
- 	
 
- 	To fix the bug that sends tracker requests without a sleep interval
 
- 	when the number of connections is less than 15.
 
- 	* src/TrackerWatcherCommand.cc
 
- 	(execute): Now the number of connections is not a factor to decide
 
- 	whether or not a tracker request should be sent or not.
 
- 	* src/Time.h
 
- 	(setTimeInSec): New function.
 
- 	* src/Time.cc
 
- 	(setTimeInSec): New function.
 
- 	etc.
 
- 	
 
- 	* src/ChokeMessage.cc
 
- 	(receivedAction): Removed peer->snubbing = false
 
- 	* src/PeerConnection.h
 
- 	(receiveHandshake): Updated doc.
 
- 	* src/TorrentMan.h
 
- 	(getAdvertisedPieceIndexes): Updated the method signature.
 
- 	* src/TorrentMan.cc
 
- 	(getAdvertisedPieceIndexes): Updated the method signature.
 
- 	* src/Time.h
 
- 	(getTimeInMicros): Added a cast to (long long int).
 
- 	(getTimeInMillis): Added a cast to (long long int).
 
- 	
 
- 	* Release 0.5.2
 
- 	
 
- 2006-06-22  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To make a listening socket non-block:
 
- 	
 
- 	* src/SocketCore.h
 
- 	(setNonBlockingMode): New function.
 
- 	* src/SocketCore.cc
 
- 	(setNonBlockingMode): New function.
 
- 	(beginListen): Added a call to setNonBlockingMode().
 
- 	(acceptConnection): Call setNonBlockingMode().
 
- 	(setBlockingMode): Updated.
 
- 	To handle tracker's NAT-checking:
 
- 	
 
- 	* src/PeerConnection.cc
 
- 	(receiveHandshake): 'msg' param is filled with received data and
 
- 	its length is assigned to 'length' param, even if all handshake
 
- 	message is not yet received.
 
- 	* src/PeerInteractionCommand.cc
 
- 	(executeInternal): Use peerInteraction->receiveHandshake(true) when
 
- 	a new peer connects to localhost.
 
- 	A call to peerInteraction->sendHandshake() was removed because 
 
- 	it is called from peerInteraction->receiveHandshake(true).
 
- 	* src/PeerInteraction.h
 
- 	(quickReplied): New variable.
 
- 	(receiveHandshake): Added an argument.
 
- 	* src/PeerInteraction.cc
 
- 	(PeerInteraction): Added the initialization of quickReplied.
 
- 	(receiveHandshake): Send handshake message as soon as the info hash
 
- 	in a handshake message from a peer is correct.
 
- 	
 
- 	To change the random part of peer id and key parameter:
 
- 	* src/TorrentMan.h
 
- 	(key): New variable.
 
- 	* src/TorrentMan.cc
 
- 	(setupInternal1): Use Util::randomAlpha() to generate random part
 
- 	of peer id, which is now "-aria2-"+13 alphabet characters([A-Za-z]).
 
- 	key is also generated by Util::randomAlpha() and it is now 8 character
 
- 	long.
 
- 	* src/Util.h
 
- 	(randomAlpha): New function.
 
- 	* src/Util.cc
 
- 	(randomAlpha): New function.
 
- 	* src/TrackerWatcherCommand.cc
 
- 	(execute): In a tracker request: Use torrentMan->key as key parameter.
 
- 	Added no_peer_id=1.
 
- 	
 
- 	Set snubbing flag to false when a choke message is received from a
 
- 	snubbed peer.
 
- 	* src/ChokeMessage.cc
 
- 	(receivedAction): Set snubbing flag to false.
 
- 	
 
- 2006-06-18  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/TorrentMan.cc (setupInternal1): Fixed peerId generation bug.
 
- 	* src/SimpleLogger.h (writeHeader): New function.
 
- 	* src/SimpleLogger.cc (writeHeader): New function.
 
- 	(writeLog): Fixed the bug that causes segfaults if exception message
 
- 	contains an unescaped "%" character.
 
- 	* src/TrackerWatcherCommand.cc (execute): Added a short sleep
 
- 	when a tracker request fails.
 
- 	* src/Request.cc (parseUrl): Query string is now handled properly.
 
- 	* Release 0.5.1
 
- 	
 
- 2006-06-12  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	
 
- 	To add Time class which represents a specific instant in time and
 
- 	its precision is microseconds. Time checking procedures were rewritten
 
- 	using this object.
 
- 	* src/Time.h: New class.
 
- 	* src/Time.cc: New class.
 
- 	* src/AbstractCommand.h
 
- 	(updateCheckPoint): Removed.
 
- 	(isTimeoutDetected): Removed.
 
- 	(checkPoint): Changed the type to Time.
 
- 	(timeout): New variable.
 
- 	(setTimeout): New function.
 
- 	* src/AbstractCommand.cc
 
- 	(AbstractCommand): Removed the initialization of checkPoint.
 
- 	Added the initialization of timeout.
 
- 	(updateCheckPoint): Removed.
 
- 	(isTimeoutDetected): Removed.
 
- 	(execute): Use checkPoint.reset() and checkPoint.elapsed().
 
- 	* src/PeerChokeCommand.h
 
- 	(checkPoint): Changed the type to Time.
 
- 	* src/PeerChokeCommand.cc
 
- 	(PeerChokeCommand): Removed the initialization of checkPoint.
 
- 	(execute): Rewritten using Time object.
 
- 	* src/TrackerWatcherCommand.h
 
- 	(checkPoint): Changed the type to Time.
 
- 	* src/TrackerWatcherCommand.cc
 
- 	(TrackerWatcherCommand): Removed the initialization of checkPoint.
 
- 	(execute): Rewritten.
 
- 	* src/ConsoleDownloadEngine.h
 
- 	(cp): Changed the type to Time.
 
- 	(startup): Changed the type to Time.
 
- 	* src/ConsoleDownloadEngine.cc
 
- 	(initStatistics): Use cp.reset(), startup.reset().
 
- 	(calculateStatistics): Rewritten using Time object.
 
- 	* src/PeerAbstractCommand.h
 
- 	(updateCheckPoint): Removed.
 
- 	(isTimeoutDetected): Removed.
 
- 	(checkPoint): Changed the type to Time.
 
- 	* src/PeerAbstractCommand.cc
 
- 	(PeerAbstractCommand): Removed the initialization of checkPoint.
 
- 	(updateCheckPoint): Removed.
 
- 	(isTimeoutDetected): Removed.
 
- 	(execute): Use checkPoint.reset() and checkPoint.elapsed().
 
- 	* src/PeerInteractionCommand.cc
 
- 	(PeerInteractionCommand): Removed the initializations of struct
 
- 	timeval variables.
 
- 	* src/PeerInteractionCommand.h
 
- 	(keepAliveCheckPoint): Changed the type to Time.
 
- 	(chokeCheckPoint): Changed the type to Time.
 
- 	(freqCheckPoint): Changed the type to Time.
 
- 	(haveCheckTime): Changed the type to Time.
 
- 	* src/PeerInteractionCommand.cc
 
- 	(executeInternal): Rewritten using Time object.
 
- 	(detectMessageFlooding): Rewritten using Time object.
 
- 	(checkLongTimePeerChoking): Rewritten using Time object.
 
- 	(sendKeepAlive): Rewritten using Time object.
 
- 	(checkHave): Rewritten using Time object.
 
- 	* src/SleepCommand.h
 
- 	(checkPoint): Changed the type to Time.
 
- 	* src/SleepCommand.cc
 
- 	(SleepCommand): Removed the initialization of checkPoint.
 
- 	(execute): Rewritten using Time object.
 
- 	* src/TorrentAutoSaveCommand.h
 
- 	(checkPoint): Changed the type to Time.
 
- 	* src/TorrentAutoSaveCommand.cc
 
- 	(TorrentAutoSaveCommand): Removed the initialization of checkPoint.
 
- 	(execute): Rewritten.
 
- 	* src/DownloadCommand.h
 
- 	(sw): Changed the type to Time.
 
- 	* src/DownloadCommand.cc
 
- 	(DownloadCommand): Removed the initialization of sw.
 
- 	(executeInternal): Rewritten.
 
- 	* src/RequestSlot.h
 
- 	(dispatchedTime): Changed the type to Time.
 
- 	* src/RequestSlot.cc
 
- 	(RequestSlot): Removed the call to setDispatchedTime().
 
- 	(setDispatchedTime): Rewirtten.
 
- 	(isTimeout): Rewritten.
 
- 	(getLatencyInMillis): Rewritten.
 
- 	* src/TorrentDownloadEngine.h
 
- 	(cp): Changed the type to Time[2].
 
- 	(startup): Changed the type to Time.
 
- 	* src/TorrentDownloadEngine.cc
 
- 	(initStatistics): Rewritten.
 
- 	(calculateStatistics): Rewritten.
 
- 	* src/DownloadEngine.cc
 
- 	(run): Rewritten.
 
- 	
 
- 	To detect all attempts to connect to the tracker are failed:
 
- 	* src/AbstractCommand.cc
 
- 	(execute): Increment e->segmentMan->errors if a command aborted.
 
- 	* src/SegmentMan.h
 
- 	(errors): New variable.
 
- 	* src/SegmentMan.cc
 
- 	(SegmentMan): Added the initialization of errors.
 
- 	(init): Added the initialization of errors.
 
- 	* src/TrackerWatcherCommand.cc
 
- 	(execute): If e->segmentMan->errors > 0 then assume that the tracker
 
- 	request was failed.
 
- 	
 
- 	To handle snubbed peers:
 
- 	
 
- 	* src/PeerChokeCommand.cc
 
- 	(optUnchokingPeer): Snubbed peers don't get unchoked.
 
- 	(execute): Snubbed peers don't get unchoked.
 
- 	* src/PeerInteraction.h
 
- 	(REQUEST_TIME_OUT): Changed the value from 120 to 60.
 
- 	* src/PeerInteraction.cc
 
- 	(checkRequestSlot): A peer get marked as "snubbed" if it doesn't send
 
- 	back the requested 16k block in 60 seconds.
 
- 	* src/PieceMessage.cc
 
- 	(receivedAction): A peer's snubbed state is cleard if it sends
 
- 	the requested 16k block in 60 seconds.
 
- 	* src/Peer.h
 
- 	(snubbing): New variable.
 
- 	* src/Peer.cc
 
- 	(resetStatus): Added snubbed = false.
 
- 	
 
- 	To fix the bug that causes have message is not sent:
 
- 	* src/PeerInteractionCommand.cc
 
- 	(~PeerInteractionCommand): Removed e->torrentMan->unadvertisePiece().
 
- 	(FLOODING_CHECK_INTERVAL): New definition(temporal).
 
- 	(detectMessageFlooding): Use FLOODING_CHECK_INTERVAL.
 
- 	* src/TorrentMan.h
 
- 	(HaveEntry): New class.
 
- 	(advertisePiece): Rewritten.
 
- 	(getAdvertisedPieceIndexes): Rewritten.
 
- 	(Haves): Changed the type.
 
- 	(getAdvertisedPieceIndexes): Added an argument.
 
- 	
 
- 	Others:
 
- 	
 
- 	* src/TorrentMan.h
 
- 	(DEFAULT_ANNOUNCE_INTERVAL): Changed the value to 1800.
 
- 	(DEFAULT_ANNOUNCE_MIN_INTERVAL): Changed the value to 1800.
 
- 	* src/TorrentMan.cc
 
- 	(getPeer): Don't check the number of connections here.
 
- 	(setupInternal1): Changed peerId.
 
- 	* src/PeerInteractionCommand.h
 
- 	(KEEP_ALIVE_INTERVAL): New definition.
 
- 	(sendKeepAlive): Use KEEP_ALIVE_INTERVAL.
 
- 	* src/main.cc
 
- 	(main): SA_ONESHOT was replaced with SA_RESETHAND.
 
- 	* src/DownloadEngine.h: Removed unnecessary header includes.
 
- 	
 
- 2006-05-29  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To fix the bug that causes segfaults if a tracker returns a zero-length
 
- 	list as "peers":
 
- 	
 
- 	* src/TrackerUpdateCommand.cc
 
- 	(execute): Added a check to see wether the type of peers is Data*.
 
- 2006-05-27  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* Release 0.5.0
 
- 	To fix compile issue with gcc3:
 
- 	* src/CancelMessage.h
 
- 	(ID): Renamed as ID_t
 
- 	(ID_t): New enum.
 
- 	* src/RejectMessage.h
 
- 	(ID): Renamed as ID_t
 
- 	(ID_t): New enum.
 
- 	* src/SuggestPieceMessage.h
 
- 	(ID): Renamed as ID_t
 
- 	(ID_t): New enum.
 
- 	* src/AllowedFastMessage.h
 
- 	(ID): Renamed as ID_t
 
- 	(ID_t): New enum.
 
- 	* src/PortMessage.h
 
- 	(ID): Renamed as ID_t
 
- 	(ID_t): New enum.
 
- 	* src/HaveNoneMessage.h
 
- 	(ID): Renamed as ID_t
 
- 	(ID_t): New enum.
 
- 	* src/KeepAliveMessage.h
 
- 	(ID): Renamed as ID_t
 
- 	(ID_t): New enum.
 
- 	* src/HaveAllMessage.h
 
- 	(ID): Renamed as ID_t
 
- 	(ID_t): New enum.
 
- 	* src/UnchokeMessage.h
 
- 	(ID): Renamed as ID_t
 
- 	(ID_t): New enum.
 
- 	* src/BitfieldMessage.h
 
- 	(ID): Renamed as ID_t
 
- 	(ID_t): New enum.
 
- 	* src/PieceMessage.h
 
- 	(ID): Renamed as ID_t
 
- 	(ID_t): New enum.
 
- 	* src/RequestMessage.h
 
- 	(ID): Renamed as ID_t
 
- 	(ID_t): New enum.
 
- 	* src/NotInterestedMessage.h
 
- 	(ID): Renamed as ID_t
 
- 	(ID_t): New enum.
 
- 	* src/ChokeMessage.h
 
- 	(ID): Renamed as ID_t
 
- 	(ID_t): New enum.
 
- 	* src/InterestedMessage.h
 
- 	(ID): Renamed as ID_t
 
- 	(ID_t): New enum.
 
- 	* src/HaveMessage.h
 
- 	(ID): Renamed as ID_t
 
- 	(ID_t): New enum.
 
- 	
 
- 2006-05-26  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/PeerAbstractCommand.h
 
- 	(beforeSocketCheck): Removed.
 
- 	* src/PeerAbstractCommand.cc
 
- 	Modified in order to call executeInternal() even if socket check
 
- 	and upload limit check fail.
 
- 	* src/PeerInteractionCommand.h
 
- 	(keepAlive): Removed.
 
- 	(sendKeepAlive): New function.
 
- 	(checkHave): New function.
 
- 	(beforeSocketCheck): Removed.
 
- 	* src/PeerInteractionCommand.cc
 
- 	(executeInternal): Use peerInteraction->checkRequestSlot(). Added
 
- 	calls to checkHave() and sendKeepAlive().
 
- 	(keepAlive): Renamed to sendKeepAlive().
 
- 	(sendKeepAlive): New function.
 
- 	(beforeSocketCheck): Removed.
 
- 	(checkHave): New function.
 
- 	* src/BitfieldMan.cc
 
- 	(getMissingIndex): Don't call getMissingIndexRandomly() if max is 0.
 
- 	(getMissingUnusedIndex): Don't call getMissingIndexRandomly() if max is
 
- 	0.
 
- 	(getMissingIndex): Dont't call getMissingIndexRandomly() if max is 0.
 
- 	* src/TorrentMan.h
 
- 	(UsedPieces): Removed.
 
- 	(Pieces): New type definition.
 
- 	* src/Piece.h: Updated doc.
 
- 	* src/Peer.h
 
- 	(totalLength): Removed.
 
- 	* src/Peer.cc
 
- 	(updateLatency): Fixed the latency calculation.
 
- 	* src/TorrentMan.cc
 
- 	(addPeer): Call deleteOldErrorPeers() only if peers.size() is higher
 
- 	than or equal to MAX_PEER_LIST_SIZE.
 
- 	If duplicate is false and peer.size() >= MAX_PEER_LIST_SIZE,
 
- 	then return false.
 
- 	(deleteOldErrorPeers): Rewritten.
 
- 	(deleteUsedPiece): Fixed the miss use of STL remove.
 
- 	* src/PeerInteraction.h
 
- 	(Pieces): Removed.
 
- 	(deleteTimeoutRequestSlot): Removed.
 
- 	(deleteCompletedRequestSlot): Removed.
 
- 	(checkRequestSlot): New function.
 
- 	* src/PeerInteraction.cc
 
- 	(deleteTimeoutRequestSlot): Merged to checkRequestSlot().
 
- 	(deleteCompletedRequestSlot): Merged to checkRequestSlot().
 
- 	(checkRequestSlot): New function.
 
- 	* src/DownloadEngine.cc
 
- 	(run): Clear activeSockets before calling waitData().
 
- 	(waitData): Removed a call to activeSockets.clear().
 
- 	
 
- 2006-05-24  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To attempt to handle EINTR:
 
- 	
 
- 	* src/SocketCore.cc
 
- 	(isReadable): Added EINTR handling.
 
- 	(isWritable): Added EINTR handling.
 
- 	To improve the performance:
 
- 	
 
- 	* src/AbstractCommand.cc
 
- 	(isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
 
- 	* src/PeerInteractionCommand.h
 
- 	(receiveMessage): Renamed as receiveMessages().
 
- 	(receiveMessages): New function.
 
- 	* src/PeerInteractionCommand.cc
 
- 	(executeInternal): receiveMessage loop is moved to new receiveMessages
 
- 	() function. detectMessageFlooding() is moved here.
 
- 	(detectMessageFlooding): Use Util::difftvsec() instead of Util::difftv
 
- 	(). The flooding detection for have message is comment out.
 
- 	(checkLongTimePeerChoking): Use Util::difftvsec() instead of
 
- 	Util::difftv().
 
- 	(receiveMessage): Renamed as receiveMessages().
 
- 	(receiveMessages): New function.
 
- 	(keepAlive): Use Util::difftvsec() instead of Util::difftv().
 
- 	(beforeSocketCheck): Commented out checkLongTimePeerChoking().
 
- 	* src/SleepCommand.cc
 
- 	(execute): Use Util::difftvsec() instead of Util::difftv().
 
- 	* src/BitfieldMan.h
 
- 	(getNthBitIndex): New function.
 
- 	(hasMissingPiece): New function.
 
- 	(getAllMissingIndexes): New function.
 
- 	* src/BitfieldMan.cc
 
- 	(countSetBit): Rewritten.
 
- 	(getNthBitIndex): New function.
 
- 	(getMissingIndexRandomly): Rewritten.
 
- 	(hasMissingPiece): New function.
 
- 	(getAllMissingIndexes): New function.
 
- 	* src/TorrentMan.cc
 
- 	(hasMissingPiece): New function.
 
- 	(deleteUsedPiece): Rewritten using STL.
 
- 	* src/PeerInteraction.cc
 
- 	(getNewPieceAndSendInterest): Use TorrentMan::hasMissingPiece(), which
 
- 	is a little bit faster then TorrentMan::getMissingPieceIndex().
 
- 	(addRequests): Updated the number of pending requests.
 
- 	* src/PeerAbstractCommand.cc
 
- 	(isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
 
- 	(execute): Returns true if TorrentMan::isHalt() is true.
 
- 	Corrected the condition of upload limit checking.
 
- 	* src/Util.h
 
- 	(countBit): New function.
 
- 	* src/Util.cc
 
- 	(nbits): New variable.
 
- 	(countBit): New function.
 
- 	* src/DownloadEngine.h
 
- 	(SockCmdMap): New type definition.
 
- 	(waitData): Added an argument.
 
- 	(addSocket): Added an argument.
 
- 	(addSocketForReadCheck): Added an argument.
 
- 	(addSocketForWriteCheck): Added an argument.
 
- 	* src/DownloadEngine.cc
 
- 	(run): Executes only commands whose sockets are ready to read or write.
 
- 	All commands are executed in every 1 second.
 
- 	(waitData): Calls select() again if it returned
 
- 	EINTR.
 
- 	(addSocket): Saves socket and command object pair to the map.
 
- 	(deleteSocket): Deletes socket and command object pair from the map.
 
- 	(addSocketForReadCheck): Added an argument.
 
- 	(addSocketForWriteCheck): Added an argument.
 
- 	* src/DownloadCommand.cc
 
- 	(executeInternal): Use Util::difftvsec() instead of Util::difftv().
 
- 	
 
- 	To send "event=stopped" to the tracker when the application finishes:
 
- 	
 
- 	* src/PeerChokeCommand.h
 
- 	(checkPoint): New variable.
 
- 	* src/PeerChokeCommand.cc
 
- 	(PeerChokeCommand): Added the initialization of checkPoint.
 
- 	(execute): The interval check is now done by checkPoint, not
 
- 	SleepCommand. Return true if TorrentMan::isHalt() is true.
 
- 	* src/TorrentMan.h
 
- 	(halt): New function.
 
- 	(hasMissingPiece): New function.
 
- 	(isHalt): New function.
 
- 	(setHalt): New function.
 
- 	* src/TorrentMan.cc
 
- 	(TorrentMan): Added the initialization of halt.
 
- 	* src/TorrentAutoSaveCommand.h
 
- 	(checkPoint): New variable.
 
- 	* src/PeerListenCommand.cc
 
- 	(execute): Returns true if TorrentMan::isHalt() is true.
 
- 	* src/main.cc
 
- 	(setSignalHander): Added flags argument.
 
- 	(torrentHandler): Just calls TorrentMan::setHalt(true) and returns.
 
- 	(main): Set SA_ONESHOT flag of the signal hander of SIGINT and SIGTERM.
 
- 	Removed printDownloadAbortMessage() after torrent downloading loop.
 
- 	* src/TorrentAutoSaveCommand.cc
 
- 	(TorrentAutoSaveCommand): Added the initialization of checkPoint.
 
- 	(execute): Returns true if TorrentMan::isHalt() is true.
 
- 	The interval check is now done by checkPoint, not SleepCommand.
 
- 	* src/TrackerWatcherCommand.cc
 
- 	(execute): If TorrentMan::isHalt(), then create a tracker request with
 
- 	event=stopped.
 
- 	* src/TrackerUpdateCommand.cc
 
- 	(prepareForRetry): Do not use SleepCommand here.
 
- 	(execute): Returns true if TorrentMan::isHalt() is true.
 
- 	
 
- 	Others:
 
- 	
 
- 	* src/TorrentMan.cc
 
- 	(getMissingPieceIndex): Updated log message.
 
- 	* src/PeerInteraction.cc
 
- 	(createPeerMessag): Updated log message.
 
- 	
 
- 2006-05-20  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add the ability to download several pieces in mix in a command and
 
- 	increase the number of request slots according to request-cancel
 
- 	latency:
 
- 	
 
- 	* src/PeerInteractionCommand.cc
 
- 	(executeInternal): The number of messages to be received at a time
 
- 	is increased from 10 to 50.
 
- 	* src/LogFactory
 
- 	(getInstance): Added NullLogger.
 
- 	* src/NullLogger.h: New class.
 
- 	* src/BitfieldMan.h
 
- 	(getMissingIndex): New function.
 
- 	* src/BitfieldMan.cc
 
- 	(getMissingIndex): New function.
 
- 	* src/TorrentMan.h
 
- 	(checkOutPiece): New function.
 
- 	(getMissingPieceIndex): New function.
 
- 	(getMissingFastPieceIndex): New function.
 
- 	(getMissingFastPiece): New function.
 
- 	* src/TorrentMan.cc
 
- 	(updatePiece): Rewritten using STL.
 
- 	(syncPiece): Rewritten using STL.
 
- 	(getMissingPiece): Rewritten using getMissingPieceIndex() and
 
- 	checkOutPiece().
 
- 	(getMissingPieceIndex): New function.
 
- 	(getMissingFastPieceIndex): New function.
 
- 	(getMissingFastPiece): New function.
 
- 	(checkOutPiece): New function.
 
- 	* src/PeerInteraction.h
 
- 	(Pieces): New type definition.
 
- 	(piece): Removed.
 
- 	(pieces): New variable.
 
- 	(getNewPieceAndSendInterest): Added the "piece" argument.
 
- 	(abortPiece): Added the "piece" argument.
 
- 	(abortAllPieces): New function.
 
- 	(isInRequestSlot): New function.
 
- 	(hasDownloadPiece): Added the "index" argument.
 
- 	(setDownloadPiece): Removed.
 
- 	(getDownloadPiece): Added the "index" argument.
 
- 	(updatePiece): New function.
 
- 	(createRequestMessage): Added the "index" argument.
 
- 	* src/PeerInteraction.cc
 
- 	(onChoked): Rewritten.
 
- 	(abortPiece): Rewirtten.
 
- 	(abortAllPieces): New function.
 
- 	(deleteTimeoutRequestSlot): Rewritten.
 
- 	Clarified code a little bit.
 
- 	(deleteCompletedRequestSlot): Rewritten.
 
- 	(isInRequestSlot): New function.
 
- 	(syncPiece): Rewritten.
 
- 	(updatePiece): New function.
 
- 	(getNewPieceAndSendInterest): Rewritten.
 
- 	(addRequests):  Rewritten.
 
- 	(getDownloadPiece): Rewritten.
 
- 	(hasDownloadPiece): Rewritten.
 
- 	(createRequestMessage): Added the "index" argument.
 
- 	* src/common.h
 
- 	(BITFIELD_LEN_FROM_PIECES): Enclosed the variable in parentheses.
 
- 	(DIV_FLOOR): New definition.
 
- 	* src/PieceMessage.cc
 
- 	(receivedAction): Update request-piece latency here.
 
- 	* src/RequestSlot.h
 
- 	(getLatencyInMillis): New function.
 
- 	* src/RequestSlot.cc
 
- 	(isTimeout): Rewritten using getLatencyInMillis.
 
- 	(getLatencyInMillis): New function.
 
- 	* src/Piece.h
 
- 	(operator==): New function.
 
- 	(getMissingBlockIndex): New function.
 
- 	* src/Piece.cc
 
- 	(operator==): New function.
 
- 	(getMissingBlockIndex): New function.
 
- 	* src/Peer.h
 
- 	(DEFAULT_LATENCY): New definition.
 
- 	(latency): New variable.
 
- 	(updateLatency): New function.
 
- 	(getLatency): New function.
 
- 	* src/Peer.cc
 
- 	(resetStatus): Reset latecy.
 
- 	(updateLatency): New function.
 
- 	
 
- 2006-05-20  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/SocketCore.cc
 
- 	(isReadable): Added secure to the condition.
 
- 	* src/HttpConnection.cc
 
- 	(receiveResponse): Fixed a bug that causes no response header
 
- 	exception.
 
- 	* src/Peer.h
 
- 	(getFastSet): Fixed the return value type.
 
- 	
 
- 2006-05-18  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To remove a wait from download loop:
 
- 	* src/DownloadEngine.cc
 
- 	(run): Comment out shortSleep.
 
- 	
 
-         To rewrite the message handling:
 
- 	* src/SimplePeerMessage.h: New class.
 
- 	* src/SimplePeerMessage.cc: New class.
 
- 	* src/CancelMessage.h: Derived from SimplePeerMessage.
 
- 	(msg): New variable.
 
- 	(create): New function.
 
- 	(send): Removed.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	* src/CancelMessage.cc
 
- 	(create): New function.
 
- 	(receivedAction): Replaced deleteRequestMessageInQueue with
 
- 	rejectPieceMessageInQueue.
 
- 	(send): Removed.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	* src/BitfieldMessage.h: Derived from SimplePeerMessage.
 
- 	(msg): New variable.
 
- 	(msgLength): New variable.
 
- 	(~BitfieldMessage): Deleted msg.
 
- 	(send): Removed.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	* src/BitfieldMessage.cc
 
- 	(create): New function.
 
- 	(send): Removed.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	* src/ChokeMessage.h: Derived from SimplePeerMessage.
 
- 	(msg): New variable.
 
- 	(sendPredicate): New function.
 
- 	(onSendComplete): New function.
 
- 	(send): Removed.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	(create): New function.
 
- 	* src/ChokeMessage.cc
 
- 	(create): New function.
 
- 	(send): Removed.
 
- 	(sendPredicate): New function.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	(onSendComplete): New function.
 
- 	* src/KeepAliveMessage.h: Derived from SimplePeerMessage.
 
- 	(msg): New variable.
 
- 	(send): Removed.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.	
 
- 	* src/KeepAliveMessage.cc
 
- 	(send): Removed.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	* src/PortMessage.h
 
- 	(create): New function.
 
- 	(receivedAction): Updated log message.
 
- 	* src/PortMessage.cc: New file.
 
- 	* src/UnchokeMessage.h: Derived from SimplePeerMessage.
 
- 	(msg): New variable.
 
- 	(sendPredicate): New function.
 
- 	(onSendComplete): New function.
 
- 	(create): New function.
 
- 	(send): Removed.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	* src/UnchokeMessage.cc
 
- 	(create): New function.
 
- 	(send): Removed.
 
- 	(sendPredicate): New function.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	(onSendComplete): New function.
 
- 	* src/PieceMessage.h
 
- 	(leftPieceDataLength): Removed.
 
- 	(leftDataLength): New variable.
 
- 	(headerSend): New variable.
 
- 	(pendingCount): New variable.
 
- 	(msgHeader): New variable.
 
- 	(sendPieceData): New function.
 
- 	(incrementPendingCount): New function.
 
- 	(isPendingCountMax): New function.
 
- 	(create): New function.
 
- 	(getMessageHeader): New function.
 
- 	(getMessageHeaderLength): New function.
 
- 	* src/PieceMessage.cc
 
- 	(create): New function.
 
- 	(getMessageHeader): New function.
 
- 	(getMessageHeaderLength): New function.
 
- 	(send): Rewritten.
 
- 	(sendPieceData): New function.
 
- 	* src/HaveMessage.h: Derived from SimplePeerMessage.
 
- 	(msg): New variable.
 
- 	(create): New function.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	* src/HaveMessage.cc
 
- 	(create): New function.
 
- 	(send): Removed.
 
- 	(sendPieceData): New function.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	* src/RequestMessage.h: Derived from SimplePeerMessage.
 
- 	(msg): New variable.
 
- 	(create): New function.
 
- 	(send): Removed.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	* src/RequestMessage.cc
 
- 	(create): New function.
 
- 	(receivedAction): Added the handling of fast extension.
 
- 	Deleted torrentMan->addUploadLength, torrentMan->addDeltaUploadLength.
 
- 	(send): Removed.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	* src/InterestedMessage.h: Derived from SimplePeerMessage.
 
- 	(msg): New variable.
 
- 	(sendPredicate): New function.
 
- 	(onSendComplete): New function.
 
- 	(create): New function.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	* src/InterestedMessage.cc
 
- 	(create): New function.
 
- 	(send): Removed.
 
- 	(sendPieceData): New function.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	(onSendComplete): New function.
 
- 	* src/NotInterestedMessage.h: Derived from SimplePeerMessage.
 
- 	(msg): New variable.
 
- 	(sendPieceData): New function.
 
- 	(onSendComplete): New function.
 
- 	(create): New function.
 
- 	(send): Removed.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	* src/NotInterestedMessage.cc
 
- 	(create): New function.
 
- 	(send): Removed.
 
- 	(sendPredicate): New function.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	(onSendComplete): New function.
 
- 	* src/AllowedFastMessage.h: New class.
 
- 	* src/AllowedFastMessage.cc: New class.
 
- 	* src/RejectMessage.h: New class.
 
- 	* src/RejectMessage.cc: New class.
 
- 	* src/SuggestPieceMessage.h: New class.
 
- 	* src/SuggestPieceMessage.cc: New class.
 
- 	* src/HaveAllMessage.h: New class.
 
- 	* src/HaveAllMessage.cc: New class.
 
- 	* src/HaveNoneMessage.h: New class.
 
- 	* src/HaveNoneMessage.cc: New class.
 
- 	* src/HandshakeMessage.h: Derived from SimplePeerMessage.
 
- 	(msg): New variable.
 
- 	(reserved): New variable.
 
- 	(create): New function.
 
- 	(getId): New function.
 
- 	(receivedAction): New function.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	(isFastExtensionSupported): New function.
 
- 	* src/HandshakeMessage.cc
 
- 	(HandshakeMessage): Moved here from HandshakeMessage.h.
 
- 	(create): New function.
 
- 	(getMessage): New function.
 
- 	(getMessageLength): New function.
 
- 	(toString): Added the output of reserved field.
 
- 	(check): Added const qualifier.
 
- 	(isFastExtensionSupported): New function.
 
- 	* src/PeerMessageUtil.h
 
- 	(createChokeMessage): Removed.
 
- 	(createUnchokeMessage): Removed.
 
- 	(createInterestedMessage): Removed.
 
- 	(createNotInterestedMessage): Removed.
 
- 	(createHaveMessage): Removed.
 
- 	(createBitfieldMessage): Removed.
 
- 	(createRequestMessage): Removed.
 
- 	(createCancelMessage): Removed.
 
- 	(createPieceMessage): Removed.
 
- 	(createPortMessage): Removed.
 
- 	(createChokeMessage): Removed.
 
- 	(createUnchokeMessage): Removed.
 
- 	(createInterestedMessage): Removed.
 
- 	(createNotInterestedMessage): Removed.
 
- 	(createHaveMessage): Removed.
 
- 	(createBitfieldMessage): Removed.
 
- 	(createRequestMessage): Removed.
 
- 	(createCancelMessage): Removed.
 
- 	(createPieceMessage): Removed.
 
- 	(createKeepAliveMessage): Removed.
 
- 	(createHandshakeMessage): Removed.
 
- 	(setIntParam): New function.
 
- 	(createPeerMessageString): New function.
 
- 	* src/PeerMessageUtil.cc
 
- 	(createChokeMessage): Removed.
 
- 	(createUnchokeMessage): Removed.
 
- 	(createInterestedMessage): Removed.
 
- 	(createNotInterestedMessage): Removed.
 
- 	(createHaveMessage): Removed.
 
- 	(createBitfieldMessage): Removed.
 
- 	(createRequestMessage): Removed.
 
- 	(createCancelMessage): Removed.
 
- 	(createPieceMessage): Removed.
 
- 	(createPortMessage): Removed.
 
- 	(createRequestMessage): Removed.
 
- 	(createCancelMessage): Removed.
 
- 	(createPieceMessage): Removed.
 
- 	(createHaveMessage): Removed.
 
- 	(createChokeMessage): Removed.
 
- 	(createUnchokeMessage): Removed.
 
- 	(createInterestedMessage): Removed.
 
- 	(createNotInterestedMessage): Removed.
 
- 	(createBitfieldMessage): Removed.
 
- 	(createKeepAliveMessage): Removed.
 
- 	(createHandshakeMessage): Removed.
 
- 	(setIntParam): New function.
 
- 	(createPeerMessageString): New function.
 
- 	* src/PeerConnection.h
 
- 	(peer): Removed.
 
- 	(torrentMan): Removed.
 
- 	(createNLengthMessage): Removed.
 
- 	(setIntParam): Removed.
 
- 	(writeOutgoingMessageLog): Removed all overloaded functions.
 
- 	(PeerConnection): Deleted peer and torrentMan from its arguments.
 
- 	(sendMessage): New function.
 
- 	(sendHandshake): Removed.
 
- 	(sendKeepAlive): Removed.
 
- 	(sendChoke): Removed.
 
- 	(sendUnchoke): Removed.
 
- 	(sendInterested): Removed.
 
- 	(sendNotInterested): Removed.
 
- 	(sendHave): Removed.
 
- 	(sendBitfield): Removed.
 
- 	(sendRequest): Removed.
 
- 	(sendPiece): Removed.
 
- 	(sendPieceHeader): Removed.
 
- 	(sendPieceData): Removed.
 
- 	(sendCancel): Removed.
 
- 	(getPeer): Removed.
 
- 	* src/PeerConnection.cc
 
- 	(PeerConnection): Deleted peer and torrentMan from its arguments.
 
- 	(sendHandshake): Removed.
 
- 	(sendKeepAlive): Removed.
 
- 	(createNLengthMessage): Removed.
 
- 	(setIntParam): Removed.
 
- 	(writeOutgoingMessageLog): Removed all overloaded functions.
 
- 	(sendChoke): Removed.
 
- 	(sendUnchoke): Removed.
 
- 	(sendInterested): Removed.
 
- 	(sendNotInterested): Removed.
 
- 	(sendHave): Removed.
 
- 	(sendBitfield): Removed.
 
- 	(sendRequest): Removed.
 
- 	(sendPiece): Removed.
 
- 	(sendPieceHeader): Removed.
 
- 	(sendPieceData): Removed.
 
- 	(sendMessage): New function.
 
- 	(sendCancel): Removed.
 
- 	* src/PeerInteractionCommand.cc
 
- 	(PeerInteractionCommand): Call setUploadLimit.
 
- 	(executeInternal): Call setUploadLimit.
 
- 	Added the handling of "inProgress" state of handshake message.
 
- 	Call sendBitfield() or sendAllowdFast() instead of deprecated
 
- 	sendNow().
 
- 	(keepAlive): Call addMessage and sendMessage instead of deprecated
 
- 	sendNow().
 
- 	(beforeSocketCheck): Call addMessage instead of deprecated trySendNow()
 
- 	* src/TorrentMan.h
 
- 	(PEER_ID_LENGTH): New definition.
 
- 	(hasAllPieces): New function.
 
- 	* src/TorrentMan.cc
 
- 	(getMissingPiece): Added the handling of fast extension.
 
- 	(cancelPiece): Call updatePiece().
 
- 	(hasAllPieces): New function.
 
- 	* src/PeerInteraction.h
 
- 	(fastSet): New variable.
 
- 	(getNewPieceAndSendInterest): Changed the return type to void.
 
- 	(send): Renamed as sendMessages.
 
- 	(deleteAllRequestSlot): Removed.
 
- 	(deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
 
- 	(cancelAllRequest): Removed all overloaded functions.
 
- 	(deleteAllRequestSlot): Removed.
 
- 	(deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
 
- 	(rejectPieceMessageInQueue): New function.
 
- 	(rejectAllPieceMessageInQueue): New function.
 
- 	(onChoked): New function.
 
- 	(isSendingMessageInProgress): New function.
 
- 	(getCorrespondingRequestSlot): Changed its arguments.
 
- 	(isInFastSet): New function.
 
- 	(addFastSetIndex): New function.
 
- 	(addRequests): New function.
 
- 	(sendNow): Removed.
 
- 	(trySendNow): Removed.
 
- 	(sendBitfield): New function.
 
- 	(sendAllowdFast): New function.
 
- 	(createHaveAllMessage): New function.
 
- 	(createHaveNoneMessage): New function.
 
- 	(createRejectMessage): New function.
 
- 	(createAllowedFastMessage): New function.
 
- 	* src/PeerInteraction.cc
 
- 	(send): Renamed as sendMessages.
 
- 	(sendMessages): New function.
 
- 	(MsgPushBack): New class.
 
- 	(isSendingMessageInProgress): New function.
 
- 	(deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
 
- 	(rejectAllPieceMessageInQueue): New function.
 
- 	Added the handling of fast extension.
 
- 	(deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
 
- 	(rejectPieceMessageInQueue): New function.
 
- 	Added the handling of fast extension.
 
- 	(deleteRequestSlot): Replaced for loop with  std::find.
 
- 	(onChoked): New function.
 
- 	(deleteAllRequestSlot): Removed.
 
- 	(abortPiece): Rewirtten.
 
- 	(deleteTimeoutRequestSlot): Updated log messages.
 
- 	(getCorrespondingRequestSlot): Changed its arguments.
 
- 	(cancelAllRequest): Removed all overloaded functions.
 
- 	(receiveHandshake): Added the check to see whether an incoming peer
 
- 	supports fast extension.
 
- 	(createHandshakeMessage): Use HandshakeMessage::create instead of
 
- 	PeerMessageUtil.
 
- 	(createPeerMessage): Use create() of each message class instead of
 
- 	PeerMessageUtil.
 
- 	HaveAllMessage, HaveNoneMessage, RejectMessage, SuggestPieceMessage,
 
- 	AllowedFastMessage were added.
 
- 	(getNewPieceAndSendInterest): Changed its return value type to void.
 
- 	Added the handling of fast extension.
 
- 	(addRequests): New function.
 
- 	(sendNow): Removed.
 
- 	(sendHandshake): Rewritten.
 
- 	(trySendNow): Removed.
 
- 	(sendBitfield): New function.
 
- 	(sendAllowdFast): New function.
 
- 	(isInFastSet): New function.
 
- 	(addFastSetIndex): New function.
 
- 	(createRequestMessage): Use RequestMessage::create instead of
 
- 	PeerMessageUtil.
 
- 	(createCancelMessage): Use CancelMessage::create instead of
 
- 	PeerMessageUtil.
 
- 	(createPieceMessage): Use PieceMessage::create instead of
 
- 	PeerMessageUtil.
 
- 	(createHaveMessage): Use HaveMessage::create instead of
 
- 	PeerMessageUtil.
 
- 	(createChokeMessage): Use ChokeMessage::create instead of
 
- 	PeerMessageUtil.
 
- 	(createUnchokeMessage): Use UnchokeMessage::create instead of
 
- 	PeerMessageUtil.
 
- 	(createInterestedMessage): Use InterestedMessage::create instead of
 
- 	PeerMessageUtil.
 
- 	(createNotInterestedMessage): Use NotInterestedMessage::create instead
 
- 	of PeerMessageUtil.
 
- 	(createBitfieldMessage): Use BitfieldMessage::create instead of
 
- 	PeerMessageUtil.
 
- 	(createKeepAliveMessage): Use KeepAliveMessage::create instead of
 
- 	PeerMessageUtil.
 
- 	(createHaveAllMessage): New function.
 
- 	(createHaveNoneMessage): New function.
 
- 	(createRejectMessage): New function.
 
- 	(createAllowedFastMessage: New function.
 
- 	* src/Util.h
 
- 	(sha1Sum): New function.
 
- 	(computeFastSet): New function.
 
- 	* src/Util.cc
 
- 	(sha1Sum): New function.
 
- 	(computeFastSet): New function.
 
- 	* src/Peer.h
 
- 	(fastExtensionEnabled): New variable.
 
- 	(fastSet): New variable.
 
- 	(setAllBitfield): New function.
 
- 	(setFastExtensionEnabled): New function.
 
- 	(isFastExtensionEnabled): New function.
 
- 	(addFastSetIndex): New function.
 
- 	(getFastSet): New function.
 
- 	(isInFastSet): New function.
 
- 	(countFastSet): New function.
 
- 	* src/Peer.cc
 
- 	(isInFastSet): New function.
 
- 	(addFastSetIndex): New function.
 
- 	(setAllBitfield): New function.
 
- 	
 
- 	* src/AbstractCommand.cc (execute): Changed the procedure of checking
 
- 	sockets.
 
- 	* src/PeerAbstractCommand.cc
 
- 	(PeerAbstractCommand): Added the initialization for uploadLimitCheck
 
- 	and uploadLimit.
 
- 	(execute): Changed the procedure of checking sockets. The upload speed
 
- 	checking were added.
 
- 	(setUploadLimit): New function.
 
- 	(setUploadLimitCheck): New function.
 
- 	* src/PeerAbstractCommand.h
 
- 	(setUploadLimit): New function.
 
- 	(setUploadLimitCheck): New function.
 
- 	(uploadLimit): New variable.
 
- 	(uploadLimitCheck): New variable.
 
- 	To contact a tracker regularly:
 
- 	
 
- 	* src/TrackerWatcherCommand.h (interval): New variable.
 
- 	(checkPoint): New variable.
 
- 	(TrackerWatcherCommand): Added interval argument.
 
- 	* src/TrackerWatcherCommand.cc
 
- 	(TrackerWatcherCommand): Initialized checkPoint.
 
- 	(execute): Now a tracker is contacted in every specified period.
 
- 	If peer list is not needed, send request with numwant=0.
 
- 	* src/TrackerUpdateCommand.cc
 
- 	(execute): Updated log messages.
 
- 	* src/DownloadEngine.cc
 
- 	(~DownloadEngine): Removed two asserts.
 
- 	(waitData): Uncommented wfds. May be a bug fix.
 
- 	
 
- 2006-05-10  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/PeerInteractionCommand.h
 
- 	(checkInactiveConnection): Removed.
 
- 	* src/PeerInteractionCommand.cc
 
- 	(executeInternal): Removed following function calls:
 
- 	detectMessageFlooding(), checkLongTimePeerChoking and
 
- 	checkInactiveConnection().
 
- 	(checkInactiveConnection): Removed.
 
- 	(detectMessageFlooding): Removed function call to
 
- 	checkInactiveConnection().
 
- 	* src/PeerMessageUtil.h
 
- 	(createChokeMessage): New function. Overload.
 
- 	(createUnchokeMessage): New function. Overload.
 
- 	(createInterestedMessage): New function. Overload.
 
- 	(createNotInterestedMessage): New function. Overload.
 
- 	(createHaveMessage): New function. Overload.
 
- 	(createBitfieldMessage): New function. Overload.
 
- 	(createRequestMessage): New function. Overload.
 
- 	(createCancelMessage): New function. Overload.
 
- 	(createPieceMessage): New function. Overload.
 
- 	(createKeepAliveMessage): New function. Overload.
 
- 	* src/PeerMessageUtil.cc
 
- 	(createChokeMessage): New function. Overload.
 
- 	(createUnchokeMessage): New function. Overload.
 
- 	(createInterestedMessage): New function. Overload.
 
- 	(createNotInterestedMessage): New function. Overload.
 
- 	(createHaveMessage): New function. Overload.
 
- 	(createBitfieldMessage): New function. Overload.
 
- 	(createRequestMessage): New function. Overload.
 
- 	(createCancelMessage): New function. Overload.
 
- 	(createPieceMessage): New function. Overload.
 
- 	(createKeepAliveMessage): New function. Overload.
 
- 	* src/SendMessageQueue.cc
 
- 	(createRequestMessage): Use PeerMessageUtil.
 
- 	(createCancelMessage): Use PeerMessageUtil.
 
- 	(createPieceMessage): Use PeerMessageUtil.
 
- 	(createHaveMessage): Use PeerMessageUtil.
 
- 	(createChokeMessage): Use PeerMessageUtil.
 
- 	(createUnchokeMessage): Use PeerMessageUtil.
 
- 	(createInterestedMessage): Use PeerMessageUtil.
 
- 	(createNotInterestedMessage): Use PeerMessageUtil.
 
- 	(createBitfieldMessage): Use PeerMessageUtil.
 
- 	(createKeepAliveMessage): Use PeerMessageUtil.
 
- 	* src/SendMessageQueue.h: Renamed to PeerInteraction.h
 
- 	* src/SendMessageQueue.cc: Renamed to PeerInteraction.cc
 
- 	* src/PeerInteraction.h: New class.
 
- 	* src/PeerInteraction.cc: New class.
 
- 	
 
- 2006-05-09  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Each peer message has its own class.
 
- 	
 
- 	* src/PendingMessages.h: Removed.
 
- 	* src/PendingMessages.cc: Removed. The sending process was moved to
 
- 	each message class.
 
- 	* src/RequestSlotMan.h: Removed.
 
- 	* src/RequestSlotMan.cc: Removed. All functionarities were moved to
 
- 	SendMessageQueue.
 
- 	* src/RequestMessage.h: New class.
 
- 	* src/RequestMessage.cc: New class.
 
- 	* src/CancelMessage.h: New class.
 
- 	* src/CancelMessage.cc: New class.
 
- 	* src/BitfieldMessage.h: New class.
 
- 	* src/BitfieldMessage.cc: New class.
 
- 	* src/ChokeMessage.h: New class.
 
- 	* src/ChokeMessage.cc: New class.
 
- 	* src/KeepAliveMessage.h: New class.
 
- 	* src/KeepAliveMessage.cc: New class.
 
- 	* src/PortMessage.h: New class.
 
- 	* src/UnchokeMessage.h: New class.
 
- 	* src/UnchokeMessage.cc: New class.
 
- 	* src/PieceMessage.h: New class.
 
- 	* src/PieceMessage.cc: New class.
 
- 	* src/HaveMessage.h: New class.
 
- 	* src/HaveMessage.cc: New class.
 
- 	* src/BitfieldMessage.h: New class.
 
- 	* src/BitfieldMessage.cc: New class.
 
- 	* src/NotInterestedMessage.h: New class.
 
- 	* src/NotInterestedMessage.cc: New class.
 
- 	* src/InterestedMessage.h: New class.
 
- 	* src/InterestedMessage.cc: New class.
 
- 	* src/HandshakeMessage.h (sendMessageQueue): New variable.
 
- 	(getSendMessageQueue): New function.
 
- 	(setSendMessageQueue): New function.
 
- 	* src/HandshakeMessage.cc: New class.
 
- 	* src/PeerConnection.h (receiveMessage): Changed return value and
 
- 	arguments.
 
- 	(receiveHandshake): Changed return value and arguments.
 
- 	* src/PeerConnection.cc (receiveMessage): Do not create message class
 
- 	here.
 
- 	(receiveHandshake): Do not create handshake class here.
 
- 	* src/PeerInteractionCommand.h (peerConnection): Removed.
 
- 	(piece): Removed.
 
- 	(syncPiece): Removed.
 
- 	(sendInterest): Removed.
 
- 	(sendMessages): Removed.
 
- 	(createRequestPendingMessage): Removed.
 
- 	(checkPieceHash): Removed.
 
- 	(erasePieceOnDisk): Removed.
 
- 	(getNewPieceAndSendInterest): Removed.
 
- 	(onGotNewPice): Removed.
 
- 	(onGotWrongPiece): Removed.
 
- 	* src/PeerInteractionCommand.cc (PeerInteractionCommand):
 
- 	Removed peerConnection, piece.
 
- 	(~PeerInteractionCommand): Removed peerConnection.
 
- 	(executeInternal): Use sendMessageQueue instead of peerConnection.
 
- 	(syncPiece): Moved to SendMessageQueue.
 
- 	(decideChoking): Removed PendingMessage.
 
- 	(receiveMessage): Use sendMessageQueue instead of peerConnection.
 
- 	The action after receiving peer message was moved to each message
 
- 	class.
 
- 	(onGotNewPice): Moved to SendMessageQueue.
 
- 	(onGotWrongPiece): Moved to SendMessageQueue.
 
- 	(getNewPieceAndSendInterest): Moved to SendMessageQueue.
 
- 	(sendInterest): Moved to SendMessageQueue.
 
- 	(createRequestPendingMessage): Removed.
 
- 	(sendMessages): Moved to SendMessageQueue.
 
- 	(onAbort): Use SendMessageQueue::abortPiece()
 
- 	(keepAlive): Use sendMessageQueue instead of peerConnection.
 
- 	(beforeSocketCheck): Use sendMessageQueue instead of peerConnection.
 
- 	(checkPieceHash): Moved to SendMessageQueue.
 
- 	(erasePieceOnDisk): Moved to SendMessageQueue.
 
- 	* src/PeerMessageUtil.h
 
- 	(createBitfieldMessage): Removed.
 
- 	(createHaveMessage): Changed return value and arguments.
 
- 	(createBitfieldMessage): Changed return value and arguments.
 
- 	(createRequestCancelMessage): Removed.
 
- 	(createPieceMessage): Changed return value and arguments.
 
- 	(getShortIntParam): New function.
 
- 	(checkIndex): Changed arguments.
 
- 	(checkBegin): Changed arguments.
 
- 	(checkLength): Changed arguments.
 
- 	(checkPieceOffset): Removed.
 
- 	(checkRange): New function.
 
- 	(checkBitfield): Changed arguments.
 
- 	(createPeerMessage): Removed.
 
- 	(checkIntegrity): Removed.
 
- 	(createHandshakeMessage): Changed arguments.
 
- 	(createChokeMessage): New function.
 
- 	(createUnchokeMessage): New function.
 
- 	(createInterestedMessage): New function.
 
- 	(createNotInterestedMessage): New function.
 
- 	(createRequestMessage): New function.
 
- 	(createCancelMessage): New function.
 
- 	(createPortMessage): New function.
 
- 	* src/PeerMessageUtil.cc
 
- 	(createBitfieldMessage): Removed.
 
- 	(createHaveMessage): Changed return value and arguments.
 
- 	(createBitfieldMessage): Changed return value and arguments.
 
- 	(createRequestCancelMessage): Removed.
 
- 	(createPieceMessage): Changed return value and arguments.
 
- 	(getShortIntParam): New function.
 
- 	(checkIndex): Changed arguments.
 
- 	(checkBegin): Changed arguments.
 
- 	(checkLength): Changed arguments.
 
- 	(checkPieceOffset): Removed.
 
- 	(checkRange): New function.
 
- 	(checkBitfield): Changed arguments.
 
- 	(createPeerMessage): Removed.
 
- 	(checkIntegrity): Removed.
 
- 	(createHandshakeMessage): Changed arguments.
 
- 	(createChokeMessage): New function.
 
- 	(createUnchokeMessage): New function.
 
- 	(createInterestedMessage): New function.
 
- 	(createNotInterestedMessage): New function.
 
- 	(createRequestMessage): New function.
 
- 	(createCancelMessage): New function.
 
- 	(createPortMessage): New function.
 
- 	* src/PeerMessage.h
 
- 	(id): Removed.
 
- 	(index): Removed.
 
- 	(begin): Removed.
 
- 	(length): Removed.
 
- 	(bitfield): Removed.
 
- 	(bitfieldLength): Removed.
 
- 	(block): Removed.
 
- 	(blockLength): Removed.
 
- 	(inProgress): New variable.
 
- 	(cuid): New variable.
 
- 	(peer): New variable.
 
- 	(sendMessageQueue): New variable.
 
- 	(logger): New variable.
 
- 	(setBitfield): Removed.
 
- 	(getBitfield): Removed.
 
- 	(setBlock): Removed.
 
- 	(getBlock): Removed.
 
- 	(getBitfieldLength): Removed.
 
- 	(getBlockLength): Removed.
 
- 	(isInProgress): New function.
 
- 	(toString): Made pure virtual.
 
- 	(check): New function.
 
- 	(send): New function.
 
- 	(receivedAction): New function.
 
- 	(getId): Made pure virtual.
 
- 	(setId): Removed.
 
- 	(getIndex): Removed.
 
- 	(setIndex): Removed.
 
- 	(getBegin): Removed.
 
- 	(setBegin): Removed.
 
- 	(getLength): Removed.
 
- 	(setLength): Removed.
 
- 	(getCuid): New function.
 
- 	(setCuid): New function.
 
- 	(getPeer): New function.
 
- 	(setPeer): New function.
 
- 	(getSendMessageQueue): New function.
 
- 	(setSendMessageQueue): New function.
 
- 	(ID): Removed.
 
- 	* src/PeerMessage.cc
 
- 	(setBitfield): Removed.
 
- 	(setBlock): Removed.
 
- 	(toString): Removed.
 
- 	* src/TorrentMan.h
 
- 	(getPieceLength): New function.
 
- 	(getPieceLength): New function.
 
- 	* src/SendMessageQueue.h
 
- 	(REQUEST_TIME_OUT): New definition.
 
- 	(RequestSlots): New definition.
 
- 	(MessageQueue): New definition.
 
- 	(requestSlotMan): Removed.
 
- 	(pendingMessages): Removed.
 
- 	(requestSlots): New variable.
 
- 	(messageQueue): New variable.
 
- 	(torrentMan): New variable.
 
- 	(peerConnection): New variable.
 
- 	(peer): New variable.
 
- 	(piece): New variable.
 
- 	(getNewPieceAndSendInterest): New function.
 
- 	(createPeerMessage): New function.
 
- 	(createHandshakeMessage): New function.
 
- 	(send): Made private.
 
- 	(setPeerMessageCommonProperty): New function.
 
- 	(deleteAllRequestSlot): New function.
 
- 	(deleteRequestMessageInQueue): New function.
 
- 	(cancelAllRequest): Made private.
 
- 	(cancelAllRequest): Made private.
 
- 	(countRequestSlot): Made private.
 
- 	(addPendingMessage): Removed.
 
- 	(deletePendingPieceMessage): Removed.
 
- 	(deletePendingRequestMessage): Removed.
 
- 	(addMessage): New function.
 
- 	(deletePieceMessageInQueue): New function.
 
- 	(deleteTimeoutRequestSlot): Changed argument.
 
- 	(deleteCompletedRequestSlot): Changed argument.
 
- 	(getCorrespoindingRequestSlot): Renamed to getCorrespondingRequestSlot.
 
- 	(getCorrespondingRequestSlot): New function.
 
- 	(countPendingMessage): Removed.
 
- 	(countMessageInQueue): New function.
 
- 	(getTorrentMan): New function.
 
- 	(getPeerConnection): New function.
 
- 	(hasDownloadPiece): New function.
 
- 	(getDownloadPiece): New function.
 
- 	(setDownloadPiece): New function.
 
- 	(syncPiece): New function.
 
- 	(sendMessages): New function.
 
- 	(sendNow): New function.
 
- 	(trySendNow): New function.
 
- 	(abortPiece): New function.
 
- 	(sendHandshake): New function.
 
- 	(receiveMessage): New function.
 
- 	(receiveHandshake): New function.
 
- 	(createRequestMessage): New function.
 
- 	(createCancelMessage): New function.
 
- 	(createPieceMessage): New function.
 
- 	(createHaveMessage): New function.
 
- 	(createChokeMessage): New function.
 
- 	(createUnchokeMessage): New function.
 
- 	(createInterestedMessage): New function.
 
- 	(createNotInterestedMessage): New function.
 
- 	(createBitfieldMessage): New function.
 
- 	(createKeepAliveMessage): New function.
 
- 	* src/SendMessageQueue.cc
 
- 	(SendMessageQueue): Removed requestSlotMan.
 
- 	Instantiated peerConnection here.
 
- 	(~SendMessageQueue): Removed requestSlotMan.
 
- 	Added deletion of peerConnection and the contents of messageQueue.
 
- 	(send): Updated according to the change of messageQueue.
 
- 	(addPendingMessage): Renamed to addMessage.
 
- 	(addMessage): New function.
 
- 	(deletePendingPieceMessage): Renamed to deletePieceMessageInQueue.
 
- 	(deletePieceMessageInQueue): New function.
 
- 	(deletePendingRequestMessage): Renamed to deleteRequestMessageInQueue.
 
- 	(deleteRequestMessageInQueue): New function.
 
- 	(deleteRequestSlot): RequestSlotMan::deleteRequestSlot(...) was moved
 
- 	here.
 
- 	(deleteTimeoutRequestSlot): RequestSlotMan::deleteTimeoutRequestSlot
 
- 	(...) was moved here.
 
- 	(deleteAllRequestSlot): RequestSlotMan::deleteAllRequestSlot(...) was
 
- 	moved here.
 
- 	(deleteCompletedRequestSlot):
 
- 	RequestSlotMan::deleteCompletedRequestSlot(...) was moved here.
 
- 	(getCorrespondingRequestSlot):
 
- 	RequestSlotMan::getCorrespoindingRequestSlot(...) was moved here.
 
- 	And renamed to getCorrespondingRequestSlot, correcting a typo.
 
- 	(countPendingMessage): Renamed to countMessageInQueue.
 
- 	(countMessageInQueue): New function.
 
- 	(countRequestSlot): RequestSlotMan::countRequestSlot() was moved here.
 
- 	(receiveHandshake): New function.
 
- 	(createHandshakeMessage): New function.
 
- 	(receiveMessage): New function.
 
- 	(createPeerMessage): New function.
 
- 	(syncPiece): New function.
 
- 	(getNewPieceAndSendInterest): New function.
 
- 	(sendMessages): New function.
 
- 	(sendNow): New function.
 
- 	(trySendNow): New function.
 
- 	(sendHandshake): New function.
 
- 	(abortPiece): New function.
 
- 	(getDownloadPiece): New function.
 
- 	(getPeerMessageCommonProperty): New function.
 
- 	(createRequestMessage): New function.
 
- 	(createCancelMessage): New function.
 
- 	(createPieceMessage): New function.
 
- 	(createHaveMessage): New function.
 
- 	(createChokeMessage): New function.
 
- 	(createUnchokeMessage): New function.
 
- 	(createInterestedMessage): New function.
 
- 	(createNotInterestedMessage): New function.
 
- 	(createBitfieldMessage): New function.
 
- 	(createKeepAliveMessage): New function.
 
- 	
 
- 	
 
- 	To add simple Content-Disposition support:
 
- 	* src/HttpResponseCommand.h (determinFilename): New function.
 
- 	* src/HttpResponseCommand.cc (executeInternal):
 
- 	Use determinFilename(headers) instead of req->getFile() when comparing
 
- 	filename.
 
- 	(determinFilename): New function.
 
- 	(handleDefaultEncoding): Use determinFilename(headers) instead of
 
- 	req->getFile().
 
- 	(handleOtherEncoding): Use determinFilename(headers) instead of
 
- 	req->getFile().
 
- 	* src/Util.h (getContentDispositionFilename): New function.
 
- 	* src/Util.cc (getContentDispositionFilename): New function.
 
- 	
 
- 	* src/LogFactory.h (release): New function.
 
- 	* src/LogFactory.cc (release): New function.
 
- 	To fix a bug that causes out-of-bound exception when HTTP status
 
- 	line is wrong:
 
- 	
 
- 	* src/HttpConnection.cc (receiveResponse): Added a check for header
 
- 	size.
 
- 	* src/common.h (Deleter): New class.
 
- 	* src/SegmentMan.cc
 
- 	(~SegmentMan): Added deletion of splitter and diskWriter.
 
- 	* src/DownloadEngine.h
 
- 	(Commands): Use deque.
 
- 	(clearQueue): New function.
 
- 	* src/DownloadEngine.cc
 
- 	(~DownloadEngine): Added deletion of segmentMan.
 
- 	(cleanQueue): New function.
 
- 	* src/TorrentDownloadEngine.h
 
- 	(TorrentDownloadEngine): The implementation was moved to
 
- 	TorrentDownloadEngine.cc.
 
- 	(~TorrentDownloadEngine): The implementation was moved to
 
- 	TorrentDownloadEngine.cc.
 
- 	* src/TorrentDownloadEngine.cc
 
- 	(~TorrentDownloadEngine): Added deletion of torrentMan.
 
- 	* src/main.cc
 
- 	(clearRequest): Removed.
 
- 	(handler): Added deletion of e.
 
- 	(torrentHandler): Added deletion of te.
 
- 	(main): Do not share splitter.
 
- 	Use Deleter instead of clearRequest.
 
- 	Deletion of classes were updated.
 
- 	
 
- 2006-05-06  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/main.cc (main): Fixed typo.
 
- 	* src/message.h: Fixed typo.
 
- 	* po/de.po: Added German translation, thanks to Hermann J. Beckers.
 
- 	
 
- 2006-04-29  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add --select-file command-line option:
 
- 	
 
- 	* src/Util.cc
 
- 	(unfoldRange): New function.
 
- 	(getNum): New function.
 
- 	(unfoldSubRange): New function
 
- 	* src/main.cc
 
- 	(showUsage): Added help message.
 
- 	(main): Added --select-file command-line option. Updated the layout of
 
- 	file listing.
 
- 	* src/common.h
 
- 	(Integers): New definition.
 
- 	* src/SocketCore.cc
 
- 	(writeData): Removed timeout argument.
 
- 	(readData): Removed timeout argument.
 
- 	(peekData): Removed timeout argument.
 
- 	* src/Socket.cc
 
- 	(writeData): Removed timeout argument.
 
- 	(readData): Removed timeout argument.
 
- 	(peekData): Removed timeout argument.
 
- 	
 
- 	* Release 0.4.1
 
- 	
 
- 2006-04-28  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To deploy upload rate based choking algorithm:
 
- 	
 
- 	* src/PeerInteractionCommand.cc
 
- 	(PeerInteractionCommand): Add peer to TorrentMan::activePeers to track
 
- 	peer currently used.
 
- 	(decideChoking): Deleted the choke/unchoke decision algorithm when
 
- 	download completes. Simplified.
 
- 	(receiveMessage): Updated.
 
- 	* src/TorrentMan.h
 
- 	(activePeers): New variable.
 
- 	(addActivePeer): New function.
 
- 	(getActivePeers): New function.
 
- 	(deleteActivePeer): New function.
 
- 	* src/TorrentMan.cc
 
- 	(addPeer): deleteOldErrorPeers is moved to the begining of the function
 
- 	* src/PeerAbstractCommand.cc
 
- 	(onAbort): Use peer->resetStatus().
 
- 	* src/main.cc
 
- 	(PeerChokeCommand.h): Included.
 
- 	(main): Added the instance of ChokingCommand to the command queue.
 
- 	* src/Peer.h
 
- 	(amChoking): Renamed from amChocking
 
- 	(chokingRequired): New variable.
 
- 	(optUnchoking): New variable.
 
- 	(deltaUpload): New variable.
 
- 	(deltaDownload): New variable.
 
- 	(addDeltaUpload): New function.
 
- 	(resetDeltaUpload): New function.
 
- 	(addDeltaDownload): New function.
 
- 	(resetDeltaDownload): New function.
 
- 	(addPeerUpload): Added a call to addDeltaUpload.
 
- 	(addPeerDownload): Added a call to addDeltaDownload.
 
- 	* src/Peer.cc
 
- 	(shouldBeChoking): Renamed from shouldChoke.
 
- 	(resetStatus): New function.
 
- 	* src/PeerChokeCommand.h: New class.
 
- 	* src/PeerChokeCommand.cc: New class.
 
- 	
 
- 	To add lazy upload speed limiter:
 
- 	* src/TorrentConsoleDownloadEngine.h: Moved the variables for
 
- 	statistics calculation to TorrentDownloadEngine.
 
- 	* src/TorrentConsoleDownloadEngine.cc
 
- 	(sendStatistics): Renamed from printStatistics.
 
- 	(initStatistics): Removed. Moved to TorrentDownloadEngine.
 
- 	(calculateSpeed): Removed. Moved to TorrentDownloadEngine.
 
- 	(calculateStatistics): Removed. Moved to TorrentDownloadEngine.
 
- 	* src/TorrentDownloadEngine.h: Added the variables for statistics
 
- 	calculation.
 
- 	(sendStatistics): New function as pure virtual function.
 
- 	(getUploadSpeed): New function.
 
- 	* src/TorrentDownloadEngine.cc
 
- 	(initStatistics): New function.
 
- 	(calculateSpeed): New function.
 
- 	(calculateStatistics): New function.
 
- 	* src/SendMessageQueue.h
 
- 	(uploadLength): New variable.
 
- 	(send): Added an argument.
 
- 	(setUploadLimit): New function.
 
- 	(getUploadLimit): New function.
 
- 	* src/SendMessageQueue.cc
 
- 	(send): Added upload speed limiter.
 
- 	* src/prefs.h
 
- 	(PREF_UPLOAD_LIMIT): New definition.
 
- 	* src/PeerInteractionCommand.cc
 
- 	(PeerInteractionCommand): Set upload speed limit to sendMessageQueue.
 
- 	* src/main.cc
 
- 	(main): Added --upload-limit option
 
- 	For bug fixes:
 
- 	
 
- 	* src/main.cc
 
- 	(showUsage): Corrected --listen-port help
 
- 	Other changes:
 
- 	
 
- 	* src/TorrentMan.cc
 
- 	(getPeer): Return nullPeer if connection is grather than
 
- 	MAX_PEER_UPDATE(15) in order to leave space for incoming peers.
 
- 2006-04-21  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add some useful information to the exception message:
 
- 	* src/SocketCore.cc : Updated messages.
 
- 	* src/SegmentMan.cc : 
 
- 	* src/TorrentMan.cc : Updated messages.
 
- 	* src/MultiDiskWriter.cc : Updated messages.
 
- 	* src/Util.cc : Updated messages.
 
- 	* src/AbstractDiskWriter.cc : Updated messages.
 
- 	* src/PreAllocationDiskWriter.cc : Updated messages.
 
- 	* src/message.cc : Added new messages. Updated some messages.
 
- 	* src/TrackerWatcherCommand.h (MIN_PEERS): New definition.
 
- 	* src/TrackerWatcherCommand.cc (execute): Use MIN_PEERS.
 
- 	Updated threshold from 30 to 15.
 
- 	* src/AbstractDiskWriter.h (filename): New variable.
 
- 	* src/AbstractDiskWriter.cc (openExistingFile): Assigned filename.
 
- 	(createFile): Assigned filename.
 
- 	
 
- 	* src/main.cc: Updated the help message for http-auth-scheme.
 
- 	* Release 0.4.0
 
- 	
 
- 2006-04-20  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add TrackerUpdateCommand with which replaces
 
- 	CompactTrackerResponseProcessor:
 
- 	
 
- 	* src/TrackerWatcherCommand.h (req): Removed.
 
- 	* src/TrackerWatcherCommand.cc (execute): Send a request to tracker
 
- 	if the number of peer connections are less than 30.
 
- 	* src/ByteArrayDiskWriter.h (readData): Implemented.
 
- 	* src/SegmentMan.h (diskWriter): New function.
 
- 	* src/SegmentMan.cc (init): Added a call to diskWriter->closeFile()
 
- 	* src/main.cc : Removed #include "CompactTrackerResponseProcessor.h"
 
- 	(main): Use TrackerUpdateCommand.
 
- 	* src/TorrentMan.h (CompactTrackerResponseProcessor): Removed.
 
- 	(req): New variable.
 
- 	(setTrackerResponseProcessor): Removed.
 
- 	(getTrackerResponseProcessor): Removed.
 
- 	(processTrackerResponse): Removed.
 
- 	* src/DownloadEngine.h (diskWriter): Removed.
 
- 	* src/TorrentDownloadEngine.cc (afterEachIteration): Removed a call
 
- 	to torrentMan->processTrackerResponse().
 
- 	
 
- 	To add Util::expandBuffer:
 
- 	
 
- 	* src/ByteArrayDiskWriter.h (expandBuffer): Removed.
 
- 	* src/ByteArrayDiskWriter.cc (writeData): Use Util::expandBuffer().
 
- 	* src/Util.h (expandBuffer): New function.
 
- 	To fix the bug that causes segmentation fault when "-l ." is specified
 
- 	in command-line option:
 
- 	* src/SimpleLogger.h (SimpleLogger): Removed "filename" argument.
 
- 	(openFile): New function.
 
- 	(closeFile): New function.
 
- 	* src/SimpleLogger.cc (SimpleLogger): Removed fopen.
 
- 	(~SimpleLogger): Call closeFile();
 
- 	* src/LogFactory.cc (getInstance): Added a call to slogger->openFile().
 
- 	* src/main.cc (main): Added a check to see logger is configured
 
- 	properly.
 
- 	
 
- 	To enable HTTP authentication without specifying "--http-auth-scheme"
 
- 	
 
- 	* src/prefs.h (PREF_HTTP_AUTH_ENABLED): New definition.
 
- 	* src/HttpConnection.cc (createRequest): Send Authorization header
 
- 	if PREF_HTTP_AUTH_ENABLED == V_TRUE.
 
- 	* src/main.cc (main): Preset PREF_HTTP_AUTH_SCHEME to V_TRUE
 
- 	If "--http-user" is specified, set PREF_HTTP_AUTH_ENABLED to V_TRUE
 
- 	* src/Peer.cc (shouldChoke): Updated algorithm.
 
- 	
 
- 	* src/message.h (EX_AUTH_FAILED): New definition.
 
- 	(EX_FILE_OPEN): New definition.
 
- 	* src/HttpResponseCommand.cc (checkResponse): Throw DlAbortEx
 
- 	if status == 401.
 
- 	(handleDefaultEncoding): Added a call to diskWriter->initAndOpenFile()
 
- 	if req->isTorrent == true.
 
- 	* src/main.cc (handler): Removed the check to see e->diskWriter != NULL
 
- 	(torrentHandler): Removed the check to see diskAdaptor != NULL.
 
- 	* src/AbstractDiskWriter.cc (openExistingFile): Updated messsage.
 
- 	(createFile): Updated message.
 
- 	
 
- 2006-04-19  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add a readout of estimated remaining time to normal HTTP/FTP
 
- 	downloads:
 
- 	
 
- 	* src/ConsoleDownloadEngine.h (startup): New variable.
 
- 	(startupLength): New variable.
 
- 	(isStartupLengthSet): New variable.
 
- 	(avgSpeed): New variable.
 
- 	(eta): New variable.
 
- 	* src/ConsoleDownloadEngine.cc (sendStatistics): Added a readout of
 
- 	estimated remaining time.
 
- 	(initStatistics): Initialized newly added variables.
 
- 	(calculateStatistics): Calculate average speed and estimated remaining
 
- 	time.
 
- 	To decouple TorrentDownloadEngine from HttpResponseCommand:
 
- 	* src/TrackerDownloadCommand.h: Removed.
 
- 	* src/TrackerDownloadCommand.cc: Removed.
 
- 	* src/TrackerInitCommand.h: Removed.
 
- 	* src/TrackerInitCommand.cc: Removed.
 
- 	* src/TrackerUpdateCommand.h: Removed.
 
- 	* src/TrackerUpdateCommand.cc: Removed.
 
- 	* src/TrackerWatcherCommand.cc (execute): The construction of request
 
- 	url written in TrackerInitCommand was moved here. Do not create
 
- 	tracker request command if torrentMan->trackers != 0.
 
- 	* src/CompactTrackerResponseProcessor.h: New class.
 
- 	* src/CompactTrackerResponseProcessor.cc: New class.
 
- 	* src/message.h (MSG_TRACKER_WARNING_MESSAGE): Updated.
 
- 	* src/HttpResponseCommand.cc (createHttpDownloadCommand):
 
- 	Decoupled TorrentDownloadEngine from this.
 
- 	* src/SegmentMan.h (init): New function.
 
- 	* src/SegmentMan.cc (init): New function.
 
- 	* src/TorrentMan.h (responseProcessor): New variable.
 
- 	(trackers): New variable.
 
- 	(setTrackerResponseProcessor): New function.
 
- 	(getTrackerResponseProcessor): New function.
 
- 	(processTrackerResponse): New function.
 
- 	* src/TorrentMan.cc (Constructor): Initialized new variable trackers.
 
- 	(processTrackerResponse): New function.
 
- 	* src/main.cc (main): Use ByteArrayDiskWriter and
 
- 	CompactTrackerResponseProcessor.
 
- 	* src/TorrentDownloadEngine.cc (afterEachIteration): Call torrentMan->
 
- 	processTrackerResponse().
 
- 	
 
- 	* src/TorrentConsoleDownloadEngine.cc (printStatistics): Updated a
 
- 	readout.
 
- 	* src/TorrentDownloadEngine.cc (afterEachIteration): Added log message
 
- 	which indicates download has completed.
 
- 	* src/AbstractDiskWriter.cc (Destructor): fd >= 0, not fd >0
 
- 	(closeFile): fd >= 0, not fd > 0
 
- 	* src/main.cc (main): Added short cut for show-files.
 
- 	Added short cut for torrent-file.
 
- 	Added new command-line option listen-port.
 
- 	Updated i18n messages.
 
- 	
 
- 2006-04-18  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add LogFactory which creates singleton logger:
 
- 	
 
- 	* src/LogFactory.h: New class.
 
- 	* src/LogFactory.cc: New class.
 
- 	* src/Command.h (logger): New variable.
 
- 	(Constructor): Use LogFactory.
 
- 	* src/AbstractCommand.cc: Use Command::logger
 
- 	* src/PeerConnection.cc (Constructor): Deleted the argument logger.
 
- 	Use LogFactory.
 
- 	* src/SegmentSplitter.h : Made logger protected.
 
- 	* src/SegmentSplitter.cc (Constructor): Use LogFactory.
 
- 	* src/SegmentMan.cc (Constructor): Use LogFactory.
 
- 	* src/DownloadEngine.h : Made logger protected.
 
- 	* src/DownloadEngine.cc (Constructor): Use LogFactory.
 
- 	* src/PeerInteractionCommand.cc : Use Command::logger.
 
- 	* src/HttpResponseCommand.cc : Use Command::logger.
 
- 	* src/SegmentMan.h : Made logger private.
 
- 	* src/TorrentMan.h : Made logger private.
 
- 	* src/TorrentMan.cc : Use LogFactory.
 
- 	* src/FtpNegotiateCommand.cc : Use Command::logger.
 
- 	* src/HttpConnection.h (Constructor): Deleted the argument logger.
 
- 	* src/HttpConnection.cc (Constructor): Deleted the argument logger.
 
- 	Use LogFactory.
 
- 	* src/FtpConnection.h (Constructor): Deleted the argument logger.
 
- 	* src/FtpConnection.cc (Constructor): Deleted the argument logger.
 
- 	Use LogFactory.
 
- 	* src/DownloadCommand.cc : Use Command::logger.
 
- 	* src/PeerAbstractCommand.cc : Use Command::logger.
 
- 	* src/PeerListenCommand.cc : Use Command::logger.
 
- 	* src/PeerInitiateConnectionCommand.cc : Use Command::logger.
 
- 	* src/HttpInitiateConnectionCommand.cc : Use Command::logger.
 
- 	* src/FtpInitiateConnectionCommand.cc : Use Command::logger.
 
- 	* src/TrackerWatcherCommand.cc : Use Command::logger.
 
- 	* src/TrackerUpdateCommand.cc : Use Command::logger.
 
- 	* src/TrackerDownloadCommand.cc : Use Command::logger.
 
- 	* src/RequestSlotMan.cc (Constructor): Deleted the argument logger.
 
- 	Use LogFactory.
 
- 	* src/SendMessageQueue.h (Constructor): Deleted the argument logger.
 
- 	* src/SendMessageQueue.cc (Constructor): Deleted the argument logger.
 
- 	Use LogFactory.
 
- 	* src/main.cc (main): Use LogFactory.
 
- 	* src/DiskAdaptor.h (logger): New variable.
 
- 	* src/DiskAdaptor.cc (Constructor): Use LogFactory.
 
- 	* src/CopyDiskAdaptor.cc (fixFilename): Added a log message.
 
- 2006-04-17  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/TrackerInitCommand.cc (TrackerInitCommand): Added a "key"
 
- 	parameter to a tracker request.
 
- 	* src/TorrentMan.cc (readFileEntryFromMetaInfoFile): Bug fix.
 
- 	* src/TrackerWatcherCommand.cc (execute): Call req->resetTryCount().
 
- 	
 
- 	* src/main.cc (setSignalHander): New function.
 
- 	(main): Added a handler for SIGTERM.
 
- 	(handler): Updated message.
 
- 	(torrentHandler): Updated message.
 
- 	
 
- 2006-04-16  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/TorrentConsoleDownloadEngine.cc
 
- 	(onPartialDownloadingCompletes): Renamed as
 
- 	onSelectiveDownloadingCompletes.
 
- 	(onSelectiveDownloadingCompletes): Updated message.
 
- 	To add DiskAdaptor which abstract DiskWriter family:
 
- 	* src/PeerConnection.cc: Use diskAdaptor instead of diskWriter.
 
- 	* src/PeerInteractionCommand.cc: Use diskAdaptor instead of diskWriter.
 
- 	* src/BitfieldMan.cc (isAllBitSet): bug fix.
 
- 	* src/TorrentMan.cc : Included CopyDiskAdaptor.h, DirectDiskAdaptor.h,
 
- 	MultiDiskAdaptor.h.
 
- 	(readFileEntry): Changed its arguments.
 
- 	(setup): setupDiskWriter is merged into this function.
 
- 	(setupDiskWriter): Removed.
 
- 	(setFileFilter): New function.
 
- 	(readFileEntryFromMetaInfoFile): Updated according to the changes
 
- 	made in readFileEntry.
 
- 	(getFilePath): Removed.
 
- 	(getTempFilePath): Removed.
 
- 	(getSegmentFilePath): Updated due to the removal of getFilePath.
 
- 	(fixFilename): Removed.
 
- 	(copySingleFile): Removed.
 
- 	(splitMultiFile): Removed.
 
- 	(deleteTempFile): Removed.
 
- 	(setFileEntriesToDownload): Removed.
 
- 	(isPartialDownloadingMode): Renamed as isSelectiveDownloadingMode.
 
- 	(isSelectiveDownloadingMode): New function.
 
- 	(setAllMultiFileRequestedState): Removed.
 
- 	(finishPartialDownloadingMode): Renamed as
 
- 	finishSelectiveDownloadingMode.
 
- 	(finishSelectiveDownloadingMode): New function.
 
- 	(getPartialTotalLength): Renamed as getSelectedTotalLength.
 
- 	(getSelectedTotalLength): New function.
 
- 	(onDownloadComplete): Use diskAdaptor.
 
- 	* src/MultiDiskWriter.cc (Constructor): Added the argument pieceLength
 
- 	(Range): Removed.
 
- 	(setMultiFileEntries): Renamed as setFileEntries.
 
- 	(setFileEntries): New function.
 
- 	* src/MultiDiskWriter.h [DiskWriterEntry](enabled): Removed.
 
- 	(pieceLength): New variable.
 
- 	* src/main.cc (printDownloadCompeleteMessage): New function.
 
- 	(torrentHandler): Use diskAdaptor instead of diskWriter.
 
- 	(main): Renamed torrent-show-files to show-files.
 
- 	Rewritten file contents listing.
 
- 	* src/TorrentMan.h (FileEntry): Removed.
 
- 	(multiFileTopDir): Removed.
 
- 	(multiFileEntries): Removed.
 
- 	(diskWriter): Removed.
 
- 	(diskAdaptor): New variable.
 
- 	* src/DefaultDiskWriter.h (totalLength): New variable.
 
- 	* src/DefaultDiskWriter.cc (initAndOpenFile): Added ftruncate.
 
- 	* src/TorrentDownloadEngine.cc (onEndOfRun): Use diskAdaptor instead of
 
- 	diskWriter.
 
- 	* src/TorrentConsoleDownloadEngine.h
 
- 	(partialDownloadLengthDiff): Renamed as selectedDownloadLengthDiff.
 
- 	(partialTotalLength): Renamed as selectedTotalLength.
 
- 	* src/AbstractDiskWriter.cc (openFile): If file exists, call
 
- 	openExistingFile, otherwise call initAndOpenFile.
 
- 	(closeFile): fd > 0, not fd != 0.
 
- 	* src/DirectDiskAdaptor.h: New class.
 
- 	* src/DirectDiskAdaptor.cc: New class.
 
- 	* src/MultiDiskAdaptor.h: New class.
 
- 	* src/MultiDiskAdaptor.cc: New class.
 
- 	* src/CopyDiskAdaptor.h: New class.
 
- 	* src/CopyDiskAdaptor.cc: New class.
 
- 	* src/DiskAdaptor.h: New class.
 
- 	* src/DiskAdaptor.cc: New class.
 
- 	
 
- 	* src/prefs.h (PREF_TORRENT_SHOW_FILES): Renamed as PREF_SHOW_FILES
 
- 	(PREF_SHOW_FILES): New definition.
 
- 2006-04-12  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To add the ability to download multi torrent into respective files
 
- 	directly:
 
- 	
 
- 	* src/DiskWriter.h (openFile): New function.
 
- 	(seek): Removed.
 
- 	* src/MultiDiskWriter.h: New class.
 
- 	* src/MultiDiskWriter.cc: New class.
 
- 	* src/AbstractDiskWriter.h (seek): Changed its scope from public to
 
- 	protected.
 
- 	(openFile): New function.
 
- 	* src/AbstractDiskWriter.cc (openFile): New function.
 
- 	* src/prefs.h (V_FALSE): New definition.
 
- 	(PREF_DIRECT_FILE_MAPPING): New definition.
 
- 	* src/TorrentMan.h (setupDiskWriter): New function.
 
- 	(setAllMultiFileRequestedState): New function.
 
- 	(onDownloadComplete): New function.
 
- 	* src/TorrentMan.cc : Included MultiDiskWriter.h
 
- 	(setupDiskWriter): New function.
 
- 	(getFilePath): Updated.
 
- 	(getTempFilePath): Updated.
 
- 	(getSegmentFilePath): Updated.
 
- 	(fixFilename): Updated.
 
- 	(deleteTempFile): Updated.
 
- 	(setAllMultiFileRequestedState): New function.
 
- 	(setFileEntriesToDownload): Use setAllMultiFileRequestedState().
 
- 	(finishPartialDownloadingMode): Reset requested flags.
 
- 	(onDownloadComplete): New function.
 
- 	* src/main.cc: Added --direct-file-mapping option.
 
- 	Use TorrentMan::setupDiskWriter().
 
- 	* src/TorrentDownloadEngine.cc (afterEachIteration): Use TorrentMan::
 
- 	onDownloadComplete().
 
- 	
 
- 	
 
- 	To fix ETA bug:
 
- 	* src/Util.h (difftvsec): New function.
 
- 	* src/Util.cc (difftvsec): New function.
 
- 	* src/TorrentConsoleDownloadEngine.cc (calculateSpeed): Use int for the
 
- 	type of "elapsed" instead of long long int.
 
- 	(calculateStatistics): Use Util::difftvsec instead of Util::difftv.
 
- 	The updates of statistics takes place every 1 seconds.
 
- 	* src/TorrentConsoleDownloadEngine.h (lastElapsed): Changed its type.
 
- 	(calculateSpeed): Changed its argument signature.
 
- 	
 
- 	* src/PeerMessage.cc (toString): Fixed message.
 
- 	
 
- 2006-04-06  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To print ETA:
 
- 	* src/TorrentDownloadEngine.cc (afterEachIteration): Added download
 
- 	completion handling when dealing with
 
- 	TorrentMan::isPartialDownloadingMode() == true.
 
- 	* src/TorrentDownloadEngine.h (onPartialDownloadingCompletes):
 
- 	New function.
 
- 	* src/TorrentConsoleDownloadEngine.h (startup): New variable.
 
- 	(sessionDownloadLength): New variable.
 
- 	(avgSpeed): New variable.
 
- 	(eta): New variable.
 
- 	* src/TorrentConsoleDownloadEngine.cc (initStatistics): Initialized
 
- 	new variables: eta, avgSpeed, startup.
 
- 	(calculateSpeed): Calculate average speed and ETA.
 
- 	(printStatistics): Added ETA.
 
- 	* src/Util.h (secfmt): New function.
 
- 	* src/Util.cc (secfmt): New function.
 
- 	
 
- 2006-04-05  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	To detect "keep alive" flooding:
 
- 	* src/PeerInteractionCommand.h (keepAliveCount): New variable
 
- 	* src/PeerInteractionCommand.cc (Constructor): Initialized new
 
- 	variable: keepAliveCount.
 
- 	(detectMessageFlooding): Added "keep alive" flooding detection.
 
- 	(receiveMessage): Increase keepAliveCount when "keep alive" message
 
- 	received.
 
- 	
 
- 	To add the ability to download only specified files in multi-file
 
- 	torrent:
 
- 	* src/BitfieldMan.h (filterBitfield): New variable.
 
- 	(filterEnabled): New variable.
 
- 	(setFilterBit): New function.
 
- 	(enableFilter): New function.
 
- 	(disableFilter): New function.
 
- 	(isFilterEnabled): New function.
 
- 	(getFilteredTotalLength): New function.
 
- 	(getCompletedLength): New function.
 
- 	* src/BitfieldMan.cc (Constructor): Initialized new variable:
 
- 	filterBitfield, filterEnabled.
 
- 	(CopyConstructor): Added filterBitfield and filterEnabled.
 
- 	(operator==): Added filterBitfield and filterEnabled.
 
- 	(Destructor): Added filterBitfield.
 
- 	(getMissingIndex): Use filterBitfield.
 
- 	(getMissingUnusedIndex): Use filterBitfield.
 
- 	(getFirstMissingUnusedIndex): Use filterBitfield.
 
- 	(getFirstMissingUnusedIndex): Use filterBitfield.
 
- 	(getAllMissingIndexes): Use filterBitfield.
 
- 	(countMissingBlock): Use filterBitfield.
 
- 	(countBlock): Use filterBitfield.
 
- 	(setBitInternal): Added new argument on.
 
- 	(setUseBit): Use setBitInternal.
 
- 	(unsetUseBit): Use setBitInternal.
 
- 	(setBit): Use setBitInternal.
 
- 	(unsetBit): Use setBitInternal.
 
- 	(isAllBitSet): Use filterBitfield.
 
- 	(setFilterBit): New function.
 
- 	(addFilter): New function.
 
- 	(enableFilter): New function.
 
- 	(disableFilter): New function.
 
- 	(clearFilter): New function.
 
- 	(isFilterEnabled): New function.
 
- 	(getFilteredTotalLength): New function.
 
- 	(getCompletedLength): New function.
 
- 	* src/TorrentMan.h [FileEntry](Constructor): Updated signature.
 
- 	Initalized newly added variables.
 
- 	[FileEntry](offset): New variable.
 
- 	[FileEntry](extracted): New variable.
 
- 	[FileEntry](requested): New variable.
 
- 	(readFileEntry): New function.
 
- 	(option): New variable.
 
- 	(splitMultiFile): Removed const qualifier.
 
- 	(fixFilename): Removed const qualifier.
 
- 	(readFileEntryFromMetaInfoFile): New function.
 
- 	(finishPartialDownloadingMode): New function.
 
- 	(isPartialDownloadingMode): New function.
 
- 	(setFileEntriesToDownload): New function.
 
- 	(getCompletedLength): New function.
 
- 	(getPartialTotalLength): New function.
 
- 	* src/TorrentMan.cc (readFileEntry): New function.
 
- 	(setup): Use readFileEntry. If no-preallocation option is specified,
 
- 	use DefaultDiskWriter.
 
- 	(readFileEntryFromMetaInfoFile): New function.
 
- 	(fixFilename): Removed const qualifier.
 
- 	(splitMultiFile): Removed const qualifier.
 
- 	(setFileEntriesToDownload): New function.
 
- 	(isPartialDownloadingMode): New function.
 
- 	(finishPartialDownloadingMode): New function.
 
- 	(getCompletedLength): New function.
 
- 	(getPartialTotalLength): New function.
 
- 	
 
- 	* src/TorrentConsoleDownloadEngine.h (partialDownloadLengthDiff):
 
- 	New variable.
 
- 	(partialTotalLength): New variable.
 
- 	(downloadLength): New variable.
 
- 	(totalLength): New variable.
 
- 	* src/TorrentConsoleDownloadEngine.cc (onPartialDownloadingCompletes):
 
- 	Added log.
 
- 	(initStatistics): Initialized new variables: partialDownloadLengthDiff,
 
- 	partialTotalLength, downloadLength, totalLength.
 
- 	(calculate): Calculate downloadLength and totalLength.
 
- 	
 
- 	* src/prefs.h :New definition PREF_NO_PREALLOCATION
 
- 	* src/main.cc (addCommand): Changed argument signature.
 
- 	(main): Added new variable: args. Added new option "torrent-show-files"
 
- 	"no-preallocation". Usage is not updated yet.
 
- 	
 
- 2006-04-02  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/PeerMessage.cc (setBitfield): Fixed invalid memory de-allocation.
 
- 2006-04-01  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Attempt to add the ability to listing file entries in a .torrent file.
 
- 	This feature is not yet complete.
 
- 	
 
- 	* src/prefs.h (PREF_TORRENT_SHOW_FILES): New definition
 
- 	* src/TorrentMan.cc (getMultiFileEntries): New function.
 
- 	(getName): New function.
 
- 	* src/TorrentMan.h (getMultiFileEntries): New function.
 
- 	(getName): New function.
 
- 	* src/main.cc (main): Use above 2 funtion. 
 
- 	
 
- 	* Release 0.3.2
 
- 	
 
- 2006-03-31  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* src/PeerInteractionCommand.cc (checkInactiveConnection): New function
 
- 	(detectMessageFlooding): Updated threshold value.
 
- 	(checkLongTimePeerChoking): Updated timeout value.
 
- 	(getNewPieceAndSendInterest): Added debug log.
 
- 	* src/PeerInteractionCommand.h (checkInactiveConnection): New function
 
- 	
 
- 	* src/TorrentMan.cc (deleteOldErrorPeers): Updated.
 
- 	(getPeer): Updated.
 
- 	* src/TorrentMan.h: Added MAX_PEER_ERROR.
 
- 	
 
- 	* src/PeerAbstractCommand.cc (onAbort): Increment error counter.
 
- 	* src/PeerListenCommand.cc (execute): Close connection if incoming peer
 
- 	is localhost.
 
- 	* src/main.cc (main): Updated PREF_PEER_CONNECTION_TIMEOUT to 60.
 
- 	* src/PendingMessage.cc (processMessage): Not to send piece message
 
- 	if peer is not interested in the pieces localhost has.
 
- 	* src/Peer.cc (shouldChoke): Updated.
 
- 	* src/SendMessageQueue.cc (cancelAllRequest): Fixed.
 
- 	* src/Util.cc (isPowerOf): New function.
 
- 	* src/Util.h (isPowerOf): New function.
 
- 	* src/PeerMessageUtil.cc (checkLength): Added a check for length
 
- 	whether or not it is power of 2.
 
- 	
 
- 2006-03-28  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	Added new class SendMessageQueue that includes PendingMessages and
 
- 	RequestSlotMan.
 
- 	* src/SendMessageQueue.h: New class.
 
- 	* src/SendMessageQueue.cc: New class.
 
- 	* src/PendingMessage.h: Added new member variable blockIndex and its
 
- 	accessors.
 
- 	(createRequestMessage): Updated.
 
- 	* src/PendingMessage.cc (createRequestMessage): Updated.
 
- 	* src/PeerInteractionCommand.cc (executeInternal): Updated with
 
- 	SendMessageQueue.
 
- 	(checkLongTimePeerChoking): Updated with SendMessageQueue.
 
- 	(receiveMessage): Updated with SendMessageQueue.
 
- 	(deletePendingPieceMessage): Removed.
 
- 	(getNewPieceAndSendInterest): Updated with SendMessageQueue.
 
- 	(sendInterest): Updated with SendMessageQueue.
 
- 	(createRequestPendingMessage): Updated with SendMessageQueue.
 
- 	(sendMessages): Updated with SendMessageQueue.
 
- 	(onAbort): Updated with SendMessageQueue.
 
- 	(keepAlive): Updated with SendMessageQueue.
 
- 	(beforeSocketCheck): Updated SendMessageQueue.
 
- 	* src/PeerInteractionCommand (sendMessages): Shuffle
 
- 	missingBLockIndexes before using it.
 
- 	
 
- 	Added its own timeout for peer connection.
 
- 	
 
- 	* src/PeerAbstractCommand.h: Added member variable timeout and its
 
- 	setter.
 
- 	* src/prefs.h: Added PREF_PEER_CONNECTION_TIMEOUT.
 
- 	* src/PeerInteractionCommand.cc (PeerInteractionCommand):
 
- 	Added setTimeout() call.
 
- 	(executeInternal): Added setTimeout() call.
 
- 	* src/PeerAbstractCommand.cc (PeerAbstractCommand):
 
- 	Added timeout.
 
- 	(isTimeoutDetected): Updated.
 
- 	* src/main.cc (main): Added PREF_PEER_CONNECTION_TIMEOUT entry to
 
- 	option.
 
- 	
 
- 	Added *simple* message flooding checker.
 
- 	
 
- 	* src/PeerInteractionCommand.cc (executeInternal):
 
- 	Added detectMessageFlooding() call.
 
- 	(detectMessageFlooding): New function.
 
- 	(receiveMessage): Count up CHOKE, UNCHOKE, HAVE message.
 
- 	(beforeSocketCheck): Added detectMessageFlooding() call.
 
- 	* src/PeerInteractionCommand.h: Added sendMessageQueue,
 
- 	chokeUnchokeCount, haveCount, detectMessageFlooding().
 
- 	Removed deletePendingPieceMessage(), getRequestSlot(),
 
- 	deleteRequestSlot(), deleteAllRequestSlot().
 
- 	
 
- 	* src/PeerInteractionCommand.cc (beforeSocketCheck):
 
- 	Added checkLongTimePeerChoking() call.
 
- 	* src/RequestSlotMan.h: Renamed deleteTimeoutRequestSlot().
 
- 	* src/TorrentMan.cc (addPeer): Delete at most MAX_PEER_LIST_SIZE peers
 
- 	if duplicate == false.
 
- 	The parameter "uploaded" and "downloaded" in the tracker request are
 
- 	the size since the client sent the "started" event to the tracker.
 
- 	
 
- 	* src/TorrentMan.cc (setup): Assigned saved downloaded Size and
 
- 	uploaded size to preDownloadedSize, preUploadedSize respectively.
 
- 	* src/TorrentMan.h: Added preDownloadedSize, preUploadedSize,
 
- 	getSessionDownloadedSize(), getSessionUploadedSize().
 
- 	* src/TrackerInitCommand.cc (execute): Use getSessionDownloadedSize(),
 
- 	getSessionUploadedSize() instead of getDownloadedSize(),
 
- 	getUploadedSize().
 
- 	
 
- 	* src/PendingMessage.cc (processMessage): Do not send request message
 
- 	if the peer is choking the client.
 
- 	* src/TrackerUpdateCommand.cc (execute): Check wtheher minInterval is
 
- 	less than interval.
 
- 	
 
- 2006-03-27  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* configure.in: Added gnutls support. Added several CPP macros.
 
- 	* m4/openssl.m4: Added.
 
- 	* src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
 
- 	readData(), peekData(). Added gnutls support.
 
- 	* src/HttpDownloadCommand.cc: Removed SleepCommand.h
 
- 	* src/TrackerWatcherCommand.{h,cc}: Added. This command creates
 
- 	TrackerInitCommand periodicaly(TorrentMan::minInterval).
 
- 	* src/TorrentMan.cc: Remove downloadedSize == 0 check from save().
 
- 	Instead, added a check for whether setup method has executed
 
- 	successfully.
 
- 	* src/TorrentMan.h: Added member vaiable setupComplete. Updated
 
- 	DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to 300.
 
- 	* src/Makefile.am: Updated.
 
- 	* src/messageDigest.h: Added. This is a macro calculating SHA1 digest
 
- 	using whether OpenSSL or gcrypt, depending on the result of configure
 
- 	script.
 
- 	* src/ShaVisitor.{h,cc}: Removed direct	dependency on OpenSSL by using
 
- 	messageDigest.h. 
 
- 	* src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
 
- 	* src/PeerListenCommand.cc: Added log about port binded successfully.
 
- 	Fixed memory leak.
 
- 	* src/main.cc: Added gnutls support. Replaced LIB_SSL with
 
- 	ENABLE_BITTORRENT where they are not related to OpenSSL but BitTorrent.
 
- 	Removed instantiation of TrackerInitCommand. Instead,
 
- 	TrackerWatcherCommand is instantiated and pushed to the command queue.
 
- 	* src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL with
 
- 	ENABLE_SSL.
 
- 	* src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
 
- 	* src/RequestSlotMan.cc (deleteCompletedRequestSlot):
 
- 	If a piece is already acquired by another command, delete the request
 
- 	slots for the piece.
 
- 	* src/TrackerUpdateCommand.cc (execute):
 
- 	Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to warn.
 
- 	Added a check whether peer list is null.
 
- 	Fixed the bug that causes sending completed event to the tracker
 
- 	several times.
 
- 	* src/TrackerInitCommand.cc (execute):
 
- 	Fixed the bug that causes sending completed event to the tracker
 
- 	several times.
 
- 	* src/AbstractDiskWriter.{h,cc}: Removed direct dependency on OpenSSL
 
- 	by using messageDigest.h.
 
- 	
 
- 2006-03-26  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* PeerConnection.cc: Replaced log message "keep-alive" with
 
- 	"keep alive".
 
- 	* PeerInteractionCommand.{h,cc}: Close connection if peer is choking
 
- 	localhost long time.
 
- 	* TorrentMan.cc: When adding new peer with duplicate = true, if the
 
- 	number of peer list is equal to or grater than MAX_PEER_LIST, delete
 
- 	at most 100 failure entry from the list. If with duplicate = false,
 
- 	MAX_PEER_LIST is not checked.
 
- 	* PeerListenCommand.cc: Fixed the argument order of log message.
 
- 2006-03-25  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
 
- 	Added warn().
 
- 	* SimpleLogger.h: Moved enum LEVEL to Logger.h.
 
- 	Implemented warn().
 
- 	Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated code.
 
- 	
 
- 2006-03-24  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* Request.h: Added AFTER_COMPLETED event.
 
- 	* TorrentDownloadEngine.cc: Prints "Download complete" message
 
- 	instead of downloaded size and progress(%) after download completes.
 
- 	* PeerInteractionCommand.cc: After download completes, sends unchoke
 
- 	message to the peer if it is interested in what localhost has
 
- 	downloaded.
 
- 	* TorrentMan.cc: In single-file mode, copy temporary file to the final
 
- 	destination instead of just renaming it.
 
- 	* TorrentMan.cc: Added deleteTempFile().
 
- 	* PeerAbstractCommand.cc: do not stop execution after download
 
- 	completes. This makes localhost a seeder.
 
- 	* Util.{h,cc}: Added fileCopy().
 
- 	* PeerListenCommand.cc: do not stop execution after download completes.
 
- 	This makes localhost a seeder.
 
- 	* main.cc: Do not call TorrentMan::fixFilename() in torrentHandler.
 
- 	Added TorrentMan::deleteTempFile() to torrentHandler.
 
- 	Initialized the variable dir as ".".
 
- 	* TorrentMan.h: Changed DEFAULT_ANNOUNCE_INTERVAL to 120 seconds.
 
- 	Deleted renameSingleFile().
 
- 	Added copySingleFile(), deleteTempFile().
 
- 	* DownloadEngine.h: Added virtual function afterEachIteration().
 
- 	* TorrentDownloadEngine.cc: Move a call to TorrentMan::fixFilename()
 
- 	in onEndOfRun() to afterEachIteration().
 
- 	In onEndOfRun(), changed if condition to check whether filenameFixed is
 
- 	true.
 
- 	* Util.cc: Implemented fileCopy() using rangedFileCopy().
 
- 	In rangedFileCopy(), added try-catch block to properly close file
 
- 	descriptors.
 
- 	* TorrentDownloadEngine.cc: Added a member variable filenameFixed.
 
- 	Added afterEachIteration(), isFilenameFixed().
 
- 	* Peer.cc: Changed choking strategy.
 
- 	* PreAllocationDiskWriter.cc: Drop O_DIRECT flag.
 
- 	* TrackerInitCommand.cc: Send completed event only once.
 
- 	* DownloadEngine.cc: Added a call to afterEachIteration().
 
- 	* TrackerUpdateCommand.cc: Do not stop execution after download
 
- 	completes.
 
- 	* TorrentMan.h: Defined MAX_PEER_UPDATE as 15. aria2 attempts to
 
- 	connect the peers at most MAX_PEER_UPDATE when a peer list is
 
- 	received from a tracker.
 
- 	* TrackerUpdateCommand.cc: Implemented above mentioned behavior.
 
- 	Decreased the number of failure peers to delete to 0(just comment out
 
- 	the line).
 
- 	* Release 0.3.1
 
- 	
 
- 2006-03-23  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* PeerInteractionCommand.cc: added a call to 
 
- 	TorrentMan::unadvertisePiece in Destructor.
 
- 	* PeerInteractionCommand.cc: make have message sent immediately
 
- 	if the size of pending message queue is zero.
 
- 	* TorrentMan.cc: set the maximum size of peer list to 250.
 
- 	* TorrentMan.h: changed the container type of Peers and UsedPieces
 
- 	to deque.
 
- 	* Util.cc: fixed rangedFileCopy.
 
- 	* AbstractDiskWriter.{h,cc}: moved digest context initialization
 
- 	to Constructor. Also, moved digest cleanup to Destructor.
 
- 	* MetaFileUtil.cc: fixed memory leak
 
- 	* replaced std::vector with std::deque.
 
- 	* AbstractCommand.cc: casted timeout value to long long int.
 
- 	* ChunkedEncoding.cc: fixed memory leak.
 
- 	* PeerInteractionCommand.cc: casted timeout value to long long int.
 
- 	* SleepCommand.cc: casted timeout value to long long int.
 
- 	* Data.cc: fixed memory leak.
 
- 	* Data.cc: fixed toLLInt().
 
- 	* BitfieldMan.cc: fixed memory leak.
 
- 	* TorrentMan.cc: initialized storeDir to ".".
 
- 	* TorrentMan.cc: fixed memory leak.
 
- 	* TorrentMan.cc: corrected file paths of splitted files.
 
- 	* PeerAbstractCommand.cc: casted timeout to long long int.
 
- 	* main.cc: added delete(req) and delete(te->diskWriter).
 
- 	* RequestSlot.cc: casted timeout value to long long int.
 
- 	* Request.cc: fixed memory leak.
 
- 	* PendingMessage.cc: make HAVE messages sent only when peer does not
 
- 	have the piece.
 
- 	* Peer.{h,cc}: added hasPiece(int index).
 
- 	* main.cc: corrected addCommand.
 
- 	
 
- 2006-03-22  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* BitTorrent protocol support added.
 
- 	* Release 0.3.0
 
- 	
 
- 2006-03-17  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* SocketCore.cc: remove the assignment of addrinfo.ai_addr.
 
- 2006-03-09  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* ChunkedEncoding.{h,cc}: fixed the bug that if chunk data is binary,
 
- 	decoding did not work properly.
 
- 2006-03-07  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* DownloadEngine.h: included sys/time.h
 
- 	* DownloadEngine.cc: remove sys/time.h
 
- 	* Makefile.am (SUBDIRS): Add intl.
 
- 	* configure.in (AC_CONFIG_FILES): Add intl/Makefile.
 
- 2006-03-05  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* main.cc: correct help message for --http-auth-scheme.
 
- 	* main.cc: changed e-mail address for bug reports.
 
- 	* ja.po: added japanese translation.
 
- 2006-03-04  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* SimpleLogger.cc: flush log file instead of stdout.
 
- 2006-03-03  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* main.cc: Fixed command-line option: max-tries
 
- 	* HttpResponseCommand.cc: Make the request re-sent only if req->seg.sp
 
- 	does not equal to seg.sp.
 
- 	* DownloadCommand.cc: If EOF is got from the server and the total size
 
- 	of file is not zero, then throw DlRetryEx.
 
- 	* main.cc: Set the minium value of min-segment-size to 1024.
 
- 	* HttpResponseCommand.cc: Fixed the bug that http segmented downloading
 
- 	fails because of a regression since 0.2.0 release.
 
- 	
 
- 2006-03-02  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* HttpConnection.cc:
 
- 	* common.h: defined the user agent name as macro
 
- 	* DownloadEngine.{h, cc}:
 
- 	* ConsoleDownloadEngine.{h, cc}: Console output message(size, speed)
 
- 	is now generated by ConsoleDownloadEngine not by DownloadEngine.
 
- 	* main.cc: Download complete/abort message is now generated by main.
 
- 	* Makefile.am (SUBDIRS): Add m4.
 
- 	(ACLOCAL_AMFLAGS): New variable.
 
- 	(EXTRA_DIST): New variable.
 
- 	* configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
 
- 	* gettext: added gettext functionality
 
- 	
 
- 2006-03-01  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* AbstractCommand.cc:
 
- 	* DownloadCommand.{h, cc}: Aborted downloading commands now properly
 
- 	unregister its cuid from SegmentMan.	
 
- 	* DownloadEngine.cc: .aria2 file was written when a downloading
 
- 	failed with errors.
 
- 	* HttpConnection.cc: Added "Proxy-Connection" header to proxy request.
 
- 	Added "User-Agent" header to CONNECT proxy request.
 
- 	Fixed "Proxy-Authorization" header. Now proxy authorization works
 
- 	properly.
 
- 	* Logger.h:
 
- 	* SimpleLogger.{h,cc}: Changed the type of msg to const char*.
 
- 	* ChunkedEncoding.cc: Added #include directive for strings.h
 
- 	* Release 0.2.1
 
- 	
 
- 2006-02-28  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* Util.{h,cc}: added startsWith().
 
- 	* CookieBox.cc: rewrited criteriaFind() using Util::startsWith() and
 
- 	Util::endsWith().
 
- 	* SocketCore.cc: struct addrinfo is now  zero-initialized.
 
- 	* common.h: added #include directive of limit.h.
 
- 	* DownloadEngine.cc: added #include directive of sys/time.h and
 
- 	algorithm.
 
- 	* Exception.h: added #include directive of stdio.h.
 
- 	* AbstractCommand.h: added #include directive of sys/time.h.
 
- 	* DownloadCommand.h: added #include directive of sys/time.h.
 
- 	* *.h: added #include directive of common.h to all base classes.
 
- 	subclasses' one was removed.
 
- 	* common.h: defined LONG_LONG_MAX and LONG_LONG_MIN if a compiler
 
- 	does not define these macros.
 
- 	
 
- 2006-02-23  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* Release 0.2.0
 
- 	* main.cc:
 
- 	* HttpInitiateConnectionCommand.{h,cc}:
 
- 	* prefs.h:
 
- 	* HttpConnection.{h,cc}: added --http-proxy-method option.
 
- 	We can now use GET command in http proxy.
 
- 2006-02-22  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	
 
- 	* SplitSlowestSegmentSplitter.{h,cc}: This class provies algorithm
 
- 	that splits slowest segment of SegmentMan::commands vector.
 
- 	This is the default split algorithm of aria2.
 
- 	* SplitFirstSegmentSplitter.{h,cc}: This class provides algorithm
 
- 	that splits first segment of SegmentMan::commands vector.
 
- 	* SegmentSplitter.{h,cc}: Added. This class provides split algorithm.
 
- 	* DownloadCommand.{h,cc}: Added downloading speed calculation.
 
- 	* Segment.h:
 
- 	* SegmentMan.cc: Added speed field to Segment.h
 
- 	* main.cc: -s option now affects all URLs in command-line arguemtns.
 
- 	* HttpResponseCommand.cc: Fixed bug that segment file is not loaded.
 
- 	* message.h: Change file size related %d to %lld.
 
- 2006-02-21  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* FtpInitiateConnectionCommand.{h,cc}:
 
- 	* FtpNegotiationCommand.{h,cc}:
 
- 	* FtpDownloadCommand.{h,cc}:
 
- 	* FtpConnection.{h,cc}: Added FTP support
 
- 	* SimpleLogger.cc: Log message now includes time information.
 
- 	* main.cc: The value of --http-auth-scheme option is chagned from
 
- 	'BASIC' to 'basic'
 
- 	* main.cc: Added --timeout command-line option.
 
- 	* main.cc: Added --min-segment-size command-line option.
 
- 	* main.cc: Added --max-retries command-line option.
 
- 	* prefs.h: option string constants are now defined in prefs.h
 
- 	
 
- 2006-02-19  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* AbstractCommand.cc: Fixed timeout bug in AbstractCommand
 
- 	* SegmentMan.cc: Added totalSize entry to .aria2 file. No compatibility
 
- 	with version 0.1.0's one.
 
- 	
 
- 2006-02-18  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
- 	* configure.in: Added --enable-ssl option to configure script.
 
- 	* HttpConnection.cc: Make Request-URI an absolute path. Some servers
 
- 	cannot permit absoluteURI as Request-URI.
 
- 	* HttpConnection.cc: Added Referer support.
 
- 	* main.cc: Added referer command-line option.
 
- 	* main.cc: Added rety-wait command-line option.
 
- 	* Exception.h: Fixed formating bug in Exception::setMsg()
 
- 	* SocketCore.{h,cc}:
 
- 	* Socket.{h, cc}:
 
- 	* Request.cc:
 
- 	* InitiateConnectionCommandFactory.cc:
 
- 	* HttpRequestCommand.cc: Added HTTPS support.
 
- 	* SocketCore.{h,cc}: Added SocketCore. Socket becomes a handle class
 
- 	for SocketCore.
 
- 	* ChunkedEncoding.cc: Fixed bug in ChunkedEncoding: expanding buffer
 
- 	size is wrong
 
- 	* DownloadCommand.cc: Fixed bug in DownloadCommand: In Chunked
 
- 	Encoding, it wrongly adds to Segment.ds buff length from the socket.
 
- 2006-02-17  Tatsuhiro Tsujikawa <tsujikawa at rednoah dot com>
 
- 	
 
- 	* Release 0.1.0
 
- 	
 
 
  |