ChangeLog 392 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029
  1. 2008-08-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2. Bump up version number to 0.15.1+2
  3. * configure.ac
  4. 2008-08-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5. Fixed the bug that configure --enable-FEATURE actually disables FEATURE.
  6. * m4/aria2_arg.m4
  7. 2008-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8. * Release 0.15.1+1
  9. 2008-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10. Bump up version number to 0.15.1+1
  11. * configure.ac
  12. 2008-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  13. Fixed the bug that causes segmentaion fault when resuming download
  14. using metalink without size tag. Reproducible only using HTTP URI.
  15. * src/HttpResponseCommand.cc
  16. * src/FtpNegotiationCommand.cc
  17. 2008-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  18. * Release 0.15.1
  19. 2008-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  20. Updated Bulgarian and French translations, thanks to all translators.
  21. * po/bg.po
  22. * po/fr.po
  23. 2008-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  24. Bump up version number to 0.15.1
  25. * configure.ac
  26. 2008-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  27. Avoid repeated call of gettimeofday() when calculating speed.
  28. * src/SpeedCalc.cc
  29. * src/SpeedCalc.h
  30. 2008-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  31. Removed writable check when socket's send buffer is full in BitTorrent
  32. downloads to lower CPU usage.
  33. * src/PeerInteractionCommand.cc
  34. 2008-07-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  35. Fixed broken gzip inflation.
  36. Turn off segmented downloading if gzip content is smaller than or equal
  37. to 1MiB and inflate the data on the fly, because HTTP response header
  38. doesn't contain the length of inflated file we can't determin where
  39. the chunk of data should be written.
  40. On the other hand, if gzip content is larger than 1MB, then turn off
  41. on the fly inflation, because some servers returns "content-type: gzip"
  42. for *.tgz, *.gz files.
  43. * src/DownloadCommand.cc
  44. * src/HttpResponseCommand.cc
  45. * src/HttpResponseCommand.h
  46. 2008-07-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  47. Applied tizianomueller's patch to fix compile error.
  48. * test/BitfieldManTest.cc
  49. * test/BtRequestMessageTest.cc
  50. * test/DefaultBtContextTest.cc
  51. * test/DefaultDiskWriterTest.cc
  52. * test/DefaultPieceStorageTest.cc
  53. * test/HttpHeaderProcessorTest.cc
  54. * test/HttpResponseTest.cc
  55. * test/Metalink2RequestGroupTest.cc
  56. * test/MetalinkParserControllerTest.cc
  57. * test/MetalinkProcessorTest.cc
  58. * test/PeerSessionResourceTest.cc
  59. * test/UtilTest.cc
  60. 2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  61. * Release 0.15.0
  62. 2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  63. Reordered src files in POTFILES.in so that usage text appears first.
  64. * po/POTFILES.in
  65. 2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  66. Bump up version number to 0.15.0
  67. * configure.ac
  68. 2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  69. Added Bulgarian translation.
  70. Updated Catalan, Spanish, French and Japanese translations.
  71. Thanks to all translators.
  72. * po/LINGUAS
  73. * po/bg.po
  74. * po/ca.po
  75. * po/es.po
  76. * po/fr.po
  77. * po/ja.po
  78. 2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  79. Updated feature list. Added libz for dependency section.
  80. Added a description about unit testing using CppUnit.
  81. * README
  82. 2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  83. Added a test for libz. Quoted where it is necessary.
  84. * build_test.sh
  85. 2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  86. Added GZip to `Enabled Features' list.
  87. * src/FeatureConfig.cc
  88. * src/FeatureConfig.h
  89. * test/FeatureConfigTest.cc
  90. 2008-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  91. Now SegmentMan::findSlowerSegmentEntry() picks up the segment for which
  92. the transfer has not yet started.
  93. Rewritten SegmentMan::registerPeerStat() and SegmentMan::getPeerStat().
  94. * src/SegmentMan.cc
  95. * src/SegmentMan.h
  96. * test/SegmentManTest.cc
  97. 2008-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  98. Cache last calculated average download/upload speed.
  99. PeerStat::getAvgDownloadSpeed(), PeerStat::getAvgUploadSpeed() return
  100. cached value.
  101. Now SpeedCalc::changeSw() is called from SpeedCalc::calculateSpeed()
  102. * src/PeerStat.h
  103. * src/SpeedCalc.cc
  104. * src/SpeedCalc.h
  105. 2008-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  106. Call parseUrl directly.
  107. * src/Request.cc (resetUrl)
  108. 2008-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  109. Supported absolute/relative path in Location header field.
  110. * src/AbstractCommand.cc: Call resetUrl() when DlRetryEx is caught.
  111. * src/HttpHeader.cc
  112. * src/HttpHeader.h
  113. * src/HttpResponse.cc
  114. * src/HttpSkipResponseCommand.cc
  115. * src/Request.cc
  116. * test/HttpHeaderTest.cc
  117. * test/HttpResponseTest.cc
  118. * test/RequestTest.cc
  119. 2008-07-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  120. Changed help text for --load-cookie option.
  121. * doc/aria2c.1.txt
  122. * src/usage_text.h
  123. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  124. Regenerated test/Makefile.in to remove stale ChangeLog.
  125. * test/Makefile.in
  126. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  127. Updated po files.
  128. * po/aria2c.pot
  129. * po/*.po
  130. * po/*.gmo
  131. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  132. Bump up version number to 0.15.0b
  133. * configure.ac
  134. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  135. Externalize messages.
  136. * src/RequestGroupMan.cc
  137. * src/message.h: Added MSG_SIGNATURE_SAVED, MSG_SIGNATURE_NOT_SAVED.
  138. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  139. Use File::exists() instead of File::isFile() to allow non-regular file
  140. such as block special files.
  141. * src/AbstractDiskWriter.cc
  142. * src/MultiDiskWriter.cc
  143. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  144. Supplied missing EAI_SYSTEM. Thanks ggknauf for the patch.
  145. * src/gai_strerror.h
  146. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  147. Fixed compile error. Thanks gknauf for the patch.
  148. * src/asctime_r.c
  149. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  150. Included asctime_r.h from a2time.h.
  151. * src/a2time.h
  152. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  153. Added a message "aria2 doesn't verify signature" to log message when
  154. signature file is saved.
  155. * src/RequestGroupMan.cc
  156. 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  157. Added the ability to save signature when download is completed if
  158. signature is available. The filename of signature file is the path to
  159. download file followed by ".sig". If it already exists, then signature
  160. will not be saved.
  161. * src/RequestGroupMan.cc
  162. * src/Signature.cc
  163. * test/SignatureTest.cc
  164. 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  165. Updated the descriptions for --bt-seed-unverified.
  166. * doc/aria2c.1
  167. * doc/aria2c.1.html
  168. * doc/aria2c.1.txt
  169. 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  170. Renamed --bt-seed option as --bt-seed-unverified so that it makes clear
  171. that this is not going to verify files using piece hashes.
  172. * src/HelpItemFactory.cc
  173. * src/OptionHandlerFactory.cc
  174. * src/RequestGroup.cc
  175. * src/option_processing.cc
  176. * src/prefs.cc
  177. * src/prefs.h
  178. * src/usage_text.h
  179. 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  180. Added the ability to retrieve signature from Metalink file.
  181. A retrieved signature is stored in Signature class and it is held by
  182. DownloadContext class. Note that aria2 doesn't verify signature.
  183. * src/DownloadContext.cc
  184. * src/DownloadContext.h
  185. * src/Makefile.am
  186. * src/Makefile.in
  187. * src/Metalink2RequestGroup.cc
  188. * src/MetalinkEntry.cc
  189. * src/MetalinkEntry.h
  190. * src/MetalinkParserController.cc
  191. * src/MetalinkParserController.h
  192. * src/MetalinkParserStateMachine.cc
  193. * src/MetalinkParserStateMachine.h
  194. * src/Signature.cc
  195. * src/Signature.h
  196. * src/SignatureMetalinkParserState.cc
  197. * src/SignatureMetalinkParserState.h
  198. * src/VerificationMetalinkParserState.cc
  199. * src/VerificationMetalinkParserState.h
  200. * test/Metalink2RequestGroupTest.cc
  201. * test/MetalinkParserControllerTest.cc
  202. * test/MetalinkProcessorTest.cc
  203. * test/test.xml
  204. 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  205. Close DiskAdaptor after renaming file.
  206. * src/RequestGroup.cc
  207. 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  208. Corrected indentation
  209. * src/DefaultBtProgressInfoFile.cc
  210. 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  211. Moved the calls of std::ios::exceptions() inside of try-catch block
  212. because if an error occurred in constructor of std::fstream, then
  213. exception is thrown immediately when std::ios::exceptions() is called
  214. which results unhandled exception and aria2c aborts.
  215. * src/DefaultBtProgressInfoFile.cc
  216. 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  217. Added the test for the previous change in DefaultBtContext.cc
  218. * test/DefaultBtContextTest.cc
  219. 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  220. Fixed the bug that causes infinite loop when the number of pieces are
  221. fewer than allowed fast set size which is 10 by default.
  222. * src/DefaultBtContext.cc
  223. 2008-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  224. Updated the descriptions for -j, -s. Added --bt-seed.
  225. * doc/aria2c.1
  226. * doc/aria2c.1.html
  227. * doc/aria2c.1.txt
  228. 2008-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  229. Added --bt-seed option. If --bt-seed=true is given at the command-line,
  230. aria2 seeds previously downloaded files without validating piece hashs.
  231. * src/HelpItemFactory.cc
  232. * src/OptionHandlerFactory.cc
  233. * src/RequestGroup.cc
  234. * src/option_processing.cc
  235. * src/prefs.cc
  236. * src/prefs.h
  237. * src/usage_text.h
  238. 2008-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  239. Updated DESCRIPTION of man page.
  240. * doc/aria2c.1
  241. * doc/aria2c.1.html
  242. * doc/aria2c.1.txt
  243. 2008-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  244. Fixed the compile error on Nexenta OS(GNU/Solaris OS).
  245. Don't define `struct addrinfo' when __sun is defined.
  246. * src/getaddrinfo.h
  247. 2008-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  248. Introduced a2_struct_stat. It is defined as `struct _stati64' if
  249. __MINGW32__ is defined, because under MinGW32, _stati64 is used and its
  250. second argument is of type `struct _stati64'. Otherwise it is defined as
  251. `struct stat'.
  252. * src/AbstractDiskWriter.cc
  253. * src/File.cc
  254. * src/File.h
  255. * src/a2io.h
  256. 2008-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  257. Fixed the compile error in hurd-i386
  258. See the original bug report:
  259. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488602
  260. * src/a2io.h
  261. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  262. Code cleanup.
  263. * src/PeerAbstractCommand.cc
  264. * src/PeerAbstractCommand.h
  265. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  266. Removed TransferEncoding.
  267. * src/DownloadCommand.cc
  268. * src/DownloadCommand.h
  269. * src/HttpResponseCommand.cc
  270. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  271. Updated po files.
  272. * po/aria2c.pot
  273. * po/*.po
  274. * po/*.gmo
  275. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  276. Rewritten ChunkedEncoding class as ChunkedDecoder class.
  277. * src/A2STR.cc
  278. * src/A2STR.h
  279. * src/ChunkedDecoder.cc
  280. * src/ChunkedDecoder.h
  281. * src/ChunkedEncoding.cc: Removed
  282. * src/ChunkedEncoding.h: Removed
  283. * src/DownloadCommand.cc
  284. * src/DownloadCommand.h
  285. * src/HttpDownloadCommand.cc
  286. * src/HttpResponse.cc
  287. * src/HttpResponse.h
  288. * src/HttpResponseCommand.cc
  289. * src/HttpSkipResponseCommand.cc
  290. * src/HttpSkipResponseCommand.h
  291. * src/Makefile.am
  292. * src/TransferEncoding.h: Removed
  293. * test/ChunkedDecoderTest.cc
  294. * test/ChunkedEncodingTest.cc: Removed
  295. * test/HttpResponseTest.cc
  296. * test/Makefile.am
  297. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  298. Use append instead of insert.
  299. * src/GZipDecoder.cc
  300. 2008-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  301. Updated doc
  302. * src/Decoder.h
  303. 2008-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  304. Updated usage text for -s option.
  305. * src/usage_text.h
  306. 2008-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  307. Fixed the bug that UTF-8 encoded URL is not URL-encoded properly.
  308. * src/Request.cc
  309. 2008-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  310. Cleaned up configure.ac.
  311. * configure.ac
  312. 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  313. Use ARIA2_ARG_WITH and ARIA2_ARG_ENABLE instead of AC_ARG_WITH and
  314. AC_ARG_ENABLE.
  315. * configure.ac
  316. 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  317. Added gzip, deflate decoding support in HTTP using libz. If compiled
  318. with this feature, aria2 sends "Accept-Encoding: deflate, gzip" header
  319. to a HTTP server. If a server returns "Content-Encoding: gzip" or
  320. "Content-Encoding: deflate" then, aria2 decodes the response body on the
  321. fly and writes decoded data to a local disk.
  322. * README
  323. * README.html
  324. * configure.ac
  325. * m4/aria2_arg.m4: Added ARIA2_ARG_WITH and ARIA2_ARG_ENABLE, they are
  326. wrapper function for AC_ARG_WITH and AC_ARG_ENABLE respectively.
  327. * m4/libz.m4
  328. * src/Decoder.h
  329. * src/DownloadCommand.cc
  330. * src/DownloadCommand.h
  331. * src/Exception.h
  332. * src/GZipDecoder.cc
  333. * src/GZipDecoder.h
  334. * src/HttpHeader.cc
  335. * src/HttpHeader.h
  336. * src/HttpRequest.cc
  337. * src/HttpRequest.h
  338. * src/HttpResponse.cc
  339. * src/HttpResponse.h
  340. * src/HttpResponseCommand.cc
  341. * src/Makefile.am
  342. * test/GZipDecoderTest.cc
  343. * test/HttpRequestTest.cc
  344. * test/HttpResponseTest.cc
  345. * test/Makefile.am
  346. * test/Makefile.in
  347. * test/gzip_decode_test.gz
  348. 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  349. Clarified usage of -j option.
  350. * src/usage_text.h
  351. 2008-06-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  352. Disabled getting size from the response of RETR.
  353. If SIZE command failed, then disable resuming and segmented downloading.
  354. * src/FtpConnection.cc
  355. * src/FtpConnection.h
  356. * src/FtpNegotiationCommand.cc
  357. * src/FtpNegotiationCommand.h
  358. 2008-06-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  359. Use digits to find first byte of file size, which makes the intention
  360. of the code clearer.
  361. * src/FtpConnection.cc
  362. Don't call validateTotalLength() when size is 0.
  363. * src/FtpNegotiationCommand.cc
  364. 2008-06-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  365. Updated po files.
  366. * po/aria2c.pot
  367. * po/*.gmo
  368. * po/*.po
  369. 2008-06-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  370. Clarified usage text for --split option.
  371. * src/usage_text.h
  372. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  373. Bump up version number to 0.15.0dev. "dev" means "development"
  374. version, which means I started the development of the next release!
  375. * src/configure.ac
  376. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  377. If FTP server returns negative response with REST raw command and
  378. requested range is not 0, throw exception. If requested range is 0,
  379. continue download a file from 0 byte.
  380. * src/FtpNegotiationCommand.cc
  381. * src/FtpNegotiationCommand.h
  382. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  383. Supported FTP server which don't recognize SIZE raw command.
  384. If SIZE raw command is failed, aria2 will try to get file size
  385. from the response of RETR raw command. If both attempts are failed,
  386. then resuming and segmented downloading are disabled.
  387. * src/FtpConnection.cc
  388. * src/FtpConnection.h
  389. * src/FtpNegotiationCommand.cc
  390. * src/FtpNegotiationCommand.h
  391. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  392. * Release 0.14.0+1
  393. 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  394. Bump up version number to 0.14.0+1
  395. * src/configure.ac
  396. 2008-06-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  397. Fixed the code that refers static member variable from non-static
  398. context.
  399. * src/DefaultPeerStorage.cc
  400. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  401. * Release 0.14.0
  402. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  403. Added build test script
  404. * build_test.sh
  405. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  406. Updated ja.po
  407. * src/ja.po
  408. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  409. Bump up version number to 0.14.0
  410. * src/configure.ac
  411. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  412. Updated ja.po and fr.po. Great thanks for french translators and
  413. Sebastien WILLEMIJNS.
  414. * po/fr.po
  415. * po/ja.po
  416. 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  417. Added configure option to enable/disable epoll support.
  418. * configure.ac
  419. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  420. Updated man page.
  421. * doc/aria2c.1.txt
  422. * doc/aria2c.1
  423. * doc/aria2c.1.html
  424. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  425. Added missing default value '5' to the usage of --split option.
  426. * src/HelpItemFactory.cc
  427. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  428. Filled up pieces based on the number of missing blocks, rather than
  429. simplay the number of piece * block length.
  430. * src/BtRequestFactory.h
  431. * src/DefaultBtInteractive.cc
  432. * src/DefaultBtInteractive.h
  433. * src/DefaultBtRequestFactory.cc
  434. * src/DefaultBtRequestFactory.h
  435. * src/Piece.cc
  436. * src/Piece.h
  437. * test/BitfieldManTest.cc
  438. * test/DefaultBtRequestFactoryTest.cc
  439. * test/MockBtRequestFactory.h
  440. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  441. Made _epEvents a member variable.
  442. * src/DownloadEngine.cc
  443. * src/DownloadEngine.h
  444. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  445. Cancel download if http redirect is bounded more than 20 times.
  446. * src/AbstractCommand.cc
  447. * src/HttpSkipResponseCommand.cc
  448. * src/Request.cc
  449. * src/Request.h
  450. * test/RequestTest.cc
  451. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  452. Fixed unhandled exception(removed keyword `new').
  453. * src/SocketCore.cc (initEPOLL)
  454. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  455. Removed visit(const MetaEntry*)
  456. * src/MetaEntryVisitor.h:
  457. Added visit(const Data*),visit(const Dictionary*),visit(const List*)
  458. and made them virtual.
  459. * src/BencodeVisitor.h
  460. * src/BencodeVisitor.cc
  461. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  462. Updated po files.
  463. * po/aria2c.pot
  464. * po/*.po
  465. * po/*.gmo
  466. 2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  467. Moved the call setWriteCheckSocket inside the previous clause to reduce
  468. the number of socket to watch out.
  469. * src/PeerInteractionCommand.cc
  470. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  471. When there is not enough space in disk when writing a chunk of data,
  472. aria2 now prints the message to the console to warn user and aborts
  473. its download. Not all downloads are canceled because some downloads
  474. may use another disk or partition. BUG#1640332
  475. * src/AbstractDiskWriter.cc
  476. * src/PeerAbstractCommand.cc
  477. * src/PeerAbstractCommand.h: Added onFailure() function for override.
  478. * src/PeerInteractionCommand.cc: In onFailure(), call RequestGroup::
  479. setHaltRequested(true) to cancel download.
  480. * src/PeerInteractionCommand.h
  481. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  482. Applied Ross's aria2-0.13.2+1-mingw-5.patch, which changes the type of
  483. socket from int to sock_t as sockets are unsigned in Windows.
  484. For AsyncNameResolver, DownloadEngine, I did additional modification
  485. for the portion of the code changed according to epoll support.
  486. I defined sock_t in a2netcompat.h to use sock_t without including
  487. SocketCore.h.
  488. * src/AsyncNameResolver.cc
  489. * src/AsyncNameResolver.h
  490. * src/DownloadEngine.cc
  491. * src/DownloadEngine.h
  492. * src/SocketCore.cc
  493. * src/SocketCore.h
  494. * src/a2netcompat.h
  495. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  496. Applied Ross's aria2-0.13.2+1-mingw-4.patch. With this change, all
  497. changes in the patch were applied.
  498. * test/DHTConnectionImplTest.cc: Fixed unit test error in MinGW.
  499. * test/DefaultPieceStorageTest.cc: Fixed unit test error in MinGW.
  500. * test/PeerMessageUtilTest.cc: Fixed unit test error in MinGW.
  501. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  502. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this change,
  503. a2io.h and common.h were modified.
  504. * src/a2io.h: Changed seek/stat/tell calls to use 64 bit versions in
  505. MinGW.
  506. * src/common.h: Changed off_t to 64 bit in MinGW.
  507. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  508. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
  509. only a2netcompat.h is modified.
  510. * src/a2netcompat.h: Removed unused getaddrinfo related #define
  511. directives.
  512. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  513. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
  514. only gai_strerror.h is modified.
  515. * src/gai_strerror.h: Fixed gai_strerror() function to report all
  516. winsock errors in MinGW.
  517. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  518. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit, only the
  519. follow sources are applied.
  520. * src/Platform.h: I removed HAVE_WINSOCK2_H directive from Platform.h.
  521. * src/Platform.cc: Moved common setup/teardown code to Platform class.
  522. I moved #endif // HAVE_WINSOCK2_H to the front of #include "DlAbortEx.h"
  523. I included locale.h from Platform.cc.
  524. * src/main.cc: Moved common setup/teardown code to Platform class.
  525. * test/AllTest.cc: Use Platform class.
  526. Set locale to C in AllTest.cc to prevent the messages to be localized.
  527. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  528. Applied Ross's aria2-0.13.2+1-mingw-3.patch.
  529. * test/HttpHeaderTest.cc: Casted to off_t where it should.
  530. * test/HttpRequestTest.cc: Casted to off_t where it should.
  531. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  532. Applied Ross's aria2-0.13.2+1-mingw.patch and
  533. aria2-0.13.2+1-mingw-2.patch.
  534. * src/ConsoleStatCalc.cc: Added HAVE_TERMIOUS_H directive for the
  535. systems which don't have termious.h. I moved the directive inside of
  536. if(isTTY) { ... clause so that line is wiped out without termious.h.
  537. I also removed HAVE_ASCTIME_R clause because asctime_r is provided
  538. anyway.
  539. * src/asctime_r.h
  540. * src/asctime_r.c: Added for the systems don't have asctime_r function.
  541. I added 2nd argument to the prototype declaration.
  542. * src/StringFormat.cc: Get rid of vasprintf.
  543. * src/getaddrinfo.h: Fixed constants.
  544. * configure.ac: Added the check for asctime_r function.
  545. * src/Makefile.am: Added conditional based on HAVE_ASCTIME_R
  546. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  547. Added writable test for Socket when the sending message is in progress.
  548. Usually the sending message is piece message. Without wriable check,
  549. upload latency is dropped to more than 1sec.
  550. * src/PeerInteractionCommand.cc
  551. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  552. Create only requested files and files which shares a piece with
  553. requested file in multi-torrent downloads. Directory structures are
  554. also created in the same rule.
  555. MultiDiskAdaptor::fileExists() now uses FileEntry instead of
  556. DiskWriterEntry as in the previous implementation.
  557. * src/MultiDiskWriter.cc
  558. * src/MultiFileAllocationIterator.cc
  559. * src/MultiFileAllocationIterator.h
  560. * test/MultiFileAllocationIteratorTest.cc
  561. 2008-06-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  562. Commented out -lprofiler
  563. * src/Makefile.am
  564. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  565. Bump up version number to 0.14.0b.
  566. * src/configure.ac
  567. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  568. Actively establish connection to peers in seeding, when peer cache
  569. is not full and max upload speed limit is not reached.
  570. * src/ActivePeerConnectionCommand.cc
  571. * src/ActivePeerConnectionCommand.h
  572. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  573. Always remove a peer from cache in DefaultPeerStorage::returnPeer(),
  574. to make room more fleshy, recently found peers.
  575. Peer::_badConditionStartTime is not used anymore. Consider to remove
  576. it.
  577. * src/DefaultPeerStorage.cc
  578. * test/DefaultPeerStorageTest.cc
  579. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  580. Returns cached data only when the previous receiveHandshake() is called
  581. with peek = true.
  582. * src/PeerConnection.cc (receiveHandshake)
  583. * src/PeerConnection.h (receiveHandshake)
  584. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  585. Changed default value of -s option from 1 to 5.
  586. Also max value of -s option is changed from 5 to 16.
  587. * src/HelpItemFactory.cc
  588. * src/OptionHandlerFactory.cc
  589. * src/option_processing.cc
  590. * src/usage_text.h
  591. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  592. Changed -s options behavior. Now it means the number of connections
  593. made simultaneously in each http/ftp download.
  594. If 1 URL is specified, the behavior is the same with old implementation.
  595. If -s N is given and more than N URLs are specified, first N URLs are
  596. used and remaining URLs are used for backup. If less than N URLs are
  597. specified, some of URLs are used more than once so that totally N
  598. connections are made simultaneously.
  599. * src/main.cc
  600. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  601. Included missing iosfwd or ostream header.
  602. * src/RequestGroupMan.cc
  603. * src/TaggedItem.cc
  604. * src/TaggedItem.h
  605. * src/Util.cc
  606. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  607. * src/HttpHeaderProcessor.cc: Rewritten using std::string as a buffer.
  608. * src/HttpHeaderProcessor.h: Rewritten using std::string as a buffer.
  609. * src/HttpConnection.cc: Included missing sstream.
  610. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  611. Added --bt-max-open-files option.
  612. * src/DefaultPieceStorage.cc
  613. * src/HelpItemFactory.cc
  614. * src/MultiDiskAdaptor.cc
  615. * src/MultiDiskAdaptor.h
  616. * src/OptionHandlerFactory.cc
  617. * src/option_processing.cc
  618. * src/prefs.cc
  619. * src/prefs.h
  620. * src/usage_text.h
  621. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  622. Fixed the bug that aria2 aborts when a path to a directory is given
  623. in command-line.
  624. * src/ProtocolDetector.cc
  625. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  626. Limited the number files opened in each BitTorrent download. The default
  627. value is 100. The option to change this value will be added.
  628. * src/MultiDiskAdaptor.cc
  629. * src/MultiDiskAdaptor.h
  630. * src/MultiFileAllocationIterator.cc
  631. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  632. Fixed the bug that HTTP downloads don't start with old libraries.
  633. * src/HttpHeaderProcessor.cc
  634. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  635. Use empty() instead of size() > 0.
  636. * src/HttpConnection.cc
  637. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  638. Drop connection if the incoming peer ID is the same with localhost's
  639. one. The previous implementation drops connection when incoming peer's
  640. IP address is the same with localhost's one.
  641. * src/PeerListenCommand.cc
  642. * src/DefaultBtInteractive.cc
  643. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  644. Returns cached data without checking whether socket is readable
  645. if the cache is available.
  646. * src/PeerConnection.cc (receiveHandshake)
  647. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  648. Included stdint.h
  649. * src/common.h
  650. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  651. Removed duplicate HAVE_GETTIMEOFDAY
  652. * src/Makefile.am
  653. * src/Makefile.in
  654. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  655. Use interval as a minInterval when minInterval is not supplied.
  656. * src/DefaultBtAnnounce.cc
  657. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  658. Made DEFAULT_ANNOUNCE_INTERVAL 120, so that if first tracker request
  659. attempt is failed, then 2nd attempt get kicked out more quickly.
  660. And it is now static const member of DefaultBtAnnounce.
  661. * src/DefaultBtAnnounce.h
  662. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  663. Renamed BtRuntime::lessThanMinPeers() and BtRuntime::lessThanEqMinPeers.
  664. Made MAX_PEERS and MIN_PEERS static const members of BtRuntime.
  665. * src/ActivePeerConnectionCommand.cc
  666. * src/BtConstants.h
  667. * src/BtRuntime.h
  668. * src/DHTGetPeersCommand.cc
  669. * src/DefaultBtAnnounce.cc
  670. * src/DefaultPeerStorage.cc: Calculate maxPeerListSize based on
  671. BtRuntime::MAX_PEERS.
  672. * src/DefaultPeerStorage.h
  673. * src/InitiatorMSEHandshakeCommand.cc
  674. * src/PeerInitiateConnectionCommand.cc
  675. * src/PeerInteractionCommand.cc
  676. * src/PeerReceiveHandshakeCommand.cc
  677. * src/TrackerWatcherCommand.cc
  678. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  679. Always Connect to _numNewConnection
  680. * src/ActivePeerConnectionCommand.cc
  681. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  682. Made `begin' unsigned int.
  683. * src/GrowSegment.h
  684. * src/Piece.cc
  685. * src/Piece.h
  686. * src/PiecedSegment.cc
  687. * src/PiecedSegment.h
  688. * src/Segment.h
  689. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  690. Calculate piece hash when data is arrived if the data is arrived in
  691. order. This removes additional read operation for hash calculation.
  692. If the data is arrived in out of order, the hash is calucated when the
  693. piece is completed. This is the same behavior as the old implementation.
  694. * src/BtPieceMessage.cc
  695. * src/DefaultBtProgressInfoFile.cc
  696. * src/DefaultPieceStorage.cc
  697. * src/DownloadCommand.cc
  698. * src/DownloadCommand.h
  699. * src/DownloadEngine.cc
  700. * src/GrowSegment.cc
  701. * src/GrowSegment.h
  702. * src/Piece.cc
  703. * src/Piece.h
  704. * src/PiecedSegment.cc
  705. * src/PiecedSegment.h
  706. * src/Segment.h
  707. * test/PieceTest.cc
  708. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  709. Try to keep the ordering of outgoing piece message.
  710. * src/DefaultBtMessageDispatcher.cc
  711. (DefaultBtMessageDispatcher::sendMessages)
  712. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  713. Fixed busy loop when error/hup epoll events occur.
  714. * src/AbstractCommand.cc
  715. * src/PeerAbstractCommand.cc
  716. 2008-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  717. Added --bt-request-peer-speed-limit option, which was a constant
  718. SLOW_SPEED_THRESHOLD.
  719. * src/ActivePeerConnectionCommand.cc
  720. * src/ActivePeerConnectionCommand.h
  721. * src/BtConstants.h
  722. * src/HelpItemFactory.cc
  723. * src/OptionHandlerFactory.cc
  724. * src/PeerReceiveHandshakeCommand.cc
  725. * src/option_processing.cc
  726. * src/prefs.cc
  727. * src/prefs.h
  728. * src/usage_text.h
  729. 2008-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  730. Removed repeated call of getTopDirPath(). Instead, call it once and
  731. cache the result.
  732. * src/MultiDiskAdaptor.cc
  733. * src/MultiDiskAdaptor.h
  734. (mkdir, openFile, initAndOpenFile, openExistingFile)
  735. 2008-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  736. Fixed compile error on debian etch.
  737. The libc6 shipped with debian etch doesn't define ULLONG_MAX properly
  738. even if _GNU_SOURCE is defined. So define ULLONG_MAX in case when
  739. it is undefined.
  740. * src/Util.cc (ULLONG_MAX)
  741. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  742. Added epoll support. Use epoll if it is available. If not, use select.
  743. When async dns is enabled in compile time, epoll support is enabled
  744. only when aria2 is built with c-ares. This condition statement is
  745. defined in a2io.h.
  746. Currently aria2 supports both c-ares and ares, but ares is maintained
  747. for quite a while and debian already has c-ares package, ares support
  748. will be dropped in the future version.
  749. * configure.ac
  750. * src/AbstractCommand.cc
  751. * src/AsyncNameResolver.cc
  752. * src/AsyncNameResolver.h
  753. * src/Command.cc
  754. * src/Command.h
  755. * src/DownloadEngine.cc
  756. * src/DownloadEngine.h
  757. * src/PeerAbstractCommand.cc
  758. * src/SocketCore.cc
  759. * src/SocketCore.h
  760. * src/a2io.h
  761. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  762. * test/MetalinkEntryTest.cc: Added missing `defined' keyword to #if
  763. directive.
  764. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  765. Do not do write operation to /dev/null file.
  766. * src/LogFactory.cc
  767. * src/SimpleLogger.cc
  768. Replaced vasprintf with vsnprintf
  769. * src/SimpleLogger.cc (SimpleLogger::writeLog)
  770. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  771. * src/BtRequestMessage.cc
  772. (BtRequestMessage::onQueue): Given piece to RequestSlot. This is a fix
  773. for segmentation fault caused by previous commit.
  774. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  775. Reduced the usage of gettimeofday().
  776. * src/DefaultBtMessageDispatcher.cc
  777. (DefaultBtMessageDispatcher::checkRequestSlotAndDoNecessaryThing)
  778. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  779. * src/RequestSlot.cc
  780. * src/RequestSlot.h
  781. (RequestSlot::isTimeout)
  782. Made RequestSlot have a reference to Piece object to avoid find
  783. Piece repeatedly.
  784. * src/DefaultBtMessageDispatcher.cc
  785. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  786. * src/RequestSlot.cc
  787. * src/RequestSlot.h
  788. (RequestSlot::getPiece)
  789. * test/DefaultBtMessageDispatcherTest.cc
  790. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  791. * src/TimeA2.cc
  792. * src/TimeA2.h
  793. (Time::difference): New function.
  794. (Time::elapsed): Done optimization.
  795. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  796. * src/HelpItemFactory.cc: Added missing `defined' keyword to #if
  797. directive.
  798. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  799. * src/option_processing.cc: Added missing `defined' keyword to #if
  800. directive.
  801. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  802. Bump up version number to 0.13.2+1
  803. * src/configure.ac
  804. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  805. Refactored broken outstanding piece handling.
  806. * src/DefaultPieceStorage.cc
  807. * src/DefaultPieceStorage.h
  808. * src/Piece.cc
  809. * src/Piece.h
  810. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  811. Fixed compile error on Mac OS X 10.3.9. This error was caused by the
  812. name collision of static variable and predefined macro.
  813. * src/BtContext.cc
  814. * src/BtContext.h
  815. * src/CookieBoxFactory.cc
  816. * src/CookieBoxFactory.h
  817. * src/CookieParser.cc
  818. * src/CookieParser.h
  819. * src/DefaultBtContext.cc
  820. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  821. * src/RequestGroup.cc
  822. (RequestGroup::createInitialCommand): Use empty() instead of size().
  823. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  824. * Release 0.13.2
  825. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  826. Updated fr.po(thanks to Sebastien) and ja.po. ThanksDone make update-po
  827. * po/fr.po
  828. * po/ja.po
  829. * po/aria2c.pot
  830. * po/*.po
  831. * po/*.gmo
  832. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  833. Bump up version number to 0.13.2
  834. * src/configure.ac
  835. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  836. Refactord.
  837. * src/RequestGroupMan.cc
  838. (removeStoppedGroup)
  839. (fillRequestGroupFromReserver)
  840. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  841. Fixed compile error on Ubuntu.
  842. * src/BtPieceMessage.cc
  843. * src/MessageDigestHelper.cc
  844. * src/Util.cc
  845. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  846. Fixed compile error when configured with --disable-bittorrent
  847. * test/DownloadHandlerFactoryTest.cc
  848. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  849. Done make update-po
  850. * po/aria2c.pot
  851. * po/*.po
  852. * po/*.gmo
  853. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  854. Bump up version number to 0.13.2rc.
  855. * src/configure.ac
  856. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  857. Made option name bold. Updated SYNOPSIS to make it more readable.
  858. * doc/aria2c.1.txt
  859. * doc/aria2c.1
  860. * doc/aria2c.1.html
  861. * src/version_usage.cc
  862. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  863. Refactored. Use std::string instead of size and char*.
  864. * Data.cc
  865. * Data.h
  866. * test/Data.cc
  867. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  868. Added trimSelf(). Rewritten trim() to use trimSelf().
  869. * Util.cc
  870. * Util.h
  871. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  872. * src/ChunkChecksum.h (getChecksum): Return const reference.
  873. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  874. Fixed compile error when configured with --disable-metalink.
  875. Also moved test/DownloadHandlerFactoryTest.cc to SRC in Makefile.am.
  876. * test/FeatureConfigTest.cc
  877. * test/DownloadHandlerFactoryTest.cc
  878. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  879. Fixed compile error when configured with --without-gnutls
  880. --without-openssl
  881. * src/main.cc
  882. * test/DefaultBtProgressInfoFileTest.cc
  883. * test/SegmentManTest.cc
  884. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  885. Fixed compile error with OpenSSL.
  886. * src/IteratableChunkChecksumValidator.cc
  887. * src/LibsslDHKeyExchange.h
  888. * src/MessageDigestHelper.cc
  889. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  890. Revert the default value of --max-concurrent-downloads to 5.
  891. Revert the default value of --metalink-servers to 5.
  892. Man pages was also updated.
  893. * src/option_processing.cc
  894. * doc/aria2c.1.txt
  895. * doc/aria2c.1.html
  896. * doc/aria2c.1
  897. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  898. Returns const reference:
  899. DownloadContext::getPieceHash, DownloadContext::getName,
  900. DownloadContext::getPieceHashAlgo, DownloadContext::getDir,
  901. BtContext::getInfoHashAsString,
  902. * src/BtContext.h
  903. * src/DefaultBtContext.cc
  904. * src/DefaultBtContext.h
  905. * src/DownloadContext.h
  906. * src/SingleFileDownloadContext.h
  907. * test/MockBtContext.h
  908. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  909. * src/RequestGroup.h (getDir): Removed.
  910. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  911. Returns const reference. The internal urlencode function was optimized
  912. a little bit.
  913. * src/Request.cc
  914. * src/Request.h
  915. * src/HttpRequest.cc
  916. * src/HttpRequest.h
  917. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  918. Defined option name and possible values as std::string to reduce
  919. temporary string object creation in runtime.
  920. * src/HelpItemFactory.cc
  921. * src/LogFactory.cc
  922. * src/Option.cc
  923. * src/OptionHandlerFactory.cc
  924. * src/option_processing.cc
  925. * src/prefs.cc
  926. * src/prefs.h
  927. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  928. Return const reference.
  929. * src/DownloadHandlerConstants.cc
  930. * src/DownloadHandlerConstants.h
  931. (getMetalinkExtensions)
  932. (getMetalinkContentTypes)
  933. (getBtExtensions)
  934. (getBtContentTypes)
  935. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  936. * src/HttpHeader.cc (get): Rewritten.
  937. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  938. Make HttpHeader::getFirst(...) return const reference.
  939. * src/HttpHeader.cc
  940. * src/HttpHeader.h
  941. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  942. Use Option::getAsBool(...) instead of Option::get(...) and compare
  943. it with V_TRUE.
  944. * src/DefaultPieceStorage.cc
  945. * src/DownloadCommand.cc
  946. * src/FtpNegotiationCommand.cc
  947. * src/HttpRequest.cc
  948. * src/InitiateConnectionCommand.cc
  949. * src/RequestGroup.cc
  950. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  951. Made Option::get(...) return const reference of std::string.
  952. * src/Option.cc
  953. * src/Option.h
  954. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  955. Replaced std:copy with insert.
  956. * src/DefaultBtMessageDispatcher.cc
  957. * src/DefaultPieceStorage.cc
  958. * src/DownloadEngineFactory.cc
  959. * src/RequestGroup.cc
  960. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  961. Included SocketCore.h to fix compiler warning.
  962. * src/InitiateConnectionCommand.cc
  963. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  964. Put piece selection strategy algorithm to RarestPieceSelector class,
  965. Added a switch to choose whether randomized selection so that unit
  966. tests emit same results in, possibly, win32.
  967. * src/DefaultPieceStorage.cc
  968. * src/DefaultPieceStorage.h
  969. * src/RarestPieceSelector.cc
  970. * src/RarestPieceSelector.h
  971. * test/DefaultPieceStorageTest.cc
  972. * test/RarestPieceSelectorTest.cc
  973. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  974. Don't pool connection if HTTP proxy is enabled.
  975. * src/FtpFinishDownloadCommand.cc
  976. * src/FtpNegotiationCommand.cc
  977. * src/HttpSkipResponseCommand.cc
  978. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  979. Don't add closed socket to DownloadEngine::addSocketForReadCheck()
  980. * src/AbstractCommand.cc
  981. * src/AbstractCommand.h
  982. * src/ActivePeerConnectionCommand.cc
  983. * src/FtpInitiateConnectionCommand.cc
  984. * src/HttpInitiateConnectionCommand.cc
  985. * src/InitiateConnectionCommandFactory.cc
  986. * src/PeerAbstractCommand.cc
  987. * src/PeerAbstractCommand.h
  988. * src/PeerInitiateConnectionCommand.cc
  989. * src/TrackerWatcherCommand.cc
  990. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  991. Sort RequestSlot in ascending order and manipulate them using
  992. lower_bound.
  993. * src/DefaultBtMessageDispatcher.cc
  994. * src/DefaultBtMessageDispatcher.h
  995. (getMessageQueue): Added const qualifier.
  996. (getRequestSlots): Added const qualifier.
  997. (sendMessages): Use empty() instead of size().
  998. (doCancelSendingPieceAction): Use HandleEvent object.
  999. (doAbortOutstandingRequestAction): Rewritten.
  1000. (doChokedAction): Rewritten.
  1001. (checkRequestSlotAndDoNecessaryThing): Rewritten.
  1002. (isOutstandingRequest): Rewritten.
  1003. (getOutstandingRequest): Rewritten.
  1004. (removeOutstandingRequest): Rewritten.
  1005. (addOutstandingRequest): Rewritten.
  1006. * src/RequestSlot.cc
  1007. * src/RequestSlot.h
  1008. (operator=): Rewritten.
  1009. (operator!=): New function.
  1010. (operator<): New function.
  1011. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1012. * src/DefaultBtRequestFactory.cc
  1013. (doChokedAction): Rewritten.
  1014. (removeCompletedPiece): Rewritten.
  1015. (removeTargetPiece): Rewritten.
  1016. (createRequestMessages): Added the debug log.
  1017. (createRequestMessagesOnEndGame: Added the debug log.
  1018. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1019. Added the debug log message.
  1020. * src/BtPieceMessage.cc (doReceivedAction)
  1021. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1022. Sorted DHTPeerAnnounceEntry in a ascending order of info hash and
  1023. used lower_bound to process them rather than linear search.
  1024. * src/DHTPeerAnnounceStorage.cc
  1025. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1026. Call subtractPieceStats from ~PeerInteractionCommand only when the
  1027. peer has at least one completed piece.
  1028. * src/Peer.cc
  1029. * src/Peer.h
  1030. * src/PeerInteractionCommand.cc
  1031. * src/PeerSessionResource.cc
  1032. * src/PeerSessionResource.h
  1033. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1034. Removed unnecessary sorting
  1035. * src/DefaultPieceStorage (DefaultPieceStorage)
  1036. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1037. Rewritten the portion of the code that mangaes allowed fast indexes.
  1038. * src/PeerSessionResource.cc
  1039. * src/PeerSessionResource.h
  1040. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1041. Removed the invalid string including '\r' from ru.po and
  1042. did make update-po.
  1043. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1044. Added --log-level and --summary-interval to man page.
  1045. * doc/aria2c.1.txt
  1046. * doc/aria2c.1.html
  1047. * doc/aria2c.1
  1048. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1049. Added --log-level option to specify log level. Log messages under
  1050. the specified level are not output. Default value is `debug'.
  1051. * src/HelpItemFactory.cc
  1052. * src/LogFactory.cc
  1053. * src/LogFactory.h
  1054. * src/Logger.h
  1055. * src/OptionHandlerFactory.cc
  1056. * src/SimpleLogger.cc
  1057. * src/SimpleLogger.h
  1058. * src/main.cc
  1059. * src/option_processing.cc
  1060. * src/prefs.h
  1061. * src/usage_text.h
  1062. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1063. Print download progress summary of all parallel downloads in specified
  1064. interval, default 60 secs. While aria2 could download several files
  1065. in parallel (see -j option), it displayed just first download progress,
  1066. and the other downloads are hidden from the users. This new feature
  1067. prints all downloads currently in-progress to the console so that you
  1068. can check the status of all downloads. The interval can be adjusted
  1069. by --summary-interval option.
  1070. The progress readout is now cut so that all fits in the one line of
  1071. console.
  1072. * src/ConsoleStatCalc.cc
  1073. * src/ConsoleStatCalc.h
  1074. * src/HelpItemFactory.cc
  1075. * src/OptionHandlerFactory.cc
  1076. * src/RequestGroupMan.cc
  1077. * src/RequestGroupMan.h
  1078. * src/main.cc
  1079. * src/option_processing.cc
  1080. * src/prefs.h
  1081. * src/usage_text.h
  1082. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1083. Call updateFdSet() to initialize rfdset, wfdset fdmax.
  1084. * src/DownloadEngine.cc (DownloadEngine)
  1085. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1086. Use free() to deallocate memory for _buffer if HAVE_POSIX_MEMALIGN is
  1087. defined.
  1088. * src/SingleFileAllocationIterator.cc (~SingleFileAllocationIterator)
  1089. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1090. Use erase+lower_bound+insert instead of sort.
  1091. * src/DefaultPieceStorage.cc (addPieceStats)
  1092. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1093. Use A2STR::SHARP_C and A2STR::EQUAL_C.
  1094. * src/A2STR.cc
  1095. * src/A2STR.h
  1096. * src/OptionParser.cc (parse)
  1097. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1098. Defined fake filename `[tracker.announce]' as static const std::string.
  1099. * src/TrackerWatcherCommand.cc (createRequestGroup)
  1100. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1101. Defined default filename `index.html' as static const std::string
  1102. * src/SingleFileDownloadContext.cc
  1103. * src/SingleFileDownloadContext.h
  1104. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1105. Defined "[MEMORY]" as static const std::string.
  1106. * src/MemoryBufferPreDownloadHandler.cc (execute)
  1107. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1108. Defined control file's version number as static const std::string.
  1109. * src/DefaultBtProgressInfoFile.cc
  1110. * src/DefaultBtProgressInfoFile.h
  1111. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1112. Use Request::METHOD_GET
  1113. * src/RequestGroup.cc (createNextCommandWithAdj)
  1114. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1115. Defined "OK", "ERR", "INPR" as static const std::string
  1116. * src/RequestGroupMan.cc (showDownloadResults)
  1117. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1118. Defined default client used in extended handshake as static const
  1119. std::string
  1120. * src/DefaultBtInteractive.cc (addHandshakeExtendedMessageToQueue)
  1121. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1122. Defined AUTH_HEADER, PROXY_AUTH_HEADER as static const std::string
  1123. * src/HttpConnection.cc (eraseConfidentialInfo)
  1124. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1125. Defined default ftp user and password as static const std::string
  1126. * src/AuthConfigFactory.cc
  1127. * src/AuthConfigFactory.h
  1128. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1129. Defined strings used in netrc as static const std::string
  1130. * src/Netrc.cc
  1131. * src/Netrc.h
  1132. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1133. Defined HTTP status as static const std::string
  1134. * src/AbstractProxyResponseCommand.cc
  1135. * src/HttpHeader.cc
  1136. * src/HttpHeader.h
  1137. * src/HttpResponse.cc
  1138. * src/HttpResponseCommand.cc
  1139. * src/HttpSkipResponseCommand.cc
  1140. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1141. Defined "\r\n", "A", "I" as static const std::string
  1142. * src/A2STR.cc
  1143. * src/A2STR.h
  1144. * src/FtpConnection.cc
  1145. * src/FtpConnection.h
  1146. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1147. Added COLON_C(".") and used it in Request::parseUrl()
  1148. * src/A2STR.cc
  1149. * src/A2STR.h
  1150. * src/Request.cc (parseUrl)
  1151. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1152. Changed the type of padName from `const std::string&' to `const char*'.
  1153. * src/MSEHandshake.cc (verifyPadLength)
  1154. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1155. Defined "sha1" as static const std::string.
  1156. * src/MetalinkParserController.cc
  1157. * src/MetalinkParserController.h
  1158. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1159. Defined message digest algorithm name as static const std::string
  1160. * src/DHTTokenTracker.cc
  1161. * src/DHTUtil.cc
  1162. * src/DefaultBtContext.cc
  1163. * src/MSEHandshake.cc
  1164. * src/MessageDigestHelper.cc
  1165. * src/Peer.cc
  1166. * src/messageDigest.cc
  1167. * src/messageDigest.h
  1168. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1169. Made string literals used in SAX parser static const std::string.
  1170. * src/FileMetalinkParserState.cc
  1171. * src/FileMetalinkParserState.h
  1172. * src/FilesMetalinkParserState.cc
  1173. * src/FilesMetalinkParserState.h
  1174. * src/InitialMetalinkParserState.cc
  1175. * src/InitialMetalinkParserState.h
  1176. * src/MetalinkMetalinkParserState.cc
  1177. * src/MetalinkMetalinkParserState.h
  1178. * src/PiecesMetalinkParserState.cc
  1179. * src/PiecesMetalinkParserState.h
  1180. * src/ResourcesMetalinkParserState.cc
  1181. * src/ResourcesMetalinkParserState.h
  1182. * src/VerificationMetalinkParserState.cc
  1183. * src/VerificationMetalinkParserState.h
  1184. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1185. Use A2STR::SLASH_C, A2STR::DOT_C instead of "/", "." respectively.
  1186. * src/A2STR.cc
  1187. * src/A2STR.h
  1188. * src/File.cc
  1189. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1190. Defined static const std::string IP("ip"), PORT("port") and use them
  1191. instead of string literals.
  1192. * src/DefaultPeerListProcessor.cc
  1193. * src/DefaultPeerListProcessor.h
  1194. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1195. Made string literals for torrent file processing static const
  1196. std::string.
  1197. * src/BtContext.cc
  1198. * src/BtContext.h
  1199. * src/DefaultBtContext.cc
  1200. * src/DefaultBtContext.h
  1201. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1202. Made string literal for tracker response static const std::string
  1203. * src/BtAnnounce.cc
  1204. * src/BtAnnounce.h
  1205. * src/DefaultBtAnnounce.cc
  1206. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1207. Use DHTMessage::T instead of "t".
  1208. * src/DHTMessageTracker.cc (messageArrived)
  1209. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1210. Made keyName static const. Made trimmed charset static const
  1211. std::string.
  1212. * src/Util.cc (getContentDispositionFilename)
  1213. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1214. Made USER_AGENT const. Made "/" static const std::string.
  1215. * src/A2STR.cc
  1216. * src/A2STR.h
  1217. * src/HttpRequest.cc
  1218. * src/HttpRequest.h
  1219. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1220. Made string listeral to static const std::string:
  1221. "Content-Range", "Content-Length"
  1222. * src/HttpHeader.cc
  1223. * src/HttpHeader.h
  1224. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1225. Made string listeral to static const std::string.
  1226. * src/HttpConnection.cc
  1227. * src/HttpHeader.cc
  1228. * src/HttpHeader.h
  1229. * src/HttpResponse.cc
  1230. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1231. Made string listeral to static const std::string.
  1232. * src/A2STR.cc
  1233. * src/A2STR.h
  1234. * src/SimpleLogger.cc
  1235. * src/SimpleLogger.h
  1236. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1237. Made string literal to static const std::string.
  1238. Rewritten CookieParser::setField.
  1239. * src/A2STR.cc
  1240. * src/A2STR.h
  1241. * src/CookieBoxFactory.cc
  1242. * src/CookieBoxFactory.h
  1243. * src/CookieParser.cc
  1244. * src/CookieParser.h
  1245. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1246. Made string literal to static const std::string
  1247. * src/DHTAbstractMessage.cc
  1248. * src/DHTAnnouncePeerMessage.cc
  1249. * src/DHTAnnouncePeerMessage.h
  1250. * src/DHTAnnouncePeerReplyMessage.cc
  1251. * src/DHTAnnouncePeerReplyMessage.h
  1252. * src/DHTFindNodeMessage.cc
  1253. * src/DHTFindNodeMessage.h
  1254. * src/DHTFindNodeReplyMessage.cc
  1255. * src/DHTFindNodeReplyMessage.h
  1256. * src/DHTGetPeersMessage.cc
  1257. * src/DHTGetPeersMessage.h
  1258. * src/DHTGetPeersReplyMessage.cc
  1259. * src/DHTGetPeersReplyMessage.h
  1260. * src/DHTMessage.cc
  1261. * src/DHTMessage.h
  1262. * src/DHTMessageFactoryImpl.cc
  1263. * src/DHTMessageReceiver.cc
  1264. * src/DHTPingMessage.cc
  1265. * src/DHTPingMessage.h
  1266. * src/DHTPingReplyMessage.cc
  1267. * src/DHTPingReplyMessage.h
  1268. * src/DHTQueryMessage.cc
  1269. * src/DHTQueryMessage.h
  1270. * src/DHTResponseMessage.cc
  1271. * src/DHTResponseMessage.h
  1272. * src/DHTUnknownMessage.cc
  1273. * src/DHTUnknownMessage.h
  1274. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1275. Made string literal to static const std::string
  1276. * src/BtChokeMessage.cc (toString)
  1277. * src/BtHaveAllMessage.cc (toString)
  1278. * src/BtHaveNoneMessage.cc (toString)
  1279. * src/BtInterestedMessage.cc (toString)
  1280. * src/BtNotInterestedMessage.cc (toString)
  1281. * src/BtUnchokeMessage.cc (toString)
  1282. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1283. Replaced "" with static const variable A2STR::NIL.
  1284. Replaced string comparison against "" with std::string::empty().
  1285. Added PROTO_* to Request class and use them as a protocol string
  1286. constant.
  1287. Made "started", "stopped", "completed" static const variable in
  1288. AnnounceList class.
  1289. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1290. Updated translations. Great thanks to translators.
  1291. * po/ca.po
  1292. * po/de.po
  1293. * po/fr.po
  1294. * po/it.po
  1295. * po/ja.po
  1296. * po/ru.po
  1297. * po/zh_CN.po
  1298. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1299. Updated man page; categorized options and fixed typo.
  1300. * doc/aria2c.1.txt
  1301. * doc/aria2c.1.html
  1302. * doc/aria2c.1
  1303. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1304. Removed const ref
  1305. * src/MetalinkEntry.cc (AddProtocolPreference)
  1306. * src/RequestGroup.cc (FindServerHostByHostname)
  1307. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1308. Rewritten Accept-Features handling.
  1309. * src/HttpRequestCommand.cc (createHttpRequest)
  1310. * src/a2functional.h
  1311. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1312. Changed method signature:
  1313. DHTAbstractNodeLookupTask::toEntries
  1314. * src/DHTAbstractNodeLookupTask.cc
  1315. * src/DHTAbstractNodeLookupTask.h
  1316. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1317. Changed method signature:
  1318. BtContext::computeFastSet, DefaultBtContext::extractUrlList
  1319. * src/BtContext.h
  1320. * src/DefaultBtContext.cc
  1321. * src/DefaultBtContext.h
  1322. * src/DefaultBtInteractive.cc
  1323. * test/DefaultBtContextTest.cc
  1324. * test/MockBtContext.h
  1325. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1326. Changed method signature:
  1327. MultiFileAllocationIterator::makeDiskWriterEntries
  1328. * src/MultiFileAllocationIterator.cc
  1329. * src/MultiFileAllocationIterator.h
  1330. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1331. Changed method sinature:
  1332. MetalinkEntry::toFileEntry,
  1333. MetalinkHelper::query, MetalinkHelper::parseAndQuery,
  1334. Metalinker::queryEntry
  1335. * src/Metalink2RequestGroup.cc
  1336. * src/MetalinkEntry.cc
  1337. * src/MetalinkEntry.h
  1338. * src/MetalinkHelper.cc
  1339. * src/MetalinkHelper.h
  1340. * src/Metalinker.cc
  1341. * src/Metalinker.h
  1342. * src/main.cc
  1343. * test/MetalinkHelperTest.cc
  1344. * test/MetalinkerTest.cc
  1345. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1346. Changed method sinature:
  1347. RequestGroup::getURIs
  1348. * src/RequestGroup.cc
  1349. * src/RequestGroup.h
  1350. * test/Metalink2RequestGroupTest.cc
  1351. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1352. Changed method signature:
  1353. PeerListProcessor::extractPeer
  1354. * src/CompactPeerListProcessor.cc
  1355. * src/CompactPeerListProcessor.h
  1356. * src/DefaultBtAnnounce.cc
  1357. * src/DefaultPeerListProcessor.cc
  1358. * src/DefaultPeerListProcessor.h
  1359. * src/DelegatingPeerListProcessor.cc
  1360. * src/DelegatingPeerListProcessor.h
  1361. * src/PeerListProcessor.h
  1362. * src/UTPexExtensionMessage.cc
  1363. * test/DefaultPeerListProcessorTest.cc
  1364. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1365. Changed method signature:
  1366. BtRequestFactory::createRequestMessages,
  1367. BtRequestFactory::createRequestMessagesOnEndGame
  1368. * src/BtRequestFactory.h
  1369. * src/DefaultBtInteractive.cc
  1370. * src/DefaultBtRequestFactory.cc
  1371. * src/DefaultBtRequestFactory.h
  1372. * test/DefaultBtRequestFactoryTest.cc
  1373. * test/MockBtRequestFactory.h
  1374. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1375. Changed method signature:
  1376. PieceStorage::getInFlightPieces
  1377. * src/DefaultBtProgressInfoFile.cc
  1378. * src/DefaultPieceStorage.cc
  1379. * src/DefaultPieceStorage.h
  1380. * src/PieceStorage.h
  1381. * src/UnknownLengthPieceStorage.cc
  1382. * src/UnknownLengthPieceStorage.h
  1383. * test/DefaultBtProgressInfoFileTest.cc
  1384. * test/MockPieceStorage.h
  1385. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1386. Changed method signature:
  1387. PostDownloadHandler::getNextRequestGroups
  1388. Metalink2RequestGroup::generate
  1389. RequestGroup::postDownloadProcessing
  1390. * src/BtPostDownloadHandler.cc
  1391. * src/BtPostDownloadHandler.h
  1392. * src/Metalink2RequestGroup.cc
  1393. * src/Metalink2RequestGroup.h
  1394. * src/MetalinkPostDownloadHandler.cc
  1395. * src/MetalinkPostDownloadHandler.h
  1396. * src/PostDownloadHandler.h
  1397. * src/RequestGroup.cc
  1398. * src/RequestGroup.h
  1399. * src/RequestGroupMan.cc
  1400. * src/main.cc
  1401. * test/BtPostDownloadHandlerTest.cc
  1402. * test/Metalink2RequestGroupTest.cc
  1403. * test/MetalinkPostDownloadHandlerTest.cc
  1404. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1405. Rewritten AccRequestGroup
  1406. * src/main.cc
  1407. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1408. Rewritten.
  1409. * src/TaggedItem.cc (toTagString)
  1410. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1411. Rewritten Accept-Features handling.
  1412. * src/HttpRequestCommand.cc (createHttpRequest)
  1413. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1414. Rewritten accept types handling.
  1415. * HttpRequest.cc (createRequest)
  1416. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1417. Rewritten
  1418. * src/FeatureConfig.cc (featureSummary)
  1419. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1420. Changed method signature:
  1421. PeerStorage::getActivePeers
  1422. * src/DHTPeerAnnounceEntry.cc
  1423. * src/DefaultPeerStorage.cc
  1424. * src/DefaultPeerStorage.h
  1425. * src/PeerStorage.h
  1426. * test/DefaultPeerStorageTest.cc
  1427. * test/MockPeerStorage.h
  1428. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1429. Changed method signature:
  1430. DHTPeerAnnounceStorage::getPeers,
  1431. DHTPeerAnnounceEntry::getPeers
  1432. * src/DHTGetPeersMessage.cc
  1433. * src/DHTPeerAnnounceEntry.cc
  1434. * src/DHTPeerAnnounceEntry.h
  1435. * src/DHTPeerAnnounceStorage.cc
  1436. * src/DHTPeerAnnounceStorage.h
  1437. * test/DHTAnnouncePeerMessageTest.cc
  1438. * test/DHTPeerAnnounceEntryTest.cc
  1439. * test/DHTPeerAnnounceStorageTest.cc
  1440. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1441. Changed method signature:
  1442. NameResolver::resolve
  1443. * src/DHTEntryPointNameResolveCommand.cc
  1444. * src/InitiateConnectionCommand.cc
  1445. * src/NameResolver.cc
  1446. * src/NameResolver.h
  1447. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1448. Changed method signature:
  1449. PieceStorage::getAdvertisedPieceIndexes
  1450. * src/DefaultBtInteractive.cc
  1451. * src/DefaultPieceStorage.cc
  1452. * src/DefaultPieceStorage.h
  1453. * src/PieceStorage.h
  1454. * src/UnknownLengthPieceStorage.h
  1455. * test/MockPieceStorage.h
  1456. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1457. Changed method signature:
  1458. SegmentMan::getInFlightSegment
  1459. * src/AbstractCommand.cc
  1460. * src/SegmentMan.cc
  1461. * src/SegmentMan.h
  1462. * test/SegmentManTest.cc
  1463. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1464. Changed method signature:
  1465. DHTAbstractNodeLookupTask::getNodesFromMessage
  1466. * src/DHTAbstractNodeLookupTask.cc
  1467. * src/DHTAbstractNodeLookupTask.h
  1468. * src/DHTNodeLookupTask.cc
  1469. * src/DHTNodeLookupTask.h
  1470. * src/DHTPeerLookupTask.cc
  1471. * src/DHTPeerLookupTask.h
  1472. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1473. Pass std::deque<Command*> by reference to avoid unnecessary coping.
  1474. * src/AbstractCommand.cc
  1475. * src/BtCheckIntegrityEntry.cc
  1476. * src/BtCheckIntegrityEntry.h
  1477. * src/BtFileAllocationEntry.cc
  1478. * src/BtFileAllocationEntry.h
  1479. * src/BtSetup.cc
  1480. * src/BtSetup.h
  1481. * src/CheckIntegrityCommand.cc
  1482. * src/CheckIntegrityEntry.h
  1483. * src/ChecksumCheckIntegrityEntry.cc
  1484. * src/ChecksumCheckIntegrityEntry.h
  1485. * src/DHTSetup.cc
  1486. * src/DHTSetup.h
  1487. * src/DownloadEngine.cc
  1488. * src/FileAllocationCommand.cc
  1489. * src/FileAllocationEntry.h
  1490. * src/RequestGroup.cc
  1491. * src/RequestGroup.h
  1492. * src/RequestGroupMan.cc
  1493. * src/RequestGroupMan.h
  1494. * src/StreamCheckIntegrityEntry.cc
  1495. * src/StreamCheckIntegrityEntry.h
  1496. * src/StreamFileAllocationEntry.cc
  1497. * src/StreamFileAllocationEntry.h
  1498. * src/TrackerWatcherCommand.cc
  1499. * src/a2functional.h
  1500. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1501. Changed method signature:
  1502. BNode::findClosestKNodes, BNode:: enumerateBucket,
  1503. DHTBucket::getGoodNodes,
  1504. DHTRoutingTable::getClosestKNodes, DHTRoutingTable::getBuckets
  1505. * src/BNode.cc
  1506. * src/BNode.h
  1507. * src/DHTAbstractNodeLookupTask.cc
  1508. * src/DHTAutoSaveCommand.cc
  1509. * src/DHTBucket.cc
  1510. * src/DHTBucket.h
  1511. * src/DHTBucketRefreshTask.cc
  1512. * src/DHTFindNodeMessage.cc
  1513. * src/DHTGetPeersMessage.cc
  1514. * src/DHTRoutingTable.cc
  1515. * src/DHTRoutingTable.h
  1516. * test/BNodeTest.cc
  1517. * test/DHTBucketTest.cc
  1518. * test/DHTRoutingTableTest.cc
  1519. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1520. In piece selection functions, Pass std::deque<...> by reference rather
  1521. than returning it.
  1522. * src/BitfieldMan.cc
  1523. * src/BitfieldMan.h
  1524. * src/DefaultBtRequestFactory.cc
  1525. * src/DefaultPieceStorage.cc
  1526. * src/Piece.cc
  1527. * src/Piece.h
  1528. * test/BitfieldManTest.cc
  1529. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1530. Implemented rarest piece first piece selection strategy.
  1531. * src/AbstractBtMessage.cc
  1532. * src/AbstractBtMessage.h
  1533. * src/BitfieldMan.cc
  1534. * src/BitfieldMan.h
  1535. * src/BtBitfieldMessage.cc
  1536. * src/BtHaveAllMessage.cc
  1537. * src/BtHaveMessage.cc
  1538. * src/DefaultPieceStorage.cc
  1539. * src/DefaultPieceStorage.h
  1540. * src/PeerInteractionCommand.cc
  1541. * src/PieceStorage.h
  1542. * src/UnknownLengthPieceStorage.h
  1543. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1544. Rewritten readData and writeData.
  1545. * src/MultiDiskAdaptor.cc
  1546. * src/MultiDiskAdaptor.h
  1547. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1548. Move \n out of the message "Usage: ...".
  1549. * src/version_usage.cc
  1550. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1551. Bump up version number to 0.13.2b.
  1552. * configure.ac
  1553. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1554. Added const qualifier to argument Exception& e.
  1555. * src/Logger.h
  1556. * src/SimpleLogger.cc
  1557. * src/SimpleLogger.h
  1558. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1559. Pool connection when CWD, SIZE command fails.
  1560. * src/FtpNegotiationCommand.cc
  1561. * src/FtpNegotiationCommand.h
  1562. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1563. Renamed HttpNullDownloadCommand as HttpSkipResponseCommand
  1564. * src/HttpResponseCommand.cc
  1565. * src/HttpSkipResponseCommand.cc
  1566. * src/HttpSkipResponseCommand.h
  1567. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1568. Pool connection when a server returns 4xx, 5xx responses.
  1569. * src/HttpNullDownloadCommand.cc
  1570. * src/HttpNullDownloadCommand.h
  1571. * src/HttpResponse.cc
  1572. * src/HttpResponse.h
  1573. * src/HttpResponseCommand.cc
  1574. * src/HttpResponseCommand.h
  1575. * test/HttpResponseTest.cc
  1576. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1577. Print usage when no URL is specifed or bad command-line option is
  1578. specified.
  1579. * src/HelpItemFactory.cc
  1580. * src/help_tags.h
  1581. * src/option_processing.cc
  1582. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1583. Removed duplicate log message.
  1584. * src/AbstractCommand.cc (asyncResolveHostname)
  1585. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1586. Updated man page: --async-dns and --ftp-reuse-connection were added.
  1587. Changed -j option's default value from 5 to 1.
  1588. Added new examples using protocol auto detection feature.
  1589. Removed -T, -M usage where it can be omitted.
  1590. * doc/aria2c.1.txt
  1591. * doc/aria2c.1.html
  1592. * doc/aria2c.1.txt
  1593. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1594. Updated command-line usage text, so that it tells users that they
  1595. can specify any number of torrent files and metalink files in
  1596. command-line.
  1597. * src/version_usage.cc
  1598. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1599. Changed the default value of -j option to 1.
  1600. * src/HelpItemFactory.cc
  1601. * src/option_processing.cc
  1602. * src/usage_text.h
  1603. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1604. Added the ability to reuse connection in FTP and it is enabled by
  1605. default. It can be disabled by --ftp-reuse-connection=false option.
  1606. * src/Command.cc
  1607. * src/DownloadCommand.cc
  1608. * src/FtpDownloadCommand.cc
  1609. * src/FtpDownloadCommand.h
  1610. * src/FtpFinishDownloadCommand.cc
  1611. * src/FtpFinishDownloadCommand.h
  1612. * src/FtpInitiateConnectionCommand.cc
  1613. * src/FtpNegotiationCommand.cc
  1614. * src/FtpNegotiationCommand.h
  1615. * src/HelpItemFactory.cc
  1616. * src/Makefile.am
  1617. * src/Makefile.in
  1618. * src/OptionHandlerFactory.cc
  1619. * src/option_processing.cc
  1620. * src/prefs.h
  1621. * src/usage_text.h
  1622. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1623. Call Command::transitStatus() before calling Command::execute(),
  1624. so that the status change made in execute() is not cleared.
  1625. * src/DownloadEngine.cc
  1626. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1627. Removed forward declaration of SocketCore class.
  1628. * src/HttpDownloadCommand.h
  1629. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1630. Set Request::setKeepAliveHint() and Request::setPipeliningHint()
  1631. in InitiateConnectionCommandFactory. They should be set only when
  1632. the protocol is HTTP or HTTPS.
  1633. * src/InitiateConnectionCommandFactory.cc
  1634. * src/RequestGroup.cc
  1635. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1636. Fixed infinite loop in checksum checking.
  1637. * src/IteratableChecksumValidator.cc
  1638. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1639. Set _supportsPersistentConnection to true by default.
  1640. * src/Request.cc
  1641. * src/RequestGroup.cc
  1642. * test/HttpRequestTest.cc
  1643. * test/RequestTest.cc
  1644. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1645. Added timeout to socket pool. The default timeout is 15 seconds,
  1646. which is the same value Apache uses.
  1647. * src/DownloadEngine.cc
  1648. * src/DownloadEngine.h
  1649. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1650. Fixed misuse of multimap::find()
  1651. * src/HttpHeader.cc
  1652. * test/HttpHeaderTest.cc
  1653. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1654. Rewritten name resolver. Now async DNS can be disabled by --async-dns
  1655. option.
  1656. The asynchronous DNS is not capable of IPv6 yet.
  1657. By disabling asynchronous DNS, aria2 is IPv6 enabled application, at
  1658. least for HTTP download.
  1659. * src/AbstractCommand.cc
  1660. * src/AbstractCommand.h
  1661. * src/AsyncNameResolver.cc
  1662. * src/AsyncNameResolver.h
  1663. * src/DHTEntryPointNameResolveCommand.cc
  1664. * src/DHTEntryPointNameResolveCommand.h
  1665. * src/DownloadEngine.cc
  1666. * src/DownloadEngine.h
  1667. * src/FtpInitiateConnectionCommand.cc
  1668. * src/FtpInitiateConnectionCommand.h
  1669. * src/HelpItemFactory.cc
  1670. * src/HttpInitiateConnectionCommand.cc
  1671. * src/HttpInitiateConnectionCommand.h
  1672. * src/InitiateConnectionCommand.cc
  1673. * src/InitiateConnectionCommand.h
  1674. * src/Makefile.am
  1675. * src/Makefile.in
  1676. * src/NameResolver.cc
  1677. * src/NameResolver.h
  1678. * src/OptionHandlerFactory.cc
  1679. * src/SocketCore.cc
  1680. * src/SocketCore.h
  1681. * src/Util.cc
  1682. * src/Util.h
  1683. * src/option_processing.cc
  1684. * src/prefs.h
  1685. * src/usage_text.h
  1686. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1687. Updated man page: --quiet, --header were added.
  1688. --metalink-servers and --enable-http-keep-alive option were updated.
  1689. * doc/aria2c.1
  1690. * doc/aria2c.1.html
  1691. * doc/aria2c.1.txt
  1692. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1693. Enable HTTP keep-alive by default.
  1694. * src/HelpItemFactory.cc
  1695. * src/option_processing.cc
  1696. * src/usage_text.h
  1697. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1698. Disable http keep-alive if the remote server is not HTTP/1.1.
  1699. * src/HttpConnection.cc
  1700. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1701. Receive content body of 302 response so that the connection can be
  1702. reused later when http keep-alive is enabled.
  1703. * src/HttpNullDownloadCommand.cc
  1704. * src/HttpNullDownloadCommand.h
  1705. * src/HttpResponseCommand.cc
  1706. * src/HttpResponseCommand.h
  1707. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1708. const SharedHandle<Request> -> const SharedHandle<Request>&
  1709. * src/FtpDowndloadCommand.cc
  1710. * src/FtpDowndloadCommand.h
  1711. * src/HttpDownloadCommand.cc
  1712. * src/HttpDownloadCommand.h
  1713. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1714. Fixed the bug that the control file(.aria2 file) is not renamed
  1715. according to tryAutoFileRenaming().
  1716. tryAutoFileRenaming() was rewritten so that if both renamed file and
  1717. its control file exist, use them and continue download.
  1718. The old implementation didn't take into account of control file's
  1719. existence, so basically you couldn't continue download of renamed file.
  1720. * src/BtProgressInfoFile.h
  1721. * src/DefaultBtProgressInfoFile.cc
  1722. * src/DefaultBtProgressInfoFile.h
  1723. * src/NullProgressInfoFile.h
  1724. * src/RequestGroup.cc
  1725. * test/DefaultBtProgressInfoFileTest.cc
  1726. * test/MockBtProgressInfoFile.h
  1727. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1728. Change the default value of --metalink-servers option from `5' to `1'.
  1729. * src/HelpItemFactory.cc
  1730. * src/option_processing.cc
  1731. * src/usage_text.h
  1732. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1733. Reimplemented transparent metalink using Accept request header.
  1734. * src/HttpRequest.cc
  1735. * src/HttpRequest.h
  1736. * src/HttpRequestCommand.cc
  1737. * src/Metalink2RequestGroup.cc
  1738. * src/RequestGroup.cc
  1739. * src/RequestGroup.h
  1740. * test/HttpRequestTest.cc
  1741. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1742. Bump up version number to 0.13.2a
  1743. * configure.ac
  1744. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1745. Updated configure.ac using the result of autoscan.
  1746. * configure.ac
  1747. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1748. Fixed compilation error without gcrypt/openssl.
  1749. * src/DownloadCommand.cc
  1750. * src/DownloadCommand.h
  1751. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1752. Reorganized version information so that it can be displayed in a
  1753. standard terminal screen without scrolling.
  1754. Removed http, ftp from Configuration section, because they are always
  1755. enabled.
  1756. * src/FeatureConfig.cc
  1757. * src/FeatureConfig.h
  1758. * src/main.cc
  1759. * src/messageDigest.cc
  1760. * src/messageDigest.h
  1761. * src/version_usage.cc
  1762. * test/FeatureConfigTest.cc
  1763. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1764. Masked user ID in log.
  1765. * src/FtpConnection.cc (sendUser)
  1766. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1767. Removed query part from filename in HTTP download. The query part means
  1768. the substring after "?" in URL. Firefox seems do the same thing.
  1769. A query part is sometimes very long and not suitable to filename,
  1770. so I think it is better to remove it from filename.
  1771. * src/HttpRequest.cc
  1772. * src/HttpRequest.h
  1773. * src/Request.cc
  1774. * src/Request.h
  1775. * test/HttpRequestTest.cc
  1776. * test/RequestTest.cc
  1777. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1778. Rewritten Exception class. Throw exception object, not its pointer and
  1779. catch by reference, so that remove problematic delete operator for
  1780. catched exception.
  1781. * src/Exception.cc
  1782. * src/Exception.h
  1783. * test/ExceptionTest.cc
  1784. * src/*: All files throwing/catching exception.
  1785. * test/*: All files throwing/catching exception.
  1786. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1787. Now auto protocol detection is enabled without -Z option.
  1788. But there is a important difference between with/without -Z optoin.
  1789. For example, if you type:
  1790. aria2c http://host/file file1.torrent file2.metalink http://mirror/file
  1791. then, aria2 interprets there are 3 request groups:
  1792. (1) http://host/file, http://mirror/file <-- multi-source download
  1793. (2) file1.torrent
  1794. (3) file2.metalink
  1795. On the other hand, if you invoke above command with -Z option, it is
  1796. interpreted as 4 request groups:
  1797. (1) http://host/file
  1798. (2) file1.torrent
  1799. (3) file2.metalink
  1800. (4) http://mirror/file
  1801. I think usually user don't mix multi-source URLs and torrent files, so
  1802. there is no big problem here.
  1803. * src/main.cc
  1804. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1805. Fixed the bug that causes segmentaion fault when reading XML containing
  1806. unescapsed character like '&'.
  1807. Also a modification was made which avoids adding unnecessary
  1808. characters stack and appending unused string.
  1809. * src/ExpatMetalinkProcessor.cc
  1810. * src/FileMetalinkParserState.h
  1811. * src/FilesMetalinkParserState.h
  1812. * src/FinMetalinkParserState.h
  1813. * src/HashMetalinkParserState.h
  1814. * src/InitialMetalinkParserState.h
  1815. * src/LanguageMetalinkParserState.h
  1816. * src/MetalinkMetalinkParserState.h
  1817. * src/MetalinkParserState.h
  1818. * src/MetalinkParserStateMachine.cc
  1819. * src/MetalinkParserStateMachine.h
  1820. * src/OSMetalinkParserState.h
  1821. * src/PieceHashMetalinkParserState.h
  1822. * src/PiecesMetalinkParserState.h
  1823. * src/ResourcesMetalinkParserState.h
  1824. * src/SizeMetalinkParserState.h
  1825. * src/SkipTagMetalinkParserState.h
  1826. * src/URLMetalinkParserState.h
  1827. * src/VerificationMetalinkParserState.h
  1828. * src/VersionMetalinkParserState.h
  1829. * src/XML2SAXMetalinkProcessor.cc
  1830. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1831. Added StringFormat class, which internally calls vasprintf.
  1832. operator<< is defined for this class, so it can be used with iostream
  1833. classes nicely. SimpleLogger and following functions are rewritten
  1834. using StringFormat class.
  1835. Besides, now Logger class's methods are non-const, many classes
  1836. that has a const Logger* as a member variable are modified to remove
  1837. const qualifier from the variable declaration.
  1838. * src/HelpItemFactory.cc
  1839. * src/Request.cc
  1840. * src/SimpleLogger.cc
  1841. * src/StringFormat.cc
  1842. * src/StringFormat.h
  1843. * src/Util.cc
  1844. * src/option_processing.cc
  1845. * src/version_usage.cc
  1846. * test/StringFormatTest.cc
  1847. * src/*.h: The classes that has const Logger* as a member variable.
  1848. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1849. Log error in AccRequestGroup when reading BitTorrent/Metalink file is
  1850. failed. Also fixed memory link when exception is thrown there.
  1851. * src/main.cc (AccRequestGroup)
  1852. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1853. Added build-in "Accept-Features" support. For now only "metalink" is
  1854. used in this header field.
  1855. This "metalink" value is removed from the list when connecting URLs
  1856. fed by metalink file to avoid loop in "transparent" metlaink.
  1857. * src/HttpRequest.cc
  1858. * src/HttpRequest.h: Renamed _userHeaders as _headers. Accept-Features
  1859. header is also held in this variable. Also renamed setUserHeaders as
  1860. addHeader and it was rewritten to add header not just to clear the old
  1861. value.
  1862. * src/HttpRequestCommand.cc
  1863. * src/Metalink2RequestGroup.cc: Added the code to remove "metalink"
  1864. from "Accept-Features" list.
  1865. * src/RequestGroup.cc: Added "metalink" to "Accept-Features" by
  1866. default.
  1867. * src/RequestGroup.h
  1868. * src/TaggedItem.cc: Moved Concat class to a2functional.h.
  1869. * src/a2functional.h: Included <string> because Concat class depends on
  1870. it.
  1871. * test/HttpRequestTest.cc
  1872. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1873. Added comment
  1874. * src/RequestGroup.cc (createNextCommand)
  1875. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1876. Capitalized METHOD_GET and METHOD_HEAD
  1877. * src/Request.cc
  1878. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1879. Added getDownloadResults() method
  1880. * src/RequestGroupMan.cc
  1881. * src/RequestGroupMan.h
  1882. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1883. Fixed the bug that aria2 exits when commands is empty() but
  1884. _routineCommands are not.
  1885. * src/DownloadEngine.cc
  1886. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1887. Use the default value pulled from Option object in HelpItemFactory.
  1888. except options whose defualt value is embedded in a usage text.
  1889. * src/HelpItemFactory.cc
  1890. * src/HelpItemFactory.h
  1891. * src/option_processing.cc
  1892. * src/version_usage.cc
  1893. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1894. Added --quiet option to make aria2 quiet (no console output).
  1895. --quiet option is tagged with ADVANCED.
  1896. * src/HelpItemFactory.cc
  1897. * src/LogFactory.cc
  1898. * src/LogFactory.h
  1899. * src/MultiUrlRequestInfo.cc
  1900. * src/MultiUrlRequestInfo.h
  1901. * src/NullStatCalc.h: New class. This class prints nothing.
  1902. * src/OptionHandlerFactory.cc
  1903. * src/main.cc
  1904. * src/option_processing.cc
  1905. * src/prefs.h
  1906. * src/usage_text.h
  1907. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1908. Add HTTP tag to --header option. Removed ADVANCED tag instead.
  1909. * src/HelpItemFactory.cc (createHelpItems):
  1910. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1911. Fixed compilation error in ExpatMetalinkProcessor.cc
  1912. * src/ExpatMetalinkProcessor.cc
  1913. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1914. Reuse socket if the origin server supports HTTP keep-alive and
  1915. --enable-http-keep-alive or --enable-http-pipelining is given.
  1916. The current implementation doesn't reuse the connections established
  1917. against proxy server.
  1918. * src/AbstractCommand.cc
  1919. * src/DownloadEngine.cc
  1920. * src/DownloadEngine.h
  1921. * src/HttpDownloadCommand.cc
  1922. * src/HttpInitiateConnectionCommand.cc
  1923. * src/HttpResponseCommand.cc
  1924. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1925. Rewritten HTTP keep-alive and pipelining routine.
  1926. * src/AbstractCommand.cc
  1927. * src/HttpConnection.cc
  1928. * src/HttpDownloadCommand.cc
  1929. * src/HttpRequest.cc
  1930. * src/HttpRequestCommand.cc
  1931. * src/HttpResponseCommand.cc
  1932. * src/Request.cc
  1933. * src/Request.h
  1934. * src/RequestGroup.cc
  1935. * test/HttpRequestTest.cc
  1936. * test/HttpResponseTest.cc
  1937. * test/RequestTest.cc
  1938. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1939. Added missing setUserHeaders call
  1940. * src/HttpRequestCommand.cc
  1941. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1942. Call FileAllocationMan::nextFileAllocationEntryExists() first.
  1943. Calling FileAllocationMan::isFileAllocationBeingExecuted() is somwhat
  1944. waste of time because it is more likey false.
  1945. * src/FileAllocationDispatcherCommand.cc (execute)
  1946. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1947. Now HTTP status and version are a member variable of HttpHeader.
  1948. HTTP status is processed as a string, not integer.
  1949. * src/AbstractProxyResponseCommand.cc
  1950. * src/HttpConnection.cc
  1951. * src/HttpHeader.cc
  1952. * src/HttpHeader.h
  1953. * src/HttpHeaderProcessor.cc
  1954. * src/HttpHeaderProcessor.h
  1955. * src/HttpResponse.cc
  1956. * src/HttpResponse.h
  1957. * test/HttpHeaderProcessorTest.cc
  1958. * test/HttpResponseTest.cc
  1959. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1960. Added --header option. You can specify any number of additional HTTP headers
  1961. like:
  1962. aria2 --header="X-A: 300" --header="X-B: 900" http://host/file
  1963. Unlike other commad-line option, you can use --header option multiple times.
  1964. * src/HelpItemFactory.cc
  1965. * src/HttpRequest.{cc, h}
  1966. * src/HttpRequestCommand.cc
  1967. * src/OptionHandlerFactory.cc
  1968. * src/OptionHandlerImpl.h
  1969. * src/option_processing.cc
  1970. * src/prefs.h
  1971. * src/usage_text.h
  1972. * test/HttpRequestTest.cc (testUserHeaders)
  1973. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1974. Eliminates the time lag between sequential downloads and commands in
  1975. the same RequestGroup.
  1976. In old implementation, aria2 occasionally waits 1 seconds before
  1977. executing next command or RequestGroup.
  1978. This is really a waste of time, and new implementation eliminates
  1979. this unnecessary time lag.
  1980. * src/AbstractCommand.cc
  1981. * src/AutoSaveCommand.cc
  1982. * src/CheckIntegrityCommand.cc
  1983. * src/Command.{cc, h}
  1984. * src/DownloadEngine.{cc, h}
  1985. * src/DownloadEngineFactory.cc
  1986. * src/FileAllocationCommand.cc
  1987. * src/FileAllocationDispatcherCommand.cc
  1988. * src/FillRequestGroupCommand.cc
  1989. * src/FtpInitiateConnectionCommand.cc
  1990. * src/HaveEraseCommand.cc
  1991. * src/HttpInitiateConnectionCommand.cc
  1992. * src/HttpResponseCommand.cc
  1993. * src/RealtimeCommand.cc
  1994. * src/RequestGroup.cc
  1995. * src/RequestGroupMan.cc
  1996. * src/StreamFileAllocationEntry.cc
  1997. * src/TimeBasedCommand.{cc, h}
  1998. * src/TimedHaltCommand.cc
  1999. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2000. Rewritten SharedHandle. Now copy constructor taking raw pointer has
  2001. keyword explicit and SharedHandle's default constructor initializes
  2002. its internal obj to null, old implementation initializes it using
  2003. obj's default constructor.
  2004. To assign null, write SharedHandle<T> x(...); x.reset();
  2005. TODO: test/SharedHandleTest.cc needs more tests.
  2006. * src/SharedHandle.h
  2007. 2008-04-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2008. Fixed type in man page.
  2009. * doc/aria2c.1.txt
  2010. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2011. Merged Ross's 0.13.1+1 Cygwin compile fix patch.
  2012. * src/SimpleLogger.{cc, h}
  2013. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2014. Implemented auto protocol detection.
  2015. Now you can do:
  2016. aria2c -Z http://host/file file1.torrent file2.metalink
  2017. (Note: -Z option is required for auto protcol detection.)
  2018. Then aria2c downloads 3 files simultaneously:
  2019. 1. http://host/file
  2020. 2. file1.torrent <-- read local torrent file
  2021. 3. file2.metalink <-- read local Metalink file.
  2022. Same thing goes with -i option. Assume your uris.txt contans:
  2023. http://host/file
  2024. file1.torrent
  2025. file2.metalink
  2026. Then you can do: aria2c -i uris.txt
  2027. (Note: -Z option is not needed if -i option is given.)
  2028. * src/main.cc
  2029. * src/ProtocolDetector.{cc, h}
  2030. * test/ProtocolDetectorTest.cc
  2031. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2032. Fixed compile error without gnutls/libgcrypt/libgpg-error and openSSL
  2033. installed
  2034. * src/ARC4Encryptor.h
  2035. * src/ARC4Decryptor.h
  2036. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2037. Renamed argument from 'errno' to 'err', since errno is confused with
  2038. errno defined in errno.h.
  2039. * src/LibgcryptARC4Decryptor.h
  2040. * src/LibgcryptARC4Context.h
  2041. * src/LibgcryptDHKeyExchange.h
  2042. * src/LibgcryptARC4Encryptor.h
  2043. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2044. Rewritten choking algorithm.
  2045. * src/PeerChokeCommand.{cc, h}
  2046. * src/BtInterestedMessage.cc
  2047. * src/PeerSessionResource.{cc, h}
  2048. * src/DefaultPeerStorage.{cc, h}
  2049. * src/BtNotInterestedMessage.cc
  2050. * src/DefaultBtMessageDispatcher.{cc, h}
  2051. * src/BtMessageDispatcher.h
  2052. * src/Peer.{cc, h}
  2053. * src/BtLeecherStateChoke.{cc, h}
  2054. * src/BtSetup.cc
  2055. * src/BtSeederStateChoke.{cc, h}
  2056. * src/PeerStorage.h
  2057. * test/MockPeerStorage.h
  2058. * test/MockBtMessageDispatcher.h
  2059. 2008-04-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2060. Fixed compilation error on x84-64 platform.
  2061. * src/AuthConfig.cc: Included ostream.
  2062. 2008-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2063. Rewritten getBasename() and getDirname(), without standard library
  2064. basename(), dirname().
  2065. * src/File.cc
  2066. * test/FileTest.cc
  2067. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2068. Added Simplified Chinese translation. Also updated the following
  2069. translations: Polish, Dutch, German. Great thanks to all translators.
  2070. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2071. Suppress content-range error when 'Content-Range' response header
  2072. doesn't contains bytes-unit specifier 'bytes'
  2073. * src/HttpHeader.cc (getRange)
  2074. * test/HttpHeaderTest.cc
  2075. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2076. Fixed compilation error with g++-4.3
  2077. 2008-03-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2078. Added missing include files for MinGW
  2079. * test/HttpHeaderProcessorTest.cc
  2080. * test/DHTRoutingTableSerializerTest.cc
  2081. * test/DHTRoutingTableDeserializerTest.cc
  2082. * test/UriListParserTest.cc
  2083. 2008-03-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2084. Now download line is printed nicely with no garbage at the end of
  2085. line. I use ioctl to get the columns of terminal.
  2086. If stdout is redirected to another device, instead of carriage return,
  2087. end of line '\n' character is used. This is feature request#1909659
  2088. * src/ConsoleStatCalc.cc (calculateStat)
  2089. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2090. Included a2time.h
  2091. * src/DHTMessageDispatcher.h
  2092. * src/DHTMessageEntry.h
  2093. * src/DHTReplaceNodeTask.h
  2094. * src/DHTMessageTracker.h
  2095. * src/Util.h
  2096. * src/CookieBox.h
  2097. * src/SocketCore.h
  2098. * src/DefaultBtMessageDispatcher.h
  2099. * src/SocketCore.cc
  2100. * src/Util.cc
  2101. * src/DHTPingTask.h
  2102. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2103. Fixed high memory footprint when DHT is enabled.
  2104. This is not a memory leak, but DHTReplaceNodeTask is more frequently
  2105. queued than it is processed and the queue is getting longer. As a
  2106. consequence, momory usage is increased.
  2107. As for a fix, instead of issuing DHTReplaceNodeTask, I've implemented
  2108. replacement cache in DHTBucket which is described in Kademlia paper.
  2109. * src/DHTRoutingTable.cc (addNode): Removed the issuing of
  2110. DHTReplaceNodeTask.
  2111. * src/DHTBucket.{h, cc}
  2112. (cacheNode): New function.
  2113. (getCachedNodes): New function.
  2114. (dropNode): Push back cached node to _nodes.
  2115. * test/DHTBucketTest.cc
  2116. (testCacheNode): New test
  2117. (testDropNode): New test
  2118. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2119. Allocate memory for peekBuf in initiateSecureConnection() to avoid
  2120. the unused 4KB memory when ssl is not used.
  2121. * src/SocketCore.cc
  2122. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2123. Added summary log for peer announce storage.
  2124. * src/DHTPeerAnnounceStorage.cc (handleTimeout)
  2125. Removed cast
  2126. * src/DefaultPeerStorage.cc (addPeer)
  2127. Log exception message
  2128. * src/DHTMessageTracker.cc (handleTimeout)
  2129. Fixed casting
  2130. * test/HttpRequestTest.cc
  2131. * test/MetalinkProcessorTest.cc
  2132. * test/PieceTest.cc
  2133. * test/MetalinkEntryTest.cc
  2134. * test/SequenceTest.cc
  2135. 2008-03-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2136. * src/ParameterizedStringParser.cc (createLoop):
  2137. Removed unused variable sstep.
  2138. * src/AlphaNumberDecorator.h (decode): Rewritten.
  2139. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2140. * src/Util.{h, cc}
  2141. (parseUInt): New function.
  2142. (alphaToNum): Now returns unsigned int and 0 when overflow detected.
  2143. The actual range is uint32_t.
  2144. * test/UtilTest.cc
  2145. * src/ParameterizedStringParser.cc:
  2146. Use Util::parseUInt() for loop variables.
  2147. * test/ParameterizedStringParserTest.cc
  2148. * src/PStringNumLoop.h: Make _startValue and _endValue unsigned int.
  2149. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2150. Rewritten the functions for binding port.
  2151. * src/DHTConnectionImpl.{h, cc}
  2152. * src/PeerListenCommand.{h, cc}
  2153. * src/DHTSetup.cc
  2154. * src/BtSetup.cc
  2155. * test/DHTConnectionImplTest.cc
  2156. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2157. type cleanup for allmost all remaining files.
  2158. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2159. Type clarification
  2160. * src/PeerSessionResource.{h, cc}
  2161. * src/DefaultPieceStorage.{h, cc}
  2162. * src/Peer.{h, cc}
  2163. * test/PeerSessionResourceTest.cc
  2164. Use div function
  2165. * src/BtPieceMessage.cc (erasePieceOnDisk)
  2166. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2167. Type clarification
  2168. * src/DefaultPeerStorage.{h, cc}
  2169. * test/DefaultPeerStorageTest.cc
  2170. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2171. Type clarification: size_t for length or size, uint64_t for file
  2172. length, off_t for file offset.
  2173. * src/DefaultBtProgressInfoFile.cc
  2174. * src/DefaultBtContext.{h, cc}
  2175. * src/DefaultBtInteractive.cc
  2176. * src/DownloadCommand.{h, cc}
  2177. * src/IteratableChunkChecksumValidator.{h, cc}
  2178. * src/SegmentMan.{h, cc}
  2179. * src/SingleFileDownloadContext.{h, cc}
  2180. * src/IteratableChecksumValidator.{h, cc}
  2181. * src/BtContext.h
  2182. * src/IteratableValidator.h
  2183. * src/DownloadContext.h
  2184. * test/SingleFileDownloadContextTest.cc
  2185. * test/DefaultBtContextTest.cc
  2186. * test/MockBtContext.h
  2187. * test/Metalink2RequestGroupTest.cc
  2188. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2189. Type clarification: size_t for length or size, uint64_t for file
  2190. length, off_t for file offset.
  2191. * src/PiecedSegment.cc
  2192. * src/GrowSegment.h
  2193. * src/DefaultBtRequestFactory.h
  2194. * src/DefaultBtProgressInfoFile.cc
  2195. * src/UnknownLengthPieceStorage.h
  2196. * src/DefaultPieceStorage.cc
  2197. * src/UnknownLengthPieceStorage.cc
  2198. * src/DefaultBtInteractive.cc
  2199. * src/GrowSegment.cc
  2200. * src/BitfieldMan.h
  2201. * src/DownloadCommand.cc
  2202. * src/BtRequestFactory.h
  2203. * src/PiecedSegment.h
  2204. * src/DefaultPieceStorage.h
  2205. * src/Piece.cc
  2206. * src/DefaultBtRequestFactory.cc
  2207. * src/PieceStorage.h
  2208. * src/Segment.h
  2209. * src/Piece.h
  2210. * src/BitfieldMan.cc
  2211. * src/Util.cc
  2212. * test/DefaultBtProgressInfoFileTest.cc
  2213. * test/DefaultPieceStorageTest.cc
  2214. * test/MockPieceStorage.h
  2215. * test/BtRequestMessageTest.cc
  2216. * test/DefaultBtMessageDispatcherTest.cc
  2217. * test/BitfieldManTest.cc
  2218. * test/GrowSegmentTest.cc
  2219. * test/PieceTest.cc
  2220. * test/SegmentTest.cc
  2221. * test/SegmentManTest.cc
  2222. * test/DefaultBtRequestFactoryTest.cc
  2223. * test/MockBtRequestFactory.h
  2224. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2225. Fixed compilation error with --disable-nls
  2226. It seems that defining gettext(Msgid) to ((const char *) (Msgid))
  2227. in gettext.h causes the problem.
  2228. * src/common.h
  2229. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2230. Removed subPiece related functions.
  2231. * src/Piece.{h, cc} : Also rewritten getCompletedLength().
  2232. * src/DefaultPieceStorage.{h, cc}
  2233. * test/PieceTest.cc
  2234. * test/DefaultPieceStorageTest.cc
  2235. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2236. Use unsigned char for data store.
  2237. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2238. Bump up version number to 0.13.0+1
  2239. * configure.ac
  2240. * Release 0.13.0+1
  2241. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2242. Changed inactive connection timeout to 120.
  2243. To accept more mulually interested peers, disconnect peer when there
  2244. is no interest between us after certain time passed.
  2245. * src/DefaultBtInteractive.cc (checkActiveInteraction)
  2246. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2247. Fixed the bug that aria2 only uses first dns server in resolv.conf
  2248. when compiled with async DNS support.
  2249. * src/DownloadEngine.cc
  2250. * src/option_processing.cc: Lengthened DNS timeout to 30. I think old
  2251. value '10' will be a little bit short when some DNS servers are
  2252. offline and several DNS servers are tried. It should be configured
  2253. by command-line option.
  2254. 2008-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2255. Merged Ross's mingw patch.
  2256. * src/DHTRoutingTableDeserializer.cc
  2257. * src/DHTRoutingTableSerializer.cc
  2258. * src/Platform.{h, cc}
  2259. * src/timegm.h
  2260. * src/gettimeofday.h
  2261. * src/getaddrinfo.h
  2262. * src/SocketCore.h
  2263. * src/common.h
  2264. * src/inet_aton.h
  2265. * src/DownloadEngine.h
  2266. * src/gai_strerror.h
  2267. * src/a2netcompat.h
  2268. * configure.ac
  2269. * configure
  2270. * aclocal.m4
  2271. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2272. Included missing iostream.
  2273. * test/AllTest.cc
  2274. * test/BtDependencyTest.cc
  2275. * test/BtExtendedMessageTest.cc
  2276. * test/DHTConnectionImplTest.cc
  2277. * test/DHTMessageFactoryImplTest.cc
  2278. * test/DHTMessageTrackerEntryTest.cc
  2279. * test/DHTNodeTest.cc
  2280. * test/DHTRoutingTableSerializerTest.cc
  2281. * test/DefaultBtAnnounceTest.cc
  2282. * test/DefaultBtContextTest.cc
  2283. * test/DefaultBtMessageFactoryTest.cc
  2284. * test/DefaultExtensionMessageFactoryTest.cc
  2285. * test/HandshakeExtensionMessageTest.cc
  2286. * test/HttpResponseTest.cc
  2287. * test/MetalinkProcessorTest.cc
  2288. * test/MultiFileAllocationIteratorTest.cc
  2289. * test/SocketCoreTest.cc
  2290. * test/UTPexExtensionMessageTest.cc
  2291. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2292. Reorganized includes.
  2293. * src/NameResolver.cc
  2294. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2295. Fixed compilation error without ares/c-ares
  2296. * src/NameResolver.h:
  2297. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2298. Added a test for large file.
  2299. * test/MetalinkProcessorTest.cc (testLargeFileSize):
  2300. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2301. Fixed the bug that file size is ignored if size > INT32_MAX
  2302. * src/SizeMetalinkParserState.cc (endElement):
  2303. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2304. Bump up version number to 0.13.0
  2305. * configure.ac
  2306. * Release 0.13.0
  2307. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2308. Updated Makfefile.am to make 'make dist' work.
  2309. Now packaged filename is aria2c-VERSION.tar.bz2.
  2310. Added README, README.html, and aria2c.1.html to dist_doc_DATA.
  2311. Added LICENSE.OpenSSL to dist_noinst_DATA.
  2312. Large file support is now configured by configure script.
  2313. * configure.ac
  2314. Removed unsused source files
  2315. * src/
  2316. * test/
  2317. Removed PeerDecl.h and BtContextDecl.h. typedefs are removed to
  2318. Peer.h and BtContext.h respectively.
  2319. * src/Peer.h
  2320. * src/BtContext.h
  2321. Updated translations.
  2322. Added Polish, Thai, Indonesian, Norwegian Nynorsk, Hungarian
  2323. translations. Great thanks to all translators!;)
  2324. * po/*.{po, gmo}
  2325. 2008-02-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2326. Create MessageDigestHelper::staticSHA1DigestInit() which uses
  2327. statically declared sha1 MessageDigestContext.
  2328. * src/BtPieceMessage.cc: Use staticSHA1DigestInit() to avoid
  2329. initialization of short-lived MessageDigestContext.
  2330. * src/MessageDigestHelper.{h, cc}
  2331. * src/main.cc
  2332. Now DownloadCommand has a reference to MessageDigestContext to avoid
  2333. the initialization of MessageDigestContext every time in validating
  2334. chunk checksum.
  2335. * src/DownloadCommand.{h, cc}
  2336. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2337. Add a file descriptor which connected to fast peer(latency<1500) to
  2338. select(). This change reduced CPU load.
  2339. * src/PeerInteractionCommand.cc
  2340. * src/DefaultBtInteractive.{h, cc}
  2341. * src/BtInteractive.h
  2342. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2343. Fixed the previous insufficient fix for possible busy loop.
  2344. * src/MSEHandshake.cc (identifyHandshakeType)
  2345. Removed unused functions.
  2346. * src/MSEHandshake.{h, cc} (readDataAndDecrypt)
  2347. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2348. Fixed possible busy loop if first 20 bytes are not received for a few
  2349. minutes.
  2350. * src/MSEHandshake.{h, cc} (identifyHandshakeType)
  2351. * src/ReceiverMSEHandshakeCommand.cc
  2352. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2353. Fixed compilation error
  2354. * src/ExpatMetalinkProcessor.cc
  2355. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2356. Fixed compile error on Mac OS X, on 64Bit OS maybe.
  2357. * src/DHTBucket.cc
  2358. Removed unnecessary cast.
  2359. * src/HandshakeExtensionMessage.cc
  2360. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2361. Fixed the bug that option handler for PREF_METALINK_ENABLE_UNIQUE_PROTOCOL.
  2362. is missing.
  2363. * src/OptionHandlerFactory.cc
  2364. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2365. Fixed the bug that HAVE message is not sent for a piece they are
  2366. downloaded fom http/ftp server before any BitTorrent handshake is done
  2367. with peers.
  2368. * src/DefaultBtInteractive.cc
  2369. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2370. Removed RequestInfo.h and FileAllocator.h since they have been removed.
  2371. * src/Makefile.am
  2372. * src/Makefile.in
  2373. 2008-02-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2374. Updated README. Added html version of README and man page.
  2375. * README
  2376. * README.html
  2377. * readme2html: Shell script to generate README.html from README using
  2378. asciidoc.
  2379. * doc/aria2c.1.html
  2380. * doc/makeman: Added the line to generate aria2c.1.html
  2381. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2382. Fixed offset calculation.
  2383. * src/LibgcryptDHKeyExchange.h (computeSecret)
  2384. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2385. Rewritten itos and uitos using template. llitos and ullitos are
  2386. replaced with itos and uitos respectively.
  2387. * src/Util.{h, cc}
  2388. * test/UtilTest.cc
  2389. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2390. Fixed the bug that DH key exchange sometimes fails due to bad handling
  2391. of the number of bytes required for storing public key and shared
  2392. secret.
  2393. * src/LibgcryptDHKeyExchange.h
  2394. * src/LibsslDHKeyExchange.h: Also added function name to handleError.
  2395. * src/MSEHandshake.cc
  2396. * test/DHKeyExchangeTest.cc
  2397. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2398. Removed since they are not used.
  2399. * src/Xml2MetalinkProcessor.{h, cc}
  2400. * src/Socket.cc
  2401. * src/SegmentSplitter.{h, cc}
  2402. * test/Xml2MetalinkProcessorTest.cc
  2403. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2404. Fixed the bug that prevents aria2 from stopping other than by pressing
  2405. Ctrl-C in BitTorrent download. It is reproducible using --seed-time
  2406. option. aria2 doesn't stop even after --seed-time is satisfied and
  2407. continues to output blank lines in the console.
  2408. * src/ReceiverMSEHandshakeCommand.cc
  2409. * src/PeerReceiveHandshakeCommand.cc
  2410. * src/PeerListenCommand.cc
  2411. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2412. Bump up version number to 0.13.0rc
  2413. * configure.ac
  2414. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2415. Updated man page and some usage text.
  2416. * doc/aria2c.1.txt
  2417. * src/usage_text.h
  2418. * po/*.{po, gmo}
  2419. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2420. Updated translations. Added Finnish and Hebrew translations.
  2421. Great thanks to all translators!
  2422. * po/*.{po, gmo}
  2423. * po/LINGUAS
  2424. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2425. Log more detailed information about each message.
  2426. * src/DHTQueryMessage.{h, cc}
  2427. * src/DHTGetPeersMessage.{h, cc}
  2428. * src/DHTFindNodeReplyMessage.{h, cc}
  2429. * src/DHTGetPeersReplyMessage.{h, cc}
  2430. * src/DHTAnnouncePeerMessage.{h, cc}
  2431. * src/DHTResponseMessage.{h, cc}
  2432. * src/DHTFindNodeMessage.{h, cc}
  2433. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2434. Use constants defined in prefs.h
  2435. * src/option_processing.cc
  2436. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2437. * test/AllTest.cc: Added OpenSSL, GNUTLS initialization code.
  2438. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2439. Make room for future enchancements for IPv6 addresses.
  2440. Bump up version number of dht.dat file format to 2.
  2441. Not compatible with previous version.
  2442. * src/DHTRoutingTableSerializer.cc
  2443. * src/DHTRoutingTableDeserializer.cc
  2444. * test/DHTRoutingTableSerializerTest.cc
  2445. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2446. Added handling for the return values from
  2447. PeerMessageUtil::createcompact().
  2448. * src/DefaultBtContext.cc (computeFastSet):
  2449. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2450. Fixed abort when peer's ip address is IPv4-mapped address.
  2451. * src/DefaultBtContext.cc (computeFastSet)
  2452. Removed number-and-dots criteria, since Util::isNumberAndDotsNotation()
  2453. cannot handle IPv4-mapped addresses.
  2454. * src/DefaultBtInteractive.cc (addPeerExchangeMessage)
  2455. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2456. Proper return value handling for OpenSSL functions.
  2457. * src/LibsslDHKeyExchange.h
  2458. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2459. Random bytes generation using libgcrypt and OpenSSL.
  2460. * src/DHTUtil.{h, cc}
  2461. * test/DHTUtilTest.cc
  2462. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2463. Fixed segmentation fault when a DHT message which doesn't have 'y' key
  2464. received.
  2465. * src/DHTMessageReceiver.cc (receiveMessage)
  2466. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2467. Fixed the bug that a return code is always 0. BUG#1897704
  2468. If error occurred during the download or there exist unfinished
  2469. downloads, aria2 returns with code 1.
  2470. * src/RequestGroupMan.{h, cc}
  2471. * src/MultiUrlRequestInfo.{h, cc}
  2472. * src/main.cc
  2473. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2474. IPv6 support for SocketCore class.
  2475. TODO: In SocketCore::establishConnection(), this is insufficient to
  2476. determin the failure of connect() here because the socket is
  2477. non-blocking state. The next addresses should be tried after select().
  2478. TODO: NameResolver still uses c-ares(<= 1.4) ares_gethostbyname().
  2479. If c-ares 1.5 or newer is installed, ares_getaddrinfo() should be used
  2480. instead which address family independent.
  2481. TODO: DHTRoutingTable{Deserializer,Serializer} currently saves peer
  2482. information in a compact peer format which is for IPv4 only.
  2483. Some BitTorrent functions in PeerMessageUtil still depends on IPv4 but
  2484. this is a spec of BitTorrent protocol.
  2485. * src/SocketCore.{h, cc}
  2486. * src/PeerMessageUtil.cc
  2487. * test/SocketCoreTest.cc
  2488. * test/PeerMessageUtilTest.cc
  2489. * test/DHTConnectionImplTest.cc
  2490. Handle IPv4-mapped addresses.
  2491. * src/DHTNode.cc: Now identity is determined by node id.
  2492. * src/DHTMessageTrackerEntry.cc
  2493. Because now PeerMessageUtil::unpackcompact() could fail, the caller
  2494. should handle it.
  2495. * src/DHTRoutingTableDeserializer.cc
  2496. * src/DHTMessageFactoryImpl.cc
  2497. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2498. Change the unit of --stop option from a minute to a second.
  2499. * src/usage_text.h
  2500. * src/DownloadEngineFactory.cc
  2501. * src/OptionHandlerFactory.cc
  2502. * src/message.h
  2503. * src/TimedHaltCommand.cc
  2504. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2505. Make listening socket non-block mode.
  2506. * src/FtpConnection.cc
  2507. * src/FtpNegotiationCommand.{h, cc}
  2508. * src/PeerListenCommand.cc
  2509. Fixed the bug that cause slow ftp negotiation.
  2510. * src/FtpNegotiationCommand.{h, cc}
  2511. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2512. Added basic tag to --enable-dht, --dht-listen-port option.
  2513. * src/HelpItemFactory.cc (createHelpItems)
  2514. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2515. Updated text.
  2516. * src/usage_text.h
  2517. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2518. * src/MSEHandshake.cc (encryptAndSendData): Use std::min().
  2519. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2520. Determin _threadtholdSpeed in each constructor for
  2521. ActivePeerConnectionCommand and PeerReceiveHandshakeCommand.
  2522. * src/ActivePeerConnectionCommand.{h, cc}
  2523. * src/PeerReceiveHandshakeCommand.{h, cc}
  2524. * src/BtSetup.cc
  2525. * src/BtConstants.h
  2526. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2527. Added --bt-min-crypto-level and --bt-require-crypto options.
  2528. * src/OptionHandlerFactory.cc
  2529. * src/MSEHandshake.cc
  2530. * src/HelpItemFactory.cc
  2531. * src/option_processing.cc
  2532. * src/ReceiverMSEHandshakeCommand.cc
  2533. * src/prefs.h
  2534. * src/DefaultBtAnnounce.cc
  2535. * src/InitiatorMSEHandshakeCommand.cc
  2536. * src/usage_text.h
  2537. * test/MSEHandshakeTest.cc
  2538. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2539. Bump version number to 0.13.0b
  2540. * configure.ac
  2541. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2542. Updated doc.
  2543. * src/MessageDigestHelper.h:
  2544. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2545. Use raw message digest as a token instead of its hexadecimal
  2546. representation.
  2547. * src/DHTTokenTracker.cc (generateToken)
  2548. 2008-02-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2549. Added Message Stream Encryption(MSE) support.
  2550. Currently, aria2 accepts incoming connections with Obfuscation Header
  2551. and legacy BitTorrent Header and establishes connections with
  2552. Obfuscation Header first and if failed then retry with legacy
  2553. BitTorrent header. If plain text and ARC4 is provided, aria2 always
  2554. choose ARC4. The new option to change the default behavior is planned.
  2555. For tracker extension, "supportcrypto=1" is added statically.
  2556. * src/PeerInitiateConnectionCommand.{h, cc}
  2557. * src/PeerConnection.{h, cc}
  2558. * src/HandleRegistry.h
  2559. * src/SocketCore.h
  2560. * src/PeerReceiveHandshakeCommand.{h, cc}
  2561. * src/BtRegistry.{h, cc}
  2562. * src/PeerListenCommand.cc
  2563. * src/InitiatorMSEHandshakeCommand.{h, cc}
  2564. * src/ReceiverMSEHandshakeCommand.{h, cc}
  2565. * src/MSEHandshake.{h, cc}
  2566. * src/ARC4Encryptor.h
  2567. * src/ARC4Decryptor.h
  2568. * src/LibgcryptARC4Encryptor.h
  2569. * src/LibgcryptARC4Decryptor.h
  2570. * src/LibgcryptARC4Context.h
  2571. * src/LibsslARC4Encryptor.h
  2572. * src/LibsslARC4Decryptor.h
  2573. * src/LibsslARC4Context.h
  2574. * src/DHKeyExchange.h
  2575. * src/LibgcryptDHKeyExchange.h
  2576. * src/LibsslDHKeyExchange.h
  2577. * src/DefaultBtAnnounce.cc: Just added "supportcrypto=1" parameter.
  2578. * test/DefaultBtAnnounceTest.cc
  2579. * test/ARC4Test.cc
  2580. * test/DHKeyExchangeTest.cc
  2581. Removed prepareForRetry() because it is not used.
  2582. * src/PeerAbstractCommand.{h, cc}
  2583. * src/PeerInteractionCommand.{h, cc}
  2584. * src/PeerInitiateConnectionCommand.{h, cc}
  2585. 2008-02-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2586. Added the ability to load nodes from torrent file. These nodes are
  2587. added to the routing table when downloading that torrent.
  2588. * src/BtContext.h
  2589. * src/DefaultBtContext.{h, cc}
  2590. * src/DHTSetup.cc
  2591. * src/DHTEntryPointNameResolveCommand.{h, cc}: Now accepts list of
  2592. hostname and port pair, and resolves all of them.
  2593. * src/NameResolver.{h, cc}: Added reset().
  2594. * src/RequestGroup.cc
  2595. * test/DefaultBtContextTest.cc
  2596. * test/MockBtContext.h
  2597. Removed assert() from DefaultBtContext and throw exception instead.
  2598. * src/DefaultBtContext.cc
  2599. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2600. Fixed segmentation fault bug when exiting if dht is disabled.
  2601. * src/RequestGroup.cc
  2602. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2603. Fixed typo in log message and define the message in message.h
  2604. * src/TimedHaltCommand.cc
  2605. * src/message.h
  2606. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2607. Included RecoverableException.h to fix compilation error.
  2608. * test/DHTMessageFactoryImplTest.cc
  2609. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2610. Added test 'testDoReceivedAction' for DHTQueryMessage subclasses.
  2611. * test/DHTPingMessageTest.cc
  2612. * test/DHTGetPeersMessageTest.cc
  2613. * test/DHTFindNodeMessageTest.cc
  2614. * test/DHTAnnouncePeerMessageTest.cc
  2615. * test/MockDHTMessage.h
  2616. * test/MockDHTMessageFactory.h
  2617. * test/MockDHTMessageDispatcher.h: New class.
  2618. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2619. Added DHTMessageDispatcherImpl. Now DHTMessageDispatcher is pure
  2620. virtual.
  2621. * src/DHTMessageDispatcher.h
  2622. * src/DHTMessageDispatcherImpl.{h, cc}
  2623. * src/DHTSetup.cc
  2624. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2625. Adding handling of DHT error message. Just log error message and
  2626. throw exception.
  2627. * src/DHTMessageFactoryImpl.cc
  2628. * test/DHTMessageFactoryImplTest.cc
  2629. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2630. Added handling of dynamic cast failure.
  2631. * src/DHTNodeLookupTask.cc
  2632. * src/DHTPeerLookupTask.cc
  2633. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2634. Added the ability to stop aria2 itself when given time has passed
  2635. from start. Use --stop option to specify time in minutes.
  2636. When 0 is given, this feature is disabled.
  2637. * src/OptionHandlerFactory.cc
  2638. * src/TimeBasedCommand.h: Make _interval protected scope.
  2639. * src/HelpItemFactory.cc
  2640. * src/option_processing.cc
  2641. * src/prefs.h
  2642. * src/FillRequestGroupCommand.cc: Evaluate _e->isHaltRequested()
  2643. before calling RequestGroupMan::fillRequestGroupFromReserver().
  2644. Without this modification, the result list shows "ERR" when aria2 is
  2645. stopped by --stop option. It should be "INPR".
  2646. * src/DownloadEngine.{h, cc}
  2647. * src/DownloadEngineFactory.cc
  2648. * src/usage_text.h
  2649. * src/TimedHaltCommand.{h, cc}: New class.
  2650. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2651. Bootstrap through node added by port message.
  2652. Currently bootstrap is executed if the number of buckets in routing
  2653. table is 1.
  2654. * src/BtPortMessage.{h, cc}
  2655. * src/DefaultBtMessageFactory.{h, cc}
  2656. * src/PeerInteractionCommand.cc
  2657. * test/BtPortMessageTest.cc
  2658. * test/MockDHTTask.h
  2659. 2008-02-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2660. Extract the Peer class's member variables, which are only needed after
  2661. PeerInteractionCommand, into PeerSessionResource class.
  2662. This class is instantiated in PeerInteractionCommand class's ctor and
  2663. released in its dtor.
  2664. This will make Peer class lightweight and uses less memory for peers
  2665. which are not connected and wait in the queue.
  2666. * src/PeerChokeCommand.cc
  2667. * src/PeerSessionResource.{h, cc}
  2668. * src/PeerInteractionCommand.cc
  2669. * src/PeerAbstractCommand.cc: Note: 0 is given to onAbort() function.
  2670. * src/DefaultBtInteractive.cc
  2671. * src/BtPieceMessage.cc
  2672. * src/BtInterestedMessage.cc
  2673. * src/BtUnchokeMessage.cc
  2674. * src/DefaultPeerStorage.{h, cc}
  2675. * src/PeerInitiateConnectionCommand.cc
  2676. * src/ActivePeerConnectionCommand.cc
  2677. * src/BtNotInterestedMessage.cc
  2678. * src/DefaultBtMessageDispatcher.cc
  2679. * src/BtChokeMessage.cc
  2680. * src/BtRequestMessage.cc
  2681. * src/Peer.{h, cc}
  2682. * src/BtRegistry.h
  2683. * src/TrackerWatcherCommand.cc
  2684. * src/PeerReceiveHandshakeCommand.cc
  2685. * test/BtExtendedMessageTest.cc
  2686. * test/BtAllowedFastMessageTest.cc
  2687. * test/BtCancelMessageTest.cc
  2688. * test/DefaultPieceStorageTest.cc
  2689. * test/BtBitfieldMessageTest.cc
  2690. * test/BtHaveMessageTest.cc
  2691. * test/BtNotInterestedMessageTest.cc
  2692. * test/BtRequestMessageTest.cc
  2693. * test/PeerSessionResourceTest.cc
  2694. * test/DefaultBtMessageDispatcherTest.cc
  2695. * test/PeerTest.cc
  2696. * test/BtInterestedMessageTest.cc
  2697. * test/BtRejectMessageTest.cc
  2698. * test/BtChokeMessageTest.cc
  2699. * test/DefaultPeerStorageTest.cc
  2700. * test/BtHaveNoneMessageTest.cc
  2701. * test/BtHaveAllMessageTest.cc
  2702. * test/DefaultExtensionMessageFactoryTest.cc
  2703. * test/BtUnchokeMessageTest.cc
  2704. * test/DefaultBtMessageFactoryTest.cc
  2705. * test/HandshakeExtensionMessageTest.cc
  2706. * test/UTPexExtensionMessageTest.cc
  2707. * test/DefaultBtRequestFactoryTest.cc
  2708. * test/BtPieceMessageTest.cc
  2709. Removed typedef PeerStats.
  2710. * src/PeerStat.h
  2711. * src/SegmentMan.cc
  2712. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2713. Added std namespace to copy, remove_copy, back_inserter,
  2714. front_inserter.
  2715. * src/RequestGroupMan.cc
  2716. * src/DefaultPieceStorage.cc
  2717. * src/StreamFileAllocationEntry.cc
  2718. * src/BtFileAllocationEntry.cc
  2719. * src/RequestGroup.cc
  2720. * src/MetalinkEntry.cc
  2721. * src/DelegatingPeerListProcessor.cc
  2722. * src/DefaultBtRequestFactory.cc
  2723. * src/DefaultBtMessageDispatcher.cc
  2724. * src/version_usage.cc: Included <algorithm>
  2725. * src/main.cc
  2726. * src/MetalinkParserController.cc
  2727. * src/DefaultBtContext.cc
  2728. * src/DownloadEngineFactory.cc
  2729. * src/a2algo.h
  2730. Removed.
  2731. * test/StreamUriListParserTest.cc
  2732. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2733. Use PREF_MAX_DOWNLOAD_LIMIT as a threshold for
  2734. ActivePeerConnectionCommand when it is given and
  2735. PREF_MAX_DOWNLOAD_LIMIT < default threshold.
  2736. * src/ActivePeerConnectionCommand.{h, cc}
  2737. * src/BtSetup.cc
  2738. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2739. Only add socket to DownloadEngine's select routine when peer or
  2740. localhost is unchoked and interested. This lowers CPU usage a
  2741. little bit.
  2742. * src/PeerInteractionCommand.cc
  2743. * src/PeerAbstractCommand.{h, cc}
  2744. * src/BtInteractive.h
  2745. * src/DefaultBtInteractive.{h, cc}
  2746. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2747. Revert previous change because get_peers message is needed for
  2748. announce_peer anyway.
  2749. * src/DHTGetPeersCommand.cc
  2750. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2751. Request peers thought DHT only when download hasn't finished.
  2752. * src/DHTGetPeersCommand.cc
  2753. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2754. Force refresh bucket when startup if certain time has passed(currently 15 minutes).
  2755. * src/DHTBucketRefreshTask.{h, cc}
  2756. * src/DHTSetup.cc
  2757. 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2758. Removed "using namespace std;" from all sources. Appended std:: prefix to c++
  2759. standard classes.
  2760. Included string.h where mem* function are used.
  2761. Added namespace aria2.
  2762. 2008-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2763. Create directory before saving DHT routing table.
  2764. Now ios::failure is now handled properly.
  2765. * src/DHTAutoSaveCommand.cc
  2766. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2767. Removed unnecessary cerr.
  2768. * src/DownloadEngine.cc
  2769. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2770. Catch exception inside DHTMessageReceiver::receiveMessage().
  2771. Log unknown message.
  2772. * src/DHTMessageReceiver.{h, cc}
  2773. * src/DHTMessageFactory.h
  2774. * src/DHTMessageFactoryImpl.{h, cc}
  2775. * src/DHTMessageTracker.cc (handleTimeout): Catch and handle exception.
  2776. * src/DHTInteractionCommand.cc
  2777. * src/DHTUnknownMessage.{h, cc}
  2778. * test/DHTUnknownMessageTest.cc
  2779. * test/MockDHTMessageFactory.h
  2780. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2781. Commented out ip address comparison because a host can have multiple
  2782. ip addresses and it is hard to predict the hostname is resolved into
  2783. which one.
  2784. * test/SocketCoreTest.cc (testWriteAndReadDatagram)
  2785. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2786. * po/Makefile.in: Removed since this is generated by configure.
  2787. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2788. Fixed compiler warning about redefinition of SIZE_MAX.
  2789. Use common.h instead of config.h directly here.
  2790. * src/Platform.{h, cc}
  2791. The check of ENABLE_NLS is made in gettext.h, so it is not required
  2792. here.
  2793. * common.h
  2794. 2008-02-02 gettextize <bug-gnu-gettext@gnu.org>
  2795. Updated gettext related files.
  2796. * configure.ac (AC_CONFIG_FILES): Add intl/Makefile.
  2797. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17.
  2798. 2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2799. Added DHT functionality, compatible with mainline.
  2800. DHT is disabled by default. To enable it, give --enable-dht to aria2c.
  2801. You may need to specify entry point to DHT network using
  2802. --dht-entry-point. DHT uses UDP port to listen incoming message.
  2803. Use --dht-listen-port to specify port number. Make sure that your
  2804. firewall configuration can pass through UDP traffic to the port.
  2805. The routing table is saved in $HOME/.aria2/dht.dat.
  2806. * src/DHT*
  2807. * src/BNode.{h, cc}
  2808. * src/PeerInteractionCommand.cc: enable DHT functionality for a
  2809. particular torrent.
  2810. * src/Data.cc: Rewritten ctor.
  2811. * src/OptionHandlerFactory.cc: Added --enable-dht, --dht-listen-port,
  2812. --dht-entry-point.
  2813. * src/DefaultBtInteractive.cc: Send port message if dht is enabled.
  2814. * src/RequestGroup.cc: Initialize DHT functionality. When download
  2815. ends, remove BtContext from DHTPeerAnnounceStorage.
  2816. * src/BtPortMessage.{h, cc}: Rewritten.
  2817. * src/message.h
  2818. * src/OptionHandlerImpl.cc
  2819. * src/option_processing.cc: Added --enable-dht, --dht-listen-port,
  2820. --dht-entry-point.
  2821. * src/Dictionary.{h, cc} (remove): New function.
  2822. * src/prefs.h
  2823. * src/DefaultBtMessageFactory.h
  2824. * src/BtHandshakeMessage.cc
  2825. * src/ActivePeerConnectionCommand.cc
  2826. * src/SocketCore.{h, cc}: Added datagram socket support.
  2827. * src/DefaultBtMessageFactory.cc
  2828. * src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
  2829. Create DHT commands.
  2830. * src/BtMessageFactory.h
  2831. * src/PeerMessageUtil.{h, cc}
  2832. 2008-01-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2833. Fixed the bug that log file is not written when configuration file doesn't exist.
  2834. This is caused by using Logger class before LogFactory is not configured.
  2835. BUG #1875079
  2836. * src/option_processing.cc
  2837. Warning message "configuration doesn't exist" is only printed when --conf is
  2838. given.
  2839. * src/option_processing.cc
  2840. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2841. Use BencodeVisitor and MessageDigestHelper instead of ShaVisitor.
  2842. ShaVisitor is now deprecated and slated to be removed.
  2843. * src/DefaultBtContext.cc
  2844. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2845. Externalize message to message.h
  2846. * src/Platform.cc
  2847. * src/message.h
  2848. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2849. Set default domain and default path to cookie.
  2850. * src/HttpResponse.cc
  2851. * src/CookieBox.{h, cc}
  2852. * src/CookieParser.{h, cc}
  2853. * test/CookieParserTest.cc
  2854. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2855. Added --no-conf and --conf-path command-line option.
  2856. --no-conf option disables loading aria2.conf file.
  2857. --conf-path option changes the configuration file path. The default
  2858. file path is $HOME/.aria2/aria2.conf
  2859. Added a warning message when the configuration file is not found.
  2860. * src/HelpItemFactory.cc
  2861. * src/option_processing.cc
  2862. * src/prefs.h
  2863. * src/usage_text.h
  2864. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2865. Added the message to inform users that other help categories are
  2866. available in -h option.
  2867. * src/version_usage.cc
  2868. * src/TagContainer.{h, cc}
  2869. * test/TagContainerTest.cc
  2870. * src/TaggedItem.{h, cc}
  2871. * test/TaggedItemTest.cc
  2872. * src/HelpItem.h
  2873. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2874. Added Piece::getFirstMissingBlockIndexWithoutLock() and it is called
  2875. from PiecedSegment's ctor.
  2876. Previously Piece::getAllMissingBlockIndexes() is called from
  2877. PiecedSegment() but it is rather expensive since only first element is
  2878. used.
  2879. * src/PiecedSegment.cc
  2880. * src/Piece.{h, cc}
  2881. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2882. Rewritten get*Missing*Index functions. Now no need to allocate memory
  2883. each time these functions are called.
  2884. * src/BitfieldMan.{h, cc}
  2885. * test/BitfieldManTest.cc
  2886. * src/array_fun.h
  2887. * test/array_funTest.cc
  2888. Now BitfieldMan::countBlock() returns BitfieldMan::blocks.
  2889. Added new BitfieldMan::countFilteredBlock() to get the number of blocks
  2890. filtered. Removed unnecessary cast to int32_t.
  2891. * src/BitfieldMan.{h, cc}
  2892. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2893. Fixed the bug that EX_TOO_LONG_PAYLOAD exception is thrown if just
  2894. payload length(4bytes) are received. This happens because lenbufLength
  2895. is not updated in this particular case and successive call of
  2896. receiveMessage() overwrites payload length with bytes recieved which
  2897. are payload body.
  2898. * src/PeerConnection.{h, cc}
  2899. * src/message.h
  2900. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2901. Fixed the bug that DefaultPeerStorage::returnPeer() may delete wrong
  2902. peer if there are peers that have same ipaddr and port.
  2903. I've experiened segmentation fault and "pure virtual function was
  2904. called" error.
  2905. * src/Peer.h
  2906. * test/PeerTest.cc
  2907. * src/DefaultPeerStorage.cc
  2908. * test/DefaultPeerStorageTest.cc
  2909. 2008-01-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2910. Removed a call to isPowerOf() because it is no longer necessary here
  2911. and a request block is not always power of 2.
  2912. BUG#1866924
  2913. * src/PeerMessageUtil.cc (checkLength)
  2914. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2915. Fixed the bug that always first found Segment is removed from
  2916. usedSegmentEntries. Removed unused functions.
  2917. * src/SegmentMan.{h, cc}
  2918. * test/SegmentManTest.cc
  2919. Fixed the bug that ServerHost is not removed.
  2920. * src/RequestGroup.cc
  2921. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2922. Fixed the bug that SegmentMan::completeSegment() is not called
  2923. even if Segment is complete when --lowest-speed-limit is enabled.
  2924. BUG#1864525
  2925. * src/DownloadCommand.{h, cc}
  2926. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2927. Fixed: hash algorithm 'sha1' is always used.
  2928. * src/DownloadCommand.cc (validatePieceHash)
  2929. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2930. Added --enable-peer-exchange command-line option.
  2931. * src/OptionHandlerFactory.cc
  2932. * src/HelpItemFactory.cc
  2933. * src/option_processing.cc
  2934. * src/usage_text.h
  2935. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2936. Move extension from BtRuntime to ExtensionMessageFactory, because
  2937. extension can be specified per peer, not per torrent.
  2938. * src/DefaultBtInteractive.cc
  2939. * src/BtRuntime.h
  2940. * src/ExtendedMessagingAware.h
  2941. * src/ExtensionMessageFactory.h
  2942. * src/DefaultExtensionMessageFactory.cc
  2943. * test/DefaultExtensionMessageFactoryTest.cc
  2944. 2008-01-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2945. Added categorized option help. Specify category using --help option.
  2946. Also added the ability to search options in forward match.
  2947. * src/HelpItem.{h, cc}
  2948. * test/HelpItemTest.cc
  2949. * src/HelpItemFactory.{h, cc}
  2950. * src/TagContainer.{h, cc}
  2951. * test/TagContainerTest.cc
  2952. * src/option_processing.cc
  2953. * src/prefs.h
  2954. * src/TaggedItem.{h, cc}
  2955. * test/TaggedItemTest.cc
  2956. * src/version_usage.cc
  2957. * src/help_tags.h
  2958. * src/usage_text.h
  2959. 2008-01-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2960. Fixed segmentation fault when bad torrent metainfo is parsed.
  2961. Added dynamic_cast properly to detect the misconfiguration of metainfo
  2962. and then throw exception or skip it.
  2963. * src/DefaultBtContext.{h, cc}
  2964. * test/DefaultBtContextTest.cc
  2965. * src/AnnounceList.cc
  2966. * src/CompactPeerListProcessor.cc
  2967. * src/message.h
  2968. * src/DefaultBtAnnounce.{h, cc}
  2969. * test/DefaultBtAnnounceTest.cc
  2970. * src/BencodeVisitor.cc
  2971. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2972. Added missing "B"(=Byte). So now the message looks like this:
  2973. Your share ratio was 1.0, uploaded/downloaded=12MiB/12MiB
  2974. * src/message.h (MSG_SHARE_RATIO_REPORT)
  2975. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2976. Show the seed ratio after torrent downloads.
  2977. For example, after torrent download completed and --seed-time and
  2978. --seed-ratio conditions are fulfilled, following message is printed
  2979. right after "Download complete: .....":
  2980. Your share ratio was 1.0, uploaded/downloaded=12M/12M
  2981. * src/RequestGroupMan.cc
  2982. * src/RequestGroup.{h, cc}
  2983. * src/message.h
  2984. 2007-12-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2985. Remove a defunct control file. A defunct control file means that while
  2986. it exists, but the corresponding download file is missing.
  2987. After its removal, a download restarts from the beginning.
  2988. * src/RequestGroup.cc
  2989. * src/message.h
  2990. 2007-12-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2991. Allocate bitfield in Peer when it is really used. More specifically,
  2992. bitfield in Peer is allocated after the connection is established and
  2993. deallocated when the connection is dropped.
  2994. Since 2 parameters(piece length and total length) was removed from the
  2995. constructor of Peer class, many test classes were modified accordingly.
  2996. See svn log for more detailed information.
  2997. * src/PeerInteractionCommand.cc
  2998. * src/CompactPeerListProcessor.cc
  2999. * src/Peer.cc
  3000. * src/DefaultPeerListProcessor.cc
  3001. * src/PeerListenCommand.cc
  3002. * src/PeerReceiveHandshakeCommand.cc
  3003. Fixed memory leak
  3004. * src/Piece.cc
  3005. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3006. Changed the default value of PREF_PEER_CONNECTION_TIMEOUT and
  3007. lowestSpeedLimit in ActivePeerConnectionCommand. TODO: Make them
  3008. command-line options.
  3009. * src/option_processing.cc
  3010. * src/ActivePeerConnectionCommand.cc
  3011. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3012. Send have message to peer if it already has the piece.
  3013. * src/BtHaveMessage.{h, cc}
  3014. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3015. Removed incomingPeer. Set 0 to peer's port if it is not a listening
  3016. port.
  3017. * src/DefaultPeerStorage.{h, cc}
  3018. * test/DefaultPeerStorageTest.cc
  3019. * src/HandshakeExtensionMessage.cc
  3020. * test/HandshakeExtensionMessageTest.cc
  3021. * src/Peer.{h, cc}: Added ipaddr and port to identity comparison.
  3022. * src/PeerStorage.h
  3023. * test/MockPeerStorage.h
  3024. * src/PeerListenCommand.cc
  3025. * src/PeerReceiveHandshakeCommand.cc
  3026. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3027. Added --metalink-enable-unique-protocol option.
  3028. * src/Metalink2RequestGroup.cc
  3029. * src/option_processing.cc
  3030. * src/prefs.h
  3031. * src/version_usage.cc
  3032. * doc/aria2c.1.txt
  3033. * doc/aria2c.1
  3034. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3035. Allow a peer in incomingPeer to be added peers.
  3036. * src/DefaultPeerStorage.cc
  3037. * test/DefaultPeerStorageTest.cc
  3038. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3039. Fixed the bug that causes aria2 not to finish download. BUG#1855875.
  3040. I could reproduce this bug in following procedure:
  3041. 1. Stop the download at the very beginning(1% or 100KB downloaded).
  3042. 2. Restart aria2.
  3043. 3. You see the download stopped around 99%.
  3044. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  3045. * src/StreamFileAllocationEntry.cc: Removed the timeout handling.
  3046. If timeout is reached, then _nextCommand is unused and it may contains
  3047. segments and they won't be canceled. Actually, timeout is not needed
  3048. here because if the server dropped connection, then retry is made.
  3049. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3050. Added uTorrent compatible Peer Exchange.
  3051. * src/BencodeVisitor.{h, cc}
  3052. * test/BencodeVisitorTest.cc
  3053. * src/BtConstants.h
  3054. * src/BtContext.h: Added 'private' flag.
  3055. * src/BtExtendedMessage.{h, cc}
  3056. * test/BtExtendedMessageTest.cc
  3057. * src/BtHandshakeMessage.{h, cc}: Set extended messaging bit in
  3058. reserved field.
  3059. * test/BtHandshakeMessageTest.cc
  3060. * src/BtMessageFactory.h
  3061. * src/BtRegistry.h
  3062. * src/BtRuntime.h: This class holds default extension message IDs for
  3063. aria2. By default, aria2 uses ID 8 for ut_pex.
  3064. * src/DefaultBtContext.cc
  3065. * src/DefaultBtInteractive.{h, cc}: This class holds _utPexEnabled.
  3066. When it is true, aria2 enables ut_pex. This value is set by
  3067. PeerInteractionCommand.
  3068. * src/DefaultBtMessageFactory.{h, cc}
  3069. * test/DefaultBtMessageFactoryTest.cc
  3070. * src/DefaultBtMessageReceiver.cc: Moved the code of fast extension
  3071. handling to DefaultBtInteractive class.
  3072. * src/DefaultExtensionMessageFactory.{h, cc}
  3073. * test/DefaultExtensionMessageFactoryTest.cc
  3074. * src/DefaultPeerStorage.cc: Returns false if a peer is already in
  3075. the container(peers and incomingPeers. The equality is determined by
  3076. Peer::id).
  3077. * test/DefaultPeerStorageTest.cc
  3078. * src/ExtensionMessage.h
  3079. * test/MockExtensionMessage.h
  3080. * src/ExtensionMessageFactory.h
  3081. * test/MockExtensionMessageFactory.h
  3082. * src/HandshakeExtensionMessage.{h, cc}
  3083. * test/HandshakeExtensionMessageTest.cc
  3084. * src/MetaEntry.h
  3085. * src/Peer.{h, cc}
  3086. * src/PeerInteractionCommand.cc
  3087. * src/PeerReceiveHandshakeCommand.cc: Evaluate the return value of
  3088. addIncomingPeer.
  3089. * src/PeerMessageUtil.{h, cc}
  3090. * src/PeerObject.h
  3091. * src/UTPexExtensionMessage.{h, cc}
  3092. * test/UTPexExtensionMessageTest.cc
  3093. * src/message.h
  3094. * src/prefs.h
  3095. Fixed the bug that returns incomplete data when it contains null
  3096. character. A convenient constructor was also added.
  3097. * src/Data.{h, cc}
  3098. Rewritten.
  3099. * src/CompactPeerListProcessor.cc
  3100. Fixed typos.
  3101. * src/message.h
  3102. * src/MetaFileUtil.cc
  3103. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3104. Added "Status Legend" label to the explanation text of 'stat' in
  3105. download result and moved it to the last. BUG#1848214
  3106. * src/RequestGroupMan.cc
  3107. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3108. Fixed the bug that -lexpat is always added to aria2c_LDADD.
  3109. * src/Makefie.am
  3110. * test/Makefile.am
  3111. 2007-12-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3112. Fixed the bug that prevents aria2 from loading cookie file when expire
  3113. value is greater than 2^31-1. BUG#1851066
  3114. * src/CookieBoxFactory.cc
  3115. * test/CookieBoxFactoryTest.cc
  3116. 2007-12-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3117. Fixed possible memory leak when an exception is thrown.
  3118. * src/XML2SAXMetalinkProcessor.cc
  3119. Added Expat support. If both libxml2 and Expat are installed, then
  3120. libxml2 is used by default.
  3121. MetalinkProcessorFactory chooses from XML2SAXMetalinkProcessor and
  3122. ExpatMetalinkProcessor according to the configuration.
  3123. * src/ExpatMetalinkProcessor.{h, cc}
  3124. * src/main.cc: Removed libxml2 specific header and init/free function.
  3125. * src/MetalinkProcessorFactory.{h, cc}
  3126. * src/MetalinkHelper.cc
  3127. * src/Metalinker.h: Removed unnecessary libxml2 header.
  3128. * src/MetalinkProcessor.h
  3129. * test/XML2SAXMetalinkProcessorTest.cc: Removed because
  3130. MetalinkProcessorTest is used instead.
  3131. * test/MetalinkProcessorTest.cc: Added. It is actually the same with
  3132. XML2SAXMetalinkProcessor, replaced XML2SAXMetalinkProcessor with
  3133. MetalinkProcessorFactory::newInstance().
  3134. * m4/libexpat.m4
  3135. * configure.ac: Added configuration options for libexpat.
  3136. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3137. Disabled -s option in metalink download.
  3138. * src/Metalink2RequestGroup.cc
  3139. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3140. If several protocols are available for a mirror in metalink file,
  3141. aria2 now use one of them. --metalink-preferred-protocol option was
  3142. added to specify the preference of protocol.
  3143. * src/AbstractCommand.cc
  3144. * src/OptionHandlerFactory.cc
  3145. * src/ServerHost.{h, cc}
  3146. * src/Metalink2RequestGroup.cc
  3147. * src/RequestGroup.{h, cc}
  3148. * test/RequestGroupTest.cc
  3149. * src/option_processing.cc
  3150. * src/prefs.h
  3151. * src/HttpResponseCommand.cc
  3152. * src/MetalinkResource.{h, cc}
  3153. * src/FtpNegotiationCommand.cc
  3154. * src/MetalinkEntry.{h, cc}
  3155. * src/MetalinkEntryTest.cc
  3156. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3157. Code cleanup and added debug log.
  3158. * src/PeerConnection.cc
  3159. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3160. Compiler error fix: applied the patch by Tiziano Mueller
  3161. * src/RequestGroup.cc
  3162. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3163. Fixed the bug: only first announce URL is tried in AnnounceTier,
  3164. in stopped and completed event.
  3165. * src/AnnounceList.{h, cc}
  3166. * test/AnnounceListTest.cc
  3167. * src/DefaultBtAnnounce.cc
  3168. * test/DefaultBtAnnounceTest.cc
  3169. Sorted URLs.
  3170. * test/Metalink2RequestGroupTest.cc
  3171. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3172. Removed unnecessary string copy. Updated doc and corrected indentation.
  3173. * src/Base64.cc
  3174. Fixed compilation warnings
  3175. * test/DataTest.cc
  3176. * test/HttpRequestTest.cc
  3177. * test/MetaFileUtilTest.cc
  3178. * test/RequestTest.cc
  3179. * Release 0.12.0
  3180. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3181. Updated translations
  3182. * po/{de,fr,ja,nl,ru}.po
  3183. Added Brazilian Portuguese, Catalan, Italian, Spanish, Swedish
  3184. translations. Many thanks to translators.
  3185. * po/{ca,es,it,pt_BR,sv}.po
  3186. * po/LINGUAS
  3187. 2007-12-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3188. Added a notice about URL
  3189. * src/version_usage.cc
  3190. 2007-12-07 Tatsuhiro Tsujikawa <tujikawa at rednoah com>
  3191. Fixed the bug#1845750; CTRL+C does not stop torrent.
  3192. aria2 repeatedly sends stopped request when tracker returns error code.
  3193. * src/AnnounceList.cc
  3194. * test/AnnounceListTest.cc
  3195. * src/AnnounceTier.h
  3196. Added a message when ctrl-c is hit.
  3197. Now second ctrl-c is also handled in signal handler.
  3198. * src/RequestGroupMan.{h, cc}
  3199. * src/RequestGroup.{h, cc}
  3200. * src/MultiUrlRequestInfo.cc
  3201. * src/DownloadEngine.cc
  3202. * src/TrackerWatcherCommand.cc
  3203. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3204. Code cleanup
  3205. * src/Base64.cc (encode)
  3206. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3207. Changed Direct/IO enable/disable procesure in file allocation routine.
  3208. * src/SingleFileAllocationIterator.cc
  3209. (SingleFileAllocationIterator):
  3210. Disable directIO if offset is not multiple of 512.
  3211. (~SingleFileAllocationIterator): Removed a call to disableDirectIO.
  3212. * src/MultiFileAllocationIterator.cc (allocateChunk):
  3213. Enable created SingleFileAllocationIterator's directIO.
  3214. * src/FileAllocationEntry.cc
  3215. (FileAllocationEntry): Enable directIO here.
  3216. (~FileAllocationEntry): Disable directIO here.
  3217. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3218. Fixed the bug: aria2 doesn't utilize fast set index offered by peer.
  3219. * src/Peer.{h, cc}
  3220. * src/DefaultPieceStorage.cc
  3221. * test/DefaultPieceStorageTest.cc
  3222. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3223. Rewritten direct I/O support routine
  3224. * src/SingleFileAllocationIterator.cc
  3225. * src/MultiDiskAdaptor.{h, cc}
  3226. * src/ByteArrayDiskWriter.h
  3227. * src/AbstractSingleDiskAdaptor.h
  3228. * src/AbstractDiskWriter.cc
  3229. * src/DefaultPieceStorage.cc
  3230. * src/DiskWriter.h
  3231. * src/BinaryStream.h
  3232. * src/IteratableChunkChecksumValidator.cc
  3233. * src/IteratableChecksumValidator.cc
  3234. * src/CheckIntegrityEntry.cc
  3235. * src/FileAllocationEntry.cc
  3236. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3237. Fixed typo
  3238. * src/version_usage.cc
  3239. Updated doc
  3240. * doc/aria2c.1.txt
  3241. * doc/aria2c.1
  3242. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3243. Fixed compile error without message digest support.
  3244. * src/FileMetalinkParserState.cc
  3245. * src/MetalinkParserController.{h, cc}
  3246. * test/XML2SAXMetalinkProcessorTest.cc
  3247. * test/MetalinkParserControllerTest.cc
  3248. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3249. Enable direct I/O support in checksum checking.
  3250. * src/IteratableChunkChecksumValidator.{h, cc}
  3251. * test/IteratableChunkChecksumValidatorTest.cc
  3252. * src/CheckIntegrityEntry.cc
  3253. * src/PieceHashCheckIntegrityEntry.cc
  3254. * src/IteratableChecksumValidator.{h, cc}
  3255. * src/BtCheckIntegrityEntry.cc: Added doc.
  3256. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3257. Added --allow-piece-length-change option.
  3258. * src/DefaultBtProgressInfoFile.cc
  3259. * test/DefaultBtProgressInfoFileTest.cc
  3260. * src/OptionHandlerFactory.cc
  3261. * src/option_processing.cc
  3262. * src/prefs.h
  3263. * src/version_usage.cc
  3264. * doc/aria2c.1.txt
  3265. * doc/aria2c.1
  3266. Fixed: duplicated result entry appears when exception is thrown in
  3267. RequestGroup::createInitiateConnectionCommand().
  3268. * src/RequestGroupMan.cc (fillRequestGroupFromReserver):
  3269. Add RequestGroup to _requestGroup after RequetGroup::
  3270. createInitiateConnectionCommand() succeeds.
  3271. Externalized message
  3272. * src/XML2SAXMetalinkProcessor.cc
  3273. * src/message.h
  3274. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3275. Forced download abort when received negative response from http/ftp
  3276. server.
  3277. * src/HttpResponseCommand.cc
  3278. * src/FtpNegotiationCommand.cc
  3279. * src/HttpResponse.cc
  3280. * src/FtpConnection.cc
  3281. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3282. Added XML2SAXMetalinkProcessor class, which is a lot faster than
  3283. the predecessor, Xml2MetalinkParser class.
  3284. I tested them against 94KB metalink file with 1234 chunk checksums.
  3285. The new one parsed it in 22msec, while it took 6000msec with old one.
  3286. * src/XML2SAXMetalinkProcessor.{h, cc}
  3287. * test/XML2SAXMetalinkProcessorTest.cc
  3288. * src/MetalinkParserController.{h, cc}
  3289. * test/MetalinkParserControllerTest.cc
  3290. * src/MetalinkParserState.h: Also added 16 subclasses.
  3291. * src/main.cc
  3292. * src/Metalink2RequestGroup.cc
  3293. * src/MetalinkHelper.cc
  3294. * src/MetalinkEntry.cc
  3295. * src/ChunkChecksum.h
  3296. Rewritten Base64 class for better performance.
  3297. * src/Base64.{h, cc}
  3298. * test/Base64Test.cc
  3299. * src/HttpRequest.cc
  3300. 2007-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3301. Fixed the bug#1841757: aria2 will connect to server to only get
  3302. file size.
  3303. * src/StreamFileAllocationEntry.cc
  3304. * src/option_processing.cc
  3305. * src/HttpResponseCommand.cc: Now reuse connection in segmented
  3306. downloads.
  3307. * src/FtpNegotiationCommand.cc
  3308. Suppressed wrong message when finding PreDownloadHandler
  3309. * src/RequestGroup.cc
  3310. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3311. Updated usage
  3312. * src/version_usage.cc
  3313. Updated man page
  3314. * doc/aria2c.1.txt
  3315. * doc/aria2c.1
  3316. Updated po files
  3317. * po/aria2c.pot
  3318. * po/*.po
  3319. * po/*.gmo
  3320. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3321. Eliminated g++-4.2 warning
  3322. * src/DownloadHandlerConstants.{h, cc}
  3323. * src/Util.cc
  3324. * test/MetaFileUtilTest.cc
  3325. * test/PStringBuildVisitorTest.cc
  3326. Fixed bug: --check-integrity doesn't work for multi file torrent.
  3327. * src/RequestGroup.cc
  3328. * src/BtCheckIntegrityEntry.cc
  3329. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3330. Fixed a2io.h
  3331. * src/a2io.h
  3332. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3333. Added direct I/O support. The current implementation uses O_DIRECT,
  3334. which is not posix standard and is tested on linux 2.6.21.
  3335. Currently only file allocation uses direct I/O.
  3336. * src/SingleFileAllocationIterator.{h, cc}
  3337. * test/SingleFileAllocationIteratorTest.cc
  3338. * src/MultiFileAllocationIterator.{h, cc}
  3339. * test/MultiFileAllocationIteratorTest.cc
  3340. * src/BinaryStream.h
  3341. * src/DiskWriter.h
  3342. * src/AbstractDiskWriter.{h, cc}
  3343. * src/ByteArrayDiskWriter.h
  3344. * src/DiskAdaptor.h
  3345. * src/AbstractSingleDiskAdaptor.{h, cc}
  3346. * src/MultiDiskAdaptor.{h, cc}
  3347. * src/FileAllocationEntry.cc
  3348. * src/Util.{h, cc}
  3349. * src/OptionHandlerFactory.cc
  3350. * src/prefs.h
  3351. * src/version_usage.cc
  3352. * src/option_processing.cc
  3353. Moved FileAllocationMan::markCurrentFileAllocationEntryDone() to
  3354. handleException.
  3355. * src/MultiFileAllocationIterator.cc
  3356. Added EINTR handling
  3357. * src/SocketCore.cc
  3358. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3359. Updated usage
  3360. * src/version_usage.cc
  3361. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3362. Applied Ross's patch for MinGW port.
  3363. * src/DownloadEngine.h
  3364. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3365. Set Content-Type to SingleFileDownloadContext when http response is
  3366. received.
  3367. * src/HttpResponseCommand.cc
  3368. * src/HttpResponse.{h, cc}
  3369. * test/HttpResponseTest.cc
  3370. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3371. Rewritten to add content-type support.
  3372. * src/DownloadHandler.{h, cc}
  3373. * src/BtPostDownloadHandler.{h, cc}
  3374. * test/BtPostDownloadHandlerTest.cc
  3375. * src/MetalinkPostDownloadHandler.{h, cc}
  3376. * test/MetalinkPostDownloadHandlerTest.cc
  3377. * src/PostDownloadHandler.{h, cc}
  3378. * src/DownloadHandlerConstants.{h, cc}
  3379. * src/RequestGroup.cc
  3380. * src/HttpResponseCommand.cc
  3381. * src/FtpNegotiationCommand.cc
  3382. * src/SingleFileDownloadContext.{h, cc}
  3383. * src/RequestGroup.h
  3384. * src/RequestGroupCriteria.h
  3385. * src/ContentTypeRequestGroupCriteria.h
  3386. Added 'mem' option value for --follow-metalink, --follow-torrent.
  3387. If it is give, metalink/torrent file is not written to the disk, but
  3388. just is kept in memory. Parsing is occurred on memory.
  3389. * src/MetalinkHelper.{h, cc}
  3390. * src/MetalinkProcessor.h
  3391. * src/Xml2MetalinkProcessor.{h, cc}
  3392. * test/Xml2MetalinkProcessorTest.cc
  3393. * src/DownloadHandlerFactory.{h, cc}
  3394. * test/DownloadHandlerFactoryTest.cc
  3395. * src/PreDownloadHandler.{h, cc}
  3396. * src/OptionHandlerFactory.cc
  3397. * src/DefaultBtContext.{h, cc}
  3398. * test/DefaultBtContextTest.cc
  3399. * src/version_usage.cc
  3400. * src/Metalink2RequestGroup.{h, cc}
  3401. * src/RequestGroup.{h, cc}
  3402. * src/a2functional.h
  3403. * test/a2functionalTest.cc
  3404. * src/MemoryBufferPreDownloadHandler.{h, cc}
  3405. * src/OptionHandlerImpl.h
  3406. * src/prefs.h
  3407. * src/Util.{h, cc}
  3408. * test/UtilTest.cc
  3409. Keep DownloadResult rather than RequestGroup after downloads to reduce
  3410. memory usage.
  3411. * src/RequestGroupMan.{h, cc}
  3412. * src/DownloadEngine.cc
  3413. * src/BtDependency.{h, cc}: Changed the type of dependee from
  3414. WeakHandle to SharedHandle because WeakHandle could be null.
  3415. * src/RequestGroup.{h, cc}
  3416. * src/DownloadEngineFactory.cc
  3417. * src/DownloadResult.h
  3418. Set totalLength after download finished
  3419. * src/UnknownLengthPieceStorage.{h, cc}
  3420. Keep torrent file specified in metalink in memory.
  3421. * src/Metalink2RequestGroup.cc
  3422. * src/BtDependency.cc
  3423. * src/TrueRequestGroupCriteria.h
  3424. Fixed the bug: seekg is used where seekp should be used.
  3425. * src/ByteArrayDiskWriter.cc
  3426. * test/ByteArraydiskWriterTest.cc
  3427. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3428. Fixed syntax error
  3429. * test/SequenceTest.cc
  3430. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3431. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  3432. * src/RequestGroupMan.cc (isSameFileBeingDownloaded)
  3433. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  3434. * src/RequestGroup.cc (downloadFinishedByFileLength)
  3435. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3436. Added the check to see whether ares_host_callback accepts timeouts
  3437. with c-ares; only c-ares 1.5.0 or newer accepts it.
  3438. * src/NameResolver.{h, cc}
  3439. * m4/libcares.m4
  3440. * configure.ac: Set C++ for language choice.
  3441. 2007-11-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3442. Fixed: compilation fails without c-ares/ares
  3443. * src/DownloadEngine.cc (addCommand): Moved outside #ifdef
  3444. Generate http/ftp commands only when download is incomplete.
  3445. * src/BtFileAllocationEntry.cc (prepareForNextAction)
  3446. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3447. Corrected typo. Examples are removed since they are available in man
  3448. page.
  3449. * src/version_usage.cc
  3450. Updated man page.
  3451. * doc/aria2c.1
  3452. * doc/aria2c.1.txt
  3453. * doc/makeman: Commented out sed command.
  3454. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3455. Throw DlAbortEx when a remote file is not found.
  3456. * src/HttpResponse.cc
  3457. * src/FtpNegotiationCommand.cc
  3458. * src/message.h
  3459. Overwrite an existing file if --allow-overwrite=true is given.
  3460. * src/RequestGroup.cc
  3461. Removed unused functions
  3462. * src/AbstractCommand.h
  3463. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3464. Removed 'extern' from 'extern typedef ...' in src/*.h
  3465. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3466. Updated usage
  3467. * src/version_usage.cc
  3468. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3469. Trim announce URL
  3470. * src/DefaultBtContext.cc
  3471. * test/ShaVisitorTest.cc
  3472. Trim argument s. Give trimed s to exception constructor.
  3473. * src/Util.cc (parseInt)(parseLLInt)
  3474. * test/UtilTest.cc
  3475. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3476. Set precision back to 1.
  3477. * src/ConsoleStatCalc.cc (calculateStat)
  3478. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3479. Replaced strtol with Util::parseInt
  3480. * src/ChunkedEncoding.cc
  3481. * src/HttpConnection.cc
  3482. * src/CookieBoxFactory.cc
  3483. * src/ParameterizedStringParser.cc
  3484. * src/Util.cc
  3485. * test/UtilTest.cc
  3486. * test/OptionHandlerTest.cc
  3487. * src/Request.cc
  3488. Throw exception when empty string is given. The message for exception
  3489. changed.
  3490. * src/Util.cc (parseInt)(parseLLInt)
  3491. * src/message.h
  3492. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3493. Set precision to 2 because share ratio is rounded into 1.0 if precision
  3494. set to 1.
  3495. * src/ConsoleStatCalc.cc (calculateStat)
  3496. 2007-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3497. Preallocate non-requested file which is adjacent forward to requested
  3498. file('requested' files means the files given in --select-file option)
  3499. if they share a same piece.
  3500. This fixes long pause in the file system which doesn't support sparse
  3501. files like FAT32 while downloading.
  3502. * src/MultiFileAllocationIterator.{h, cc}
  3503. * test/MultiFileAllocationIteratorTest.cc
  3504. * src/FileEntry.{h, cc}
  3505. Removed unused _option.
  3506. * src/MultiDiskAdaptor.h
  3507. * test/MultiDiskAdaptorTest.cc
  3508. * src/DefaultPieceStorage.cc
  3509. Set the default value of --seed-ratio to 1.0.
  3510. If 0.0 is given, then seeding continues regardless of share ratio.
  3511. * src/version_usage.cc
  3512. * src/option_processing.cc
  3513. * src/BtSetup.cc
  3514. * doc/aria2c.1.txt
  3515. * doc/aria2c.1
  3516. Fixed: Selective download is not working in BitTorrent
  3517. * src/RequestGroup.cc
  3518. Introduced Sequence class. Use this instead of Util::unfoldRange()
  3519. * src/PieceStorage.h
  3520. * test/MockPieceStorage.h
  3521. * src/UnknownLengthPieceStorage.h
  3522. * src/DefaultPieceStorage.{h, cc}
  3523. * src/Metalink2RequestGroup.cc
  3524. * src/RequestGroup.cc
  3525. * src/Sequence.h
  3526. * test/SequenceTest.cc
  3527. * src/IntSequence.h
  3528. * src/message.h
  3529. * src/Util.{h, cc}
  3530. * test/UtilTest.cc
  3531. Added new function 'parse' to catch exception thrown by subclass's
  3532. parseArg
  3533. * src/OptionHandler.h
  3534. * src/OptionParser.cc
  3535. * src/NameMatchOptionHandler.h
  3536. * src/OptionHandlerImpl.h
  3537. * test/OptionHandlerTest.cc
  3538. Added IntegerRangeOptionHandler. Used for --listen-port and
  3539. --select-file. Now --listen-port accepts range of port.
  3540. * src/OptionHandlerFactory.cc
  3541. * src/version_usage.cc
  3542. * src/OptionHandlerImpl.h
  3543. * src/option_processing.cc
  3544. * src/BtSetup.cc
  3545. * src/PeerListenCommand.{h, cc}
  3546. * doc/aria2c.1.txt
  3547. * doc/aria2c.1
  3548. Implemented operator< for Exception class to provide easy way to print
  3549. exception stack trace.
  3550. * src/Exception.{h, cc}
  3551. * src/main.cc
  3552. * src/option_processing.cc
  3553. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3554. * src/version_usage.cc
  3555. (showVersion): Reworked.
  3556. (showUsage): Added examples.
  3557. Removed Hint for total length and file name.
  3558. * src/Metalink2RequestGroup.cc
  3559. * src/RequestGroup.{h, cc}
  3560. * src/HttpResponseCommand.cc
  3561. * src/FtpNegotiationCommand.cc
  3562. Now --follow-torrent and --follow-metalink option work properly.
  3563. * src/RequestGroup.cc
  3564. Updated man page
  3565. * doc/aria2c.1.txt
  3566. * doc/aria2c.1
  3567. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3568. Removed.
  3569. * src/PiecedSegment.{h, cc} (operator==)(operator!=)
  3570. Use Segment::operator==()
  3571. * src/HttpConnection.cc
  3572. * src/Segment.h
  3573. Updated usage
  3574. * src/version_usage.cc
  3575. Added EINTR treatment.
  3576. * src/SocketCore.cc
  3577. * src/AbstractDiskWriter.cc
  3578. Rewritten.
  3579. * src/Util.cc (rangedFileCopy)
  3580. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3581. Fixed typo.
  3582. * src/version_usage.cc
  3583. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3584. Implemented. Now -c option works fine.
  3585. * src/DefaultPieceStorage.cc (markPiecesDone)
  3586. * test/DefaultPieceStorageTest.cc
  3587. Removed.
  3588. * src/SegmentMan.{h, cc}
  3589. (markAllPiecesDone)
  3590. (markPieceDone)
  3591. Synchronized po files with
  3592. https://translations.launchpad.net/aria2/trunk/+pots/aria2c
  3593. * src/fr.po
  3594. * src/ru.po
  3595. * src/de.po
  3596. * src/ja.po
  3597. 2007-11-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3598. Added ifdef and some modifications to compile without BitTorrent,
  3599. Metalink, MessageDigest
  3600. support.
  3601. * src/PieceHashCheckIntegrityEntry.cc
  3602. * src/MetalinkEntry.h
  3603. * src/version_usage.cc
  3604. * src/main.cc
  3605. * src/DownloadEngine.{h, cc}
  3606. * src/Metalink2RequestGroup.cc
  3607. * src/Peer.cc
  3608. * src/RequestGroup.cc
  3609. * src/MetalinkHelper.cc
  3610. * test/DefaultPieceStorageTest.cc
  3611. * test/MetalinkPostDownloadHandlerTest.cc
  3612. * test/Metalink2RequestGroupTest.cc
  3613. Hide TOTAL SPD when all downloads complete.
  3614. * src/ConsoleStatCalc.cc
  3615. Log target system information.
  3616. * src/main.cc
  3617. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3618. Now --metalink-location accepts a comma-deliminated list of locations.
  3619. * src/MetalinkEntry.{h, cc}
  3620. * test/MetalinkEntryTest.cc
  3621. * src/version_usage.cc
  3622. * src/Metalink2RequestGroup.cc
  3623. * src/Xml2MetalinkProcessor.cc
  3624. * test/Xml2MetalinkProcessorTest.cc
  3625. * doc/aria2c.1.txt
  3626. * doc/aria2c.1
  3627. * src/Util.cc (toUpper)(toLower): Rewritten.
  3628. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3629. Added the ability to detect duplicate download entry which is about to
  3630. download the same file other RequestGroup is downloading.
  3631. * src/RequestGroup.cc
  3632. * src/HttpResponseCommand.cc
  3633. * src/FtpNegotiationCommand.cc
  3634. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3635. Recalculates download progress when loading a control file,
  3636. if the piece length of DownloadContext is different from the one saved
  3637. in the control file. Currently in-flight pieces are ignored.
  3638. * src/DefaultBtProgressInfoFile.cc
  3639. * test/DefaultBtProgressInfoFileTest.cc
  3640. * src/Util.{h, cc}
  3641. * test/UtilTest.cc
  3642. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3643. Do not rotate tiers in announce-list.
  3644. * src/DefaultBtAnnounce.{h, cc}: Removed trackerNumTry.
  3645. AnnounceList::allTiersFailed() used instead to detect whether all
  3646. tiers are tried and failed.
  3647. * test/DefaultBtAnnounceTest.cc
  3648. * src/AnnounceList.{h, cc}: If all tiers are tried and failed then
  3649. allTiersFailed() returns true. To reset tier pointer, call resetTier();
  3650. * test/AnnounceListTest.cc
  3651. * src/TrackerWatcherCommand.cc (execute): Removed DlAbortEx catch
  3652. clause. Catch RecoverableException instead of DlRetryEx instead.
  3653. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3654. Implemented checksum validation feature(1 checksum for each file)
  3655. The validation takes place after the download.
  3656. * src/PieceHashCheckIntegrityEntry.{h, cc}: New class.
  3657. * src/IteratableChecksumValidator.{h, cc}: Rewritten.
  3658. * src/CheckIntegrityCommand.cc: Changed log message.
  3659. * src/Metalink2RequestGroup.cc: Set checksum to
  3660. SingleFileDownloadContext.
  3661. * src/StreamCheckIntegrityEntry.{h, cc}: Now derived from
  3662. PieceHashCheckIntegrity class.
  3663. * src/BtCheckIntegrityEntry.{h, cc}: Now derived from
  3664. PieceHashCheckIntegrity class.
  3665. * src/ChecksumCheckIntegrityEntry.{h, cc}: New class.
  3666. * src/IteratableValidator.h: New class.
  3667. * src/message.h
  3668. * src/CheckIntegrityEntry.{h, cc}
  3669. * src/IteratableChunkChecksumValidator.{h, cc}
  3670. * src/SingleFileDownloadContext.h
  3671. * src/DownloadCommand.cc
  3672. --allow-overwrite=true is no longer needed to check file integrity
  3673. before download in BitTorrent download.
  3674. * src/RequestGroup.cc (getInitialCommand)
  3675. Removed RequestGroup from queue when RequestGroup::getInitialCommand()
  3676. throws exception.
  3677. * src/RequestGroupMan.cc (getInitialCommands)
  3678. 2007-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3679. urlencode the given url inside Request::parseUrl(...)
  3680. * src/Request.{h, cc}
  3681. * src/Util.{h, cc}
  3682. * test/RequestTest.cc
  3683. Removed #!metalink3! notation support because it is deleted from
  3684. the metalink specification.
  3685. * src/Request.{h, cc}
  3686. * test/RequestTest.cc
  3687. 2007-11-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3688. Don't connect server before checking file integrity at startup, if
  3689. filesize and output file path are known.
  3690. * src/AbstractCommand.cc
  3691. * src/StreamFileAllocationEntry.cc
  3692. * src/Metalink2RequestGroup.cc
  3693. * src/RequestGroup.{h, cc}
  3694. * src/HttpResponseCommand.cc
  3695. * src/FtpNegotiationCommand.cc
  3696. Added DownloadFailureException. If it is thrown, RequestGroup should
  3697. halt.
  3698. * src/AbstractCommand.cc
  3699. * src/DownloadFailureException.h
  3700. * src/RequestGroup.cc
  3701. Catch RecoverableException, instead of DlAbortEx.
  3702. * src/RequestGroupMan.cc
  3703. * src/FillRequestGroupCommand.cc
  3704. * src/MetaFileUtil.cc
  3705. * src/IteratableChunkChecksumValidator.cc
  3706. Now first parameter of MSG_DOWNLOAD_ABORTED is gid(RequestGroup::
  3707. getGID())
  3708. * src/CheckIntegrityCommand.cc
  3709. * src/message.h
  3710. Print gid instead of idx.
  3711. * src/RequestGroupMan.cc
  3712. Removed exception throwers declaration.
  3713. * src/DirectDiskAdaptor.{h, cc}
  3714. * src/SocketCore.{h, cc}
  3715. * src/MultiDiskAdaptor.{h, cc}
  3716. * src/HttpConnection.{h, cc}
  3717. * src/HttpResponse.{h, cc}
  3718. * src/DiskAdaptor.{h, cc}
  3719. * src/CopyDiskAdaptor.{h, cc}
  3720. * src/MultiDiskAdaptor.{h, cc}
  3721. * src/HttpHeaderProcessor.{h, cc}
  3722. * src/AbstractSingleDiskAdaptor.{h, cc}
  3723. * src/Util.{h, cc}
  3724. * test/UtilTest.cc
  3725. * src/DefaultDiskWriter.{h, cc}
  3726. * src/FtpConnection.{h, cc}
  3727. * src/AbstractDiskWriter.{h, cc}
  3728. Removed duplicate code.
  3729. * src/StreamCheckIntegrityEntry.cc
  3730. Removed unnecessary include.
  3731. * src/DiskWriter.h
  3732. Included Exception.h
  3733. * src/option_processing.cc
  3734. Included 2 files and added doc
  3735. * src/TrackerWatcherCommand.cc
  3736. * src/SocketCore.cc (writeData): Fixed send error with GnuTLS.
  3737. 2007-11-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3738. Changed CheckIntegrityEntry interface so that it can define
  3739. the action when all the chunk checksums are valid.
  3740. * src/CheckIntegrityEntry.h
  3741. * src/StreamCheckIntegrityEntry.{h, cc}
  3742. * src/BtCheckIntegrityEntry.{h, cc}: Currently,when all the checksums
  3743. are valid, then aira2 goes to seeding mode. Sometimes it is better
  3744. to exit rather than doing seeding. So, it would be good to toggle this
  3745. behavior.
  3746. * src/CheckIntegrityCommand.cc
  3747. * src/AbstractCommand.cc
  3748. * src/RequestGroup.cc
  3749. 2007-11-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3750. Reflect the download length of in-flight pieces.
  3751. It makes the download length readout more precise.
  3752. * src/DefaultPieceStorage.{h, cc}
  3753. * test/DefaultPieceStorageTest.cc
  3754. * src/a2functional.h
  3755. * test/a2functionalTest.cc
  3756. Lower CPU load when --max-download-limit is used.
  3757. There is up and down in speed indicator when enabling
  3758. http-pipelining but a download goes well. I think the problem is that
  3759. because http-pipelining is enabled, DownloadCommand is created for
  3760. each segment and in its constructor, PeerStat::downloadStart() is
  3761. called. In PeerStat::downloadStart(), speed calculation object is
  3762. reseted, which makes download speed zero.
  3763. * src/DownloadCommand.cc
  3764. Rewritten using accumulate.
  3765. * src/RequestGroupMan.cc (calculateStat)
  3766. Code clearnup.
  3767. * src/FtpNegotiationCommand.cc
  3768. * src/HttpResponseCommand.cc
  3769. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3770. Fixed: Can not resume: aria2 reports download already finished.
  3771. * src/AbstractCommand.{h, cc}
  3772. * src/HttpResponseCommand.cc
  3773. * src/FtpNegotiateCommand.cc
  3774. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3775. Now a file is stored in the directory specified in .metalnk file
  3776. (file[@name]).
  3777. * src/Metalink2RequestGroup.cc
  3778. Create the directory structure when opening the file if it doesn't
  3779. exist.
  3780. * src/AbstractDiskWriter.cc
  3781. * src/Util.{h, cc}
  3782. * src/File.h
  3783. * test/UtilTest.cc
  3784. Removed file name comparison
  3785. * src/Metalink2RequestGroup.cc
  3786. * src/HttpResponseCommand.cc
  3787. Rewritten using Util::mkdirs()
  3788. * src/FileEntry.cc (setupDir)
  3789. * test/FileEntryTest.cc
  3790. Updated doc
  3791. * src/SingleFileDownloadContext.h
  3792. 2007-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3793. Now SleepCommand dispatches nextCommand when halt is requested.
  3794. It avoids a possible long wait after hitting CTRL-C.
  3795. * src/SleepCommand.{h, cc}
  3796. * src/RequestGroupAware.{h, cc}
  3797. 2007-11-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3798. Fixed: the listen port sent to the tracker is wrong. If aria2 fails
  3799. to open listen port, then remove the port number from the tracker
  3800. request.
  3801. * src/DefaultBtAnnounce.cc
  3802. * test/DefaultBtAnnounceTest.cc
  3803. * test/MockPieceStorage.h
  3804. Inject randomizer to DefaultBtAnnounce and DefaultBtContext to make
  3805. them more testable.
  3806. * src/DefaultBtAnnounce.{h, cc}
  3807. * src/DefaultBtContext.{h, cc}
  3808. * src/Util.{h, cc}
  3809. * test/DefaultBtAnnounceTest.cc
  3810. * test/DefaultBtContextTest.cc
  3811. * test/UtilTest.cc
  3812. Added 'B' to upload bytes readout.
  3813. * src/ConsoleStatCalc.cc
  3814. Now the listen port for BitTorrent download is opened when it is
  3815. needed.
  3816. * src/DownloadEngineFactory.cc
  3817. * src/BtSetup.{h, cc}
  3818. * src/PeerListenCommand.{h, cc}
  3819. Now an exception thrown while parsing tracker response is now logged.
  3820. If DlAbortEx is catched, then btAnnounce->resetAnnounce() immediately
  3821. called, which means no retry is made in this case, assuming a tracker
  3822. has a problem.
  3823. * src/TrackerWatcherCommand.cc
  3824. Fixed: downloading a file whose length is unkown fails.
  3825. * src/DownloadCommand.cc
  3826. Simplified prepareForNextSegment()
  3827. * src/DownloadCommand.cc
  3828. Updated
  3829. * po/POTFILES.in
  3830. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3831. Re-implemented a file listing for Metalink, which was dropped while
  3832. http/ftp/torrent integration was being implemented.
  3833. * src/MetalinkHelper.{h, cc}: New class.
  3834. * test/MetalinkHelperTest.cc
  3835. * src/main.cc
  3836. * src/Metalink2RequestGroup.cc
  3837. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3838. Added the ability to display the detailed torrent file information.
  3839. Now -S option gives not only a file listing, but also total download
  3840. length, info hash, announce URI, piece length, the number of pieces,
  3841. and mode(single or multi-torrent).
  3842. * src/DefaultBtContext.{h, cc} (operator<<): New function.
  3843. * src/Util.cc (toStream): Show file length in a abbreviated form(like
  3844. KiB)
  3845. * test/UtilTest.cc
  3846. * src/main.cc
  3847. 2007-10-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3848. Added ftp://USER:PASSWD@Servername automatic parsing.
  3849. * src/Request.{h, cc}: Removed AuthResolvers. Added _username and
  3850. _password. Recognize username and password in URI.
  3851. * src/main.cc: Use AuthConfigFactory instead of RequestFactory.
  3852. * src/RequestGroup.cc: Use AuthConfigFactory instead of RequestFactory.
  3853. * src/RequestFactory.{h, cc}: Removed.
  3854. * src/AuthConfigFactory.{h, cc}: New class.
  3855. * src/FtpConnection.cc: Use AuthConfigFactory.
  3856. * src/HttpRequest.cc: Use AuthConfigFactory.
  3857. * test/HttpRequestTest.cc: Updated.
  3858. * test/RequestTest.cc: Updated.
  3859. * test/AuthConfigFactoryTest.cc: New class.
  3860. * test/RequestFactoryTest.cc: Removed.
  3861. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3862. Use RequestGroup::allDownloadFinished() to decide whether the control
  3863. file should be removed or saved.
  3864. * src/RequestGroup.{h, cc} (allDownloadFinished): New function.
  3865. * src/RequestGroupMan.cc (removeStoppedGroup) (save)
  3866. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3867. Use File::renameTo()
  3868. * src/DefaultBtProgressInfoFile.cc
  3869. Added --no-file-allocation-limit command-line option.
  3870. * src/version_usage.cc
  3871. * src/option_processing.cc
  3872. * src/OptionHandlerFactory.cc
  3873. * src/RequestGroup.{h, cc}
  3874. * src/BtCheckIntegrityEntry.cc
  3875. * src/StreamCheckIntegrityEntry.cc
  3876. * src/prefs.h
  3877. * doc/aria2c.1.txt
  3878. * doc/aria2c.1
  3879. Now prealloc is the default value for --file-allocation option.
  3880. * src/version_usage.cc
  3881. * src/option_processing.cc
  3882. * doc/aria2c.1.txt
  3883. * doc/aria2c.1
  3884. Don't URL-encode user-agent.
  3885. * src/HttpRequest.cc
  3886. Updated translations
  3887. * po/LINGUAS: Added nl for Dutch translation.
  3888. * po/nl.po: Added Dutch translation, thanks to A. Bram Neijt.
  3889. * po/de.po: Updated German translation, thanks to Patrick Ruckstuhl.
  3890. * po/POTFILES.in: Updated.
  3891. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3892. Added the ability to recognize url-list in a torrent file.
  3893. The retrieved URLs are attached to the corresponding FileEntry.
  3894. * src/DefaultBtContext.{h, cc}
  3895. * src/FileEntry.{h, cc}
  3896. * test/DefaultBtContextTest.cc
  3897. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3898. * src/ConsoleStatCalc.cc: Let the user know that aria2 is now seeding
  3899. after the download finishes.
  3900. 2007-10-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3901. * src/Piece.{h, cc}: Added SubPiece infrastructure to track down
  3902. the data smaller than block length.
  3903. A block length can be specified by constructor's argument.
  3904. * src/DefaultPieceStorage.{h, cc} (getMissingPiece):
  3905. Get a missing piece in the range of given FileEntry. This function is
  3906. not used in the program yet.
  3907. * src/Util.h: Added some macros.
  3908. 2007-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3909. Added HTTP/1.1 keep alive and pipelining support.
  3910. See --enable-http-keep-alive and --enable-http-pipelining option.
  3911. * src/AbstractCommand.{h, cc}: Now it has one-to-many relation to
  3912. Segment.
  3913. * src/HttpDownloadCommand.{h, cc}
  3914. * src/OptionHandlerFactory.cc
  3915. * src/HttpConnection.{h, cc}
  3916. * src/version_usage.cc
  3917. * src/HttpInitiateConnectionCommand.cc
  3918. * src/FtpInitiateConnectionCommand.cc
  3919. * src/Segment.h
  3920. * src/HttpRequestCommand.{h, cc}
  3921. * src/option_processing.cc
  3922. * src/prefs.h
  3923. * src/HttpResponseCommand.cc
  3924. * src/SegmentMan.{h, cc}
  3925. * src/FtpNegotiateCommand.cc
  3926. * src/HttpProxyResponseCommand.cc
  3927. * src/Request.cc
  3928. * src/HttpRequest.cc
  3929. * src/DownloadCommand.cc
  3930. * test/HttpRequestTest.cc
  3931. * test/RequestTest.cc
  3932. 2007-10-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3933. * src/ConsoleCalc.cc (calculateStat): Hide SPD after the download
  3934. finished.
  3935. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3936. * src/Metalink2RequestGroup.cc (generate): Throw exception instead of
  3937. catching it inside the method.
  3938. When no file entry is found in a metalink without querying user
  3939. preferences, throw the exception with the error message that suggests
  3940. metalink file is probably broken.
  3941. * src/RequestGroup.cc (postDownloadProcessing): Catch exception here.
  3942. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3943. Fixed the bug that prevents remote Metalink/Torrent file from begin
  3944. processed.
  3945. * src/RequestGroupMan.cc (removeStoppedGroup)
  3946. Added debug message.
  3947. * src/BtPostDownloadHandler.cc
  3948. * src/MetalinkPostDownloadHandler.cc
  3949. * src/PostDownloadHandler.{h, cc}
  3950. * src/RequestGroup.cc
  3951. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3952. * src/Request.cc (parseUrl): Removed unnecessary slashes around dir.
  3953. 2007-10-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3954. * src/MultiUrlRequestInfo.h: Updated the message shown when program
  3955. stops and there are any unfinished or in-progress downloads.
  3956. Added the legend of "stat".
  3957. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3958. Throw exception when chunck checksum verification fails.
  3959. * src/DownloadCommand.cc (validatePieceHash): New function.
  3960. * src/PiecedSegment.{h, cc} (clear): New function.
  3961. * src/GrowSegment.{h, cc} (clear): New function.
  3962. * src/Segment.h (clear): New function.
  3963. * src/SegmentMan.{h, cc} (validatePieceHash): Removed.
  3964. * test/SegmentTest.cc
  3965. * test/GrowSegmentTest.cc
  3966. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3967. Do not send referer when redirected.
  3968. * src/Request.cc (redirectUrl)
  3969. * test/RequestTest.cc
  3970. * test/HttpRequestTest.cc
  3971. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3972. Implemented BitTorrent/http/ftp integrated download.
  3973. I've rewritten lots of files and now some headers have forward
  3974. class declarations to reduce compile time.
  3975. The implementation is extremely alpha stage, I recommend to use this
  3976. for testing purpose only.
  3977. 2007-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3978. Fixed the compilation error on 64bit platform.
  3979. * test/HttpHeaderProcessorTest.cc
  3980. 2007-09-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3981. Merged Ross's patch that fixes compilation problem in MinGW
  3982. * test/DefaultBtProgressInfoFileTest.cc
  3983. 2007-09-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3984. Updated fr.po by sebone
  3985. * po/fr.po
  3986. Updated man page.
  3987. * doc/aria2c.1.txt
  3988. * Release 0.11.3
  3989. 2007-09-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3990. * src/MetalinkRequestInfo.cc (execute): Fixed BitTorrent download
  3991. failure in Metalink.
  3992. 2007-09-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3993. Automatically save *.aria2 control file of http/ftp download in every
  3994. 60 seconds.
  3995. * src/AutoSaveCommand.{h, cc}: New class.
  3996. * src/TimeBasedCommand.{h, cc}: New class.
  3997. * src/DownloadEngineFactory.cc (newConsoleEngine)
  3998. Disable parameterized URI support by default. Added -P option to
  3999. enable the feature.
  4000. * src/prefs.h: Added PREF_PARAMETERIZED_URI
  4001. * src/OptionHandlerFactory.cc
  4002. * src/main.cc: Also updated usages for -Z and --auto-file-renaming
  4003. Updated Japanese translation.
  4004. * po/ja.po
  4005. Updated man page.
  4006. * doc/aria2c.1.txt
  4007. * Release 0.11.3-rc
  4008. 2007-09-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4009. Now *.aria2 contorol file is first saved to *.aria2__temp and if
  4010. it is successful, then renamed to *.aria2.
  4011. This prevents *.aria2 file from being truncated or corrupted when
  4012. file system becomes out of space.
  4013. * src/DefaultBtProgressInfoFile.cc (save)
  4014. * src/SegmentMan.cc (save)
  4015. * test/DefaultBtProgressInfoFileTest.cc (testSave): Implemented.
  4016. 2007-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4017. Reduced the fragmentation of bitfield in http/ftp download.
  4018. * src/BitfieldMan.cc (getSparseMissingUnusedIndex)
  4019. * test/BitfieldManTest.cc
  4020. 2007-08-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4021. Added the ability to disable segmented download in .metalink.
  4022. aria2 can now recognize 'maxconnections' attribute in 'resources' and
  4023. 'url' tag.
  4024. * src/MetalinkEntry.{h, cc}
  4025. * src/RequestResource.{h, cc}
  4026. * src/MetalinkRequestInfo.cc
  4027. * src/Xml2MetalinkProcessor.cc
  4028. * test/Xml2MetalinkProcessorTest.cc
  4029. 2007-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4030. Added parameterized URI support.
  4031. * src/main.cc: -Z option added.
  4032. * src/OptionHandlerFactory.cc
  4033. * src/prefs.h: Added PREF_FORCE_SEQUENTIAL.
  4034. * src/PStringDatum.h: New class.
  4035. * src/PStringSegment.{h,cc}: New class.
  4036. * src/PStringNumLoop.h: New class.
  4037. * src/PStringSelect.h: New class.
  4038. * src/NumberDecorator.h: New class.
  4039. * src/FixedWidthNumberDecorator.h: New class.
  4040. * src/AlphaNumberDecorator.h: New class.
  4041. * src/PStringVisitor.h: New class.
  4042. * src/PStringBuildVisitor.{h,cc}: New class.
  4043. * src/ParameterizedStringParser.{h,cc}: New class.
  4044. * src/Util.{h,cc}
  4045. (isNumber): New function.
  4046. (isLowercase): New function.
  4047. (isUppercase): New function.
  4048. (alphaToNum): New function.
  4049. * test/ParameterizedStringParserTest.cc: New class.
  4050. * test/AlphaNumberDecoratorTest.cc: New class.
  4051. * test/PStringBuildVisitorTest.cc: New class.
  4052. * test/UtilTest.cc
  4053. (testIsNumber): New function.
  4054. (testIsLowercase): New function.
  4055. (testIsUppercase): New function.
  4056. (testAlphaToNum): New function.
  4057. Added '\n' after the error message
  4058. * src/RequestInfo.h (printDownloadAbortMessage)
  4059. Added auto file renaming feature in http(s)/ftp download.
  4060. * src/main.cc: Added --auto-file-renaming command-line option.
  4061. * src/OptionHandlerFactory.cc
  4062. * src/prefs.h: Added PREF_AUTO_FILE_RENAMING
  4063. * src/RequestGroup.{h, cc}
  4064. (shouldCancelDownloadForSafety): Rewritten
  4065. (tryAutoFileRenaming): New function.
  4066. * src/SegmentMan.{h, cc} (shouldCancelDownloadForSafety): Removed.
  4067. * src/HttpResponseCommand.cc
  4068. (executeInternal): Removed the call to RequestGroupMan::
  4069. isSameFileBeingDownloaded()
  4070. * src/FtpNegotiateCommand.cc
  4071. (recvSize): Removed the call to RequestGroupMan::
  4072. isSameFileBeingDownloaded()
  4073. * test/RequestGroupTest.cc: New class.
  4074. 2007-08-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4075. Merged Ross's patch: Removed setmode(). Use _CRT_fmode to enable binary
  4076. IO.
  4077. * src/DefaultBtProgressInfoFile.cc
  4078. * src/MetaFileUtil.cc
  4079. * src/SimpleLogger.cc
  4080. * src/SegmentMan.cc
  4081. * src/Util.cc
  4082. * src/Platform.cc
  4083. 2007-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4084. * src/Xml2MetalinkProcessor.cc (getPieceHash): Added missing .c_str().
  4085. 2007-08-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4086. Avoid sparse files if possible, because VFAT32 doesn't support it.
  4087. * src/DefaultDiskWriter.cc (initAndOpenFile)
  4088. Fixed the bug that prevents file allocation is not done when
  4089. dowloading multi-torrent file.
  4090. * src/AbstractDiskWriter.cc (openFile)
  4091. Increase the maximum number of -j option from 15 to 45.
  4092. * src/OptionHandlerFactory.cc (createOptionHandlers)
  4093. Added fr.po, thanks to Charles Landemaine.
  4094. * po/fr.po
  4095. * po/LINGUAS
  4096. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  4097. gcc 3.4.4 support:
  4098. * src/DefaultBtContext.cc: int32_t -> int
  4099. * src/main.cc: int -> int32_t, int32_t -> int
  4100. * src/messageDigest.h: uint32_t -> unsigned int
  4101. * src/NameResolver.h: int32_t -> int
  4102. * src/PeerConnection.cc: int -> int32_t
  4103. * src/SpeedCalc.cc: int32_t -> int
  4104. * src/TrackerUpdateCommand.h: int -> int32_t
  4105. * src/Util.cc: int32_t -> int
  4106. * src/Util.h: int32_t -> int
  4107. * src/Xml2MetalinkProcessor.cc: int -> uint32_t, int64_t -> uint64_t
  4108. * test/AnnounceListTest.cc: int -> int32_t
  4109. * test/ChunkedEncodingTest.cc: int -> int32_t
  4110. * test/DataTest.cc: int -> int32_t
  4111. * test/DefaultBtRequestFactoryTest.cc: int -> int32_t
  4112. * test/DefaultPeerListProcessorTest.cc: int -> int32_t
  4113. * test/DefaultPieceStorageTest.cc: int -> int32_t
  4114. * test/FeatureConfigTest.cc: int -> int32_t
  4115. * test/MetalinkEntryTest.cc: int -> int32_t
  4116. * test/MockBtRequestFactory.h: int -> int32_t
  4117. * test/MockPieceStorage.h: int -> int32_t
  4118. * test/OptionTest.cc: int -> int32_t
  4119. * test/RequestTest.cc: int -> int32_t
  4120. * test/SegmentManTest.cc: int -> int32_t
  4121. * test/Xml2MetalinkProcessorTest.cc: int -> int32_t
  4122. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  4123. Move sleep functions to Util class:
  4124. * src/Util.cc
  4125. (sleep): New function.
  4126. (usleep): New function.
  4127. * src/DownloadCommand.cc: sleep -> Util::sleep
  4128. * test/TimeSeedCriteriaTest.cc: sleep -> Util::sleep
  4129. MinGW build enhancements. The following files are added:
  4130. * src/timegm.{c,h}
  4131. Changes to support the above new files:
  4132. * configure.ac
  4133. * src/Makefile.am
  4134. * src/a2time.h
  4135. * src/Util.cc:
  4136. * src/strptime.c: Added support for %Z option.
  4137. Fixed MinGW non-blocking bug.
  4138. * src/SocketCore.cc
  4139. * src/HttpRequestCommand.cc
  4140. Miscellenous build fixes/enhancements.
  4141. * configure.ac: Added summary report.
  4142. * src/Platform.h: Tweaked #include's.
  4143. * src/a2netcompat.h: Tweaked #include's.
  4144. * src/strptime.h: Tweaked #include's.
  4145. * src/gai_strerror.c: Tweaked #include's.
  4146. * src/gai_strerror.h: _D_GETADDRINFO_H -> _D_GAI_STRERROR_H
  4147. * src/getaddrinfo.h: Moved #ifndef __MINGW32__
  4148. * src/gettimeofday.h: Added HAVE_CONFIG_H
  4149. 2007-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4150. Increased the initial connection size in BitTorrent download to 40.
  4151. * src/BtRuntime.h
  4152. Added the usage message of --peer-id-prefix option.
  4153. * src/main.cc
  4154. * Release 0.11.2
  4155. 2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4156. MessageDigestHelper is introduced in order to simplify the use
  4157. of message digest. Removed repeated code.
  4158. The message digest algorithm is now specified by string, like "sha1",
  4159. "md5".
  4160. * src/messageDigest.{h, cc}
  4161. * src/MessageDigestHelper.{h, cc}: New class.
  4162. * src/DefaultPieceStorage.cc
  4163. * src/DefaultBtContext.{h, cc}
  4164. (computeFastSet): New function.
  4165. (setInfoHash): Added for unit testing.
  4166. (setNumPieces): Added for unit testing.
  4167. * src/DefaultBtInteractive.cc
  4168. * src/BtPieceMessage.cc
  4169. * src/Peer.cc
  4170. * src/Checksum.h
  4171. * src/message.h
  4172. * src/IteratableChecksumValidator.h
  4173. * src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator
  4174. inside it.
  4175. * src/SegmentMan.{h, cc}
  4176. (checkIntegrity): Removed.
  4177. * src/IteratableChunkChecksumValidator.{h, cc}
  4178. * src/Util.h
  4179. (sha1Sum): Removed.
  4180. (simpleMessageDigest): Removed.
  4181. (fileChecksum): Removed.
  4182. (computeFastSet): Removed.
  4183. * src/ShaVisitor.cc
  4184. * src/ChunkChecksum.h
  4185. * src/DownloadCommand.cc
  4186. Removed messageDigest virtual functions.
  4187. * src/MultiDiskAdaptor.{h, cc}
  4188. * src/DiskAdaptor.h
  4189. * src/ByteArrayDiskWriter.h
  4190. * src/DiskWriter.h
  4191. * src/DiskAdaptorWriter.h
  4192. * src/AbstractSingleDiskAdaptor.{h, cc}
  4193. * src/AbstractDiskWriter.{h, cc}
  4194. Fixed comilation error when message digest is disabled.
  4195. * src/MetalinkEntry.{h, cc}
  4196. * src/MetalinkRequestInfo.cc
  4197. Removed srandom and random.
  4198. * src/SimpleRandomizer.h
  4199. Added size() virtual function to DiskAdaptor
  4200. * src/MultiDiskAdaptor.h
  4201. Fixed the bug that causes that files are not opened correctly in
  4202. multi-file torrent.
  4203. * src/TorrentRequestInfo.cc
  4204. * src/MultiDiskAdaptor.cc
  4205. Added SHA256 support
  4206. * src/messageDigest.cc
  4207. * src/Xml2MetalinkProcessor.cc
  4208. Show supported message digest algorithms
  4209. * src/main.cc
  4210. Updated contact info.
  4211. * src/main.cc
  4212. Applied Ross's patch
  4213. * src/a2netcompat.h
  4214. * src/main.cc
  4215. Fixed the bug that prevents a remote metalink from not being processed
  4216. even if '-o foo.metalink' is specified.
  4217. * src/MetalinkRequestInfo.cc
  4218. 2007-08-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4219. Merged Dan's patch:
  4220. * src/ByteArrayDiskWriter.cc: ios_base -> ios
  4221. Use va_copy to avoid core dump on amd64:
  4222. * src/SimpleLogger.cc
  4223. Updated contact info.
  4224. * src/main.cc
  4225. Added #ifdef ENABLE_MESSAGE_DIGEST to fix test errors when message
  4226. digest is not available.
  4227. * src/MetalinkEntry.h
  4228. 2007-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4229. Make a2netcompat.h include a2io.h to fix compilation error:
  4230. * src/a2netcompat.h
  4231. * src/SocketCore.cc: Removed include of a2io.h
  4232. * src/Util.cc: Removed include of a2io.h
  4233. Gather time related functions to a2time.h:
  4234. * src/a2time.h: New file.
  4235. * src/DefaultPeerStorage.cc
  4236. * src/SimpleLogger.cc
  4237. * src/Util.{h, cc}
  4238. * src/SimpleRandomizer.h
  4239. * src/TimeA2.{h,cc}
  4240. * src/DownloadCommand.cc
  4241. * src/main.cc
  4242. Removed #ifdef __MINGW32__ since gai_strerror is included in
  4243. a2netcompat.h:
  4244. * src/NameResolver.cc
  4245. Fixed compilation error without openssl:
  4246. * src/SocketCore.{h,cc}: Moved include of openssl/err.h to SocketCore.h
  4247. Added default block to suppress compiler warnings:
  4248. * src/MetalinkRequestInfo.cc (AccumulateNonP2PUrl::operator())
  4249. 2007-07-26 Ross Smith II <aria2spam at smithii dot com>
  4250. MinGW build enhancements. The following files are added:
  4251. * src/gai_strerror.{c,h}
  4252. * src/gettimeofday.{c,h}
  4253. Changes to support the above new files:
  4254. * configure.ac
  4255. * src/Makefile.am
  4256. * src/a2netcompat.h
  4257. * src/TimeA2.cc
  4258. * src/DefaultPeerStorage.cc
  4259. * src/NameResolver.cc: removed mingw_strerror() function.
  4260. * src/SocketCore.cc: removed mingw_strerror() function.
  4261. Miscellaneous MinGW build fixes.
  4262. * src/a2io.h: Use _lseeki64() instead of lseek()
  4263. * src/common.h
  4264. * src/DefaultFileAllocator.cc
  4265. * src/GlowFileAllocator.cc
  4266. * src/main.cc: Moved #include "prefs.h" to quiet compile error.
  4267. * src/NameResolver.cc
  4268. (callback): Changed int32_t to int.
  4269. (resolve): Changed int32_t to int.
  4270. * src/Platform.cc
  4271. * src/Platform.h
  4272. * test/MultiDiskWriterTest.cc
  4273. * test/PeerMessageUtilTest.cc
  4274. * src/localtime_r.c: Add DeleteCriticalSection() and at exit().
  4275. Other enhancements and fixes.
  4276. * src/HttpRequestCommand.cc
  4277. (executeInternal) Use non-blocking socket for HTTPS (MinGW only).
  4278. * src/SocketCore.cc:
  4279. (error): New function to abstract errno/WSAGetLastError().
  4280. (errorMsg): New function to abstract errno/WSAGetLastError().
  4281. (initiateSecureConnection): Added more detailed error reporting.
  4282. * src/SocketCore.h: Added private variable blocking, to allow
  4283. proper handling of OpenSSL psuedo-errors.
  4284. * src/message.h
  4285. (EX_SSL_INIT_FAILURE)
  4286. (EX_SSL_IO_ERROR)
  4287. (EX_SSL_PROTOCOL_ERROR)
  4288. (EX_SSL_UNKNOWN_ERROR)
  4289. (EX_SSL_CONNECT_ERROR)
  4290. (EX_SOCKET_BLOCKING)
  4291. (EX_SOCKET_NONBLOCKING)
  4292. (EX_SOCKET_UNKNOWN_ERROR)
  4293. * src/Util.cc
  4294. (setGlobalSignalHandler): Renamed signal to sig as signal is a
  4295. reserved name.
  4296. (httpGMT): Fixed typo.
  4297. 2007-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4298. Merged Ross's win32 patch(manually)
  4299. In the course of merging, following files are added.
  4300. * src/strptime.{h,c}
  4301. * src/libgen.{h,c}
  4302. * src/inet_aton.{h,c}
  4303. * src/Platform.{h,cc}
  4304. * src/localtime_r.{h,c}
  4305. * src/getaddrinfo.{h,c}
  4306. I've gethered network related things, and put them to following file:
  4307. * src/a2netcompat.h
  4308. Also io related things are put to following file:
  4309. * src/a2io.h
  4310. Changed %lld to %s because mingw32 doesn't recognize %lld.
  4311. * src/message.h
  4312. (MSG_ALLOCATION_COMPLETED)
  4313. (EX_TOO_LARGE_FILE)
  4314. (EX_SIZE_MISMATCH)
  4315. (EX_FILE_OFFSET_OUT_OF_RANGE)
  4316. (EX_INVALID_CHUNK_CHECKSUM)
  4317. (EX_INVALID_RANGE_HEADER)
  4318. * src/FileAllocationCommand.cc
  4319. * src/HttpResponse.cc
  4320. * src/RequestGroup.cc
  4321. * src/MultiDiskAdaptor.cc
  4322. * src/OptionHandlerImpl.h
  4323. * src/HttpResponseCommand.cc
  4324. * src/FtpNegotiateCommand.cc
  4325. * src/IteratableChecksumValidator.cc
  4326. * src/SegmentMan.cc
  4327. * src/ChunkChecksumValidator.cc
  4328. Added Randomizer::getRandomNumber(long int)
  4329. * src/Randomizer.h (getRandomNumber)
  4330. * src/SimpleRandomizer.h (getRandomNumber)
  4331. * src/BitfieldMan.cc (getMissingIndexRandomly): Use this new function.
  4332. * src/Util.cc (randomAlpha): Use this new function.
  4333. 2007-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4334. Converted int's to in32_t. long long int's are also converted to
  4335. int64_t
  4336. 2007-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4337. Fixed the bug that prevents cookies from being sent to the server
  4338. if the domain of cookie is FQDN and starts with ".".
  4339. * src/Cookie.cc (match)
  4340. To add the ability to change peer id.
  4341. * src/DefaultBtContext.h
  4342. (_peerIdPrefix): New variable
  4343. (setPeerIdPrefix): New function.
  4344. * src/torrentRequestInfo.cc
  4345. (execute): Set the option value of PREF_PEER_ID_PREFIX to
  4346. DefaultBtContext.
  4347. * src/main.cc (main): Added peer-id-prefix command-line option.
  4348. The usage message is not added yet.
  4349. * src/DefaultBtContext.cc
  4350. (generatePeerId): Use _peerIdPrefix.
  4351. * src/prefs.h (PREF_PEER_ID_PREFIX): New definition.
  4352. 2007-07-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4353. Fixed the bug that prevents filename in content-disposition from
  4354. being retrieved when filename is not quoted.
  4355. * src/Util.cc (getContentDispositionFilename)
  4356. Fixed the bug that causes infinate loop and memory leak when file open
  4357. operation failed.
  4358. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  4359. 2007-07-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4360. Fixed the bug that causes segfault when all URIs specified are
  4361. unsupported.
  4362. * src/RequestGroupMan.cc (getInitialCommands)
  4363. Check if RequestGroup::createNextCommand() returns empty list of
  4364. commands.
  4365. * src/RequestGroup.cc (createNextCommand)
  4366. Change log level from info to error so that users can notice that
  4367. an error occurred.
  4368. Fixed the bug that causes segfault when a zero-sized file is
  4369. downloaded.
  4370. * src/BitfieldMan.cc (isAllBitSet)
  4371. Return true if bitfieldLength is 0.
  4372. 2007-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4373. * src/main.cc
  4374. (showUsage): Added 3 usage examples for metalink download.
  4375. Replace MetalinkChunkChecksum with ChunkChecksum.
  4376. * src/MetalinkChunkChecksum.h: Removed.
  4377. * src/MetalinkEntry.h: MetalinkChunkChecksum -> ChunkChecksum.
  4378. * src/Xml2MetalinkProcessor.h: MetalinkChunkChecksum -> ChunkChecksum.
  4379. * src/Xml2MetalinkProcessor.cc
  4380. (getPieceHash): Use ChunkChecksum instead of MetalinkChunkChecksum.
  4381. * src/MetalinkRequestInfo.cc (execute)
  4382. * Release 0.11.1
  4383. 2007-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4384. Reads URIs from stdin when "-i -" is specified.
  4385. * src/UriFileListParser.h, src/UriFileListParser.cc: Removed.
  4386. * src/UriListParser.h, src/UriListParser.cc: New class.
  4387. * src/StreamUriListParser.h: New class.
  4388. * src/FileUriListParser.h: New class.
  4389. * src/main.cc (main): Use StreamUriListParser and FileUriListParser
  4390. instead of UriFileListParser.
  4391. 2007-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4392. Made console readout more readable.
  4393. * src/ConsoleDownloadEngine.cc (sendStatistics)
  4394. 2007-07-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4395. Fix the bug that causes -s option not to work.
  4396. * src/main.cc (main)
  4397. * src/a2algo.h: New file.
  4398. 2007-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4399. Create directory structure specified in metalink file.
  4400. * src/RequestGroup.h, src/RequestGroup.cc
  4401. (initAndOpenFile): Create a directory to store files if it does not
  4402. exist.
  4403. (getDir): New function.
  4404. Added ETA and download speed for an individual file to readout.
  4405. * src/ConsoleDownloadEngine.cc (sendStatistics)
  4406. * src/RequestGroup.h
  4407. (calculateDownloadSpeed): New function.
  4408. 2007-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4409. Made -S option work with metalink file and provided selective download
  4410. to metalink.
  4411. * src/MetalinkEntry.h, src/MetalinkEntry.cc
  4412. (filename): Removed.
  4413. (file): New variable.
  4414. (size): Removed.
  4415. (operator=): Updated.
  4416. (getPath): New function.
  4417. (getLength): New function.
  4418. (toFileEntry): New function.
  4419. * src/TorrentRequestInfo.h, src/TorrentRequestInfo.cc
  4420. (execute): Use toStream.
  4421. (showFileEntry): Removed.
  4422. * src/MetalinkRequestInfo.h
  4423. (targetFiles): New variable.
  4424. (setTargetFiles): New variable.
  4425. * src/MetalinkRequestInfo.cc
  4426. (execute): Added the ability to print file information included in
  4427. a metalink file.
  4428. Added selective download mode to metalink.
  4429. * src/main.cc
  4430. (showUsage): Updated to denote that -S and --select-file options are
  4431. applicable to metalink.
  4432. * src/FileEntry.h
  4433. (operator=): New function.
  4434. (getBasename): New function.
  4435. (getDirname): New function.
  4436. * src/Util.h, src/Util.cc
  4437. (toStream): New function.
  4438. * src/Xml2MetalinkProcessor.cc: Updated.
  4439. Made aria2 work with metalink with directory structure.
  4440. * src/File.h, src/File.cc
  4441. (getBasename): New function.
  4442. (getDirname): New function.
  4443. * src/RequestGroup.h, src/RequestGroup.cc
  4444. (_topDir): New variable.
  4445. (setTopDir): New function.
  4446. (initSegmentMan): A directory structure is added to _segmentMan->dir.
  4447. Rewrote HTTP header parsing with stringstream.
  4448. * src/HttpConnection.h, src/HttpConnection.cc
  4449. (HttpRequestEntry): New class.
  4450. (headerBuf): Removed.
  4451. (headerBufLength): Removed.
  4452. (outstandingHttpRequests): Now its element type is
  4453. HttpRequestEntryHandle.
  4454. (findEndOfHeader): Removed.
  4455. (receiveResponse): Rewritten.
  4456. * src/HttpHeaderProcessor.h, src/HttpHeaderProcessor.cc: New class.
  4457. Updated doc for -j option to notice that it should be used with -i
  4458. option.
  4459. * src/main.cc (showUsage)
  4460. Removed unused classes.
  4461. * src/RequestInfo.h
  4462. (FileInfo): Removed.
  4463. (checksum): Removed.
  4464. (fileInfo): Removed.
  4465. (setChecksum): Removed.
  4466. (getChecksum): Removed.
  4467. (getFileInfo): Removed.
  4468. Use ISO units.
  4469. * src/ConsoleDownloadEngine.cc
  4470. * src/TorrentConsoleDownloadEngine.cc
  4471. * src/Util.cc (abbrevSize)
  4472. 2007-06-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4473. Added the default listening ports to the help message.
  4474. * src/main.cc (showUsage)
  4475. 2007-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4476. Reduce the number of calls to gettimeofday to lower CPU load.
  4477. * src/TimeA2.h, src/TimeA2.cc (differenceInMillis): New function.
  4478. * src/SpeedCalc.h, src/SpeedCalc.cc (calculateSpeed): New function.
  4479. * src/Peer.h (calculateUploadSpeed): New function.
  4480. (calculateDownloadSpeed): New function.
  4481. * src/DefaultPeerStorage.cc
  4482. (CalculateStat): Added _now variable.
  4483. In operator(), call Peer::calculateDownloadSpeed(const struct timeval&)
  4484. and Peer::calculateUploadSpeed(const struct timeval&)
  4485. Drop connection if no request or piece message is exchanged in
  4486. a certain interval.
  4487. * src/DefaultBtInteractive.h
  4488. (btRuntime): New variable.
  4489. (inactiveCheckPoint): New variable.
  4490. (checkActiveInteraction): New function.
  4491. * src/DefaultBtInteractive.cc (receiveMessages): Reset timer when
  4492. request or piece message is received.
  4493. (checkActiveInteraction): New function.
  4494. (doInteractionProcessing): Call checkActiveInteraction.
  4495. Fixed the bug that causes remote Metalink and Torrent files are not
  4496. processed.
  4497. * src/MultiUrlRequestInfo.cc (createNextRequestInfo): Fixed the bug.
  4498. 2007-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4499. Changed format of log file.
  4500. * src/SimpleLogger.cc
  4501. * Release 0.11.0
  4502. 2007-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4503. * src/AbstractCommand.cc
  4504. (execute): Changed log level of MSG_RESTARTING_DOWNLOAD and
  4505. MSG_MAX_TRY from error to info.
  4506. Added MSG_DOWNLOAD_ABORTED after MSG_MAX_TRY.
  4507. * src/message.h
  4508. (MSG_TORRENT_DOWNLOAD_ABORTED): New definition.
  4509. (MSG_DOWNLOAD_ABORTED): Added %s.
  4510. (MSG_RESTARTING_DOWNLOAD): Added %s.
  4511. (MSG_DOWNLOAD_ALREADY_COMPLETED): Updated.
  4512. * src/PeerAbstractCommand.cc
  4513. (execute): MSG_DOWNLOAD_ABORTED -> MSG_TORRENT_DOWNLOAD_ABORTED
  4514. * src/Request.h
  4515. (cookieBox): Made ShardHandle.
  4516. * src/RequestGroup.h, src/RequestGroup.cc
  4517. (createNextCommandWithAdj): New function.
  4518. * src/FileAllocationCommand.cc
  4519. (executeInternal): Use createNextCommandWithAdj().
  4520. * src/CheckIntegrityCommand.cc
  4521. (executeInternal): Use createNextCommandWithAdj().
  4522. Added --load-cookies command-option.
  4523. * src/OptionHandlerFactory.cc
  4524. (createOptionHandlers): Added PREF_LOAD_COOKIES.
  4525. * src/CookieBox.h, src/CookieBox.cc: Rwritten using CookieParser.
  4526. Now aria2 can handle cookie's expiration date.
  4527. * src/Cookie.h (expires): Changed its type to time_t.
  4528. * src/main.cc: Added --load-cookies command-line option.
  4529. * src/prefs.h (PREF_LOAD_COOKIES): New definition.
  4530. * src/Util.h, src/Util.cc (httpGMT): New function.
  4531. * src/Request.cc (Request): Initialize cookieBox using
  4532. CookieBoxFactory.
  4533. * src/CookieBoxFactory.h, src/CookieBoxFactory.cc: New class.
  4534. * src/CookieParser.h, src/CookieParser.cc: New class.
  4535. * src/main.cc: Chagned the default value of --metalink-servers to 5.
  4536. * src/HttpResponseCommand.cc
  4537. (handleOtherEncoding): Call RequestGroup::shouldCancelDownloadForSafety
  4538. * src/MetalinkRequestInfo.cc: Now -s option is ignored in Metalink
  4539. download.
  4540. 2007-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4541. Added -j command-line option.
  4542. * src/OptionHandlerFactory.cc (createOptionHandlers)
  4543. * src/main.cc
  4544. * src/ByteArrayDiskWriter.h, src/ByteArrayDiskWriter.cc
  4545. Rewritten using stringstream.
  4546. * src/TrackerUpdateCommand.h, src/TrackerUpdateCommand.cc
  4547. Rewritten using stringstream.
  4548. 2007-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4549. Make download size shown in MB, KB.
  4550. * src/ConsoleDownloadEngine.h (sendStatistics)
  4551. * src/Util.h, srcUtil.cc (abbrevSize): New function.
  4552. 2007-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4553. Accept incoming connections if download rate is low.
  4554. * src/PeerListenCommand.h, src/PeerListenCommand.cc:
  4555. (_lowestSpeedLimit): New variable.
  4556. (setLowestSpeedLimit): New function.
  4557. (execute): Accept incoming connections if download rate is low.
  4558. MAX_PEERS is ignored in this case.
  4559. Disable PREF_OUT in multiple concurrent download:
  4560. * src/RequestGroup.h, src/RequestGroup.cc
  4561. (setUserDefinedFilename): New function.
  4562. * src/DownloadEngineFactory.cc
  4563. (newConsoleEngine): Do not set PREF_OUT to requestGroup in multiple
  4564. concurrent download.
  4565. * src/DefaultSegmentManFactory.cc
  4566. (createNewInstance): Comment out the line: segmentMan->ufilename = ...
  4567. 2007-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4568. RequestGroup::getNextCommand() was renamed to createNextCommand().
  4569. Added its overloaded method.
  4570. * src/RequestGroup.h
  4571. (_numConcurrentCommand): New variable.
  4572. (setNumConcurrentCommand): New function.
  4573. * src/RequestGroup.cc
  4574. Abort download if same file is being downloaded concurrently.
  4575. * src/RequestGroup.h, src/RequestGroupMan.cc
  4576. (isSameFileBeingDownloaded): New function.
  4577. * src/HttpResponseCommand.cc (executeInternal)
  4578. * src/FtpNegotiateCommand.cc (recvSize)
  4579. * src/message.h (EX_DUPLICATE_FILE_DOWNLOAD): New definition.
  4580. * main.cc: Added help message for -i option.
  4581. 2007-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4582. * src/FileAllocationCommand.cc: Derived from RealtimeCommand.
  4583. * src/CheckIntegrityCommand.cc: Derived from RealtimeCommand.
  4584. * src/MetalinkEntry.h
  4585. (checksum): Changed to ChecksumHandle
  4586. * src/MetalinkRequestInfo.cc
  4587. (checksum): Changed to ChecksumHandle
  4588. * src/File.cc
  4589. (mkdirs): OPEN_MODE -> DIR_OPEN_MODE
  4590. * src/common.h
  4591. (DIR_OPEN_MODE): New definition
  4592. * src/RequestGroup.cc
  4593. (prepareForNextAction): Added an argument.
  4594. * src/message.h
  4595. (MSG_GOOD_CHECKSUM): New definition
  4596. (MSG_BAD_CHECKSUM): New definition
  4597. * src/HttpResponseCommand.cc
  4598. (handleDefaultEncoding): Continue download sequence in new
  4599. non-segmented download.
  4600. * src/FileAllocationEntry.h
  4601. (_nextDownloadCommand): New variable.
  4602. * src/DownloadCommand.cc
  4603. (prepareForNextSegment): Create ChecksumCommand if checksum is
  4604. available.
  4605. * src/RealtimeCommand.h, src/RealtimeCommand.cc: New class.
  4606. * src/IteratableChecksumValidator.h,
  4607. src/IteratableChecksumValidator.cc: New class.
  4608. * src/ChecksumCommand.h, src/ChecksumCommand.cc: New class.
  4609. 2007-05-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4610. Change file mode to 666:
  4611. * src/common.h (OPEN_MODE): New definition.
  4612. * src/File.cc
  4613. * src/Util.cc
  4614. * src/Directry.cc
  4615. * src/AbstractDiskWriter.cc
  4616. Change the level of log message "download aborted" to debug:
  4617. * src/PeerAbstractCommand.cc (execute)
  4618. * src/RequestGroup.h (RequestGroup): Initialized _hintTotalLength to 0.
  4619. * src/TrackerWatcherCommand.cc
  4620. (createCommand): Sleep some seconds after request failed.
  4621. If tracker request fails more than value of PREF_TRACKER_MAX_TRIES,
  4622. then abort tracker request.
  4623. 2007-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4624. * Added the simultaneous download feature.
  4625. * src/main.cc: Print "Exception caught: " when exception is caught.
  4626. Use CUIDCounter instead of BtRuntime::getNewCuid():
  4627. * src/ActivePeerConnectionCommand.cc
  4628. * src/PeerInteractionCommand.cc
  4629. * src/BtRuntime.h
  4630. (cuidCounter): Removed.
  4631. (getNewCuid): Removed.
  4632. * src/DownloadEngineFactory.cc
  4633. * src/PeerListenCommand.cc
  4634. * src/TrackerUpdateCommand.cc
  4635. * src/PeerInitiateConnectionCommand.cc
  4636. 2007-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4637. * src/PeerAbstractCommand.cc
  4638. (onAbort): Call PeerStorage::returnPeer()
  4639. * src/DefaultPeerStorage.h, src/DefaultPeerStorage.cc
  4640. (incomingPeers): New variable.
  4641. (addIncomingPeer): New function.
  4642. (returnPeer): New function.
  4643. (onErasingPeer): New function.
  4644. (addPeer): push_back -> push_front
  4645. (getActivePeers): Rewritten.
  4646. (calculateStat): Rewritten.
  4647. * src/PeerStorage.h
  4648. (TransferStat::copy): New function.
  4649. (TransferStat::TransferStat): New function.
  4650. (TransferStat::operator=): New function.
  4651. (addIncomingPeer): New function.
  4652. (returnPeer): New function.
  4653. * src/PeerListenCommand.cc
  4654. (execute): Use PeerStorage::addIncomingPeer() instead of
  4655. Peer::addPeer().
  4656. 2007-04-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4657. Connect to a peer actively when download speed is lower than specified
  4658. speed in torrent download:
  4659. * src/ActivePeerConnectionCommand.h: New class.
  4660. 2007-03-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4661. * src/HttpRequest.cc (createRequest): url-encode user-agent
  4662. * src/main.cc: Fixed the bug that prevents download if .netrc
  4663. doesn't exist.
  4664. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4665. To cache resolved hostname:
  4666. * src/AbstractCommand.h, src/AbstractCommand.cc
  4667. (resolveHostname): Put outside #ifdef ENABLE_ASYNC_DNS clause.
  4668. Added dns cache.
  4669. * src/FtpInitiateConnectionCommand.cc
  4670. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS.
  4671. * src/NameResolver.h, src/NameResolver.cc: Added synchronized
  4672. NameResolver working without ares.
  4673. * src/TorrentRequestInfo.cc
  4674. (execute): Don't cache dns in torrent download.
  4675. * src/HttpInitiateConnectionCommand.cc
  4676. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS
  4677. * src/DNSCache.h: New class.
  4678. * src/UrlRequestInfo.cc
  4679. (execute): Use dns cache.
  4680. In http request, suppress port number in http request header if port
  4681. is 80 or 443:
  4682. * src/HttpRequest.cc (getHostText): Suppress port number in http
  4683. request header if port is 80 or 443.
  4684. (createProxyRequest): Allways send port number.
  4685. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4686. To add the command-line option which disables netrc support:
  4687. * src/OptionHandlerFactory.cc
  4688. (createOptionHandlers): Added PREF_NO_NETRC.
  4689. * src/main.cc: Added -n option.
  4690. * src/prefs.h (PREF_NO_NETRC): New definition.
  4691. * src/RequestFactory.cc: Do not use netrc in ftp if PREF_NO_NETRC is
  4692. V_TRUE.
  4693. Note that netrc is not used in http, http proxy even if PREF_NO_NETRC
  4694. is V_FALSE. This may get configurable in the future release.
  4695. To clear peer's error status by time basis:
  4696. * src/PeerAbstractCommand.cc
  4697. (onAbort): Call Peer::startBadCondition().
  4698. * src/Peer.h, src/Peer.cc
  4699. (error): Removed.
  4700. (_badConditionStartTime): New variable.
  4701. (_badConditionInterval): New variable. Initialized to 10 seconds.
  4702. (startBadCondition): New function.
  4703. (isGood): New function.
  4704. * src/DefaultPeerStorage.cc
  4705. (addPeer): Use Peer::isGood().
  4706. (FindFinePeer): Use Peer::isGood().
  4707. Always include port number in http request header:
  4708. * src/HttpRequest.cc (getHostText): Always include port number in
  4709. http request header.
  4710. 2007-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4711. To the ability to read options from a config file:
  4712. * src/main.cc: Command-line parameter validation is delegated to
  4713. OptionHandler class.
  4714. * src/OptionHandlerFactory.h, src/OptionHandlerFactory.cc: New class.
  4715. * src/Option.h, src/Option.cc (clear): New function.
  4716. * src/OptionParser.h, src/OptionParser.cc: New class.
  4717. * src/OptionHandler.h: New class.
  4718. * src/NameMatchOptionHandler.h: New class.
  4719. * src/OptionHandlerImpl.h: New classes.
  4720. * src/prefs.h: '_' -> '-'
  4721. (FTP_PASV_ENABLED): Renamed to FTP_PASV.
  4722. (FTP_PASV): New definition.
  4723. * src/Util.h, src/Util.cc (getRealSize): New function.
  4724. To disable netrc support if .netrc file does not have correct
  4725. permissions:
  4726. * src/File.h, src/File.cc (mode): New function.
  4727. To prevent confidential information to be logged:
  4728. * src/HttpConnection.h, src/HttpConnection.cc
  4729. (eraseConfidentialInfo): New function.
  4730. (sendRequest): Call eraseConfidentialInfo().
  4731. (sendProxyRequest): Call eraseConfidentialInfo().
  4732. * src/main.cc: Validate permissions of .netrc file.
  4733. To add --user-agent command-line option:
  4734. * src/main.cc: Added new command line option: --user-agent
  4735. * src/prefs.h (PREF_USER_AGENT): New definition.
  4736. * src/HttpRequestCommand.cc (executeInternal): Set user-agent option
  4737. parameter to HttpRequest object.
  4738. * src/AbstractProxyRequestCommand.cc
  4739. (executeInternal): Set user-agent option parameter to HttpRequest
  4740. object.
  4741. Marged the patches from Dan Fandrich.
  4742. 2007-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4743. Use filename and size from Metalink file instead of sending HEAD
  4744. request:
  4745. * src/UrlRequestInfo.h
  4746. (_filename): New variable.
  4747. (_totalLength): New variable.
  4748. (setTotalLength): New variable.
  4749. (setFilename): New variable.
  4750. * src/MetalinkRequestInfo.cc
  4751. (execute): Set filename and size to UrlRequestInfo
  4752. * src/UrlRequestInfo.cc
  4753. (execute): Use filename and size from Metalink instead of seding
  4754. HEAD request to servers.
  4755. 2007-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4756. To add the ability to resume downloading a partially downloaded file
  4757. which is downloaded from the beginning:
  4758. * src/FileAllocator.h: Made abstract class. New DefaultFileAllocator
  4759. takes this role.
  4760. * src/main.cc: Added -c option.
  4761. * src/BitfieldMan.h, src/BitfieldMan.cc (setBitRange): New function.
  4762. * src/DiskWriter.h (openExistingFile): Added totalLength argument.
  4763. * src/prefs.h (PREF_CONTINUE): New definition.
  4764. * src/SegmentMan.h, src/SegmentMan.cc (markPieceDone): New function.
  4765. * src/DefaultDiskWriter.cc
  4766. (createNewDiskWriter): Add GlowFileAllocator to the new object.
  4767. * src/AbstractDiskWriter.h
  4768. (glowFileAllocator): New variable.
  4769. * src/AbstractDiskWriter.cc
  4770. (openExistingFile): Now preallocate file space from the end of the
  4771. existing file if totalLength argument is specified and grater than 0.
  4772. * src/UrlRequestInfo.cc: If -c option is specified and the file
  4773. to download exists in local, continue the download of the file.
  4774. --allow-overwrite=true is assumed in this context.
  4775. * src/DefaultFileAllocator.h, src/DefaultFileAllocator.cc: New class.
  4776. * src/GlowFileAllocator.h, src/GlowFileAllocator.cc: New class.
  4777. Throw exception if --check-integrity=true is specified but chunk
  4778. checksums are not provided:
  4779. * src/UrlRequestInfo.cc
  4780. Do not print URLs to stdout:
  4781. * src/UrlRequestInfo.cc
  4782. 2007-03-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4783. * src/Request.h: Use AuthResolver to get authentication information.
  4784. * src/main.cc: Made RequestFactory a singleton object. Netrc is now
  4785. set to RequestFactory object.
  4786. * src/AuthConfigItem.h, src/AuthConfigItem.cc: Removed.
  4787. * src/AuthConfig.h, src/AuthConfig.cc: Rewritten.
  4788. * src/TrackerWatcherComand.cc: Use RequestFactorySingletonHolder to
  4789. create Request object.
  4790. 2007-03-19 Tatsuhiro Tsujikawa <tujikawa at valkyrie dot rednoah com>
  4791. To integrate Netrc into exsiting classes:
  4792. * src/Request.h
  4793. (_userDefinedAuthConfig): New variable.
  4794. (findNetrcAuthenticator): New function.
  4795. (segment): Removed.
  4796. (setUserDefinedAuthConfig): New function.
  4797. (resolveHttpAuthConfigItem): New function.
  4798. (resolveFtpAuthConfigItem): New function.
  4799. (resolveHttpProxyAuthConfigItem): New function.
  4800. * src/HttpRequest.h
  4801. (authConfig): Removed.
  4802. (proxyAuthConfig): Removed.
  4803. (setAuthConfig): Removed.
  4804. (setProxyAuthConfig): Removed.
  4805. * src/UrlRequest.h
  4806. (getHeadResult): Added a parameter: authConfigHandle
  4807. * src/common.h
  4808. (SingletonHolder.h): New include.
  4809. * src/main.cc
  4810. (Netrc.h): New include.
  4811. (main): Removed initial values of PREF_FTP_USER, PREF_FTP_PASSWD.
  4812. Added initial value of PREF_NETRC_PATH.
  4813. Added the initialization of netrc.
  4814. * src/AuthConfig.h: New class.
  4815. * src/prefs.h
  4816. (PREF_NETRC_PATH): New definition.
  4817. * src/HttpAuthConfig.h: Removed.
  4818. * src/Netrc.cc
  4819. (getRequiredNextToken): New function.
  4820. (skipMacdef): New function.
  4821. (parse): Rewritten.
  4822. * src/Netrc.h
  4823. (getRequiredNextToken): New function.
  4824. (skipMacdef): New function.
  4825. * src/Util.h, src/Util.cc
  4826. (getHomeDir): New function.
  4827. * src/TrackerWatcherComand.cc
  4828. (createRequestCommand): Use AuthConfig.
  4829. * src/FtpConnection.cc
  4830. (sendUser): Use Request::resolveFtpAuthConfigItem().
  4831. (sendPass): Use Request::resolveFtpAuthConfigItem().
  4832. * src/Request.cc
  4833. (findNetrcAuthenticator): New function.
  4834. (resolveHttpAuthConfigItem): New function.
  4835. (resolveFtpAuthConfigItem): New function.
  4836. (resolveHttpProxyAuthConfigItem): New function.
  4837. * src/UrlRequestInfo.cc: Use AuthConfig.
  4838. * src/HttpRequest.cc
  4839. (createRequest): Use authConfig.
  4840. (getProxyAuthString): Use authConfig.
  4841. (configure): Removed PREF_HTTP_USER, PREF_HTTP_PASSWD,
  4842. PREF_HTTP_PROXY_USER, PREF_HTTP_PROXY_PASSWD.
  4843. 2007-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4844. To reduce overhead to find commands whose socket is either
  4845. readable or writable in the download engine loop:
  4846. * src/Command.h, src/Command.cc
  4847. (STATUS): New enum.
  4848. (status): New variable.
  4849. (statusMatch): New function.
  4850. (setStatusActive): New function.
  4851. (setStatusInactive): New function.
  4852. * src/DownloadEngine.h, src/DownloadEngine.cc
  4853. (executeCommand): New function.
  4854. (run): Simplified.
  4855. (waitData): Call Command::setStatusActive() when command's socket is
  4856. readable or writable.
  4857. 2007-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4858. To handle Segment as SegmentHandle:
  4859. * src/AbstractCommand.cc (execute): Rewritten.
  4860. * src/SegmentMan.h: Segment -> SegmentHandle
  4861. Introducded HttpResponse class, HttpRequest class to improve code
  4862. extensiveness and make it clear:
  4863. * src/HttpDownloadCommand.cc: transfer encoders are now managed by
  4864. HttpResponse class.
  4865. * src/HttpRequest.h, src/HttpRequest.cc: New class.
  4866. * src/HttpResponse.h, src/HttpResponse.cc: New class.
  4867. * src/HttpConnection.cc: Contruction of http request were moved to
  4868. HttpRequest class.
  4869. * src/HttpResponseCommand.h, src/HttpResponseCommand.cc: Refactored.
  4870. * src/HttpRequestCommand.cc (executeInternal): Rewritten.
  4871. * src/HttpAuthConfig.h: New class.
  4872. * src/Range.h: New class.
  4873. To make FtpTunnel{Request, Response}Command and
  4874. HttpProxy{Request, Response}Command derived from
  4875. AbstractProxy{Request, Response}Command:
  4876. * src/FtpTunnelResponseCommand.h, src/FtpTunnelResponseCommand.cc:
  4877. Derived from AbstractProxyRequestCommand class.
  4878. * src/FtpTunnelRequestCommand.h, src/FtpTunnelRequestCommand.cc:
  4879. Derived from AbstractProxyResponseCommand class.
  4880. * src/HttpProxyRequestCommand.h, src/HttpProxyRequestCommand.cc:
  4881. Derived from AbstractProxyRequestCommand class.
  4882. * src/HttpProxyResponseCommand.h, src/HttpProxyResponseCommand.cc:
  4883. Derived from AbstractProxyResponseCommand class.
  4884. * src/AbstractProxyRequestCommand.h, src/AbstractProxyRequestCommand.cc
  4885. : New class.
  4886. * src/AbstractProxyResponseCommand.h,
  4887. src/AbstractProxyResponseCommand.cc: New class.
  4888. To add netrc support:
  4889. * src/Netrc.h, src/Netrc.cc: New class.
  4890. * src/Util.h, src/Util.cc (split): New function.
  4891. * src/HttpHeader.cc (getRange): Fixed so that it inspects
  4892. "Content-Range" header instead of "Range" header.
  4893. * src/HttpHeader.h
  4894. (getStatus): Removed.
  4895. (setStatus): Removed.
  4896. * src/Segment.h
  4897. (getPositionToWrite): New function.
  4898. 2007-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4899. * src/HttpHeader.h
  4900. (Range.h): New include.
  4901. (status): New variable.
  4902. (HttpHeader): Initialized status with 0.
  4903. (getStatus): New function.
  4904. (setStatus): New function.
  4905. (getRange): New function.
  4906. (HttpHeaderHandle): New function.
  4907. * src/HttpHeader.cc
  4908. (getRange): New function.
  4909. * src/Request.h
  4910. (RequestWeakHandle): New definition.
  4911. * src/HttpConnection.h
  4912. (HttpConnectionHandle): New type definition.
  4913. * src/HttpConnection.cc
  4914. (receiveResponse): Set HTTP status to headers.
  4915. * src/main.cc
  4916. (showUsage): Fixed typo.
  4917. * src/Segment.h
  4918. (SegmentHandle): New type definition.
  4919. * src/BitfieldMan.h
  4920. (getMissingUnusedLength): New function.
  4921. * src/BitfieldMan.cc
  4922. (getMissingUnusedLength): New function.
  4923. 2007-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4924. To fix static initialization order problem:
  4925. * src/BitfieldManFactory.h
  4926. (defaultRandomizer): Removed.
  4927. (factory): New variable.
  4928. (getNewFactory): Removed.
  4929. (getFactoryInstance): New function.
  4930. (setDefaultRandomizer): Rewritten.
  4931. (getDefaultRandomizer): Rewritten.
  4932. * src/BitfieldManFactory.cc
  4933. (defaultRandomizer): Removed.
  4934. (factory): Initialized to 0.
  4935. (BitfieldManFactory): Initialized randomizer to 0.
  4936. * src/DefaultPieceStorage.cc
  4937. (DefaultPieceStorage): getNewFactory() -> getFactoryInstance()
  4938. * src/Peer.cc
  4939. (Peer): getNewFactory() -> getFactoryInstance()
  4940. * src/SegmentMan.cc
  4941. (initBitfield): getNewFactory() -> getFactoryInstance()
  4942. * src/Piece.cc
  4943. (Piece): getNewFactory() -> getFactoryInstance()
  4944. 2007-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4945. To fix the bug that causes crash on Max OS X:
  4946. * src/SimpleRandomizer.h
  4947. (getInstance): Create new instance if the static variable is null.
  4948. * src/SimpleRandomizer.cc
  4949. (randomizer): Initialized to 0.
  4950. * src/BitfieldManFactory.h
  4951. (getNewFactory): Removed the call to setRandomizer().
  4952. To fix the miscalculation of the range of checksum:
  4953. * src/BitfieldMan.h
  4954. (isBitSetOffsetRange): New function.
  4955. * src/BitfieldMan.cc
  4956. (isBitSetOffsetRange): New function.
  4957. * src/SegmentMan.cc
  4958. (tryChunkChecksumValidation): Use BitfieldMan::isBitSetOffsetRange().
  4959. Use bitfield->getBlockLength() instead of segment.segmentLength.
  4960. * Release 0.10.1
  4961. 2007-02-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4962. To lower CPU usage in BitTorrent download when --max-upload-limit
  4963. command-line option specified:
  4964. * src/DefaultBtMessageDispatcher.cc
  4965. (sendMessages): Calculate uploading speed only when current message
  4966. is uploading data and is not sent yet.
  4967. * src/DefaultPeerStorage.h
  4968. (MAX_PEER_LIST_SIZE): 100 -> 60, because 60 is well enough.
  4969. * src/HttpResponseCommand.cc
  4970. (handleDefaultEncoding): Added the cast to int32_t to itos.
  4971. This fixes compile error in Soralis 10.
  4972. 2007-01-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4973. To fix segfault in Metalink download:
  4974. * src/UrlRequestInfo.h
  4975. (filename): Removed.
  4976. (totalLength): Removed.
  4977. (setTotalLength): Removed.
  4978. (setFilename): Removed.
  4979. * src/MetalinkRequestInfo.cc
  4980. (execute): Do not set filename and totalLength to reqInfo.
  4981. Set chunk checksum to reqInfo if it is not null.
  4982. * src/HttpResponseCommand.cc
  4983. (executeInternal): Fixed filename in log.
  4984. (handleDefaultEncoding): Removed the call to initBitfield() and
  4985. markAllPiecesDone().
  4986. (handleOtherEncoding): Added HEAD method handling.
  4987. * src/FtpNegotiateCommand.cc
  4988. (executeInternal): Added SEQ_HEAD_OK handling.
  4989. (recvSize): In HEAD handling, set sequence to SEQ_HEAD_OK and
  4990. return false.
  4991. * src/FtpNegotiateCommand.h
  4992. (SEQ_HEAD_OK): New definition.
  4993. * src/SegmentMan.cc
  4994. (initBitfield): Delete bitfield.
  4995. (isChunkChecksumValidationReady): Fixed the condition.
  4996. * src/UrlRequestInfo.cc: Fixed so that Metalink and Torrent download
  4997. works fine.
  4998. 2007-01-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4999. * src/Xml2MetalinkProcessor.h
  5000. (xpathExists): New function.
  5001. * src/Xml2MetalinkProcessor.cc
  5002. (xpathExists): New function.
  5003. Not to send HEAD request if filename and size are available in Metalink
  5004. file:
  5005. * src/UrlRequestInfo.h
  5006. (filename): New variable.
  5007. (totalLength): New variable.
  5008. (setTotalLength): New function.
  5009. (setFilename): New function.
  5010. * src/MetalinkRequestInfo.cc
  5011. (execute): Set filename and size to UrlRequestInfo.
  5012. * src/MetalinkEntry.cc
  5013. (MetalinkEntry): Initialize size with 0.
  5014. * src/UrlRequestInfo.cc
  5015. (execute): Set filename and size to SegmentMan.
  5016. Not to download rest of the files after selected files are downloaded
  5017. in BitTorrent:
  5018. * src/PieceStorage.h
  5019. (allDownloadFinished): New function.
  5020. * src/DefaultBtAnnounce.cc
  5021. (isCompleteAnnounceReady): Use allDownloadFinished instead of
  5022. downloadFinished.
  5023. (getAnnounceUrl): Use allDownloadFinished instead of downloadFinished.
  5024. * src/DefaultPieceStorage.cc
  5025. (completePiece): Use allDownloadFinished instead of downloadFinished.
  5026. Commented out the call to finishSelectiveDownloadingMode().
  5027. (downloadFinished): Call isFilteredAllBitSet() instead of
  5028. isAllBitSet().
  5029. (allDownloadFinished): New function.
  5030. * src/DefaultBtInteractive.cc
  5031. (addBitfieldMessageToQueue): Call allDownloadFinished() instead of
  5032. downloadFinished().
  5033. (checkHave): Call allDownloadFinished() instead of downloadFinished().
  5034. * src/TorrentDownloadEngine.cc
  5035. (onEndOfRun): Call allDownloadFinished() instead of downloadFinished().
  5036. * src/BitfieldMan.h
  5037. (isFilteredAllBitSet): New function.
  5038. * src/ShareRatioSeedCriteria.h
  5039. (PieceStorage.h): New include.
  5040. (pieceStorage): New variable.
  5041. (evaluate):
  5042. btContext->getTotalLength() -> pieceStorage->getCompletedLength()
  5043. * src/BitfieldMan.cc
  5044. (isFilteredAllBitSet): New function.
  5045. (isAllBitSet): Filter is not took into account.
  5046. Rename --force-truncate as --allow-overwrite:
  5047. * src/TorrentRequestInfo.cc
  5048. (execute): PREF_FORCE_TRUNCATE -> PREF_ALLOW_OVERWRITE
  5049. * src/main.cc
  5050. (showUsage): --force-truncate -> --allow-overwrite
  5051. * src/message.h
  5052. (EX_FILE_ALREADY_EXISTS): --force-truncate -> --allow-overwrite
  5053. * src/prefs.h
  5054. (PREF_FORCE_TRUNCATE): Removed.
  5055. (PREF_ALLOW_OVERWRITE): New definition.
  5056. * src/SegmentMan.cc
  5057. (shouldCancelDownloadForSafety): --force-truncate -> --allow-overwrite
  5058. * src/MetalinkRequestInfo.cc
  5059. (execute): Queueing message are now logged in info level.
  5060. * src/common.h
  5061. (LONG_LONG_MAX): Removed.
  5062. (LONG_LONG_MIN): Removed.
  5063. * src/HttpResponseCommand.cc
  5064. (handleDefaultEncoding): LONG_LONG_MAX -> INT64_MAX
  5065. * src/FtpNegotiateCommand.cc
  5066. (recvSize): LONG_LONG_MAX -> INT64_MAX
  5067. * src/main.cc
  5068. (showUsage): Added --check-integriy and --realtime-chunk-checksum
  5069. command-line option.
  5070. (main): Added --check-integriy and --realtime-chunk-checksum
  5071. command-line option.
  5072. --force-truncate -> --allow-overwrite
  5073. Set initial value of --check-integrity option to false.
  5074. Don't show usage when error occurs while persing command-line options.
  5075. Removed deprecated --upload-limit option.
  5076. 2007-01-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5077. * src/message.h: Added EX_INVALID_PAYLOAD_SIZE and
  5078. EX_INVALID_BT_MESSAGE_ID. Following source files affected.
  5079. * src/BtAllowedFastMessage.cc:
  5080. * src/BtBitfieldMessage.cc
  5081. * src/BtCancelMessage.cc
  5082. * src/BtChokeMessage.cc
  5083. * src/BtHaveAllMessage.cc
  5084. * src/BtHaveMessage.cc
  5085. * src/BtHaveNoneMessage.cc
  5086. * src/BtInterestedMessage.cc
  5087. * src/BtNotInterestedMessage.cc
  5088. * src/BtPieceMessage.cc
  5089. * src/BtPortMessage.cc
  5090. * src/BtRejectMessage.cc
  5091. * src/BtRequestMessage.cc
  5092. * src/BtSuggestPieceMessage.cc
  5093. * src/BtUnchokeMessage.cc
  5094. * src/message.h: Added EX_INVALID_CHUNK_CHECKSUM. Following source
  5095. files are affected.
  5096. * src/ChunkChecksumValidator.cc
  5097. * src/SegmentMan.cc
  5098. 2007-01-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5099. To add chunk checksum validation:
  5100. * src/MetalinkEntry.h
  5101. (MetalinkChunkChecksum.h): New include.
  5102. (chunkChecksum): New variable.
  5103. * src/Request.h
  5104. (method): New variable.
  5105. (setMethod): New function.
  5106. (getMethod): New function.
  5107. (METHOD_GET): New static constant.
  5108. (METHOD_HEAD): New static constant.
  5109. * src/Xml2MetalinkProcessor.h
  5110. (getPieceHash): New function.
  5111. * src/PieceStorage.h
  5112. (markAllPiecesDone): New function.
  5113. (checkIntegrity): New function.
  5114. * src/FileAllocator.h
  5115. (NullFileAllocationMonitor.h): New include.
  5116. (FileAllocator): Initialize fileAllocationMonitor with new
  5117. NullFileAllocationMonitor().
  5118. * src/MultiDiskAdaptor.h
  5119. (messageDigest.h): Remove include.
  5120. (ctx): Removed.
  5121. (hashUpdate): Added ctx.
  5122. (MultiDiskAdaptor): Removed ctx.
  5123. (sha1Sum): Renamed as messageDigest.
  5124. (messageDigest): New function.
  5125. * src/UrlRequestInfo.h
  5126. (HeadResult): New class.
  5127. (digestAlgo): New variable.
  5128. (chunkChecksumLength): New variable.
  5129. (chunkChecksums): New variable.
  5130. (getHeadResult): New function.
  5131. (UrlRequestInfo): Added digestAlgo, chunkChecksumLength.
  5132. (setDigestAlgo): New function.
  5133. (setChunkChecksumLength): New function.
  5134. (setChunkChecksums): New function.
  5135. * src/DefaultPieceStorage.cc
  5136. (DiskAdaptorWriter.h): New include.
  5137. (ChunkChecksumValidator.h): New include.
  5138. (markAllPiecesDone): New function.
  5139. (checkIntegrity): New function.
  5140. * src/DefaultBtContext.h
  5141. (getPieceHashes): New function.
  5142. * src/TorrentRequestInfo.cc
  5143. (execute): Try to validate chunk checksum if file already exists and
  5144. .aria2 file doesn't there and user allows aria2 to overwrite it.
  5145. * src/messageDigest.h
  5146. (~MessageDigestContext): Added digestFree().
  5147. * src/MetalinkRequestInfo.cc
  5148. (execute): Set digestAlgo, chunkChecksum, chunkChecksums to reqInfo.
  5149. * src/DiskAdaptor.h
  5150. (messageDigest.h): New include.
  5151. (sha1Sum): Renamed as messageDigest.
  5152. (messageDigest): New function.
  5153. * src/DownloadCommand.h
  5154. (PeerStat.h): New include.
  5155. (maxDownloadSpeedLimit): New variable.
  5156. (startupIdleTime): New variable.
  5157. (lowestDownloadSpeedLimit): New variable.
  5158. (peerStat): New variable.
  5159. (setMaxDownloadSpeedLimit): New function.
  5160. (setStartupIdleTime): New function.
  5161. (setLowestDownloadSPeedLimit): New function.
  5162. * src/BtContext.h
  5163. (getPieceHashes): New function.
  5164. * src/main.cc
  5165. (main): Set PREF_REALTIME_CHUNK_CHECKSUM and PREF_CHECK_INTEGRITY
  5166. option to true for testing purpose.
  5167. * src/BtPieceMessage.cc
  5168. (checkPieceHash): Use messageDigest
  5169. * src/DownloadEngine.cc
  5170. (SetDescriptor): Removed.
  5171. (AccumulateActiveCommand): Removed.
  5172. (waitData): Rewritten.
  5173. (updateFdSet): Rewritten.
  5174. * src/MultiDiskAdaptor.cc
  5175. (hashUpdate): Added ctx.
  5176. (sha1Sum): Renamed as messageDigest.
  5177. (messageDigest): New function.
  5178. * src/BitfieldMan.h
  5179. (isBitRangeSet): New function.
  5180. (unsetBitRange): New function.
  5181. * src/ByteArrayDiskWriter.h
  5182. (sha1Sum): Renamed as messageDigest.
  5183. (messageDigest): New function.
  5184. * src/ConsoleDownloadEngine.cc
  5185. (calculateStatistics): If nspeed < 0 then set nspeed to 0.
  5186. * src/DiskWriter.h
  5187. (messageDigest.h): New include.
  5188. (sha1Sum): Renamed as messageDigest.
  5189. (messageDigest): New function.
  5190. * src/ChunkChecksumValidator.h: New class.
  5191. * src/DiskAdaptorWriter.h: New class.
  5192. * src/prefs.h
  5193. (PREF_REALTIME_CHUNK_CHECKSUM): New definition.
  5194. (PREF_CHECK_INTEGRITY): New definition.
  5195. * src/HttpResponseCommand.cc
  5196. (handleDefaultEncoding): Added method "HEAD" handling.
  5197. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  5198. (handleOtherEncoding):
  5199. Added the call to e->segmentMan->shouldCancelDownloadForSafety().
  5200. (createHttpDownloadCommand): Set maxDownloadSpeedLimit,
  5201. startupIdleTime, lowestDownloadSpeedLimit to command.
  5202. * src/SegmentMan.h
  5203. (getSegmentEntryByIndex): New function.
  5204. (getSegmentEntryByCuid): New function.
  5205. (getSegmentEntryIteratorByCuid): New function.
  5206. (diskWriter): DiskWriter -> DiskWriterHandle
  5207. (pieceHashes): New variable.
  5208. (chunkHashLength): New variable.
  5209. (digestAlgo): New variable.
  5210. (FindPeerStat): Removed.
  5211. (getPeerStat): Rewritten.
  5212. (markAllPiecesDone): New function.
  5213. (checkIntegrity): New function.
  5214. (tryChunkChecksumValidation): New function.
  5215. (isChunkChecksumValidationReady): New function.
  5216. * src/BitfieldMan.cc
  5217. (BitfieldMan): Initialized bitfieldLength, blocks to 0.
  5218. (BitfieldMan): Initialized blockLength, totalLength, bitfieldLength,
  5219. blocks to 0.
  5220. (isBitRangeSet): New function.
  5221. (unsetBitRange): New function.
  5222. * src/FtpNegotiateCommand.cc
  5223. (executeInternal): Set maxDownloadSpeedLimit,
  5224. startupIdleTime, lowestDownloadSpeedLimit to command.
  5225. (recvSize): Added method "HEAD" handling.
  5226. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  5227. * src/AbstractSingleDiskAdaptor.cc
  5228. (sha1Sum): Renamed as messageDigest.
  5229. (messageDigest): New function.
  5230. * src/AbstractSingleDiskAdaptor.h
  5231. (sha1Sum): Renamed as messageDigest.
  5232. (messageDigest): New function.
  5233. * src/Util.h
  5234. (indexRange): New function.
  5235. * src/MetalinkEntry.cc
  5236. (MetalinkEntry): Initialized chunkChecksum to 0.
  5237. * src/ShaVisitor.cc
  5238. (~ShaVisitor): Removed the call to ctx.digestFree().
  5239. * src/SegmentMan.cc
  5240. (ChunkChecksumValidator.h): New include.
  5241. (SegmentMan): Initialized chunkHashLength to 0. Initialized digestAlgo
  5242. to DIGEST_ALGO_SHA1.
  5243. (~SegmentMan): Removed diskWriter.
  5244. (FindSegmentEntryByIndex): Removed.
  5245. (FindSegmentEntryByCuid): Removed.
  5246. (checkoutSegment): Rewritten.
  5247. (findSlowerSegmentEntry): Rewritten.
  5248. (getSegment): Rewritten.
  5249. (updateSegment): Rewritten.
  5250. (completeSegment): Rewritten.
  5251. (markAllPiecesDone): New function.
  5252. (checkIntegrity): New function.
  5253. (isChunkChecksumValidationReady): New function.
  5254. (tryChunkChecksumValidation): New function.
  5255. * src/Xml2MetalinkProcessor.cc
  5256. (getEntry): Get size and set it to entry.
  5257. Get chunk checksum and set it to entry.
  5258. (getPieceHash): New function.
  5259. * src/Util.cc
  5260. (sha1Sum): Removed ctx.digestFree()
  5261. (fileChecksum): Removed ctx.digestFree()
  5262. (indexRange): New function.
  5263. * src/Request.cc
  5264. (METHOD_GET): New variable.
  5265. (METHOD_HEAD): New variable.
  5266. (Request): Added method.
  5267. * src/UrlRequestInfo.cc
  5268. (FatalException.h): New include.
  5269. (message.h): New include.
  5270. (operator<<): Added operator<< for class HeadResult.
  5271. (getHeadResult): New function.
  5272. (execute): Get filename and size in separate download engine.
  5273. * src/ChunkChecksumValidator.cc: New class.
  5274. * src/DownloadCommand.cc:
  5275. (DownloadCommand): Added peerStat.
  5276. (executeInternal): Use maxDownloadSpeedLimit member instead of getting
  5277. the value from Option.
  5278. The buffer size is now 16KB.
  5279. Use peerStat member instead of getting it from SegmentMan.
  5280. Use startupIdleTime member instead of gettingit from Option.
  5281. Added chunk checksum validation.
  5282. * src/AbstractDiskWriter.cc
  5283. (AbstractDiskWriter): Removed ctx.
  5284. (~AbstractDiskWriter): Removed ctx.digestFree()
  5285. (writeDataInternal): Returns the return value of write.
  5286. (readDataInternal): Returns the return value of read.
  5287. (sha1Sum): Renamed as messageDigest
  5288. (messageDigest): New function.
  5289. * src/AbstractDiwkWriter.h
  5290. (messageDigest.h): Removed include.
  5291. (ctx): Removed.
  5292. (sha1Sum): Renamed as messageDigest
  5293. (messageDigest): New function.
  5294. * src/DefaultPieceStorage.h
  5295. (markAllPiecesDone): New function.
  5296. (checkIntegrity): New function.
  5297. * src/NullFileAllocationMonitor.h: New class.
  5298. * src/MetalinkChunkChecksum.h: New class.
  5299. 2007-01-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5300. To decrease CPU usage in bittorrent download, calculation results in
  5301. BitfieldMan were cached and realtime fetching PeerObject was removed
  5302. with WeakHandle introduced. Option values are set to the objects
  5303. by setter before download begins.
  5304. * src/DefaultBtRequestFactory.cc: Use messageFactory member.
  5305. * src/DefaultBtRequestFactory.h
  5306. (dispatcher): BtMessageDispatcherHandle ->
  5307. BtMessageDispatcherWeakHandle.
  5308. (messageFactory): New variable.
  5309. (setBtMessageDispatcher): BtMessageDispatcherHandle ->
  5310. BtMessageDispatcherWeakHandle.
  5311. (setBtMessageFactory): New function.
  5312. * src/DefaultBtMessageDispatcher.cc:
  5313. (sendMessages): Use maxUploadSpeedLimit instead of fetching the value
  5314. from Option.
  5315. (checkRequestSlotAndDoNecessaryThing): Use requestTimeout instead of
  5316. feating the value from Option.
  5317. Use messageFactory member.
  5318. * src/PeerInteractionCommand.cc
  5319. (PeerInteractionCommand): Added maxDownloadSpeedLimit.
  5320. Add reverse dependencies to factory object.
  5321. Set maxUploadSpeedLimit and requestTimeout and messageFactory to
  5322. dispatcher.
  5323. Set messageFactory to receiver.
  5324. Set keepAliveInterval and maxDownloadSpeedLimit and messageFactory to
  5325. btInteractive.
  5326. Set receiver to peerObject.
  5327. Set maxDownloadSpeedLimit to this.
  5328. (executeInternal): Use maxDownloadSpeedLimit member.
  5329. * src/BtChokeMessage.cc
  5330. (doReceivedAction): Use dispatcher, requestFactory member.
  5331. (onSendComplete): Use dispatcher member.
  5332. * src/PeerInteractionCommand.h
  5333. (maxDownloadSpeedLimit): New variable.
  5334. * src/DefaultBtMessageReceiver.h
  5335. (peerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  5336. (dispatcher):
  5337. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  5338. (messageFactory): New variable.
  5339. (setPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  5340. (getPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  5341. (setDispatcher):
  5342. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  5343. (setBtMessageFactory): New function.
  5344. * src/DefaultBtInteractive.cc
  5345. (initiateHandshake): Use messageFactory member.
  5346. (addBitfieldMessageToQueue): Use messageFactory member.
  5347. (addAllowedFastMessageToQueue): Use messageFactory member.
  5348. (decideChoking): Use messageFactory member.
  5349. (checkHave): Use messageFactory member.
  5350. (sendKeepAlive): Use keepAliveInterval, messageFactory member.
  5351. (receiveMessages): Use maxDownloadSpeedLimit member.
  5352. (decideInterest): Use messageFactory member.
  5353. * src/BtRequestMessage.cc
  5354. (doReceivedAction): Use messageFactory, dispatcher member.
  5355. (onQueued): Use dispatcher member.
  5356. * src/BtPieceMessage.cc
  5357. (doReceivedAction): Use dispatcher member.
  5358. (send): Use peerConnection member.
  5359. (onWrongPiece): Use requestFactory member.
  5360. (handleChokingEvent): Use messageFactory, dispatcher member.
  5361. (handleCancelSendingPieceEvent): Use messageFactory, dispatcher member.
  5362. * src/BtMessageDispatcher.h
  5363. (BtMessageDispatcherWeakHandle): New type definition.
  5364. * src/SimpleBtMessage.cc
  5365. (send): Use peerConnection member.
  5366. * src/BtRejectMessage.cc
  5367. (doReceivedAction): Use dispatcher member.
  5368. * src/DefaultBtMessageDispatcher.h
  5369. (Option.h): Removed include.
  5370. (messageFactory): New variable.
  5371. (option): Removed.
  5372. (maxUploadSpeedLimit): New variable.
  5373. (requestTimeout): New variable.
  5374. (DefaultBtMessageDispatcher): Removed option.
  5375. Added maxUploadSpeedLimit, requestTimeout.
  5376. (setOption): Removed.
  5377. (getOption): Removed.
  5378. (setMaxUploadSpeedLimit): New function.
  5379. (setRequestTimeout): New function.
  5380. (setBtMessageFactory): New function.
  5381. * src/DefaultBtInteractive.h
  5382. (btMessageReceiver):
  5383. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  5384. (dispatcher):
  5385. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  5386. (btRequestFactory):
  5387. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  5388. (peerConnection):
  5389. PeerConnectionHandle -> PeerConnectionWeakHandle
  5390. (messageFactory): New variable.
  5391. (option): Removed.
  5392. (keepAliveInterval): New variable.
  5393. (maxDownloadSpeedLimit): New variable.
  5394. (DefaultBtInteractive): Added keepAliveInterval, maxDownloadSpeedLimit.
  5395. (setBtMessageReceiver):
  5396. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  5397. (setDispatcher):
  5398. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  5399. (setBtRequestFactory):
  5400. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  5401. (setPeerConnection):
  5402. PeerConnectionHandle -> PeerConnectionWeakHandle
  5403. (setOption): Removed.
  5404. (setKeepAliveInterval): New function.
  5405. (setMaxDownloadSpeedLimit): New function.
  5406. (setBtMessageFactory): New function.
  5407. * src/BitfieldMan.h
  5408. (cachedNumMissingBlock): New variable.
  5409. (cachedNumFilteredBlock): New variable.
  5410. (cachedCompletedLength): New variable.
  5411. (cachedFilteredComletedLength): New variable.
  5412. (cachedFilteredTotalLength): New variable.
  5413. (countMissingBlockNow): New function.
  5414. (countFilteredBlockNow): New function.
  5415. (getFilteredTotalLengthNow): New function.
  5416. (getCompletedLengthNow): New function.
  5417. (getFilteredCompletedLengthNow): New function.
  5418. (updateCache): New function.
  5419. * src/AbstractBtMessage.h
  5420. (BtMessageDispatcher.h): New include.
  5421. (PeerConnection.h): New include.
  5422. (BtRequestFactory.h): New include
  5423. (BtMessageFactory.h): New include.
  5424. (dispatcher): New variable.
  5425. (messageFactory): New variable.
  5426. (peerConnection: New variable.
  5427. (setBtMessageDispatcher): New function.
  5428. (setPeerConnection): New function.
  5429. (setBtMessageFactory): New function.
  5430. (setBtRequestFactory): New function.
  5431. * src/DefaultBtMessageFactory.cc
  5432. (setCommonProperty): Set dispatcher, requestFactory, this,
  5433. peerConnection to msg.
  5434. * src/BtRegistry.h
  5435. (BT_MESSAGE_RECEIVER): New macro.
  5436. * src/PeerConnection.h
  5437. (PeerConnectionWeakHandle): New type definition.
  5438. * src/BtMessageFactory.h
  5439. (BtMessageFactoryWeakHandle): New type definition.
  5440. * src/BitfieldMan.cc
  5441. (BitfieldMan): Added cachedNumMissingBlock, cachedNumFilteredBlock,
  5442. cachedCompletedLength, cachedFilteredComletedLength,
  5443. cachedFilteredTotalLength.
  5444. Call updateCache().
  5445. (countMissingBlock): Return cachedNumMissingBlock.
  5446. (countMissingBlockNow): New function.
  5447. (countBlock): Return cachedNumFilteredBlock if filterEnabled is true.
  5448. (countFilteredBlockNow): New function.
  5449. (setBit): Call updateCache().
  5450. (unsetBit): Call updateCache().
  5451. (setBitfield): Call updateCache().
  5452. (clearAllBit): Call updateCache().
  5453. (setAllBit): Use setBitInternal instead of setBit.
  5454. Call updateCache().
  5455. (addFilter): Call updateCache().
  5456. (enableFilter): Call updateCache().
  5457. (disableFilter): Call updateCache().
  5458. (clearFilter): Call updateCache().
  5459. (getFilteredTotalLength): Return cachedFilteredTotalLength.
  5460. (getFilteredTotalLengthNow): New function.
  5461. (getCompletedLength): Return cachedCompletedLength.
  5462. (getCompletedLengthNow): New function.
  5463. (getFilteredCompletedLength): Return cachedFilteredComletedLength.
  5464. (getFilteredCompletedLengthNow): New function.
  5465. (updateCache): New function.
  5466. * src/BtMessageReceiver.h
  5467. (BtMessageReceiverWeakHandle): New type definition.
  5468. * src/DefaultBtMessageReceiver.cc
  5469. (receiveHandshake): Use messageFactory member.
  5470. (sendHandshake): Use messageFactory member.
  5471. (receiveMessage): Use messageFactory member.
  5472. * src/DefaultBtMessageFactory.h
  5473. (dispatcher): New variable.
  5474. (requestFactory): New variable.
  5475. (peerConnection): New variablle.
  5476. (setBtMessageDispatcher): New function.
  5477. (setBtRequestFactory): New function.
  5478. (setPeerConnection): New function.
  5479. * src/SharedHandle.h
  5480. (RefCount): New class.
  5481. (WeakHandle): New class.
  5482. * src/PeerObject.h
  5483. (BtMessageReceiver.h): New include.
  5484. (PeerObject): Added btMessageReceiver.
  5485. (btMessageReceiver): New variable.
  5486. * src/Util.cc
  5487. (countBit): Simplified.
  5488. * src/BtCancelMessage.cc
  5489. (doReceivedAction): Use dispatcher member.
  5490. * src/BtRequestFactory.h
  5491. (BtRequestFactoryWeakHandle): New type definition.
  5492. * src/PeerStorage.h
  5493. (downloadSpeed): int -> uint32_t
  5494. (uploadSpeed): int -> uint32_t
  5495. (sessionDownloadLength): long long int -> uint64_t
  5496. (sessionUploadLength): long long int -> uint64_t
  5497. 2007-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5498. To add RecoverableException, FatalException:
  5499. * src/AbstractCommand.cc
  5500. (onAbort): Exception -> RecoverableException
  5501. * src/PeerAbstractCommand.h
  5502. (RecoverableException.h): New include.
  5503. (onAbort): Exception -> RecoverableException.
  5504. * src/PeerInteractionCommand.cc
  5505. (onAbort): Exception -> RecoverableException.
  5506. * src/PeerAbstractCommand.cc
  5507. (execute): Exception -> RecoverableException.
  5508. (onAbort): Exception -> RecoverableException.
  5509. * src/TorrentRequestInfo.cc
  5510. (execute): Exception -> RecoverableException.
  5511. * src/MetalinkRequestInfo.cc
  5512. (execute): Exception -> RecoverableException.
  5513. * src/MetaFileUtil.cc: RecoverableException.
  5514. * src/AbstractCommand.h
  5515. (onAbort): Exception -> RecoverableException.
  5516. * src/DlRetryEx.h: Exception -> RecoverableException.
  5517. * src/DlAbortEx.h: Exception -> RecoverableException.
  5518. * src/PeerListenCommand.cc: Exception -> RecoverableException.
  5519. * src/Util.cc: Exception -> RecoverableException.
  5520. * src/DefauldDiskWriter.cc: Exception -> RecoverableException.
  5521. * src/TrackerUpdateCommand.cc: Exception -> RecoverableException.
  5522. * src/UrlRequestInfo.cc: Exception -> RecoverableException.
  5523. To make ID static const int
  5524. * src/BtInterestedMessage.h
  5525. (ID_t): Removed.
  5526. (ID): New variable.
  5527. (getId): Made non-const.
  5528. * src/BtPieceMessage.h
  5529. (ID_t): Removed.
  5530. (ID): New variable.
  5531. (getId): Made non-const.
  5532. * src/BtChokeMessage.h
  5533. (ID_t): Removed.
  5534. (ID): New variable.
  5535. (getId): Made non-const.
  5536. * src/BtHaveAllMessage.h
  5537. (ID_t): Removed.
  5538. (ID): New variable.
  5539. (getId): Made non-const.
  5540. * src/BtKeepAliveMessage.h
  5541. (ID_t): Removed.
  5542. (ID): New variable.
  5543. (getId): Made non-const.
  5544. * src/BtHandshakeMessage.h
  5545. (ID): New variable.
  5546. (getId): Made non-const.
  5547. * src/BtSuggestPieceMessage.h
  5548. (ID_t): Removed.
  5549. (ID): New variable.
  5550. (getId): Made non-const.
  5551. * src/BtPortMessage.h
  5552. (ID_t): Removed.
  5553. (ID): New variable.
  5554. (getId): Made non-const.
  5555. * src/AbstractBtMessage.h
  5556. (id): Removed.
  5557. (AbstractBtMessage): Removed id.
  5558. (getId): Removed.
  5559. * src/BtHaveMessage.h
  5560. (ID_t): Removed.
  5561. (ID): New variable.
  5562. (getId): Made non-const.
  5563. * src/BtAllowedFastMessage.h
  5564. (ID_t): Removed.
  5565. (ID): New variable.
  5566. (getId): Made non-const.
  5567. * src/BtCancelMessage.h
  5568. (ID_t): Removed.
  5569. (ID): New variable.
  5570. (getId): Made non-const.
  5571. * src/BtNotInterestedMessage.h
  5572. (ID_t): Removed.
  5573. (ID): New variable.
  5574. (getId): Made non-const.
  5575. * src/BtChokeMessage.h
  5576. (ID_t): Removed.
  5577. (ID): New variable.
  5578. (getId): Made non-const.
  5579. * src/BtRejectMessage.h
  5580. (ID_t): Removed.
  5581. (ID): New variable.
  5582. (getId): Made non-const.
  5583. * src/BtBitfieldMessage.h
  5584. (ID_t): Removed.
  5585. (ID): New variable.
  5586. (getId): Made non-const.
  5587. * src/BtUnchokeMessage.h
  5588. (ID_t): Removed.
  5589. (ID): New variable.
  5590. (getId): Made non-const.
  5591. * src/BtRequestMessage.h
  5592. (ID_t): Removed.
  5593. (ID): New variable.
  5594. (getId): Made non-const.
  5595. * src/BtHaveMessage.h
  5596. (ID_t): Removed.
  5597. (ID): New variable.
  5598. (getId): Made non-const.
  5599. To add --force-truncate command-line option and a check whether
  5600. the file already exists:
  5601. * src/DirectDiskAdaptor.h
  5602. (getFilePath): Made virtual public.
  5603. * src/MultiDiskAdaptor.h
  5604. (File.h): New include.
  5605. (DiskWriterEntry::fileEntry): Made private.
  5606. (DiskWriterEntry::fileExists): New function.
  5607. (DiskWriterEntry::getFileEntry): New function.
  5608. (fileExists): New function.
  5609. (getFilePath): New function.
  5610. * src/TorrentRequestInfo.cc
  5611. (FatalException.h): New include.
  5612. (message.h): New include.
  5613. (RecoverableException.h): New include.
  5614. (execute): Added a check whether file is already exists or not.
  5615. * src/DiskAdaptor.h
  5616. (fileExists): New function.
  5617. (getFilePath): New function.
  5618. * src/main.cc
  5619. (showUsage): Added an explanation of --force-truncate command-line
  5620. option.
  5621. (main): Added --force-truncate command-line option.
  5622. * src/Exception.h
  5623. (setMsg): buf[256] -> buf[1024]
  5624. * src/CopyDiskWriter.h
  5625. (getFilePath): Made public virtual.
  5626. * src/MultiDiskAdaptor.cc: fileEntry -> getFileEntry()
  5627. (fileExists): New function.
  5628. * src/DownloadEngineFactory.cc
  5629. (newTorrentConsoleEngine): Don't open file here.
  5630. * src/message.h
  5631. (EX_FILE_ALREADY_EXISTS): New definition.
  5632. * src/prefs.h
  5633. (PREF_FOECE_TRUNCATE): New definition.
  5634. * src/HttpResponseCommand.cc
  5635. (handleDefaultEncoding): Added a check whether the file already exists.
  5636. * src/SegmentMan.h
  5637. (fileExists): New function.
  5638. (shouldCancelDownloadForSafety): New function.
  5639. * src/FtpNegotiateCommand.cc
  5640. (recvSize): Added a check whether the file already exists.
  5641. * src/AbstractSingleDiskAdaptor.cc
  5642. (File.h): New include.
  5643. (fileExists): New function.
  5644. * src/AbstractSingleDiskAdaptor.h
  5645. (getFilePath): Removed.
  5646. (fileExists): New function.
  5647. * src/SegmentMan.cc
  5648. (fileExists): New function.
  5649. (shouldCancelDownloadForSafety): New function.
  5650. To fix regression bug in torrent downloading:
  5651. * src/DefaultBtRequestFactory.cc
  5652. (doChokedAction): New function.
  5653. * src/DefaultBtRequestFactory.h
  5654. (doChokedAction): New function.
  5655. * src/DefaultBtMessageDispatcher.cc
  5656. (doChokedAction): Do not delete request if its target is in allowed
  5657. fast set.
  5658. * src/DefaultBtInteractive.cc
  5659. (doPostHandshakeProcessing): Added a call to sendPendingMessage().
  5660. (sendKeepAlive): Send keep alive message even if the outgoing message
  5661. queue is not empty.
  5662. (decideInterest): Simplified the code.
  5663. (fillPiece): Remove a call to dispatcher->doChokedAction() because
  5664. it is already called when BtChokeMessage is received from a peer.
  5665. * src/BtRequestFactory.h
  5666. (doChokedAction): New function.
  5667. To clean up code:
  5668. * src/PeerInteractionCommand.h
  5669. (executeInternal): Added virtual keyword explicitly.
  5670. (prepareForRetry): Added virtual keyword explicitly.
  5671. (prepareForNextPeer): Added virtual keyword explicitly.
  5672. (onAbort): Added virtual keyword explicitly.
  5673. * src/RequestSlot.cc
  5674. (isTimeout): Use Time::elapsed() instead of differenceInMillis().
  5675. * src/BtPieceMessage.cc
  5676. (doReceivedAction): Added a debug log of piece's bitfield.
  5677. * src/Piece.h
  5678. (getBitfieldLength): New function.
  5679. * src/ByteArrayDiskWriter.cc
  5680. (clear): Added buf = 0 to avoid double free corruption.
  5681. * src/FileAllocator.cc
  5682. (allocate): Fixed an assignment of fileAllocationMonitor->currentValue.
  5683. Added cp.reset().
  5684. * src/BitfieldMan.h
  5685. (operator=): Rewritten.
  5686. * src/BitfieldMan.cc
  5687. (BitfieldMan): Initialized bitfield, useBitfield.
  5688. * src/PeerConnection.cc
  5689. (receiveMessage): Added a call to socket->readable() after getting
  5690. message length to avoid possible EOF.
  5691. * src/Util.cc
  5692. (torrentUrlencode): Fixed an encodeing bug. BUG#1629912
  5693. 2007-01-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5694. To add an ability to pre-allocate file space:
  5695. * src/DirectDiskAdaptor.h: Rewritten.
  5696. * src/PieceStorage.h: DiskAdaptor -> DiskAdaptorHandle
  5697. * src/MultiDiskAdaptor.h: Rewritten.
  5698. * src/DefaultPieceStorage.cc
  5699. (MultiDiskWriter.h): Removed include.
  5700. (PreAllocationDiskWriter.h): Removed include.
  5701. (FileAllocationMonitor.h): New include.
  5702. (~DefaultPieceStorage): Removed deletion of diskAdaptor.
  5703. (initStorage): Rewritten.
  5704. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5705. * src/FileAllocator.h: New class.
  5706. * src/FileAllocator.cc: New class.
  5707. * src/FileAllocationMonitor.h: New class.
  5708. * src/FileAllocationMonitor.cc: New class.
  5709. * src/ConsoleFileAllocationMonitor.h: New class.
  5710. * src/ConsoleFileAllocationMonitor.cc: New class.
  5711. * src/AbstractSingleDiskAdaptor.h: New class.
  5712. * src/AbstractSingleDiskAdaptor.cc: New class.
  5713. * src/DiskAdaptor.h
  5714. (Directory.h): Removed include.
  5715. (DiskWriter.h): Removed include.
  5716. (FileEntry.h): Removed include.
  5717. (diskWriter): Removed.
  5718. (DiskAdaptor): Removed diskWriter.
  5719. (openFile): Made pure virtual.
  5720. (closeFile): Made pure virtual.
  5721. (openExistingFile): Made pure virtual.
  5722. (initAndOpenFile): Made pure virtual.
  5723. (writeData): Made pure virtual.
  5724. (readData): Made pure virtual.
  5725. (sha1Sum): Made pure virtual.
  5726. (getStoreDir): Returns const reference of storeDir.
  5727. (DiskAdaptorHandle): New type definition.
  5728. * src/main.cc
  5729. (ConsoleFileAllocationMonitor.h): New include.
  5730. (showUsage): Added default value description of -s option.
  5731. Added the description of --file-allocation option.
  5732. (main): Set default value of --file-allocation option to 'none'.
  5733. Added --file-allocation command-line option.
  5734. Setup FileAllocationMonitorFactory.
  5735. * src/FtpInitiateConnectionCommand.cc
  5736. (executeInternal): Removed diskWriter related processing, which was
  5737. moved to FtpNegotiationCommand.cc.
  5738. * src/DirectDiskAdaptor.cc
  5739. (getFilePath): Made non-const.
  5740. * src/CopyDiskAdaptor.h
  5741. (DiskAdaptor.h): Removed include.
  5742. (DiskWriter.h): Removed include.
  5743. (AbstractSingleDiskAdaptor.h): New include.
  5744. (getFilePath): Made non-const. Added virtual keyword.
  5745. (CopyDiskAdaptor): Removed diskWriter.
  5746. (getTempFile): Returns const reference.
  5747. (CopyDiskAdaptorHandle): New type definition.
  5748. * src/ByteArrayDiskWriter.cc
  5749. (clear): Simplified.
  5750. (initAndOpenFile): Rewritten.
  5751. (openFile): Call initAndOpenFile()
  5752. * src/MultiDiskAdaptor.cc: Rewritten.
  5753. * src/DownloadEngineFactory.cc
  5754. (FileAllocator.h): New include.
  5755. (FileAllocationMonitor.h): New include.
  5756. (newConsoleEngine): Call DefaultDiskWriter::createNewDiskWriter() to
  5757. create DefaultDiskWriter with file allocator.
  5758. * src/DiskWriter.h
  5759. (initAndOpenFile): Added totalLength argument.
  5760. (openFile): Added totalLength argument.
  5761. * src/prefs.h
  5762. (PREF_FILE_ALLOCATION): New definition.
  5763. (V_PREALLOC): New definition.
  5764. (V_NONE): New definition.
  5765. * src/HttpResponseCommand.cc
  5766. (handleDefaultEncoding): Call DefaultDiskWriter::initAndOpenFile with
  5767. size.
  5768. * src/FtpNegotiateCommand.cc
  5769. (Util.h): New include.
  5770. (recvSize): Open file here.
  5771. * src/Util.h
  5772. (ullitos): New function.
  5773. * src/CopyDiskWriter.h
  5774. (getFilePath): Made non-const.
  5775. * src/DefaultDiskWriter.h
  5776. (Option.h): New include.
  5777. (totalLength): Removed.
  5778. (DefaultDiskWriter): Removed totalLength.
  5779. (initAndOpenFile): Added totalLength argument.
  5780. (DefaultDiskWriterHandle): New type definition.
  5781. (createNewDiskWriter): New function.
  5782. * src/Util.cc
  5783. (ullitos): New function.
  5784. * src/DefaultDiskWriter.cc
  5785. (message.h): New include.
  5786. (FileAllocator.h): New include.
  5787. (prefs.h): New include.
  5788. (Util.h): New include.
  5789. (DefaultDiskWriter): Removed totalLength.
  5790. (initAndOpenFile): Added file allocation.
  5791. (createNewDiskWriter): New function. Just for temporary solution.
  5792. It will be rewritten later.
  5793. * src/DiskAdaptor.cc
  5794. (DiskAdaptor): Removed diskWriter.
  5795. * src/AbstractDiskWriter.cc
  5796. (LogFactory.h): New include.
  5797. (AbstractDiskWriter): Added fileAllocator, logger.
  5798. (openFile): Added totalLength argument.
  5799. * src/AbstractDiskWriter.h
  5800. (FileAllocator.h): New include.
  5801. (Logger.h): New include.
  5802. (fileAllocator): New variable.
  5803. (logger): New variable.
  5804. (openFile): Added totalLength argument. Added virtual keyword
  5805. explicitly.
  5806. (openExistingFile): Added totalLength argument. Added virtual keyword
  5807. explicitly.
  5808. (closeFile): Added virtual keyword explicitly.
  5809. (sha1Sum): Added virtual keyword explicitly.
  5810. (writeData): Added virtual keyword explicitly.
  5811. (readData): Added virtual keyword explicitly.
  5812. (setFileAllocator): New function.
  5813. * src/DefaultPieceStorage.h
  5814. (FileAllocator.h): New include.
  5815. (diskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5816. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5817. * src/FileProgressMonitor.h: New class.
  5818. To compile aria2 on PC-BSD:
  5819. * src/DefaultBtContext.cc
  5820. (libgen.h): New include.
  5821. To fix memory leak:
  5822. * src/Exception.h
  5823. (~Exception): Delete cause. Fixed memory leak.
  5824. 2006-12-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5825. Rewritten a portion of bittorrent implementation:
  5826. * src/BtMessageValidator.h: New class.
  5827. * src/BtBitfieldMessageValidator.h: New class.
  5828. * src/BtHandshakeMessageValidator.h: New class.
  5829. * src/BtRequestMessageValidator.h: New class.
  5830. * src/BtSuggestPieceMessageValidator.h: New class.
  5831. * src/BtAllowedFastMessageValidator.h: New class.
  5832. * src/BtRejectMessageValidator.h: New class.
  5833. * src/BtCancelMessageValidator.h: New class.
  5834. * src/BtPieceMessageValidator.h: New class.
  5835. * src/BtHaveMessageValidator.h: New class.
  5836. * src/BtEventListener.h: New class.
  5837. * src/AbstractBtEventListener.h: New class.
  5838. * src/BtEvent.h: New class.
  5839. * src/BtChokingEvent.h: New class.
  5840. * src/BtChokedEvent.h: New class.
  5841. * src/BtCancelSendingPieceEvent.h: New class.
  5842. * src/BtAbortOutstandingRequestEvent.h: New class.
  5843. * src/Randomizer.h: New class.
  5844. * src/SimpleRandomizer.h: New class.
  5845. * src/BtMessage.h: New class.
  5846. * src/AbstractBtMessage.h: New class.
  5847. * src/SimpleBtMessage.h: New class.
  5848. * src/BtHaveMessage.h: New class.
  5849. * src/BtInterestedMessage.h: New class.
  5850. * src/BtAllowedFastMessage.h: New class.
  5851. * src/BtUnchokeMessage.h: New class.
  5852. * src/BtCancelMessage.h: New class.
  5853. * src/BtNotInterestedMessage.h: New class.
  5854. * src/BtChokeMessage.h: New class.
  5855. * src/BtHaveNoneMessage.h: New class.
  5856. * src/BtHandshakeMessage.h: New class.
  5857. * src/BtSuggestPieceMessage.h: New class.
  5858. * src/BtHaveMessage.h: New class.
  5859. * src/BtPieceMessage.h: New class.
  5860. * src/BtHaveAllMessage.h: New class.
  5861. * src/BtKeepAliveMessage.h: New class.
  5862. * src/BtPortMessage.h: New class.
  5863. * src/BtRejectMessage.h: New class.
  5864. * src/BtBitfieldMessage.h: New class.
  5865. * src/BtRequestMessage.h: New class.
  5866. * src/DefaultBtRequestFactory.h: New class.
  5867. * src/DefaultBtMessageReceiver.h: New class.
  5868. * src/BtInteractive.h: New class.
  5869. * src/BtMessageDispatcher.h: New class.
  5870. * src/DefaultBtMessageDispatcher.h: New class.
  5871. * src/DefaultBtInteractive.h: New class.
  5872. * src/BitfieldManFactory.h: New class.
  5873. * src/HandleRegistry.h: New class.
  5874. * src/BtMessageFactory.h: New class.
  5875. * src/BtMessageReceiver.h: New class.
  5876. * src/DefaultBtMessageFactory.h: New class.
  5877. * src/PeerObject.h: New class.
  5878. * src/BtRequestFactory.h: New class.
  5879. * src/SuggestPieceMessage.h: Removed.
  5880. * src/PortMessage.h: Removed.
  5881. * src/SuggestPieceMessage.h: Removed.
  5882. * src/KeepAliveMessage.h: Removed.
  5883. * src/HandshakeMessage.h: Removed.
  5884. * src/PeerInteraction.h: Removed.
  5885. * src/UnchokeMessage.h: Removed.
  5886. * src/PieceMessage.h: Removed.
  5887. * src/RequestMessage.h: Removed.
  5888. * src/InterestedMessage.h: Removed.
  5889. * src/HaveMessage.h: Removed.
  5890. * src/CancelMessage.h: Removed.
  5891. * src/RejectMessage.h: Removed.
  5892. * src/AllowedFastMessage.h: Removed.
  5893. * src/HaveNoneMessage.h: Removed.
  5894. * src/SimplePeerMessage.h: Removed.
  5895. * src/HaveAllMessage.h: Removed.
  5896. * src/BitfieldMessage.h: Removed.
  5897. * src/PeerMessageFactory.h: Removed.
  5898. * src/NotInterestedMessage.h: Removed.
  5899. * src/ChokeMessage.h: Removed.
  5900. * src/PeerMessage.h: Removed.
  5901. 2006-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5902. To know root cause of exception:
  5903. * src/Exception.h
  5904. (cause): New variable.
  5905. (Exception): Added a parameter.
  5906. (getMsg): Return const reference to msg.
  5907. (getCause): New function.
  5908. * src/DlRetryEx.h
  5909. (DlRetryEx): Added a parameter 'cause'.
  5910. Added an overloaded constructor.
  5911. (DlAbortEx): Added a parameter 'cause'.
  5912. Added an overloaded constructor.
  5913. * src/SimpleLogger.cc
  5914. (writeLog): Log nested exception messages recursively.
  5915. 2006-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5916. * src/DefaultBtProgressInfoFile.cc
  5917. (load): Fixed memory leak when the infohash doesn't match.
  5918. 2006-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5919. * src/DefaultPeerStorage.cc
  5920. (calculateStat): Simplified the code by combining 2 loops into 1.
  5921. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5922. Introduce new preference PREF_BT_TIMEOUT. This is the timeout value
  5923. for BitTorrent download:
  5924. * src/PeerAbstractCommand.cc
  5925. (PeerAbstractCommand): PREF_TIMEOUT -> PREF_BT_TIMEOUT
  5926. * src/main.cc:
  5927. (timeoutSpecified): Removed.
  5928. (main): Set the initial value of PREF_BT_TIMEOUT to 180.
  5929. Removed timeoutSpecified. TODO: Add --bt-timeout command line option.
  5930. * src/TorrentRequestInfo.cc
  5931. (timeoutSpecified): Removed.
  5932. (torrentHandler): Removed timeoutSpecified and the adjustment of
  5933. timeout value.
  5934. * src/prefs.h
  5935. (PREF_BT_TIMEOUT): New definition.
  5936. Delete unused variables:
  5937. * src/TorrentRequestInfo.cc
  5938. (requestInfo): Removed.
  5939. Move setSignalHander to Util::setGlobalSignalHandler:
  5940. * src/TorrentRequestInfo.cc:
  5941. setSignalHander -> Util::setGlobalSignalHandler
  5942. * src/main.cc
  5943. (setSignalHander): Removed.
  5944. (main): setSignalHander -> Util::setGlobalSignalHandler
  5945. * src/Util.h
  5946. (setGlobalSignalHandler): New function.
  5947. * src/Util.cc
  5948. (setGlobalSignalHandler): New function.
  5949. * src/UrlRequestInfo.cc:
  5950. setSignalHander -> Util::setGlobalSignalHandler
  5951. Reset peer status in order to exit gracefully:
  5952. * src/PeerAbstractCommand.cc
  5953. (execute): Call peer->resetStatus() when btRuntime->isHalt() is true.
  5954. To fix the bug that causes the number of bytes uploaded is not saved
  5955. to .aria2 file:
  5956. * src/DefaultPeerStorage.h
  5957. (removedPeerSessionDownloadLength): New variable.
  5958. (removedPeerSessionUploadLength): New variable.
  5959. * src/DefaultPeerStorage.cc
  5960. (DefaultPieceStorage): Added removedPeerSessionDownloadLength(0),
  5961. removedPeerSessionUploadLength(0).
  5962. (calculateStat): Calculate the number of bytes downloaded(uploaded)
  5963. through all peers, and then add removedPeerSessionDownloadLength(
  5964. removedPeerSessionUploadLength) to it.
  5965. (deleteUnusedPeer): Add the number of bytes downloaded(uploaded) from
  5966. (to) the peer to removedPeerSessionDownloadLength
  5967. (removedPeerSessionUploadLength).
  5968. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5969. To add Metalink location option:
  5970. * src/MetalinkRequestInfo.cc
  5971. (execute): Call MetalinkEntry::setLocationPreference()
  5972. * src/main.cc
  5973. (showUsage): Added the help message for --metalink-location option.
  5974. (main): Added --metalink-location option.
  5975. * src/prefs.h
  5976. (PREF_METALINK_LOCATION): New definition.
  5977. * src/MetalinkEntry.cc
  5978. (AddLocationPreference): New function object.
  5979. (setLocationPreference): New function.
  5980. * src/Xml2MetalinkProcessor.cc
  5981. (getResource): Set location attribute to MetalinkResource
  5982. To show URLs to download
  5983. * src/UrlRequestInfo.h
  5984. (printUrls): New function.
  5985. To add multiple <file> Metalink support:
  5986. * src/MetalinkEntry.h
  5987. (MetalinkResources): Removed.
  5988. (setLocationPreference): New function.
  5989. (MetalinkEntryHandle): New type definition.
  5990. (MetalinkEntries): New type definition.
  5991. * src/Xml2MetalinkProcessor.h
  5992. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  5993. (getResource): MetalinkResource* -> MetalinkResourceHandle
  5994. (parseFile): Metalinker* -> MetalinkerHandle
  5995. * src/UrlRequestInfo.h
  5996. (execute): RequestInfo* -> RequestInfos
  5997. * src/MetalinkRequestInfo.cc
  5998. (AccumulateNonP2PUrl): MetalinkResource* -> MetalinkResourceHandle
  5999. (FindBitTorrentUrl): MetalinkResource* -> MetalinkResourceHandle
  6000. (execute): RequestInfo* -> RequestInfos
  6001. Added multiple <file> support. Print filename when it is queued.
  6002. * src/MetalinkRequestInfo.h
  6003. (execute): RequestInfo* -> RequestInfos
  6004. (getDownloadEngine): Removed.
  6005. * src/RequestInfo.h
  6006. (RequestInfoHandle): New type definition.
  6007. (RequestInfos): New type definition.
  6008. (execute): RequestInfo* -> RequestInfos
  6009. (getDownloadEngine): Removed.
  6010. * src/MetalinkResource.h
  6011. (MetalinkResourceHandle): New type definition.
  6012. (MetalinkResources): New type definition.
  6013. * src/MetalinkEntry.cc
  6014. (~MetalinkEntry): Removed the deletion of the elements of resources,
  6015. because the element is now of type MetalinkResourceHandle.
  6016. (PrefOrder): MetalinkResource* -> MetalinkResourceHandle
  6017. (Supported): MetalinkResource* -> MetalinkResourceHandle
  6018. (dropUnsupportedResource): Removed the deletion of the elements of
  6019. resources because the element is now of type MetalinkResourceHandle.
  6020. * src/Xml2MetalinkProcessor.cc
  6021. (parseFile): Metalinker* -> MetalinkerHandle
  6022. MetalinkEntry* -> MetalinkEntryHandle
  6023. Removed try-catch block.
  6024. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  6025. MetalinkResource* -> MetalinkResourceHandle
  6026. Removed try-catch block.
  6027. (getResource): MetalinkResource* -> MetalinkResourceHandle
  6028. Free result by using xmlXPathFreeObject()
  6029. * src/Metalinker.cc
  6030. (~Metalinker): Removed the deletion of entries.
  6031. MetalinkEntry* -> MetalinkEntryHandle
  6032. (queryEntry): Add multiple <file> Metalink support.
  6033. * src/Metalinker.h
  6034. (MetalinkEntries): Removed.
  6035. (queryEntry): MetalinkEntry* -> MetalinkEntries
  6036. * src/MetalinkProcessor.h
  6037. (parseFile): Metalinker* -> MetalinkerHandle
  6038. Bug fixes:
  6039. * src/PeerChokeCommand.cc
  6040. (execute): cat01->cat02
  6041. * src/DefaultPieceStorage.cc
  6042. (DefaultPieceStorage): Added diskAdaptor(0)
  6043. * src/TrackerWatcherComand.cc:
  6044. (execute): Use btAnnounce->noMoreAnnounce()
  6045. to determin whether the function returns true or not.
  6046. * src/TrackerUpdateCommand.cc:
  6047. (execute): Use btAnnounce->noMoreAnnounce()
  6048. to determin whether the function returns true or not.
  6049. * src/FtpConnection.cc
  6050. (bulkReceiveResponse): Throw DlRetryEx if EOF got.
  6051. This is the fix of the busy loop bug.
  6052. * src/DownloadCommand.cc
  6053. (DownloadCommand): Reuse PeerStat. segmentMan->getPeerStat() returns
  6054. cached PeerStat.
  6055. The value of "name" entry in torrent file is now set by
  6056. *DiskAdaptor::setTopDir(...) methods.
  6057. * src/MultiDiskAdaptor.h
  6058. (topDir): New variable.
  6059. (setTopDir): New function.
  6060. (getTopDir): New function.
  6061. * src/MultiDiskAdaptor.cc
  6062. (getFilePath): Concat storDir, "/" and topDir.
  6063. (mkdir): Use getFilePath() to get the directory path for output.
  6064. * src/DefaultPieceStorage.cc
  6065. (initStorage): Set the value of "name" entry to MultiDiskAdaptor,
  6066. CopyDiskAdaptor.
  6067. * src/CopyDiskAdaptor.h
  6068. (topDir): New variable.
  6069. (setTopDir): New function.
  6070. (getTopDir): New function.
  6071. * src/CopyDiskAdaptor.cc
  6072. (fixFilename): Updated.
  6073. Misc
  6074. * src/UrlRequestInfo.h
  6075. (e): Removed.
  6076. (UrlRequestInfo): Removed e.
  6077. (getDownloadEngine): Removed.
  6078. * src/UrlRequestInfo.cc
  6079. (handler): Rewritten.
  6080. (printUrls): New function.
  6081. (execute): Call printUrls().
  6082. * src/HandshakeMessage.cc
  6083. (check): peerinteraction->getBtContext() -> btContext
  6084. * src/PeerInteraction.h
  6085. (getBtContext): Removed.
  6086. * src/TorrentRequestInfo.h
  6087. (execute): RequestInfo* -> RequestInfos
  6088. (getDownloadEngine): Removed.
  6089. * src/TorrentRequestInfo.cc
  6090. (haltRequested): Removed.
  6091. (btHaltRequested): New variable.
  6092. (torrentHandler): haltRequested -> btHaltRequested
  6093. (execute): RequestInfo* -> RequestInfos
  6094. * src/TorrentConsoleDownloadEngine.cc
  6095. (afterEachIteration): haltRequested -> btHaltRequested.
  6096. * src/ConsoleDownloadEngine.h
  6097. (initStatistics): Added virtual.
  6098. (calculateStatistics): Added virtual.
  6099. (onEndOfRun): Added virtual.
  6100. (afterEachIteration): Added virtual.
  6101. * src/ConsoleDownloadEngine.cc
  6102. (haltRequested): New variable.
  6103. (afterEachIteration): New function.
  6104. * src/main.cc
  6105. (requestInfo): Removed.
  6106. * src/SegmentMan.cc
  6107. (findSlowerSegmentEntry): Refactored.
  6108. * Release 0.9.0
  6109. 2006-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6110. To divide TorrentMan into 6 classes: BtContext, BtRuntime,
  6111. PeerStorage, PieceStorage, BtAnnounce and BtProgressInfoFile
  6112. * src/TorrentMan.h: Removed.
  6113. * src/TorrentMan.cc: Removed.
  6114. * src/TrackerWatcherComand.h: Made subclass of BtContextAwareCommand.
  6115. * src/SeedCheckCommand.cc: Use pieceStorage, btRuntime
  6116. * src/PeerAbstractCommand.h: Made subclass of BtContextAwareCommand.
  6117. * src/PeerAbstractCommand.cc: Use btRuntime.
  6118. * src/BtContextAwareCommand.h: New class.
  6119. * src/FileEntry.h: Added accessor methods for following variables.
  6120. (path): Made private.
  6121. (length): Made private.
  6122. (offset): Made private.
  6123. (extracted): Made private.
  6124. (requested): Made private.
  6125. (FileEntries): New definition.
  6126. (FileEntryHandle): New definition.
  6127. * src/FileEntry.cc: New file.
  6128. * src/HaveEraseCommand.h: Made subclass of BtContextAwareCommand.
  6129. * src/HaveEraseCommand.cc: Use btRuntime, pieceStorage.
  6130. * src/PeerChokeCommand.h: Made subclass of BtContextAwareCommand.
  6131. * src/PeerChokeCommand.cc: Use btRuntime, peerStorage, pieceStorage.
  6132. * src/PieceStorage.h: New file.
  6133. * src/PeerInteractionCommand.h: Use btContext.
  6134. * src/PeerInteractionCommand.cc: Use pieceStorage, peerStorage,
  6135. btRuntime.
  6136. * src/DefaultBtProgressInfoFile.h: New file.
  6137. * src/DefaultBtProgressInfoFile.cc: New file.
  6138. * src/File.cc
  6139. (Util.h): New include.
  6140. (mkdirs): New function.
  6141. * src/MultiDiskAdaptor.h
  6142. (mkdir): New function.
  6143. * src/PeerListProcessor.h
  6144. (Peers): Removed.
  6145. * src/PeerInteraction.h
  6146. (torrentMan): Removed.
  6147. (btContext): New variable.
  6148. (peerStorage): New variable.
  6149. (pieceStorage): New variable.
  6150. (btAnnounce): New variable.
  6151. (getTorrentMan): Removed.
  6152. (getBtContext): New function.
  6153. * src/PeerInteraction.cc: Use btContext, peerStorage, pieceStorage,
  6154. btAnnounce.
  6155. * src/HandshakeMessage.h
  6156. (TorrentMan.h): Removed.
  6157. * src/HandshakeMessage.cc: Use btContext.
  6158. * src/DefaultBtAnnounce.cc: New file.
  6159. * src/MultiDiskWriter.cc: Use the accessor methods of FileEntry.
  6160. * src/DefaultPieceStorage.cc: New file.
  6161. * src/DefaultBtContext.h: New file.
  6162. * src/TorrentRequestInfo.cc: Use btContext, pieceStorage.
  6163. Use the accessor methods of FileEntry.
  6164. * src/CookieBox.cc: Updated to use Util::slice().
  6165. * src/PieceMessage.cc: Use btContext, pieceStorage.
  6166. * src/common.h (SharedHandle.h): New include.
  6167. * src/PeerMessage.cc (PeerMessage): Added btContext, peerStorage,
  6168. pieceStorage.
  6169. * src/TorrentAutoSaveCommand.h: Made subclass of BtContextAwareCommand.
  6170. * src/DiskAdaptor.h
  6171. (topDir): Removed.
  6172. (getFileEntryFromPath): Changed the return type to FileEntryHandle.
  6173. (setTopDir): Removed.
  6174. (getTopDir): Removed.
  6175. * src/BtContext.h: New file.
  6176. * src/DefaultPeerStorage.h: New file.
  6177. * src/PieceMessage.h (TorrentMan.h): Removed.
  6178. * src/RequestMessage.h (TorrentMan.h): Removed.
  6179. * src/TorrentDownloadEngine.h
  6180. (uploadLength): New variable.
  6181. (btContext): New variable.
  6182. (btRuntime): New variable.
  6183. (pieceStorage): New variable.
  6184. (peerStorage): New variable.
  6185. (btAnnounce): New variable.
  6186. (btProgressInfoFile): New variable.
  6187. (torrentMan): Removed.
  6188. (setBtContext): New function.
  6189. * src/TorrentDownloadEngine.cc: Use BtContext, BtRuntime, pieceStorage,
  6190. peerStorage, btAnnounce, btProgressInfoFile.
  6191. * src/Piece.h
  6192. (toString): New function.
  6193. (Pieces): New type definition.
  6194. * src/Peer.h
  6195. (active): New variable.
  6196. (Peer): Added active.
  6197. (activate): Set active to true.
  6198. (deactivate): Set active to false.
  6199. (isActive): New function.
  6200. (Peers): New type definition.
  6201. * src/DirectDiskAdaptor.cc
  6202. (getFilePath): Use the accessor methods of FileEntry.
  6203. * src/TorrentConsoleDownloadEngine.h
  6204. (afterEachIteration): New function.
  6205. * src/TorrentConsoleDownloadEngine.cc
  6206. (haltRequested): New variable.
  6207. (sendStatistics): Use pieceStorage, btRuntime.
  6208. (afterEachIteration): New function.
  6209. * src/AnnounceList: AnnounceTier->AnnounceTierHandle.
  6210. * src/Directry.h
  6211. (Directory): New function.
  6212. (DirectoryHandle): New type definition.
  6213. * src/BtProgressInfoFile.h: New file.
  6214. * src/RequestMessage.cc: Use pieceStorage.
  6215. * src/BtRuntime.h: New file.
  6216. * src/DefaultBtContext.cc: New file.
  6217. * src/BitfieldMan.h
  6218. (getCompletedLength): New function(private).
  6219. (getCompletedLength): New function.
  6220. (getFilteredCompletedLength): New function.
  6221. * src/BitfieldMan.h
  6222. (getCompletedLength): New function(private).
  6223. (getCompletedLength): New function.
  6224. (getFilteredCompletedLength): New function.
  6225. * src/MultiDiskAdaptor.cc
  6226. (mkdir): New function.
  6227. (openFile): Call mkdir().
  6228. (initAndOpenFile): Call mkdir().
  6229. * src/CancelMessage.h
  6230. (TorrentMan.h): Removed.
  6231. * src/RejectMessage.h
  6232. (TorrentMan.h): Removed.
  6233. * src/DownloadEngineFactory.cc
  6234. (DefaultPieceStorage.h): New include.
  6235. (DefaultPeerStorage.h): New include.
  6236. (DefaultBtAnnounce.h): New include.
  6237. (DefaultBtProgressInfoFile.h): New include.
  6238. (newTorrentConsoleEngine): Rewritten.
  6239. * src/ShareRatioSeedCriteria.h
  6240. (torrentMan): Removed.
  6241. (btContext): New variable.
  6242. (peerStorage): New variable.
  6243. (btRuntime): New variable.
  6244. (evaluate): Use btContext, btRuntime, peerStorage.
  6245. * src/AnnounceTier.h: New file.
  6246. * src/BtAnnounce.h: New file.
  6247. * src/BtRegistry.h: New file.
  6248. * src/PeerInitiateConnectionCommand.h: Added btContext.
  6249. * src/PeerConnection.h (TorrentMan.h): Removed.
  6250. * src/PeerMessageFactory.cc: Use btContext, pieceStorage.
  6251. * src/Util.h
  6252. (slice): Added an argument.
  6253. * src/Util.cc
  6254. (slice): Added an argument to control whether trim is made or not.
  6255. * src/PeerStorage.h: New file.
  6256. * src/BtRegistry.cc: New file.
  6257. * src/TrackerUpdateCommand.h: Made subclass of BtContextAwareCommand.
  6258. * src/CopyDiskAdaptor.cc: Use the accessor methods of FileEntry.
  6259. * src/MultiDiskWriter.h: FileEntry -> FileEntryHandle
  6260. * src/PeerListenCommand.cc: Use btRuntime, peerStorage, btContext.
  6261. * src/TorrentRequestInfo.h
  6262. (e): Removed.
  6263. (showFileEntry): Added an argument.
  6264. (getDownloadEngine): Return 0.
  6265. * src/DefaultBtAnnounce.h: New file.
  6266. * src/TorrentAutoSaveCommand.cc: Use btRuntime, btProgressInfoFile.
  6267. * src/TrackerWatcherComand.cc: Use btRuntime, btAnnounce,
  6268. * src/PeerMessageFactory.h
  6269. (btContext): New variable.
  6270. (pieceStorage): New variable.
  6271. * src/TrackerUpdateCommand.cc: Use btRuntime, peerStorage, btContext,
  6272. btAnnounce.
  6273. * src/DiskAdaptor.cc
  6274. (DiskAdaptor): Removed topDir.
  6275. (~DiskAdaptor): Removed topDir.
  6276. * src/PeerListenCommand.h: Made subclass of BtContextAwareCommand.
  6277. * src/SeedCheckCommand.h: Made subclass of BtContextAwareCommand.
  6278. * src/File.h (mkdirs): New function.
  6279. * src/DefaultPeerStorage): New file.
  6280. * src/DownloadEngineFactory.h
  6281. (newTorrentConsoleEngine): Use btContext.
  6282. * src/BtContextAwareCommand.cc: New file.
  6283. * src/PeerInitiateConnectionCommand.cc: Use btRuntime, peerStorage.
  6284. * src/PeerMessage.h
  6285. (btContext): New variable.
  6286. (peerStorage): New variable.
  6287. (pieceStorage): New variable.
  6288. (setBtContext): New function.
  6289. * src/Directry.cc
  6290. (Directory): New function.
  6291. (createDir): Do nothing if name.size() == 0.
  6292. * src/AnnounceList.h
  6293. (AnnounceTier): Removed.
  6294. (AnnounceTiers): Removed.
  6295. * src/DefaultPieceStorage.h: New file.
  6296. * src/Piece.cc (toString): New function.
  6297. To fix typo:
  6298. * src/main.cc (showVersion): Fixed typo.
  6299. To fix compile warning:
  6300. * src/DelegatingPeerListProcessor.cc
  6301. (canHandle): Added "return false".
  6302. 2006-10-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6303. To simplify TrackerWatherCommand, TrackerUpdateCommand and
  6304. make the process of announce request testable.
  6305. * src/TrackerWatcherCommand.h
  6306. (TimeA2.h): Removed.
  6307. (interval): Removed.
  6308. (checkPoint): Removed.
  6309. (createRequestCommand): Added an argument 'url'.
  6310. (TrackerWatherCommand): Removed interval.
  6311. (createCommand): New function.
  6312. * src/DownloadEngineFactory.cc
  6313. (newTorrentConsoleEngine): Updated according to the changes in
  6314. TrackerWatherCommand.
  6315. * src/TorrentMan.cc
  6316. (DelegatingPeerListProcessor.h): New includes.
  6317. (TorrentMan): Added the initialization of announceInterval.
  6318. (isStoppedAnnounceReady): New function.
  6319. (isCompletedAnnounceReady): New function.
  6320. (isDefaultAnnounceReady): New function.
  6321. (isAnnounceReady): New function.
  6322. (getAnnounceUrl): New function.
  6323. (announceStart): New function.
  6324. (announceFailure): New function.
  6325. (announceSuccess): New function.
  6326. (isAllAnnounceFailed): New function.
  6327. (resetAnnounce): New function.
  6328. (processAnnounceResponse): New function.
  6329. (needMorePeerConnection): New function.
  6330. (noMoreAnnounce): New function.
  6331. * src/TrackerUpdateCommand.h
  6332. (getTrackerResponse): int->size_t
  6333. * src/TorrentMan.h
  6334. (isStoppedAnnounceReady): New function.
  6335. (isCompletedAnnounceReady): New function.
  6336. (isDefaultAnnounceReady): New function.
  6337. (announceInterval): New variable.
  6338. (isAnnounceReady): New function.
  6339. (getAnnounceUrl): New function.
  6340. (announceStart): New function.
  6341. (announceFailure): New function.
  6342. (announceSuccess): New function.
  6343. (isAllAnnounceFailed): New function.
  6344. (resetAnnounce): New function.
  6345. (processAnnounceResponse): New function.
  6346. (needMorePeerConnection): New function.
  6347. (noMoreAnnounce): New function.
  6348. * src/TrackerWatcherCommand.cc
  6349. (TrackerWatherCommand): Removed interval and checkPoint.
  6350. (execute): Rewritten.
  6351. (createCommand): New function.
  6352. (createRequestCommand): Rewritten.
  6353. * src/TrackerUpdateCommand.cc
  6354. (MetaFileUtil.h): Removed.
  6355. (DelegatingPeerListProcessor.h): Removed.
  6356. (getTrackerResponse): int->size_t. Use torrentMan's new functions.
  6357. 2006-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6358. Request -> RequestHandle:
  6359. * src/HttpResponseCommand.h: Request->RequestHandle
  6360. * src/AbstractCommand.cc: Request->RequestHandle
  6361. * src/HttpDownloadCommand.cc: Request->RequestHandle
  6362. * src/HttpRequestCommand.cc: Request->RequestHandle
  6363. * src/FtpInitiateConnectionCommand.h: Request->RequestHandle
  6364. * src/AbstractCommand.h: Request->RequestHandle
  6365. * src/HttpProxyRequestCommand.h: Request->RequestHandle
  6366. * src/HttpResponseCommand.cc: Request->RequestHandle
  6367. * src/HttpInitiateConnectionCommand.h: Request->RequestHandle
  6368. * src/FtpNegotiateCommand.cc: Request->RequestHandle
  6369. * src/FtpTunnelResponseCommand.h: Request->RequestHandle
  6370. * src/HttpConnection.h: Request->RequestHandle
  6371. * src/HttpProxyResponseCommand.cc: Request->RequestHandle
  6372. * src/InitiateConnectionCommandFactory.h: Request->RequestHandle
  6373. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  6374. * src/DownloadCommand.h: Request->RequestHandle
  6375. * src/FtpDowndloadCommand.cc: Request->RequestHandle
  6376. * src/HttpInitiateConnectionCommand.cc: Request->RequestHandle
  6377. * src/HttpRequestCommand.h: Request->RequestHandle
  6378. * src/FtpNegotiateCommand.h: Request->RequestHandle
  6379. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  6380. * src/FtpInitiateConnectionCommand.cc: Request->RequestHandle
  6381. * src/HttpDownloadCommand.h: Request->RequestHandle
  6382. * src/FtpConnection.cc: Request->RequestHandle
  6383. * src/InitiateConnectionCommandFactory.cc: Request->RequestHandle
  6384. * src/UrlRequestInfo.cc: Request->RequestHandle
  6385. * src/HttpProxyResponseCommand.h: Request->RequestHandle
  6386. * src/HttpConnection.h: Request->RequestHandle
  6387. * src/DownloadCommand.cc: Request->RequestHandle
  6388. * src/FtpConnection.h: Request->RequestHandle
  6389. * src/FtpDowndloadCommand.h: Request->RequestHandle
  6390. * src/HttpProxyRequestCommand.cc: Request->RequestHandle
  6391. * src/FtpTunnelRequestCommand.h: Request->RequestHandle
  6392. * src/Request.h
  6393. (SharedHandle.h): New include.
  6394. (RequestHandle): New type definition.
  6395. (Requests): Redefined.
  6396. To add MULTITRACKER support:
  6397. * src/TrackerWatcherCommand.h
  6398. (createRequestCommand): New function.
  6399. * src/DownloadEngineFactory.cc
  6400. (newTorrentConsoleEngine): Removed req.
  6401. * src/prefs.h
  6402. (PREF_TRACKER_MAX_TRIES): New definition.
  6403. * src/TorrentMan.cc
  6404. (TorrentMan): Removed req. Added trackerNumTry.
  6405. (~TorrentMan): Removed req.
  6406. (setupInternal1): Added announceList.
  6407. * src/TorrentRequestInfo.cc
  6408. (execute): Set PREF_MAX_TIRES to 1. The max number of tries for
  6409. announces is now specified by PREF_TRACKER_MAX_TRIES.
  6410. * src/main.cc
  6411. (main): Added PREF_TRACKER_MAX_TRIES.
  6412. * src/TorrentMan.h
  6413. (Request.h): Removed.
  6414. (AnnounceList.h): New include.
  6415. (trackerNumTry): New variable.
  6416. (req): Removed.
  6417. (announceList): New variable.
  6418. * src/TrackerWatcherCommand.cc
  6419. (execute): Rewritten.
  6420. (createRequestCommand): New function.
  6421. * src/TrackerUpdateCommand.cc
  6422. (execute): Updated with the use of AnnounceList.
  6423. * src/AnnounceList.cc: New class.
  6424. * src/AnnounceList.h: New class.
  6425. To fix typo:
  6426. * src/prefs.h
  6427. (PREF_MAX_TRIES): max_try->max_tries
  6428. To not to decode "+" as space in URL decode:
  6429. * src/Util.cc
  6430. (urldecode): Removed "+"->space decoding rule. Test case was updated.
  6431. 2006-10-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6432. To add timeout to async name resolution:
  6433. * src/AbstractCommand.h
  6434. (nameResolveFinished): New function. This is not elegant way. It needs
  6435. to be more refined.
  6436. (nameResolverCheck): New variable.
  6437. * src/AbstractCommand.cc
  6438. (AbstractCommand): Added nameResolverCheck.
  6439. (execute): Added the check whether the name resolution has finished.
  6440. (setNameResolverCheck): Set nameResolverCheck to true.
  6441. (disableNameResolverCheck): Set nameResolverCheck to false.
  6442. (nameResolverFinished): New function.
  6443. * src/FtpInitiateConnectionCommand.h
  6444. (nameResolverFinished): New function.
  6445. * src/FtpInitiateConnectionCommand.cc
  6446. (FtpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  6447. * src/HttpInitiateConnectionCommand.h
  6448. (nameResolverFinished): New function.
  6449. * src/HttpInitiateConnectionCommand.cc
  6450. (HttpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  6451. * src/prefs.h
  6452. (PREF_DNS_TIMEOUT): New definition.
  6453. * src/main.cc
  6454. (main): Added PREF_DNS_TIMEOUT.
  6455. To add the support for a non-compact response from a tracker:
  6456. * src/PeerListProcessor.h: New class.
  6457. * src/DefaultPeerListProcessor.h: New class.
  6458. * src/DefaultPeerListProcessor.cc: New class.
  6459. * src/CompactPeerListProcessor.h: New class.
  6460. * src/CompactPeerListProcessor.cc: New class.
  6461. * src/DelegatingPeerListProcessor.h: New class.
  6462. * src/DelegatingPeerListProcessor.cc: New class.
  6463. * src/TorrentMan.cc
  6464. (addPeer): New function(overload).
  6465. (addPeer): Delete unused peers only when new peer is added.
  6466. * src/TorrentMan.h
  6467. (PeerListProcessor.h): Included.
  6468. (Peers): Removed.
  6469. (addPeer): New function(overload).
  6470. * src/TrackerUpdateCommand.cc
  6471. (netinet/in.h): Removed.
  6472. (DelegatingPeerListProcessor.h): Included.
  6473. (execute): Updated to use DelegatingPeerListProcessor.
  6474. To fix the memory leak in TorrentMan::peers:
  6475. * src/PeerAbstractCommand.cc
  6476. (onAbort): Added peer->resetStatus().
  6477. * src/Peer.h
  6478. (resetStatus): Made public.
  6479. To improve the precision of the speed calculation:
  6480. * src/SpeedCalc.h
  6481. (nextInterval): New variable.
  6482. * src/SpeedCalc.cc
  6483. (reset): Added nextInterval.
  6484. (isIntervalOver): Use nextInterval instead of CHANGE_INTERVAL_SEC.
  6485. (changeSw): Set nextInterval to 15 seconds relative to the current
  6486. instant time.
  6487. * src/main.cc
  6488. (showVersion): Updated.
  6489. (showUsage): Updated.
  6490. * Release 0.8.1
  6491. 2006-09-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6492. * src/main.cc
  6493. (showUsage): Commented out --min-segment-size option.
  6494. (main): Commented out --min-segment-size option.
  6495. * Release 0.8.0
  6496. 2006-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6497. * src/*.{h,cc}:
  6498. Added an exception to the license which allows linking with OpenSSL.
  6499. 2006-09-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6500. * src/AbstractCommand.cc
  6501. (execute): Check whether the download has finished before checking
  6502. socket status.
  6503. Return true if peerStat->getStatus() == REQUEST_IDLE.
  6504. Do not exit even if no segment is available.
  6505. * src/prefs.h
  6506. (PREF_STARTUP_IDLE_TIME): New definition.
  6507. * src/PeerInteractionCommand.cc
  6508. (executeInternal): Removed max speed limit. Because it performs bad.
  6509. (receiveMessages): Added max speed limit. This was better than above,
  6510. but still a little bit to be desired. Sometimes the download speed
  6511. became much faster than I specified.
  6512. * src/SpeedCalc.h
  6513. (start): New variable.
  6514. (accumulatedLength): New variable.
  6515. (getAvgSpeed): New function.
  6516. * src/SpeedCalc.cc
  6517. (reset): Added start, accumulatedLength.
  6518. (update): Added calculation of an average speed.
  6519. (getAvgSpeed): New function.
  6520. * src/DownloadCommand.h
  6521. (sw): Removed.
  6522. * src/main.cc
  6523. (main): Added PREF_STARTUP_IDLE_TIME.
  6524. * src/PeerStat.h
  6525. (STATUS): Added REQUEST_IDLE.
  6526. (getMaxSpeed): Renamed as getMaxDownloadSpeed().
  6527. (getAvgDownloadSpeed): New function
  6528. (requestIdle): New function.
  6529. * src/SegmentMan.h
  6530. (SegmentEntryHandle): New type definition.
  6531. (SegmentEntries): Now holds SegmentEntryHandle.
  6532. (findSlowerSegmentEntry): New funtion.
  6533. * src/SegmentMan.cc
  6534. (save): Updated according to the changes in SegmentEntries.
  6535. (read): Updated according to the changes in SegmentEntries.
  6536. (FindSegmentEntryByIndex): Updated according to the changes in
  6537. SegmentEntries.
  6538. (FindSegmentEntryByCuid): Updated according to the changes in
  6539. SegmentEntries.
  6540. (checkoutSegment): Updated according to the changes in SegmentEntries.
  6541. (onNullBitfield): Updated according to the changes in SegmentEntries.
  6542. Renamed uitr as itr.
  6543. (findSlowerSegmentEntry): New function.
  6544. (getSegment): Updated according to the changes in SegmentEntries.
  6545. Added the feature that cancels the segment with slow server and fast
  6546. one takes it over.
  6547. (cancelSegment): Updated according to the changes in SegmentEntries.
  6548. (getDownloadLength): Updated according to the changes in
  6549. SegmentEntries.
  6550. (init): Assigned 0 to bitfield after deleting it.
  6551. * src/DownloadCommand.cc
  6552. (STARTUP_IDLE_TIME): Removed.
  6553. (executeInternal): Use PREF_STARTUP_IDLE_TIME.
  6554. * src/PeerChokeCommand.cc
  6555. (optUnchokingPeer): Updated according to the changes in Peer.
  6556. (ResetDelta): Removed.
  6557. (UploadFaster): Updated according to the changes in Peer.
  6558. (DownloadFaster): Updated according to the changes in Peer.
  6559. (execute): I clarify the meaning of "upload" and "download" here.
  6560. "upload" means the transfer from localhost to remote host.
  6561. "download" means the transfer from remote host to localhost.
  6562. Based on this rule, I swapped orderByUploadRate and
  6563. orderByDownloadRate.
  6564. * src/PeerInteractionCommand.cc
  6565. (PeerInteraction): Removed peerInteraction->setUploadLImit().
  6566. (executeInternal): Removed the argument of
  6567. peerInteraction->sendMessages().
  6568. (receiveMessages): Rewritten download speed limit.
  6569. (sendKeepAlive): Removed peerInteraction->sendMessages().
  6570. * src/HttpResponseCommand.cc
  6571. (handleDefaultEncoding): If file size is unknown in torrent request,
  6572. do not call segmentMan->initBitfield() here.
  6573. Disabled persistent connection feature in torrent request.
  6574. * src/UrlRequestInfo.h
  6575. (UrlRequestInfo): Removed const qualifier from option.
  6576. * src/TorrentMan.h
  6577. (TransferStat): New class.
  6578. (deltaDownloadLength): Removed.
  6579. (deltaUploadLength): Removed.
  6580. (addDeltaDownloadLength): Removed.
  6581. (getDeltaDownloadLength): Removed.
  6582. (resetDeltaDownloadLength): Removed.
  6583. (addDeltaUploadLength): Removed.
  6584. (getDeltaUploadLength): Removed.
  6585. (resetDeltaUploadLength): Removed.
  6586. (addActivePeer): Added peer->activate().
  6587. (deleteActivePeer): Added peer->deactivate().
  6588. (calculateStat): New function.
  6589. * src/TorrentMan.cc
  6590. (TorrentMan): Removed deltaDownloadLength and deltaUploadLength.
  6591. (calculateStat): New function.
  6592. * src/PeerInteraction.h
  6593. (uploadLimit): Removed.
  6594. (option): New variable.
  6595. (setUploadLimit): Removed.
  6596. (getUploadSpeed): Removed.
  6597. (sendMessages): Removed the argument "currentUploadSpeed".
  6598. * src/PeerInteraction.cc
  6599. (prefs.h): Included.
  6600. (PeerInteraction): Removed uploadLimit. Added option.
  6601. (sendMessages): Rewritten upload speed limit.
  6602. (sendHandshake): Removed the argument from sendMessages().
  6603. (sendBitfield): Removed the argument from sendMessages().
  6604. * src/PeerAbstractCommand.cc
  6605. (execute): Commented out the portion of upload limit.
  6606. (onAbort): Removed peer->resetStatus().
  6607. * src/TorrentRequestInfo.cc
  6608. (timeoutSpecified): Declared extern.
  6609. (execute): Set timeout to 180 if timeout is not specified by.
  6610. command-line.
  6611. * src/PieceMessage.cc
  6612. (receivedAction): Added peer->updateDownloadLength().
  6613. Removed peer->addPeerUpload().
  6614. Removed torrentMan->addDeltaDownloadLength().
  6615. (send): Added peer->updateUploadLength().
  6616. Removed peer->addPeerDownload().
  6617. Removed torrentMan->addDeltaUploadLength().
  6618. * src/main.cc
  6619. (timeoutSpecified): New variable.
  6620. (main): Set timeoutSpecified to false.
  6621. If the command-line option "--upload-limit" is specified, then
  6622. timeoutSpecified is set to true. This option will remain in the next
  6623. release, but be deprecated in the future release.
  6624. * src/TorrentRequestInfo.h
  6625. (TorrentRequestInfo): Removed const qualifier from op.
  6626. * src/PeerStat.h
  6627. (uploadSpeed): New variable.
  6628. (PeerStat): Added default value to cuid.
  6629. (calculateUploadSpeed): New function.
  6630. (updateUploadLength): New function.
  6631. (getMaxUploadSpeed): New function.
  6632. (getAvgUploadSpeed): New function.
  6633. (reset): Added uploadSpeed. Set status to IDLE.
  6634. * src/TorrentDownloadEngine.h
  6635. (cp): Declared as Time.
  6636. (sessionDownloadLengthArray): Removed.
  6637. (sessionUploadLengthArray): Removed.
  6638. (currentCp): Removed.
  6639. (lastCalcStat): New variable
  6640. (lastElapsed): Removed.
  6641. (sessionDownloadLength): Removed.
  6642. (calculateStat): New function.
  6643. * src/TorrentDownloadEngine.cc
  6644. (initStatistics): Removed lastElapsed, cp[],
  6645. sessionDownloadLengthArray[], sessionUploadLengthArray[],
  6646. currentCp, sessionDownloadLength.
  6647. Added cp.reset() and lastCalcStat.reset().
  6648. (calculateSpeed): Changed the name of the argument.
  6649. (calculateStatistics): Rewritten.
  6650. (calculateStat): New function.
  6651. * src/Peer.h
  6652. (PeerStat.h): Included.
  6653. (peerUpload): Removed.
  6654. (peerDownload): Removed.
  6655. (peerStat): New variable.
  6656. (sessionUploadLength): New variable.
  6657. (sessionDownloadLength): New variable.
  6658. (deltaUpload): Removed.
  6659. (deltaDownload): Removed.
  6660. (resetStatus): Made private.
  6661. (Peer): Added sessionUploadLength, sessionDownloadLength.
  6662. Removed peerUpload, peerDownload.
  6663. (updateUploadLength): New function.
  6664. (addDeltaUpload): Removed.
  6665. (updateDownloadLength): New function.
  6666. (resetDeltaUpload): Removed.
  6667. (getDeltaUpload): Removed.
  6668. (addDeltaDownload): Removed.
  6669. (calculateUploadSpeed): New function.
  6670. (resetDeltaDownload): Removed.
  6671. (getDeltaDownload): Removed.
  6672. (calculateDownloadSpeed): New function.
  6673. (getSessionUploadLength): New function.
  6674. (getSessionDownloadLength): New function.
  6675. (activate): New function.
  6676. (deactivate): New function.
  6677. (addPeerUpload): Removed.
  6678. (setPeerUpload): Removed.
  6679. (getPeerUpload): Removed.
  6680. (addPeerDownload): Removed.
  6681. (setPeerDownload): Removed.
  6682. (getPeerDownload): Removed.
  6683. * src/Peer.cc
  6684. (resetStatus): Removed resetDeltaUpload() and resetDeltaDownload().
  6685. * src/MetalinkRequestInfo.h
  6686. (MetalinkRequestInfo): Removed const qualifier from op.
  6687. * src/RequestInfo.h
  6688. (op): Removed const qualifier.
  6689. (RequestInfo): Removed const qualifier from op.
  6690. * src/prefs.h
  6691. (PREF_MAX_SPEED_LIMIT): Renamed as PREF_MAX_DOWNLOAD_LIMIT.
  6692. (PREF_UPLOAD_LIMIT): Renamed as PREF_MAX_UPLOAD_LIMIT.
  6693. * src/PeerInteractionCommand.cc
  6694. (PeerInteractionCommand): Use PREF_MAX_UPLOAD_LIMIT.
  6695. (receiveMessages): Use PREF_MAX_DOWNLOAD_LIMIT.
  6696. * src/PeerInteraction.cc
  6697. (sendMessages): Use PREF_MAX_UPLOAD_LIMIT.
  6698. * src/main.cc
  6699. (showUsage): Updated the description of "--lowest-speed-limit" option.
  6700. Added the description of "--max-download-limit" option.
  6701. Removed the description of "--upload-limit" option.
  6702. Added the description of "--max-upload-limit" option.
  6703. (main): Use PREF_MAX_UPLOAD_LIMIT, PREF_MAX_DOWNLOAD_LIMIT.
  6704. Added "--max-download-limit" option and "--max-upload-limit" option.
  6705. Added the warning message if "--upload-limit" option is used.
  6706. * src/DownloadCommand.cc
  6707. (executeInternal): Use PREF_MAX_DOWNLOAD_LIMIT.
  6708. 2006-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6709. To rewrite segment download mechanism for HTTP/FTP download.
  6710. Use BitfieldMan to manage segment download.
  6711. * src/HttpResponseCommand.h
  6712. (executeInternal): Pass the reference of segment.
  6713. * src/AbstractCommand.cc
  6714. (prepareForRetry): Call segmentMan->cancelSegment here.
  6715. (onAbort): Call segmentMan->cancelSegment here.
  6716. * src/HttpDownloadCommand.cc
  6717. (prepareForNextSegment): New function.
  6718. * src/DownloadEngineFactory.cc
  6719. (newConsoleEngine): Removed splitter.
  6720. (newTorrentConsoleEngine): Removed splitter.
  6721. * src/Request.h
  6722. (segment): Renamed from seg.
  6723. * src/FtpInitiateConnectionCommand.h
  6724. (executeInternal): Pass the reference of segment.
  6725. * src/AbstractCommand.h
  6726. (executeInternal): Pass the reference of segment.
  6727. * src/pref.h
  6728. (PREF_SEGMENT_SIZE): New definition.
  6729. * src/HttpProxyRequestCommand.h
  6730. (executeInternal): Pass the reference of segment.
  6731. * src/HttpResponseCommand.cc
  6732. (checkResponse): Allowed status 206 when a request range starts 0.
  6733. (handleDefaultEncoding): Rewritten the code related to Segment.
  6734. (handleOtherEncoding): Rewritten the code related to Segment.
  6735. * src/SegmentMan.h
  6736. (SegmentEntry): New class.
  6737. (SegmentEntries): New type definition.
  6738. (bitfield): New variable.
  6739. (usedSegmentEntries): New variable.
  6740. (onNullBitfield): New function.
  6741. (checkoutSegment): New function.
  6742. (segments): Removed.
  6743. (splitter): Removed.
  6744. (unregisterId): Removed.
  6745. (getSegment): New function(overload)
  6746. (getDownloadedSize): Removed.
  6747. (cancelSegment): New function.
  6748. (completeSegment): New function.
  6749. (initBitfield): New function.
  6750. (hasSegment): New function.
  6751. (getDownloadLength): New function.
  6752. * src/BitfieldMan.h
  6753. (getStartIndex): New function.
  6754. (getEndIndex): New function.
  6755. (getMissingUnusedIndex): New function(overload).
  6756. (getSparseMissingUnusedIndex): New function.
  6757. * src/BitfieldMan.cc
  6758. (getMissingIndexRandomly): Handle the last byte of bitfield properly.
  6759. (getMissingUnusedIndex): New function(overload).
  6760. (Range): New class.
  6761. (getStartIndex): New function.
  6762. (getEndIndex): New function.
  6763. (getSparseMissingUnusedIndex): New function.
  6764. (isBitSetInternal): Return false if the given index is less than 0.
  6765. * src/HttpInitiateConnectionCommand.h
  6766. (executeInternal): Pass the reference of segment.
  6767. * src/FtpNegotiateCommand.h
  6768. (executeInternal): Pass the reference of segment.
  6769. * src/FtpNegotiateCommand.cc
  6770. (recvSize): Initialize bitfield here.
  6771. * src/FtpTunnelResponseCommand.h
  6772. (executeInternal): Pass the reference of segment.
  6773. * src/HttpConnection.cc
  6774. (createRequest): Rewritten range header processing.
  6775. * src/DownloadCommand.h
  6776. (executeInternal): Pass the reference of segment.
  6777. (prepareForRetry): Removed.
  6778. (prepareForNextSegment): Added an argument segment. Made it a virtual
  6779. function.
  6780. * src/main.cc
  6781. (main): Set the initial value of PREF_SEGMENT_SIZE to 1MB.
  6782. * src/SegmentMan.cc
  6783. (SegmentMan): Added bitfield. Removed splitter.
  6784. (~SegmentMan): Added bitfield. Removed splitter.
  6785. (unregisterId): Removed.
  6786. (getSegment): Rewritten.
  6787. (updateSegment): Rewritten.
  6788. (save): Rewritten.
  6789. (read): Rewritten.
  6790. (finished): Rewritten.
  6791. (getDownloadedSize): Removed.
  6792. (initBitfield): New function.
  6793. (FindSegmentEntryByIndex): New function object.
  6794. (FindSegmentEntryByCuid): New function object.
  6795. (checkoutSegment): New function.
  6796. (onNullBitfield): New function.
  6797. (getSegment): New function(overload).
  6798. (CancelSegment): New function object.
  6799. (cancelSegment): New function.
  6800. (completeSegment): New function.
  6801. (hasSegment): New function.
  6802. (getDownloadLength): New function.
  6803. * src/FtpInitiateConnectionCommand.cc
  6804. (executeInternal): Load .aria2 file after hostname resolution finishes.
  6805. * src/Segment.h: Rewritten.
  6806. * src/Segment.cc (operator<<): New function.
  6807. * src/HttpDownloadCommand.h
  6808. (prepareForNextSegment): New function.
  6809. * src/Request.cc
  6810. (resetUrl): Made segment null.
  6811. * src/DownloadEngine.cc
  6812. (~DownloadEngine): Call cleanQueue before deleting segmentMan.
  6813. * src/HttpProxyRequestCommand.h
  6814. (executeInternal): Pass the reference of segment.
  6815. * src/DownloadCommand.cc
  6816. (executeInternal): Rewritten the code related to Segment.
  6817. (prepareForRetry): Removed.
  6818. (prepareForNextSegment): Rewritten.
  6819. * src/FtpTunnelResponseCommand.h
  6820. (executeInternal): Pass the reference of segment.
  6821. To add HTTP 1.1 persistent connection support(experimental)
  6822. * src/HttpRequestCommand.cc
  6823. (executeInternal): Disable keep alive if it is disabled by
  6824. configuration.
  6825. * src/Request.h
  6826. (keepAlive): New variable.
  6827. (isKeepAlive): New function.
  6828. (setKeepAlive): New function.
  6829. * src/pref.h
  6830. (PREF_HTTP_KEEP_ALIVE): New definition.
  6831. * src/HttpResponseCommand.cc
  6832. (executeInternal): Check the remote server supports keep alive.
  6833. * src/HttpConnection.cc
  6834. (createRequest): Send "Connection: close" only if keep alive is
  6835. disabled.
  6836. * src/main.cc
  6837. (main):
  6838. Set the initial value(false) of PREF_KEEP_ALIVE to false.
  6839. To add max download speed limit:
  6840. * src/pref.h
  6841. (PREF_MAX_SPEED_LIMIT): New definition.
  6842. * src/PeerInteractionCommand.cc
  6843. (executeInternal): Added max download speed limit. Not tested yet.
  6844. * src/SegmentMan.h
  6845. (PeerStats): New type definition.
  6846. (peerStats): New variable.
  6847. (registerPeerStat): New function.
  6848. (FindPeerStat): New function object.
  6849. (getPeerStat): New function.
  6850. (calculateDownloadSpeed): New function.
  6851. * src/SpeedCalc.h: New class.
  6852. * src/SpeedCalc.cc: New class.
  6853. * src/main.cc
  6854. (main):
  6855. Set the initial value of PREF_MAX_SPEED_LIMIT to 0(which means the
  6856. download speed is not restricted).
  6857. * src/PeerStat.h: New class.
  6858. * src/SegmentMan.cc
  6859. (registerPeerStat): New function.
  6860. (calculateDownloadSpeed): New function.
  6861. * src/DownloadCommand.cc
  6862. (STARTUP_IDLE_TIME): New definition.
  6863. (DownloadCommand): Register peerStat to segmentMan. Call peerStat->
  6864. downloadStart.
  6865. (~DownloadCommand): Call peerStat->downloadStop.
  6866. (executeInternal): Added download speed limitter. Rewritten lowest
  6867. speed limitter.
  6868. * src/HttpConnection.cc
  6869. (receiveResponse): Fixed: eohIndex[headerBuf] -> headerBuf[eohIndex].
  6870. * src/AbstractCommand.cc
  6871. (resolveHostname): Throw DlAbortEx if a name resolution failes.
  6872. Added hostname to the error message.
  6873. * src/ConsoleDownloadEngine.cc
  6874. (calculateStatistics): Initialize psize with dlSize.
  6875. * src/PieceMessage.cc
  6876. (receivedAction): Do not call peerInteraction->abortPiece here.
  6877. (onGotWrongPiece): Call peerInteraction->abortPiece here.
  6878. * src/BitfieldMan.h
  6879. (clearAllUseBit): New function.
  6880. (setAllUseBit): New function.
  6881. * src/BitfieldMan.cc
  6882. (clearAllBit): Do not clear useBitfield here.
  6883. (clearAllUseBit): New function.
  6884. (setAllUseBit): New function.
  6885. * src/Piece.cc
  6886. (clearAllBlock): Call bitfield->clearAllUseBit().
  6887. 2006-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6888. To make filename URL-decoded:
  6889. * src/HttpResponseCommand.h: Updated doc.
  6890. * src/HttpResponseCommand.cc
  6891. (determinFilename): Made filename URL-decoded.
  6892. * src/FtpInitiateConnectionCommand.cc
  6893. (executeInternal): Made filename URL-decoded.
  6894. * src/Util.h (urldecode): New function.
  6895. * src/Util.cc (urldecode): New function.
  6896. To fix a bug that caused assertion failure in ares_strerror:
  6897. * src/NameResolver.cc (callback): Fixed the bug.
  6898. * Release 0.7.3
  6899. 2006-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6900. To add --seed-time and --seed-ratio command-line option:
  6901. * src/Option.h (getAsDouble): New function.
  6902. * src/Option.cc (getAsDouble): New function.
  6903. * src/SeedCheckCommand.h: New class.
  6904. * src/SeedCheckCommand.cc: New class.
  6905. * src/DownloadEngineFactory.cc
  6906. (SeedCheckCommand.h): Included.
  6907. (UnionSeedCriteria.h): Included.
  6908. (TimeSeedCriteria.h): Included.
  6909. (ShareRatioSeedCriteria.h): Included.
  6910. (newTorrentConsoleEngine): Added the processing of seed option.
  6911. * src/SeedCriteria.h: New class.
  6912. * src/ShareRatioSeedCriteria.h: New class.
  6913. * src/TimeSeedCriteria.h: New class.
  6914. * src/UnionSeedCriteria.h: New class.
  6915. * src/prefs.h
  6916. (PREF_SEED_TIME): New definition.
  6917. (PREF_SEED_RATIO): New definition.
  6918. * src/main.cc
  6919. (showUsage): Added --seed-time and --seed-ratio option.
  6920. (main): Added --seed-time and --seed-ratio option.
  6921. Made default log file name "/dev/null".
  6922. * src/SharedHandle.h
  6923. (SharedHandle): Copy constructor. Made it assignable from the
  6924. SharedHandle of the subclasses.
  6925. (operator=): Made it assignable from the SharedHandle of the
  6926. subclasses.
  6927. (getRefCount): New function.
  6928. To add notice log level and the switch to write log to stdout. This
  6929. switch is configurable per log level.
  6930. * src/Logger.h
  6931. (notice): New function.
  6932. (LEVEL): Added NOTICE. Assigned an explicit value to each log level
  6933. constant.
  6934. * src/LogFactory.cc
  6935. (getInstance): The use of NullLogger was removed. A log message with
  6936. notice log level was made written to stdout along with log file.
  6937. * src/NullLogger.h
  6938. (notice): New function.
  6939. * src/SimpleLogger.h
  6940. (writeHeader): Added the 'file' argument.
  6941. (writeLog): Added the 'file' argument.
  6942. (writeFile): New function.
  6943. (stdoutField): New variable.
  6944. (SimpleLogger): Removed the default constructor.
  6945. (SimpleLogger): Made the default value of logfile 0.
  6946. (debug): Added 'virtual' keyword.
  6947. (info): Added 'virtual' keyword.
  6948. (warn): Added 'virtual' keyword.
  6949. (error): Added 'virtual' keyword.
  6950. (notice): New function.
  6951. (setStdout): New function.
  6952. * src/SimpleLogger.cc
  6953. (WRITE_LOG): Replaced writeLog with writeFile.
  6954. (WRITE_LOG_EX): Replaced writeLog with writeFile.
  6955. (SimpleLogger): Removed the default constructor.
  6956. (setStdout): New function.
  6957. (writeLog): Added the handling of NOTICE log level.
  6958. (writeFile): New function.
  6959. (notice): New function.
  6960. * src/TorrentMan.h: Updated doc.
  6961. * src/BitfieldMan.h: Updated doc.
  6962. * src/TrackerWatcherCommand.cc
  6963. (execute): Return true if error occurred in the request to the tracker
  6964. and halt is requested.
  6965. * src/TrackerUpdateCommand.cc
  6966. (execute): Return true if error occurred in the request to the tracker
  6967. and halt is requested.
  6968. To call onDownloadComplete from TorrentMan::completePiece(), not from
  6969. DownloadEngine:
  6970. * src/TorrentConsoleDownloadEngine.h
  6971. (onSelectiveDownloadingCompletes): Removed.
  6972. * src/TorrentConsoleDownloadEngine.cc
  6973. (onSelectiveDownloadingCompletes): Removed.
  6974. * src/TorrentDownloadEngine.h
  6975. (onEndOfRun): Added 'virtual' keyword.
  6976. (afterEachIteration): Removed.
  6977. (onSelectiveDownloadingCompletes): Removed.
  6978. * src/TorrentDownloadEngine.cc
  6979. (onEndOfRun): Removed filenameFixed.
  6980. (afterEachIteration): Removed.
  6981. * src/TorrentMan.cc
  6982. (completePiece): Call onDownloadComplete here.
  6983. (onDownloadComplete): Added 2 log messages.
  6984. 2006-08-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6985. To fix compilation problem on gcc4.1.1(patch#1542283 by tizianomueller)
  6986. * src/NameResolver.h: Added the prototype declaration of callback().
  6987. To support c-ares library:
  6988. * src/AbstractCommand.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6989. * src/FeatureConfig.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6990. * src/FtpInitiateConnectionCommand.h:
  6991. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6992. * src/AbstractCommand.h: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6993. * src/HttpInitiateConnectionCommand.h:
  6994. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6995. * src/NameResolver.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS.
  6996. Added thes upport of c-ares's ares_strerror(the idea came from patch
  6997. #1542285 by tizianomueller)
  6998. * src/HttpInitiateConnectionCommand.cc:
  6999. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  7000. * src/FtpInitiateConnectionCommand.cc:
  7001. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  7002. * src/DownloadEngine.h:
  7003. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  7004. * src/DownloadEngine.cc:
  7005. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  7006. To fix the bug that causes compilation failure with metalink-support
  7007. disabled(bug#1543587):
  7008. * src/main.cc: Fixed with the patch by tizianomueller.
  7009. * Release 0.7.2
  7010. 2006-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7011. * src/main.cc
  7012. (main): Added a message to inform users that aria2 is starting to
  7013. verify checksum.
  7014. * src/RequestInfo.cc
  7015. (printDownloadAbortMessage): Added a message to inform users that
  7016. transfer can be resumed.
  7017. * src/FeatureConfig.cc
  7018. (FEATURE_ASYNC_DNS): New definition.
  7019. (FeatureConfig): Added aysnc DNS entry.
  7020. To replace CommandUuid with Command* in SocketEntry and
  7021. NameResolverEntry:
  7022. * src/DownloadEngine.h
  7023. (CommandUuids): Removed.
  7024. (SocketEntry::commandUuid): Removed.
  7025. (SocketEntry::command): New variable.
  7026. (SocketEntry::SocketEntry): Updated.
  7027. (SocketEntry::operator==): Updated.
  7028. (NameResolverEntry::commandUuid): Removed.
  7029. (NameResolverEntry::command): New variable.
  7030. (NameResolverEntry::NameResolverEntry): Updated.
  7031. (NameResolverEntry::operator==): Updated.
  7032. (waitData): Changed the argument type.
  7033. (addSocketForReadCheck): Changed the argument type.
  7034. (deleteSocketForReadCheck): Changed the argument type.
  7035. (addSocketForWriteCheck): Changed the argument type.
  7036. (deleteSocketForWriteCheck): Changed the argument type.
  7037. (addNameResolverCheck): Changed the argument type.
  7038. (deleteNameResolverCheck): Changed the argument type.
  7039. * src/DownloadEngine.cc
  7040. (FindCommand): Removed.
  7041. (run): Removed activeUuid. Added activeCommands instead.
  7042. (AccumulateActiveUuid): Renamed as AccumulateActiveCommand.
  7043. (AccumulateActiveCommand): New function object.
  7044. (waitData): Use AccumulateActiveCommand.
  7045. (addSocketForReadCheck): Use Command instead of CommandUuid.
  7046. (deleteSocketForReadCheck): Use Command instead of CommandUuid.
  7047. (addSocketForWriteCheck): Use Command instead of CommandUuid.
  7048. (deleteSocketForWriteCheck): Use Command instead of CommandUuid.
  7049. (addNameResolverCheck): Use Command instead of CommandUuid.
  7050. (deleteNameResolverCheck): Use Command instead of CommandUuid.
  7051. * src/AbstractCommand.cc
  7052. (disableReadCheckSocket): Updated according to the changes in
  7053. DownloadEngine.
  7054. (setReadCheckSocket): Updated according to the changes in
  7055. DownloadEngine.
  7056. (disableWriteCheckSocket): Updated according to the changes in
  7057. DownloadEngine.
  7058. (setWriteCheckSocket): Updated according to the changes in
  7059. DownloadEngine.
  7060. (setNameResolverCheck): Updated according to the changes in
  7061. DownloadEngine.
  7062. (disableNameResolverCheck): Updated according to the changes in
  7063. DownloadEngine.
  7064. * src/AbstractCommand.cc
  7065. (disableReadCheckSocket): Updated according to the changes in
  7066. DownloadEngine.
  7067. (setReadCheckSocket): Updated according to the changes in
  7068. DownloadEngine.
  7069. (disableWriteCheckSocket): Updated according to the changes in
  7070. DownloadEngine.
  7071. (setWriteCheckSocket): Updated according to the changes in
  7072. DownloadEngine.
  7073. * release 0.7.1
  7074. 2006-08-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7075. To handle the case where some BitTorrent tracker requires all letters
  7076. except for [A-Za-z0-9] is URL encoded.
  7077. * src/Util.h
  7078. (torrentUrlencode): New function.
  7079. * src/Util.cc
  7080. (ctype.h): Included.
  7081. (torrentUrlencode): New function.
  7082. * src/TrackerWatcherCommand.cc
  7083. (execute): Use Util::torrentUrlencode() instead of Util::urlencode().
  7084. 2006-08-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7085. To add asynchronous DNS support(libares):
  7086. * src/AbstractCommand.h
  7087. (setNameResolverCheck): New function.
  7088. (disableNameResolverCheck): New function
  7089. (resolveHostname): New function.
  7090. * src/AbstractCommand.cc
  7091. (setNameResolverCheck): New function.
  7092. (disableNameResolverCheck): New function
  7093. (resolveHostname): New function.
  7094. * src/FtpInitiateConnectionCommand.h
  7095. (nameResolver): New function.
  7096. * src/FtpInitiateConnectionCommand.cc
  7097. (Util.h): Included.
  7098. (FtpInitiateConnectionCommand): Call disableReadCheckSocket,
  7099. disableWriteCheckSocket.
  7100. (~FtpInitiateConnectionCommand): Call disableNameResolverCheck.
  7101. (executeInternal): Added async DNS support.
  7102. * src/HttpInitiateConnectionCommand.h
  7103. (nameResolver): New function.
  7104. * src/HttpInitiateConnectionCommand.cc
  7105. (DlRetryEx.h): Included.
  7106. (HttpInitiateConnectionCommand): Call disableReadCheckSocket,
  7107. disableWriteCheckSocket.
  7108. (~HttpInitiateConnectionCommand): Call disableNameResolverCheck.
  7109. (executeInternal): Added async DNS support.
  7110. * src/NameResolver.h: New class. Note: #include <ares.h> is surrounded
  7111. by extern "C" declaration.
  7112. * src/NameResolver.cc: New class.
  7113. * src/Util.h:
  7114. (isNumberAndDotsNotation): New function
  7115. * src/Util.cc
  7116. (isNumberAndDotsNotation): New function.
  7117. * src/DownloadEngine.h
  7118. (NameResolver.h): Included.
  7119. (NameResolverEntry): New class.
  7120. (NameResolverEntries): New type definition.
  7121. (addNameResolverCheck): New function.
  7122. (deleteNameResolverCheck): New function.
  7123. * src/DownloadEngine.cc
  7124. (run): Initialize cp with 0.
  7125. (SetDescriptor::operator()): Added for NameResolverEntry.
  7126. (AccumulateActiveUuid::operator()): Added for NameResolverEntry.
  7127. (waitData): Check nameResolver entries.
  7128. (updateFdSet): Update fds in nameResolver entries.
  7129. (addNameResolverCheck): New function.
  7130. (deleteNameResolverCheck): new function.
  7131. * src/PeerInteractionCommand.cc
  7132. (executeInternal): Fixed wrong socket handling.
  7133. * src/main.cc
  7134. (main): Fixed the initial value of PREF_LOWEST_SPEED_LIMIT option to 0.
  7135. * src/Util.cc
  7136. (fileChecksum): Removed the call to ctx.digestReset().
  7137. 2006-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7138. * po/ru.po: Azamat sent me Russian translation.
  7139. * src/FtpNegotiateCommand.cc
  7140. (recvGreeting): Call disableWriteCheckSocket just after
  7141. socket->setBlockingMode(). This avoids unnecessary CPU-hog loop.
  7142. (recvRetr): Recognized status code 125 as a acceptable response code.
  7143. Rename Time.h to TimeA2.h to avoid compilation ploblem on
  7144. case-insesitive filesystem(BUG#1531057).
  7145. * src/Time.h: Renamed as TimeA2.h.
  7146. * src/Time.cc: Renamed as TimeA2.cc.
  7147. * src/TimeA2.h: New class.
  7148. * src/TimeA2.cc: New class.
  7149. * src/PeerChokeCommand.h: Replaced Time.h with TimeA2.h.
  7150. * src/TrackerWatcherCommand.h: Replaced Time.h with TimeA2.h.
  7151. * src/PeerAbstractCommand.h: Replaced Time.h with TimeA2.h.
  7152. * src/AbstractCommand.h: Replaced Time.h with TimeA2.h.
  7153. * src/PeerInteractionCommand.h: Replaced Time.h with TimeA2.h.
  7154. * src/ConsoleDownloadEngine.h: Replaced Time.h with TimeA2.h.
  7155. * src/TorrentAutoSaveCommand.h: Replaced Time.h with TimeA2.h.
  7156. * src/DownloadCommand.h: Replaced Time.h with TimeA2.h.
  7157. * src/TorrentMan.h: Replaced Time.h with TimeA2.h.
  7158. * src/TorrentDownloadEngine.h: Replaced Time.h with TimeA2.h.
  7159. * src/RequestSlot.h: Replaced Time.h with TimeA2.h.
  7160. * src/SleepCommand.h: Replaced Time.h with TimeA2.h.
  7161. * src/DownloadEngine.cc: Replaced Time.h with TimeA2.h.
  7162. * release 0.7.0
  7163. 2006-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7164. * src/PeerChokeCommand.h
  7165. (PeerChokeCommand): Rearranged the arguments.
  7166. * src/PeerChokeCommand.cc
  7167. (PeerChokeCommand): Rearranged the arguments.
  7168. * src/MetalinkEntry.h
  7169. (Checksum.h): Included.
  7170. (md5): Removed.
  7171. (sha1): Removed.
  7172. (checksum): New variable.
  7173. (operator=): Updated.
  7174. (check): Removed.
  7175. * src/prefs.h
  7176. (PREF_LOWEST_SPEED_LIMIT): New definition.
  7177. (PREF_FOLLOW_TORRENT): New definition.
  7178. (PREF_SELECT_FILE): New definition.
  7179. (PREF_FOLLOW_METALINK): New definition.
  7180. * src/MetalinkResource.h
  7181. (TYPE_HTTPS): Added to enum TYPE.
  7182. * src/TorrentMan.cc
  7183. (~TorrentMan): Rewritten.
  7184. * src/MultiDiskWriter.cc
  7185. (MultiDiskAdaptor): Updated according to the changes in
  7186. MessageDigestContext.
  7187. (~MultiDiskAdaptor): Updated according to the changes in
  7188. MessageDigestContext.
  7189. (hashUpdate): Updated according to the changes in MessageDigestContext.
  7190. (sha1Sum): Updated according to the changes in MessageDigestContext.
  7191. * src/Util.h
  7192. (fileChecksum): Updated according to the changes in
  7193. MessageDigestContext.
  7194. * src/Util.cc
  7195. (sha1Sum): Updated according to the changes in MessageDigestContext.
  7196. (fileChecksum): Updated according to the changes in
  7197. MessageDigestContext.
  7198. * src/messageDigest.h: Rewritten.
  7199. * src/MetalinkEntry.cc
  7200. (check): Removed.
  7201. (Supported): Updated.
  7202. (dropUnsupportedResource): Fixed a memory leak.
  7203. * src/ShaVisitor.cc
  7204. (ShaVisitor): Updated according to the changes in MessageDigestContext.
  7205. (~ShaVisitor): Updated according to the changes in
  7206. MessageDigestContext.
  7207. (visit): Updated according to the changes in MessageDigestContext.
  7208. * src/main.cc
  7209. (main): Rewritten the portion of download loop. --lowest-speed-limit
  7210. command-line option added.
  7211. * src/DownloadEngine.h
  7212. (SocketEntry): New class.
  7213. (SocketEntries): New definition.
  7214. (PairFind): Removed.
  7215. (SockCmdMap): Removed.
  7216. * src/DownloadEngine.cc
  7217. (DownloadEngine): Rewritten.
  7218. (~DownloadEngine): Rewritten.
  7219. (run): Renamed activeCommandUuids as activeUuids.
  7220. (SetDescriptor): Rewritten.
  7221. (AccumulateActiveCommandUuid): Removed.
  7222. (AccumulateActiveUuid): New function object.
  7223. (waitData): Rewritten.
  7224. (updateFdSet): Rewritten.
  7225. (addSocket): Rewritten.
  7226. (deleteSocket): Rewritten.
  7227. (addSocketForReadCheck): Rewritten.
  7228. (deleteSocketForReadCheck): Rewritten.
  7229. (addSocketForWriteCheck): Rewritten.
  7230. (deleteSocketForWriteCheck): Rewritten.
  7231. * src/Xml2MetalinkProcessor.cc
  7232. (getEntry): Rewritten the portion of MetalinkEntry creation.
  7233. * src/DownloadCommand.cc
  7234. (executeInternal): Added the check routine for lowest speed limit.
  7235. * src/AbstractDiskWriter.cc
  7236. (AbstractDiskWriter): Updated according to the changes in
  7237. MessageDigestContext.
  7238. (~AbstractDiskWriter): Updated according to the changes in
  7239. MessageDigestContext.
  7240. (sha1Sum): Updated according to the changes in MessageDigestContext.
  7241. * src/RequestInfo.h: New class.
  7242. * src/UrlRequestInfo.h: New class.
  7243. * src/UrlRequestInfo.cc: New class.
  7244. * src/TorrentRequestInfo.h: New class.
  7245. * src/TorrentRequestInfo.cc: New class.
  7246. * src/MetalinkRequestInfo.h: New class.
  7247. * src/MetalinkRequestInfo.cc: New class.
  7248. * src/Checksum.h: New class.
  7249. * src/DownloadEngineFactory.h: New class.
  7250. * src/DownloadEngineFactory.cc: New class.
  7251. 2006-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7252. * src/Option.h
  7253. (getAsBool): New function.
  7254. * src/Option.cc
  7255. (prefs.h): Included.
  7256. (defined): 0-length value is now recognized as undefined.
  7257. (getAsInt): Rewritten.
  7258. (getAsLLInt): Rewritten.
  7259. (getAsBool): New function.
  7260. * src/FeatureConfig.h: Rewritten.
  7261. * src/FeatureConfig.cc: Rewritten.
  7262. * src/prefs.h
  7263. (PREF_STDOUT_LOG): New definition.
  7264. (PREF_LOG): New definition.
  7265. (PREF_DIR): New definition.
  7266. (PREF_OUT): New definition.
  7267. (PREF_SPLIT): New definition.
  7268. (PREF_DAEMON): New definition.
  7269. (PREF_REFERER): New definition.
  7270. (PREF_TORRENT_FILE): New definition.
  7271. (PREF_LISTEN_PORT): New definition.
  7272. (PREF_METALINK_FILE): New definition.
  7273. (PREF_METALINK_VERSION): New definition.
  7274. (PREF_METALINK_LANGUAGE): New definition.
  7275. (PREF_METALINK_OS): New definition.
  7276. (PREF_METALINK_SERVERS): New definition.
  7277. * src/main.cc
  7278. (main): Following command-line parameters are now put into Option
  7279. class: stdoutLog, logfile, dir, ufilename, split, daemonMode,
  7280. referer, torrentFile, metalinkFile, listenPort, metalinkVersion,
  7281. metalinkLanguage, metalinkOs, metalinkServers
  7282. To fix the bug that aria2 can not handle http response header properly.
  7283. * src/HttpHeader.cc
  7284. (put): Made name lowercased.
  7285. (defined): Made name lowercased.
  7286. (getFirst): Made name lowercased.
  7287. (get): Made name lowercased.
  7288. (getFirstAsInt): Rewritten.
  7289. (getFirstAsLLInt): Rewritten.
  7290. 2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7291. * src/TorrentMan.h:
  7292. (advertisePiece): Updated doc.
  7293. (getAdvertisedPieceIndexes): Updated doc.
  7294. (removeAdvertisedPiece); New function.
  7295. * src/TorrentMan.cc
  7296. (FindElapsedHave): New function object.
  7297. (removeAdvertisedPiece): New function.
  7298. * src/HaveEraseCommand.h: New class.
  7299. * src/HaveEraseCommand.cc: New class.
  7300. * src/FeatureConfig.h: New class.
  7301. * src/FeatureConfig.cc: New class.
  7302. * src/Request.h
  7303. (defaultPorts): Removed.
  7304. * src/Request.cc
  7305. (FeatureConfig.h): Included.
  7306. (Request): Removed the statements related to defaultPorts.
  7307. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead.
  7308. A default port number is now retrieved from FeatureConfig.
  7309. * src/main.cc
  7310. (HaveEraseCommand.h): Included.
  7311. (showVersion): Added the output of feature list.
  7312. (main): Added HaveEraseCommand to command queue in BitTorrent
  7313. downloading.
  7314. * src/PeerInteractionCommand.h
  7315. (chokeCheckPoint): Commented out.
  7316. (periodicExecPoint): New variable.
  7317. * src/PeerInteractionCommand.cc
  7318. (executeInternal): Following methods are now called in at least every
  7319. 0.5 seconds to reduce CPU usage:
  7320. detectMessageFlooding(), peerInteraction->checkRequestSlot(),
  7321. checkHave(), sendKeepAlive().
  7322. (checkLongTimePeerChoking): Commented out.
  7323. * src/BitfieldMan.h
  7324. (getNthBitIndex): Changed the method signature.
  7325. (getMissingIndexRandomly): Changed the method signature.
  7326. * src/BitfieldMan.cc
  7327. (getNthBitIndex): Rewritten
  7328. (getMissingIndexRandomly): Rewritten.
  7329. (hasMissingPiece): Rewritten.
  7330. (getMissingIndex): Refactored.
  7331. (getMissingUnusedIndex); Refactored.
  7332. (getMissingIndex): Refactored.
  7333. 2006-07-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7334. * src/PeerMessage.h
  7335. (Piece.h): Included.
  7336. (SharedHandle.h): Included.
  7337. (invalidate): New variable.
  7338. (uploading): New variable.
  7339. (isInvalidate): New function.
  7340. (isUploading): New function.
  7341. (onPush): New function.
  7342. (onChoked): New function.
  7343. (onCanceled): New function.
  7344. (onAbortPiece): New function.
  7345. (PeerMessageHandle): New type definition.
  7346. * src/PeerMessage.cc
  7347. (PeerMessage): Added the initialization for invalidate and uploading.
  7348. * src/CancelMessage.h
  7349. (CancelMessage): Rewritten.
  7350. * src/RejectMessage.h
  7351. (RejectMessage): Rewritten.
  7352. * src/Metalinker.h
  7353. (operator=): Defined.
  7354. * src/MetaEntry.h
  7355. (operator=): Defined.
  7356. * src/MetalinkResource.h
  7357. (operator=): Defined.
  7358. * src/AllowedFastMessage.h
  7359. (AllowedFastMessage): Rewritten.
  7360. * src/HandshakeMessage.h
  7361. (HandshakeMessage): New function(overload).
  7362. * src/HandshakeMessage.cc
  7363. (HandshakeMessage): Rewritten.
  7364. (init): New function.
  7365. * src/HaveMessage.h
  7366. (HaveMessage): Rewritten.
  7367. * src/Time.h
  7368. (operator=): Defined the function body here.
  7369. * src/Time.cc
  7370. (operator=): Removed.
  7371. * src/SocketCore.h
  7372. (operator==): Defined here.
  7373. (operator!=): Defined here.
  7374. (operator<): Defined here.
  7375. * src/SocketCore.cc
  7376. (operator==): Removed.
  7377. (operator<): Removed.
  7378. * src/BitfieldMan.h
  7379. (operator=): Defined the function body here.
  7380. * src/BitfieldMan.cc
  7381. (operator=): Removed.
  7382. * src/TorrentMan.h
  7383. (deleteErrorPeer): Removed.
  7384. (deleteUnusedPeer); New function.
  7385. * src/TorrentMan.cc
  7386. (addPeer): Call deleteUnusedPeer.
  7387. (deleteErrorPeer): Removed.
  7388. (deleteUnusedPeer): New function.
  7389. * src/PeerAbstractCommand.h
  7390. (setNoCheck): New function.
  7391. (noCheck): New variable.
  7392. * src/PeerAbstractCommand.cc
  7393. (PeerAbstractCommand): Added the initialization of noCheck.
  7394. (execute): Added a check for noCheck.
  7395. (setNoCheck): New function.
  7396. * src/Util.h
  7397. (stdio.h): Included.
  7398. * src/Util.cc
  7399. (unistd.h): Included.
  7400. * src/DefaultDiskWriter.cc
  7401. (unistd.h): Included.
  7402. * src/Peer.h
  7403. (operator==): Defined the function body here.
  7404. (operator!=): Defined the function body here.
  7405. * src/Peer.cc
  7406. (operator==): Removed.
  7407. (operator!=): Removed.
  7408. * src/Piece.h
  7409. (Piece): Defined the function body here(copy constructor).
  7410. (operator=): Defined the function body here.
  7411. (operator==): Defined the function body here.
  7412. * src/Piece.cc
  7413. (Piece): Removed(copy constructor).
  7414. (operator=): Removed.
  7415. (operator==): Removed.
  7416. * src/PeerMessageUtil.h
  7417. (ChokeMessage.h): Removed.
  7418. (UnchokeMessage.h): Removed.
  7419. (InterestedMessage.h): Removed.
  7420. (NotInterestedMessage.h): Removed.
  7421. (HaveMessage.h): Removed.
  7422. (BitfieldMessage.h): Removed.
  7423. (RequestMessage.h): Removed.
  7424. (CancelMessage.h): Removed.
  7425. (PieceMessage.h): Removed.
  7426. (HandshakeMessage.h): Removed.
  7427. (KeepAliveMessage.h): Removed.
  7428. (PortMessage.h): Removed.
  7429. (HaveAllMessage.h): Removed.
  7430. (HaveNoneMessage.h): Removed.
  7431. (PeerConnection.h): Removed.
  7432. (HandshakeMessage.h): Included.
  7433. * src/BitfieldMessage.h
  7434. (init): New function.
  7435. (BitfieldMessage): Rewritten.
  7436. (BitfieldMessage): New function(overload).
  7437. * src/RequestSlot.h
  7438. (operator=): Defined the function body here.
  7439. (operator==): Defined the function body here.
  7440. * src/RequestSlot.cc
  7441. (operator=): Removed.
  7442. (operator==): Removed.
  7443. To remove the dependency on the PeerMessage subclass from
  7444. PeerInteraction:
  7445. * src/PeerMessageFactory.h: New class.
  7446. * src/PeerMessageFactory.cc: New class.
  7447. * src/SimplePeerMessage.cc
  7448. (send): If invalidate is true then do nothing.
  7449. * src/PeerInteractionCommand.cc
  7450. (HandshakeMessage.h): Included.
  7451. (KeepAliveMessage.h): Included.
  7452. (ChokeMessage.h): Included.
  7453. (UnchokeMessage.h): Included.
  7454. (HaveMessage.h): Included.
  7455. (executeInternal): Call setNoCheck().
  7456. Removed setWriteCheckSocket(socket).
  7457. * src/PeerInteraction.h
  7458. (ChokeMessage.h): Removed.
  7459. (UnchokeMessage.h): Removed.
  7460. (InterestedMessage.h): Removed.
  7461. (NotInterestedMessage.h): Removed.
  7462. (HaveMessage.h): Removed.
  7463. (BitfieldMessage.h): Removed.
  7464. (RequestMessage.h): Removed.
  7465. (CancelMessage.h): Removed.
  7466. (PieceMessage.h): Removed.
  7467. (HandshakeMessage.h): Removed.
  7468. (KeepAliveMessage.h): Removed.
  7469. (PortMessage.h): Removed.
  7470. (HaveAllMessage.h): Removed.
  7471. (HaveNoneMessage.h): Removed.
  7472. (RejectMessage.h): Removed.
  7473. (AllowedFastMessage.h): Removed.
  7474. (SuggestPieceMessage.h): Removed.
  7475. (PeerMessageFactory.h): Included.
  7476. (PeerMessageHandle): Removed typedef of PeerMessageHandle.
  7477. (HandshakeMessageHandle): Removed typedef of HandshakeMessageHandle.
  7478. (PeerMessageFactory): New variable.
  7479. (createPeerMessage): Removed.
  7480. (createHandshakeMessage): Removed.
  7481. (setPeerMessageCommonProperty): Removed.
  7482. (addRequestSlot): New function.
  7483. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  7484. (getPeerMessageFactory): New function.
  7485. (createRequestMessage): Removed.
  7486. (createCancelMessage): Removed.
  7487. (createPieceMessage): Removed.
  7488. (createHaveMessage): Removed.
  7489. (createChokeMessage): Removed.
  7490. (createUnchokeMessage): Removed.
  7491. (createInterestedMessage): Removed.
  7492. (createNotInterestedMessage): Removed.
  7493. (createBitfieldMessage): Removed.
  7494. (createKeepAliveMessage): Removed.
  7495. (createHaveAllMessage): Removed.
  7496. (createHaveNoneMessage): Removed.
  7497. (createRejectMessage): Removed.
  7498. (createAllowedFastMessage): Removed.
  7499. * src/PeerInteraction.cc
  7500. (PeerInteraction): Allocate PeerMessageFactory here.
  7501. (~PeerInteraction): Deallocate PeerMessageFactory here.
  7502. (sendMessages): Use msg->isUploading() instead of msg->getId() ==
  7503. PieceMessage::ID.
  7504. (addMessage): Simplified by using PeerMessage::onPush().
  7505. (addRequestSlot): New function.
  7506. (rejectAllPieceMessageInQueue): Simplified by using
  7507. PeerMessage::onChoked().
  7508. (rejectPieceMessageInQueue): Simplified by using
  7509. PeerMessage::onCanceled().
  7510. (abortPiece): Simplified by using PeerMessage::abortPiece().
  7511. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  7512. (createHandshakeMessage): Removed.
  7513. (createPeerMessage): Removed.
  7514. (sendHandshake): Call PeerMessageFactory::createHandshakeMessage().
  7515. (setPeerMessageCommonProperty): Removed.
  7516. (createRequestMessage): Removed.
  7517. (createCancelMessage): Removed.
  7518. (createPieceMessage): Removed.
  7519. (createHaveMessage): Removed.
  7520. (createChokeMessage): Removed.
  7521. (createUnchokeMessage): Removed.
  7522. (createInterestedMessage): Removed.
  7523. (createNotInterestedMessage): Removed.
  7524. (createBitfieldMessage): Removed.
  7525. (createKeepAliveMessage): Removed.
  7526. (createHaveAllMessage): Removed.
  7527. (createHaveNoneMessage): Removed.
  7528. (createRejectMessage): Removed.
  7529. (createAllowedFastMessage): Removed.
  7530. * src/PieceMessage.h
  7531. (createRejectMessage): New function.
  7532. (PieceMessage): Rewritten.
  7533. (onChoked): New function.
  7534. (onCanceled): New function.
  7535. * src/PieceMessage.cc
  7536. (send): If invalidate is true then do nothing, just return.
  7537. (createRejectMessage): New function.
  7538. (onChoked): New function.
  7539. (onCanceled): New function.
  7540. * src/RequestMessage.h
  7541. (RequestMessage): Rewritten.
  7542. (onPush): New function.
  7543. (onAbortPiece): New function.
  7544. * src/RequestMessage.cc
  7545. (onPush): New function.
  7546. (onAbortPiece): New function.
  7547. Update fd_set when a socket is added or deleted in order to improve
  7548. performance:
  7549. * src/DownloadEngine.h
  7550. (rfdset): New variable.
  7551. (wfdset): New variable.
  7552. (updateFdSet): New function.
  7553. * src/DownloadEngine.cc
  7554. (SetDescriptor::operator()): Use SockCmdMap::value_type.
  7555. (AccumulateActiveCommandUuid::operator()): Use SockCmdMap::value_type.
  7556. (waitData): Copy rfdset and wfdset.
  7557. (updateFdSet): New function.
  7558. (addSocket): Call updateFdSet.
  7559. (deleteSocket): Call updateFdSet.
  7560. 2006-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7561. To add the support for Metalink3.0 backward compatible links:
  7562. * src/Request.h
  7563. (SAFE_CHARS): Added '#'.
  7564. (METALINK_MARK): New definition.
  7565. * src/Request.cc
  7566. (parseUrl): Added the support for Metalink3.0 backward compatible
  7567. links.
  7568. etc
  7569. * src/PeerInteraction.cc
  7570. (MsgPushBack): Removed.
  7571. (sendMessages): Use STL copy and back_inserter.
  7572. (rejectAllPieceMessageInQueue): Use STL copy and back_inserter.
  7573. (rejectPieceMessageInQueue): Use STL copy and back_inserter.
  7574. * src/TorrentMan.h
  7575. (MAX_PEER_LIST_SIZE): Changed to 100 from 250.
  7576. 2006-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7577. * src/SharedHandle.h: New class.
  7578. To wrap Socket, Command, PeerMessage and Peer with SharedHandle:
  7579. * src/HttpResponseCommand.h
  7580. (HttpResponseCommand): Wrapped Socket.
  7581. * src/SocketCore.h
  7582. (operator==): New function.
  7583. (operator!=): New function.
  7584. (operator<): New function.
  7585. (getSockfd): New function.
  7586. (isOpen): New function.
  7587. (writeData): New function.
  7588. * src/SocketCore.cc
  7589. (operator==): New function.
  7590. (operator!=): New function.
  7591. (operator<): New function.
  7592. * src/AbstractCommand.h
  7593. (socket): Changed its type to SocketHandle.
  7594. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7595. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7596. (disableReadCheckSocket): New function.
  7597. (disableWriteCheckSocket): New function.
  7598. (readCheckTarget): Changed its type to SocketHandle.
  7599. (writeCheckTarget): Changed its type to SocketHandle.
  7600. (AbstractCommand): Replaced Socket with SocketHandle.
  7601. * src/AbstractCommand.cc
  7602. (AbstractCommand): Replaced Socket with SocketHandle.
  7603. (~AbstractCommand): Removed the deallocation for Socket object.
  7604. (disableReadCheckSocket): New function.
  7605. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7606. (disableWriteCheckSocket): New function.
  7607. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7608. * src/HttpDownloadCommand.cc
  7609. (DownloadCommand): Replaced Socket with SocketHandle.
  7610. * src/PeerAbstractCommand.h
  7611. (socket): Changed its type to SocketHandle.
  7612. (peer): Changed its type to PeerHandle.
  7613. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7614. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7615. (disableReadCheckSocket): New function.
  7616. (disableWriteCheckSocket): New function.
  7617. (readCheckTarget): Changed its type to SocketHandle.
  7618. (writeCheckTarget): Changed its type to SocketHandle.
  7619. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  7620. Replaced Peer with PeerHandle.
  7621. * src/HttpRequestCommand.cc
  7622. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7623. Use disableReadCheckSocket.
  7624. * src/PeerInitiateConnectionCommand.h
  7625. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7626. * src/PeerChokeCommand.cc
  7627. (UploadFaster::operator()): Replaced Peer with PeerHandle.
  7628. (DownloadFaster::operator()): Replaced Peer with PeerHandle.
  7629. (execute): Use PeerHandle.
  7630. * src/PeerConnection.h
  7631. (HandshakeMessage.h): Removed include of HandshakeMessage.h.
  7632. (socket): Changed its type to SocketHandle.
  7633. (PeerConnection): Replaced Socket with SocketHandle.
  7634. * src/PeerConnection.cc
  7635. (PeerConnection): Replaced Socket with SocketHandle.
  7636. * src/PeerInteractionCommand.h
  7637. (PeerInteractionCommand): Replaced socket with SocketHandle.
  7638. Replaced Peer with PeerHandle.
  7639. * src/PeerInteractionCommand.cc
  7640. (PeerInteractionCommand): Replaced Socket with SocketHandle.
  7641. Replaced Peer with PeerHandle.
  7642. (executeInternal): Use disableWriteCheckSocket.
  7643. Use HandshakeMessageHandle.
  7644. (receiveMessages): Use PeerMessageHandle.
  7645. (prepareForNextPeer): Use PeerHandle.
  7646. * src/HttpProxyRequestCommand.h
  7647. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7648. * src/HttpResponseCommand.cc
  7649. (HttpResponseCommand): Replaced Socket with SocketHandle.
  7650. * src/TorrentMan.cc
  7651. (nullPeer): Added external reference.
  7652. (~TorrentMan): Removed the deallocation of the elements of peers.
  7653. (addPeer): Rewritten.
  7654. (isPeerAvailable): Use nullPeer.
  7655. (deleteOldpeers): Replaced with deleteErrorPeer.
  7656. (deleteErrorPeer): New function.
  7657. (getPeer): Use PeerHandle and nullPeer.
  7658. (hasMissingPiece): Replaced Peer with PeerHandle.
  7659. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7660. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7661. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7662. (getMissingPiece): Replaced Peer with PeerHandle.
  7663. * src/FtpNegotiateCommand.cc
  7664. (FtpNegotiationCommand): Replaced Peer with PeerHandle.
  7665. (~FtpNegotiationCommand): Removed the deallocation of Sockets.
  7666. (recvGreeting): Use disableWriteCheckSocket.
  7667. (recvPasv): Removed the allocation of Socket.
  7668. Use disableReadCheckSocket.
  7669. (sendRestPasv): Use disableWriteCheckSocket.
  7670. (recvRetr): Changed assertion.
  7671. * src/PeerInteraction.h
  7672. (SharedHandle.h): Included SharedHandle.h.
  7673. (PeerMessageHandle): New type definition.
  7674. (HandshakeMessageHandle): New type definition.
  7675. (MessageQueue): Changed. Now its element is of type PeerMessageHandle.
  7676. (peer): Changed its type to PeerHandle.
  7677. (createHandshakeMessage): Replaced HandshakeMessage with
  7678. HandshakeMessageHandle.
  7679. (createPeerMessage): Replaced PeerMessageHandle with PeerMessage.
  7680. (PeerInteraction): Replaced Peer with PeerHandle.
  7681. Replaced Socket with SocketHandle.
  7682. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  7683. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  7684. (receiveHandshake): Replaced HandshakeMessage with
  7685. HandshakeMessageHandle.
  7686. * src/PeerInteraction.cc
  7687. (PeerInteraction): Replaced Peer with PeerHandle.
  7688. Replaced Socket with SocketHandle.
  7689. (~PeerInteraction): Removed the deallocation of the elements of
  7690. messageQueue.
  7691. (MsgPushBack::operator()): Replaced PeerMessage with PeerMessageHandle.
  7692. (isSendingMessageInProgress): Replaced PeerMessage with
  7693. PeerMessageHandle.
  7694. (sendMessages): Use PeerMessageHandle. Removed try-catch block.
  7695. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  7696. (rejectAllPieceMessageInQueue): Use PeerMessageHandle.
  7697. (rejectPieceMessageInQueue): Use PeerMessageHandle.
  7698. (abortPiece): Use PeerMessageHandle.
  7699. (receiveHandshake): Replaced HandshakeMessage with
  7700. HandshakeMessageHandle. Removed try-catch block.
  7701. (createHandshakeMessage): Replaced HandshakeMessage with
  7702. HandshakeMessageHandle.
  7703. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  7704. Removed try-catch block.
  7705. (createPeerMessage): Replaced PeerMessage with PeerMessageHandle.
  7706. * src/HttpProxyResponseCommand.cc
  7707. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7708. * src/FtpTunnelResponseCommand.h
  7709. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7710. * src/HttpConnection.cc
  7711. (HttpConnection): Replaced Socket with SocketHandle.
  7712. * src/PeerAbstractCommand.cc
  7713. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  7714. (~PeerAbstractCommand): Removed the deallocation of socket.
  7715. Use disableReadCheckSocket, disableWriteCheckSocket.
  7716. (disableReadCheckSocket): New function.
  7717. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7718. (disableWriteCheckSocket): New function.
  7719. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7720. * src/InitiateConnectionCommandFactory.h: Corrected indentation.
  7721. * src/FtpTunnelRequestCommand.cc
  7722. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7723. (~FtpTunnelRequestCommand): Corrected indentation.
  7724. * src/DownloadCommand.h
  7725. (DownloadCommand): Replaced Socket with SocketHandle.
  7726. * src/PeerListenCommand.cc
  7727. (PeerListenCommand): Removed the initialization of socket.
  7728. (~PeerListenCommand): Removed the deallocation of socket.
  7729. (bindPort): Use SocketHandle.
  7730. (execute): Use SocketHandle and PeerHandle.
  7731. * src/FtpDowndloadCommand.cc
  7732. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7733. (~FtpDownloadCommand): Removed the deallocation of ctrlSocket.
  7734. * src/main.cc
  7735. (main): Corrected indentation.
  7736. * src/HttpInitiateConnectionCommand.cc
  7737. (HttpInitiateConnectionCommand): Replaced Socket with SocketHandle.
  7738. (executeInternal): Removed the allocation of socket.
  7739. * src/HttpRequestCommand.h
  7740. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7741. * src/FtpNegotiationCommand.h
  7742. (dataSocket): Changed its type to SocketHandle.
  7743. (serverSocket): Changed its type to SocketHandle.
  7744. (FtpNegotiationCommand): Replaced Socket with SocketHandle.
  7745. * src/TorrentMan.h
  7746. (MAX_PEER_UPDATE): Removed.
  7747. (MAX_PEERS): New definition.
  7748. (Peers): The element is now of type PeerHandle.
  7749. (addPeer): Replaced Peer with PeerHandle. Removed 'duplicate' argument.
  7750. (getPeer): Replaced Peer with PeerHandle.
  7751. (deleteOldErrorPeers): Removed.
  7752. (deleteErrorPeer): New function.
  7753. (hasMissingPiece): Replaced Peer with PeerHandle.
  7754. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7755. (getMissingPiece): Replaced Peer with PeerHandle.
  7756. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7757. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7758. (addActivePeer): Replaced Peer with PeerHandle.
  7759. (deleteActivePeer): Replaced Peer with PeerHandle.
  7760. Added a check for the return value of find.
  7761. * src/FtpTunnelResponseCommand.cc
  7762. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7763. * src/FtpInitiateConnectionCommand.cc
  7764. (executeInternal): Removed the allocation of socket.
  7765. * src/DownloadEngine.h
  7766. (Sockets): An element is now of type SocketHandle.
  7767. (SockCmdMap): A key is of type SocketHandle, a value is of type int.
  7768. (CommandUuids): New type definition.
  7769. (rsockets): Changed its type to SockCmdMap.
  7770. (wsockets): Changed its type to SockCmdMap.
  7771. (addSocket): Rewritten.
  7772. (deleteSocket): Rewritten.
  7773. (addSocketForReadCheck): Rewritten.
  7774. (deleteSocketForReadCheck): Rewritten.
  7775. (addSocketForWriteCheck): Rewritten.
  7776. (deleteSocketForWriteCheck): Rewritten.
  7777. (PairFind): New template class.
  7778. * src/HttpDownloadCommand.h
  7779. (HttpDownloadCommand): Replaced Socket with SocketHandle.
  7780. * src/FtpConnection.cc
  7781. (FtpConnection): Replaced Socket with SocketHandle.
  7782. (sendPort): Removed the allocation of serverSocket. Removed try-catch
  7783. block.
  7784. * src/InitiateConnectionCommandFactory.cc
  7785. (DlAbortEx.h): Included DlAbortEx.h.
  7786. (createInitiateConnectionCommand): Throw exception if the protocol of
  7787. requested URI is not supported.
  7788. * src/Peer.cc
  7789. (nullPeer): Changed its type to PeerHandle.
  7790. (operator==): New function.
  7791. (operator!=): New function.
  7792. * src/Peer.h
  7793. (SharedHandle.h): Included SharedHandle.h.
  7794. (operator==): New function.
  7795. (operator!=): New function.
  7796. (Peer): Added the default constructor.
  7797. Use resetStatus() to initialize member variables.
  7798. (nullPeer): Removed.
  7799. * src/TrackerUpdateCommand.cc
  7800. (execute): Brushed up using SharedHandle. Replaced MAX_PEER_UPDATE
  7801. with MIN_PEERS.
  7802. * src/PeerListenCommand.h
  7803. (socket): Changed its type to SocketHandle.
  7804. * src/Command.h
  7805. (CommandUuid): New type definition.
  7806. (uuid): New variable.
  7807. (uuidGen): New variable.
  7808. (Command): Added the initialization of uuid.
  7809. (getUuid): New function.
  7810. * src/Socket.h
  7811. (Socket): Removed.
  7812. (SocketHandle): New type definition.
  7813. * src/DownloadEngine.h
  7814. (FindCommand): New function object.
  7815. (run): The portion of socket check was rewritten.
  7816. (SetDescriptor): New function object.
  7817. (AccumulateActiveCommandUuid): New function object.
  7818. (waitData): Rewritten.
  7819. (addSocket): Rewritten.
  7820. (deleteSocket): Rewritten.
  7821. (addSocketForReadCheck): Rewritten.
  7822. (addSocketForWriteCheck): Rewritten.
  7823. (deleteSocketForReadCheck): Rewritten.
  7824. (deleteSocketForWriteCheck): Rewritten.
  7825. * src/HttpProxyResponseCommand.h
  7826. (HttpProxyResponseCommand): Replaced Socket with SocketHandle.
  7827. * src/HttpConnection.h
  7828. (socket): Changed its type to SocketHandle.
  7829. (HttpConnection): Replaced Socket with SocketHandle.
  7830. * src/PeerInitiateConnectionCommand.cc
  7831. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7832. (executeInternal): Removed the allocation of socket.
  7833. (prepareForNextPeer): Use PeerHandle.
  7834. * src/PeerMessage.h
  7835. (peer): Changed its type to PeerHandle.
  7836. (getPeer): Replaced Peer with PeerHandle.
  7837. (setPeer): Replaced Peer with PeerHandle.
  7838. * src/DownloadCommand.cc
  7839. (DownloadCommand): Replaced Socket with SocketHandle.
  7840. * src/FtpConnection.h
  7841. (socket): Changed its type to SocketHandle.
  7842. (FtpConnection): Replaced Socket with SocketHandle.
  7843. (sendPort); Replaced Socket with SocketHandle.
  7844. * src/FtpDowndloadCommand.h
  7845. (ctrlSocket): Changed its type to SocketHandle.
  7846. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7847. * src/HttpProxyRequestCommand.cc
  7848. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7849. * src/FtpTunnelRequestCommand.h
  7850. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7851. etc
  7852. * src/PeerChokeCommand.h
  7853. (setAllPeerChoked): Removed.
  7854. (setAllPeerResetDelta): Removed.
  7855. * src/PeerChokeCommand.cc
  7856. (setAllPeerChoked): Removed.
  7857. (ChokePeer): New function object.
  7858. (setAllPeerResetDelta): Removed.
  7859. (ResetDelta): New function object.
  7860. (orderByDownloadRate): Fixed a bug: use DowloadFaster, not UploadFaster
  7861. (execute): Show download speed when the local node is a seeder.
  7862. setAllPeerChoked and setAllPeerResetDelta were rewritten
  7863. using STL.
  7864. * src/TrackerWatcherCommand.h
  7865. (MIN_PEERS): Removed.
  7866. * src/TorrentMan.cc
  7867. (getPeer): Replaced MAX_PEER_UPDATE with MIN_PEERS.
  7868. 2006-07-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7869. To fix the bug that .aria2 file is not saved if downloading is stopped
  7870. by the errors:it results that aria2 can not resume downloading:
  7871. * src/main.cc
  7872. (normalDownload): Added the call to save().
  7873. (main): Added the deletion of the elements in 'reserved'.
  7874. To fix log:
  7875. * src/PeerInteraction.cc
  7876. (receiveHandshake): Fixed log.
  7877. 2006-07-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7878. To improve download performance in BitTorrent:
  7879. * src/TorrentMan.cc
  7880. (getPeer): Check the number of connections. Return nullPeer if
  7881. it is greater than MAX_PEER_UPDATE.
  7882. This code was originally here, but was removed in 0.5.1.
  7883. 2006-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7884. To improve the conditional compilation:
  7885. * src/MultiDiskWriter.h:
  7886. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7887. * src/MultiDiskWriter.cc:
  7888. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7889. * src/Util.h:
  7890. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7891. Added ENABLE_BITTORRENT around computeFastSet().
  7892. * src/Util.cc:
  7893. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7894. Added ENABLE_BITTORRENT around computeFastSet().
  7895. * src/messageDigest.h:
  7896. Replaced ENABLE_BITTORRENT with ENABLE_SSL.
  7897. * src/ShaVisitor.h:
  7898. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7899. * src/ShaVisitor.cc:
  7900. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7901. * src/main.cc:
  7902. Added ENABLE_BITTORRENT around includes and blocks related to
  7903. BitTorrent.
  7904. Added ENABLE_MESSAGE_DIGEST to skip checksum checking when the message
  7905. digest support is not available.
  7906. * src/AbstractDiskWriter.h:
  7907. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7908. * src/AbstractDiskWriter.cc:
  7909. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7910. * src/MetalinkEntry.cc
  7911. (check): Added ENABLE_MESSAGE_DIGEST. Return true if the message digest
  7912. support is not available.
  7913. To add command-line options for Metalink:
  7914. * src/main.cc:
  7915. Added metalink-version, metalink-language, metalink-os,
  7916. follow-metalink.
  7917. To use EXIT_SUCCESS and EXIT_FAILURE with exit():
  7918. * src/main.cc: Use these definition.
  7919. * Release 0.6.0
  7920. 2006-07-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7921. To add Metalink support(http/ftp only):
  7922. * src/AbstractCommand.h
  7923. (tryReserved): New function.
  7924. * src/AbstractCommand.cc
  7925. (execute): Call tryReserved().
  7926. (tryReserved): New function.
  7927. * src/Request.h
  7928. (Requests): New type definition.
  7929. * src/SegmentMan.h
  7930. (reserved): New variable.
  7931. * src/Util.h
  7932. (fileChecksum): New function.
  7933. (toUpper): New function.
  7934. (toLower): New function.
  7935. * src/Util.cc
  7936. (messageDigest.h): Included.
  7937. (trim): Trim \r\n\t.
  7938. (fileChecksum): New function.
  7939. (toUpper): New function.
  7940. (toLower): New function.
  7941. * src/main.cc
  7942. (normalDownload): New function.
  7943. (main): Added 2 command-line options: metalink-file,
  7944. metalink-connection. Their usage has not been written yet.
  7945. * src/MetalinkProcessor.h: New class.
  7946. * src/Xml2MetalinkProcessor.h: New class.
  7947. * src/Xml2MetalinkProcessor.cc: New class.
  7948. * src/MetalinkEntry.h: New class.
  7949. * src/MetalinkEntry.cc: New class.
  7950. * src/MetalinkResource.h: New class.
  7951. * src/MetalinkResource.cc: New class.
  7952. To add md5 message digest checking:
  7953. * src/messageDigest.h: Rewritten.
  7954. * src/MultiDiskWriter.cc: Updated according to the changes in
  7955. messageDigest.h.
  7956. * src/ShaVisitor.cc: Updated according to the changes in
  7957. messageDigest.h.
  7958. * src/Util.cc: Updated according to the changes in messageDigest.h.
  7959. * src/AbstractDiskWriter.cc: Updated according to the changes in
  7960. messageDigest.h.
  7961. To fix a bug that causes segfault when the payload length in peer
  7962. message is less than 0:
  7963. * src/PeerConnection.cc:
  7964. (receiveMessage): Fixed the bug.
  7965. * src/PeerMessageUtil.cc
  7966. (checkLength): Throw an exception if length is less than or equals to
  7967. 0.
  7968. To add new interfaces to Base64 encoding/decoding:
  7969. * src/Base64.h
  7970. (part_encode): Changed the method signature.
  7971. (encode): New function(overload).
  7972. (decode): New function(overload).
  7973. * src/Base64.cc
  7974. (part_encode): Rewritten.
  7975. (encode): Rewritten.
  7976. (encode): New function(overload).
  7977. To prevent a peer to download same piece if there is an error in
  7978. checksum:
  7979. * src/PieceMessage.cc
  7980. (receivedAction): Call peerInteraction->abortPiece().
  7981. 2006-06-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7982. To fix the bug that causes same have message is sent many times to
  7983. a single peer.
  7984. * src/Time.cc
  7985. (isNewer): Use Util::difftv().
  7986. * src/Util.cc
  7987. (difftv): Added a cast to (long long int).
  7988. * src/TorrentMan.cc
  7989. (advertisePiece): Use push_front.
  7990. (getAdvertisedPieceIndexes): A performance improvement was made.
  7991. To fix the bug that sends tracker requests without a sleep interval
  7992. when the number of connections is less than 15.
  7993. * src/TrackerWatcherCommand.cc
  7994. (execute): Now the number of connections is not a factor to decide
  7995. whether or not a tracker request should be sent or not.
  7996. * src/Time.h
  7997. (setTimeInSec): New function.
  7998. * src/Time.cc
  7999. (setTimeInSec): New function.
  8000. etc.
  8001. * src/ChokeMessage.cc
  8002. (receivedAction): Removed peer->snubbing = false
  8003. * src/PeerConnection.h
  8004. (receiveHandshake): Updated doc.
  8005. * src/TorrentMan.h
  8006. (getAdvertisedPieceIndexes): Updated the method signature.
  8007. * src/TorrentMan.cc
  8008. (getAdvertisedPieceIndexes): Updated the method signature.
  8009. * src/Time.h
  8010. (getTimeInMicros): Added a cast to (long long int).
  8011. (getTimeInMillis): Added a cast to (long long int).
  8012. * Release 0.5.2
  8013. 2006-06-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8014. To make a listening socket non-block:
  8015. * src/SocketCore.h
  8016. (setNonBlockingMode): New function.
  8017. * src/SocketCore.cc
  8018. (setNonBlockingMode): New function.
  8019. (beginListen): Added a call to setNonBlockingMode().
  8020. (acceptConnection): Call setNonBlockingMode().
  8021. (setBlockingMode): Updated.
  8022. To handle tracker's NAT-checking:
  8023. * src/PeerConnection.cc
  8024. (receiveHandshake): 'msg' param is filled with received data and
  8025. its length is assigned to 'length' param, even if all handshake
  8026. message is not yet received.
  8027. * src/PeerInteractionCommand.cc
  8028. (executeInternal): Use peerInteraction->receiveHandshake(true) when
  8029. a new peer connects to localhost.
  8030. A call to peerInteraction->sendHandshake() was removed because
  8031. it is called from peerInteraction->receiveHandshake(true).
  8032. * src/PeerInteraction.h
  8033. (quickReplied): New variable.
  8034. (receiveHandshake): Added an argument.
  8035. * src/PeerInteraction.cc
  8036. (PeerInteraction): Added the initialization of quickReplied.
  8037. (receiveHandshake): Send handshake message as soon as the info hash
  8038. in a handshake message from a peer is correct.
  8039. To change the random part of peer id and key parameter:
  8040. * src/TorrentMan.h
  8041. (key): New variable.
  8042. * src/TorrentMan.cc
  8043. (setupInternal1): Use Util::randomAlpha() to generate random part
  8044. of peer id, which is now "-aria2-"+13 alphabet characters([A-Za-z]).
  8045. key is also generated by Util::randomAlpha() and it is now 8 character
  8046. long.
  8047. * src/Util.h
  8048. (randomAlpha): New function.
  8049. * src/Util.cc
  8050. (randomAlpha): New function.
  8051. * src/TrackerWatcherCommand.cc
  8052. (execute): In a tracker request: Use torrentMan->key as key parameter.
  8053. Added no_peer_id=1.
  8054. Set snubbing flag to false when a choke message is received from a
  8055. snubbed peer.
  8056. * src/ChokeMessage.cc
  8057. (receivedAction): Set snubbing flag to false.
  8058. 2006-06-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8059. * src/TorrentMan.cc (setupInternal1): Fixed peerId generation bug.
  8060. * src/SimpleLogger.h (writeHeader): New function.
  8061. * src/SimpleLogger.cc (writeHeader): New function.
  8062. (writeLog): Fixed the bug that causes segfaults if exception message
  8063. contains an unescaped "%" character.
  8064. * src/TrackerWatcherCommand.cc (execute): Added a short sleep
  8065. when a tracker request fails.
  8066. * src/Request.cc (parseUrl): Query string is now handled properly.
  8067. * Release 0.5.1
  8068. 2006-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8069. To add Time class which represents a specific instant in time and
  8070. its precision is microseconds. Time checking procedures were rewritten
  8071. using this object.
  8072. * src/Time.h: New class.
  8073. * src/Time.cc: New class.
  8074. * src/AbstractCommand.h
  8075. (updateCheckPoint): Removed.
  8076. (isTimeoutDetected): Removed.
  8077. (checkPoint): Changed the type to Time.
  8078. (timeout): New variable.
  8079. (setTimeout): New function.
  8080. * src/AbstractCommand.cc
  8081. (AbstractCommand): Removed the initialization of checkPoint.
  8082. Added the initialization of timeout.
  8083. (updateCheckPoint): Removed.
  8084. (isTimeoutDetected): Removed.
  8085. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  8086. * src/PeerChokeCommand.h
  8087. (checkPoint): Changed the type to Time.
  8088. * src/PeerChokeCommand.cc
  8089. (PeerChokeCommand): Removed the initialization of checkPoint.
  8090. (execute): Rewritten using Time object.
  8091. * src/TrackerWatcherCommand.h
  8092. (checkPoint): Changed the type to Time.
  8093. * src/TrackerWatcherCommand.cc
  8094. (TrackerWatcherCommand): Removed the initialization of checkPoint.
  8095. (execute): Rewritten.
  8096. * src/ConsoleDownloadEngine.h
  8097. (cp): Changed the type to Time.
  8098. (startup): Changed the type to Time.
  8099. * src/ConsoleDownloadEngine.cc
  8100. (initStatistics): Use cp.reset(), startup.reset().
  8101. (calculateStatistics): Rewritten using Time object.
  8102. * src/PeerAbstractCommand.h
  8103. (updateCheckPoint): Removed.
  8104. (isTimeoutDetected): Removed.
  8105. (checkPoint): Changed the type to Time.
  8106. * src/PeerAbstractCommand.cc
  8107. (PeerAbstractCommand): Removed the initialization of checkPoint.
  8108. (updateCheckPoint): Removed.
  8109. (isTimeoutDetected): Removed.
  8110. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  8111. * src/PeerInteractionCommand.cc
  8112. (PeerInteractionCommand): Removed the initializations of struct
  8113. timeval variables.
  8114. * src/PeerInteractionCommand.h
  8115. (keepAliveCheckPoint): Changed the type to Time.
  8116. (chokeCheckPoint): Changed the type to Time.
  8117. (freqCheckPoint): Changed the type to Time.
  8118. (haveCheckTime): Changed the type to Time.
  8119. * src/PeerInteractionCommand.cc
  8120. (executeInternal): Rewritten using Time object.
  8121. (detectMessageFlooding): Rewritten using Time object.
  8122. (checkLongTimePeerChoking): Rewritten using Time object.
  8123. (sendKeepAlive): Rewritten using Time object.
  8124. (checkHave): Rewritten using Time object.
  8125. * src/SleepCommand.h
  8126. (checkPoint): Changed the type to Time.
  8127. * src/SleepCommand.cc
  8128. (SleepCommand): Removed the initialization of checkPoint.
  8129. (execute): Rewritten using Time object.
  8130. * src/TorrentAutoSaveCommand.h
  8131. (checkPoint): Changed the type to Time.
  8132. * src/TorrentAutoSaveCommand.cc
  8133. (TorrentAutoSaveCommand): Removed the initialization of checkPoint.
  8134. (execute): Rewritten.
  8135. * src/DownloadCommand.h
  8136. (sw): Changed the type to Time.
  8137. * src/DownloadCommand.cc
  8138. (DownloadCommand): Removed the initialization of sw.
  8139. (executeInternal): Rewritten.
  8140. * src/RequestSlot.h
  8141. (dispatchedTime): Changed the type to Time.
  8142. * src/RequestSlot.cc
  8143. (RequestSlot): Removed the call to setDispatchedTime().
  8144. (setDispatchedTime): Rewirtten.
  8145. (isTimeout): Rewritten.
  8146. (getLatencyInMillis): Rewritten.
  8147. * src/TorrentDownloadEngine.h
  8148. (cp): Changed the type to Time[2].
  8149. (startup): Changed the type to Time.
  8150. * src/TorrentDownloadEngine.cc
  8151. (initStatistics): Rewritten.
  8152. (calculateStatistics): Rewritten.
  8153. * src/DownloadEngine.cc
  8154. (run): Rewritten.
  8155. To detect all attempts to connect to the tracker are failed:
  8156. * src/AbstractCommand.cc
  8157. (execute): Increment e->segmentMan->errors if a command aborted.
  8158. * src/SegmentMan.h
  8159. (errors): New variable.
  8160. * src/SegmentMan.cc
  8161. (SegmentMan): Added the initialization of errors.
  8162. (init): Added the initialization of errors.
  8163. * src/TrackerWatcherCommand.cc
  8164. (execute): If e->segmentMan->errors > 0 then assume that the tracker
  8165. request was failed.
  8166. To handle snubbed peers:
  8167. * src/PeerChokeCommand.cc
  8168. (optUnchokingPeer): Snubbed peers don't get unchoked.
  8169. (execute): Snubbed peers don't get unchoked.
  8170. * src/PeerInteraction.h
  8171. (REQUEST_TIME_OUT): Changed the value from 120 to 60.
  8172. * src/PeerInteraction.cc
  8173. (checkRequestSlot): A peer get marked as "snubbed" if it doesn't send
  8174. back the requested 16k block in 60 seconds.
  8175. * src/PieceMessage.cc
  8176. (receivedAction): A peer's snubbed state is cleard if it sends
  8177. the requested 16k block in 60 seconds.
  8178. * src/Peer.h
  8179. (snubbing): New variable.
  8180. * src/Peer.cc
  8181. (resetStatus): Added snubbed = false.
  8182. To fix the bug that causes have message is not sent:
  8183. * src/PeerInteractionCommand.cc
  8184. (~PeerInteractionCommand): Removed e->torrentMan->unadvertisePiece().
  8185. (FLOODING_CHECK_INTERVAL): New definition(temporal).
  8186. (detectMessageFlooding): Use FLOODING_CHECK_INTERVAL.
  8187. * src/TorrentMan.h
  8188. (HaveEntry): New class.
  8189. (advertisePiece): Rewritten.
  8190. (getAdvertisedPieceIndexes): Rewritten.
  8191. (Haves): Changed the type.
  8192. (getAdvertisedPieceIndexes): Added an argument.
  8193. Others:
  8194. * src/TorrentMan.h
  8195. (DEFAULT_ANNOUNCE_INTERVAL): Changed the value to 1800.
  8196. (DEFAULT_ANNOUNCE_MIN_INTERVAL): Changed the value to 1800.
  8197. * src/TorrentMan.cc
  8198. (getPeer): Don't check the number of connections here.
  8199. (setupInternal1): Changed peerId.
  8200. * src/PeerInteractionCommand.h
  8201. (KEEP_ALIVE_INTERVAL): New definition.
  8202. (sendKeepAlive): Use KEEP_ALIVE_INTERVAL.
  8203. * src/main.cc
  8204. (main): SA_ONESHOT was replaced with SA_RESETHAND.
  8205. * src/DownloadEngine.h: Removed unnecessary header includes.
  8206. 2006-05-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8207. To fix the bug that causes segfaults if a tracker returns a zero-length
  8208. list as "peers":
  8209. * src/TrackerUpdateCommand.cc
  8210. (execute): Added a check to see wether the type of peers is Data*.
  8211. 2006-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8212. * Release 0.5.0
  8213. To fix compile issue with gcc3:
  8214. * src/CancelMessage.h
  8215. (ID): Renamed as ID_t
  8216. (ID_t): New enum.
  8217. * src/RejectMessage.h
  8218. (ID): Renamed as ID_t
  8219. (ID_t): New enum.
  8220. * src/SuggestPieceMessage.h
  8221. (ID): Renamed as ID_t
  8222. (ID_t): New enum.
  8223. * src/AllowedFastMessage.h
  8224. (ID): Renamed as ID_t
  8225. (ID_t): New enum.
  8226. * src/PortMessage.h
  8227. (ID): Renamed as ID_t
  8228. (ID_t): New enum.
  8229. * src/HaveNoneMessage.h
  8230. (ID): Renamed as ID_t
  8231. (ID_t): New enum.
  8232. * src/KeepAliveMessage.h
  8233. (ID): Renamed as ID_t
  8234. (ID_t): New enum.
  8235. * src/HaveAllMessage.h
  8236. (ID): Renamed as ID_t
  8237. (ID_t): New enum.
  8238. * src/UnchokeMessage.h
  8239. (ID): Renamed as ID_t
  8240. (ID_t): New enum.
  8241. * src/BitfieldMessage.h
  8242. (ID): Renamed as ID_t
  8243. (ID_t): New enum.
  8244. * src/PieceMessage.h
  8245. (ID): Renamed as ID_t
  8246. (ID_t): New enum.
  8247. * src/RequestMessage.h
  8248. (ID): Renamed as ID_t
  8249. (ID_t): New enum.
  8250. * src/NotInterestedMessage.h
  8251. (ID): Renamed as ID_t
  8252. (ID_t): New enum.
  8253. * src/ChokeMessage.h
  8254. (ID): Renamed as ID_t
  8255. (ID_t): New enum.
  8256. * src/InterestedMessage.h
  8257. (ID): Renamed as ID_t
  8258. (ID_t): New enum.
  8259. * src/HaveMessage.h
  8260. (ID): Renamed as ID_t
  8261. (ID_t): New enum.
  8262. 2006-05-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8263. * src/PeerAbstractCommand.h
  8264. (beforeSocketCheck): Removed.
  8265. * src/PeerAbstractCommand.cc
  8266. Modified in order to call executeInternal() even if socket check
  8267. and upload limit check fail.
  8268. * src/PeerInteractionCommand.h
  8269. (keepAlive): Removed.
  8270. (sendKeepAlive): New function.
  8271. (checkHave): New function.
  8272. (beforeSocketCheck): Removed.
  8273. * src/PeerInteractionCommand.cc
  8274. (executeInternal): Use peerInteraction->checkRequestSlot(). Added
  8275. calls to checkHave() and sendKeepAlive().
  8276. (keepAlive): Renamed to sendKeepAlive().
  8277. (sendKeepAlive): New function.
  8278. (beforeSocketCheck): Removed.
  8279. (checkHave): New function.
  8280. * src/BitfieldMan.cc
  8281. (getMissingIndex): Don't call getMissingIndexRandomly() if max is 0.
  8282. (getMissingUnusedIndex): Don't call getMissingIndexRandomly() if max is
  8283. 0.
  8284. (getMissingIndex): Dont't call getMissingIndexRandomly() if max is 0.
  8285. * src/TorrentMan.h
  8286. (UsedPieces): Removed.
  8287. (Pieces): New type definition.
  8288. * src/Piece.h: Updated doc.
  8289. * src/Peer.h
  8290. (totalLength): Removed.
  8291. * src/Peer.cc
  8292. (updateLatency): Fixed the latency calculation.
  8293. * src/TorrentMan.cc
  8294. (addPeer): Call deleteOldErrorPeers() only if peers.size() is higher
  8295. than or equal to MAX_PEER_LIST_SIZE.
  8296. If duplicate is false and peer.size() >= MAX_PEER_LIST_SIZE,
  8297. then return false.
  8298. (deleteOldErrorPeers): Rewritten.
  8299. (deleteUsedPiece): Fixed the miss use of STL remove.
  8300. * src/PeerInteraction.h
  8301. (Pieces): Removed.
  8302. (deleteTimeoutRequestSlot): Removed.
  8303. (deleteCompletedRequestSlot): Removed.
  8304. (checkRequestSlot): New function.
  8305. * src/PeerInteraction.cc
  8306. (deleteTimeoutRequestSlot): Merged to checkRequestSlot().
  8307. (deleteCompletedRequestSlot): Merged to checkRequestSlot().
  8308. (checkRequestSlot): New function.
  8309. * src/DownloadEngine.cc
  8310. (run): Clear activeSockets before calling waitData().
  8311. (waitData): Removed a call to activeSockets.clear().
  8312. 2006-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8313. To attempt to handle EINTR:
  8314. * src/SocketCore.cc
  8315. (isReadable): Added EINTR handling.
  8316. (isWritable): Added EINTR handling.
  8317. To improve the performance:
  8318. * src/AbstractCommand.cc
  8319. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  8320. * src/PeerInteractionCommand.h
  8321. (receiveMessage): Renamed as receiveMessages().
  8322. (receiveMessages): New function.
  8323. * src/PeerInteractionCommand.cc
  8324. (executeInternal): receiveMessage loop is moved to new receiveMessages
  8325. () function. detectMessageFlooding() is moved here.
  8326. (detectMessageFlooding): Use Util::difftvsec() instead of Util::difftv
  8327. (). The flooding detection for have message is comment out.
  8328. (checkLongTimePeerChoking): Use Util::difftvsec() instead of
  8329. Util::difftv().
  8330. (receiveMessage): Renamed as receiveMessages().
  8331. (receiveMessages): New function.
  8332. (keepAlive): Use Util::difftvsec() instead of Util::difftv().
  8333. (beforeSocketCheck): Commented out checkLongTimePeerChoking().
  8334. * src/SleepCommand.cc
  8335. (execute): Use Util::difftvsec() instead of Util::difftv().
  8336. * src/BitfieldMan.h
  8337. (getNthBitIndex): New function.
  8338. (hasMissingPiece): New function.
  8339. (getAllMissingIndexes): New function.
  8340. * src/BitfieldMan.cc
  8341. (countSetBit): Rewritten.
  8342. (getNthBitIndex): New function.
  8343. (getMissingIndexRandomly): Rewritten.
  8344. (hasMissingPiece): New function.
  8345. (getAllMissingIndexes): New function.
  8346. * src/TorrentMan.cc
  8347. (hasMissingPiece): New function.
  8348. (deleteUsedPiece): Rewritten using STL.
  8349. * src/PeerInteraction.cc
  8350. (getNewPieceAndSendInterest): Use TorrentMan::hasMissingPiece(), which
  8351. is a little bit faster then TorrentMan::getMissingPieceIndex().
  8352. (addRequests): Updated the number of pending requests.
  8353. * src/PeerAbstractCommand.cc
  8354. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  8355. (execute): Returns true if TorrentMan::isHalt() is true.
  8356. Corrected the condition of upload limit checking.
  8357. * src/Util.h
  8358. (countBit): New function.
  8359. * src/Util.cc
  8360. (nbits): New variable.
  8361. (countBit): New function.
  8362. * src/DownloadEngine.h
  8363. (SockCmdMap): New type definition.
  8364. (waitData): Added an argument.
  8365. (addSocket): Added an argument.
  8366. (addSocketForReadCheck): Added an argument.
  8367. (addSocketForWriteCheck): Added an argument.
  8368. * src/DownloadEngine.cc
  8369. (run): Executes only commands whose sockets are ready to read or write.
  8370. All commands are executed in every 1 second.
  8371. (waitData): Calls select() again if it returned
  8372. EINTR.
  8373. (addSocket): Saves socket and command object pair to the map.
  8374. (deleteSocket): Deletes socket and command object pair from the map.
  8375. (addSocketForReadCheck): Added an argument.
  8376. (addSocketForWriteCheck): Added an argument.
  8377. * src/DownloadCommand.cc
  8378. (executeInternal): Use Util::difftvsec() instead of Util::difftv().
  8379. To send "event=stopped" to the tracker when the application finishes:
  8380. * src/PeerChokeCommand.h
  8381. (checkPoint): New variable.
  8382. * src/PeerChokeCommand.cc
  8383. (PeerChokeCommand): Added the initialization of checkPoint.
  8384. (execute): The interval check is now done by checkPoint, not
  8385. SleepCommand. Return true if TorrentMan::isHalt() is true.
  8386. * src/TorrentMan.h
  8387. (halt): New function.
  8388. (hasMissingPiece): New function.
  8389. (isHalt): New function.
  8390. (setHalt): New function.
  8391. * src/TorrentMan.cc
  8392. (TorrentMan): Added the initialization of halt.
  8393. * src/TorrentAutoSaveCommand.h
  8394. (checkPoint): New variable.
  8395. * src/PeerListenCommand.cc
  8396. (execute): Returns true if TorrentMan::isHalt() is true.
  8397. * src/main.cc
  8398. (setSignalHander): Added flags argument.
  8399. (torrentHandler): Just calls TorrentMan::setHalt(true) and returns.
  8400. (main): Set SA_ONESHOT flag of the signal hander of SIGINT and SIGTERM.
  8401. Removed printDownloadAbortMessage() after torrent downloading loop.
  8402. * src/TorrentAutoSaveCommand.cc
  8403. (TorrentAutoSaveCommand): Added the initialization of checkPoint.
  8404. (execute): Returns true if TorrentMan::isHalt() is true.
  8405. The interval check is now done by checkPoint, not SleepCommand.
  8406. * src/TrackerWatcherCommand.cc
  8407. (execute): If TorrentMan::isHalt(), then create a tracker request with
  8408. event=stopped.
  8409. * src/TrackerUpdateCommand.cc
  8410. (prepareForRetry): Do not use SleepCommand here.
  8411. (execute): Returns true if TorrentMan::isHalt() is true.
  8412. Others:
  8413. * src/TorrentMan.cc
  8414. (getMissingPieceIndex): Updated log message.
  8415. * src/PeerInteraction.cc
  8416. (createPeerMessag): Updated log message.
  8417. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8418. To add the ability to download several pieces in mix in a command and
  8419. increase the number of request slots according to request-cancel
  8420. latency:
  8421. * src/PeerInteractionCommand.cc
  8422. (executeInternal): The number of messages to be received at a time
  8423. is increased from 10 to 50.
  8424. * src/LogFactory
  8425. (getInstance): Added NullLogger.
  8426. * src/NullLogger.h: New class.
  8427. * src/BitfieldMan.h
  8428. (getMissingIndex): New function.
  8429. * src/BitfieldMan.cc
  8430. (getMissingIndex): New function.
  8431. * src/TorrentMan.h
  8432. (checkOutPiece): New function.
  8433. (getMissingPieceIndex): New function.
  8434. (getMissingFastPieceIndex): New function.
  8435. (getMissingFastPiece): New function.
  8436. * src/TorrentMan.cc
  8437. (updatePiece): Rewritten using STL.
  8438. (syncPiece): Rewritten using STL.
  8439. (getMissingPiece): Rewritten using getMissingPieceIndex() and
  8440. checkOutPiece().
  8441. (getMissingPieceIndex): New function.
  8442. (getMissingFastPieceIndex): New function.
  8443. (getMissingFastPiece): New function.
  8444. (checkOutPiece): New function.
  8445. * src/PeerInteraction.h
  8446. (Pieces): New type definition.
  8447. (piece): Removed.
  8448. (pieces): New variable.
  8449. (getNewPieceAndSendInterest): Added the "piece" argument.
  8450. (abortPiece): Added the "piece" argument.
  8451. (abortAllPieces): New function.
  8452. (isInRequestSlot): New function.
  8453. (hasDownloadPiece): Added the "index" argument.
  8454. (setDownloadPiece): Removed.
  8455. (getDownloadPiece): Added the "index" argument.
  8456. (updatePiece): New function.
  8457. (createRequestMessage): Added the "index" argument.
  8458. * src/PeerInteraction.cc
  8459. (onChoked): Rewritten.
  8460. (abortPiece): Rewirtten.
  8461. (abortAllPieces): New function.
  8462. (deleteTimeoutRequestSlot): Rewritten.
  8463. Clarified code a little bit.
  8464. (deleteCompletedRequestSlot): Rewritten.
  8465. (isInRequestSlot): New function.
  8466. (syncPiece): Rewritten.
  8467. (updatePiece): New function.
  8468. (getNewPieceAndSendInterest): Rewritten.
  8469. (addRequests): Rewritten.
  8470. (getDownloadPiece): Rewritten.
  8471. (hasDownloadPiece): Rewritten.
  8472. (createRequestMessage): Added the "index" argument.
  8473. * src/common.h
  8474. (BITFIELD_LEN_FROM_PIECES): Enclosed the variable in parentheses.
  8475. (DIV_FLOOR): New definition.
  8476. * src/PieceMessage.cc
  8477. (receivedAction): Update request-piece latency here.
  8478. * src/RequestSlot.h
  8479. (getLatencyInMillis): New function.
  8480. * src/RequestSlot.cc
  8481. (isTimeout): Rewritten using getLatencyInMillis.
  8482. (getLatencyInMillis): New function.
  8483. * src/Piece.h
  8484. (operator==): New function.
  8485. (getMissingBlockIndex): New function.
  8486. * src/Piece.cc
  8487. (operator==): New function.
  8488. (getMissingBlockIndex): New function.
  8489. * src/Peer.h
  8490. (DEFAULT_LATENCY): New definition.
  8491. (latency): New variable.
  8492. (updateLatency): New function.
  8493. (getLatency): New function.
  8494. * src/Peer.cc
  8495. (resetStatus): Reset latecy.
  8496. (updateLatency): New function.
  8497. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8498. * src/SocketCore.cc
  8499. (isReadable): Added secure to the condition.
  8500. * src/HttpConnection.cc
  8501. (receiveResponse): Fixed a bug that causes no response header
  8502. exception.
  8503. * src/Peer.h
  8504. (getFastSet): Fixed the return value type.
  8505. 2006-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8506. To remove a wait from download loop:
  8507. * src/DownloadEngine.cc
  8508. (run): Comment out shortSleep.
  8509. To rewrite the message handling:
  8510. * src/SimplePeerMessage.h: New class.
  8511. * src/SimplePeerMessage.cc: New class.
  8512. * src/CancelMessage.h: Derived from SimplePeerMessage.
  8513. (msg): New variable.
  8514. (create): New function.
  8515. (send): Removed.
  8516. (getMessage): New function.
  8517. (getMessageLength): New function.
  8518. * src/CancelMessage.cc
  8519. (create): New function.
  8520. (receivedAction): Replaced deleteRequestMessageInQueue with
  8521. rejectPieceMessageInQueue.
  8522. (send): Removed.
  8523. (getMessage): New function.
  8524. (getMessageLength): New function.
  8525. * src/BitfieldMessage.h: Derived from SimplePeerMessage.
  8526. (msg): New variable.
  8527. (msgLength): New variable.
  8528. (~BitfieldMessage): Deleted msg.
  8529. (send): Removed.
  8530. (getMessage): New function.
  8531. (getMessageLength): New function.
  8532. * src/BitfieldMessage.cc
  8533. (create): New function.
  8534. (send): Removed.
  8535. (getMessage): New function.
  8536. (getMessageLength): New function.
  8537. * src/ChokeMessage.h: Derived from SimplePeerMessage.
  8538. (msg): New variable.
  8539. (sendPredicate): New function.
  8540. (onSendComplete): New function.
  8541. (send): Removed.
  8542. (getMessage): New function.
  8543. (getMessageLength): New function.
  8544. (create): New function.
  8545. * src/ChokeMessage.cc
  8546. (create): New function.
  8547. (send): Removed.
  8548. (sendPredicate): New function.
  8549. (getMessage): New function.
  8550. (getMessageLength): New function.
  8551. (onSendComplete): New function.
  8552. * src/KeepAliveMessage.h: Derived from SimplePeerMessage.
  8553. (msg): New variable.
  8554. (send): Removed.
  8555. (getMessage): New function.
  8556. (getMessageLength): New function.
  8557. * src/KeepAliveMessage.cc
  8558. (send): Removed.
  8559. (getMessage): New function.
  8560. (getMessageLength): New function.
  8561. * src/PortMessage.h
  8562. (create): New function.
  8563. (receivedAction): Updated log message.
  8564. * src/PortMessage.cc: New file.
  8565. * src/UnchokeMessage.h: Derived from SimplePeerMessage.
  8566. (msg): New variable.
  8567. (sendPredicate): New function.
  8568. (onSendComplete): New function.
  8569. (create): New function.
  8570. (send): Removed.
  8571. (getMessage): New function.
  8572. (getMessageLength): New function.
  8573. * src/UnchokeMessage.cc
  8574. (create): New function.
  8575. (send): Removed.
  8576. (sendPredicate): New function.
  8577. (getMessage): New function.
  8578. (getMessageLength): New function.
  8579. (onSendComplete): New function.
  8580. * src/PieceMessage.h
  8581. (leftPieceDataLength): Removed.
  8582. (leftDataLength): New variable.
  8583. (headerSend): New variable.
  8584. (pendingCount): New variable.
  8585. (msgHeader): New variable.
  8586. (sendPieceData): New function.
  8587. (incrementPendingCount): New function.
  8588. (isPendingCountMax): New function.
  8589. (create): New function.
  8590. (getMessageHeader): New function.
  8591. (getMessageHeaderLength): New function.
  8592. * src/PieceMessage.cc
  8593. (create): New function.
  8594. (getMessageHeader): New function.
  8595. (getMessageHeaderLength): New function.
  8596. (send): Rewritten.
  8597. (sendPieceData): New function.
  8598. * src/HaveMessage.h: Derived from SimplePeerMessage.
  8599. (msg): New variable.
  8600. (create): New function.
  8601. (getMessage): New function.
  8602. (getMessageLength): New function.
  8603. * src/HaveMessage.cc
  8604. (create): New function.
  8605. (send): Removed.
  8606. (sendPieceData): New function.
  8607. (getMessage): New function.
  8608. (getMessageLength): New function.
  8609. * src/RequestMessage.h: Derived from SimplePeerMessage.
  8610. (msg): New variable.
  8611. (create): New function.
  8612. (send): Removed.
  8613. (getMessage): New function.
  8614. (getMessageLength): New function.
  8615. * src/RequestMessage.cc
  8616. (create): New function.
  8617. (receivedAction): Added the handling of fast extension.
  8618. Deleted torrentMan->addUploadLength, torrentMan->addDeltaUploadLength.
  8619. (send): Removed.
  8620. (getMessage): New function.
  8621. (getMessageLength): New function.
  8622. * src/InterestedMessage.h: Derived from SimplePeerMessage.
  8623. (msg): New variable.
  8624. (sendPredicate): New function.
  8625. (onSendComplete): New function.
  8626. (create): New function.
  8627. (getMessage): New function.
  8628. (getMessageLength): New function.
  8629. * src/InterestedMessage.cc
  8630. (create): New function.
  8631. (send): Removed.
  8632. (sendPieceData): New function.
  8633. (getMessage): New function.
  8634. (getMessageLength): New function.
  8635. (onSendComplete): New function.
  8636. * src/NotInterestedMessage.h: Derived from SimplePeerMessage.
  8637. (msg): New variable.
  8638. (sendPieceData): New function.
  8639. (onSendComplete): New function.
  8640. (create): New function.
  8641. (send): Removed.
  8642. (getMessage): New function.
  8643. (getMessageLength): New function.
  8644. * src/NotInterestedMessage.cc
  8645. (create): New function.
  8646. (send): Removed.
  8647. (sendPredicate): New function.
  8648. (getMessage): New function.
  8649. (getMessageLength): New function.
  8650. (onSendComplete): New function.
  8651. * src/AllowedFastMessage.h: New class.
  8652. * src/AllowedFastMessage.cc: New class.
  8653. * src/RejectMessage.h: New class.
  8654. * src/RejectMessage.cc: New class.
  8655. * src/SuggestPieceMessage.h: New class.
  8656. * src/SuggestPieceMessage.cc: New class.
  8657. * src/HaveAllMessage.h: New class.
  8658. * src/HaveAllMessage.cc: New class.
  8659. * src/HaveNoneMessage.h: New class.
  8660. * src/HaveNoneMessage.cc: New class.
  8661. * src/HandshakeMessage.h: Derived from SimplePeerMessage.
  8662. (msg): New variable.
  8663. (reserved): New variable.
  8664. (create): New function.
  8665. (getId): New function.
  8666. (receivedAction): New function.
  8667. (getMessage): New function.
  8668. (getMessageLength): New function.
  8669. (isFastExtensionSupported): New function.
  8670. * src/HandshakeMessage.cc
  8671. (HandshakeMessage): Moved here from HandshakeMessage.h.
  8672. (create): New function.
  8673. (getMessage): New function.
  8674. (getMessageLength): New function.
  8675. (toString): Added the output of reserved field.
  8676. (check): Added const qualifier.
  8677. (isFastExtensionSupported): New function.
  8678. * src/PeerMessageUtil.h
  8679. (createChokeMessage): Removed.
  8680. (createUnchokeMessage): Removed.
  8681. (createInterestedMessage): Removed.
  8682. (createNotInterestedMessage): Removed.
  8683. (createHaveMessage): Removed.
  8684. (createBitfieldMessage): Removed.
  8685. (createRequestMessage): Removed.
  8686. (createCancelMessage): Removed.
  8687. (createPieceMessage): Removed.
  8688. (createPortMessage): Removed.
  8689. (createChokeMessage): Removed.
  8690. (createUnchokeMessage): Removed.
  8691. (createInterestedMessage): Removed.
  8692. (createNotInterestedMessage): Removed.
  8693. (createHaveMessage): Removed.
  8694. (createBitfieldMessage): Removed.
  8695. (createRequestMessage): Removed.
  8696. (createCancelMessage): Removed.
  8697. (createPieceMessage): Removed.
  8698. (createKeepAliveMessage): Removed.
  8699. (createHandshakeMessage): Removed.
  8700. (setIntParam): New function.
  8701. (createPeerMessageString): New function.
  8702. * src/PeerMessageUtil.cc
  8703. (createChokeMessage): Removed.
  8704. (createUnchokeMessage): Removed.
  8705. (createInterestedMessage): Removed.
  8706. (createNotInterestedMessage): Removed.
  8707. (createHaveMessage): Removed.
  8708. (createBitfieldMessage): Removed.
  8709. (createRequestMessage): Removed.
  8710. (createCancelMessage): Removed.
  8711. (createPieceMessage): Removed.
  8712. (createPortMessage): Removed.
  8713. (createRequestMessage): Removed.
  8714. (createCancelMessage): Removed.
  8715. (createPieceMessage): Removed.
  8716. (createHaveMessage): Removed.
  8717. (createChokeMessage): Removed.
  8718. (createUnchokeMessage): Removed.
  8719. (createInterestedMessage): Removed.
  8720. (createNotInterestedMessage): Removed.
  8721. (createBitfieldMessage): Removed.
  8722. (createKeepAliveMessage): Removed.
  8723. (createHandshakeMessage): Removed.
  8724. (setIntParam): New function.
  8725. (createPeerMessageString): New function.
  8726. * src/PeerConnection.h
  8727. (peer): Removed.
  8728. (torrentMan): Removed.
  8729. (createNLengthMessage): Removed.
  8730. (setIntParam): Removed.
  8731. (writeOutgoingMessageLog): Removed all overloaded functions.
  8732. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8733. (sendMessage): New function.
  8734. (sendHandshake): Removed.
  8735. (sendKeepAlive): Removed.
  8736. (sendChoke): Removed.
  8737. (sendUnchoke): Removed.
  8738. (sendInterested): Removed.
  8739. (sendNotInterested): Removed.
  8740. (sendHave): Removed.
  8741. (sendBitfield): Removed.
  8742. (sendRequest): Removed.
  8743. (sendPiece): Removed.
  8744. (sendPieceHeader): Removed.
  8745. (sendPieceData): Removed.
  8746. (sendCancel): Removed.
  8747. (getPeer): Removed.
  8748. * src/PeerConnection.cc
  8749. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8750. (sendHandshake): Removed.
  8751. (sendKeepAlive): Removed.
  8752. (createNLengthMessage): Removed.
  8753. (setIntParam): Removed.
  8754. (writeOutgoingMessageLog): Removed all overloaded functions.
  8755. (sendChoke): Removed.
  8756. (sendUnchoke): Removed.
  8757. (sendInterested): Removed.
  8758. (sendNotInterested): Removed.
  8759. (sendHave): Removed.
  8760. (sendBitfield): Removed.
  8761. (sendRequest): Removed.
  8762. (sendPiece): Removed.
  8763. (sendPieceHeader): Removed.
  8764. (sendPieceData): Removed.
  8765. (sendMessage): New function.
  8766. (sendCancel): Removed.
  8767. * src/PeerInteractionCommand.cc
  8768. (PeerInteractionCommand): Call setUploadLimit.
  8769. (executeInternal): Call setUploadLimit.
  8770. Added the handling of "inProgress" state of handshake message.
  8771. Call sendBitfield() or sendAllowdFast() instead of deprecated
  8772. sendNow().
  8773. (keepAlive): Call addMessage and sendMessage instead of deprecated
  8774. sendNow().
  8775. (beforeSocketCheck): Call addMessage instead of deprecated trySendNow()
  8776. * src/TorrentMan.h
  8777. (PEER_ID_LENGTH): New definition.
  8778. (hasAllPieces): New function.
  8779. * src/TorrentMan.cc
  8780. (getMissingPiece): Added the handling of fast extension.
  8781. (cancelPiece): Call updatePiece().
  8782. (hasAllPieces): New function.
  8783. * src/PeerInteraction.h
  8784. (fastSet): New variable.
  8785. (getNewPieceAndSendInterest): Changed the return type to void.
  8786. (send): Renamed as sendMessages.
  8787. (deleteAllRequestSlot): Removed.
  8788. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8789. (cancelAllRequest): Removed all overloaded functions.
  8790. (deleteAllRequestSlot): Removed.
  8791. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8792. (rejectPieceMessageInQueue): New function.
  8793. (rejectAllPieceMessageInQueue): New function.
  8794. (onChoked): New function.
  8795. (isSendingMessageInProgress): New function.
  8796. (getCorrespondingRequestSlot): Changed its arguments.
  8797. (isInFastSet): New function.
  8798. (addFastSetIndex): New function.
  8799. (addRequests): New function.
  8800. (sendNow): Removed.
  8801. (trySendNow): Removed.
  8802. (sendBitfield): New function.
  8803. (sendAllowdFast): New function.
  8804. (createHaveAllMessage): New function.
  8805. (createHaveNoneMessage): New function.
  8806. (createRejectMessage): New function.
  8807. (createAllowedFastMessage): New function.
  8808. * src/PeerInteraction.cc
  8809. (send): Renamed as sendMessages.
  8810. (sendMessages): New function.
  8811. (MsgPushBack): New class.
  8812. (isSendingMessageInProgress): New function.
  8813. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8814. (rejectAllPieceMessageInQueue): New function.
  8815. Added the handling of fast extension.
  8816. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8817. (rejectPieceMessageInQueue): New function.
  8818. Added the handling of fast extension.
  8819. (deleteRequestSlot): Replaced for loop with std::find.
  8820. (onChoked): New function.
  8821. (deleteAllRequestSlot): Removed.
  8822. (abortPiece): Rewirtten.
  8823. (deleteTimeoutRequestSlot): Updated log messages.
  8824. (getCorrespondingRequestSlot): Changed its arguments.
  8825. (cancelAllRequest): Removed all overloaded functions.
  8826. (receiveHandshake): Added the check to see whether an incoming peer
  8827. supports fast extension.
  8828. (createHandshakeMessage): Use HandshakeMessage::create instead of
  8829. PeerMessageUtil.
  8830. (createPeerMessage): Use create() of each message class instead of
  8831. PeerMessageUtil.
  8832. HaveAllMessage, HaveNoneMessage, RejectMessage, SuggestPieceMessage,
  8833. AllowedFastMessage were added.
  8834. (getNewPieceAndSendInterest): Changed its return value type to void.
  8835. Added the handling of fast extension.
  8836. (addRequests): New function.
  8837. (sendNow): Removed.
  8838. (sendHandshake): Rewritten.
  8839. (trySendNow): Removed.
  8840. (sendBitfield): New function.
  8841. (sendAllowdFast): New function.
  8842. (isInFastSet): New function.
  8843. (addFastSetIndex): New function.
  8844. (createRequestMessage): Use RequestMessage::create instead of
  8845. PeerMessageUtil.
  8846. (createCancelMessage): Use CancelMessage::create instead of
  8847. PeerMessageUtil.
  8848. (createPieceMessage): Use PieceMessage::create instead of
  8849. PeerMessageUtil.
  8850. (createHaveMessage): Use HaveMessage::create instead of
  8851. PeerMessageUtil.
  8852. (createChokeMessage): Use ChokeMessage::create instead of
  8853. PeerMessageUtil.
  8854. (createUnchokeMessage): Use UnchokeMessage::create instead of
  8855. PeerMessageUtil.
  8856. (createInterestedMessage): Use InterestedMessage::create instead of
  8857. PeerMessageUtil.
  8858. (createNotInterestedMessage): Use NotInterestedMessage::create instead
  8859. of PeerMessageUtil.
  8860. (createBitfieldMessage): Use BitfieldMessage::create instead of
  8861. PeerMessageUtil.
  8862. (createKeepAliveMessage): Use KeepAliveMessage::create instead of
  8863. PeerMessageUtil.
  8864. (createHaveAllMessage): New function.
  8865. (createHaveNoneMessage): New function.
  8866. (createRejectMessage): New function.
  8867. (createAllowedFastMessage: New function.
  8868. * src/Util.h
  8869. (sha1Sum): New function.
  8870. (computeFastSet): New function.
  8871. * src/Util.cc
  8872. (sha1Sum): New function.
  8873. (computeFastSet): New function.
  8874. * src/Peer.h
  8875. (fastExtensionEnabled): New variable.
  8876. (fastSet): New variable.
  8877. (setAllBitfield): New function.
  8878. (setFastExtensionEnabled): New function.
  8879. (isFastExtensionEnabled): New function.
  8880. (addFastSetIndex): New function.
  8881. (getFastSet): New function.
  8882. (isInFastSet): New function.
  8883. (countFastSet): New function.
  8884. * src/Peer.cc
  8885. (isInFastSet): New function.
  8886. (addFastSetIndex): New function.
  8887. (setAllBitfield): New function.
  8888. * src/AbstractCommand.cc (execute): Changed the procedure of checking
  8889. sockets.
  8890. * src/PeerAbstractCommand.cc
  8891. (PeerAbstractCommand): Added the initialization for uploadLimitCheck
  8892. and uploadLimit.
  8893. (execute): Changed the procedure of checking sockets. The upload speed
  8894. checking were added.
  8895. (setUploadLimit): New function.
  8896. (setUploadLimitCheck): New function.
  8897. * src/PeerAbstractCommand.h
  8898. (setUploadLimit): New function.
  8899. (setUploadLimitCheck): New function.
  8900. (uploadLimit): New variable.
  8901. (uploadLimitCheck): New variable.
  8902. To contact a tracker regularly:
  8903. * src/TrackerWatcherCommand.h (interval): New variable.
  8904. (checkPoint): New variable.
  8905. (TrackerWatcherCommand): Added interval argument.
  8906. * src/TrackerWatcherCommand.cc
  8907. (TrackerWatcherCommand): Initialized checkPoint.
  8908. (execute): Now a tracker is contacted in every specified period.
  8909. If peer list is not needed, send request with numwant=0.
  8910. * src/TrackerUpdateCommand.cc
  8911. (execute): Updated log messages.
  8912. * src/DownloadEngine.cc
  8913. (~DownloadEngine): Removed two asserts.
  8914. (waitData): Uncommented wfds. May be a bug fix.
  8915. 2006-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8916. * src/PeerInteractionCommand.h
  8917. (checkInactiveConnection): Removed.
  8918. * src/PeerInteractionCommand.cc
  8919. (executeInternal): Removed following function calls:
  8920. detectMessageFlooding(), checkLongTimePeerChoking and
  8921. checkInactiveConnection().
  8922. (checkInactiveConnection): Removed.
  8923. (detectMessageFlooding): Removed function call to
  8924. checkInactiveConnection().
  8925. * src/PeerMessageUtil.h
  8926. (createChokeMessage): New function. Overload.
  8927. (createUnchokeMessage): New function. Overload.
  8928. (createInterestedMessage): New function. Overload.
  8929. (createNotInterestedMessage): New function. Overload.
  8930. (createHaveMessage): New function. Overload.
  8931. (createBitfieldMessage): New function. Overload.
  8932. (createRequestMessage): New function. Overload.
  8933. (createCancelMessage): New function. Overload.
  8934. (createPieceMessage): New function. Overload.
  8935. (createKeepAliveMessage): New function. Overload.
  8936. * src/PeerMessageUtil.cc
  8937. (createChokeMessage): New function. Overload.
  8938. (createUnchokeMessage): New function. Overload.
  8939. (createInterestedMessage): New function. Overload.
  8940. (createNotInterestedMessage): New function. Overload.
  8941. (createHaveMessage): New function. Overload.
  8942. (createBitfieldMessage): New function. Overload.
  8943. (createRequestMessage): New function. Overload.
  8944. (createCancelMessage): New function. Overload.
  8945. (createPieceMessage): New function. Overload.
  8946. (createKeepAliveMessage): New function. Overload.
  8947. * src/SendMessageQueue.cc
  8948. (createRequestMessage): Use PeerMessageUtil.
  8949. (createCancelMessage): Use PeerMessageUtil.
  8950. (createPieceMessage): Use PeerMessageUtil.
  8951. (createHaveMessage): Use PeerMessageUtil.
  8952. (createChokeMessage): Use PeerMessageUtil.
  8953. (createUnchokeMessage): Use PeerMessageUtil.
  8954. (createInterestedMessage): Use PeerMessageUtil.
  8955. (createNotInterestedMessage): Use PeerMessageUtil.
  8956. (createBitfieldMessage): Use PeerMessageUtil.
  8957. (createKeepAliveMessage): Use PeerMessageUtil.
  8958. * src/SendMessageQueue.h: Renamed to PeerInteraction.h
  8959. * src/SendMessageQueue.cc: Renamed to PeerInteraction.cc
  8960. * src/PeerInteraction.h: New class.
  8961. * src/PeerInteraction.cc: New class.
  8962. 2006-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8963. Each peer message has its own class.
  8964. * src/PendingMessages.h: Removed.
  8965. * src/PendingMessages.cc: Removed. The sending process was moved to
  8966. each message class.
  8967. * src/RequestSlotMan.h: Removed.
  8968. * src/RequestSlotMan.cc: Removed. All functionarities were moved to
  8969. SendMessageQueue.
  8970. * src/RequestMessage.h: New class.
  8971. * src/RequestMessage.cc: New class.
  8972. * src/CancelMessage.h: New class.
  8973. * src/CancelMessage.cc: New class.
  8974. * src/BitfieldMessage.h: New class.
  8975. * src/BitfieldMessage.cc: New class.
  8976. * src/ChokeMessage.h: New class.
  8977. * src/ChokeMessage.cc: New class.
  8978. * src/KeepAliveMessage.h: New class.
  8979. * src/KeepAliveMessage.cc: New class.
  8980. * src/PortMessage.h: New class.
  8981. * src/UnchokeMessage.h: New class.
  8982. * src/UnchokeMessage.cc: New class.
  8983. * src/PieceMessage.h: New class.
  8984. * src/PieceMessage.cc: New class.
  8985. * src/HaveMessage.h: New class.
  8986. * src/HaveMessage.cc: New class.
  8987. * src/BitfieldMessage.h: New class.
  8988. * src/BitfieldMessage.cc: New class.
  8989. * src/NotInterestedMessage.h: New class.
  8990. * src/NotInterestedMessage.cc: New class.
  8991. * src/InterestedMessage.h: New class.
  8992. * src/InterestedMessage.cc: New class.
  8993. * src/HandshakeMessage.h (sendMessageQueue): New variable.
  8994. (getSendMessageQueue): New function.
  8995. (setSendMessageQueue): New function.
  8996. * src/HandshakeMessage.cc: New class.
  8997. * src/PeerConnection.h (receiveMessage): Changed return value and
  8998. arguments.
  8999. (receiveHandshake): Changed return value and arguments.
  9000. * src/PeerConnection.cc (receiveMessage): Do not create message class
  9001. here.
  9002. (receiveHandshake): Do not create handshake class here.
  9003. * src/PeerInteractionCommand.h (peerConnection): Removed.
  9004. (piece): Removed.
  9005. (syncPiece): Removed.
  9006. (sendInterest): Removed.
  9007. (sendMessages): Removed.
  9008. (createRequestPendingMessage): Removed.
  9009. (checkPieceHash): Removed.
  9010. (erasePieceOnDisk): Removed.
  9011. (getNewPieceAndSendInterest): Removed.
  9012. (onGotNewPice): Removed.
  9013. (onGotWrongPiece): Removed.
  9014. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  9015. Removed peerConnection, piece.
  9016. (~PeerInteractionCommand): Removed peerConnection.
  9017. (executeInternal): Use sendMessageQueue instead of peerConnection.
  9018. (syncPiece): Moved to SendMessageQueue.
  9019. (decideChoking): Removed PendingMessage.
  9020. (receiveMessage): Use sendMessageQueue instead of peerConnection.
  9021. The action after receiving peer message was moved to each message
  9022. class.
  9023. (onGotNewPice): Moved to SendMessageQueue.
  9024. (onGotWrongPiece): Moved to SendMessageQueue.
  9025. (getNewPieceAndSendInterest): Moved to SendMessageQueue.
  9026. (sendInterest): Moved to SendMessageQueue.
  9027. (createRequestPendingMessage): Removed.
  9028. (sendMessages): Moved to SendMessageQueue.
  9029. (onAbort): Use SendMessageQueue::abortPiece()
  9030. (keepAlive): Use sendMessageQueue instead of peerConnection.
  9031. (beforeSocketCheck): Use sendMessageQueue instead of peerConnection.
  9032. (checkPieceHash): Moved to SendMessageQueue.
  9033. (erasePieceOnDisk): Moved to SendMessageQueue.
  9034. * src/PeerMessageUtil.h
  9035. (createBitfieldMessage): Removed.
  9036. (createHaveMessage): Changed return value and arguments.
  9037. (createBitfieldMessage): Changed return value and arguments.
  9038. (createRequestCancelMessage): Removed.
  9039. (createPieceMessage): Changed return value and arguments.
  9040. (getShortIntParam): New function.
  9041. (checkIndex): Changed arguments.
  9042. (checkBegin): Changed arguments.
  9043. (checkLength): Changed arguments.
  9044. (checkPieceOffset): Removed.
  9045. (checkRange): New function.
  9046. (checkBitfield): Changed arguments.
  9047. (createPeerMessage): Removed.
  9048. (checkIntegrity): Removed.
  9049. (createHandshakeMessage): Changed arguments.
  9050. (createChokeMessage): New function.
  9051. (createUnchokeMessage): New function.
  9052. (createInterestedMessage): New function.
  9053. (createNotInterestedMessage): New function.
  9054. (createRequestMessage): New function.
  9055. (createCancelMessage): New function.
  9056. (createPortMessage): New function.
  9057. * src/PeerMessageUtil.cc
  9058. (createBitfieldMessage): Removed.
  9059. (createHaveMessage): Changed return value and arguments.
  9060. (createBitfieldMessage): Changed return value and arguments.
  9061. (createRequestCancelMessage): Removed.
  9062. (createPieceMessage): Changed return value and arguments.
  9063. (getShortIntParam): New function.
  9064. (checkIndex): Changed arguments.
  9065. (checkBegin): Changed arguments.
  9066. (checkLength): Changed arguments.
  9067. (checkPieceOffset): Removed.
  9068. (checkRange): New function.
  9069. (checkBitfield): Changed arguments.
  9070. (createPeerMessage): Removed.
  9071. (checkIntegrity): Removed.
  9072. (createHandshakeMessage): Changed arguments.
  9073. (createChokeMessage): New function.
  9074. (createUnchokeMessage): New function.
  9075. (createInterestedMessage): New function.
  9076. (createNotInterestedMessage): New function.
  9077. (createRequestMessage): New function.
  9078. (createCancelMessage): New function.
  9079. (createPortMessage): New function.
  9080. * src/PeerMessage.h
  9081. (id): Removed.
  9082. (index): Removed.
  9083. (begin): Removed.
  9084. (length): Removed.
  9085. (bitfield): Removed.
  9086. (bitfieldLength): Removed.
  9087. (block): Removed.
  9088. (blockLength): Removed.
  9089. (inProgress): New variable.
  9090. (cuid): New variable.
  9091. (peer): New variable.
  9092. (sendMessageQueue): New variable.
  9093. (logger): New variable.
  9094. (setBitfield): Removed.
  9095. (getBitfield): Removed.
  9096. (setBlock): Removed.
  9097. (getBlock): Removed.
  9098. (getBitfieldLength): Removed.
  9099. (getBlockLength): Removed.
  9100. (isInProgress): New function.
  9101. (toString): Made pure virtual.
  9102. (check): New function.
  9103. (send): New function.
  9104. (receivedAction): New function.
  9105. (getId): Made pure virtual.
  9106. (setId): Removed.
  9107. (getIndex): Removed.
  9108. (setIndex): Removed.
  9109. (getBegin): Removed.
  9110. (setBegin): Removed.
  9111. (getLength): Removed.
  9112. (setLength): Removed.
  9113. (getCuid): New function.
  9114. (setCuid): New function.
  9115. (getPeer): New function.
  9116. (setPeer): New function.
  9117. (getSendMessageQueue): New function.
  9118. (setSendMessageQueue): New function.
  9119. (ID): Removed.
  9120. * src/PeerMessage.cc
  9121. (setBitfield): Removed.
  9122. (setBlock): Removed.
  9123. (toString): Removed.
  9124. * src/TorrentMan.h
  9125. (getPieceLength): New function.
  9126. (getPieceLength): New function.
  9127. * src/SendMessageQueue.h
  9128. (REQUEST_TIME_OUT): New definition.
  9129. (RequestSlots): New definition.
  9130. (MessageQueue): New definition.
  9131. (requestSlotMan): Removed.
  9132. (pendingMessages): Removed.
  9133. (requestSlots): New variable.
  9134. (messageQueue): New variable.
  9135. (torrentMan): New variable.
  9136. (peerConnection): New variable.
  9137. (peer): New variable.
  9138. (piece): New variable.
  9139. (getNewPieceAndSendInterest): New function.
  9140. (createPeerMessage): New function.
  9141. (createHandshakeMessage): New function.
  9142. (send): Made private.
  9143. (setPeerMessageCommonProperty): New function.
  9144. (deleteAllRequestSlot): New function.
  9145. (deleteRequestMessageInQueue): New function.
  9146. (cancelAllRequest): Made private.
  9147. (cancelAllRequest): Made private.
  9148. (countRequestSlot): Made private.
  9149. (addPendingMessage): Removed.
  9150. (deletePendingPieceMessage): Removed.
  9151. (deletePendingRequestMessage): Removed.
  9152. (addMessage): New function.
  9153. (deletePieceMessageInQueue): New function.
  9154. (deleteTimeoutRequestSlot): Changed argument.
  9155. (deleteCompletedRequestSlot): Changed argument.
  9156. (getCorrespoindingRequestSlot): Renamed to getCorrespondingRequestSlot.
  9157. (getCorrespondingRequestSlot): New function.
  9158. (countPendingMessage): Removed.
  9159. (countMessageInQueue): New function.
  9160. (getTorrentMan): New function.
  9161. (getPeerConnection): New function.
  9162. (hasDownloadPiece): New function.
  9163. (getDownloadPiece): New function.
  9164. (setDownloadPiece): New function.
  9165. (syncPiece): New function.
  9166. (sendMessages): New function.
  9167. (sendNow): New function.
  9168. (trySendNow): New function.
  9169. (abortPiece): New function.
  9170. (sendHandshake): New function.
  9171. (receiveMessage): New function.
  9172. (receiveHandshake): New function.
  9173. (createRequestMessage): New function.
  9174. (createCancelMessage): New function.
  9175. (createPieceMessage): New function.
  9176. (createHaveMessage): New function.
  9177. (createChokeMessage): New function.
  9178. (createUnchokeMessage): New function.
  9179. (createInterestedMessage): New function.
  9180. (createNotInterestedMessage): New function.
  9181. (createBitfieldMessage): New function.
  9182. (createKeepAliveMessage): New function.
  9183. * src/SendMessageQueue.cc
  9184. (SendMessageQueue): Removed requestSlotMan.
  9185. Instantiated peerConnection here.
  9186. (~SendMessageQueue): Removed requestSlotMan.
  9187. Added deletion of peerConnection and the contents of messageQueue.
  9188. (send): Updated according to the change of messageQueue.
  9189. (addPendingMessage): Renamed to addMessage.
  9190. (addMessage): New function.
  9191. (deletePendingPieceMessage): Renamed to deletePieceMessageInQueue.
  9192. (deletePieceMessageInQueue): New function.
  9193. (deletePendingRequestMessage): Renamed to deleteRequestMessageInQueue.
  9194. (deleteRequestMessageInQueue): New function.
  9195. (deleteRequestSlot): RequestSlotMan::deleteRequestSlot(...) was moved
  9196. here.
  9197. (deleteTimeoutRequestSlot): RequestSlotMan::deleteTimeoutRequestSlot
  9198. (...) was moved here.
  9199. (deleteAllRequestSlot): RequestSlotMan::deleteAllRequestSlot(...) was
  9200. moved here.
  9201. (deleteCompletedRequestSlot):
  9202. RequestSlotMan::deleteCompletedRequestSlot(...) was moved here.
  9203. (getCorrespondingRequestSlot):
  9204. RequestSlotMan::getCorrespoindingRequestSlot(...) was moved here.
  9205. And renamed to getCorrespondingRequestSlot, correcting a typo.
  9206. (countPendingMessage): Renamed to countMessageInQueue.
  9207. (countMessageInQueue): New function.
  9208. (countRequestSlot): RequestSlotMan::countRequestSlot() was moved here.
  9209. (receiveHandshake): New function.
  9210. (createHandshakeMessage): New function.
  9211. (receiveMessage): New function.
  9212. (createPeerMessage): New function.
  9213. (syncPiece): New function.
  9214. (getNewPieceAndSendInterest): New function.
  9215. (sendMessages): New function.
  9216. (sendNow): New function.
  9217. (trySendNow): New function.
  9218. (sendHandshake): New function.
  9219. (abortPiece): New function.
  9220. (getDownloadPiece): New function.
  9221. (getPeerMessageCommonProperty): New function.
  9222. (createRequestMessage): New function.
  9223. (createCancelMessage): New function.
  9224. (createPieceMessage): New function.
  9225. (createHaveMessage): New function.
  9226. (createChokeMessage): New function.
  9227. (createUnchokeMessage): New function.
  9228. (createInterestedMessage): New function.
  9229. (createNotInterestedMessage): New function.
  9230. (createBitfieldMessage): New function.
  9231. (createKeepAliveMessage): New function.
  9232. To add simple Content-Disposition support:
  9233. * src/HttpResponseCommand.h (determinFilename): New function.
  9234. * src/HttpResponseCommand.cc (executeInternal):
  9235. Use determinFilename(headers) instead of req->getFile() when comparing
  9236. filename.
  9237. (determinFilename): New function.
  9238. (handleDefaultEncoding): Use determinFilename(headers) instead of
  9239. req->getFile().
  9240. (handleOtherEncoding): Use determinFilename(headers) instead of
  9241. req->getFile().
  9242. * src/Util.h (getContentDispositionFilename): New function.
  9243. * src/Util.cc (getContentDispositionFilename): New function.
  9244. * src/LogFactory.h (release): New function.
  9245. * src/LogFactory.cc (release): New function.
  9246. To fix a bug that causes out-of-bound exception when HTTP status
  9247. line is wrong:
  9248. * src/HttpConnection.cc (receiveResponse): Added a check for header
  9249. size.
  9250. * src/common.h (Deleter): New class.
  9251. * src/SegmentMan.cc
  9252. (~SegmentMan): Added deletion of splitter and diskWriter.
  9253. * src/DownloadEngine.h
  9254. (Commands): Use deque.
  9255. (clearQueue): New function.
  9256. * src/DownloadEngine.cc
  9257. (~DownloadEngine): Added deletion of segmentMan.
  9258. (cleanQueue): New function.
  9259. * src/TorrentDownloadEngine.h
  9260. (TorrentDownloadEngine): The implementation was moved to
  9261. TorrentDownloadEngine.cc.
  9262. (~TorrentDownloadEngine): The implementation was moved to
  9263. TorrentDownloadEngine.cc.
  9264. * src/TorrentDownloadEngine.cc
  9265. (~TorrentDownloadEngine): Added deletion of torrentMan.
  9266. * src/main.cc
  9267. (clearRequest): Removed.
  9268. (handler): Added deletion of e.
  9269. (torrentHandler): Added deletion of te.
  9270. (main): Do not share splitter.
  9271. Use Deleter instead of clearRequest.
  9272. Deletion of classes were updated.
  9273. 2006-05-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9274. * src/main.cc (main): Fixed typo.
  9275. * src/message.h: Fixed typo.
  9276. * po/de.po: Added German translation, thanks to Hermann J. Beckers.
  9277. 2006-04-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9278. To add --select-file command-line option:
  9279. * src/Util.cc
  9280. (unfoldRange): New function.
  9281. (getNum): New function.
  9282. (unfoldSubRange): New function
  9283. * src/main.cc
  9284. (showUsage): Added help message.
  9285. (main): Added --select-file command-line option. Updated the layout of
  9286. file listing.
  9287. * src/common.h
  9288. (Integers): New definition.
  9289. * src/SocketCore.cc
  9290. (writeData): Removed timeout argument.
  9291. (readData): Removed timeout argument.
  9292. (peekData): Removed timeout argument.
  9293. * src/Socket.cc
  9294. (writeData): Removed timeout argument.
  9295. (readData): Removed timeout argument.
  9296. (peekData): Removed timeout argument.
  9297. * Release 0.4.1
  9298. 2006-04-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9299. To deploy upload rate based choking algorithm:
  9300. * src/PeerInteractionCommand.cc
  9301. (PeerInteractionCommand): Add peer to TorrentMan::activePeers to track
  9302. peer currently used.
  9303. (decideChoking): Deleted the choke/unchoke decision algorithm when
  9304. download completes. Simplified.
  9305. (receiveMessage): Updated.
  9306. * src/TorrentMan.h
  9307. (activePeers): New variable.
  9308. (addActivePeer): New function.
  9309. (getActivePeers): New function.
  9310. (deleteActivePeer): New function.
  9311. * src/TorrentMan.cc
  9312. (addPeer): deleteOldErrorPeers is moved to the begining of the function
  9313. * src/PeerAbstractCommand.cc
  9314. (onAbort): Use peer->resetStatus().
  9315. * src/main.cc
  9316. (PeerChokeCommand.h): Included.
  9317. (main): Added the instance of ChokingCommand to the command queue.
  9318. * src/Peer.h
  9319. (amChoking): Renamed from amChocking
  9320. (chokingRequired): New variable.
  9321. (optUnchoking): New variable.
  9322. (deltaUpload): New variable.
  9323. (deltaDownload): New variable.
  9324. (addDeltaUpload): New function.
  9325. (resetDeltaUpload): New function.
  9326. (addDeltaDownload): New function.
  9327. (resetDeltaDownload): New function.
  9328. (addPeerUpload): Added a call to addDeltaUpload.
  9329. (addPeerDownload): Added a call to addDeltaDownload.
  9330. * src/Peer.cc
  9331. (shouldBeChoking): Renamed from shouldChoke.
  9332. (resetStatus): New function.
  9333. * src/PeerChokeCommand.h: New class.
  9334. * src/PeerChokeCommand.cc: New class.
  9335. To add lazy upload speed limiter:
  9336. * src/TorrentConsoleDownloadEngine.h: Moved the variables for
  9337. statistics calculation to TorrentDownloadEngine.
  9338. * src/TorrentConsoleDownloadEngine.cc
  9339. (sendStatistics): Renamed from printStatistics.
  9340. (initStatistics): Removed. Moved to TorrentDownloadEngine.
  9341. (calculateSpeed): Removed. Moved to TorrentDownloadEngine.
  9342. (calculateStatistics): Removed. Moved to TorrentDownloadEngine.
  9343. * src/TorrentDownloadEngine.h: Added the variables for statistics
  9344. calculation.
  9345. (sendStatistics): New function as pure virtual function.
  9346. (getUploadSpeed): New function.
  9347. * src/TorrentDownloadEngine.cc
  9348. (initStatistics): New function.
  9349. (calculateSpeed): New function.
  9350. (calculateStatistics): New function.
  9351. * src/SendMessageQueue.h
  9352. (uploadLength): New variable.
  9353. (send): Added an argument.
  9354. (setUploadLimit): New function.
  9355. (getUploadLimit): New function.
  9356. * src/SendMessageQueue.cc
  9357. (send): Added upload speed limiter.
  9358. * src/prefs.h
  9359. (PREF_UPLOAD_LIMIT): New definition.
  9360. * src/PeerInteractionCommand.cc
  9361. (PeerInteractionCommand): Set upload speed limit to sendMessageQueue.
  9362. * src/main.cc
  9363. (main): Added --upload-limit option
  9364. For bug fixes:
  9365. * src/main.cc
  9366. (showUsage): Corrected --listen-port help
  9367. Other changes:
  9368. * src/TorrentMan.cc
  9369. (getPeer): Return nullPeer if connection is grather than
  9370. MAX_PEER_UPDATE(15) in order to leave space for incoming peers.
  9371. 2006-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9372. To add some useful information to the exception message:
  9373. * src/SocketCore.cc : Updated messages.
  9374. * src/SegmentMan.cc :
  9375. * src/TorrentMan.cc : Updated messages.
  9376. * src/MultiDiskWriter.cc : Updated messages.
  9377. * src/Util.cc : Updated messages.
  9378. * src/AbstractDiskWriter.cc : Updated messages.
  9379. * src/PreAllocationDiskWriter.cc : Updated messages.
  9380. * src/message.cc : Added new messages. Updated some messages.
  9381. * src/TrackerWatcherCommand.h (MIN_PEERS): New definition.
  9382. * src/TrackerWatcherCommand.cc (execute): Use MIN_PEERS.
  9383. Updated threshold from 30 to 15.
  9384. * src/AbstractDiskWriter.h (filename): New variable.
  9385. * src/AbstractDiskWriter.cc (openExistingFile): Assigned filename.
  9386. (createFile): Assigned filename.
  9387. * src/main.cc: Updated the help message for http-auth-scheme.
  9388. * Release 0.4.0
  9389. 2006-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9390. To add TrackerUpdateCommand with which replaces
  9391. CompactTrackerResponseProcessor:
  9392. * src/TrackerWatcherCommand.h (req): Removed.
  9393. * src/TrackerWatcherCommand.cc (execute): Send a request to tracker
  9394. if the number of peer connections are less than 30.
  9395. * src/ByteArrayDiskWriter.h (readData): Implemented.
  9396. * src/SegmentMan.h (diskWriter): New function.
  9397. * src/SegmentMan.cc (init): Added a call to diskWriter->closeFile()
  9398. * src/main.cc : Removed #include "CompactTrackerResponseProcessor.h"
  9399. (main): Use TrackerUpdateCommand.
  9400. * src/TorrentMan.h (CompactTrackerResponseProcessor): Removed.
  9401. (req): New variable.
  9402. (setTrackerResponseProcessor): Removed.
  9403. (getTrackerResponseProcessor): Removed.
  9404. (processTrackerResponse): Removed.
  9405. * src/DownloadEngine.h (diskWriter): Removed.
  9406. * src/TorrentDownloadEngine.cc (afterEachIteration): Removed a call
  9407. to torrentMan->processTrackerResponse().
  9408. To add Util::expandBuffer:
  9409. * src/ByteArrayDiskWriter.h (expandBuffer): Removed.
  9410. * src/ByteArrayDiskWriter.cc (writeData): Use Util::expandBuffer().
  9411. * src/Util.h (expandBuffer): New function.
  9412. To fix the bug that causes segmentation fault when "-l ." is specified
  9413. in command-line option:
  9414. * src/SimpleLogger.h (SimpleLogger): Removed "filename" argument.
  9415. (openFile): New function.
  9416. (closeFile): New function.
  9417. * src/SimpleLogger.cc (SimpleLogger): Removed fopen.
  9418. (~SimpleLogger): Call closeFile();
  9419. * src/LogFactory.cc (getInstance): Added a call to slogger->openFile().
  9420. * src/main.cc (main): Added a check to see logger is configured
  9421. properly.
  9422. To enable HTTP authentication without specifying "--http-auth-scheme"
  9423. * src/prefs.h (PREF_HTTP_AUTH_ENABLED): New definition.
  9424. * src/HttpConnection.cc (createRequest): Send Authorization header
  9425. if PREF_HTTP_AUTH_ENABLED == V_TRUE.
  9426. * src/main.cc (main): Preset PREF_HTTP_AUTH_SCHEME to V_TRUE
  9427. If "--http-user" is specified, set PREF_HTTP_AUTH_ENABLED to V_TRUE
  9428. * src/Peer.cc (shouldChoke): Updated algorithm.
  9429. * src/message.h (EX_AUTH_FAILED): New definition.
  9430. (EX_FILE_OPEN): New definition.
  9431. * src/HttpResponseCommand.cc (checkResponse): Throw DlAbortEx
  9432. if status == 401.
  9433. (handleDefaultEncoding): Added a call to diskWriter->initAndOpenFile()
  9434. if req->isTorrent == true.
  9435. * src/main.cc (handler): Removed the check to see e->diskWriter != NULL
  9436. (torrentHandler): Removed the check to see diskAdaptor != NULL.
  9437. * src/AbstractDiskWriter.cc (openExistingFile): Updated messsage.
  9438. (createFile): Updated message.
  9439. 2006-04-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9440. To add a readout of estimated remaining time to normal HTTP/FTP
  9441. downloads:
  9442. * src/ConsoleDownloadEngine.h (startup): New variable.
  9443. (startupLength): New variable.
  9444. (isStartupLengthSet): New variable.
  9445. (avgSpeed): New variable.
  9446. (eta): New variable.
  9447. * src/ConsoleDownloadEngine.cc (sendStatistics): Added a readout of
  9448. estimated remaining time.
  9449. (initStatistics): Initialized newly added variables.
  9450. (calculateStatistics): Calculate average speed and estimated remaining
  9451. time.
  9452. To decouple TorrentDownloadEngine from HttpResponseCommand:
  9453. * src/TrackerDownloadCommand.h: Removed.
  9454. * src/TrackerDownloadCommand.cc: Removed.
  9455. * src/TrackerInitCommand.h: Removed.
  9456. * src/TrackerInitCommand.cc: Removed.
  9457. * src/TrackerUpdateCommand.h: Removed.
  9458. * src/TrackerUpdateCommand.cc: Removed.
  9459. * src/TrackerWatcherCommand.cc (execute): The construction of request
  9460. url written in TrackerInitCommand was moved here. Do not create
  9461. tracker request command if torrentMan->trackers != 0.
  9462. * src/CompactTrackerResponseProcessor.h: New class.
  9463. * src/CompactTrackerResponseProcessor.cc: New class.
  9464. * src/message.h (MSG_TRACKER_WARNING_MESSAGE): Updated.
  9465. * src/HttpResponseCommand.cc (createHttpDownloadCommand):
  9466. Decoupled TorrentDownloadEngine from this.
  9467. * src/SegmentMan.h (init): New function.
  9468. * src/SegmentMan.cc (init): New function.
  9469. * src/TorrentMan.h (responseProcessor): New variable.
  9470. (trackers): New variable.
  9471. (setTrackerResponseProcessor): New function.
  9472. (getTrackerResponseProcessor): New function.
  9473. (processTrackerResponse): New function.
  9474. * src/TorrentMan.cc (Constructor): Initialized new variable trackers.
  9475. (processTrackerResponse): New function.
  9476. * src/main.cc (main): Use ByteArrayDiskWriter and
  9477. CompactTrackerResponseProcessor.
  9478. * src/TorrentDownloadEngine.cc (afterEachIteration): Call torrentMan->
  9479. processTrackerResponse().
  9480. * src/TorrentConsoleDownloadEngine.cc (printStatistics): Updated a
  9481. readout.
  9482. * src/TorrentDownloadEngine.cc (afterEachIteration): Added log message
  9483. which indicates download has completed.
  9484. * src/AbstractDiskWriter.cc (Destructor): fd >= 0, not fd >0
  9485. (closeFile): fd >= 0, not fd > 0
  9486. * src/main.cc (main): Added short cut for show-files.
  9487. Added short cut for torrent-file.
  9488. Added new command-line option listen-port.
  9489. Updated i18n messages.
  9490. 2006-04-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9491. To add LogFactory which creates singleton logger:
  9492. * src/LogFactory.h: New class.
  9493. * src/LogFactory.cc: New class.
  9494. * src/Command.h (logger): New variable.
  9495. (Constructor): Use LogFactory.
  9496. * src/AbstractCommand.cc: Use Command::logger
  9497. * src/PeerConnection.cc (Constructor): Deleted the argument logger.
  9498. Use LogFactory.
  9499. * src/SegmentSplitter.h : Made logger protected.
  9500. * src/SegmentSplitter.cc (Constructor): Use LogFactory.
  9501. * src/SegmentMan.cc (Constructor): Use LogFactory.
  9502. * src/DownloadEngine.h : Made logger protected.
  9503. * src/DownloadEngine.cc (Constructor): Use LogFactory.
  9504. * src/PeerInteractionCommand.cc : Use Command::logger.
  9505. * src/HttpResponseCommand.cc : Use Command::logger.
  9506. * src/SegmentMan.h : Made logger private.
  9507. * src/TorrentMan.h : Made logger private.
  9508. * src/TorrentMan.cc : Use LogFactory.
  9509. * src/FtpNegotiateCommand.cc : Use Command::logger.
  9510. * src/HttpConnection.h (Constructor): Deleted the argument logger.
  9511. * src/HttpConnection.cc (Constructor): Deleted the argument logger.
  9512. Use LogFactory.
  9513. * src/FtpConnection.h (Constructor): Deleted the argument logger.
  9514. * src/FtpConnection.cc (Constructor): Deleted the argument logger.
  9515. Use LogFactory.
  9516. * src/DownloadCommand.cc : Use Command::logger.
  9517. * src/PeerAbstractCommand.cc : Use Command::logger.
  9518. * src/PeerListenCommand.cc : Use Command::logger.
  9519. * src/PeerInitiateConnectionCommand.cc : Use Command::logger.
  9520. * src/HttpInitiateConnectionCommand.cc : Use Command::logger.
  9521. * src/FtpInitiateConnectionCommand.cc : Use Command::logger.
  9522. * src/TrackerWatcherCommand.cc : Use Command::logger.
  9523. * src/TrackerUpdateCommand.cc : Use Command::logger.
  9524. * src/TrackerDownloadCommand.cc : Use Command::logger.
  9525. * src/RequestSlotMan.cc (Constructor): Deleted the argument logger.
  9526. Use LogFactory.
  9527. * src/SendMessageQueue.h (Constructor): Deleted the argument logger.
  9528. * src/SendMessageQueue.cc (Constructor): Deleted the argument logger.
  9529. Use LogFactory.
  9530. * src/main.cc (main): Use LogFactory.
  9531. * src/DiskAdaptor.h (logger): New variable.
  9532. * src/DiskAdaptor.cc (Constructor): Use LogFactory.
  9533. * src/CopyDiskAdaptor.cc (fixFilename): Added a log message.
  9534. 2006-04-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9535. * src/TrackerInitCommand.cc (TrackerInitCommand): Added a "key"
  9536. parameter to a tracker request.
  9537. * src/TorrentMan.cc (readFileEntryFromMetaInfoFile): Bug fix.
  9538. * src/TrackerWatcherCommand.cc (execute): Call req->resetTryCount().
  9539. * src/main.cc (setSignalHander): New function.
  9540. (main): Added a handler for SIGTERM.
  9541. (handler): Updated message.
  9542. (torrentHandler): Updated message.
  9543. 2006-04-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9544. * src/TorrentConsoleDownloadEngine.cc
  9545. (onPartialDownloadingCompletes): Renamed as
  9546. onSelectiveDownloadingCompletes.
  9547. (onSelectiveDownloadingCompletes): Updated message.
  9548. To add DiskAdaptor which abstract DiskWriter family:
  9549. * src/PeerConnection.cc: Use diskAdaptor instead of diskWriter.
  9550. * src/PeerInteractionCommand.cc: Use diskAdaptor instead of diskWriter.
  9551. * src/BitfieldMan.cc (isAllBitSet): bug fix.
  9552. * src/TorrentMan.cc : Included CopyDiskAdaptor.h, DirectDiskAdaptor.h,
  9553. MultiDiskAdaptor.h.
  9554. (readFileEntry): Changed its arguments.
  9555. (setup): setupDiskWriter is merged into this function.
  9556. (setupDiskWriter): Removed.
  9557. (setFileFilter): New function.
  9558. (readFileEntryFromMetaInfoFile): Updated according to the changes
  9559. made in readFileEntry.
  9560. (getFilePath): Removed.
  9561. (getTempFilePath): Removed.
  9562. (getSegmentFilePath): Updated due to the removal of getFilePath.
  9563. (fixFilename): Removed.
  9564. (copySingleFile): Removed.
  9565. (splitMultiFile): Removed.
  9566. (deleteTempFile): Removed.
  9567. (setFileEntriesToDownload): Removed.
  9568. (isPartialDownloadingMode): Renamed as isSelectiveDownloadingMode.
  9569. (isSelectiveDownloadingMode): New function.
  9570. (setAllMultiFileRequestedState): Removed.
  9571. (finishPartialDownloadingMode): Renamed as
  9572. finishSelectiveDownloadingMode.
  9573. (finishSelectiveDownloadingMode): New function.
  9574. (getPartialTotalLength): Renamed as getSelectedTotalLength.
  9575. (getSelectedTotalLength): New function.
  9576. (onDownloadComplete): Use diskAdaptor.
  9577. * src/MultiDiskWriter.cc (Constructor): Added the argument pieceLength
  9578. (Range): Removed.
  9579. (setMultiFileEntries): Renamed as setFileEntries.
  9580. (setFileEntries): New function.
  9581. * src/MultiDiskWriter.h [DiskWriterEntry](enabled): Removed.
  9582. (pieceLength): New variable.
  9583. * src/main.cc (printDownloadCompeleteMessage): New function.
  9584. (torrentHandler): Use diskAdaptor instead of diskWriter.
  9585. (main): Renamed torrent-show-files to show-files.
  9586. Rewritten file contents listing.
  9587. * src/TorrentMan.h (FileEntry): Removed.
  9588. (multiFileTopDir): Removed.
  9589. (multiFileEntries): Removed.
  9590. (diskWriter): Removed.
  9591. (diskAdaptor): New variable.
  9592. * src/DefaultDiskWriter.h (totalLength): New variable.
  9593. * src/DefaultDiskWriter.cc (initAndOpenFile): Added ftruncate.
  9594. * src/TorrentDownloadEngine.cc (onEndOfRun): Use diskAdaptor instead of
  9595. diskWriter.
  9596. * src/TorrentConsoleDownloadEngine.h
  9597. (partialDownloadLengthDiff): Renamed as selectedDownloadLengthDiff.
  9598. (partialTotalLength): Renamed as selectedTotalLength.
  9599. * src/AbstractDiskWriter.cc (openFile): If file exists, call
  9600. openExistingFile, otherwise call initAndOpenFile.
  9601. (closeFile): fd > 0, not fd != 0.
  9602. * src/DirectDiskAdaptor.h: New class.
  9603. * src/DirectDiskAdaptor.cc: New class.
  9604. * src/MultiDiskAdaptor.h: New class.
  9605. * src/MultiDiskAdaptor.cc: New class.
  9606. * src/CopyDiskAdaptor.h: New class.
  9607. * src/CopyDiskAdaptor.cc: New class.
  9608. * src/DiskAdaptor.h: New class.
  9609. * src/DiskAdaptor.cc: New class.
  9610. * src/prefs.h (PREF_TORRENT_SHOW_FILES): Renamed as PREF_SHOW_FILES
  9611. (PREF_SHOW_FILES): New definition.
  9612. 2006-04-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9613. To add the ability to download multi torrent into respective files
  9614. directly:
  9615. * src/DiskWriter.h (openFile): New function.
  9616. (seek): Removed.
  9617. * src/MultiDiskWriter.h: New class.
  9618. * src/MultiDiskWriter.cc: New class.
  9619. * src/AbstractDiskWriter.h (seek): Changed its scope from public to
  9620. protected.
  9621. (openFile): New function.
  9622. * src/AbstractDiskWriter.cc (openFile): New function.
  9623. * src/prefs.h (V_FALSE): New definition.
  9624. (PREF_DIRECT_FILE_MAPPING): New definition.
  9625. * src/TorrentMan.h (setupDiskWriter): New function.
  9626. (setAllMultiFileRequestedState): New function.
  9627. (onDownloadComplete): New function.
  9628. * src/TorrentMan.cc : Included MultiDiskWriter.h
  9629. (setupDiskWriter): New function.
  9630. (getFilePath): Updated.
  9631. (getTempFilePath): Updated.
  9632. (getSegmentFilePath): Updated.
  9633. (fixFilename): Updated.
  9634. (deleteTempFile): Updated.
  9635. (setAllMultiFileRequestedState): New function.
  9636. (setFileEntriesToDownload): Use setAllMultiFileRequestedState().
  9637. (finishPartialDownloadingMode): Reset requested flags.
  9638. (onDownloadComplete): New function.
  9639. * src/main.cc: Added --direct-file-mapping option.
  9640. Use TorrentMan::setupDiskWriter().
  9641. * src/TorrentDownloadEngine.cc (afterEachIteration): Use TorrentMan::
  9642. onDownloadComplete().
  9643. To fix ETA bug:
  9644. * src/Util.h (difftvsec): New function.
  9645. * src/Util.cc (difftvsec): New function.
  9646. * src/TorrentConsoleDownloadEngine.cc (calculateSpeed): Use int for the
  9647. type of "elapsed" instead of long long int.
  9648. (calculateStatistics): Use Util::difftvsec instead of Util::difftv.
  9649. The updates of statistics takes place every 1 seconds.
  9650. * src/TorrentConsoleDownloadEngine.h (lastElapsed): Changed its type.
  9651. (calculateSpeed): Changed its argument signature.
  9652. * src/PeerMessage.cc (toString): Fixed message.
  9653. 2006-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9654. To print ETA:
  9655. * src/TorrentDownloadEngine.cc (afterEachIteration): Added download
  9656. completion handling when dealing with
  9657. TorrentMan::isPartialDownloadingMode() == true.
  9658. * src/TorrentDownloadEngine.h (onPartialDownloadingCompletes):
  9659. New function.
  9660. * src/TorrentConsoleDownloadEngine.h (startup): New variable.
  9661. (sessionDownloadLength): New variable.
  9662. (avgSpeed): New variable.
  9663. (eta): New variable.
  9664. * src/TorrentConsoleDownloadEngine.cc (initStatistics): Initialized
  9665. new variables: eta, avgSpeed, startup.
  9666. (calculateSpeed): Calculate average speed and ETA.
  9667. (printStatistics): Added ETA.
  9668. * src/Util.h (secfmt): New function.
  9669. * src/Util.cc (secfmt): New function.
  9670. 2006-04-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9671. To detect "keep alive" flooding:
  9672. * src/PeerInteractionCommand.h (keepAliveCount): New variable
  9673. * src/PeerInteractionCommand.cc (Constructor): Initialized new
  9674. variable: keepAliveCount.
  9675. (detectMessageFlooding): Added "keep alive" flooding detection.
  9676. (receiveMessage): Increase keepAliveCount when "keep alive" message
  9677. received.
  9678. To add the ability to download only specified files in multi-file
  9679. torrent:
  9680. * src/BitfieldMan.h (filterBitfield): New variable.
  9681. (filterEnabled): New variable.
  9682. (setFilterBit): New function.
  9683. (enableFilter): New function.
  9684. (disableFilter): New function.
  9685. (isFilterEnabled): New function.
  9686. (getFilteredTotalLength): New function.
  9687. (getCompletedLength): New function.
  9688. * src/BitfieldMan.cc (Constructor): Initialized new variable:
  9689. filterBitfield, filterEnabled.
  9690. (CopyConstructor): Added filterBitfield and filterEnabled.
  9691. (operator==): Added filterBitfield and filterEnabled.
  9692. (Destructor): Added filterBitfield.
  9693. (getMissingIndex): Use filterBitfield.
  9694. (getMissingUnusedIndex): Use filterBitfield.
  9695. (getFirstMissingUnusedIndex): Use filterBitfield.
  9696. (getFirstMissingUnusedIndex): Use filterBitfield.
  9697. (getAllMissingIndexes): Use filterBitfield.
  9698. (countMissingBlock): Use filterBitfield.
  9699. (countBlock): Use filterBitfield.
  9700. (setBitInternal): Added new argument on.
  9701. (setUseBit): Use setBitInternal.
  9702. (unsetUseBit): Use setBitInternal.
  9703. (setBit): Use setBitInternal.
  9704. (unsetBit): Use setBitInternal.
  9705. (isAllBitSet): Use filterBitfield.
  9706. (setFilterBit): New function.
  9707. (addFilter): New function.
  9708. (enableFilter): New function.
  9709. (disableFilter): New function.
  9710. (clearFilter): New function.
  9711. (isFilterEnabled): New function.
  9712. (getFilteredTotalLength): New function.
  9713. (getCompletedLength): New function.
  9714. * src/TorrentMan.h [FileEntry](Constructor): Updated signature.
  9715. Initalized newly added variables.
  9716. [FileEntry](offset): New variable.
  9717. [FileEntry](extracted): New variable.
  9718. [FileEntry](requested): New variable.
  9719. (readFileEntry): New function.
  9720. (option): New variable.
  9721. (splitMultiFile): Removed const qualifier.
  9722. (fixFilename): Removed const qualifier.
  9723. (readFileEntryFromMetaInfoFile): New function.
  9724. (finishPartialDownloadingMode): New function.
  9725. (isPartialDownloadingMode): New function.
  9726. (setFileEntriesToDownload): New function.
  9727. (getCompletedLength): New function.
  9728. (getPartialTotalLength): New function.
  9729. * src/TorrentMan.cc (readFileEntry): New function.
  9730. (setup): Use readFileEntry. If no-preallocation option is specified,
  9731. use DefaultDiskWriter.
  9732. (readFileEntryFromMetaInfoFile): New function.
  9733. (fixFilename): Removed const qualifier.
  9734. (splitMultiFile): Removed const qualifier.
  9735. (setFileEntriesToDownload): New function.
  9736. (isPartialDownloadingMode): New function.
  9737. (finishPartialDownloadingMode): New function.
  9738. (getCompletedLength): New function.
  9739. (getPartialTotalLength): New function.
  9740. * src/TorrentConsoleDownloadEngine.h (partialDownloadLengthDiff):
  9741. New variable.
  9742. (partialTotalLength): New variable.
  9743. (downloadLength): New variable.
  9744. (totalLength): New variable.
  9745. * src/TorrentConsoleDownloadEngine.cc (onPartialDownloadingCompletes):
  9746. Added log.
  9747. (initStatistics): Initialized new variables: partialDownloadLengthDiff,
  9748. partialTotalLength, downloadLength, totalLength.
  9749. (calculate): Calculate downloadLength and totalLength.
  9750. * src/prefs.h :New definition PREF_NO_PREALLOCATION
  9751. * src/main.cc (addCommand): Changed argument signature.
  9752. (main): Added new variable: args. Added new option "torrent-show-files"
  9753. "no-preallocation". Usage is not updated yet.
  9754. 2006-04-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9755. * src/PeerMessage.cc (setBitfield): Fixed invalid memory de-allocation.
  9756. 2006-04-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9757. Attempt to add the ability to listing file entries in a .torrent file.
  9758. This feature is not yet complete.
  9759. * src/prefs.h (PREF_TORRENT_SHOW_FILES): New definition
  9760. * src/TorrentMan.cc (getMultiFileEntries): New function.
  9761. (getName): New function.
  9762. * src/TorrentMan.h (getMultiFileEntries): New function.
  9763. (getName): New function.
  9764. * src/main.cc (main): Use above 2 funtion.
  9765. * Release 0.3.2
  9766. 2006-03-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9767. * src/PeerInteractionCommand.cc (checkInactiveConnection): New function
  9768. (detectMessageFlooding): Updated threshold value.
  9769. (checkLongTimePeerChoking): Updated timeout value.
  9770. (getNewPieceAndSendInterest): Added debug log.
  9771. * src/PeerInteractionCommand.h (checkInactiveConnection): New function
  9772. * src/TorrentMan.cc (deleteOldErrorPeers): Updated.
  9773. (getPeer): Updated.
  9774. * src/TorrentMan.h: Added MAX_PEER_ERROR.
  9775. * src/PeerAbstractCommand.cc (onAbort): Increment error counter.
  9776. * src/PeerListenCommand.cc (execute): Close connection if incoming peer
  9777. is localhost.
  9778. * src/main.cc (main): Updated PREF_PEER_CONNECTION_TIMEOUT to 60.
  9779. * src/PendingMessage.cc (processMessage): Not to send piece message
  9780. if peer is not interested in the pieces localhost has.
  9781. * src/Peer.cc (shouldChoke): Updated.
  9782. * src/SendMessageQueue.cc (cancelAllRequest): Fixed.
  9783. * src/Util.cc (isPowerOf): New function.
  9784. * src/Util.h (isPowerOf): New function.
  9785. * src/PeerMessageUtil.cc (checkLength): Added a check for length
  9786. whether or not it is power of 2.
  9787. 2006-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9788. Added new class SendMessageQueue that includes PendingMessages and
  9789. RequestSlotMan.
  9790. * src/SendMessageQueue.h: New class.
  9791. * src/SendMessageQueue.cc: New class.
  9792. * src/PendingMessage.h: Added new member variable blockIndex and its
  9793. accessors.
  9794. (createRequestMessage): Updated.
  9795. * src/PendingMessage.cc (createRequestMessage): Updated.
  9796. * src/PeerInteractionCommand.cc (executeInternal): Updated with
  9797. SendMessageQueue.
  9798. (checkLongTimePeerChoking): Updated with SendMessageQueue.
  9799. (receiveMessage): Updated with SendMessageQueue.
  9800. (deletePendingPieceMessage): Removed.
  9801. (getNewPieceAndSendInterest): Updated with SendMessageQueue.
  9802. (sendInterest): Updated with SendMessageQueue.
  9803. (createRequestPendingMessage): Updated with SendMessageQueue.
  9804. (sendMessages): Updated with SendMessageQueue.
  9805. (onAbort): Updated with SendMessageQueue.
  9806. (keepAlive): Updated with SendMessageQueue.
  9807. (beforeSocketCheck): Updated SendMessageQueue.
  9808. * src/PeerInteractionCommand (sendMessages): Shuffle
  9809. missingBLockIndexes before using it.
  9810. Added its own timeout for peer connection.
  9811. * src/PeerAbstractCommand.h: Added member variable timeout and its
  9812. setter.
  9813. * src/prefs.h: Added PREF_PEER_CONNECTION_TIMEOUT.
  9814. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  9815. Added setTimeout() call.
  9816. (executeInternal): Added setTimeout() call.
  9817. * src/PeerAbstractCommand.cc (PeerAbstractCommand):
  9818. Added timeout.
  9819. (isTimeoutDetected): Updated.
  9820. * src/main.cc (main): Added PREF_PEER_CONNECTION_TIMEOUT entry to
  9821. option.
  9822. Added *simple* message flooding checker.
  9823. * src/PeerInteractionCommand.cc (executeInternal):
  9824. Added detectMessageFlooding() call.
  9825. (detectMessageFlooding): New function.
  9826. (receiveMessage): Count up CHOKE, UNCHOKE, HAVE message.
  9827. (beforeSocketCheck): Added detectMessageFlooding() call.
  9828. * src/PeerInteractionCommand.h: Added sendMessageQueue,
  9829. chokeUnchokeCount, haveCount, detectMessageFlooding().
  9830. Removed deletePendingPieceMessage(), getRequestSlot(),
  9831. deleteRequestSlot(), deleteAllRequestSlot().
  9832. * src/PeerInteractionCommand.cc (beforeSocketCheck):
  9833. Added checkLongTimePeerChoking() call.
  9834. * src/RequestSlotMan.h: Renamed deleteTimeoutRequestSlot().
  9835. * src/TorrentMan.cc (addPeer): Delete at most MAX_PEER_LIST_SIZE peers
  9836. if duplicate == false.
  9837. The parameter "uploaded" and "downloaded" in the tracker request are
  9838. the size since the client sent the "started" event to the tracker.
  9839. * src/TorrentMan.cc (setup): Assigned saved downloaded Size and
  9840. uploaded size to preDownloadedSize, preUploadedSize respectively.
  9841. * src/TorrentMan.h: Added preDownloadedSize, preUploadedSize,
  9842. getSessionDownloadedSize(), getSessionUploadedSize().
  9843. * src/TrackerInitCommand.cc (execute): Use getSessionDownloadedSize(),
  9844. getSessionUploadedSize() instead of getDownloadedSize(),
  9845. getUploadedSize().
  9846. * src/PendingMessage.cc (processMessage): Do not send request message
  9847. if the peer is choking the client.
  9848. * src/TrackerUpdateCommand.cc (execute): Check wtheher minInterval is
  9849. less than interval.
  9850. 2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9851. * configure.in: Added gnutls support. Added several CPP macros.
  9852. * m4/openssl.m4: Added.
  9853. * src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
  9854. readData(), peekData(). Added gnutls support.
  9855. * src/HttpDownloadCommand.cc: Removed SleepCommand.h
  9856. * src/TrackerWatcherCommand.{h,cc}: Added. This command creates
  9857. TrackerInitCommand periodicaly(TorrentMan::minInterval).
  9858. * src/TorrentMan.cc: Remove downloadedSize == 0 check from save().
  9859. Instead, added a check for whether setup method has executed
  9860. successfully.
  9861. * src/TorrentMan.h: Added member vaiable setupComplete. Updated
  9862. DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to 300.
  9863. * src/Makefile.am: Updated.
  9864. * src/messageDigest.h: Added. This is a macro calculating SHA1 digest
  9865. using whether OpenSSL or gcrypt, depending on the result of configure
  9866. script.
  9867. * src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by using
  9868. messageDigest.h.
  9869. * src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
  9870. * src/PeerListenCommand.cc: Added log about port binded successfully.
  9871. Fixed memory leak.
  9872. * src/main.cc: Added gnutls support. Replaced LIB_SSL with
  9873. ENABLE_BITTORRENT where they are not related to OpenSSL but BitTorrent.
  9874. Removed instantiation of TrackerInitCommand. Instead,
  9875. TrackerWatcherCommand is instantiated and pushed to the command queue.
  9876. * src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL with
  9877. ENABLE_SSL.
  9878. * src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
  9879. * src/RequestSlotMan.cc (deleteCompletedRequestSlot):
  9880. If a piece is already acquired by another command, delete the request
  9881. slots for the piece.
  9882. * src/TrackerUpdateCommand.cc (execute):
  9883. Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to warn.
  9884. Added a check whether peer list is null.
  9885. Fixed the bug that causes sending completed event to the tracker
  9886. several times.
  9887. * src/TrackerInitCommand.cc (execute):
  9888. Fixed the bug that causes sending completed event to the tracker
  9889. several times.
  9890. * src/AbstractDiskWriter.{h,cc}: Removed direct dependency on OpenSSL
  9891. by using messageDigest.h.
  9892. 2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9893. * PeerConnection.cc: Replaced log message "keep-alive" with
  9894. "keep alive".
  9895. * PeerInteractionCommand.{h,cc}: Close connection if peer is choking
  9896. localhost long time.
  9897. * TorrentMan.cc: When adding new peer with duplicate = true, if the
  9898. number of peer list is equal to or grater than MAX_PEER_LIST, delete
  9899. at most 100 failure entry from the list. If with duplicate = false,
  9900. MAX_PEER_LIST is not checked.
  9901. * PeerListenCommand.cc: Fixed the argument order of log message.
  9902. 2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9903. * Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
  9904. Added warn().
  9905. * SimpleLogger.h: Moved enum LEVEL to Logger.h.
  9906. Implemented warn().
  9907. Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated code.
  9908. 2006-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9909. * Request.h: Added AFTER_COMPLETED event.
  9910. * TorrentDownloadEngine.cc: Prints "Download complete" message
  9911. instead of downloaded size and progress(%) after download completes.
  9912. * PeerInteractionCommand.cc: After download completes, sends unchoke
  9913. message to the peer if it is interested in what localhost has
  9914. downloaded.
  9915. * TorrentMan.cc: In single-file mode, copy temporary file to the final
  9916. destination instead of just renaming it.
  9917. * TorrentMan.cc: Added deleteTempFile().
  9918. * PeerAbstractCommand.cc: do not stop execution after download
  9919. completes. This makes localhost a seeder.
  9920. * Util.{h,cc}: Added fileCopy().
  9921. * PeerListenCommand.cc: do not stop execution after download completes.
  9922. This makes localhost a seeder.
  9923. * main.cc: Do not call TorrentMan::fixFilename() in torrentHandler.
  9924. Added TorrentMan::deleteTempFile() to torrentHandler.
  9925. Initialized the variable dir as ".".
  9926. * TorrentMan.h: Changed DEFAULT_ANNOUNCE_INTERVAL to 120 seconds.
  9927. Deleted renameSingleFile().
  9928. Added copySingleFile(), deleteTempFile().
  9929. * DownloadEngine.h: Added virtual function afterEachIteration().
  9930. * TorrentDownloadEngine.cc: Move a call to TorrentMan::fixFilename()
  9931. in onEndOfRun() to afterEachIteration().
  9932. In onEndOfRun(), changed if condition to check whether filenameFixed is
  9933. true.
  9934. * Util.cc: Implemented fileCopy() using rangedFileCopy().
  9935. In rangedFileCopy(), added try-catch block to properly close file
  9936. descriptors.
  9937. * TorrentDownloadEngine.cc: Added a member variable filenameFixed.
  9938. Added afterEachIteration(), isFilenameFixed().
  9939. * Peer.cc: Changed choking strategy.
  9940. * PreAllocationDiskWriter.cc: Drop O_DIRECT flag.
  9941. * TrackerInitCommand.cc: Send completed event only once.
  9942. * DownloadEngine.cc: Added a call to afterEachIteration().
  9943. * TrackerUpdateCommand.cc: Do not stop execution after download
  9944. completes.
  9945. * TorrentMan.h: Defined MAX_PEER_UPDATE as 15. aria2 attempts to
  9946. connect the peers at most MAX_PEER_UPDATE when a peer list is
  9947. received from a tracker.
  9948. * TrackerUpdateCommand.cc: Implemented above mentioned behavior.
  9949. Decreased the number of failure peers to delete to 0(just comment out
  9950. the line).
  9951. * Release 0.3.1
  9952. 2006-03-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9953. * PeerInteractionCommand.cc: added a call to
  9954. TorrentMan::unadvertisePiece in Destructor.
  9955. * PeerInteractionCommand.cc: make have message sent immediately
  9956. if the size of pending message queue is zero.
  9957. * TorrentMan.cc: set the maximum size of peer list to 250.
  9958. * TorrentMan.h: changed the container type of Peers and UsedPieces
  9959. to deque.
  9960. * Util.cc: fixed rangedFileCopy.
  9961. * AbstractDiskWriter.{h,cc}: moved digest context initialization
  9962. to Constructor. Also, moved digest cleanup to Destructor.
  9963. * MetaFileUtil.cc: fixed memory leak
  9964. * replaced std::vector with std::deque.
  9965. * AbstractCommand.cc: casted timeout value to long long int.
  9966. * ChunkedEncoding.cc: fixed memory leak.
  9967. * PeerInteractionCommand.cc: casted timeout value to long long int.
  9968. * SleepCommand.cc: casted timeout value to long long int.
  9969. * Data.cc: fixed memory leak.
  9970. * Data.cc: fixed toLLInt().
  9971. * BitfieldMan.cc: fixed memory leak.
  9972. * TorrentMan.cc: initialized storeDir to ".".
  9973. * TorrentMan.cc: fixed memory leak.
  9974. * TorrentMan.cc: corrected file paths of splitted files.
  9975. * PeerAbstractCommand.cc: casted timeout to long long int.
  9976. * main.cc: added delete(req) and delete(te->diskWriter).
  9977. * RequestSlot.cc: casted timeout value to long long int.
  9978. * Request.cc: fixed memory leak.
  9979. * PendingMessage.cc: make HAVE messages sent only when peer does not
  9980. have the piece.
  9981. * Peer.{h,cc}: added hasPiece(int index).
  9982. * main.cc: corrected addCommand.
  9983. 2006-03-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9984. * BitTorrent protocol support added.
  9985. * Release 0.3.0
  9986. 2006-03-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9987. * SocketCore.cc: remove the assignment of addrinfo.ai_addr.
  9988. 2006-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9989. * ChunkedEncoding.{h,cc}: fixed the bug that if chunk data is binary,
  9990. decoding did not work properly.
  9991. 2006-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9992. * DownloadEngine.h: included sys/time.h
  9993. * DownloadEngine.cc: remove sys/time.h
  9994. * Makefile.am (SUBDIRS): Add intl.
  9995. * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
  9996. 2006-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9997. * main.cc: correct help message for --http-auth-scheme.
  9998. * main.cc: changed e-mail address for bug reports.
  9999. * ja.po: added japanese translation.
  10000. 2006-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10001. * SimpleLogger.cc: flush log file instead of stdout.
  10002. 2006-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10003. * main.cc: Fixed command-line option: max-tries
  10004. * HttpResponseCommand.cc: Make the request re-sent only if req->seg.sp
  10005. does not equal to seg.sp.
  10006. * DownloadCommand.cc: If EOF is got from the server and the total size
  10007. of file is not zero, then throw DlRetryEx.
  10008. * main.cc: Set the minium value of min-segment-size to 1024.
  10009. * HttpResponseCommand.cc: Fixed the bug that http segmented downloading
  10010. fails because of a regression since 0.2.0 release.
  10011. 2006-03-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10012. * HttpConnection.cc:
  10013. * common.h: defined the user agent name as macro
  10014. * DownloadEngine.{h, cc}:
  10015. * ConsoleDownloadEngine.{h, cc}: Console output message(size, speed)
  10016. is now generated by ConsoleDownloadEngine not by DownloadEngine.
  10017. * main.cc: Download complete/abort message is now generated by main.
  10018. * Makefile.am (SUBDIRS): Add m4.
  10019. (ACLOCAL_AMFLAGS): New variable.
  10020. (EXTRA_DIST): New variable.
  10021. * configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
  10022. * gettext: added gettext functionality
  10023. 2006-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10024. * AbstractCommand.cc:
  10025. * DownloadCommand.{h, cc}: Aborted downloading commands now properly
  10026. unregister its cuid from SegmentMan.
  10027. * DownloadEngine.cc: .aria2 file was written when a downloading
  10028. failed with errors.
  10029. * HttpConnection.cc: Added "Proxy-Connection" header to proxy request.
  10030. Added "User-Agent" header to CONNECT proxy request.
  10031. Fixed "Proxy-Authorization" header. Now proxy authorization works
  10032. properly.
  10033. * Logger.h:
  10034. * SimpleLogger.{h,cc}: Changed the type of msg to const char*.
  10035. * ChunkedEncoding.cc: Added #include directive for strings.h
  10036. * Release 0.2.1
  10037. 2006-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10038. * Util.{h,cc}: added startsWith().
  10039. * CookieBox.cc: rewrited criteriaFind() using Util::startsWith() and
  10040. Util::endsWith().
  10041. * SocketCore.cc: struct addrinfo is now zero-initialized.
  10042. * common.h: added #include directive of limit.h.
  10043. * DownloadEngine.cc: added #include directive of sys/time.h and
  10044. algorithm.
  10045. * Exception.h: added #include directive of stdio.h.
  10046. * AbstractCommand.h: added #include directive of sys/time.h.
  10047. * DownloadCommand.h: added #include directive of sys/time.h.
  10048. * *.h: added #include directive of common.h to all base classes.
  10049. subclasses' one was removed.
  10050. * common.h: defined LONG_LONG_MAX and LONG_LONG_MIN if a compiler
  10051. does not define these macros.
  10052. 2006-02-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10053. * Release 0.2.0
  10054. * main.cc:
  10055. * HttpInitiateConnectionCommand.{h,cc}:
  10056. * prefs.h:
  10057. * HttpConnection.{h,cc}: added --http-proxy-method option.
  10058. We can now use GET command in http proxy.
  10059. 2006-02-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10060. * SplitSlowestSegmentSplitter.{h,cc}: This class provies algorithm
  10061. that splits slowest segment of SegmentMan::commands vector.
  10062. This is the default split algorithm of aria2.
  10063. * SplitFirstSegmentSplitter.{h,cc}: This class provides algorithm
  10064. that splits first segment of SegmentMan::commands vector.
  10065. * SegmentSplitter.{h,cc}: Added. This class provides split algorithm.
  10066. * DownloadCommand.{h,cc}: Added downloading speed calculation.
  10067. * Segment.h:
  10068. * SegmentMan.cc: Added speed field to Segment.h
  10069. * main.cc: -s option now affects all URLs in command-line arguemtns.
  10070. * HttpResponseCommand.cc: Fixed bug that segment file is not loaded.
  10071. * message.h: Change file size related %d to %lld.
  10072. 2006-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10073. * FtpInitiateConnectionCommand.{h,cc}:
  10074. * FtpNegotiationCommand.{h,cc}:
  10075. * FtpDownloadCommand.{h,cc}:
  10076. * FtpConnection.{h,cc}: Added FTP support
  10077. * SimpleLogger.cc: Log message now includes time information.
  10078. * main.cc: The value of --http-auth-scheme option is chagned from
  10079. 'BASIC' to 'basic'
  10080. * main.cc: Added --timeout command-line option.
  10081. * main.cc: Added --min-segment-size command-line option.
  10082. * main.cc: Added --max-retries command-line option.
  10083. * prefs.h: option string constants are now defined in prefs.h
  10084. 2006-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10085. * AbstractCommand.cc: Fixed timeout bug in AbstractCommand
  10086. * SegmentMan.cc: Added totalSize entry to .aria2 file. No compatibility
  10087. with version 0.1.0's one.
  10088. 2006-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  10089. * configure.in: Added --enable-ssl option to configure script.
  10090. * HttpConnection.cc: Make Request-URI an absolute path. Some servers
  10091. cannot permit absoluteURI as Request-URI.
  10092. * HttpConnection.cc: Added Referer support.
  10093. * main.cc: Added referer command-line option.
  10094. * main.cc: Added rety-wait command-line option.
  10095. * Exception.h: Fixed formating bug in Exception::setMsg()
  10096. * SocketCore.{h,cc}:
  10097. * Socket.{h, cc}:
  10098. * Request.cc:
  10099. * InitiateConnectionCommandFactory.cc:
  10100. * HttpRequestCommand.cc: Added HTTPS support.
  10101. * SocketCore.{h,cc}: Added SocketCore. Socket becomes a handle class
  10102. for SocketCore.
  10103. * ChunkedEncoding.cc: Fixed bug in ChunkedEncoding: expanding buffer
  10104. size is wrong
  10105. * DownloadCommand.cc: Fixed bug in DownloadCommand: In Chunked
  10106. Encoding, it wrongly adds to Segment.ds buff length from the socket.
  10107. 2006-02-17 Tatsuhiro Tsujikawa <tsujikawa at rednoah dot com>
  10108. * Release 0.1.0