ChangeLog 370 KB

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