ChangeLog 372 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330
  1. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2. Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit, only the
  3. follow sources are applied.
  4. * src/Platform.h: I removed HAVE_WINSOCK2_H directive from Platform.h.
  5. * src/Platform.cc: Moved common setup/teardown code to Platform class.
  6. I moved #endif // HAVE_WINSOCK2_H to the front of #include "DlAbortEx.h"
  7. I included locale.h from Platform.cc.
  8. * src/main.cc: Moved common setup/teardown code to Platform class.
  9. * test/AllTest.cc: Use Platform class.
  10. Set locale to C in AllTest.cc to prevent the messages to be localized.
  11. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  12. Applied Ross's aria2-0.13.2+1-mingw-3.patch.
  13. * test/HttpHeaderTest.cc: Casted to off_t where it should.
  14. * test/HttpRequestTest.cc: Casted to off_t where it should.
  15. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  16. Applied Ross's aria2-0.13.2+1-mingw.patch and
  17. aria2-0.13.2+1-mingw-2.patch.
  18. * src/ConsoleStatCalc.cc: Added HAVE_TERMIOUS_H directive for the
  19. systems which don't have termious.h. I moved the directive inside of
  20. if(isTTY) { ... clause so that line is wiped out without termious.h.
  21. I also removed HAVE_ASCTIME_R clause because asctime_r is provided
  22. anyway.
  23. * src/asctime_r.h
  24. * src/asctime_r.c: Added for the systems don't have asctime_r function.
  25. I added 2nd argument to the prototype declaration.
  26. * src/StringFormat.cc: Get rid of vasprintf.
  27. * src/getaddrinfo.h: Fixed constants.
  28. * configure.ac: Added the check for asctime_r function.
  29. * src/Makefile.am: Added conditional based on HAVE_ASCTIME_R
  30. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  31. Added writable test for Socket when the sending message is in progress.
  32. Usually the sending message is piece message. Without wriable check,
  33. upload latency is dropped to more than 1sec.
  34. * src/PeerInteractionCommand.cc
  35. 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  36. Create only requested files and files which shares a piece with
  37. requested file in multi-torrent downloads. Directory structures are
  38. also created in the same rule.
  39. MultiDiskAdaptor::fileExists() now uses FileEntry instead of
  40. DiskWriterEntry as in the previous implementation.
  41. * src/MultiDiskWriter.cc
  42. * src/MultiFileAllocationIterator.cc
  43. * src/MultiFileAllocationIterator.h
  44. * test/MultiFileAllocationIteratorTest.cc
  45. 2008-06-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  46. Commented out -lprofiler
  47. * src/Makefile.am
  48. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  49. Bump up version number to 0.14.0b.
  50. * src/configure.ac
  51. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  52. Actively establish connection to peers in seeding, when peer cache
  53. is not full and max upload speed limit is not reached.
  54. * src/ActivePeerConnectionCommand.cc
  55. * src/ActivePeerConnectionCommand.h
  56. 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  57. Always remove a peer from cache in DefaultPeerStorage::returnPeer(),
  58. to make room more fleshy, recently found peers.
  59. Peer::_badConditionStartTime is not used anymore. Consider to remove
  60. it.
  61. * src/DefaultPeerStorage.cc
  62. * test/DefaultPeerStorageTest.cc
  63. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  64. Returns cached data only when the previous receiveHandshake() is called
  65. with peek = true.
  66. * src/PeerConnection.cc (receiveHandshake)
  67. * src/PeerConnection.h (receiveHandshake)
  68. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  69. Changed default value of -s option from 1 to 5.
  70. Also max value of -s option is changed from 5 to 16.
  71. * src/HelpItemFactory.cc
  72. * src/OptionHandlerFactory.cc
  73. * src/option_processing.cc
  74. * src/usage_text.h
  75. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  76. Changed -s options behavior. Now it means the number of connections
  77. made simultaneously in each http/ftp download.
  78. If 1 URL is specified, the behavior is the same with old implementation.
  79. If -s N is given and more than N URLs are specified, first N URLs are
  80. used and remaining URLs are used for backup. If less than N URLs are
  81. specified, some of URLs are used more than once so that totally N
  82. connections are made simultaneously.
  83. * src/main.cc
  84. 2008-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  85. Included missing iosfwd or ostream header.
  86. * src/RequestGroupMan.cc
  87. * src/TaggedItem.cc
  88. * src/TaggedItem.h
  89. * src/Util.cc
  90. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  91. * src/HttpHeaderProcessor.cc: Rewritten using std::string as a buffer.
  92. * src/HttpHeaderProcessor.h: Rewritten using std::string as a buffer.
  93. * src/HttpConnection.cc: Included missing sstream.
  94. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  95. Added --bt-max-open-files option.
  96. * src/DefaultPieceStorage.cc
  97. * src/HelpItemFactory.cc
  98. * src/MultiDiskAdaptor.cc
  99. * src/MultiDiskAdaptor.h
  100. * src/OptionHandlerFactory.cc
  101. * src/option_processing.cc
  102. * src/prefs.cc
  103. * src/prefs.h
  104. * src/usage_text.h
  105. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  106. Fixed the bug that aria2 aborts when a path to a directory is given
  107. in command-line.
  108. * src/ProtocolDetector.cc
  109. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  110. Limited the number files opened in each BitTorrent download. The default
  111. value is 100. The option to change this value will be added.
  112. * src/MultiDiskAdaptor.cc
  113. * src/MultiDiskAdaptor.h
  114. * src/MultiFileAllocationIterator.cc
  115. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  116. Fixed the bug that HTTP downloads don't start with old libraries.
  117. * src/HttpHeaderProcessor.cc
  118. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  119. Use empty() instead of size() > 0.
  120. * src/HttpConnection.cc
  121. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  122. Drop connection if the incoming peer ID is the same with localhost's
  123. one. The previous implementation drops connection when incoming peer's
  124. IP address is the same with localhost's one.
  125. * src/PeerListenCommand.cc
  126. * src/DefaultBtInteractive.cc
  127. 2008-06-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  128. Returns cached data without checking whether socket is readable
  129. if the cache is available.
  130. * src/PeerConnection.cc (receiveHandshake)
  131. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  132. Included stdint.h
  133. * src/common.h
  134. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  135. Removed duplicate HAVE_GETTIMEOFDAY
  136. * src/Makefile.am
  137. * src/Makefile.in
  138. 2008-06-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  139. Use interval as a minInterval when minInterval is not supplied.
  140. * src/DefaultBtAnnounce.cc
  141. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  142. Made DEFAULT_ANNOUNCE_INTERVAL 120, so that if first tracker request
  143. attempt is failed, then 2nd attempt get kicked out more quickly.
  144. And it is now static const member of DefaultBtAnnounce.
  145. * src/DefaultBtAnnounce.h
  146. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  147. Renamed BtRuntime::lessThanMinPeers() and BtRuntime::lessThanEqMinPeers.
  148. Made MAX_PEERS and MIN_PEERS static const members of BtRuntime.
  149. * src/ActivePeerConnectionCommand.cc
  150. * src/BtConstants.h
  151. * src/BtRuntime.h
  152. * src/DHTGetPeersCommand.cc
  153. * src/DefaultBtAnnounce.cc
  154. * src/DefaultPeerStorage.cc: Calculate maxPeerListSize based on
  155. BtRuntime::MAX_PEERS.
  156. * src/DefaultPeerStorage.h
  157. * src/InitiatorMSEHandshakeCommand.cc
  158. * src/PeerInitiateConnectionCommand.cc
  159. * src/PeerInteractionCommand.cc
  160. * src/PeerReceiveHandshakeCommand.cc
  161. * src/TrackerWatcherCommand.cc
  162. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  163. Always Connect to _numNewConnection
  164. * src/ActivePeerConnectionCommand.cc
  165. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  166. Made `begin' unsigned int.
  167. * src/GrowSegment.h
  168. * src/Piece.cc
  169. * src/Piece.h
  170. * src/PiecedSegment.cc
  171. * src/PiecedSegment.h
  172. * src/Segment.h
  173. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  174. Calculate piece hash when data is arrived if the data is arrived in
  175. order. This removes additional read operation for hash calculation.
  176. If the data is arrived in out of order, the hash is calucated when the
  177. piece is completed. This is the same behavior as the old implementation.
  178. * src/BtPieceMessage.cc
  179. * src/DefaultBtProgressInfoFile.cc
  180. * src/DefaultPieceStorage.cc
  181. * src/DownloadCommand.cc
  182. * src/DownloadCommand.h
  183. * src/DownloadEngine.cc
  184. * src/GrowSegment.cc
  185. * src/GrowSegment.h
  186. * src/Piece.cc
  187. * src/Piece.h
  188. * src/PiecedSegment.cc
  189. * src/PiecedSegment.h
  190. * src/Segment.h
  191. * test/PieceTest.cc
  192. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  193. Try to keep the ordering of outgoing piece message.
  194. * src/DefaultBtMessageDispatcher.cc
  195. (DefaultBtMessageDispatcher::sendMessages)
  196. 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  197. Fixed busy loop when error/hup epoll events occur.
  198. * src/AbstractCommand.cc
  199. * src/PeerAbstractCommand.cc
  200. 2008-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  201. Added --bt-request-peer-speed-limit option, which was a constant
  202. SLOW_SPEED_THRESHOLD.
  203. * src/ActivePeerConnectionCommand.cc
  204. * src/ActivePeerConnectionCommand.h
  205. * src/BtConstants.h
  206. * src/HelpItemFactory.cc
  207. * src/OptionHandlerFactory.cc
  208. * src/PeerReceiveHandshakeCommand.cc
  209. * src/option_processing.cc
  210. * src/prefs.cc
  211. * src/prefs.h
  212. * src/usage_text.h
  213. 2008-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  214. Removed repeated call of getTopDirPath(). Instead, call it once and
  215. cache the result.
  216. * src/MultiDiskAdaptor.cc
  217. * src/MultiDiskAdaptor.h
  218. (mkdir, openFile, initAndOpenFile, openExistingFile)
  219. 2008-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  220. Fixed compile error on debian etch.
  221. The libc6 shipped with debian etch doesn't define ULLONG_MAX properly
  222. even if _GNU_SOURCE is defined. So define ULLONG_MAX in case when
  223. it is undefined.
  224. * src/Util.cc (ULLONG_MAX)
  225. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  226. Added epoll support. Use epoll if it is available. If not, use select.
  227. When async dns is enabled in compile time, epoll support is enabled
  228. only when aria2 is built with c-ares. This condition statement is
  229. defined in a2io.h.
  230. Currently aria2 supports both c-ares and ares, but ares is maintained
  231. for quite a while and debian already has c-ares package, ares support
  232. will be dropped in the future version.
  233. * configure.ac
  234. * src/AbstractCommand.cc
  235. * src/AsyncNameResolver.cc
  236. * src/AsyncNameResolver.h
  237. * src/Command.cc
  238. * src/Command.h
  239. * src/DownloadEngine.cc
  240. * src/DownloadEngine.h
  241. * src/PeerAbstractCommand.cc
  242. * src/SocketCore.cc
  243. * src/SocketCore.h
  244. * src/a2io.h
  245. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  246. * test/MetalinkEntryTest.cc: Added missing `defined' keyword to #if
  247. directive.
  248. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  249. Do not do write operation to /dev/null file.
  250. * src/LogFactory.cc
  251. * src/SimpleLogger.cc
  252. Replaced vasprintf with vsnprintf
  253. * src/SimpleLogger.cc (SimpleLogger::writeLog)
  254. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  255. * src/BtRequestMessage.cc
  256. (BtRequestMessage::onQueue): Given piece to RequestSlot. This is a fix
  257. for segmentation fault caused by previous commit.
  258. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  259. Reduced the usage of gettimeofday().
  260. * src/DefaultBtMessageDispatcher.cc
  261. (DefaultBtMessageDispatcher::checkRequestSlotAndDoNecessaryThing)
  262. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  263. * src/RequestSlot.cc
  264. * src/RequestSlot.h
  265. (RequestSlot::isTimeout)
  266. Made RequestSlot have a reference to Piece object to avoid find
  267. Piece repeatedly.
  268. * src/DefaultBtMessageDispatcher.cc
  269. (class FindStaleRequestSlot, class ProcessStaleRequestSlot)
  270. * src/RequestSlot.cc
  271. * src/RequestSlot.h
  272. (RequestSlot::getPiece)
  273. * test/DefaultBtMessageDispatcherTest.cc
  274. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  275. * src/TimeA2.cc
  276. * src/TimeA2.h
  277. (Time::difference): New function.
  278. (Time::elapsed): Done optimization.
  279. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  280. * src/HelpItemFactory.cc: Added missing `defined' keyword to #if
  281. directive.
  282. 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  283. * src/option_processing.cc: Added missing `defined' keyword to #if
  284. directive.
  285. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  286. Bump up version number to 0.13.2+1
  287. * src/configure.ac
  288. 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  289. Refactored broken outstanding piece handling.
  290. * src/DefaultPieceStorage.cc
  291. * src/DefaultPieceStorage.h
  292. * src/Piece.cc
  293. * src/Piece.h
  294. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  295. Fixed compile error on Mac OS X 10.3.9. This error was caused by the
  296. name collision of static variable and predefined macro.
  297. * src/BtContext.cc
  298. * src/BtContext.h
  299. * src/CookieBoxFactory.cc
  300. * src/CookieBoxFactory.h
  301. * src/CookieParser.cc
  302. * src/CookieParser.h
  303. * src/DefaultBtContext.cc
  304. 2008-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  305. * src/RequestGroup.cc
  306. (RequestGroup::createInitialCommand): Use empty() instead of size().
  307. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  308. * Release 0.13.2
  309. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  310. Updated fr.po(thanks to Sebastien) and ja.po. ThanksDone make update-po
  311. * po/fr.po
  312. * po/ja.po
  313. * po/aria2c.pot
  314. * po/*.po
  315. * po/*.gmo
  316. 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  317. Bump up version number to 0.13.2
  318. * src/configure.ac
  319. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  320. Refactord.
  321. * src/RequestGroupMan.cc
  322. (removeStoppedGroup)
  323. (fillRequestGroupFromReserver)
  324. 2008-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  325. Fixed compile error on Ubuntu.
  326. * src/BtPieceMessage.cc
  327. * src/MessageDigestHelper.cc
  328. * src/Util.cc
  329. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  330. Fixed compile error when configured with --disable-bittorrent
  331. * test/DownloadHandlerFactoryTest.cc
  332. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  333. Done make update-po
  334. * po/aria2c.pot
  335. * po/*.po
  336. * po/*.gmo
  337. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  338. Bump up version number to 0.13.2rc.
  339. * src/configure.ac
  340. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  341. Made option name bold. Updated SYNOPSIS to make it more readable.
  342. * doc/aria2c.1.txt
  343. * doc/aria2c.1
  344. * doc/aria2c.1.html
  345. * src/version_usage.cc
  346. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  347. Refactored. Use std::string instead of size and char*.
  348. * Data.cc
  349. * Data.h
  350. * test/Data.cc
  351. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  352. Added trimSelf(). Rewritten trim() to use trimSelf().
  353. * Util.cc
  354. * Util.h
  355. 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  356. * src/ChunkChecksum.h (getChecksum): Return const reference.
  357. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  358. Fixed compile error when configured with --disable-metalink.
  359. Also moved test/DownloadHandlerFactoryTest.cc to SRC in Makefile.am.
  360. * test/FeatureConfigTest.cc
  361. * test/DownloadHandlerFactoryTest.cc
  362. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  363. Fixed compile error when configured with --without-gnutls
  364. --without-openssl
  365. * src/main.cc
  366. * test/DefaultBtProgressInfoFileTest.cc
  367. * test/SegmentManTest.cc
  368. 2008-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  369. Fixed compile error with OpenSSL.
  370. * src/IteratableChunkChecksumValidator.cc
  371. * src/LibsslDHKeyExchange.h
  372. * src/MessageDigestHelper.cc
  373. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  374. Revert the default value of --max-concurrent-downloads to 5.
  375. Revert the default value of --metalink-servers to 5.
  376. Man pages was also updated.
  377. * src/option_processing.cc
  378. * doc/aria2c.1.txt
  379. * doc/aria2c.1.html
  380. * doc/aria2c.1
  381. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  382. Returns const reference:
  383. DownloadContext::getPieceHash, DownloadContext::getName,
  384. DownloadContext::getPieceHashAlgo, DownloadContext::getDir,
  385. BtContext::getInfoHashAsString,
  386. * src/BtContext.h
  387. * src/DefaultBtContext.cc
  388. * src/DefaultBtContext.h
  389. * src/DownloadContext.h
  390. * src/SingleFileDownloadContext.h
  391. * test/MockBtContext.h
  392. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  393. * src/RequestGroup.h (getDir): Removed.
  394. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  395. Returns const reference. The internal urlencode function was optimized
  396. a little bit.
  397. * src/Request.cc
  398. * src/Request.h
  399. * src/HttpRequest.cc
  400. * src/HttpRequest.h
  401. 2008-05-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  402. Defined option name and possible values as std::string to reduce
  403. temporary string object creation in runtime.
  404. * src/HelpItemFactory.cc
  405. * src/LogFactory.cc
  406. * src/Option.cc
  407. * src/OptionHandlerFactory.cc
  408. * src/option_processing.cc
  409. * src/prefs.cc
  410. * src/prefs.h
  411. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  412. Return const reference.
  413. * src/DownloadHandlerConstants.cc
  414. * src/DownloadHandlerConstants.h
  415. (getMetalinkExtensions)
  416. (getMetalinkContentTypes)
  417. (getBtExtensions)
  418. (getBtContentTypes)
  419. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  420. * src/HttpHeader.cc (get): Rewritten.
  421. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  422. Make HttpHeader::getFirst(...) return const reference.
  423. * src/HttpHeader.cc
  424. * src/HttpHeader.h
  425. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  426. Use Option::getAsBool(...) instead of Option::get(...) and compare
  427. it with V_TRUE.
  428. * src/DefaultPieceStorage.cc
  429. * src/DownloadCommand.cc
  430. * src/FtpNegotiationCommand.cc
  431. * src/HttpRequest.cc
  432. * src/InitiateConnectionCommand.cc
  433. * src/RequestGroup.cc
  434. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  435. Made Option::get(...) return const reference of std::string.
  436. * src/Option.cc
  437. * src/Option.h
  438. 2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  439. Replaced std:copy with insert.
  440. * src/DefaultBtMessageDispatcher.cc
  441. * src/DefaultPieceStorage.cc
  442. * src/DownloadEngineFactory.cc
  443. * src/RequestGroup.cc
  444. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  445. Included SocketCore.h to fix compiler warning.
  446. * src/InitiateConnectionCommand.cc
  447. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  448. Put piece selection strategy algorithm to RarestPieceSelector class,
  449. Added a switch to choose whether randomized selection so that unit
  450. tests emit same results in, possibly, win32.
  451. * src/DefaultPieceStorage.cc
  452. * src/DefaultPieceStorage.h
  453. * src/RarestPieceSelector.cc
  454. * src/RarestPieceSelector.h
  455. * test/DefaultPieceStorageTest.cc
  456. * test/RarestPieceSelectorTest.cc
  457. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  458. Don't pool connection if HTTP proxy is enabled.
  459. * src/FtpFinishDownloadCommand.cc
  460. * src/FtpNegotiationCommand.cc
  461. * src/HttpSkipResponseCommand.cc
  462. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  463. Don't add closed socket to DownloadEngine::addSocketForReadCheck()
  464. * src/AbstractCommand.cc
  465. * src/AbstractCommand.h
  466. * src/ActivePeerConnectionCommand.cc
  467. * src/FtpInitiateConnectionCommand.cc
  468. * src/HttpInitiateConnectionCommand.cc
  469. * src/InitiateConnectionCommandFactory.cc
  470. * src/PeerAbstractCommand.cc
  471. * src/PeerAbstractCommand.h
  472. * src/PeerInitiateConnectionCommand.cc
  473. * src/TrackerWatcherCommand.cc
  474. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  475. Sort RequestSlot in ascending order and manipulate them using
  476. lower_bound.
  477. * src/DefaultBtMessageDispatcher.cc
  478. * src/DefaultBtMessageDispatcher.h
  479. (getMessageQueue): Added const qualifier.
  480. (getRequestSlots): Added const qualifier.
  481. (sendMessages): Use empty() instead of size().
  482. (doCancelSendingPieceAction): Use HandleEvent object.
  483. (doAbortOutstandingRequestAction): Rewritten.
  484. (doChokedAction): Rewritten.
  485. (checkRequestSlotAndDoNecessaryThing): Rewritten.
  486. (isOutstandingRequest): Rewritten.
  487. (getOutstandingRequest): Rewritten.
  488. (removeOutstandingRequest): Rewritten.
  489. (addOutstandingRequest): Rewritten.
  490. * src/RequestSlot.cc
  491. * src/RequestSlot.h
  492. (operator=): Rewritten.
  493. (operator!=): New function.
  494. (operator<): New function.
  495. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  496. * src/DefaultBtRequestFactory.cc
  497. (doChokedAction): Rewritten.
  498. (removeCompletedPiece): Rewritten.
  499. (removeTargetPiece): Rewritten.
  500. (createRequestMessages): Added the debug log.
  501. (createRequestMessagesOnEndGame: Added the debug log.
  502. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  503. Added the debug log message.
  504. * src/BtPieceMessage.cc (doReceivedAction)
  505. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  506. Sorted DHTPeerAnnounceEntry in a ascending order of info hash and
  507. used lower_bound to process them rather than linear search.
  508. * src/DHTPeerAnnounceStorage.cc
  509. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  510. Call subtractPieceStats from ~PeerInteractionCommand only when the
  511. peer has at least one completed piece.
  512. * src/Peer.cc
  513. * src/Peer.h
  514. * src/PeerInteractionCommand.cc
  515. * src/PeerSessionResource.cc
  516. * src/PeerSessionResource.h
  517. 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  518. Removed unnecessary sorting
  519. * src/DefaultPieceStorage (DefaultPieceStorage)
  520. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  521. Rewritten the portion of the code that mangaes allowed fast indexes.
  522. * src/PeerSessionResource.cc
  523. * src/PeerSessionResource.h
  524. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  525. Removed the invalid string including '\r' from ru.po and
  526. did make update-po.
  527. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  528. Added --log-level and --summary-interval to man page.
  529. * doc/aria2c.1.txt
  530. * doc/aria2c.1.html
  531. * doc/aria2c.1
  532. 2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  533. Added --log-level option to specify log level. Log messages under
  534. the specified level are not output. Default value is `debug'.
  535. * src/HelpItemFactory.cc
  536. * src/LogFactory.cc
  537. * src/LogFactory.h
  538. * src/Logger.h
  539. * src/OptionHandlerFactory.cc
  540. * src/SimpleLogger.cc
  541. * src/SimpleLogger.h
  542. * src/main.cc
  543. * src/option_processing.cc
  544. * src/prefs.h
  545. * src/usage_text.h
  546. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  547. Print download progress summary of all parallel downloads in specified
  548. interval, default 60 secs. While aria2 could download several files
  549. in parallel (see -j option), it displayed just first download progress,
  550. and the other downloads are hidden from the users. This new feature
  551. prints all downloads currently in-progress to the console so that you
  552. can check the status of all downloads. The interval can be adjusted
  553. by --summary-interval option.
  554. The progress readout is now cut so that all fits in the one line of
  555. console.
  556. * src/ConsoleStatCalc.cc
  557. * src/ConsoleStatCalc.h
  558. * src/HelpItemFactory.cc
  559. * src/OptionHandlerFactory.cc
  560. * src/RequestGroupMan.cc
  561. * src/RequestGroupMan.h
  562. * src/main.cc
  563. * src/option_processing.cc
  564. * src/prefs.h
  565. * src/usage_text.h
  566. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  567. Call updateFdSet() to initialize rfdset, wfdset fdmax.
  568. * src/DownloadEngine.cc (DownloadEngine)
  569. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  570. Use free() to deallocate memory for _buffer if HAVE_POSIX_MEMALIGN is
  571. defined.
  572. * src/SingleFileAllocationIterator.cc (~SingleFileAllocationIterator)
  573. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  574. Use erase+lower_bound+insert instead of sort.
  575. * src/DefaultPieceStorage.cc (addPieceStats)
  576. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  577. Use A2STR::SHARP_C and A2STR::EQUAL_C.
  578. * src/A2STR.cc
  579. * src/A2STR.h
  580. * src/OptionParser.cc (parse)
  581. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  582. Defined fake filename `[tracker.announce]' as static const std::string.
  583. * src/TrackerWatcherCommand.cc (createRequestGroup)
  584. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  585. Defined default filename `index.html' as static const std::string
  586. * src/SingleFileDownloadContext.cc
  587. * src/SingleFileDownloadContext.h
  588. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  589. Defined "[MEMORY]" as static const std::string.
  590. * src/MemoryBufferPreDownloadHandler.cc (execute)
  591. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  592. Defined control file's version number as static const std::string.
  593. * src/DefaultBtProgressInfoFile.cc
  594. * src/DefaultBtProgressInfoFile.h
  595. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  596. Use Request::METHOD_GET
  597. * src/RequestGroup.cc (createNextCommandWithAdj)
  598. 2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  599. Defined "OK", "ERR", "INPR" as static const std::string
  600. * src/RequestGroupMan.cc (showDownloadResults)
  601. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  602. Defined default client used in extended handshake as static const
  603. std::string
  604. * src/DefaultBtInteractive.cc (addHandshakeExtendedMessageToQueue)
  605. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  606. Defined AUTH_HEADER, PROXY_AUTH_HEADER as static const std::string
  607. * src/HttpConnection.cc (eraseConfidentialInfo)
  608. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  609. Defined default ftp user and password as static const std::string
  610. * src/AuthConfigFactory.cc
  611. * src/AuthConfigFactory.h
  612. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  613. Defined strings used in netrc as static const std::string
  614. * src/Netrc.cc
  615. * src/Netrc.h
  616. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  617. Defined HTTP status as static const std::string
  618. * src/AbstractProxyResponseCommand.cc
  619. * src/HttpHeader.cc
  620. * src/HttpHeader.h
  621. * src/HttpResponse.cc
  622. * src/HttpResponseCommand.cc
  623. * src/HttpSkipResponseCommand.cc
  624. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  625. Defined "\r\n", "A", "I" as static const std::string
  626. * src/A2STR.cc
  627. * src/A2STR.h
  628. * src/FtpConnection.cc
  629. * src/FtpConnection.h
  630. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  631. Added COLON_C(".") and used it in Request::parseUrl()
  632. * src/A2STR.cc
  633. * src/A2STR.h
  634. * src/Request.cc (parseUrl)
  635. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  636. Changed the type of padName from `const std::string&' to `const char*'.
  637. * src/MSEHandshake.cc (verifyPadLength)
  638. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  639. Defined "sha1" as static const std::string.
  640. * src/MetalinkParserController.cc
  641. * src/MetalinkParserController.h
  642. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  643. Defined message digest algorithm name as static const std::string
  644. * src/DHTTokenTracker.cc
  645. * src/DHTUtil.cc
  646. * src/DefaultBtContext.cc
  647. * src/MSEHandshake.cc
  648. * src/MessageDigestHelper.cc
  649. * src/Peer.cc
  650. * src/messageDigest.cc
  651. * src/messageDigest.h
  652. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  653. Made string literals used in SAX parser static const std::string.
  654. * src/FileMetalinkParserState.cc
  655. * src/FileMetalinkParserState.h
  656. * src/FilesMetalinkParserState.cc
  657. * src/FilesMetalinkParserState.h
  658. * src/InitialMetalinkParserState.cc
  659. * src/InitialMetalinkParserState.h
  660. * src/MetalinkMetalinkParserState.cc
  661. * src/MetalinkMetalinkParserState.h
  662. * src/PiecesMetalinkParserState.cc
  663. * src/PiecesMetalinkParserState.h
  664. * src/ResourcesMetalinkParserState.cc
  665. * src/ResourcesMetalinkParserState.h
  666. * src/VerificationMetalinkParserState.cc
  667. * src/VerificationMetalinkParserState.h
  668. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  669. Use A2STR::SLASH_C, A2STR::DOT_C instead of "/", "." respectively.
  670. * src/A2STR.cc
  671. * src/A2STR.h
  672. * src/File.cc
  673. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  674. Defined static const std::string IP("ip"), PORT("port") and use them
  675. instead of string literals.
  676. * src/DefaultPeerListProcessor.cc
  677. * src/DefaultPeerListProcessor.h
  678. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  679. Made string literals for torrent file processing static const
  680. std::string.
  681. * src/BtContext.cc
  682. * src/BtContext.h
  683. * src/DefaultBtContext.cc
  684. * src/DefaultBtContext.h
  685. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  686. Made string literal for tracker response static const std::string
  687. * src/BtAnnounce.cc
  688. * src/BtAnnounce.h
  689. * src/DefaultBtAnnounce.cc
  690. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  691. Use DHTMessage::T instead of "t".
  692. * src/DHTMessageTracker.cc (messageArrived)
  693. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  694. Made keyName static const. Made trimmed charset static const
  695. std::string.
  696. * src/Util.cc (getContentDispositionFilename)
  697. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  698. Made USER_AGENT const. Made "/" static const std::string.
  699. * src/A2STR.cc
  700. * src/A2STR.h
  701. * src/HttpRequest.cc
  702. * src/HttpRequest.h
  703. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  704. Made string listeral to static const std::string:
  705. "Content-Range", "Content-Length"
  706. * src/HttpHeader.cc
  707. * src/HttpHeader.h
  708. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  709. Made string listeral to static const std::string.
  710. * src/HttpConnection.cc
  711. * src/HttpHeader.cc
  712. * src/HttpHeader.h
  713. * src/HttpResponse.cc
  714. 2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  715. Made string listeral to static const std::string.
  716. * src/A2STR.cc
  717. * src/A2STR.h
  718. * src/SimpleLogger.cc
  719. * src/SimpleLogger.h
  720. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  721. Made string literal to static const std::string.
  722. Rewritten CookieParser::setField.
  723. * src/A2STR.cc
  724. * src/A2STR.h
  725. * src/CookieBoxFactory.cc
  726. * src/CookieBoxFactory.h
  727. * src/CookieParser.cc
  728. * src/CookieParser.h
  729. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  730. Made string literal to static const std::string
  731. * src/DHTAbstractMessage.cc
  732. * src/DHTAnnouncePeerMessage.cc
  733. * src/DHTAnnouncePeerMessage.h
  734. * src/DHTAnnouncePeerReplyMessage.cc
  735. * src/DHTAnnouncePeerReplyMessage.h
  736. * src/DHTFindNodeMessage.cc
  737. * src/DHTFindNodeMessage.h
  738. * src/DHTFindNodeReplyMessage.cc
  739. * src/DHTFindNodeReplyMessage.h
  740. * src/DHTGetPeersMessage.cc
  741. * src/DHTGetPeersMessage.h
  742. * src/DHTGetPeersReplyMessage.cc
  743. * src/DHTGetPeersReplyMessage.h
  744. * src/DHTMessage.cc
  745. * src/DHTMessage.h
  746. * src/DHTMessageFactoryImpl.cc
  747. * src/DHTMessageReceiver.cc
  748. * src/DHTPingMessage.cc
  749. * src/DHTPingMessage.h
  750. * src/DHTPingReplyMessage.cc
  751. * src/DHTPingReplyMessage.h
  752. * src/DHTQueryMessage.cc
  753. * src/DHTQueryMessage.h
  754. * src/DHTResponseMessage.cc
  755. * src/DHTResponseMessage.h
  756. * src/DHTUnknownMessage.cc
  757. * src/DHTUnknownMessage.h
  758. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  759. Made string literal to static const std::string
  760. * src/BtChokeMessage.cc (toString)
  761. * src/BtHaveAllMessage.cc (toString)
  762. * src/BtHaveNoneMessage.cc (toString)
  763. * src/BtInterestedMessage.cc (toString)
  764. * src/BtNotInterestedMessage.cc (toString)
  765. * src/BtUnchokeMessage.cc (toString)
  766. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  767. Replaced "" with static const variable A2STR::NIL.
  768. Replaced string comparison against "" with std::string::empty().
  769. Added PROTO_* to Request class and use them as a protocol string
  770. constant.
  771. Made "started", "stopped", "completed" static const variable in
  772. AnnounceList class.
  773. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  774. Updated translations. Great thanks to translators.
  775. * po/ca.po
  776. * po/de.po
  777. * po/fr.po
  778. * po/it.po
  779. * po/ja.po
  780. * po/ru.po
  781. * po/zh_CN.po
  782. 2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  783. Updated man page; categorized options and fixed typo.
  784. * doc/aria2c.1.txt
  785. * doc/aria2c.1.html
  786. * doc/aria2c.1
  787. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  788. Removed const ref
  789. * src/MetalinkEntry.cc (AddProtocolPreference)
  790. * src/RequestGroup.cc (FindServerHostByHostname)
  791. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  792. Rewritten Accept-Features handling.
  793. * src/HttpRequestCommand.cc (createHttpRequest)
  794. * src/a2functional.h
  795. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  796. Changed method signature:
  797. DHTAbstractNodeLookupTask::toEntries
  798. * src/DHTAbstractNodeLookupTask.cc
  799. * src/DHTAbstractNodeLookupTask.h
  800. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  801. Changed method signature:
  802. BtContext::computeFastSet, DefaultBtContext::extractUrlList
  803. * src/BtContext.h
  804. * src/DefaultBtContext.cc
  805. * src/DefaultBtContext.h
  806. * src/DefaultBtInteractive.cc
  807. * test/DefaultBtContextTest.cc
  808. * test/MockBtContext.h
  809. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  810. Changed method signature:
  811. MultiFileAllocationIterator::makeDiskWriterEntries
  812. * src/MultiFileAllocationIterator.cc
  813. * src/MultiFileAllocationIterator.h
  814. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  815. Changed method sinature:
  816. MetalinkEntry::toFileEntry,
  817. MetalinkHelper::query, MetalinkHelper::parseAndQuery,
  818. Metalinker::queryEntry
  819. * src/Metalink2RequestGroup.cc
  820. * src/MetalinkEntry.cc
  821. * src/MetalinkEntry.h
  822. * src/MetalinkHelper.cc
  823. * src/MetalinkHelper.h
  824. * src/Metalinker.cc
  825. * src/Metalinker.h
  826. * src/main.cc
  827. * test/MetalinkHelperTest.cc
  828. * test/MetalinkerTest.cc
  829. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  830. Changed method sinature:
  831. RequestGroup::getURIs
  832. * src/RequestGroup.cc
  833. * src/RequestGroup.h
  834. * test/Metalink2RequestGroupTest.cc
  835. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  836. Changed method signature:
  837. PeerListProcessor::extractPeer
  838. * src/CompactPeerListProcessor.cc
  839. * src/CompactPeerListProcessor.h
  840. * src/DefaultBtAnnounce.cc
  841. * src/DefaultPeerListProcessor.cc
  842. * src/DefaultPeerListProcessor.h
  843. * src/DelegatingPeerListProcessor.cc
  844. * src/DelegatingPeerListProcessor.h
  845. * src/PeerListProcessor.h
  846. * src/UTPexExtensionMessage.cc
  847. * test/DefaultPeerListProcessorTest.cc
  848. 2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  849. Changed method signature:
  850. BtRequestFactory::createRequestMessages,
  851. BtRequestFactory::createRequestMessagesOnEndGame
  852. * src/BtRequestFactory.h
  853. * src/DefaultBtInteractive.cc
  854. * src/DefaultBtRequestFactory.cc
  855. * src/DefaultBtRequestFactory.h
  856. * test/DefaultBtRequestFactoryTest.cc
  857. * test/MockBtRequestFactory.h
  858. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  859. Changed method signature:
  860. PieceStorage::getInFlightPieces
  861. * src/DefaultBtProgressInfoFile.cc
  862. * src/DefaultPieceStorage.cc
  863. * src/DefaultPieceStorage.h
  864. * src/PieceStorage.h
  865. * src/UnknownLengthPieceStorage.cc
  866. * src/UnknownLengthPieceStorage.h
  867. * test/DefaultBtProgressInfoFileTest.cc
  868. * test/MockPieceStorage.h
  869. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  870. Changed method signature:
  871. PostDownloadHandler::getNextRequestGroups
  872. Metalink2RequestGroup::generate
  873. RequestGroup::postDownloadProcessing
  874. * src/BtPostDownloadHandler.cc
  875. * src/BtPostDownloadHandler.h
  876. * src/Metalink2RequestGroup.cc
  877. * src/Metalink2RequestGroup.h
  878. * src/MetalinkPostDownloadHandler.cc
  879. * src/MetalinkPostDownloadHandler.h
  880. * src/PostDownloadHandler.h
  881. * src/RequestGroup.cc
  882. * src/RequestGroup.h
  883. * src/RequestGroupMan.cc
  884. * src/main.cc
  885. * test/BtPostDownloadHandlerTest.cc
  886. * test/Metalink2RequestGroupTest.cc
  887. * test/MetalinkPostDownloadHandlerTest.cc
  888. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  889. Rewritten AccRequestGroup
  890. * src/main.cc
  891. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  892. Rewritten.
  893. * src/TaggedItem.cc (toTagString)
  894. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  895. Rewritten Accept-Features handling.
  896. * src/HttpRequestCommand.cc (createHttpRequest)
  897. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  898. Rewritten accept types handling.
  899. * HttpRequest.cc (createRequest)
  900. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  901. Rewritten
  902. * src/FeatureConfig.cc (featureSummary)
  903. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  904. Changed method signature:
  905. PeerStorage::getActivePeers
  906. * src/DHTPeerAnnounceEntry.cc
  907. * src/DefaultPeerStorage.cc
  908. * src/DefaultPeerStorage.h
  909. * src/PeerStorage.h
  910. * test/DefaultPeerStorageTest.cc
  911. * test/MockPeerStorage.h
  912. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  913. Changed method signature:
  914. DHTPeerAnnounceStorage::getPeers,
  915. DHTPeerAnnounceEntry::getPeers
  916. * src/DHTGetPeersMessage.cc
  917. * src/DHTPeerAnnounceEntry.cc
  918. * src/DHTPeerAnnounceEntry.h
  919. * src/DHTPeerAnnounceStorage.cc
  920. * src/DHTPeerAnnounceStorage.h
  921. * test/DHTAnnouncePeerMessageTest.cc
  922. * test/DHTPeerAnnounceEntryTest.cc
  923. * test/DHTPeerAnnounceStorageTest.cc
  924. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  925. Changed method signature:
  926. NameResolver::resolve
  927. * src/DHTEntryPointNameResolveCommand.cc
  928. * src/InitiateConnectionCommand.cc
  929. * src/NameResolver.cc
  930. * src/NameResolver.h
  931. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  932. Changed method signature:
  933. PieceStorage::getAdvertisedPieceIndexes
  934. * src/DefaultBtInteractive.cc
  935. * src/DefaultPieceStorage.cc
  936. * src/DefaultPieceStorage.h
  937. * src/PieceStorage.h
  938. * src/UnknownLengthPieceStorage.h
  939. * test/MockPieceStorage.h
  940. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  941. Changed method signature:
  942. SegmentMan::getInFlightSegment
  943. * src/AbstractCommand.cc
  944. * src/SegmentMan.cc
  945. * src/SegmentMan.h
  946. * test/SegmentManTest.cc
  947. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  948. Changed method signature:
  949. DHTAbstractNodeLookupTask::getNodesFromMessage
  950. * src/DHTAbstractNodeLookupTask.cc
  951. * src/DHTAbstractNodeLookupTask.h
  952. * src/DHTNodeLookupTask.cc
  953. * src/DHTNodeLookupTask.h
  954. * src/DHTPeerLookupTask.cc
  955. * src/DHTPeerLookupTask.h
  956. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  957. Pass std::deque<Command*> by reference to avoid unnecessary coping.
  958. * src/AbstractCommand.cc
  959. * src/BtCheckIntegrityEntry.cc
  960. * src/BtCheckIntegrityEntry.h
  961. * src/BtFileAllocationEntry.cc
  962. * src/BtFileAllocationEntry.h
  963. * src/BtSetup.cc
  964. * src/BtSetup.h
  965. * src/CheckIntegrityCommand.cc
  966. * src/CheckIntegrityEntry.h
  967. * src/ChecksumCheckIntegrityEntry.cc
  968. * src/ChecksumCheckIntegrityEntry.h
  969. * src/DHTSetup.cc
  970. * src/DHTSetup.h
  971. * src/DownloadEngine.cc
  972. * src/FileAllocationCommand.cc
  973. * src/FileAllocationEntry.h
  974. * src/RequestGroup.cc
  975. * src/RequestGroup.h
  976. * src/RequestGroupMan.cc
  977. * src/RequestGroupMan.h
  978. * src/StreamCheckIntegrityEntry.cc
  979. * src/StreamCheckIntegrityEntry.h
  980. * src/StreamFileAllocationEntry.cc
  981. * src/StreamFileAllocationEntry.h
  982. * src/TrackerWatcherCommand.cc
  983. * src/a2functional.h
  984. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  985. Changed method signature:
  986. BNode::findClosestKNodes, BNode:: enumerateBucket,
  987. DHTBucket::getGoodNodes,
  988. DHTRoutingTable::getClosestKNodes, DHTRoutingTable::getBuckets
  989. * src/BNode.cc
  990. * src/BNode.h
  991. * src/DHTAbstractNodeLookupTask.cc
  992. * src/DHTAutoSaveCommand.cc
  993. * src/DHTBucket.cc
  994. * src/DHTBucket.h
  995. * src/DHTBucketRefreshTask.cc
  996. * src/DHTFindNodeMessage.cc
  997. * src/DHTGetPeersMessage.cc
  998. * src/DHTRoutingTable.cc
  999. * src/DHTRoutingTable.h
  1000. * test/BNodeTest.cc
  1001. * test/DHTBucketTest.cc
  1002. * test/DHTRoutingTableTest.cc
  1003. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1004. In piece selection functions, Pass std::deque<...> by reference rather
  1005. than returning it.
  1006. * src/BitfieldMan.cc
  1007. * src/BitfieldMan.h
  1008. * src/DefaultBtRequestFactory.cc
  1009. * src/DefaultPieceStorage.cc
  1010. * src/Piece.cc
  1011. * src/Piece.h
  1012. * test/BitfieldManTest.cc
  1013. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1014. Implemented rarest piece first piece selection strategy.
  1015. * src/AbstractBtMessage.cc
  1016. * src/AbstractBtMessage.h
  1017. * src/BitfieldMan.cc
  1018. * src/BitfieldMan.h
  1019. * src/BtBitfieldMessage.cc
  1020. * src/BtHaveAllMessage.cc
  1021. * src/BtHaveMessage.cc
  1022. * src/DefaultPieceStorage.cc
  1023. * src/DefaultPieceStorage.h
  1024. * src/PeerInteractionCommand.cc
  1025. * src/PieceStorage.h
  1026. * src/UnknownLengthPieceStorage.h
  1027. 2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1028. Rewritten readData and writeData.
  1029. * src/MultiDiskAdaptor.cc
  1030. * src/MultiDiskAdaptor.h
  1031. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1032. Move \n out of the message "Usage: ...".
  1033. * src/version_usage.cc
  1034. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1035. Bump up version number to 0.13.2b.
  1036. * configure.ac
  1037. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1038. Added const qualifier to argument Exception& e.
  1039. * src/Logger.h
  1040. * src/SimpleLogger.cc
  1041. * src/SimpleLogger.h
  1042. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1043. Pool connection when CWD, SIZE command fails.
  1044. * src/FtpNegotiationCommand.cc
  1045. * src/FtpNegotiationCommand.h
  1046. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1047. Renamed HttpNullDownloadCommand as HttpSkipResponseCommand
  1048. * src/HttpResponseCommand.cc
  1049. * src/HttpSkipResponseCommand.cc
  1050. * src/HttpSkipResponseCommand.h
  1051. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1052. Pool connection when a server returns 4xx, 5xx responses.
  1053. * src/HttpNullDownloadCommand.cc
  1054. * src/HttpNullDownloadCommand.h
  1055. * src/HttpResponse.cc
  1056. * src/HttpResponse.h
  1057. * src/HttpResponseCommand.cc
  1058. * src/HttpResponseCommand.h
  1059. * test/HttpResponseTest.cc
  1060. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1061. Print usage when no URL is specifed or bad command-line option is
  1062. specified.
  1063. * src/HelpItemFactory.cc
  1064. * src/help_tags.h
  1065. * src/option_processing.cc
  1066. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1067. Removed duplicate log message.
  1068. * src/AbstractCommand.cc (asyncResolveHostname)
  1069. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1070. Updated man page: --async-dns and --ftp-reuse-connection were added.
  1071. Changed -j option's default value from 5 to 1.
  1072. Added new examples using protocol auto detection feature.
  1073. Removed -T, -M usage where it can be omitted.
  1074. * doc/aria2c.1.txt
  1075. * doc/aria2c.1.html
  1076. * doc/aria2c.1.txt
  1077. 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1078. Updated command-line usage text, so that it tells users that they
  1079. can specify any number of torrent files and metalink files in
  1080. command-line.
  1081. * src/version_usage.cc
  1082. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1083. Changed the default value of -j option to 1.
  1084. * src/HelpItemFactory.cc
  1085. * src/option_processing.cc
  1086. * src/usage_text.h
  1087. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1088. Added the ability to reuse connection in FTP and it is enabled by
  1089. default. It can be disabled by --ftp-reuse-connection=false option.
  1090. * src/Command.cc
  1091. * src/DownloadCommand.cc
  1092. * src/FtpDownloadCommand.cc
  1093. * src/FtpDownloadCommand.h
  1094. * src/FtpFinishDownloadCommand.cc
  1095. * src/FtpFinishDownloadCommand.h
  1096. * src/FtpInitiateConnectionCommand.cc
  1097. * src/FtpNegotiationCommand.cc
  1098. * src/FtpNegotiationCommand.h
  1099. * src/HelpItemFactory.cc
  1100. * src/Makefile.am
  1101. * src/Makefile.in
  1102. * src/OptionHandlerFactory.cc
  1103. * src/option_processing.cc
  1104. * src/prefs.h
  1105. * src/usage_text.h
  1106. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1107. Call Command::transitStatus() before calling Command::execute(),
  1108. so that the status change made in execute() is not cleared.
  1109. * src/DownloadEngine.cc
  1110. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1111. Removed forward declaration of SocketCore class.
  1112. * src/HttpDownloadCommand.h
  1113. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1114. Set Request::setKeepAliveHint() and Request::setPipeliningHint()
  1115. in InitiateConnectionCommandFactory. They should be set only when
  1116. the protocol is HTTP or HTTPS.
  1117. * src/InitiateConnectionCommandFactory.cc
  1118. * src/RequestGroup.cc
  1119. 2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1120. Fixed infinite loop in checksum checking.
  1121. * src/IteratableChecksumValidator.cc
  1122. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1123. Set _supportsPersistentConnection to true by default.
  1124. * src/Request.cc
  1125. * src/RequestGroup.cc
  1126. * test/HttpRequestTest.cc
  1127. * test/RequestTest.cc
  1128. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1129. Added timeout to socket pool. The default timeout is 15 seconds,
  1130. which is the same value Apache uses.
  1131. * src/DownloadEngine.cc
  1132. * src/DownloadEngine.h
  1133. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1134. Fixed misuse of multimap::find()
  1135. * src/HttpHeader.cc
  1136. * test/HttpHeaderTest.cc
  1137. 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1138. Rewritten name resolver. Now async DNS can be disabled by --async-dns
  1139. option.
  1140. The asynchronous DNS is not capable of IPv6 yet.
  1141. By disabling asynchronous DNS, aria2 is IPv6 enabled application, at
  1142. least for HTTP download.
  1143. * src/AbstractCommand.cc
  1144. * src/AbstractCommand.h
  1145. * src/AsyncNameResolver.cc
  1146. * src/AsyncNameResolver.h
  1147. * src/DHTEntryPointNameResolveCommand.cc
  1148. * src/DHTEntryPointNameResolveCommand.h
  1149. * src/DownloadEngine.cc
  1150. * src/DownloadEngine.h
  1151. * src/FtpInitiateConnectionCommand.cc
  1152. * src/FtpInitiateConnectionCommand.h
  1153. * src/HelpItemFactory.cc
  1154. * src/HttpInitiateConnectionCommand.cc
  1155. * src/HttpInitiateConnectionCommand.h
  1156. * src/InitiateConnectionCommand.cc
  1157. * src/InitiateConnectionCommand.h
  1158. * src/Makefile.am
  1159. * src/Makefile.in
  1160. * src/NameResolver.cc
  1161. * src/NameResolver.h
  1162. * src/OptionHandlerFactory.cc
  1163. * src/SocketCore.cc
  1164. * src/SocketCore.h
  1165. * src/Util.cc
  1166. * src/Util.h
  1167. * src/option_processing.cc
  1168. * src/prefs.h
  1169. * src/usage_text.h
  1170. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1171. Updated man page: --quiet, --header were added.
  1172. --metalink-servers and --enable-http-keep-alive option were updated.
  1173. * doc/aria2c.1
  1174. * doc/aria2c.1.html
  1175. * doc/aria2c.1.txt
  1176. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1177. Enable HTTP keep-alive by default.
  1178. * src/HelpItemFactory.cc
  1179. * src/option_processing.cc
  1180. * src/usage_text.h
  1181. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1182. Disable http keep-alive if the remote server is not HTTP/1.1.
  1183. * src/HttpConnection.cc
  1184. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1185. Receive content body of 302 response so that the connection can be
  1186. reused later when http keep-alive is enabled.
  1187. * src/HttpNullDownloadCommand.cc
  1188. * src/HttpNullDownloadCommand.h
  1189. * src/HttpResponseCommand.cc
  1190. * src/HttpResponseCommand.h
  1191. 2008-05-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1192. const SharedHandle<Request> -> const SharedHandle<Request>&
  1193. * src/FtpDowndloadCommand.cc
  1194. * src/FtpDowndloadCommand.h
  1195. * src/HttpDownloadCommand.cc
  1196. * src/HttpDownloadCommand.h
  1197. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1198. Fixed the bug that the control file(.aria2 file) is not renamed
  1199. according to tryAutoFileRenaming().
  1200. tryAutoFileRenaming() was rewritten so that if both renamed file and
  1201. its control file exist, use them and continue download.
  1202. The old implementation didn't take into account of control file's
  1203. existence, so basically you couldn't continue download of renamed file.
  1204. * src/BtProgressInfoFile.h
  1205. * src/DefaultBtProgressInfoFile.cc
  1206. * src/DefaultBtProgressInfoFile.h
  1207. * src/NullProgressInfoFile.h
  1208. * src/RequestGroup.cc
  1209. * test/DefaultBtProgressInfoFileTest.cc
  1210. * test/MockBtProgressInfoFile.h
  1211. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1212. Change the default value of --metalink-servers option from `5' to `1'.
  1213. * src/HelpItemFactory.cc
  1214. * src/option_processing.cc
  1215. * src/usage_text.h
  1216. 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1217. Reimplemented transparent metalink using Accept request header.
  1218. * src/HttpRequest.cc
  1219. * src/HttpRequest.h
  1220. * src/HttpRequestCommand.cc
  1221. * src/Metalink2RequestGroup.cc
  1222. * src/RequestGroup.cc
  1223. * src/RequestGroup.h
  1224. * test/HttpRequestTest.cc
  1225. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1226. Bump up version number to 0.13.2a
  1227. * configure.ac
  1228. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1229. Updated configure.ac using the result of autoscan.
  1230. * configure.ac
  1231. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1232. Fixed compilation error without gcrypt/openssl.
  1233. * src/DownloadCommand.cc
  1234. * src/DownloadCommand.h
  1235. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1236. Reorganized version information so that it can be displayed in a
  1237. standard terminal screen without scrolling.
  1238. Removed http, ftp from Configuration section, because they are always
  1239. enabled.
  1240. * src/FeatureConfig.cc
  1241. * src/FeatureConfig.h
  1242. * src/main.cc
  1243. * src/messageDigest.cc
  1244. * src/messageDigest.h
  1245. * src/version_usage.cc
  1246. * test/FeatureConfigTest.cc
  1247. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1248. Masked user ID in log.
  1249. * src/FtpConnection.cc (sendUser)
  1250. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1251. Removed query part from filename in HTTP download. The query part means
  1252. the substring after "?" in URL. Firefox seems do the same thing.
  1253. A query part is sometimes very long and not suitable to filename,
  1254. so I think it is better to remove it from filename.
  1255. * src/HttpRequest.cc
  1256. * src/HttpRequest.h
  1257. * src/Request.cc
  1258. * src/Request.h
  1259. * test/HttpRequestTest.cc
  1260. * test/RequestTest.cc
  1261. 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1262. Rewritten Exception class. Throw exception object, not its pointer and
  1263. catch by reference, so that remove problematic delete operator for
  1264. catched exception.
  1265. * src/Exception.cc
  1266. * src/Exception.h
  1267. * test/ExceptionTest.cc
  1268. * src/*: All files throwing/catching exception.
  1269. * test/*: All files throwing/catching exception.
  1270. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1271. Now auto protocol detection is enabled without -Z option.
  1272. But there is a important difference between with/without -Z optoin.
  1273. For example, if you type:
  1274. aria2c http://host/file file1.torrent file2.metalink http://mirror/file
  1275. then, aria2 interprets there are 3 request groups:
  1276. (1) http://host/file, http://mirror/file <-- multi-source download
  1277. (2) file1.torrent
  1278. (3) file2.metalink
  1279. On the other hand, if you invoke above command with -Z option, it is
  1280. interpreted as 4 request groups:
  1281. (1) http://host/file
  1282. (2) file1.torrent
  1283. (3) file2.metalink
  1284. (4) http://mirror/file
  1285. I think usually user don't mix multi-source URLs and torrent files, so
  1286. there is no big problem here.
  1287. * src/main.cc
  1288. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1289. Fixed the bug that causes segmentaion fault when reading XML containing
  1290. unescapsed character like '&'.
  1291. Also a modification was made which avoids adding unnecessary
  1292. characters stack and appending unused string.
  1293. * src/ExpatMetalinkProcessor.cc
  1294. * src/FileMetalinkParserState.h
  1295. * src/FilesMetalinkParserState.h
  1296. * src/FinMetalinkParserState.h
  1297. * src/HashMetalinkParserState.h
  1298. * src/InitialMetalinkParserState.h
  1299. * src/LanguageMetalinkParserState.h
  1300. * src/MetalinkMetalinkParserState.h
  1301. * src/MetalinkParserState.h
  1302. * src/MetalinkParserStateMachine.cc
  1303. * src/MetalinkParserStateMachine.h
  1304. * src/OSMetalinkParserState.h
  1305. * src/PieceHashMetalinkParserState.h
  1306. * src/PiecesMetalinkParserState.h
  1307. * src/ResourcesMetalinkParserState.h
  1308. * src/SizeMetalinkParserState.h
  1309. * src/SkipTagMetalinkParserState.h
  1310. * src/URLMetalinkParserState.h
  1311. * src/VerificationMetalinkParserState.h
  1312. * src/VersionMetalinkParserState.h
  1313. * src/XML2SAXMetalinkProcessor.cc
  1314. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1315. Added StringFormat class, which internally calls vasprintf.
  1316. operator<< is defined for this class, so it can be used with iostream
  1317. classes nicely. SimpleLogger and following functions are rewritten
  1318. using StringFormat class.
  1319. Besides, now Logger class's methods are non-const, many classes
  1320. that has a const Logger* as a member variable are modified to remove
  1321. const qualifier from the variable declaration.
  1322. * src/HelpItemFactory.cc
  1323. * src/Request.cc
  1324. * src/SimpleLogger.cc
  1325. * src/StringFormat.cc
  1326. * src/StringFormat.h
  1327. * src/Util.cc
  1328. * src/option_processing.cc
  1329. * src/version_usage.cc
  1330. * test/StringFormatTest.cc
  1331. * src/*.h: The classes that has const Logger* as a member variable.
  1332. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1333. Log error in AccRequestGroup when reading BitTorrent/Metalink file is
  1334. failed. Also fixed memory link when exception is thrown there.
  1335. * src/main.cc (AccRequestGroup)
  1336. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1337. Added build-in "Accept-Features" support. For now only "metalink" is
  1338. used in this header field.
  1339. This "metalink" value is removed from the list when connecting URLs
  1340. fed by metalink file to avoid loop in "transparent" metlaink.
  1341. * src/HttpRequest.cc
  1342. * src/HttpRequest.h: Renamed _userHeaders as _headers. Accept-Features
  1343. header is also held in this variable. Also renamed setUserHeaders as
  1344. addHeader and it was rewritten to add header not just to clear the old
  1345. value.
  1346. * src/HttpRequestCommand.cc
  1347. * src/Metalink2RequestGroup.cc: Added the code to remove "metalink"
  1348. from "Accept-Features" list.
  1349. * src/RequestGroup.cc: Added "metalink" to "Accept-Features" by
  1350. default.
  1351. * src/RequestGroup.h
  1352. * src/TaggedItem.cc: Moved Concat class to a2functional.h.
  1353. * src/a2functional.h: Included <string> because Concat class depends on
  1354. it.
  1355. * test/HttpRequestTest.cc
  1356. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1357. Added comment
  1358. * src/RequestGroup.cc (createNextCommand)
  1359. 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1360. Capitalized METHOD_GET and METHOD_HEAD
  1361. * src/Request.cc
  1362. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1363. Added getDownloadResults() method
  1364. * src/RequestGroupMan.cc
  1365. * src/RequestGroupMan.h
  1366. 2008-04-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1367. Fixed the bug that aria2 exits when commands is empty() but
  1368. _routineCommands are not.
  1369. * src/DownloadEngine.cc
  1370. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1371. Use the default value pulled from Option object in HelpItemFactory.
  1372. except options whose defualt value is embedded in a usage text.
  1373. * src/HelpItemFactory.cc
  1374. * src/HelpItemFactory.h
  1375. * src/option_processing.cc
  1376. * src/version_usage.cc
  1377. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1378. Added --quiet option to make aria2 quiet (no console output).
  1379. --quiet option is tagged with ADVANCED.
  1380. * src/HelpItemFactory.cc
  1381. * src/LogFactory.cc
  1382. * src/LogFactory.h
  1383. * src/MultiUrlRequestInfo.cc
  1384. * src/MultiUrlRequestInfo.h
  1385. * src/NullStatCalc.h: New class. This class prints nothing.
  1386. * src/OptionHandlerFactory.cc
  1387. * src/main.cc
  1388. * src/option_processing.cc
  1389. * src/prefs.h
  1390. * src/usage_text.h
  1391. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1392. Add HTTP tag to --header option. Removed ADVANCED tag instead.
  1393. * src/HelpItemFactory.cc (createHelpItems):
  1394. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1395. Fixed compilation error in ExpatMetalinkProcessor.cc
  1396. * src/ExpatMetalinkProcessor.cc
  1397. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1398. Reuse socket if the origin server supports HTTP keep-alive and
  1399. --enable-http-keep-alive or --enable-http-pipelining is given.
  1400. The current implementation doesn't reuse the connections established
  1401. against proxy server.
  1402. * src/AbstractCommand.cc
  1403. * src/DownloadEngine.cc
  1404. * src/DownloadEngine.h
  1405. * src/HttpDownloadCommand.cc
  1406. * src/HttpInitiateConnectionCommand.cc
  1407. * src/HttpResponseCommand.cc
  1408. 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1409. Rewritten HTTP keep-alive and pipelining routine.
  1410. * src/AbstractCommand.cc
  1411. * src/HttpConnection.cc
  1412. * src/HttpDownloadCommand.cc
  1413. * src/HttpRequest.cc
  1414. * src/HttpRequestCommand.cc
  1415. * src/HttpResponseCommand.cc
  1416. * src/Request.cc
  1417. * src/Request.h
  1418. * src/RequestGroup.cc
  1419. * test/HttpRequestTest.cc
  1420. * test/HttpResponseTest.cc
  1421. * test/RequestTest.cc
  1422. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1423. Added missing setUserHeaders call
  1424. * src/HttpRequestCommand.cc
  1425. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1426. Call FileAllocationMan::nextFileAllocationEntryExists() first.
  1427. Calling FileAllocationMan::isFileAllocationBeingExecuted() is somwhat
  1428. waste of time because it is more likey false.
  1429. * src/FileAllocationDispatcherCommand.cc (execute)
  1430. 2008-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1431. Now HTTP status and version are a member variable of HttpHeader.
  1432. HTTP status is processed as a string, not integer.
  1433. * src/AbstractProxyResponseCommand.cc
  1434. * src/HttpConnection.cc
  1435. * src/HttpHeader.cc
  1436. * src/HttpHeader.h
  1437. * src/HttpHeaderProcessor.cc
  1438. * src/HttpHeaderProcessor.h
  1439. * src/HttpResponse.cc
  1440. * src/HttpResponse.h
  1441. * test/HttpHeaderProcessorTest.cc
  1442. * test/HttpResponseTest.cc
  1443. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1444. Added --header option. You can specify any number of additional HTTP headers
  1445. like:
  1446. aria2 --header="X-A: 300" --header="X-B: 900" http://host/file
  1447. Unlike other commad-line option, you can use --header option multiple times.
  1448. * src/HelpItemFactory.cc
  1449. * src/HttpRequest.{cc, h}
  1450. * src/HttpRequestCommand.cc
  1451. * src/OptionHandlerFactory.cc
  1452. * src/OptionHandlerImpl.h
  1453. * src/option_processing.cc
  1454. * src/prefs.h
  1455. * src/usage_text.h
  1456. * test/HttpRequestTest.cc (testUserHeaders)
  1457. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1458. Eliminates the time lag between sequential downloads and commands in
  1459. the same RequestGroup.
  1460. In old implementation, aria2 occasionally waits 1 seconds before
  1461. executing next command or RequestGroup.
  1462. This is really a waste of time, and new implementation eliminates
  1463. this unnecessary time lag.
  1464. * src/AbstractCommand.cc
  1465. * src/AutoSaveCommand.cc
  1466. * src/CheckIntegrityCommand.cc
  1467. * src/Command.{cc, h}
  1468. * src/DownloadEngine.{cc, h}
  1469. * src/DownloadEngineFactory.cc
  1470. * src/FileAllocationCommand.cc
  1471. * src/FileAllocationDispatcherCommand.cc
  1472. * src/FillRequestGroupCommand.cc
  1473. * src/FtpInitiateConnectionCommand.cc
  1474. * src/HaveEraseCommand.cc
  1475. * src/HttpInitiateConnectionCommand.cc
  1476. * src/HttpResponseCommand.cc
  1477. * src/RealtimeCommand.cc
  1478. * src/RequestGroup.cc
  1479. * src/RequestGroupMan.cc
  1480. * src/StreamFileAllocationEntry.cc
  1481. * src/TimeBasedCommand.{cc, h}
  1482. * src/TimedHaltCommand.cc
  1483. 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1484. Rewritten SharedHandle. Now copy constructor taking raw pointer has
  1485. keyword explicit and SharedHandle's default constructor initializes
  1486. its internal obj to null, old implementation initializes it using
  1487. obj's default constructor.
  1488. To assign null, write SharedHandle<T> x(...); x.reset();
  1489. TODO: test/SharedHandleTest.cc needs more tests.
  1490. * src/SharedHandle.h
  1491. 2008-04-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1492. Fixed type in man page.
  1493. * doc/aria2c.1.txt
  1494. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1495. Merged Ross's 0.13.1+1 Cygwin compile fix patch.
  1496. * src/SimpleLogger.{cc, h}
  1497. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1498. Implemented auto protocol detection.
  1499. Now you can do:
  1500. aria2c -Z http://host/file file1.torrent file2.metalink
  1501. (Note: -Z option is required for auto protcol detection.)
  1502. Then aria2c downloads 3 files simultaneously:
  1503. 1. http://host/file
  1504. 2. file1.torrent <-- read local torrent file
  1505. 3. file2.metalink <-- read local Metalink file.
  1506. Same thing goes with -i option. Assume your uris.txt contans:
  1507. http://host/file
  1508. file1.torrent
  1509. file2.metalink
  1510. Then you can do: aria2c -i uris.txt
  1511. (Note: -Z option is not needed if -i option is given.)
  1512. * src/main.cc
  1513. * src/ProtocolDetector.{cc, h}
  1514. * test/ProtocolDetectorTest.cc
  1515. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1516. Fixed compile error without gnutls/libgcrypt/libgpg-error and openSSL
  1517. installed
  1518. * src/ARC4Encryptor.h
  1519. * src/ARC4Decryptor.h
  1520. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1521. Renamed argument from 'errno' to 'err', since errno is confused with
  1522. errno defined in errno.h.
  1523. * src/LibgcryptARC4Decryptor.h
  1524. * src/LibgcryptARC4Context.h
  1525. * src/LibgcryptDHKeyExchange.h
  1526. * src/LibgcryptARC4Encryptor.h
  1527. 2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1528. Rewritten choking algorithm.
  1529. * src/PeerChokeCommand.{cc, h}
  1530. * src/BtInterestedMessage.cc
  1531. * src/PeerSessionResource.{cc, h}
  1532. * src/DefaultPeerStorage.{cc, h}
  1533. * src/BtNotInterestedMessage.cc
  1534. * src/DefaultBtMessageDispatcher.{cc, h}
  1535. * src/BtMessageDispatcher.h
  1536. * src/Peer.{cc, h}
  1537. * src/BtLeecherStateChoke.{cc, h}
  1538. * src/BtSetup.cc
  1539. * src/BtSeederStateChoke.{cc, h}
  1540. * src/PeerStorage.h
  1541. * test/MockPeerStorage.h
  1542. * test/MockBtMessageDispatcher.h
  1543. 2008-04-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1544. Fixed compilation error on x84-64 platform.
  1545. * src/AuthConfig.cc: Included ostream.
  1546. 2008-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1547. Rewritten getBasename() and getDirname(), without standard library
  1548. basename(), dirname().
  1549. * src/File.cc
  1550. * test/FileTest.cc
  1551. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1552. Added Simplified Chinese translation. Also updated the following
  1553. translations: Polish, Dutch, German. Great thanks to all translators.
  1554. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1555. Suppress content-range error when 'Content-Range' response header
  1556. doesn't contains bytes-unit specifier 'bytes'
  1557. * src/HttpHeader.cc (getRange)
  1558. * test/HttpHeaderTest.cc
  1559. 2008-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1560. Fixed compilation error with g++-4.3
  1561. 2008-03-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1562. Added missing include files for MinGW
  1563. * test/HttpHeaderProcessorTest.cc
  1564. * test/DHTRoutingTableSerializerTest.cc
  1565. * test/DHTRoutingTableDeserializerTest.cc
  1566. * test/UriListParserTest.cc
  1567. 2008-03-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1568. Now download line is printed nicely with no garbage at the end of
  1569. line. I use ioctl to get the columns of terminal.
  1570. If stdout is redirected to another device, instead of carriage return,
  1571. end of line '\n' character is used. This is feature request#1909659
  1572. * src/ConsoleStatCalc.cc (calculateStat)
  1573. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1574. Included a2time.h
  1575. * src/DHTMessageDispatcher.h
  1576. * src/DHTMessageEntry.h
  1577. * src/DHTReplaceNodeTask.h
  1578. * src/DHTMessageTracker.h
  1579. * src/Util.h
  1580. * src/CookieBox.h
  1581. * src/SocketCore.h
  1582. * src/DefaultBtMessageDispatcher.h
  1583. * src/SocketCore.cc
  1584. * src/Util.cc
  1585. * src/DHTPingTask.h
  1586. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1587. Fixed high memory footprint when DHT is enabled.
  1588. This is not a memory leak, but DHTReplaceNodeTask is more frequently
  1589. queued than it is processed and the queue is getting longer. As a
  1590. consequence, momory usage is increased.
  1591. As for a fix, instead of issuing DHTReplaceNodeTask, I've implemented
  1592. replacement cache in DHTBucket which is described in Kademlia paper.
  1593. * src/DHTRoutingTable.cc (addNode): Removed the issuing of
  1594. DHTReplaceNodeTask.
  1595. * src/DHTBucket.{h, cc}
  1596. (cacheNode): New function.
  1597. (getCachedNodes): New function.
  1598. (dropNode): Push back cached node to _nodes.
  1599. * test/DHTBucketTest.cc
  1600. (testCacheNode): New test
  1601. (testDropNode): New test
  1602. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1603. Allocate memory for peekBuf in initiateSecureConnection() to avoid
  1604. the unused 4KB memory when ssl is not used.
  1605. * src/SocketCore.cc
  1606. 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1607. Added summary log for peer announce storage.
  1608. * src/DHTPeerAnnounceStorage.cc (handleTimeout)
  1609. Removed cast
  1610. * src/DefaultPeerStorage.cc (addPeer)
  1611. Log exception message
  1612. * src/DHTMessageTracker.cc (handleTimeout)
  1613. Fixed casting
  1614. * test/HttpRequestTest.cc
  1615. * test/MetalinkProcessorTest.cc
  1616. * test/PieceTest.cc
  1617. * test/MetalinkEntryTest.cc
  1618. * test/SequenceTest.cc
  1619. 2008-03-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1620. * src/ParameterizedStringParser.cc (createLoop):
  1621. Removed unused variable sstep.
  1622. * src/AlphaNumberDecorator.h (decode): Rewritten.
  1623. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1624. * src/Util.{h, cc}
  1625. (parseUInt): New function.
  1626. (alphaToNum): Now returns unsigned int and 0 when overflow detected.
  1627. The actual range is uint32_t.
  1628. * test/UtilTest.cc
  1629. * src/ParameterizedStringParser.cc:
  1630. Use Util::parseUInt() for loop variables.
  1631. * test/ParameterizedStringParserTest.cc
  1632. * src/PStringNumLoop.h: Make _startValue and _endValue unsigned int.
  1633. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1634. Rewritten the functions for binding port.
  1635. * src/DHTConnectionImpl.{h, cc}
  1636. * src/PeerListenCommand.{h, cc}
  1637. * src/DHTSetup.cc
  1638. * src/BtSetup.cc
  1639. * test/DHTConnectionImplTest.cc
  1640. 2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1641. type cleanup for allmost all remaining files.
  1642. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1643. Type clarification
  1644. * src/PeerSessionResource.{h, cc}
  1645. * src/DefaultPieceStorage.{h, cc}
  1646. * src/Peer.{h, cc}
  1647. * test/PeerSessionResourceTest.cc
  1648. Use div function
  1649. * src/BtPieceMessage.cc (erasePieceOnDisk)
  1650. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1651. Type clarification
  1652. * src/DefaultPeerStorage.{h, cc}
  1653. * test/DefaultPeerStorageTest.cc
  1654. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1655. Type clarification: size_t for length or size, uint64_t for file
  1656. length, off_t for file offset.
  1657. * src/DefaultBtProgressInfoFile.cc
  1658. * src/DefaultBtContext.{h, cc}
  1659. * src/DefaultBtInteractive.cc
  1660. * src/DownloadCommand.{h, cc}
  1661. * src/IteratableChunkChecksumValidator.{h, cc}
  1662. * src/SegmentMan.{h, cc}
  1663. * src/SingleFileDownloadContext.{h, cc}
  1664. * src/IteratableChecksumValidator.{h, cc}
  1665. * src/BtContext.h
  1666. * src/IteratableValidator.h
  1667. * src/DownloadContext.h
  1668. * test/SingleFileDownloadContextTest.cc
  1669. * test/DefaultBtContextTest.cc
  1670. * test/MockBtContext.h
  1671. * test/Metalink2RequestGroupTest.cc
  1672. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1673. Type clarification: size_t for length or size, uint64_t for file
  1674. length, off_t for file offset.
  1675. * src/PiecedSegment.cc
  1676. * src/GrowSegment.h
  1677. * src/DefaultBtRequestFactory.h
  1678. * src/DefaultBtProgressInfoFile.cc
  1679. * src/UnknownLengthPieceStorage.h
  1680. * src/DefaultPieceStorage.cc
  1681. * src/UnknownLengthPieceStorage.cc
  1682. * src/DefaultBtInteractive.cc
  1683. * src/GrowSegment.cc
  1684. * src/BitfieldMan.h
  1685. * src/DownloadCommand.cc
  1686. * src/BtRequestFactory.h
  1687. * src/PiecedSegment.h
  1688. * src/DefaultPieceStorage.h
  1689. * src/Piece.cc
  1690. * src/DefaultBtRequestFactory.cc
  1691. * src/PieceStorage.h
  1692. * src/Segment.h
  1693. * src/Piece.h
  1694. * src/BitfieldMan.cc
  1695. * src/Util.cc
  1696. * test/DefaultBtProgressInfoFileTest.cc
  1697. * test/DefaultPieceStorageTest.cc
  1698. * test/MockPieceStorage.h
  1699. * test/BtRequestMessageTest.cc
  1700. * test/DefaultBtMessageDispatcherTest.cc
  1701. * test/BitfieldManTest.cc
  1702. * test/GrowSegmentTest.cc
  1703. * test/PieceTest.cc
  1704. * test/SegmentTest.cc
  1705. * test/SegmentManTest.cc
  1706. * test/DefaultBtRequestFactoryTest.cc
  1707. * test/MockBtRequestFactory.h
  1708. 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1709. Fixed compilation error with --disable-nls
  1710. It seems that defining gettext(Msgid) to ((const char *) (Msgid))
  1711. in gettext.h causes the problem.
  1712. * src/common.h
  1713. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1714. Removed subPiece related functions.
  1715. * src/Piece.{h, cc} : Also rewritten getCompletedLength().
  1716. * src/DefaultPieceStorage.{h, cc}
  1717. * test/PieceTest.cc
  1718. * test/DefaultPieceStorageTest.cc
  1719. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1720. Use unsigned char for data store.
  1721. 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1722. Bump up version number to 0.13.0+1
  1723. * configure.ac
  1724. * Release 0.13.0+1
  1725. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1726. Changed inactive connection timeout to 120.
  1727. To accept more mulually interested peers, disconnect peer when there
  1728. is no interest between us after certain time passed.
  1729. * src/DefaultBtInteractive.cc (checkActiveInteraction)
  1730. 2008-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1731. Fixed the bug that aria2 only uses first dns server in resolv.conf
  1732. when compiled with async DNS support.
  1733. * src/DownloadEngine.cc
  1734. * src/option_processing.cc: Lengthened DNS timeout to 30. I think old
  1735. value '10' will be a little bit short when some DNS servers are
  1736. offline and several DNS servers are tried. It should be configured
  1737. by command-line option.
  1738. 2008-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1739. Merged Ross's mingw patch.
  1740. * src/DHTRoutingTableDeserializer.cc
  1741. * src/DHTRoutingTableSerializer.cc
  1742. * src/Platform.{h, cc}
  1743. * src/timegm.h
  1744. * src/gettimeofday.h
  1745. * src/getaddrinfo.h
  1746. * src/SocketCore.h
  1747. * src/common.h
  1748. * src/inet_aton.h
  1749. * src/DownloadEngine.h
  1750. * src/gai_strerror.h
  1751. * src/a2netcompat.h
  1752. * configure.ac
  1753. * configure
  1754. * aclocal.m4
  1755. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1756. Included missing iostream.
  1757. * test/AllTest.cc
  1758. * test/BtDependencyTest.cc
  1759. * test/BtExtendedMessageTest.cc
  1760. * test/DHTConnectionImplTest.cc
  1761. * test/DHTMessageFactoryImplTest.cc
  1762. * test/DHTMessageTrackerEntryTest.cc
  1763. * test/DHTNodeTest.cc
  1764. * test/DHTRoutingTableSerializerTest.cc
  1765. * test/DefaultBtAnnounceTest.cc
  1766. * test/DefaultBtContextTest.cc
  1767. * test/DefaultBtMessageFactoryTest.cc
  1768. * test/DefaultExtensionMessageFactoryTest.cc
  1769. * test/HandshakeExtensionMessageTest.cc
  1770. * test/HttpResponseTest.cc
  1771. * test/MetalinkProcessorTest.cc
  1772. * test/MultiFileAllocationIteratorTest.cc
  1773. * test/SocketCoreTest.cc
  1774. * test/UTPexExtensionMessageTest.cc
  1775. 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1776. Reorganized includes.
  1777. * src/NameResolver.cc
  1778. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1779. Fixed compilation error without ares/c-ares
  1780. * src/NameResolver.h:
  1781. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1782. Added a test for large file.
  1783. * test/MetalinkProcessorTest.cc (testLargeFileSize):
  1784. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1785. Fixed the bug that file size is ignored if size > INT32_MAX
  1786. * src/SizeMetalinkParserState.cc (endElement):
  1787. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1788. Bump up version number to 0.13.0
  1789. * configure.ac
  1790. * Release 0.13.0
  1791. 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1792. Updated Makfefile.am to make 'make dist' work.
  1793. Now packaged filename is aria2c-VERSION.tar.bz2.
  1794. Added README, README.html, and aria2c.1.html to dist_doc_DATA.
  1795. Added LICENSE.OpenSSL to dist_noinst_DATA.
  1796. Large file support is now configured by configure script.
  1797. * configure.ac
  1798. Removed unsused source files
  1799. * src/
  1800. * test/
  1801. Removed PeerDecl.h and BtContextDecl.h. typedefs are removed to
  1802. Peer.h and BtContext.h respectively.
  1803. * src/Peer.h
  1804. * src/BtContext.h
  1805. Updated translations.
  1806. Added Polish, Thai, Indonesian, Norwegian Nynorsk, Hungarian
  1807. translations. Great thanks to all translators!;)
  1808. * po/*.{po, gmo}
  1809. 2008-02-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1810. Create MessageDigestHelper::staticSHA1DigestInit() which uses
  1811. statically declared sha1 MessageDigestContext.
  1812. * src/BtPieceMessage.cc: Use staticSHA1DigestInit() to avoid
  1813. initialization of short-lived MessageDigestContext.
  1814. * src/MessageDigestHelper.{h, cc}
  1815. * src/main.cc
  1816. Now DownloadCommand has a reference to MessageDigestContext to avoid
  1817. the initialization of MessageDigestContext every time in validating
  1818. chunk checksum.
  1819. * src/DownloadCommand.{h, cc}
  1820. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1821. Add a file descriptor which connected to fast peer(latency<1500) to
  1822. select(). This change reduced CPU load.
  1823. * src/PeerInteractionCommand.cc
  1824. * src/DefaultBtInteractive.{h, cc}
  1825. * src/BtInteractive.h
  1826. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1827. Fixed the previous insufficient fix for possible busy loop.
  1828. * src/MSEHandshake.cc (identifyHandshakeType)
  1829. Removed unused functions.
  1830. * src/MSEHandshake.{h, cc} (readDataAndDecrypt)
  1831. 2008-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1832. Fixed possible busy loop if first 20 bytes are not received for a few
  1833. minutes.
  1834. * src/MSEHandshake.{h, cc} (identifyHandshakeType)
  1835. * src/ReceiverMSEHandshakeCommand.cc
  1836. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1837. Fixed compilation error
  1838. * src/ExpatMetalinkProcessor.cc
  1839. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1840. Fixed compile error on Mac OS X, on 64Bit OS maybe.
  1841. * src/DHTBucket.cc
  1842. Removed unnecessary cast.
  1843. * src/HandshakeExtensionMessage.cc
  1844. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1845. Fixed the bug that option handler for PREF_METALINK_ENABLE_UNIQUE_PROTOCOL.
  1846. is missing.
  1847. * src/OptionHandlerFactory.cc
  1848. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1849. Fixed the bug that HAVE message is not sent for a piece they are
  1850. downloaded fom http/ftp server before any BitTorrent handshake is done
  1851. with peers.
  1852. * src/DefaultBtInteractive.cc
  1853. 2008-02-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1854. Removed RequestInfo.h and FileAllocator.h since they have been removed.
  1855. * src/Makefile.am
  1856. * src/Makefile.in
  1857. 2008-02-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1858. Updated README. Added html version of README and man page.
  1859. * README
  1860. * README.html
  1861. * readme2html: Shell script to generate README.html from README using
  1862. asciidoc.
  1863. * doc/aria2c.1.html
  1864. * doc/makeman: Added the line to generate aria2c.1.html
  1865. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1866. Fixed offset calculation.
  1867. * src/LibgcryptDHKeyExchange.h (computeSecret)
  1868. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1869. Rewritten itos and uitos using template. llitos and ullitos are
  1870. replaced with itos and uitos respectively.
  1871. * src/Util.{h, cc}
  1872. * test/UtilTest.cc
  1873. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1874. Fixed the bug that DH key exchange sometimes fails due to bad handling
  1875. of the number of bytes required for storing public key and shared
  1876. secret.
  1877. * src/LibgcryptDHKeyExchange.h
  1878. * src/LibsslDHKeyExchange.h: Also added function name to handleError.
  1879. * src/MSEHandshake.cc
  1880. * test/DHKeyExchangeTest.cc
  1881. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1882. Removed since they are not used.
  1883. * src/Xml2MetalinkProcessor.{h, cc}
  1884. * src/Socket.cc
  1885. * src/SegmentSplitter.{h, cc}
  1886. * test/Xml2MetalinkProcessorTest.cc
  1887. 2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1888. Fixed the bug that prevents aria2 from stopping other than by pressing
  1889. Ctrl-C in BitTorrent download. It is reproducible using --seed-time
  1890. option. aria2 doesn't stop even after --seed-time is satisfied and
  1891. continues to output blank lines in the console.
  1892. * src/ReceiverMSEHandshakeCommand.cc
  1893. * src/PeerReceiveHandshakeCommand.cc
  1894. * src/PeerListenCommand.cc
  1895. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1896. Bump up version number to 0.13.0rc
  1897. * configure.ac
  1898. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1899. Updated man page and some usage text.
  1900. * doc/aria2c.1.txt
  1901. * src/usage_text.h
  1902. * po/*.{po, gmo}
  1903. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1904. Updated translations. Added Finnish and Hebrew translations.
  1905. Great thanks to all translators!
  1906. * po/*.{po, gmo}
  1907. * po/LINGUAS
  1908. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1909. Log more detailed information about each message.
  1910. * src/DHTQueryMessage.{h, cc}
  1911. * src/DHTGetPeersMessage.{h, cc}
  1912. * src/DHTFindNodeReplyMessage.{h, cc}
  1913. * src/DHTGetPeersReplyMessage.{h, cc}
  1914. * src/DHTAnnouncePeerMessage.{h, cc}
  1915. * src/DHTResponseMessage.{h, cc}
  1916. * src/DHTFindNodeMessage.{h, cc}
  1917. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1918. Use constants defined in prefs.h
  1919. * src/option_processing.cc
  1920. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1921. * test/AllTest.cc: Added OpenSSL, GNUTLS initialization code.
  1922. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1923. Make room for future enchancements for IPv6 addresses.
  1924. Bump up version number of dht.dat file format to 2.
  1925. Not compatible with previous version.
  1926. * src/DHTRoutingTableSerializer.cc
  1927. * src/DHTRoutingTableDeserializer.cc
  1928. * test/DHTRoutingTableSerializerTest.cc
  1929. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1930. Added handling for the return values from
  1931. PeerMessageUtil::createcompact().
  1932. * src/DefaultBtContext.cc (computeFastSet):
  1933. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1934. Fixed abort when peer's ip address is IPv4-mapped address.
  1935. * src/DefaultBtContext.cc (computeFastSet)
  1936. Removed number-and-dots criteria, since Util::isNumberAndDotsNotation()
  1937. cannot handle IPv4-mapped addresses.
  1938. * src/DefaultBtInteractive.cc (addPeerExchangeMessage)
  1939. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1940. Proper return value handling for OpenSSL functions.
  1941. * src/LibsslDHKeyExchange.h
  1942. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1943. Random bytes generation using libgcrypt and OpenSSL.
  1944. * src/DHTUtil.{h, cc}
  1945. * test/DHTUtilTest.cc
  1946. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1947. Fixed segmentation fault when a DHT message which doesn't have 'y' key
  1948. received.
  1949. * src/DHTMessageReceiver.cc (receiveMessage)
  1950. 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1951. Fixed the bug that a return code is always 0. BUG#1897704
  1952. If error occurred during the download or there exist unfinished
  1953. downloads, aria2 returns with code 1.
  1954. * src/RequestGroupMan.{h, cc}
  1955. * src/MultiUrlRequestInfo.{h, cc}
  1956. * src/main.cc
  1957. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1958. IPv6 support for SocketCore class.
  1959. TODO: In SocketCore::establishConnection(), this is insufficient to
  1960. determin the failure of connect() here because the socket is
  1961. non-blocking state. The next addresses should be tried after select().
  1962. TODO: NameResolver still uses c-ares(<= 1.4) ares_gethostbyname().
  1963. If c-ares 1.5 or newer is installed, ares_getaddrinfo() should be used
  1964. instead which address family independent.
  1965. TODO: DHTRoutingTable{Deserializer,Serializer} currently saves peer
  1966. information in a compact peer format which is for IPv4 only.
  1967. Some BitTorrent functions in PeerMessageUtil still depends on IPv4 but
  1968. this is a spec of BitTorrent protocol.
  1969. * src/SocketCore.{h, cc}
  1970. * src/PeerMessageUtil.cc
  1971. * test/SocketCoreTest.cc
  1972. * test/PeerMessageUtilTest.cc
  1973. * test/DHTConnectionImplTest.cc
  1974. Handle IPv4-mapped addresses.
  1975. * src/DHTNode.cc: Now identity is determined by node id.
  1976. * src/DHTMessageTrackerEntry.cc
  1977. Because now PeerMessageUtil::unpackcompact() could fail, the caller
  1978. should handle it.
  1979. * src/DHTRoutingTableDeserializer.cc
  1980. * src/DHTMessageFactoryImpl.cc
  1981. 2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1982. Change the unit of --stop option from a minute to a second.
  1983. * src/usage_text.h
  1984. * src/DownloadEngineFactory.cc
  1985. * src/OptionHandlerFactory.cc
  1986. * src/message.h
  1987. * src/TimedHaltCommand.cc
  1988. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1989. Make listening socket non-block mode.
  1990. * src/FtpConnection.cc
  1991. * src/FtpNegotiationCommand.{h, cc}
  1992. * src/PeerListenCommand.cc
  1993. Fixed the bug that cause slow ftp negotiation.
  1994. * src/FtpNegotiationCommand.{h, cc}
  1995. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1996. Added basic tag to --enable-dht, --dht-listen-port option.
  1997. * src/HelpItemFactory.cc (createHelpItems)
  1998. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1999. Updated text.
  2000. * src/usage_text.h
  2001. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2002. * src/MSEHandshake.cc (encryptAndSendData): Use std::min().
  2003. 2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2004. Determin _threadtholdSpeed in each constructor for
  2005. ActivePeerConnectionCommand and PeerReceiveHandshakeCommand.
  2006. * src/ActivePeerConnectionCommand.{h, cc}
  2007. * src/PeerReceiveHandshakeCommand.{h, cc}
  2008. * src/BtSetup.cc
  2009. * src/BtConstants.h
  2010. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2011. Added --bt-min-crypto-level and --bt-require-crypto options.
  2012. * src/OptionHandlerFactory.cc
  2013. * src/MSEHandshake.cc
  2014. * src/HelpItemFactory.cc
  2015. * src/option_processing.cc
  2016. * src/ReceiverMSEHandshakeCommand.cc
  2017. * src/prefs.h
  2018. * src/DefaultBtAnnounce.cc
  2019. * src/InitiatorMSEHandshakeCommand.cc
  2020. * src/usage_text.h
  2021. * test/MSEHandshakeTest.cc
  2022. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2023. Bump version number to 0.13.0b
  2024. * configure.ac
  2025. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2026. Updated doc.
  2027. * src/MessageDigestHelper.h:
  2028. 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2029. Use raw message digest as a token instead of its hexadecimal
  2030. representation.
  2031. * src/DHTTokenTracker.cc (generateToken)
  2032. 2008-02-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2033. Added Message Stream Encryption(MSE) support.
  2034. Currently, aria2 accepts incoming connections with Obfuscation Header
  2035. and legacy BitTorrent Header and establishes connections with
  2036. Obfuscation Header first and if failed then retry with legacy
  2037. BitTorrent header. If plain text and ARC4 is provided, aria2 always
  2038. choose ARC4. The new option to change the default behavior is planned.
  2039. For tracker extension, "supportcrypto=1" is added statically.
  2040. * src/PeerInitiateConnectionCommand.{h, cc}
  2041. * src/PeerConnection.{h, cc}
  2042. * src/HandleRegistry.h
  2043. * src/SocketCore.h
  2044. * src/PeerReceiveHandshakeCommand.{h, cc}
  2045. * src/BtRegistry.{h, cc}
  2046. * src/PeerListenCommand.cc
  2047. * src/InitiatorMSEHandshakeCommand.{h, cc}
  2048. * src/ReceiverMSEHandshakeCommand.{h, cc}
  2049. * src/MSEHandshake.{h, cc}
  2050. * src/ARC4Encryptor.h
  2051. * src/ARC4Decryptor.h
  2052. * src/LibgcryptARC4Encryptor.h
  2053. * src/LibgcryptARC4Decryptor.h
  2054. * src/LibgcryptARC4Context.h
  2055. * src/LibsslARC4Encryptor.h
  2056. * src/LibsslARC4Decryptor.h
  2057. * src/LibsslARC4Context.h
  2058. * src/DHKeyExchange.h
  2059. * src/LibgcryptDHKeyExchange.h
  2060. * src/LibsslDHKeyExchange.h
  2061. * src/DefaultBtAnnounce.cc: Just added "supportcrypto=1" parameter.
  2062. * test/DefaultBtAnnounceTest.cc
  2063. * test/ARC4Test.cc
  2064. * test/DHKeyExchangeTest.cc
  2065. Removed prepareForRetry() because it is not used.
  2066. * src/PeerAbstractCommand.{h, cc}
  2067. * src/PeerInteractionCommand.{h, cc}
  2068. * src/PeerInitiateConnectionCommand.{h, cc}
  2069. 2008-02-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2070. Added the ability to load nodes from torrent file. These nodes are
  2071. added to the routing table when downloading that torrent.
  2072. * src/BtContext.h
  2073. * src/DefaultBtContext.{h, cc}
  2074. * src/DHTSetup.cc
  2075. * src/DHTEntryPointNameResolveCommand.{h, cc}: Now accepts list of
  2076. hostname and port pair, and resolves all of them.
  2077. * src/NameResolver.{h, cc}: Added reset().
  2078. * src/RequestGroup.cc
  2079. * test/DefaultBtContextTest.cc
  2080. * test/MockBtContext.h
  2081. Removed assert() from DefaultBtContext and throw exception instead.
  2082. * src/DefaultBtContext.cc
  2083. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2084. Fixed segmentation fault bug when exiting if dht is disabled.
  2085. * src/RequestGroup.cc
  2086. 2008-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2087. Fixed typo in log message and define the message in message.h
  2088. * src/TimedHaltCommand.cc
  2089. * src/message.h
  2090. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2091. Included RecoverableException.h to fix compilation error.
  2092. * test/DHTMessageFactoryImplTest.cc
  2093. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2094. Added test 'testDoReceivedAction' for DHTQueryMessage subclasses.
  2095. * test/DHTPingMessageTest.cc
  2096. * test/DHTGetPeersMessageTest.cc
  2097. * test/DHTFindNodeMessageTest.cc
  2098. * test/DHTAnnouncePeerMessageTest.cc
  2099. * test/MockDHTMessage.h
  2100. * test/MockDHTMessageFactory.h
  2101. * test/MockDHTMessageDispatcher.h: New class.
  2102. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2103. Added DHTMessageDispatcherImpl. Now DHTMessageDispatcher is pure
  2104. virtual.
  2105. * src/DHTMessageDispatcher.h
  2106. * src/DHTMessageDispatcherImpl.{h, cc}
  2107. * src/DHTSetup.cc
  2108. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2109. Adding handling of DHT error message. Just log error message and
  2110. throw exception.
  2111. * src/DHTMessageFactoryImpl.cc
  2112. * test/DHTMessageFactoryImplTest.cc
  2113. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2114. Added handling of dynamic cast failure.
  2115. * src/DHTNodeLookupTask.cc
  2116. * src/DHTPeerLookupTask.cc
  2117. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2118. Added the ability to stop aria2 itself when given time has passed
  2119. from start. Use --stop option to specify time in minutes.
  2120. When 0 is given, this feature is disabled.
  2121. * src/OptionHandlerFactory.cc
  2122. * src/TimeBasedCommand.h: Make _interval protected scope.
  2123. * src/HelpItemFactory.cc
  2124. * src/option_processing.cc
  2125. * src/prefs.h
  2126. * src/FillRequestGroupCommand.cc: Evaluate _e->isHaltRequested()
  2127. before calling RequestGroupMan::fillRequestGroupFromReserver().
  2128. Without this modification, the result list shows "ERR" when aria2 is
  2129. stopped by --stop option. It should be "INPR".
  2130. * src/DownloadEngine.{h, cc}
  2131. * src/DownloadEngineFactory.cc
  2132. * src/usage_text.h
  2133. * src/TimedHaltCommand.{h, cc}: New class.
  2134. 2008-02-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2135. Bootstrap through node added by port message.
  2136. Currently bootstrap is executed if the number of buckets in routing
  2137. table is 1.
  2138. * src/BtPortMessage.{h, cc}
  2139. * src/DefaultBtMessageFactory.{h, cc}
  2140. * src/PeerInteractionCommand.cc
  2141. * test/BtPortMessageTest.cc
  2142. * test/MockDHTTask.h
  2143. 2008-02-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2144. Extract the Peer class's member variables, which are only needed after
  2145. PeerInteractionCommand, into PeerSessionResource class.
  2146. This class is instantiated in PeerInteractionCommand class's ctor and
  2147. released in its dtor.
  2148. This will make Peer class lightweight and uses less memory for peers
  2149. which are not connected and wait in the queue.
  2150. * src/PeerChokeCommand.cc
  2151. * src/PeerSessionResource.{h, cc}
  2152. * src/PeerInteractionCommand.cc
  2153. * src/PeerAbstractCommand.cc: Note: 0 is given to onAbort() function.
  2154. * src/DefaultBtInteractive.cc
  2155. * src/BtPieceMessage.cc
  2156. * src/BtInterestedMessage.cc
  2157. * src/BtUnchokeMessage.cc
  2158. * src/DefaultPeerStorage.{h, cc}
  2159. * src/PeerInitiateConnectionCommand.cc
  2160. * src/ActivePeerConnectionCommand.cc
  2161. * src/BtNotInterestedMessage.cc
  2162. * src/DefaultBtMessageDispatcher.cc
  2163. * src/BtChokeMessage.cc
  2164. * src/BtRequestMessage.cc
  2165. * src/Peer.{h, cc}
  2166. * src/BtRegistry.h
  2167. * src/TrackerWatcherCommand.cc
  2168. * src/PeerReceiveHandshakeCommand.cc
  2169. * test/BtExtendedMessageTest.cc
  2170. * test/BtAllowedFastMessageTest.cc
  2171. * test/BtCancelMessageTest.cc
  2172. * test/DefaultPieceStorageTest.cc
  2173. * test/BtBitfieldMessageTest.cc
  2174. * test/BtHaveMessageTest.cc
  2175. * test/BtNotInterestedMessageTest.cc
  2176. * test/BtRequestMessageTest.cc
  2177. * test/PeerSessionResourceTest.cc
  2178. * test/DefaultBtMessageDispatcherTest.cc
  2179. * test/PeerTest.cc
  2180. * test/BtInterestedMessageTest.cc
  2181. * test/BtRejectMessageTest.cc
  2182. * test/BtChokeMessageTest.cc
  2183. * test/DefaultPeerStorageTest.cc
  2184. * test/BtHaveNoneMessageTest.cc
  2185. * test/BtHaveAllMessageTest.cc
  2186. * test/DefaultExtensionMessageFactoryTest.cc
  2187. * test/BtUnchokeMessageTest.cc
  2188. * test/DefaultBtMessageFactoryTest.cc
  2189. * test/HandshakeExtensionMessageTest.cc
  2190. * test/UTPexExtensionMessageTest.cc
  2191. * test/DefaultBtRequestFactoryTest.cc
  2192. * test/BtPieceMessageTest.cc
  2193. Removed typedef PeerStats.
  2194. * src/PeerStat.h
  2195. * src/SegmentMan.cc
  2196. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2197. Added std namespace to copy, remove_copy, back_inserter,
  2198. front_inserter.
  2199. * src/RequestGroupMan.cc
  2200. * src/DefaultPieceStorage.cc
  2201. * src/StreamFileAllocationEntry.cc
  2202. * src/BtFileAllocationEntry.cc
  2203. * src/RequestGroup.cc
  2204. * src/MetalinkEntry.cc
  2205. * src/DelegatingPeerListProcessor.cc
  2206. * src/DefaultBtRequestFactory.cc
  2207. * src/DefaultBtMessageDispatcher.cc
  2208. * src/version_usage.cc: Included <algorithm>
  2209. * src/main.cc
  2210. * src/MetalinkParserController.cc
  2211. * src/DefaultBtContext.cc
  2212. * src/DownloadEngineFactory.cc
  2213. * src/a2algo.h
  2214. Removed.
  2215. * test/StreamUriListParserTest.cc
  2216. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2217. Use PREF_MAX_DOWNLOAD_LIMIT as a threshold for
  2218. ActivePeerConnectionCommand when it is given and
  2219. PREF_MAX_DOWNLOAD_LIMIT < default threshold.
  2220. * src/ActivePeerConnectionCommand.{h, cc}
  2221. * src/BtSetup.cc
  2222. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2223. Only add socket to DownloadEngine's select routine when peer or
  2224. localhost is unchoked and interested. This lowers CPU usage a
  2225. little bit.
  2226. * src/PeerInteractionCommand.cc
  2227. * src/PeerAbstractCommand.{h, cc}
  2228. * src/BtInteractive.h
  2229. * src/DefaultBtInteractive.{h, cc}
  2230. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2231. Revert previous change because get_peers message is needed for
  2232. announce_peer anyway.
  2233. * src/DHTGetPeersCommand.cc
  2234. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2235. Request peers thought DHT only when download hasn't finished.
  2236. * src/DHTGetPeersCommand.cc
  2237. 2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2238. Force refresh bucket when startup if certain time has passed(currently 15 minutes).
  2239. * src/DHTBucketRefreshTask.{h, cc}
  2240. * src/DHTSetup.cc
  2241. 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2242. Removed "using namespace std;" from all sources. Appended std:: prefix to c++
  2243. standard classes.
  2244. Included string.h where mem* function are used.
  2245. Added namespace aria2.
  2246. 2008-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2247. Create directory before saving DHT routing table.
  2248. Now ios::failure is now handled properly.
  2249. * src/DHTAutoSaveCommand.cc
  2250. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2251. Removed unnecessary cerr.
  2252. * src/DownloadEngine.cc
  2253. 2008-02-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2254. Catch exception inside DHTMessageReceiver::receiveMessage().
  2255. Log unknown message.
  2256. * src/DHTMessageReceiver.{h, cc}
  2257. * src/DHTMessageFactory.h
  2258. * src/DHTMessageFactoryImpl.{h, cc}
  2259. * src/DHTMessageTracker.cc (handleTimeout): Catch and handle exception.
  2260. * src/DHTInteractionCommand.cc
  2261. * src/DHTUnknownMessage.{h, cc}
  2262. * test/DHTUnknownMessageTest.cc
  2263. * test/MockDHTMessageFactory.h
  2264. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2265. Commented out ip address comparison because a host can have multiple
  2266. ip addresses and it is hard to predict the hostname is resolved into
  2267. which one.
  2268. * test/SocketCoreTest.cc (testWriteAndReadDatagram)
  2269. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2270. * po/Makefile.in: Removed since this is generated by configure.
  2271. 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2272. Fixed compiler warning about redefinition of SIZE_MAX.
  2273. Use common.h instead of config.h directly here.
  2274. * src/Platform.{h, cc}
  2275. The check of ENABLE_NLS is made in gettext.h, so it is not required
  2276. here.
  2277. * common.h
  2278. 2008-02-02 gettextize <[email protected]>
  2279. Updated gettext related files.
  2280. * configure.ac (AC_CONFIG_FILES): Add intl/Makefile.
  2281. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17.
  2282. 2008-02-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2283. Added DHT functionality, compatible with mainline.
  2284. DHT is disabled by default. To enable it, give --enable-dht to aria2c.
  2285. You may need to specify entry point to DHT network using
  2286. --dht-entry-point. DHT uses UDP port to listen incoming message.
  2287. Use --dht-listen-port to specify port number. Make sure that your
  2288. firewall configuration can pass through UDP traffic to the port.
  2289. The routing table is saved in $HOME/.aria2/dht.dat.
  2290. * src/DHT*
  2291. * src/BNode.{h, cc}
  2292. * src/PeerInteractionCommand.cc: enable DHT functionality for a
  2293. particular torrent.
  2294. * src/Data.cc: Rewritten ctor.
  2295. * src/OptionHandlerFactory.cc: Added --enable-dht, --dht-listen-port,
  2296. --dht-entry-point.
  2297. * src/DefaultBtInteractive.cc: Send port message if dht is enabled.
  2298. * src/RequestGroup.cc: Initialize DHT functionality. When download
  2299. ends, remove BtContext from DHTPeerAnnounceStorage.
  2300. * src/BtPortMessage.{h, cc}: Rewritten.
  2301. * src/message.h
  2302. * src/OptionHandlerImpl.cc
  2303. * src/option_processing.cc: Added --enable-dht, --dht-listen-port,
  2304. --dht-entry-point.
  2305. * src/Dictionary.{h, cc} (remove): New function.
  2306. * src/prefs.h
  2307. * src/DefaultBtMessageFactory.h
  2308. * src/BtHandshakeMessage.cc
  2309. * src/ActivePeerConnectionCommand.cc
  2310. * src/SocketCore.{h, cc}: Added datagram socket support.
  2311. * src/DefaultBtMessageFactory.cc
  2312. * src/BtSetup.cc: Add BtContext to DHTPeerAnnounceStorage here.
  2313. Create DHT commands.
  2314. * src/BtMessageFactory.h
  2315. * src/PeerMessageUtil.{h, cc}
  2316. 2008-01-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2317. Fixed the bug that log file is not written when configuration file doesn't exist.
  2318. This is caused by using Logger class before LogFactory is not configured.
  2319. BUG #1875079
  2320. * src/option_processing.cc
  2321. Warning message "configuration doesn't exist" is only printed when --conf is
  2322. given.
  2323. * src/option_processing.cc
  2324. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2325. Use BencodeVisitor and MessageDigestHelper instead of ShaVisitor.
  2326. ShaVisitor is now deprecated and slated to be removed.
  2327. * src/DefaultBtContext.cc
  2328. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2329. Externalize message to message.h
  2330. * src/Platform.cc
  2331. * src/message.h
  2332. 2008-01-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2333. Set default domain and default path to cookie.
  2334. * src/HttpResponse.cc
  2335. * src/CookieBox.{h, cc}
  2336. * src/CookieParser.{h, cc}
  2337. * test/CookieParserTest.cc
  2338. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2339. Added --no-conf and --conf-path command-line option.
  2340. --no-conf option disables loading aria2.conf file.
  2341. --conf-path option changes the configuration file path. The default
  2342. file path is $HOME/.aria2/aria2.conf
  2343. Added a warning message when the configuration file is not found.
  2344. * src/HelpItemFactory.cc
  2345. * src/option_processing.cc
  2346. * src/prefs.h
  2347. * src/usage_text.h
  2348. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2349. Added the message to inform users that other help categories are
  2350. available in -h option.
  2351. * src/version_usage.cc
  2352. * src/TagContainer.{h, cc}
  2353. * test/TagContainerTest.cc
  2354. * src/TaggedItem.{h, cc}
  2355. * test/TaggedItemTest.cc
  2356. * src/HelpItem.h
  2357. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2358. Added Piece::getFirstMissingBlockIndexWithoutLock() and it is called
  2359. from PiecedSegment's ctor.
  2360. Previously Piece::getAllMissingBlockIndexes() is called from
  2361. PiecedSegment() but it is rather expensive since only first element is
  2362. used.
  2363. * src/PiecedSegment.cc
  2364. * src/Piece.{h, cc}
  2365. 2008-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2366. Rewritten get*Missing*Index functions. Now no need to allocate memory
  2367. each time these functions are called.
  2368. * src/BitfieldMan.{h, cc}
  2369. * test/BitfieldManTest.cc
  2370. * src/array_fun.h
  2371. * test/array_funTest.cc
  2372. Now BitfieldMan::countBlock() returns BitfieldMan::blocks.
  2373. Added new BitfieldMan::countFilteredBlock() to get the number of blocks
  2374. filtered. Removed unnecessary cast to int32_t.
  2375. * src/BitfieldMan.{h, cc}
  2376. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2377. Fixed the bug that EX_TOO_LONG_PAYLOAD exception is thrown if just
  2378. payload length(4bytes) are received. This happens because lenbufLength
  2379. is not updated in this particular case and successive call of
  2380. receiveMessage() overwrites payload length with bytes recieved which
  2381. are payload body.
  2382. * src/PeerConnection.{h, cc}
  2383. * src/message.h
  2384. 2008-01-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2385. Fixed the bug that DefaultPeerStorage::returnPeer() may delete wrong
  2386. peer if there are peers that have same ipaddr and port.
  2387. I've experiened segmentation fault and "pure virtual function was
  2388. called" error.
  2389. * src/Peer.h
  2390. * test/PeerTest.cc
  2391. * src/DefaultPeerStorage.cc
  2392. * test/DefaultPeerStorageTest.cc
  2393. 2008-01-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2394. Removed a call to isPowerOf() because it is no longer necessary here
  2395. and a request block is not always power of 2.
  2396. BUG#1866924
  2397. * src/PeerMessageUtil.cc (checkLength)
  2398. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2399. Fixed the bug that always first found Segment is removed from
  2400. usedSegmentEntries. Removed unused functions.
  2401. * src/SegmentMan.{h, cc}
  2402. * test/SegmentManTest.cc
  2403. Fixed the bug that ServerHost is not removed.
  2404. * src/RequestGroup.cc
  2405. 2008-01-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2406. Fixed the bug that SegmentMan::completeSegment() is not called
  2407. even if Segment is complete when --lowest-speed-limit is enabled.
  2408. BUG#1864525
  2409. * src/DownloadCommand.{h, cc}
  2410. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2411. Fixed: hash algorithm 'sha1' is always used.
  2412. * src/DownloadCommand.cc (validatePieceHash)
  2413. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2414. Added --enable-peer-exchange command-line option.
  2415. * src/OptionHandlerFactory.cc
  2416. * src/HelpItemFactory.cc
  2417. * src/option_processing.cc
  2418. * src/usage_text.h
  2419. 2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2420. Move extension from BtRuntime to ExtensionMessageFactory, because
  2421. extension can be specified per peer, not per torrent.
  2422. * src/DefaultBtInteractive.cc
  2423. * src/BtRuntime.h
  2424. * src/ExtendedMessagingAware.h
  2425. * src/ExtensionMessageFactory.h
  2426. * src/DefaultExtensionMessageFactory.cc
  2427. * test/DefaultExtensionMessageFactoryTest.cc
  2428. 2008-01-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2429. Added categorized option help. Specify category using --help option.
  2430. Also added the ability to search options in forward match.
  2431. * src/HelpItem.{h, cc}
  2432. * test/HelpItemTest.cc
  2433. * src/HelpItemFactory.{h, cc}
  2434. * src/TagContainer.{h, cc}
  2435. * test/TagContainerTest.cc
  2436. * src/option_processing.cc
  2437. * src/prefs.h
  2438. * src/TaggedItem.{h, cc}
  2439. * test/TaggedItemTest.cc
  2440. * src/version_usage.cc
  2441. * src/help_tags.h
  2442. * src/usage_text.h
  2443. 2008-01-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2444. Fixed segmentation fault when bad torrent metainfo is parsed.
  2445. Added dynamic_cast properly to detect the misconfiguration of metainfo
  2446. and then throw exception or skip it.
  2447. * src/DefaultBtContext.{h, cc}
  2448. * test/DefaultBtContextTest.cc
  2449. * src/AnnounceList.cc
  2450. * src/CompactPeerListProcessor.cc
  2451. * src/message.h
  2452. * src/DefaultBtAnnounce.{h, cc}
  2453. * test/DefaultBtAnnounceTest.cc
  2454. * src/BencodeVisitor.cc
  2455. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2456. Added missing "B"(=Byte). So now the message looks like this:
  2457. Your share ratio was 1.0, uploaded/downloaded=12MiB/12MiB
  2458. * src/message.h (MSG_SHARE_RATIO_REPORT)
  2459. 2007-12-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2460. Show the seed ratio after torrent downloads.
  2461. For example, after torrent download completed and --seed-time and
  2462. --seed-ratio conditions are fulfilled, following message is printed
  2463. right after "Download complete: .....":
  2464. Your share ratio was 1.0, uploaded/downloaded=12M/12M
  2465. * src/RequestGroupMan.cc
  2466. * src/RequestGroup.{h, cc}
  2467. * src/message.h
  2468. 2007-12-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2469. Remove a defunct control file. A defunct control file means that while
  2470. it exists, but the corresponding download file is missing.
  2471. After its removal, a download restarts from the beginning.
  2472. * src/RequestGroup.cc
  2473. * src/message.h
  2474. 2007-12-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2475. Allocate bitfield in Peer when it is really used. More specifically,
  2476. bitfield in Peer is allocated after the connection is established and
  2477. deallocated when the connection is dropped.
  2478. Since 2 parameters(piece length and total length) was removed from the
  2479. constructor of Peer class, many test classes were modified accordingly.
  2480. See svn log for more detailed information.
  2481. * src/PeerInteractionCommand.cc
  2482. * src/CompactPeerListProcessor.cc
  2483. * src/Peer.cc
  2484. * src/DefaultPeerListProcessor.cc
  2485. * src/PeerListenCommand.cc
  2486. * src/PeerReceiveHandshakeCommand.cc
  2487. Fixed memory leak
  2488. * src/Piece.cc
  2489. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2490. Changed the default value of PREF_PEER_CONNECTION_TIMEOUT and
  2491. lowestSpeedLimit in ActivePeerConnectionCommand. TODO: Make them
  2492. command-line options.
  2493. * src/option_processing.cc
  2494. * src/ActivePeerConnectionCommand.cc
  2495. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2496. Send have message to peer if it already has the piece.
  2497. * src/BtHaveMessage.{h, cc}
  2498. 2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2499. Removed incomingPeer. Set 0 to peer's port if it is not a listening
  2500. port.
  2501. * src/DefaultPeerStorage.{h, cc}
  2502. * test/DefaultPeerStorageTest.cc
  2503. * src/HandshakeExtensionMessage.cc
  2504. * test/HandshakeExtensionMessageTest.cc
  2505. * src/Peer.{h, cc}: Added ipaddr and port to identity comparison.
  2506. * src/PeerStorage.h
  2507. * test/MockPeerStorage.h
  2508. * src/PeerListenCommand.cc
  2509. * src/PeerReceiveHandshakeCommand.cc
  2510. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2511. Added --metalink-enable-unique-protocol option.
  2512. * src/Metalink2RequestGroup.cc
  2513. * src/option_processing.cc
  2514. * src/prefs.h
  2515. * src/version_usage.cc
  2516. * doc/aria2c.1.txt
  2517. * doc/aria2c.1
  2518. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2519. Allow a peer in incomingPeer to be added peers.
  2520. * src/DefaultPeerStorage.cc
  2521. * test/DefaultPeerStorageTest.cc
  2522. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2523. Fixed the bug that causes aria2 not to finish download. BUG#1855875.
  2524. I could reproduce this bug in following procedure:
  2525. 1. Stop the download at the very beginning(1% or 100KB downloaded).
  2526. 2. Restart aria2.
  2527. 3. You see the download stopped around 99%.
  2528. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  2529. * src/StreamFileAllocationEntry.cc: Removed the timeout handling.
  2530. If timeout is reached, then _nextCommand is unused and it may contains
  2531. segments and they won't be canceled. Actually, timeout is not needed
  2532. here because if the server dropped connection, then retry is made.
  2533. 2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2534. Added uTorrent compatible Peer Exchange.
  2535. * src/BencodeVisitor.{h, cc}
  2536. * test/BencodeVisitorTest.cc
  2537. * src/BtConstants.h
  2538. * src/BtContext.h: Added 'private' flag.
  2539. * src/BtExtendedMessage.{h, cc}
  2540. * test/BtExtendedMessageTest.cc
  2541. * src/BtHandshakeMessage.{h, cc}: Set extended messaging bit in
  2542. reserved field.
  2543. * test/BtHandshakeMessageTest.cc
  2544. * src/BtMessageFactory.h
  2545. * src/BtRegistry.h
  2546. * src/BtRuntime.h: This class holds default extension message IDs for
  2547. aria2. By default, aria2 uses ID 8 for ut_pex.
  2548. * src/DefaultBtContext.cc
  2549. * src/DefaultBtInteractive.{h, cc}: This class holds _utPexEnabled.
  2550. When it is true, aria2 enables ut_pex. This value is set by
  2551. PeerInteractionCommand.
  2552. * src/DefaultBtMessageFactory.{h, cc}
  2553. * test/DefaultBtMessageFactoryTest.cc
  2554. * src/DefaultBtMessageReceiver.cc: Moved the code of fast extension
  2555. handling to DefaultBtInteractive class.
  2556. * src/DefaultExtensionMessageFactory.{h, cc}
  2557. * test/DefaultExtensionMessageFactoryTest.cc
  2558. * src/DefaultPeerStorage.cc: Returns false if a peer is already in
  2559. the container(peers and incomingPeers. The equality is determined by
  2560. Peer::id).
  2561. * test/DefaultPeerStorageTest.cc
  2562. * src/ExtensionMessage.h
  2563. * test/MockExtensionMessage.h
  2564. * src/ExtensionMessageFactory.h
  2565. * test/MockExtensionMessageFactory.h
  2566. * src/HandshakeExtensionMessage.{h, cc}
  2567. * test/HandshakeExtensionMessageTest.cc
  2568. * src/MetaEntry.h
  2569. * src/Peer.{h, cc}
  2570. * src/PeerInteractionCommand.cc
  2571. * src/PeerReceiveHandshakeCommand.cc: Evaluate the return value of
  2572. addIncomingPeer.
  2573. * src/PeerMessageUtil.{h, cc}
  2574. * src/PeerObject.h
  2575. * src/UTPexExtensionMessage.{h, cc}
  2576. * test/UTPexExtensionMessageTest.cc
  2577. * src/message.h
  2578. * src/prefs.h
  2579. Fixed the bug that returns incomplete data when it contains null
  2580. character. A convenient constructor was also added.
  2581. * src/Data.{h, cc}
  2582. Rewritten.
  2583. * src/CompactPeerListProcessor.cc
  2584. Fixed typos.
  2585. * src/message.h
  2586. * src/MetaFileUtil.cc
  2587. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2588. Added "Status Legend" label to the explanation text of 'stat' in
  2589. download result and moved it to the last. BUG#1848214
  2590. * src/RequestGroupMan.cc
  2591. 2007-12-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2592. Fixed the bug that -lexpat is always added to aria2c_LDADD.
  2593. * src/Makefie.am
  2594. * test/Makefile.am
  2595. 2007-12-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2596. Fixed the bug that prevents aria2 from loading cookie file when expire
  2597. value is greater than 2^31-1. BUG#1851066
  2598. * src/CookieBoxFactory.cc
  2599. * test/CookieBoxFactoryTest.cc
  2600. 2007-12-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2601. Fixed possible memory leak when an exception is thrown.
  2602. * src/XML2SAXMetalinkProcessor.cc
  2603. Added Expat support. If both libxml2 and Expat are installed, then
  2604. libxml2 is used by default.
  2605. MetalinkProcessorFactory chooses from XML2SAXMetalinkProcessor and
  2606. ExpatMetalinkProcessor according to the configuration.
  2607. * src/ExpatMetalinkProcessor.{h, cc}
  2608. * src/main.cc: Removed libxml2 specific header and init/free function.
  2609. * src/MetalinkProcessorFactory.{h, cc}
  2610. * src/MetalinkHelper.cc
  2611. * src/Metalinker.h: Removed unnecessary libxml2 header.
  2612. * src/MetalinkProcessor.h
  2613. * test/XML2SAXMetalinkProcessorTest.cc: Removed because
  2614. MetalinkProcessorTest is used instead.
  2615. * test/MetalinkProcessorTest.cc: Added. It is actually the same with
  2616. XML2SAXMetalinkProcessor, replaced XML2SAXMetalinkProcessor with
  2617. MetalinkProcessorFactory::newInstance().
  2618. * m4/libexpat.m4
  2619. * configure.ac: Added configuration options for libexpat.
  2620. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2621. Disabled -s option in metalink download.
  2622. * src/Metalink2RequestGroup.cc
  2623. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2624. If several protocols are available for a mirror in metalink file,
  2625. aria2 now use one of them. --metalink-preferred-protocol option was
  2626. added to specify the preference of protocol.
  2627. * src/AbstractCommand.cc
  2628. * src/OptionHandlerFactory.cc
  2629. * src/ServerHost.{h, cc}
  2630. * src/Metalink2RequestGroup.cc
  2631. * src/RequestGroup.{h, cc}
  2632. * test/RequestGroupTest.cc
  2633. * src/option_processing.cc
  2634. * src/prefs.h
  2635. * src/HttpResponseCommand.cc
  2636. * src/MetalinkResource.{h, cc}
  2637. * src/FtpNegotiationCommand.cc
  2638. * src/MetalinkEntry.{h, cc}
  2639. * src/MetalinkEntryTest.cc
  2640. 2007-12-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2641. Code cleanup and added debug log.
  2642. * src/PeerConnection.cc
  2643. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2644. Compiler error fix: applied the patch by Tiziano Mueller
  2645. * src/RequestGroup.cc
  2646. 2007-12-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2647. Fixed the bug: only first announce URL is tried in AnnounceTier,
  2648. in stopped and completed event.
  2649. * src/AnnounceList.{h, cc}
  2650. * test/AnnounceListTest.cc
  2651. * src/DefaultBtAnnounce.cc
  2652. * test/DefaultBtAnnounceTest.cc
  2653. Sorted URLs.
  2654. * test/Metalink2RequestGroupTest.cc
  2655. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2656. Removed unnecessary string copy. Updated doc and corrected indentation.
  2657. * src/Base64.cc
  2658. Fixed compilation warnings
  2659. * test/DataTest.cc
  2660. * test/HttpRequestTest.cc
  2661. * test/MetaFileUtilTest.cc
  2662. * test/RequestTest.cc
  2663. * Release 0.12.0
  2664. 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2665. Updated translations
  2666. * po/{de,fr,ja,nl,ru}.po
  2667. Added Brazilian Portuguese, Catalan, Italian, Spanish, Swedish
  2668. translations. Many thanks to translators.
  2669. * po/{ca,es,it,pt_BR,sv}.po
  2670. * po/LINGUAS
  2671. 2007-12-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2672. Added a notice about URL
  2673. * src/version_usage.cc
  2674. 2007-12-07 Tatsuhiro Tsujikawa <tujikawa at rednoah com>
  2675. Fixed the bug#1845750; CTRL+C does not stop torrent.
  2676. aria2 repeatedly sends stopped request when tracker returns error code.
  2677. * src/AnnounceList.cc
  2678. * test/AnnounceListTest.cc
  2679. * src/AnnounceTier.h
  2680. Added a message when ctrl-c is hit.
  2681. Now second ctrl-c is also handled in signal handler.
  2682. * src/RequestGroupMan.{h, cc}
  2683. * src/RequestGroup.{h, cc}
  2684. * src/MultiUrlRequestInfo.cc
  2685. * src/DownloadEngine.cc
  2686. * src/TrackerWatcherCommand.cc
  2687. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2688. Code cleanup
  2689. * src/Base64.cc (encode)
  2690. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2691. Changed Direct/IO enable/disable procesure in file allocation routine.
  2692. * src/SingleFileAllocationIterator.cc
  2693. (SingleFileAllocationIterator):
  2694. Disable directIO if offset is not multiple of 512.
  2695. (~SingleFileAllocationIterator): Removed a call to disableDirectIO.
  2696. * src/MultiFileAllocationIterator.cc (allocateChunk):
  2697. Enable created SingleFileAllocationIterator's directIO.
  2698. * src/FileAllocationEntry.cc
  2699. (FileAllocationEntry): Enable directIO here.
  2700. (~FileAllocationEntry): Disable directIO here.
  2701. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2702. Fixed the bug: aria2 doesn't utilize fast set index offered by peer.
  2703. * src/Peer.{h, cc}
  2704. * src/DefaultPieceStorage.cc
  2705. * test/DefaultPieceStorageTest.cc
  2706. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2707. Rewritten direct I/O support routine
  2708. * src/SingleFileAllocationIterator.cc
  2709. * src/MultiDiskAdaptor.{h, cc}
  2710. * src/ByteArrayDiskWriter.h
  2711. * src/AbstractSingleDiskAdaptor.h
  2712. * src/AbstractDiskWriter.cc
  2713. * src/DefaultPieceStorage.cc
  2714. * src/DiskWriter.h
  2715. * src/BinaryStream.h
  2716. * src/IteratableChunkChecksumValidator.cc
  2717. * src/IteratableChecksumValidator.cc
  2718. * src/CheckIntegrityEntry.cc
  2719. * src/FileAllocationEntry.cc
  2720. 2007-12-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2721. Fixed typo
  2722. * src/version_usage.cc
  2723. Updated doc
  2724. * doc/aria2c.1.txt
  2725. * doc/aria2c.1
  2726. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2727. Fixed compile error without message digest support.
  2728. * src/FileMetalinkParserState.cc
  2729. * src/MetalinkParserController.{h, cc}
  2730. * test/XML2SAXMetalinkProcessorTest.cc
  2731. * test/MetalinkParserControllerTest.cc
  2732. 2007-12-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2733. Enable direct I/O support in checksum checking.
  2734. * src/IteratableChunkChecksumValidator.{h, cc}
  2735. * test/IteratableChunkChecksumValidatorTest.cc
  2736. * src/CheckIntegrityEntry.cc
  2737. * src/PieceHashCheckIntegrityEntry.cc
  2738. * src/IteratableChecksumValidator.{h, cc}
  2739. * src/BtCheckIntegrityEntry.cc: Added doc.
  2740. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2741. Added --allow-piece-length-change option.
  2742. * src/DefaultBtProgressInfoFile.cc
  2743. * test/DefaultBtProgressInfoFileTest.cc
  2744. * src/OptionHandlerFactory.cc
  2745. * src/option_processing.cc
  2746. * src/prefs.h
  2747. * src/version_usage.cc
  2748. * doc/aria2c.1.txt
  2749. * doc/aria2c.1
  2750. Fixed: duplicated result entry appears when exception is thrown in
  2751. RequestGroup::createInitiateConnectionCommand().
  2752. * src/RequestGroupMan.cc (fillRequestGroupFromReserver):
  2753. Add RequestGroup to _requestGroup after RequetGroup::
  2754. createInitiateConnectionCommand() succeeds.
  2755. Externalized message
  2756. * src/XML2SAXMetalinkProcessor.cc
  2757. * src/message.h
  2758. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2759. Forced download abort when received negative response from http/ftp
  2760. server.
  2761. * src/HttpResponseCommand.cc
  2762. * src/FtpNegotiationCommand.cc
  2763. * src/HttpResponse.cc
  2764. * src/FtpConnection.cc
  2765. 2007-12-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2766. Added XML2SAXMetalinkProcessor class, which is a lot faster than
  2767. the predecessor, Xml2MetalinkParser class.
  2768. I tested them against 94KB metalink file with 1234 chunk checksums.
  2769. The new one parsed it in 22msec, while it took 6000msec with old one.
  2770. * src/XML2SAXMetalinkProcessor.{h, cc}
  2771. * test/XML2SAXMetalinkProcessorTest.cc
  2772. * src/MetalinkParserController.{h, cc}
  2773. * test/MetalinkParserControllerTest.cc
  2774. * src/MetalinkParserState.h: Also added 16 subclasses.
  2775. * src/main.cc
  2776. * src/Metalink2RequestGroup.cc
  2777. * src/MetalinkHelper.cc
  2778. * src/MetalinkEntry.cc
  2779. * src/ChunkChecksum.h
  2780. Rewritten Base64 class for better performance.
  2781. * src/Base64.{h, cc}
  2782. * test/Base64Test.cc
  2783. * src/HttpRequest.cc
  2784. 2007-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2785. Fixed the bug#1841757: aria2 will connect to server to only get
  2786. file size.
  2787. * src/StreamFileAllocationEntry.cc
  2788. * src/option_processing.cc
  2789. * src/HttpResponseCommand.cc: Now reuse connection in segmented
  2790. downloads.
  2791. * src/FtpNegotiationCommand.cc
  2792. Suppressed wrong message when finding PreDownloadHandler
  2793. * src/RequestGroup.cc
  2794. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2795. Updated usage
  2796. * src/version_usage.cc
  2797. Updated man page
  2798. * doc/aria2c.1.txt
  2799. * doc/aria2c.1
  2800. Updated po files
  2801. * po/aria2c.pot
  2802. * po/*.po
  2803. * po/*.gmo
  2804. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2805. Eliminated g++-4.2 warning
  2806. * src/DownloadHandlerConstants.{h, cc}
  2807. * src/Util.cc
  2808. * test/MetaFileUtilTest.cc
  2809. * test/PStringBuildVisitorTest.cc
  2810. Fixed bug: --check-integrity doesn't work for multi file torrent.
  2811. * src/RequestGroup.cc
  2812. * src/BtCheckIntegrityEntry.cc
  2813. 2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2814. Fixed a2io.h
  2815. * src/a2io.h
  2816. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2817. Added direct I/O support. The current implementation uses O_DIRECT,
  2818. which is not posix standard and is tested on linux 2.6.21.
  2819. Currently only file allocation uses direct I/O.
  2820. * src/SingleFileAllocationIterator.{h, cc}
  2821. * test/SingleFileAllocationIteratorTest.cc
  2822. * src/MultiFileAllocationIterator.{h, cc}
  2823. * test/MultiFileAllocationIteratorTest.cc
  2824. * src/BinaryStream.h
  2825. * src/DiskWriter.h
  2826. * src/AbstractDiskWriter.{h, cc}
  2827. * src/ByteArrayDiskWriter.h
  2828. * src/DiskAdaptor.h
  2829. * src/AbstractSingleDiskAdaptor.{h, cc}
  2830. * src/MultiDiskAdaptor.{h, cc}
  2831. * src/FileAllocationEntry.cc
  2832. * src/Util.{h, cc}
  2833. * src/OptionHandlerFactory.cc
  2834. * src/prefs.h
  2835. * src/version_usage.cc
  2836. * src/option_processing.cc
  2837. Moved FileAllocationMan::markCurrentFileAllocationEntryDone() to
  2838. handleException.
  2839. * src/MultiFileAllocationIterator.cc
  2840. Added EINTR handling
  2841. * src/SocketCore.cc
  2842. 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2843. Updated usage
  2844. * src/version_usage.cc
  2845. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2846. Applied Ross's patch for MinGW port.
  2847. * src/DownloadEngine.h
  2848. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2849. Set Content-Type to SingleFileDownloadContext when http response is
  2850. received.
  2851. * src/HttpResponseCommand.cc
  2852. * src/HttpResponse.{h, cc}
  2853. * test/HttpResponseTest.cc
  2854. 2007-11-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2855. Rewritten to add content-type support.
  2856. * src/DownloadHandler.{h, cc}
  2857. * src/BtPostDownloadHandler.{h, cc}
  2858. * test/BtPostDownloadHandlerTest.cc
  2859. * src/MetalinkPostDownloadHandler.{h, cc}
  2860. * test/MetalinkPostDownloadHandlerTest.cc
  2861. * src/PostDownloadHandler.{h, cc}
  2862. * src/DownloadHandlerConstants.{h, cc}
  2863. * src/RequestGroup.cc
  2864. * src/HttpResponseCommand.cc
  2865. * src/FtpNegotiationCommand.cc
  2866. * src/SingleFileDownloadContext.{h, cc}
  2867. * src/RequestGroup.h
  2868. * src/RequestGroupCriteria.h
  2869. * src/ContentTypeRequestGroupCriteria.h
  2870. Added 'mem' option value for --follow-metalink, --follow-torrent.
  2871. If it is give, metalink/torrent file is not written to the disk, but
  2872. just is kept in memory. Parsing is occurred on memory.
  2873. * src/MetalinkHelper.{h, cc}
  2874. * src/MetalinkProcessor.h
  2875. * src/Xml2MetalinkProcessor.{h, cc}
  2876. * test/Xml2MetalinkProcessorTest.cc
  2877. * src/DownloadHandlerFactory.{h, cc}
  2878. * test/DownloadHandlerFactoryTest.cc
  2879. * src/PreDownloadHandler.{h, cc}
  2880. * src/OptionHandlerFactory.cc
  2881. * src/DefaultBtContext.{h, cc}
  2882. * test/DefaultBtContextTest.cc
  2883. * src/version_usage.cc
  2884. * src/Metalink2RequestGroup.{h, cc}
  2885. * src/RequestGroup.{h, cc}
  2886. * src/a2functional.h
  2887. * test/a2functionalTest.cc
  2888. * src/MemoryBufferPreDownloadHandler.{h, cc}
  2889. * src/OptionHandlerImpl.h
  2890. * src/prefs.h
  2891. * src/Util.{h, cc}
  2892. * test/UtilTest.cc
  2893. Keep DownloadResult rather than RequestGroup after downloads to reduce
  2894. memory usage.
  2895. * src/RequestGroupMan.{h, cc}
  2896. * src/DownloadEngine.cc
  2897. * src/BtDependency.{h, cc}: Changed the type of dependee from
  2898. WeakHandle to SharedHandle because WeakHandle could be null.
  2899. * src/RequestGroup.{h, cc}
  2900. * src/DownloadEngineFactory.cc
  2901. * src/DownloadResult.h
  2902. Set totalLength after download finished
  2903. * src/UnknownLengthPieceStorage.{h, cc}
  2904. Keep torrent file specified in metalink in memory.
  2905. * src/Metalink2RequestGroup.cc
  2906. * src/BtDependency.cc
  2907. * src/TrueRequestGroupCriteria.h
  2908. Fixed the bug: seekg is used where seekp should be used.
  2909. * src/ByteArrayDiskWriter.cc
  2910. * test/ByteArraydiskWriterTest.cc
  2911. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2912. Fixed syntax error
  2913. * test/SequenceTest.cc
  2914. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2915. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  2916. * src/RequestGroupMan.cc (isSameFileBeingDownloaded)
  2917. Return false if RequestGroup::isPreLocalFileCheckEnabled() == true
  2918. * src/RequestGroup.cc (downloadFinishedByFileLength)
  2919. 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2920. Added the check to see whether ares_host_callback accepts timeouts
  2921. with c-ares; only c-ares 1.5.0 or newer accepts it.
  2922. * src/NameResolver.{h, cc}
  2923. * m4/libcares.m4
  2924. * configure.ac: Set C++ for language choice.
  2925. 2007-11-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2926. Fixed: compilation fails without c-ares/ares
  2927. * src/DownloadEngine.cc (addCommand): Moved outside #ifdef
  2928. Generate http/ftp commands only when download is incomplete.
  2929. * src/BtFileAllocationEntry.cc (prepareForNextAction)
  2930. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2931. Corrected typo. Examples are removed since they are available in man
  2932. page.
  2933. * src/version_usage.cc
  2934. Updated man page.
  2935. * doc/aria2c.1
  2936. * doc/aria2c.1.txt
  2937. * doc/makeman: Commented out sed command.
  2938. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2939. Throw DlAbortEx when a remote file is not found.
  2940. * src/HttpResponse.cc
  2941. * src/FtpNegotiationCommand.cc
  2942. * src/message.h
  2943. Overwrite an existing file if --allow-overwrite=true is given.
  2944. * src/RequestGroup.cc
  2945. Removed unused functions
  2946. * src/AbstractCommand.h
  2947. 2007-11-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2948. Removed 'extern' from 'extern typedef ...' in src/*.h
  2949. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2950. Updated usage
  2951. * src/version_usage.cc
  2952. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2953. Trim announce URL
  2954. * src/DefaultBtContext.cc
  2955. * test/ShaVisitorTest.cc
  2956. Trim argument s. Give trimed s to exception constructor.
  2957. * src/Util.cc (parseInt)(parseLLInt)
  2958. * test/UtilTest.cc
  2959. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2960. Set precision back to 1.
  2961. * src/ConsoleStatCalc.cc (calculateStat)
  2962. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2963. Replaced strtol with Util::parseInt
  2964. * src/ChunkedEncoding.cc
  2965. * src/HttpConnection.cc
  2966. * src/CookieBoxFactory.cc
  2967. * src/ParameterizedStringParser.cc
  2968. * src/Util.cc
  2969. * test/UtilTest.cc
  2970. * test/OptionHandlerTest.cc
  2971. * src/Request.cc
  2972. Throw exception when empty string is given. The message for exception
  2973. changed.
  2974. * src/Util.cc (parseInt)(parseLLInt)
  2975. * src/message.h
  2976. 2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2977. Set precision to 2 because share ratio is rounded into 1.0 if precision
  2978. set to 1.
  2979. * src/ConsoleStatCalc.cc (calculateStat)
  2980. 2007-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2981. Preallocate non-requested file which is adjacent forward to requested
  2982. file('requested' files means the files given in --select-file option)
  2983. if they share a same piece.
  2984. This fixes long pause in the file system which doesn't support sparse
  2985. files like FAT32 while downloading.
  2986. * src/MultiFileAllocationIterator.{h, cc}
  2987. * test/MultiFileAllocationIteratorTest.cc
  2988. * src/FileEntry.{h, cc}
  2989. Removed unused _option.
  2990. * src/MultiDiskAdaptor.h
  2991. * test/MultiDiskAdaptorTest.cc
  2992. * src/DefaultPieceStorage.cc
  2993. Set the default value of --seed-ratio to 1.0.
  2994. If 0.0 is given, then seeding continues regardless of share ratio.
  2995. * src/version_usage.cc
  2996. * src/option_processing.cc
  2997. * src/BtSetup.cc
  2998. * doc/aria2c.1.txt
  2999. * doc/aria2c.1
  3000. Fixed: Selective download is not working in BitTorrent
  3001. * src/RequestGroup.cc
  3002. Introduced Sequence class. Use this instead of Util::unfoldRange()
  3003. * src/PieceStorage.h
  3004. * test/MockPieceStorage.h
  3005. * src/UnknownLengthPieceStorage.h
  3006. * src/DefaultPieceStorage.{h, cc}
  3007. * src/Metalink2RequestGroup.cc
  3008. * src/RequestGroup.cc
  3009. * src/Sequence.h
  3010. * test/SequenceTest.cc
  3011. * src/IntSequence.h
  3012. * src/message.h
  3013. * src/Util.{h, cc}
  3014. * test/UtilTest.cc
  3015. Added new function 'parse' to catch exception thrown by subclass's
  3016. parseArg
  3017. * src/OptionHandler.h
  3018. * src/OptionParser.cc
  3019. * src/NameMatchOptionHandler.h
  3020. * src/OptionHandlerImpl.h
  3021. * test/OptionHandlerTest.cc
  3022. Added IntegerRangeOptionHandler. Used for --listen-port and
  3023. --select-file. Now --listen-port accepts range of port.
  3024. * src/OptionHandlerFactory.cc
  3025. * src/version_usage.cc
  3026. * src/OptionHandlerImpl.h
  3027. * src/option_processing.cc
  3028. * src/BtSetup.cc
  3029. * src/PeerListenCommand.{h, cc}
  3030. * doc/aria2c.1.txt
  3031. * doc/aria2c.1
  3032. Implemented operator< for Exception class to provide easy way to print
  3033. exception stack trace.
  3034. * src/Exception.{h, cc}
  3035. * src/main.cc
  3036. * src/option_processing.cc
  3037. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3038. * src/version_usage.cc
  3039. (showVersion): Reworked.
  3040. (showUsage): Added examples.
  3041. Removed Hint for total length and file name.
  3042. * src/Metalink2RequestGroup.cc
  3043. * src/RequestGroup.{h, cc}
  3044. * src/HttpResponseCommand.cc
  3045. * src/FtpNegotiationCommand.cc
  3046. Now --follow-torrent and --follow-metalink option work properly.
  3047. * src/RequestGroup.cc
  3048. Updated man page
  3049. * doc/aria2c.1.txt
  3050. * doc/aria2c.1
  3051. 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3052. Removed.
  3053. * src/PiecedSegment.{h, cc} (operator==)(operator!=)
  3054. Use Segment::operator==()
  3055. * src/HttpConnection.cc
  3056. * src/Segment.h
  3057. Updated usage
  3058. * src/version_usage.cc
  3059. Added EINTR treatment.
  3060. * src/SocketCore.cc
  3061. * src/AbstractDiskWriter.cc
  3062. Rewritten.
  3063. * src/Util.cc (rangedFileCopy)
  3064. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3065. Fixed typo.
  3066. * src/version_usage.cc
  3067. 2007-11-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3068. Implemented. Now -c option works fine.
  3069. * src/DefaultPieceStorage.cc (markPiecesDone)
  3070. * test/DefaultPieceStorageTest.cc
  3071. Removed.
  3072. * src/SegmentMan.{h, cc}
  3073. (markAllPiecesDone)
  3074. (markPieceDone)
  3075. Synchronized po files with
  3076. https://translations.launchpad.net/aria2/trunk/+pots/aria2c
  3077. * src/fr.po
  3078. * src/ru.po
  3079. * src/de.po
  3080. * src/ja.po
  3081. 2007-11-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3082. Added ifdef and some modifications to compile without BitTorrent,
  3083. Metalink, MessageDigest
  3084. support.
  3085. * src/PieceHashCheckIntegrityEntry.cc
  3086. * src/MetalinkEntry.h
  3087. * src/version_usage.cc
  3088. * src/main.cc
  3089. * src/DownloadEngine.{h, cc}
  3090. * src/Metalink2RequestGroup.cc
  3091. * src/Peer.cc
  3092. * src/RequestGroup.cc
  3093. * src/MetalinkHelper.cc
  3094. * test/DefaultPieceStorageTest.cc
  3095. * test/MetalinkPostDownloadHandlerTest.cc
  3096. * test/Metalink2RequestGroupTest.cc
  3097. Hide TOTAL SPD when all downloads complete.
  3098. * src/ConsoleStatCalc.cc
  3099. Log target system information.
  3100. * src/main.cc
  3101. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3102. Now --metalink-location accepts a comma-deliminated list of locations.
  3103. * src/MetalinkEntry.{h, cc}
  3104. * test/MetalinkEntryTest.cc
  3105. * src/version_usage.cc
  3106. * src/Metalink2RequestGroup.cc
  3107. * src/Xml2MetalinkProcessor.cc
  3108. * test/Xml2MetalinkProcessorTest.cc
  3109. * doc/aria2c.1.txt
  3110. * doc/aria2c.1
  3111. * src/Util.cc (toUpper)(toLower): Rewritten.
  3112. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3113. Added the ability to detect duplicate download entry which is about to
  3114. download the same file other RequestGroup is downloading.
  3115. * src/RequestGroup.cc
  3116. * src/HttpResponseCommand.cc
  3117. * src/FtpNegotiationCommand.cc
  3118. 2007-11-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3119. Recalculates download progress when loading a control file,
  3120. if the piece length of DownloadContext is different from the one saved
  3121. in the control file. Currently in-flight pieces are ignored.
  3122. * src/DefaultBtProgressInfoFile.cc
  3123. * test/DefaultBtProgressInfoFileTest.cc
  3124. * src/Util.{h, cc}
  3125. * test/UtilTest.cc
  3126. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3127. Do not rotate tiers in announce-list.
  3128. * src/DefaultBtAnnounce.{h, cc}: Removed trackerNumTry.
  3129. AnnounceList::allTiersFailed() used instead to detect whether all
  3130. tiers are tried and failed.
  3131. * test/DefaultBtAnnounceTest.cc
  3132. * src/AnnounceList.{h, cc}: If all tiers are tried and failed then
  3133. allTiersFailed() returns true. To reset tier pointer, call resetTier();
  3134. * test/AnnounceListTest.cc
  3135. * src/TrackerWatcherCommand.cc (execute): Removed DlAbortEx catch
  3136. clause. Catch RecoverableException instead of DlRetryEx instead.
  3137. 2007-11-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3138. Implemented checksum validation feature(1 checksum for each file)
  3139. The validation takes place after the download.
  3140. * src/PieceHashCheckIntegrityEntry.{h, cc}: New class.
  3141. * src/IteratableChecksumValidator.{h, cc}: Rewritten.
  3142. * src/CheckIntegrityCommand.cc: Changed log message.
  3143. * src/Metalink2RequestGroup.cc: Set checksum to
  3144. SingleFileDownloadContext.
  3145. * src/StreamCheckIntegrityEntry.{h, cc}: Now derived from
  3146. PieceHashCheckIntegrity class.
  3147. * src/BtCheckIntegrityEntry.{h, cc}: Now derived from
  3148. PieceHashCheckIntegrity class.
  3149. * src/ChecksumCheckIntegrityEntry.{h, cc}: New class.
  3150. * src/IteratableValidator.h: New class.
  3151. * src/message.h
  3152. * src/CheckIntegrityEntry.{h, cc}
  3153. * src/IteratableChunkChecksumValidator.{h, cc}
  3154. * src/SingleFileDownloadContext.h
  3155. * src/DownloadCommand.cc
  3156. --allow-overwrite=true is no longer needed to check file integrity
  3157. before download in BitTorrent download.
  3158. * src/RequestGroup.cc (getInitialCommand)
  3159. Removed RequestGroup from queue when RequestGroup::getInitialCommand()
  3160. throws exception.
  3161. * src/RequestGroupMan.cc (getInitialCommands)
  3162. 2007-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3163. urlencode the given url inside Request::parseUrl(...)
  3164. * src/Request.{h, cc}
  3165. * src/Util.{h, cc}
  3166. * test/RequestTest.cc
  3167. Removed #!metalink3! notation support because it is deleted from
  3168. the metalink specification.
  3169. * src/Request.{h, cc}
  3170. * test/RequestTest.cc
  3171. 2007-11-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3172. Don't connect server before checking file integrity at startup, if
  3173. filesize and output file path are known.
  3174. * src/AbstractCommand.cc
  3175. * src/StreamFileAllocationEntry.cc
  3176. * src/Metalink2RequestGroup.cc
  3177. * src/RequestGroup.{h, cc}
  3178. * src/HttpResponseCommand.cc
  3179. * src/FtpNegotiationCommand.cc
  3180. Added DownloadFailureException. If it is thrown, RequestGroup should
  3181. halt.
  3182. * src/AbstractCommand.cc
  3183. * src/DownloadFailureException.h
  3184. * src/RequestGroup.cc
  3185. Catch RecoverableException, instead of DlAbortEx.
  3186. * src/RequestGroupMan.cc
  3187. * src/FillRequestGroupCommand.cc
  3188. * src/MetaFileUtil.cc
  3189. * src/IteratableChunkChecksumValidator.cc
  3190. Now first parameter of MSG_DOWNLOAD_ABORTED is gid(RequestGroup::
  3191. getGID())
  3192. * src/CheckIntegrityCommand.cc
  3193. * src/message.h
  3194. Print gid instead of idx.
  3195. * src/RequestGroupMan.cc
  3196. Removed exception throwers declaration.
  3197. * src/DirectDiskAdaptor.{h, cc}
  3198. * src/SocketCore.{h, cc}
  3199. * src/MultiDiskAdaptor.{h, cc}
  3200. * src/HttpConnection.{h, cc}
  3201. * src/HttpResponse.{h, cc}
  3202. * src/DiskAdaptor.{h, cc}
  3203. * src/CopyDiskAdaptor.{h, cc}
  3204. * src/MultiDiskAdaptor.{h, cc}
  3205. * src/HttpHeaderProcessor.{h, cc}
  3206. * src/AbstractSingleDiskAdaptor.{h, cc}
  3207. * src/Util.{h, cc}
  3208. * test/UtilTest.cc
  3209. * src/DefaultDiskWriter.{h, cc}
  3210. * src/FtpConnection.{h, cc}
  3211. * src/AbstractDiskWriter.{h, cc}
  3212. Removed duplicate code.
  3213. * src/StreamCheckIntegrityEntry.cc
  3214. Removed unnecessary include.
  3215. * src/DiskWriter.h
  3216. Included Exception.h
  3217. * src/option_processing.cc
  3218. Included 2 files and added doc
  3219. * src/TrackerWatcherCommand.cc
  3220. * src/SocketCore.cc (writeData): Fixed send error with GnuTLS.
  3221. 2007-11-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3222. Changed CheckIntegrityEntry interface so that it can define
  3223. the action when all the chunk checksums are valid.
  3224. * src/CheckIntegrityEntry.h
  3225. * src/StreamCheckIntegrityEntry.{h, cc}
  3226. * src/BtCheckIntegrityEntry.{h, cc}: Currently,when all the checksums
  3227. are valid, then aira2 goes to seeding mode. Sometimes it is better
  3228. to exit rather than doing seeding. So, it would be good to toggle this
  3229. behavior.
  3230. * src/CheckIntegrityCommand.cc
  3231. * src/AbstractCommand.cc
  3232. * src/RequestGroup.cc
  3233. 2007-11-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3234. Reflect the download length of in-flight pieces.
  3235. It makes the download length readout more precise.
  3236. * src/DefaultPieceStorage.{h, cc}
  3237. * test/DefaultPieceStorageTest.cc
  3238. * src/a2functional.h
  3239. * test/a2functionalTest.cc
  3240. Lower CPU load when --max-download-limit is used.
  3241. There is up and down in speed indicator when enabling
  3242. http-pipelining but a download goes well. I think the problem is that
  3243. because http-pipelining is enabled, DownloadCommand is created for
  3244. each segment and in its constructor, PeerStat::downloadStart() is
  3245. called. In PeerStat::downloadStart(), speed calculation object is
  3246. reseted, which makes download speed zero.
  3247. * src/DownloadCommand.cc
  3248. Rewritten using accumulate.
  3249. * src/RequestGroupMan.cc (calculateStat)
  3250. Code clearnup.
  3251. * src/FtpNegotiationCommand.cc
  3252. * src/HttpResponseCommand.cc
  3253. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3254. Fixed: Can not resume: aria2 reports download already finished.
  3255. * src/AbstractCommand.{h, cc}
  3256. * src/HttpResponseCommand.cc
  3257. * src/FtpNegotiateCommand.cc
  3258. 2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3259. Now a file is stored in the directory specified in .metalnk file
  3260. (file[@name]).
  3261. * src/Metalink2RequestGroup.cc
  3262. Create the directory structure when opening the file if it doesn't
  3263. exist.
  3264. * src/AbstractDiskWriter.cc
  3265. * src/Util.{h, cc}
  3266. * src/File.h
  3267. * test/UtilTest.cc
  3268. Removed file name comparison
  3269. * src/Metalink2RequestGroup.cc
  3270. * src/HttpResponseCommand.cc
  3271. Rewritten using Util::mkdirs()
  3272. * src/FileEntry.cc (setupDir)
  3273. * test/FileEntryTest.cc
  3274. Updated doc
  3275. * src/SingleFileDownloadContext.h
  3276. 2007-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3277. Now SleepCommand dispatches nextCommand when halt is requested.
  3278. It avoids a possible long wait after hitting CTRL-C.
  3279. * src/SleepCommand.{h, cc}
  3280. * src/RequestGroupAware.{h, cc}
  3281. 2007-11-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3282. Fixed: the listen port sent to the tracker is wrong. If aria2 fails
  3283. to open listen port, then remove the port number from the tracker
  3284. request.
  3285. * src/DefaultBtAnnounce.cc
  3286. * test/DefaultBtAnnounceTest.cc
  3287. * test/MockPieceStorage.h
  3288. Inject randomizer to DefaultBtAnnounce and DefaultBtContext to make
  3289. them more testable.
  3290. * src/DefaultBtAnnounce.{h, cc}
  3291. * src/DefaultBtContext.{h, cc}
  3292. * src/Util.{h, cc}
  3293. * test/DefaultBtAnnounceTest.cc
  3294. * test/DefaultBtContextTest.cc
  3295. * test/UtilTest.cc
  3296. Added 'B' to upload bytes readout.
  3297. * src/ConsoleStatCalc.cc
  3298. Now the listen port for BitTorrent download is opened when it is
  3299. needed.
  3300. * src/DownloadEngineFactory.cc
  3301. * src/BtSetup.{h, cc}
  3302. * src/PeerListenCommand.{h, cc}
  3303. Now an exception thrown while parsing tracker response is now logged.
  3304. If DlAbortEx is catched, then btAnnounce->resetAnnounce() immediately
  3305. called, which means no retry is made in this case, assuming a tracker
  3306. has a problem.
  3307. * src/TrackerWatcherCommand.cc
  3308. Fixed: downloading a file whose length is unkown fails.
  3309. * src/DownloadCommand.cc
  3310. Simplified prepareForNextSegment()
  3311. * src/DownloadCommand.cc
  3312. Updated
  3313. * po/POTFILES.in
  3314. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3315. Re-implemented a file listing for Metalink, which was dropped while
  3316. http/ftp/torrent integration was being implemented.
  3317. * src/MetalinkHelper.{h, cc}: New class.
  3318. * test/MetalinkHelperTest.cc
  3319. * src/main.cc
  3320. * src/Metalink2RequestGroup.cc
  3321. 2007-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3322. Added the ability to display the detailed torrent file information.
  3323. Now -S option gives not only a file listing, but also total download
  3324. length, info hash, announce URI, piece length, the number of pieces,
  3325. and mode(single or multi-torrent).
  3326. * src/DefaultBtContext.{h, cc} (operator<<): New function.
  3327. * src/Util.cc (toStream): Show file length in a abbreviated form(like
  3328. KiB)
  3329. * test/UtilTest.cc
  3330. * src/main.cc
  3331. 2007-10-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3332. Added ftp://USER:PASSWD@Servername automatic parsing.
  3333. * src/Request.{h, cc}: Removed AuthResolvers. Added _username and
  3334. _password. Recognize username and password in URI.
  3335. * src/main.cc: Use AuthConfigFactory instead of RequestFactory.
  3336. * src/RequestGroup.cc: Use AuthConfigFactory instead of RequestFactory.
  3337. * src/RequestFactory.{h, cc}: Removed.
  3338. * src/AuthConfigFactory.{h, cc}: New class.
  3339. * src/FtpConnection.cc: Use AuthConfigFactory.
  3340. * src/HttpRequest.cc: Use AuthConfigFactory.
  3341. * test/HttpRequestTest.cc: Updated.
  3342. * test/RequestTest.cc: Updated.
  3343. * test/AuthConfigFactoryTest.cc: New class.
  3344. * test/RequestFactoryTest.cc: Removed.
  3345. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3346. Use RequestGroup::allDownloadFinished() to decide whether the control
  3347. file should be removed or saved.
  3348. * src/RequestGroup.{h, cc} (allDownloadFinished): New function.
  3349. * src/RequestGroupMan.cc (removeStoppedGroup) (save)
  3350. 2007-10-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3351. Use File::renameTo()
  3352. * src/DefaultBtProgressInfoFile.cc
  3353. Added --no-file-allocation-limit command-line option.
  3354. * src/version_usage.cc
  3355. * src/option_processing.cc
  3356. * src/OptionHandlerFactory.cc
  3357. * src/RequestGroup.{h, cc}
  3358. * src/BtCheckIntegrityEntry.cc
  3359. * src/StreamCheckIntegrityEntry.cc
  3360. * src/prefs.h
  3361. * doc/aria2c.1.txt
  3362. * doc/aria2c.1
  3363. Now prealloc is the default value for --file-allocation option.
  3364. * src/version_usage.cc
  3365. * src/option_processing.cc
  3366. * doc/aria2c.1.txt
  3367. * doc/aria2c.1
  3368. Don't URL-encode user-agent.
  3369. * src/HttpRequest.cc
  3370. Updated translations
  3371. * po/LINGUAS: Added nl for Dutch translation.
  3372. * po/nl.po: Added Dutch translation, thanks to A. Bram Neijt.
  3373. * po/de.po: Updated German translation, thanks to Patrick Ruckstuhl.
  3374. * po/POTFILES.in: Updated.
  3375. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3376. Added the ability to recognize url-list in a torrent file.
  3377. The retrieved URLs are attached to the corresponding FileEntry.
  3378. * src/DefaultBtContext.{h, cc}
  3379. * src/FileEntry.{h, cc}
  3380. * test/DefaultBtContextTest.cc
  3381. 2007-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3382. * src/ConsoleStatCalc.cc: Let the user know that aria2 is now seeding
  3383. after the download finishes.
  3384. 2007-10-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3385. * src/Piece.{h, cc}: Added SubPiece infrastructure to track down
  3386. the data smaller than block length.
  3387. A block length can be specified by constructor's argument.
  3388. * src/DefaultPieceStorage.{h, cc} (getMissingPiece):
  3389. Get a missing piece in the range of given FileEntry. This function is
  3390. not used in the program yet.
  3391. * src/Util.h: Added some macros.
  3392. 2007-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3393. Added HTTP/1.1 keep alive and pipelining support.
  3394. See --enable-http-keep-alive and --enable-http-pipelining option.
  3395. * src/AbstractCommand.{h, cc}: Now it has one-to-many relation to
  3396. Segment.
  3397. * src/HttpDownloadCommand.{h, cc}
  3398. * src/OptionHandlerFactory.cc
  3399. * src/HttpConnection.{h, cc}
  3400. * src/version_usage.cc
  3401. * src/HttpInitiateConnectionCommand.cc
  3402. * src/FtpInitiateConnectionCommand.cc
  3403. * src/Segment.h
  3404. * src/HttpRequestCommand.{h, cc}
  3405. * src/option_processing.cc
  3406. * src/prefs.h
  3407. * src/HttpResponseCommand.cc
  3408. * src/SegmentMan.{h, cc}
  3409. * src/FtpNegotiateCommand.cc
  3410. * src/HttpProxyResponseCommand.cc
  3411. * src/Request.cc
  3412. * src/HttpRequest.cc
  3413. * src/DownloadCommand.cc
  3414. * test/HttpRequestTest.cc
  3415. * test/RequestTest.cc
  3416. 2007-10-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3417. * src/ConsoleCalc.cc (calculateStat): Hide SPD after the download
  3418. finished.
  3419. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3420. * src/Metalink2RequestGroup.cc (generate): Throw exception instead of
  3421. catching it inside the method.
  3422. When no file entry is found in a metalink without querying user
  3423. preferences, throw the exception with the error message that suggests
  3424. metalink file is probably broken.
  3425. * src/RequestGroup.cc (postDownloadProcessing): Catch exception here.
  3426. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3427. Fixed the bug that prevents remote Metalink/Torrent file from begin
  3428. processed.
  3429. * src/RequestGroupMan.cc (removeStoppedGroup)
  3430. Added debug message.
  3431. * src/BtPostDownloadHandler.cc
  3432. * src/MetalinkPostDownloadHandler.cc
  3433. * src/PostDownloadHandler.{h, cc}
  3434. * src/RequestGroup.cc
  3435. 2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3436. * src/Request.cc (parseUrl): Removed unnecessary slashes around dir.
  3437. 2007-10-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3438. * src/MultiUrlRequestInfo.h: Updated the message shown when program
  3439. stops and there are any unfinished or in-progress downloads.
  3440. Added the legend of "stat".
  3441. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3442. Throw exception when chunck checksum verification fails.
  3443. * src/DownloadCommand.cc (validatePieceHash): New function.
  3444. * src/PiecedSegment.{h, cc} (clear): New function.
  3445. * src/GrowSegment.{h, cc} (clear): New function.
  3446. * src/Segment.h (clear): New function.
  3447. * src/SegmentMan.{h, cc} (validatePieceHash): Removed.
  3448. * test/SegmentTest.cc
  3449. * test/GrowSegmentTest.cc
  3450. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3451. Do not send referer when redirected.
  3452. * src/Request.cc (redirectUrl)
  3453. * test/RequestTest.cc
  3454. * test/HttpRequestTest.cc
  3455. 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3456. Implemented BitTorrent/http/ftp integrated download.
  3457. I've rewritten lots of files and now some headers have forward
  3458. class declarations to reduce compile time.
  3459. The implementation is extremely alpha stage, I recommend to use this
  3460. for testing purpose only.
  3461. 2007-09-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3462. Fixed the compilation error on 64bit platform.
  3463. * test/HttpHeaderProcessorTest.cc
  3464. 2007-09-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3465. Merged Ross's patch that fixes compilation problem in MinGW
  3466. * test/DefaultBtProgressInfoFileTest.cc
  3467. 2007-09-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3468. Updated fr.po by sebone
  3469. * po/fr.po
  3470. Updated man page.
  3471. * doc/aria2c.1.txt
  3472. * Release 0.11.3
  3473. 2007-09-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3474. * src/MetalinkRequestInfo.cc (execute): Fixed BitTorrent download
  3475. failure in Metalink.
  3476. 2007-09-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3477. Automatically save *.aria2 control file of http/ftp download in every
  3478. 60 seconds.
  3479. * src/AutoSaveCommand.{h, cc}: New class.
  3480. * src/TimeBasedCommand.{h, cc}: New class.
  3481. * src/DownloadEngineFactory.cc (newConsoleEngine)
  3482. Disable parameterized URI support by default. Added -P option to
  3483. enable the feature.
  3484. * src/prefs.h: Added PREF_PARAMETERIZED_URI
  3485. * src/OptionHandlerFactory.cc
  3486. * src/main.cc: Also updated usages for -Z and --auto-file-renaming
  3487. Updated Japanese translation.
  3488. * po/ja.po
  3489. Updated man page.
  3490. * doc/aria2c.1.txt
  3491. * Release 0.11.3-rc
  3492. 2007-09-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3493. Now *.aria2 contorol file is first saved to *.aria2__temp and if
  3494. it is successful, then renamed to *.aria2.
  3495. This prevents *.aria2 file from being truncated or corrupted when
  3496. file system becomes out of space.
  3497. * src/DefaultBtProgressInfoFile.cc (save)
  3498. * src/SegmentMan.cc (save)
  3499. * test/DefaultBtProgressInfoFileTest.cc (testSave): Implemented.
  3500. 2007-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3501. Reduced the fragmentation of bitfield in http/ftp download.
  3502. * src/BitfieldMan.cc (getSparseMissingUnusedIndex)
  3503. * test/BitfieldManTest.cc
  3504. 2007-08-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3505. Added the ability to disable segmented download in .metalink.
  3506. aria2 can now recognize 'maxconnections' attribute in 'resources' and
  3507. 'url' tag.
  3508. * src/MetalinkEntry.{h, cc}
  3509. * src/RequestResource.{h, cc}
  3510. * src/MetalinkRequestInfo.cc
  3511. * src/Xml2MetalinkProcessor.cc
  3512. * test/Xml2MetalinkProcessorTest.cc
  3513. 2007-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3514. Added parameterized URI support.
  3515. * src/main.cc: -Z option added.
  3516. * src/OptionHandlerFactory.cc
  3517. * src/prefs.h: Added PREF_FORCE_SEQUENTIAL.
  3518. * src/PStringDatum.h: New class.
  3519. * src/PStringSegment.{h,cc}: New class.
  3520. * src/PStringNumLoop.h: New class.
  3521. * src/PStringSelect.h: New class.
  3522. * src/NumberDecorator.h: New class.
  3523. * src/FixedWidthNumberDecorator.h: New class.
  3524. * src/AlphaNumberDecorator.h: New class.
  3525. * src/PStringVisitor.h: New class.
  3526. * src/PStringBuildVisitor.{h,cc}: New class.
  3527. * src/ParameterizedStringParser.{h,cc}: New class.
  3528. * src/Util.{h,cc}
  3529. (isNumber): New function.
  3530. (isLowercase): New function.
  3531. (isUppercase): New function.
  3532. (alphaToNum): New function.
  3533. * test/ParameterizedStringParserTest.cc: New class.
  3534. * test/AlphaNumberDecoratorTest.cc: New class.
  3535. * test/PStringBuildVisitorTest.cc: New class.
  3536. * test/UtilTest.cc
  3537. (testIsNumber): New function.
  3538. (testIsLowercase): New function.
  3539. (testIsUppercase): New function.
  3540. (testAlphaToNum): New function.
  3541. Added '\n' after the error message
  3542. * src/RequestInfo.h (printDownloadAbortMessage)
  3543. Added auto file renaming feature in http(s)/ftp download.
  3544. * src/main.cc: Added --auto-file-renaming command-line option.
  3545. * src/OptionHandlerFactory.cc
  3546. * src/prefs.h: Added PREF_AUTO_FILE_RENAMING
  3547. * src/RequestGroup.{h, cc}
  3548. (shouldCancelDownloadForSafety): Rewritten
  3549. (tryAutoFileRenaming): New function.
  3550. * src/SegmentMan.{h, cc} (shouldCancelDownloadForSafety): Removed.
  3551. * src/HttpResponseCommand.cc
  3552. (executeInternal): Removed the call to RequestGroupMan::
  3553. isSameFileBeingDownloaded()
  3554. * src/FtpNegotiateCommand.cc
  3555. (recvSize): Removed the call to RequestGroupMan::
  3556. isSameFileBeingDownloaded()
  3557. * test/RequestGroupTest.cc: New class.
  3558. 2007-08-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3559. Merged Ross's patch: Removed setmode(). Use _CRT_fmode to enable binary
  3560. IO.
  3561. * src/DefaultBtProgressInfoFile.cc
  3562. * src/MetaFileUtil.cc
  3563. * src/SimpleLogger.cc
  3564. * src/SegmentMan.cc
  3565. * src/Util.cc
  3566. * src/Platform.cc
  3567. 2007-08-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3568. * src/Xml2MetalinkProcessor.cc (getPieceHash): Added missing .c_str().
  3569. 2007-08-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3570. Avoid sparse files if possible, because VFAT32 doesn't support it.
  3571. * src/DefaultDiskWriter.cc (initAndOpenFile)
  3572. Fixed the bug that prevents file allocation is not done when
  3573. dowloading multi-torrent file.
  3574. * src/AbstractDiskWriter.cc (openFile)
  3575. Increase the maximum number of -j option from 15 to 45.
  3576. * src/OptionHandlerFactory.cc (createOptionHandlers)
  3577. Added fr.po, thanks to Charles Landemaine.
  3578. * po/fr.po
  3579. * po/LINGUAS
  3580. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  3581. gcc 3.4.4 support:
  3582. * src/DefaultBtContext.cc: int32_t -> int
  3583. * src/main.cc: int -> int32_t, int32_t -> int
  3584. * src/messageDigest.h: uint32_t -> unsigned int
  3585. * src/NameResolver.h: int32_t -> int
  3586. * src/PeerConnection.cc: int -> int32_t
  3587. * src/SpeedCalc.cc: int32_t -> int
  3588. * src/TrackerUpdateCommand.h: int -> int32_t
  3589. * src/Util.cc: int32_t -> int
  3590. * src/Util.h: int32_t -> int
  3591. * src/Xml2MetalinkProcessor.cc: int -> uint32_t, int64_t -> uint64_t
  3592. * test/AnnounceListTest.cc: int -> int32_t
  3593. * test/ChunkedEncodingTest.cc: int -> int32_t
  3594. * test/DataTest.cc: int -> int32_t
  3595. * test/DefaultBtRequestFactoryTest.cc: int -> int32_t
  3596. * test/DefaultPeerListProcessorTest.cc: int -> int32_t
  3597. * test/DefaultPieceStorageTest.cc: int -> int32_t
  3598. * test/FeatureConfigTest.cc: int -> int32_t
  3599. * test/MetalinkEntryTest.cc: int -> int32_t
  3600. * test/MockBtRequestFactory.h: int -> int32_t
  3601. * test/MockPieceStorage.h: int -> int32_t
  3602. * test/OptionTest.cc: int -> int32_t
  3603. * test/RequestTest.cc: int -> int32_t
  3604. * test/SegmentManTest.cc: int -> int32_t
  3605. * test/Xml2MetalinkProcessorTest.cc: int -> int32_t
  3606. 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
  3607. Move sleep functions to Util class:
  3608. * src/Util.cc
  3609. (sleep): New function.
  3610. (usleep): New function.
  3611. * src/DownloadCommand.cc: sleep -> Util::sleep
  3612. * test/TimeSeedCriteriaTest.cc: sleep -> Util::sleep
  3613. MinGW build enhancements. The following files are added:
  3614. * src/timegm.{c,h}
  3615. Changes to support the above new files:
  3616. * configure.ac
  3617. * src/Makefile.am
  3618. * src/a2time.h
  3619. * src/Util.cc:
  3620. * src/strptime.c: Added support for %Z option.
  3621. Fixed MinGW non-blocking bug.
  3622. * src/SocketCore.cc
  3623. * src/HttpRequestCommand.cc
  3624. Miscellenous build fixes/enhancements.
  3625. * configure.ac: Added summary report.
  3626. * src/Platform.h: Tweaked #include's.
  3627. * src/a2netcompat.h: Tweaked #include's.
  3628. * src/strptime.h: Tweaked #include's.
  3629. * src/gai_strerror.c: Tweaked #include's.
  3630. * src/gai_strerror.h: _D_GETADDRINFO_H -> _D_GAI_STRERROR_H
  3631. * src/getaddrinfo.h: Moved #ifndef __MINGW32__
  3632. * src/gettimeofday.h: Added HAVE_CONFIG_H
  3633. 2007-08-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3634. Increased the initial connection size in BitTorrent download to 40.
  3635. * src/BtRuntime.h
  3636. Added the usage message of --peer-id-prefix option.
  3637. * src/main.cc
  3638. * Release 0.11.2
  3639. 2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3640. MessageDigestHelper is introduced in order to simplify the use
  3641. of message digest. Removed repeated code.
  3642. The message digest algorithm is now specified by string, like "sha1",
  3643. "md5".
  3644. * src/messageDigest.{h, cc}
  3645. * src/MessageDigestHelper.{h, cc}: New class.
  3646. * src/DefaultPieceStorage.cc
  3647. * src/DefaultBtContext.{h, cc}
  3648. (computeFastSet): New function.
  3649. (setInfoHash): Added for unit testing.
  3650. (setNumPieces): Added for unit testing.
  3651. * src/DefaultBtInteractive.cc
  3652. * src/BtPieceMessage.cc
  3653. * src/Peer.cc
  3654. * src/Checksum.h
  3655. * src/message.h
  3656. * src/IteratableChecksumValidator.h
  3657. * src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator
  3658. inside it.
  3659. * src/SegmentMan.{h, cc}
  3660. (checkIntegrity): Removed.
  3661. * src/IteratableChunkChecksumValidator.{h, cc}
  3662. * src/Util.h
  3663. (sha1Sum): Removed.
  3664. (simpleMessageDigest): Removed.
  3665. (fileChecksum): Removed.
  3666. (computeFastSet): Removed.
  3667. * src/ShaVisitor.cc
  3668. * src/ChunkChecksum.h
  3669. * src/DownloadCommand.cc
  3670. Removed messageDigest virtual functions.
  3671. * src/MultiDiskAdaptor.{h, cc}
  3672. * src/DiskAdaptor.h
  3673. * src/ByteArrayDiskWriter.h
  3674. * src/DiskWriter.h
  3675. * src/DiskAdaptorWriter.h
  3676. * src/AbstractSingleDiskAdaptor.{h, cc}
  3677. * src/AbstractDiskWriter.{h, cc}
  3678. Fixed comilation error when message digest is disabled.
  3679. * src/MetalinkEntry.{h, cc}
  3680. * src/MetalinkRequestInfo.cc
  3681. Removed srandom and random.
  3682. * src/SimpleRandomizer.h
  3683. Added size() virtual function to DiskAdaptor
  3684. * src/MultiDiskAdaptor.h
  3685. Fixed the bug that causes that files are not opened correctly in
  3686. multi-file torrent.
  3687. * src/TorrentRequestInfo.cc
  3688. * src/MultiDiskAdaptor.cc
  3689. Added SHA256 support
  3690. * src/messageDigest.cc
  3691. * src/Xml2MetalinkProcessor.cc
  3692. Show supported message digest algorithms
  3693. * src/main.cc
  3694. Updated contact info.
  3695. * src/main.cc
  3696. Applied Ross's patch
  3697. * src/a2netcompat.h
  3698. * src/main.cc
  3699. Fixed the bug that prevents a remote metalink from not being processed
  3700. even if '-o foo.metalink' is specified.
  3701. * src/MetalinkRequestInfo.cc
  3702. 2007-08-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3703. Merged Dan's patch:
  3704. * src/ByteArrayDiskWriter.cc: ios_base -> ios
  3705. Use va_copy to avoid core dump on amd64:
  3706. * src/SimpleLogger.cc
  3707. Updated contact info.
  3708. * src/main.cc
  3709. Added #ifdef ENABLE_MESSAGE_DIGEST to fix test errors when message
  3710. digest is not available.
  3711. * src/MetalinkEntry.h
  3712. 2007-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3713. Make a2netcompat.h include a2io.h to fix compilation error:
  3714. * src/a2netcompat.h
  3715. * src/SocketCore.cc: Removed include of a2io.h
  3716. * src/Util.cc: Removed include of a2io.h
  3717. Gather time related functions to a2time.h:
  3718. * src/a2time.h: New file.
  3719. * src/DefaultPeerStorage.cc
  3720. * src/SimpleLogger.cc
  3721. * src/Util.{h, cc}
  3722. * src/SimpleRandomizer.h
  3723. * src/TimeA2.{h,cc}
  3724. * src/DownloadCommand.cc
  3725. * src/main.cc
  3726. Removed #ifdef __MINGW32__ since gai_strerror is included in
  3727. a2netcompat.h:
  3728. * src/NameResolver.cc
  3729. Fixed compilation error without openssl:
  3730. * src/SocketCore.{h,cc}: Moved include of openssl/err.h to SocketCore.h
  3731. Added default block to suppress compiler warnings:
  3732. * src/MetalinkRequestInfo.cc (AccumulateNonP2PUrl::operator())
  3733. 2007-07-26 Ross Smith II <aria2spam at smithii dot com>
  3734. MinGW build enhancements. The following files are added:
  3735. * src/gai_strerror.{c,h}
  3736. * src/gettimeofday.{c,h}
  3737. Changes to support the above new files:
  3738. * configure.ac
  3739. * src/Makefile.am
  3740. * src/a2netcompat.h
  3741. * src/TimeA2.cc
  3742. * src/DefaultPeerStorage.cc
  3743. * src/NameResolver.cc: removed mingw_strerror() function.
  3744. * src/SocketCore.cc: removed mingw_strerror() function.
  3745. Miscellaneous MinGW build fixes.
  3746. * src/a2io.h: Use _lseeki64() instead of lseek()
  3747. * src/common.h
  3748. * src/DefaultFileAllocator.cc
  3749. * src/GlowFileAllocator.cc
  3750. * src/main.cc: Moved #include "prefs.h" to quiet compile error.
  3751. * src/NameResolver.cc
  3752. (callback): Changed int32_t to int.
  3753. (resolve): Changed int32_t to int.
  3754. * src/Platform.cc
  3755. * src/Platform.h
  3756. * test/MultiDiskWriterTest.cc
  3757. * test/PeerMessageUtilTest.cc
  3758. * src/localtime_r.c: Add DeleteCriticalSection() and at exit().
  3759. Other enhancements and fixes.
  3760. * src/HttpRequestCommand.cc
  3761. (executeInternal) Use non-blocking socket for HTTPS (MinGW only).
  3762. * src/SocketCore.cc:
  3763. (error): New function to abstract errno/WSAGetLastError().
  3764. (errorMsg): New function to abstract errno/WSAGetLastError().
  3765. (initiateSecureConnection): Added more detailed error reporting.
  3766. * src/SocketCore.h: Added private variable blocking, to allow
  3767. proper handling of OpenSSL psuedo-errors.
  3768. * src/message.h
  3769. (EX_SSL_INIT_FAILURE)
  3770. (EX_SSL_IO_ERROR)
  3771. (EX_SSL_PROTOCOL_ERROR)
  3772. (EX_SSL_UNKNOWN_ERROR)
  3773. (EX_SSL_CONNECT_ERROR)
  3774. (EX_SOCKET_BLOCKING)
  3775. (EX_SOCKET_NONBLOCKING)
  3776. (EX_SOCKET_UNKNOWN_ERROR)
  3777. * src/Util.cc
  3778. (setGlobalSignalHandler): Renamed signal to sig as signal is a
  3779. reserved name.
  3780. (httpGMT): Fixed typo.
  3781. 2007-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3782. Merged Ross's win32 patch(manually)
  3783. In the course of merging, following files are added.
  3784. * src/strptime.{h,c}
  3785. * src/libgen.{h,c}
  3786. * src/inet_aton.{h,c}
  3787. * src/Platform.{h,cc}
  3788. * src/localtime_r.{h,c}
  3789. * src/getaddrinfo.{h,c}
  3790. I've gethered network related things, and put them to following file:
  3791. * src/a2netcompat.h
  3792. Also io related things are put to following file:
  3793. * src/a2io.h
  3794. Changed %lld to %s because mingw32 doesn't recognize %lld.
  3795. * src/message.h
  3796. (MSG_ALLOCATION_COMPLETED)
  3797. (EX_TOO_LARGE_FILE)
  3798. (EX_SIZE_MISMATCH)
  3799. (EX_FILE_OFFSET_OUT_OF_RANGE)
  3800. (EX_INVALID_CHUNK_CHECKSUM)
  3801. (EX_INVALID_RANGE_HEADER)
  3802. * src/FileAllocationCommand.cc
  3803. * src/HttpResponse.cc
  3804. * src/RequestGroup.cc
  3805. * src/MultiDiskAdaptor.cc
  3806. * src/OptionHandlerImpl.h
  3807. * src/HttpResponseCommand.cc
  3808. * src/FtpNegotiateCommand.cc
  3809. * src/IteratableChecksumValidator.cc
  3810. * src/SegmentMan.cc
  3811. * src/ChunkChecksumValidator.cc
  3812. Added Randomizer::getRandomNumber(long int)
  3813. * src/Randomizer.h (getRandomNumber)
  3814. * src/SimpleRandomizer.h (getRandomNumber)
  3815. * src/BitfieldMan.cc (getMissingIndexRandomly): Use this new function.
  3816. * src/Util.cc (randomAlpha): Use this new function.
  3817. 2007-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3818. Converted int's to in32_t. long long int's are also converted to
  3819. int64_t
  3820. 2007-07-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3821. Fixed the bug that prevents cookies from being sent to the server
  3822. if the domain of cookie is FQDN and starts with ".".
  3823. * src/Cookie.cc (match)
  3824. To add the ability to change peer id.
  3825. * src/DefaultBtContext.h
  3826. (_peerIdPrefix): New variable
  3827. (setPeerIdPrefix): New function.
  3828. * src/torrentRequestInfo.cc
  3829. (execute): Set the option value of PREF_PEER_ID_PREFIX to
  3830. DefaultBtContext.
  3831. * src/main.cc (main): Added peer-id-prefix command-line option.
  3832. The usage message is not added yet.
  3833. * src/DefaultBtContext.cc
  3834. (generatePeerId): Use _peerIdPrefix.
  3835. * src/prefs.h (PREF_PEER_ID_PREFIX): New definition.
  3836. 2007-07-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3837. Fixed the bug that prevents filename in content-disposition from
  3838. being retrieved when filename is not quoted.
  3839. * src/Util.cc (getContentDispositionFilename)
  3840. Fixed the bug that causes infinate loop and memory leak when file open
  3841. operation failed.
  3842. * src/HttpResponseCommand.cc (handleDefaultEncoding)
  3843. 2007-07-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3844. Fixed the bug that causes segfault when all URIs specified are
  3845. unsupported.
  3846. * src/RequestGroupMan.cc (getInitialCommands)
  3847. Check if RequestGroup::createNextCommand() returns empty list of
  3848. commands.
  3849. * src/RequestGroup.cc (createNextCommand)
  3850. Change log level from info to error so that users can notice that
  3851. an error occurred.
  3852. Fixed the bug that causes segfault when a zero-sized file is
  3853. downloaded.
  3854. * src/BitfieldMan.cc (isAllBitSet)
  3855. Return true if bitfieldLength is 0.
  3856. 2007-07-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3857. * src/main.cc
  3858. (showUsage): Added 3 usage examples for metalink download.
  3859. Replace MetalinkChunkChecksum with ChunkChecksum.
  3860. * src/MetalinkChunkChecksum.h: Removed.
  3861. * src/MetalinkEntry.h: MetalinkChunkChecksum -> ChunkChecksum.
  3862. * src/Xml2MetalinkProcessor.h: MetalinkChunkChecksum -> ChunkChecksum.
  3863. * src/Xml2MetalinkProcessor.cc
  3864. (getPieceHash): Use ChunkChecksum instead of MetalinkChunkChecksum.
  3865. * src/MetalinkRequestInfo.cc (execute)
  3866. * Release 0.11.1
  3867. 2007-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3868. Reads URIs from stdin when "-i -" is specified.
  3869. * src/UriFileListParser.h, src/UriFileListParser.cc: Removed.
  3870. * src/UriListParser.h, src/UriListParser.cc: New class.
  3871. * src/StreamUriListParser.h: New class.
  3872. * src/FileUriListParser.h: New class.
  3873. * src/main.cc (main): Use StreamUriListParser and FileUriListParser
  3874. instead of UriFileListParser.
  3875. 2007-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3876. Made console readout more readable.
  3877. * src/ConsoleDownloadEngine.cc (sendStatistics)
  3878. 2007-07-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3879. Fix the bug that causes -s option not to work.
  3880. * src/main.cc (main)
  3881. * src/a2algo.h: New file.
  3882. 2007-07-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3883. Create directory structure specified in metalink file.
  3884. * src/RequestGroup.h, src/RequestGroup.cc
  3885. (initAndOpenFile): Create a directory to store files if it does not
  3886. exist.
  3887. (getDir): New function.
  3888. Added ETA and download speed for an individual file to readout.
  3889. * src/ConsoleDownloadEngine.cc (sendStatistics)
  3890. * src/RequestGroup.h
  3891. (calculateDownloadSpeed): New function.
  3892. 2007-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3893. Made -S option work with metalink file and provided selective download
  3894. to metalink.
  3895. * src/MetalinkEntry.h, src/MetalinkEntry.cc
  3896. (filename): Removed.
  3897. (file): New variable.
  3898. (size): Removed.
  3899. (operator=): Updated.
  3900. (getPath): New function.
  3901. (getLength): New function.
  3902. (toFileEntry): New function.
  3903. * src/TorrentRequestInfo.h, src/TorrentRequestInfo.cc
  3904. (execute): Use toStream.
  3905. (showFileEntry): Removed.
  3906. * src/MetalinkRequestInfo.h
  3907. (targetFiles): New variable.
  3908. (setTargetFiles): New variable.
  3909. * src/MetalinkRequestInfo.cc
  3910. (execute): Added the ability to print file information included in
  3911. a metalink file.
  3912. Added selective download mode to metalink.
  3913. * src/main.cc
  3914. (showUsage): Updated to denote that -S and --select-file options are
  3915. applicable to metalink.
  3916. * src/FileEntry.h
  3917. (operator=): New function.
  3918. (getBasename): New function.
  3919. (getDirname): New function.
  3920. * src/Util.h, src/Util.cc
  3921. (toStream): New function.
  3922. * src/Xml2MetalinkProcessor.cc: Updated.
  3923. Made aria2 work with metalink with directory structure.
  3924. * src/File.h, src/File.cc
  3925. (getBasename): New function.
  3926. (getDirname): New function.
  3927. * src/RequestGroup.h, src/RequestGroup.cc
  3928. (_topDir): New variable.
  3929. (setTopDir): New function.
  3930. (initSegmentMan): A directory structure is added to _segmentMan->dir.
  3931. Rewrote HTTP header parsing with stringstream.
  3932. * src/HttpConnection.h, src/HttpConnection.cc
  3933. (HttpRequestEntry): New class.
  3934. (headerBuf): Removed.
  3935. (headerBufLength): Removed.
  3936. (outstandingHttpRequests): Now its element type is
  3937. HttpRequestEntryHandle.
  3938. (findEndOfHeader): Removed.
  3939. (receiveResponse): Rewritten.
  3940. * src/HttpHeaderProcessor.h, src/HttpHeaderProcessor.cc: New class.
  3941. Updated doc for -j option to notice that it should be used with -i
  3942. option.
  3943. * src/main.cc (showUsage)
  3944. Removed unused classes.
  3945. * src/RequestInfo.h
  3946. (FileInfo): Removed.
  3947. (checksum): Removed.
  3948. (fileInfo): Removed.
  3949. (setChecksum): Removed.
  3950. (getChecksum): Removed.
  3951. (getFileInfo): Removed.
  3952. Use ISO units.
  3953. * src/ConsoleDownloadEngine.cc
  3954. * src/TorrentConsoleDownloadEngine.cc
  3955. * src/Util.cc (abbrevSize)
  3956. 2007-06-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3957. Added the default listening ports to the help message.
  3958. * src/main.cc (showUsage)
  3959. 2007-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3960. Reduce the number of calls to gettimeofday to lower CPU load.
  3961. * src/TimeA2.h, src/TimeA2.cc (differenceInMillis): New function.
  3962. * src/SpeedCalc.h, src/SpeedCalc.cc (calculateSpeed): New function.
  3963. * src/Peer.h (calculateUploadSpeed): New function.
  3964. (calculateDownloadSpeed): New function.
  3965. * src/DefaultPeerStorage.cc
  3966. (CalculateStat): Added _now variable.
  3967. In operator(), call Peer::calculateDownloadSpeed(const struct timeval&)
  3968. and Peer::calculateUploadSpeed(const struct timeval&)
  3969. Drop connection if no request or piece message is exchanged in
  3970. a certain interval.
  3971. * src/DefaultBtInteractive.h
  3972. (btRuntime): New variable.
  3973. (inactiveCheckPoint): New variable.
  3974. (checkActiveInteraction): New function.
  3975. * src/DefaultBtInteractive.cc (receiveMessages): Reset timer when
  3976. request or piece message is received.
  3977. (checkActiveInteraction): New function.
  3978. (doInteractionProcessing): Call checkActiveInteraction.
  3979. Fixed the bug that causes remote Metalink and Torrent files are not
  3980. processed.
  3981. * src/MultiUrlRequestInfo.cc (createNextRequestInfo): Fixed the bug.
  3982. 2007-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3983. Changed format of log file.
  3984. * src/SimpleLogger.cc
  3985. * Release 0.11.0
  3986. 2007-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  3987. * src/AbstractCommand.cc
  3988. (execute): Changed log level of MSG_RESTARTING_DOWNLOAD and
  3989. MSG_MAX_TRY from error to info.
  3990. Added MSG_DOWNLOAD_ABORTED after MSG_MAX_TRY.
  3991. * src/message.h
  3992. (MSG_TORRENT_DOWNLOAD_ABORTED): New definition.
  3993. (MSG_DOWNLOAD_ABORTED): Added %s.
  3994. (MSG_RESTARTING_DOWNLOAD): Added %s.
  3995. (MSG_DOWNLOAD_ALREADY_COMPLETED): Updated.
  3996. * src/PeerAbstractCommand.cc
  3997. (execute): MSG_DOWNLOAD_ABORTED -> MSG_TORRENT_DOWNLOAD_ABORTED
  3998. * src/Request.h
  3999. (cookieBox): Made ShardHandle.
  4000. * src/RequestGroup.h, src/RequestGroup.cc
  4001. (createNextCommandWithAdj): New function.
  4002. * src/FileAllocationCommand.cc
  4003. (executeInternal): Use createNextCommandWithAdj().
  4004. * src/CheckIntegrityCommand.cc
  4005. (executeInternal): Use createNextCommandWithAdj().
  4006. Added --load-cookies command-option.
  4007. * src/OptionHandlerFactory.cc
  4008. (createOptionHandlers): Added PREF_LOAD_COOKIES.
  4009. * src/CookieBox.h, src/CookieBox.cc: Rwritten using CookieParser.
  4010. Now aria2 can handle cookie's expiration date.
  4011. * src/Cookie.h (expires): Changed its type to time_t.
  4012. * src/main.cc: Added --load-cookies command-line option.
  4013. * src/prefs.h (PREF_LOAD_COOKIES): New definition.
  4014. * src/Util.h, src/Util.cc (httpGMT): New function.
  4015. * src/Request.cc (Request): Initialize cookieBox using
  4016. CookieBoxFactory.
  4017. * src/CookieBoxFactory.h, src/CookieBoxFactory.cc: New class.
  4018. * src/CookieParser.h, src/CookieParser.cc: New class.
  4019. * src/main.cc: Chagned the default value of --metalink-servers to 5.
  4020. * src/HttpResponseCommand.cc
  4021. (handleOtherEncoding): Call RequestGroup::shouldCancelDownloadForSafety
  4022. * src/MetalinkRequestInfo.cc: Now -s option is ignored in Metalink
  4023. download.
  4024. 2007-06-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4025. Added -j command-line option.
  4026. * src/OptionHandlerFactory.cc (createOptionHandlers)
  4027. * src/main.cc
  4028. * src/ByteArrayDiskWriter.h, src/ByteArrayDiskWriter.cc
  4029. Rewritten using stringstream.
  4030. * src/TrackerUpdateCommand.h, src/TrackerUpdateCommand.cc
  4031. Rewritten using stringstream.
  4032. 2007-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4033. Make download size shown in MB, KB.
  4034. * src/ConsoleDownloadEngine.h (sendStatistics)
  4035. * src/Util.h, srcUtil.cc (abbrevSize): New function.
  4036. 2007-06-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4037. Accept incoming connections if download rate is low.
  4038. * src/PeerListenCommand.h, src/PeerListenCommand.cc:
  4039. (_lowestSpeedLimit): New variable.
  4040. (setLowestSpeedLimit): New function.
  4041. (execute): Accept incoming connections if download rate is low.
  4042. MAX_PEERS is ignored in this case.
  4043. Disable PREF_OUT in multiple concurrent download:
  4044. * src/RequestGroup.h, src/RequestGroup.cc
  4045. (setUserDefinedFilename): New function.
  4046. * src/DownloadEngineFactory.cc
  4047. (newConsoleEngine): Do not set PREF_OUT to requestGroup in multiple
  4048. concurrent download.
  4049. * src/DefaultSegmentManFactory.cc
  4050. (createNewInstance): Comment out the line: segmentMan->ufilename = ...
  4051. 2007-06-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4052. RequestGroup::getNextCommand() was renamed to createNextCommand().
  4053. Added its overloaded method.
  4054. * src/RequestGroup.h
  4055. (_numConcurrentCommand): New variable.
  4056. (setNumConcurrentCommand): New function.
  4057. * src/RequestGroup.cc
  4058. Abort download if same file is being downloaded concurrently.
  4059. * src/RequestGroup.h, src/RequestGroupMan.cc
  4060. (isSameFileBeingDownloaded): New function.
  4061. * src/HttpResponseCommand.cc (executeInternal)
  4062. * src/FtpNegotiateCommand.cc (recvSize)
  4063. * src/message.h (EX_DUPLICATE_FILE_DOWNLOAD): New definition.
  4064. * main.cc: Added help message for -i option.
  4065. 2007-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4066. * src/FileAllocationCommand.cc: Derived from RealtimeCommand.
  4067. * src/CheckIntegrityCommand.cc: Derived from RealtimeCommand.
  4068. * src/MetalinkEntry.h
  4069. (checksum): Changed to ChecksumHandle
  4070. * src/MetalinkRequestInfo.cc
  4071. (checksum): Changed to ChecksumHandle
  4072. * src/File.cc
  4073. (mkdirs): OPEN_MODE -> DIR_OPEN_MODE
  4074. * src/common.h
  4075. (DIR_OPEN_MODE): New definition
  4076. * src/RequestGroup.cc
  4077. (prepareForNextAction): Added an argument.
  4078. * src/message.h
  4079. (MSG_GOOD_CHECKSUM): New definition
  4080. (MSG_BAD_CHECKSUM): New definition
  4081. * src/HttpResponseCommand.cc
  4082. (handleDefaultEncoding): Continue download sequence in new
  4083. non-segmented download.
  4084. * src/FileAllocationEntry.h
  4085. (_nextDownloadCommand): New variable.
  4086. * src/DownloadCommand.cc
  4087. (prepareForNextSegment): Create ChecksumCommand if checksum is
  4088. available.
  4089. * src/RealtimeCommand.h, src/RealtimeCommand.cc: New class.
  4090. * src/IteratableChecksumValidator.h,
  4091. src/IteratableChecksumValidator.cc: New class.
  4092. * src/ChecksumCommand.h, src/ChecksumCommand.cc: New class.
  4093. 2007-05-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4094. Change file mode to 666:
  4095. * src/common.h (OPEN_MODE): New definition.
  4096. * src/File.cc
  4097. * src/Util.cc
  4098. * src/Directry.cc
  4099. * src/AbstractDiskWriter.cc
  4100. Change the level of log message "download aborted" to debug:
  4101. * src/PeerAbstractCommand.cc (execute)
  4102. * src/RequestGroup.h (RequestGroup): Initialized _hintTotalLength to 0.
  4103. * src/TrackerWatcherCommand.cc
  4104. (createCommand): Sleep some seconds after request failed.
  4105. If tracker request fails more than value of PREF_TRACKER_MAX_TRIES,
  4106. then abort tracker request.
  4107. 2007-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4108. * Added the simultaneous download feature.
  4109. * src/main.cc: Print "Exception caught: " when exception is caught.
  4110. Use CUIDCounter instead of BtRuntime::getNewCuid():
  4111. * src/ActivePeerConnectionCommand.cc
  4112. * src/PeerInteractionCommand.cc
  4113. * src/BtRuntime.h
  4114. (cuidCounter): Removed.
  4115. (getNewCuid): Removed.
  4116. * src/DownloadEngineFactory.cc
  4117. * src/PeerListenCommand.cc
  4118. * src/TrackerUpdateCommand.cc
  4119. * src/PeerInitiateConnectionCommand.cc
  4120. 2007-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4121. * src/PeerAbstractCommand.cc
  4122. (onAbort): Call PeerStorage::returnPeer()
  4123. * src/DefaultPeerStorage.h, src/DefaultPeerStorage.cc
  4124. (incomingPeers): New variable.
  4125. (addIncomingPeer): New function.
  4126. (returnPeer): New function.
  4127. (onErasingPeer): New function.
  4128. (addPeer): push_back -> push_front
  4129. (getActivePeers): Rewritten.
  4130. (calculateStat): Rewritten.
  4131. * src/PeerStorage.h
  4132. (TransferStat::copy): New function.
  4133. (TransferStat::TransferStat): New function.
  4134. (TransferStat::operator=): New function.
  4135. (addIncomingPeer): New function.
  4136. (returnPeer): New function.
  4137. * src/PeerListenCommand.cc
  4138. (execute): Use PeerStorage::addIncomingPeer() instead of
  4139. Peer::addPeer().
  4140. 2007-04-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4141. Connect to a peer actively when download speed is lower than specified
  4142. speed in torrent download:
  4143. * src/ActivePeerConnectionCommand.h: New class.
  4144. 2007-03-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4145. * src/HttpRequest.cc (createRequest): url-encode user-agent
  4146. * src/main.cc: Fixed the bug that prevents download if .netrc
  4147. doesn't exist.
  4148. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4149. To cache resolved hostname:
  4150. * src/AbstractCommand.h, src/AbstractCommand.cc
  4151. (resolveHostname): Put outside #ifdef ENABLE_ASYNC_DNS clause.
  4152. Added dns cache.
  4153. * src/FtpInitiateConnectionCommand.cc
  4154. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS.
  4155. * src/NameResolver.h, src/NameResolver.cc: Added synchronized
  4156. NameResolver working without ares.
  4157. * src/TorrentRequestInfo.cc
  4158. (execute): Don't cache dns in torrent download.
  4159. * src/HttpInitiateConnectionCommand.cc
  4160. (executeInternal): Removed #ifdef ENABLE_ASYNC_DNS
  4161. * src/DNSCache.h: New class.
  4162. * src/UrlRequestInfo.cc
  4163. (execute): Use dns cache.
  4164. In http request, suppress port number in http request header if port
  4165. is 80 or 443:
  4166. * src/HttpRequest.cc (getHostText): Suppress port number in http
  4167. request header if port is 80 or 443.
  4168. (createProxyRequest): Allways send port number.
  4169. 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4170. To add the command-line option which disables netrc support:
  4171. * src/OptionHandlerFactory.cc
  4172. (createOptionHandlers): Added PREF_NO_NETRC.
  4173. * src/main.cc: Added -n option.
  4174. * src/prefs.h (PREF_NO_NETRC): New definition.
  4175. * src/RequestFactory.cc: Do not use netrc in ftp if PREF_NO_NETRC is
  4176. V_TRUE.
  4177. Note that netrc is not used in http, http proxy even if PREF_NO_NETRC
  4178. is V_FALSE. This may get configurable in the future release.
  4179. To clear peer's error status by time basis:
  4180. * src/PeerAbstractCommand.cc
  4181. (onAbort): Call Peer::startBadCondition().
  4182. * src/Peer.h, src/Peer.cc
  4183. (error): Removed.
  4184. (_badConditionStartTime): New variable.
  4185. (_badConditionInterval): New variable. Initialized to 10 seconds.
  4186. (startBadCondition): New function.
  4187. (isGood): New function.
  4188. * src/DefaultPeerStorage.cc
  4189. (addPeer): Use Peer::isGood().
  4190. (FindFinePeer): Use Peer::isGood().
  4191. Always include port number in http request header:
  4192. * src/HttpRequest.cc (getHostText): Always include port number in
  4193. http request header.
  4194. 2007-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4195. To the ability to read options from a config file:
  4196. * src/main.cc: Command-line parameter validation is delegated to
  4197. OptionHandler class.
  4198. * src/OptionHandlerFactory.h, src/OptionHandlerFactory.cc: New class.
  4199. * src/Option.h, src/Option.cc (clear): New function.
  4200. * src/OptionParser.h, src/OptionParser.cc: New class.
  4201. * src/OptionHandler.h: New class.
  4202. * src/NameMatchOptionHandler.h: New class.
  4203. * src/OptionHandlerImpl.h: New classes.
  4204. * src/prefs.h: '_' -> '-'
  4205. (FTP_PASV_ENABLED): Renamed to FTP_PASV.
  4206. (FTP_PASV): New definition.
  4207. * src/Util.h, src/Util.cc (getRealSize): New function.
  4208. To disable netrc support if .netrc file does not have correct
  4209. permissions:
  4210. * src/File.h, src/File.cc (mode): New function.
  4211. To prevent confidential information to be logged:
  4212. * src/HttpConnection.h, src/HttpConnection.cc
  4213. (eraseConfidentialInfo): New function.
  4214. (sendRequest): Call eraseConfidentialInfo().
  4215. (sendProxyRequest): Call eraseConfidentialInfo().
  4216. * src/main.cc: Validate permissions of .netrc file.
  4217. To add --user-agent command-line option:
  4218. * src/main.cc: Added new command line option: --user-agent
  4219. * src/prefs.h (PREF_USER_AGENT): New definition.
  4220. * src/HttpRequestCommand.cc (executeInternal): Set user-agent option
  4221. parameter to HttpRequest object.
  4222. * src/AbstractProxyRequestCommand.cc
  4223. (executeInternal): Set user-agent option parameter to HttpRequest
  4224. object.
  4225. Marged the patches from Dan Fandrich.
  4226. 2007-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4227. Use filename and size from Metalink file instead of sending HEAD
  4228. request:
  4229. * src/UrlRequestInfo.h
  4230. (_filename): New variable.
  4231. (_totalLength): New variable.
  4232. (setTotalLength): New variable.
  4233. (setFilename): New variable.
  4234. * src/MetalinkRequestInfo.cc
  4235. (execute): Set filename and size to UrlRequestInfo
  4236. * src/UrlRequestInfo.cc
  4237. (execute): Use filename and size from Metalink instead of seding
  4238. HEAD request to servers.
  4239. 2007-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4240. To add the ability to resume downloading a partially downloaded file
  4241. which is downloaded from the beginning:
  4242. * src/FileAllocator.h: Made abstract class. New DefaultFileAllocator
  4243. takes this role.
  4244. * src/main.cc: Added -c option.
  4245. * src/BitfieldMan.h, src/BitfieldMan.cc (setBitRange): New function.
  4246. * src/DiskWriter.h (openExistingFile): Added totalLength argument.
  4247. * src/prefs.h (PREF_CONTINUE): New definition.
  4248. * src/SegmentMan.h, src/SegmentMan.cc (markPieceDone): New function.
  4249. * src/DefaultDiskWriter.cc
  4250. (createNewDiskWriter): Add GlowFileAllocator to the new object.
  4251. * src/AbstractDiskWriter.h
  4252. (glowFileAllocator): New variable.
  4253. * src/AbstractDiskWriter.cc
  4254. (openExistingFile): Now preallocate file space from the end of the
  4255. existing file if totalLength argument is specified and grater than 0.
  4256. * src/UrlRequestInfo.cc: If -c option is specified and the file
  4257. to download exists in local, continue the download of the file.
  4258. --allow-overwrite=true is assumed in this context.
  4259. * src/DefaultFileAllocator.h, src/DefaultFileAllocator.cc: New class.
  4260. * src/GlowFileAllocator.h, src/GlowFileAllocator.cc: New class.
  4261. Throw exception if --check-integrity=true is specified but chunk
  4262. checksums are not provided:
  4263. * src/UrlRequestInfo.cc
  4264. Do not print URLs to stdout:
  4265. * src/UrlRequestInfo.cc
  4266. 2007-03-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4267. * src/Request.h: Use AuthResolver to get authentication information.
  4268. * src/main.cc: Made RequestFactory a singleton object. Netrc is now
  4269. set to RequestFactory object.
  4270. * src/AuthConfigItem.h, src/AuthConfigItem.cc: Removed.
  4271. * src/AuthConfig.h, src/AuthConfig.cc: Rewritten.
  4272. * src/TrackerWatcherComand.cc: Use RequestFactorySingletonHolder to
  4273. create Request object.
  4274. 2007-03-19 Tatsuhiro Tsujikawa <tujikawa at valkyrie dot rednoah com>
  4275. To integrate Netrc into exsiting classes:
  4276. * src/Request.h
  4277. (_userDefinedAuthConfig): New variable.
  4278. (findNetrcAuthenticator): New function.
  4279. (segment): Removed.
  4280. (setUserDefinedAuthConfig): New function.
  4281. (resolveHttpAuthConfigItem): New function.
  4282. (resolveFtpAuthConfigItem): New function.
  4283. (resolveHttpProxyAuthConfigItem): New function.
  4284. * src/HttpRequest.h
  4285. (authConfig): Removed.
  4286. (proxyAuthConfig): Removed.
  4287. (setAuthConfig): Removed.
  4288. (setProxyAuthConfig): Removed.
  4289. * src/UrlRequest.h
  4290. (getHeadResult): Added a parameter: authConfigHandle
  4291. * src/common.h
  4292. (SingletonHolder.h): New include.
  4293. * src/main.cc
  4294. (Netrc.h): New include.
  4295. (main): Removed initial values of PREF_FTP_USER, PREF_FTP_PASSWD.
  4296. Added initial value of PREF_NETRC_PATH.
  4297. Added the initialization of netrc.
  4298. * src/AuthConfig.h: New class.
  4299. * src/prefs.h
  4300. (PREF_NETRC_PATH): New definition.
  4301. * src/HttpAuthConfig.h: Removed.
  4302. * src/Netrc.cc
  4303. (getRequiredNextToken): New function.
  4304. (skipMacdef): New function.
  4305. (parse): Rewritten.
  4306. * src/Netrc.h
  4307. (getRequiredNextToken): New function.
  4308. (skipMacdef): New function.
  4309. * src/Util.h, src/Util.cc
  4310. (getHomeDir): New function.
  4311. * src/TrackerWatcherComand.cc
  4312. (createRequestCommand): Use AuthConfig.
  4313. * src/FtpConnection.cc
  4314. (sendUser): Use Request::resolveFtpAuthConfigItem().
  4315. (sendPass): Use Request::resolveFtpAuthConfigItem().
  4316. * src/Request.cc
  4317. (findNetrcAuthenticator): New function.
  4318. (resolveHttpAuthConfigItem): New function.
  4319. (resolveFtpAuthConfigItem): New function.
  4320. (resolveHttpProxyAuthConfigItem): New function.
  4321. * src/UrlRequestInfo.cc: Use AuthConfig.
  4322. * src/HttpRequest.cc
  4323. (createRequest): Use authConfig.
  4324. (getProxyAuthString): Use authConfig.
  4325. (configure): Removed PREF_HTTP_USER, PREF_HTTP_PASSWD,
  4326. PREF_HTTP_PROXY_USER, PREF_HTTP_PROXY_PASSWD.
  4327. 2007-03-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4328. To reduce overhead to find commands whose socket is either
  4329. readable or writable in the download engine loop:
  4330. * src/Command.h, src/Command.cc
  4331. (STATUS): New enum.
  4332. (status): New variable.
  4333. (statusMatch): New function.
  4334. (setStatusActive): New function.
  4335. (setStatusInactive): New function.
  4336. * src/DownloadEngine.h, src/DownloadEngine.cc
  4337. (executeCommand): New function.
  4338. (run): Simplified.
  4339. (waitData): Call Command::setStatusActive() when command's socket is
  4340. readable or writable.
  4341. 2007-03-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4342. To handle Segment as SegmentHandle:
  4343. * src/AbstractCommand.cc (execute): Rewritten.
  4344. * src/SegmentMan.h: Segment -> SegmentHandle
  4345. Introducded HttpResponse class, HttpRequest class to improve code
  4346. extensiveness and make it clear:
  4347. * src/HttpDownloadCommand.cc: transfer encoders are now managed by
  4348. HttpResponse class.
  4349. * src/HttpRequest.h, src/HttpRequest.cc: New class.
  4350. * src/HttpResponse.h, src/HttpResponse.cc: New class.
  4351. * src/HttpConnection.cc: Contruction of http request were moved to
  4352. HttpRequest class.
  4353. * src/HttpResponseCommand.h, src/HttpResponseCommand.cc: Refactored.
  4354. * src/HttpRequestCommand.cc (executeInternal): Rewritten.
  4355. * src/HttpAuthConfig.h: New class.
  4356. * src/Range.h: New class.
  4357. To make FtpTunnel{Request, Response}Command and
  4358. HttpProxy{Request, Response}Command derived from
  4359. AbstractProxy{Request, Response}Command:
  4360. * src/FtpTunnelResponseCommand.h, src/FtpTunnelResponseCommand.cc:
  4361. Derived from AbstractProxyRequestCommand class.
  4362. * src/FtpTunnelRequestCommand.h, src/FtpTunnelRequestCommand.cc:
  4363. Derived from AbstractProxyResponseCommand class.
  4364. * src/HttpProxyRequestCommand.h, src/HttpProxyRequestCommand.cc:
  4365. Derived from AbstractProxyRequestCommand class.
  4366. * src/HttpProxyResponseCommand.h, src/HttpProxyResponseCommand.cc:
  4367. Derived from AbstractProxyResponseCommand class.
  4368. * src/AbstractProxyRequestCommand.h, src/AbstractProxyRequestCommand.cc
  4369. : New class.
  4370. * src/AbstractProxyResponseCommand.h,
  4371. src/AbstractProxyResponseCommand.cc: New class.
  4372. To add netrc support:
  4373. * src/Netrc.h, src/Netrc.cc: New class.
  4374. * src/Util.h, src/Util.cc (split): New function.
  4375. * src/HttpHeader.cc (getRange): Fixed so that it inspects
  4376. "Content-Range" header instead of "Range" header.
  4377. * src/HttpHeader.h
  4378. (getStatus): Removed.
  4379. (setStatus): Removed.
  4380. * src/Segment.h
  4381. (getPositionToWrite): New function.
  4382. 2007-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4383. * src/HttpHeader.h
  4384. (Range.h): New include.
  4385. (status): New variable.
  4386. (HttpHeader): Initialized status with 0.
  4387. (getStatus): New function.
  4388. (setStatus): New function.
  4389. (getRange): New function.
  4390. (HttpHeaderHandle): New function.
  4391. * src/HttpHeader.cc
  4392. (getRange): New function.
  4393. * src/Request.h
  4394. (RequestWeakHandle): New definition.
  4395. * src/HttpConnection.h
  4396. (HttpConnectionHandle): New type definition.
  4397. * src/HttpConnection.cc
  4398. (receiveResponse): Set HTTP status to headers.
  4399. * src/main.cc
  4400. (showUsage): Fixed typo.
  4401. * src/Segment.h
  4402. (SegmentHandle): New type definition.
  4403. * src/BitfieldMan.h
  4404. (getMissingUnusedLength): New function.
  4405. * src/BitfieldMan.cc
  4406. (getMissingUnusedLength): New function.
  4407. 2007-02-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4408. To fix static initialization order problem:
  4409. * src/BitfieldManFactory.h
  4410. (defaultRandomizer): Removed.
  4411. (factory): New variable.
  4412. (getNewFactory): Removed.
  4413. (getFactoryInstance): New function.
  4414. (setDefaultRandomizer): Rewritten.
  4415. (getDefaultRandomizer): Rewritten.
  4416. * src/BitfieldManFactory.cc
  4417. (defaultRandomizer): Removed.
  4418. (factory): Initialized to 0.
  4419. (BitfieldManFactory): Initialized randomizer to 0.
  4420. * src/DefaultPieceStorage.cc
  4421. (DefaultPieceStorage): getNewFactory() -> getFactoryInstance()
  4422. * src/Peer.cc
  4423. (Peer): getNewFactory() -> getFactoryInstance()
  4424. * src/SegmentMan.cc
  4425. (initBitfield): getNewFactory() -> getFactoryInstance()
  4426. * src/Piece.cc
  4427. (Piece): getNewFactory() -> getFactoryInstance()
  4428. 2007-02-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4429. To fix the bug that causes crash on Max OS X:
  4430. * src/SimpleRandomizer.h
  4431. (getInstance): Create new instance if the static variable is null.
  4432. * src/SimpleRandomizer.cc
  4433. (randomizer): Initialized to 0.
  4434. * src/BitfieldManFactory.h
  4435. (getNewFactory): Removed the call to setRandomizer().
  4436. To fix the miscalculation of the range of checksum:
  4437. * src/BitfieldMan.h
  4438. (isBitSetOffsetRange): New function.
  4439. * src/BitfieldMan.cc
  4440. (isBitSetOffsetRange): New function.
  4441. * src/SegmentMan.cc
  4442. (tryChunkChecksumValidation): Use BitfieldMan::isBitSetOffsetRange().
  4443. Use bitfield->getBlockLength() instead of segment.segmentLength.
  4444. * Release 0.10.1
  4445. 2007-02-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4446. To lower CPU usage in BitTorrent download when --max-upload-limit
  4447. command-line option specified:
  4448. * src/DefaultBtMessageDispatcher.cc
  4449. (sendMessages): Calculate uploading speed only when current message
  4450. is uploading data and is not sent yet.
  4451. * src/DefaultPeerStorage.h
  4452. (MAX_PEER_LIST_SIZE): 100 -> 60, because 60 is well enough.
  4453. * src/HttpResponseCommand.cc
  4454. (handleDefaultEncoding): Added the cast to int32_t to itos.
  4455. This fixes compile error in Soralis 10.
  4456. 2007-01-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4457. To fix segfault in Metalink download:
  4458. * src/UrlRequestInfo.h
  4459. (filename): Removed.
  4460. (totalLength): Removed.
  4461. (setTotalLength): Removed.
  4462. (setFilename): Removed.
  4463. * src/MetalinkRequestInfo.cc
  4464. (execute): Do not set filename and totalLength to reqInfo.
  4465. Set chunk checksum to reqInfo if it is not null.
  4466. * src/HttpResponseCommand.cc
  4467. (executeInternal): Fixed filename in log.
  4468. (handleDefaultEncoding): Removed the call to initBitfield() and
  4469. markAllPiecesDone().
  4470. (handleOtherEncoding): Added HEAD method handling.
  4471. * src/FtpNegotiateCommand.cc
  4472. (executeInternal): Added SEQ_HEAD_OK handling.
  4473. (recvSize): In HEAD handling, set sequence to SEQ_HEAD_OK and
  4474. return false.
  4475. * src/FtpNegotiateCommand.h
  4476. (SEQ_HEAD_OK): New definition.
  4477. * src/SegmentMan.cc
  4478. (initBitfield): Delete bitfield.
  4479. (isChunkChecksumValidationReady): Fixed the condition.
  4480. * src/UrlRequestInfo.cc: Fixed so that Metalink and Torrent download
  4481. works fine.
  4482. 2007-01-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4483. * src/Xml2MetalinkProcessor.h
  4484. (xpathExists): New function.
  4485. * src/Xml2MetalinkProcessor.cc
  4486. (xpathExists): New function.
  4487. Not to send HEAD request if filename and size are available in Metalink
  4488. file:
  4489. * src/UrlRequestInfo.h
  4490. (filename): New variable.
  4491. (totalLength): New variable.
  4492. (setTotalLength): New function.
  4493. (setFilename): New function.
  4494. * src/MetalinkRequestInfo.cc
  4495. (execute): Set filename and size to UrlRequestInfo.
  4496. * src/MetalinkEntry.cc
  4497. (MetalinkEntry): Initialize size with 0.
  4498. * src/UrlRequestInfo.cc
  4499. (execute): Set filename and size to SegmentMan.
  4500. Not to download rest of the files after selected files are downloaded
  4501. in BitTorrent:
  4502. * src/PieceStorage.h
  4503. (allDownloadFinished): New function.
  4504. * src/DefaultBtAnnounce.cc
  4505. (isCompleteAnnounceReady): Use allDownloadFinished instead of
  4506. downloadFinished.
  4507. (getAnnounceUrl): Use allDownloadFinished instead of downloadFinished.
  4508. * src/DefaultPieceStorage.cc
  4509. (completePiece): Use allDownloadFinished instead of downloadFinished.
  4510. Commented out the call to finishSelectiveDownloadingMode().
  4511. (downloadFinished): Call isFilteredAllBitSet() instead of
  4512. isAllBitSet().
  4513. (allDownloadFinished): New function.
  4514. * src/DefaultBtInteractive.cc
  4515. (addBitfieldMessageToQueue): Call allDownloadFinished() instead of
  4516. downloadFinished().
  4517. (checkHave): Call allDownloadFinished() instead of downloadFinished().
  4518. * src/TorrentDownloadEngine.cc
  4519. (onEndOfRun): Call allDownloadFinished() instead of downloadFinished().
  4520. * src/BitfieldMan.h
  4521. (isFilteredAllBitSet): New function.
  4522. * src/ShareRatioSeedCriteria.h
  4523. (PieceStorage.h): New include.
  4524. (pieceStorage): New variable.
  4525. (evaluate):
  4526. btContext->getTotalLength() -> pieceStorage->getCompletedLength()
  4527. * src/BitfieldMan.cc
  4528. (isFilteredAllBitSet): New function.
  4529. (isAllBitSet): Filter is not took into account.
  4530. Rename --force-truncate as --allow-overwrite:
  4531. * src/TorrentRequestInfo.cc
  4532. (execute): PREF_FORCE_TRUNCATE -> PREF_ALLOW_OVERWRITE
  4533. * src/main.cc
  4534. (showUsage): --force-truncate -> --allow-overwrite
  4535. * src/message.h
  4536. (EX_FILE_ALREADY_EXISTS): --force-truncate -> --allow-overwrite
  4537. * src/prefs.h
  4538. (PREF_FORCE_TRUNCATE): Removed.
  4539. (PREF_ALLOW_OVERWRITE): New definition.
  4540. * src/SegmentMan.cc
  4541. (shouldCancelDownloadForSafety): --force-truncate -> --allow-overwrite
  4542. * src/MetalinkRequestInfo.cc
  4543. (execute): Queueing message are now logged in info level.
  4544. * src/common.h
  4545. (LONG_LONG_MAX): Removed.
  4546. (LONG_LONG_MIN): Removed.
  4547. * src/HttpResponseCommand.cc
  4548. (handleDefaultEncoding): LONG_LONG_MAX -> INT64_MAX
  4549. * src/FtpNegotiateCommand.cc
  4550. (recvSize): LONG_LONG_MAX -> INT64_MAX
  4551. * src/main.cc
  4552. (showUsage): Added --check-integriy and --realtime-chunk-checksum
  4553. command-line option.
  4554. (main): Added --check-integriy and --realtime-chunk-checksum
  4555. command-line option.
  4556. --force-truncate -> --allow-overwrite
  4557. Set initial value of --check-integrity option to false.
  4558. Don't show usage when error occurs while persing command-line options.
  4559. Removed deprecated --upload-limit option.
  4560. 2007-01-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4561. * src/message.h: Added EX_INVALID_PAYLOAD_SIZE and
  4562. EX_INVALID_BT_MESSAGE_ID. Following source files affected.
  4563. * src/BtAllowedFastMessage.cc:
  4564. * src/BtBitfieldMessage.cc
  4565. * src/BtCancelMessage.cc
  4566. * src/BtChokeMessage.cc
  4567. * src/BtHaveAllMessage.cc
  4568. * src/BtHaveMessage.cc
  4569. * src/BtHaveNoneMessage.cc
  4570. * src/BtInterestedMessage.cc
  4571. * src/BtNotInterestedMessage.cc
  4572. * src/BtPieceMessage.cc
  4573. * src/BtPortMessage.cc
  4574. * src/BtRejectMessage.cc
  4575. * src/BtRequestMessage.cc
  4576. * src/BtSuggestPieceMessage.cc
  4577. * src/BtUnchokeMessage.cc
  4578. * src/message.h: Added EX_INVALID_CHUNK_CHECKSUM. Following source
  4579. files are affected.
  4580. * src/ChunkChecksumValidator.cc
  4581. * src/SegmentMan.cc
  4582. 2007-01-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4583. To add chunk checksum validation:
  4584. * src/MetalinkEntry.h
  4585. (MetalinkChunkChecksum.h): New include.
  4586. (chunkChecksum): New variable.
  4587. * src/Request.h
  4588. (method): New variable.
  4589. (setMethod): New function.
  4590. (getMethod): New function.
  4591. (METHOD_GET): New static constant.
  4592. (METHOD_HEAD): New static constant.
  4593. * src/Xml2MetalinkProcessor.h
  4594. (getPieceHash): New function.
  4595. * src/PieceStorage.h
  4596. (markAllPiecesDone): New function.
  4597. (checkIntegrity): New function.
  4598. * src/FileAllocator.h
  4599. (NullFileAllocationMonitor.h): New include.
  4600. (FileAllocator): Initialize fileAllocationMonitor with new
  4601. NullFileAllocationMonitor().
  4602. * src/MultiDiskAdaptor.h
  4603. (messageDigest.h): Remove include.
  4604. (ctx): Removed.
  4605. (hashUpdate): Added ctx.
  4606. (MultiDiskAdaptor): Removed ctx.
  4607. (sha1Sum): Renamed as messageDigest.
  4608. (messageDigest): New function.
  4609. * src/UrlRequestInfo.h
  4610. (HeadResult): New class.
  4611. (digestAlgo): New variable.
  4612. (chunkChecksumLength): New variable.
  4613. (chunkChecksums): New variable.
  4614. (getHeadResult): New function.
  4615. (UrlRequestInfo): Added digestAlgo, chunkChecksumLength.
  4616. (setDigestAlgo): New function.
  4617. (setChunkChecksumLength): New function.
  4618. (setChunkChecksums): New function.
  4619. * src/DefaultPieceStorage.cc
  4620. (DiskAdaptorWriter.h): New include.
  4621. (ChunkChecksumValidator.h): New include.
  4622. (markAllPiecesDone): New function.
  4623. (checkIntegrity): New function.
  4624. * src/DefaultBtContext.h
  4625. (getPieceHashes): New function.
  4626. * src/TorrentRequestInfo.cc
  4627. (execute): Try to validate chunk checksum if file already exists and
  4628. .aria2 file doesn't there and user allows aria2 to overwrite it.
  4629. * src/messageDigest.h
  4630. (~MessageDigestContext): Added digestFree().
  4631. * src/MetalinkRequestInfo.cc
  4632. (execute): Set digestAlgo, chunkChecksum, chunkChecksums to reqInfo.
  4633. * src/DiskAdaptor.h
  4634. (messageDigest.h): New include.
  4635. (sha1Sum): Renamed as messageDigest.
  4636. (messageDigest): New function.
  4637. * src/DownloadCommand.h
  4638. (PeerStat.h): New include.
  4639. (maxDownloadSpeedLimit): New variable.
  4640. (startupIdleTime): New variable.
  4641. (lowestDownloadSpeedLimit): New variable.
  4642. (peerStat): New variable.
  4643. (setMaxDownloadSpeedLimit): New function.
  4644. (setStartupIdleTime): New function.
  4645. (setLowestDownloadSPeedLimit): New function.
  4646. * src/BtContext.h
  4647. (getPieceHashes): New function.
  4648. * src/main.cc
  4649. (main): Set PREF_REALTIME_CHUNK_CHECKSUM and PREF_CHECK_INTEGRITY
  4650. option to true for testing purpose.
  4651. * src/BtPieceMessage.cc
  4652. (checkPieceHash): Use messageDigest
  4653. * src/DownloadEngine.cc
  4654. (SetDescriptor): Removed.
  4655. (AccumulateActiveCommand): Removed.
  4656. (waitData): Rewritten.
  4657. (updateFdSet): Rewritten.
  4658. * src/MultiDiskAdaptor.cc
  4659. (hashUpdate): Added ctx.
  4660. (sha1Sum): Renamed as messageDigest.
  4661. (messageDigest): New function.
  4662. * src/BitfieldMan.h
  4663. (isBitRangeSet): New function.
  4664. (unsetBitRange): New function.
  4665. * src/ByteArrayDiskWriter.h
  4666. (sha1Sum): Renamed as messageDigest.
  4667. (messageDigest): New function.
  4668. * src/ConsoleDownloadEngine.cc
  4669. (calculateStatistics): If nspeed < 0 then set nspeed to 0.
  4670. * src/DiskWriter.h
  4671. (messageDigest.h): New include.
  4672. (sha1Sum): Renamed as messageDigest.
  4673. (messageDigest): New function.
  4674. * src/ChunkChecksumValidator.h: New class.
  4675. * src/DiskAdaptorWriter.h: New class.
  4676. * src/prefs.h
  4677. (PREF_REALTIME_CHUNK_CHECKSUM): New definition.
  4678. (PREF_CHECK_INTEGRITY): New definition.
  4679. * src/HttpResponseCommand.cc
  4680. (handleDefaultEncoding): Added method "HEAD" handling.
  4681. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  4682. (handleOtherEncoding):
  4683. Added the call to e->segmentMan->shouldCancelDownloadForSafety().
  4684. (createHttpDownloadCommand): Set maxDownloadSpeedLimit,
  4685. startupIdleTime, lowestDownloadSpeedLimit to command.
  4686. * src/SegmentMan.h
  4687. (getSegmentEntryByIndex): New function.
  4688. (getSegmentEntryByCuid): New function.
  4689. (getSegmentEntryIteratorByCuid): New function.
  4690. (diskWriter): DiskWriter -> DiskWriterHandle
  4691. (pieceHashes): New variable.
  4692. (chunkHashLength): New variable.
  4693. (digestAlgo): New variable.
  4694. (FindPeerStat): Removed.
  4695. (getPeerStat): Rewritten.
  4696. (markAllPiecesDone): New function.
  4697. (checkIntegrity): New function.
  4698. (tryChunkChecksumValidation): New function.
  4699. (isChunkChecksumValidationReady): New function.
  4700. * src/BitfieldMan.cc
  4701. (BitfieldMan): Initialized bitfieldLength, blocks to 0.
  4702. (BitfieldMan): Initialized blockLength, totalLength, bitfieldLength,
  4703. blocks to 0.
  4704. (isBitRangeSet): New function.
  4705. (unsetBitRange): New function.
  4706. * src/FtpNegotiateCommand.cc
  4707. (executeInternal): Set maxDownloadSpeedLimit,
  4708. startupIdleTime, lowestDownloadSpeedLimit to command.
  4709. (recvSize): Added method "HEAD" handling.
  4710. Removed the call to e->segmentMan->shouldCancelDownloadForSafety().
  4711. * src/AbstractSingleDiskAdaptor.cc
  4712. (sha1Sum): Renamed as messageDigest.
  4713. (messageDigest): New function.
  4714. * src/AbstractSingleDiskAdaptor.h
  4715. (sha1Sum): Renamed as messageDigest.
  4716. (messageDigest): New function.
  4717. * src/Util.h
  4718. (indexRange): New function.
  4719. * src/MetalinkEntry.cc
  4720. (MetalinkEntry): Initialized chunkChecksum to 0.
  4721. * src/ShaVisitor.cc
  4722. (~ShaVisitor): Removed the call to ctx.digestFree().
  4723. * src/SegmentMan.cc
  4724. (ChunkChecksumValidator.h): New include.
  4725. (SegmentMan): Initialized chunkHashLength to 0. Initialized digestAlgo
  4726. to DIGEST_ALGO_SHA1.
  4727. (~SegmentMan): Removed diskWriter.
  4728. (FindSegmentEntryByIndex): Removed.
  4729. (FindSegmentEntryByCuid): Removed.
  4730. (checkoutSegment): Rewritten.
  4731. (findSlowerSegmentEntry): Rewritten.
  4732. (getSegment): Rewritten.
  4733. (updateSegment): Rewritten.
  4734. (completeSegment): Rewritten.
  4735. (markAllPiecesDone): New function.
  4736. (checkIntegrity): New function.
  4737. (isChunkChecksumValidationReady): New function.
  4738. (tryChunkChecksumValidation): New function.
  4739. * src/Xml2MetalinkProcessor.cc
  4740. (getEntry): Get size and set it to entry.
  4741. Get chunk checksum and set it to entry.
  4742. (getPieceHash): New function.
  4743. * src/Util.cc
  4744. (sha1Sum): Removed ctx.digestFree()
  4745. (fileChecksum): Removed ctx.digestFree()
  4746. (indexRange): New function.
  4747. * src/Request.cc
  4748. (METHOD_GET): New variable.
  4749. (METHOD_HEAD): New variable.
  4750. (Request): Added method.
  4751. * src/UrlRequestInfo.cc
  4752. (FatalException.h): New include.
  4753. (message.h): New include.
  4754. (operator<<): Added operator<< for class HeadResult.
  4755. (getHeadResult): New function.
  4756. (execute): Get filename and size in separate download engine.
  4757. * src/ChunkChecksumValidator.cc: New class.
  4758. * src/DownloadCommand.cc:
  4759. (DownloadCommand): Added peerStat.
  4760. (executeInternal): Use maxDownloadSpeedLimit member instead of getting
  4761. the value from Option.
  4762. The buffer size is now 16KB.
  4763. Use peerStat member instead of getting it from SegmentMan.
  4764. Use startupIdleTime member instead of gettingit from Option.
  4765. Added chunk checksum validation.
  4766. * src/AbstractDiskWriter.cc
  4767. (AbstractDiskWriter): Removed ctx.
  4768. (~AbstractDiskWriter): Removed ctx.digestFree()
  4769. (writeDataInternal): Returns the return value of write.
  4770. (readDataInternal): Returns the return value of read.
  4771. (sha1Sum): Renamed as messageDigest
  4772. (messageDigest): New function.
  4773. * src/AbstractDiwkWriter.h
  4774. (messageDigest.h): Removed include.
  4775. (ctx): Removed.
  4776. (sha1Sum): Renamed as messageDigest
  4777. (messageDigest): New function.
  4778. * src/DefaultPieceStorage.h
  4779. (markAllPiecesDone): New function.
  4780. (checkIntegrity): New function.
  4781. * src/NullFileAllocationMonitor.h: New class.
  4782. * src/MetalinkChunkChecksum.h: New class.
  4783. 2007-01-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4784. To decrease CPU usage in bittorrent download, calculation results in
  4785. BitfieldMan were cached and realtime fetching PeerObject was removed
  4786. with WeakHandle introduced. Option values are set to the objects
  4787. by setter before download begins.
  4788. * src/DefaultBtRequestFactory.cc: Use messageFactory member.
  4789. * src/DefaultBtRequestFactory.h
  4790. (dispatcher): BtMessageDispatcherHandle ->
  4791. BtMessageDispatcherWeakHandle.
  4792. (messageFactory): New variable.
  4793. (setBtMessageDispatcher): BtMessageDispatcherHandle ->
  4794. BtMessageDispatcherWeakHandle.
  4795. (setBtMessageFactory): New function.
  4796. * src/DefaultBtMessageDispatcher.cc:
  4797. (sendMessages): Use maxUploadSpeedLimit instead of fetching the value
  4798. from Option.
  4799. (checkRequestSlotAndDoNecessaryThing): Use requestTimeout instead of
  4800. feating the value from Option.
  4801. Use messageFactory member.
  4802. * src/PeerInteractionCommand.cc
  4803. (PeerInteractionCommand): Added maxDownloadSpeedLimit.
  4804. Add reverse dependencies to factory object.
  4805. Set maxUploadSpeedLimit and requestTimeout and messageFactory to
  4806. dispatcher.
  4807. Set messageFactory to receiver.
  4808. Set keepAliveInterval and maxDownloadSpeedLimit and messageFactory to
  4809. btInteractive.
  4810. Set receiver to peerObject.
  4811. Set maxDownloadSpeedLimit to this.
  4812. (executeInternal): Use maxDownloadSpeedLimit member.
  4813. * src/BtChokeMessage.cc
  4814. (doReceivedAction): Use dispatcher, requestFactory member.
  4815. (onSendComplete): Use dispatcher member.
  4816. * src/PeerInteractionCommand.h
  4817. (maxDownloadSpeedLimit): New variable.
  4818. * src/DefaultBtMessageReceiver.h
  4819. (peerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  4820. (dispatcher):
  4821. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  4822. (messageFactory): New variable.
  4823. (setPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  4824. (getPeerConnection): PeerConnectionHandle -> PeerConnectionWeakHandle
  4825. (setDispatcher):
  4826. BtMessageDispatcherHandle -> BtMessageDispatcherWeakHandle
  4827. (setBtMessageFactory): New function.
  4828. * src/DefaultBtInteractive.cc
  4829. (initiateHandshake): Use messageFactory member.
  4830. (addBitfieldMessageToQueue): Use messageFactory member.
  4831. (addAllowedFastMessageToQueue): Use messageFactory member.
  4832. (decideChoking): Use messageFactory member.
  4833. (checkHave): Use messageFactory member.
  4834. (sendKeepAlive): Use keepAliveInterval, messageFactory member.
  4835. (receiveMessages): Use maxDownloadSpeedLimit member.
  4836. (decideInterest): Use messageFactory member.
  4837. * src/BtRequestMessage.cc
  4838. (doReceivedAction): Use messageFactory, dispatcher member.
  4839. (onQueued): Use dispatcher member.
  4840. * src/BtPieceMessage.cc
  4841. (doReceivedAction): Use dispatcher member.
  4842. (send): Use peerConnection member.
  4843. (onWrongPiece): Use requestFactory member.
  4844. (handleChokingEvent): Use messageFactory, dispatcher member.
  4845. (handleCancelSendingPieceEvent): Use messageFactory, dispatcher member.
  4846. * src/BtMessageDispatcher.h
  4847. (BtMessageDispatcherWeakHandle): New type definition.
  4848. * src/SimpleBtMessage.cc
  4849. (send): Use peerConnection member.
  4850. * src/BtRejectMessage.cc
  4851. (doReceivedAction): Use dispatcher member.
  4852. * src/DefaultBtMessageDispatcher.h
  4853. (Option.h): Removed include.
  4854. (messageFactory): New variable.
  4855. (option): Removed.
  4856. (maxUploadSpeedLimit): New variable.
  4857. (requestTimeout): New variable.
  4858. (DefaultBtMessageDispatcher): Removed option.
  4859. Added maxUploadSpeedLimit, requestTimeout.
  4860. (setOption): Removed.
  4861. (getOption): Removed.
  4862. (setMaxUploadSpeedLimit): New function.
  4863. (setRequestTimeout): New function.
  4864. (setBtMessageFactory): New function.
  4865. * src/DefaultBtInteractive.h
  4866. (btMessageReceiver):
  4867. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  4868. (dispatcher):
  4869. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  4870. (btRequestFactory):
  4871. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  4872. (peerConnection):
  4873. PeerConnectionHandle -> PeerConnectionWeakHandle
  4874. (messageFactory): New variable.
  4875. (option): Removed.
  4876. (keepAliveInterval): New variable.
  4877. (maxDownloadSpeedLimit): New variable.
  4878. (DefaultBtInteractive): Added keepAliveInterval, maxDownloadSpeedLimit.
  4879. (setBtMessageReceiver):
  4880. BtMessageReceiverHandle -> BtMessageReceiverWeakHandle
  4881. (setDispatcher):
  4882. BtMessageDispatcherHandle -> BtMessageReceiverWeakHandle
  4883. (setBtRequestFactory):
  4884. BtRequestFactoryHandle -> BtRequestFactoryWeakHandle
  4885. (setPeerConnection):
  4886. PeerConnectionHandle -> PeerConnectionWeakHandle
  4887. (setOption): Removed.
  4888. (setKeepAliveInterval): New function.
  4889. (setMaxDownloadSpeedLimit): New function.
  4890. (setBtMessageFactory): New function.
  4891. * src/BitfieldMan.h
  4892. (cachedNumMissingBlock): New variable.
  4893. (cachedNumFilteredBlock): New variable.
  4894. (cachedCompletedLength): New variable.
  4895. (cachedFilteredComletedLength): New variable.
  4896. (cachedFilteredTotalLength): New variable.
  4897. (countMissingBlockNow): New function.
  4898. (countFilteredBlockNow): New function.
  4899. (getFilteredTotalLengthNow): New function.
  4900. (getCompletedLengthNow): New function.
  4901. (getFilteredCompletedLengthNow): New function.
  4902. (updateCache): New function.
  4903. * src/AbstractBtMessage.h
  4904. (BtMessageDispatcher.h): New include.
  4905. (PeerConnection.h): New include.
  4906. (BtRequestFactory.h): New include
  4907. (BtMessageFactory.h): New include.
  4908. (dispatcher): New variable.
  4909. (messageFactory): New variable.
  4910. (peerConnection: New variable.
  4911. (setBtMessageDispatcher): New function.
  4912. (setPeerConnection): New function.
  4913. (setBtMessageFactory): New function.
  4914. (setBtRequestFactory): New function.
  4915. * src/DefaultBtMessageFactory.cc
  4916. (setCommonProperty): Set dispatcher, requestFactory, this,
  4917. peerConnection to msg.
  4918. * src/BtRegistry.h
  4919. (BT_MESSAGE_RECEIVER): New macro.
  4920. * src/PeerConnection.h
  4921. (PeerConnectionWeakHandle): New type definition.
  4922. * src/BtMessageFactory.h
  4923. (BtMessageFactoryWeakHandle): New type definition.
  4924. * src/BitfieldMan.cc
  4925. (BitfieldMan): Added cachedNumMissingBlock, cachedNumFilteredBlock,
  4926. cachedCompletedLength, cachedFilteredComletedLength,
  4927. cachedFilteredTotalLength.
  4928. Call updateCache().
  4929. (countMissingBlock): Return cachedNumMissingBlock.
  4930. (countMissingBlockNow): New function.
  4931. (countBlock): Return cachedNumFilteredBlock if filterEnabled is true.
  4932. (countFilteredBlockNow): New function.
  4933. (setBit): Call updateCache().
  4934. (unsetBit): Call updateCache().
  4935. (setBitfield): Call updateCache().
  4936. (clearAllBit): Call updateCache().
  4937. (setAllBit): Use setBitInternal instead of setBit.
  4938. Call updateCache().
  4939. (addFilter): Call updateCache().
  4940. (enableFilter): Call updateCache().
  4941. (disableFilter): Call updateCache().
  4942. (clearFilter): Call updateCache().
  4943. (getFilteredTotalLength): Return cachedFilteredTotalLength.
  4944. (getFilteredTotalLengthNow): New function.
  4945. (getCompletedLength): Return cachedCompletedLength.
  4946. (getCompletedLengthNow): New function.
  4947. (getFilteredCompletedLength): Return cachedFilteredComletedLength.
  4948. (getFilteredCompletedLengthNow): New function.
  4949. (updateCache): New function.
  4950. * src/BtMessageReceiver.h
  4951. (BtMessageReceiverWeakHandle): New type definition.
  4952. * src/DefaultBtMessageReceiver.cc
  4953. (receiveHandshake): Use messageFactory member.
  4954. (sendHandshake): Use messageFactory member.
  4955. (receiveMessage): Use messageFactory member.
  4956. * src/DefaultBtMessageFactory.h
  4957. (dispatcher): New variable.
  4958. (requestFactory): New variable.
  4959. (peerConnection): New variablle.
  4960. (setBtMessageDispatcher): New function.
  4961. (setBtRequestFactory): New function.
  4962. (setPeerConnection): New function.
  4963. * src/SharedHandle.h
  4964. (RefCount): New class.
  4965. (WeakHandle): New class.
  4966. * src/PeerObject.h
  4967. (BtMessageReceiver.h): New include.
  4968. (PeerObject): Added btMessageReceiver.
  4969. (btMessageReceiver): New variable.
  4970. * src/Util.cc
  4971. (countBit): Simplified.
  4972. * src/BtCancelMessage.cc
  4973. (doReceivedAction): Use dispatcher member.
  4974. * src/BtRequestFactory.h
  4975. (BtRequestFactoryWeakHandle): New type definition.
  4976. * src/PeerStorage.h
  4977. (downloadSpeed): int -> uint32_t
  4978. (uploadSpeed): int -> uint32_t
  4979. (sessionDownloadLength): long long int -> uint64_t
  4980. (sessionUploadLength): long long int -> uint64_t
  4981. 2007-01-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4982. To add RecoverableException, FatalException:
  4983. * src/AbstractCommand.cc
  4984. (onAbort): Exception -> RecoverableException
  4985. * src/PeerAbstractCommand.h
  4986. (RecoverableException.h): New include.
  4987. (onAbort): Exception -> RecoverableException.
  4988. * src/PeerInteractionCommand.cc
  4989. (onAbort): Exception -> RecoverableException.
  4990. * src/PeerAbstractCommand.cc
  4991. (execute): Exception -> RecoverableException.
  4992. (onAbort): Exception -> RecoverableException.
  4993. * src/TorrentRequestInfo.cc
  4994. (execute): Exception -> RecoverableException.
  4995. * src/MetalinkRequestInfo.cc
  4996. (execute): Exception -> RecoverableException.
  4997. * src/MetaFileUtil.cc: RecoverableException.
  4998. * src/AbstractCommand.h
  4999. (onAbort): Exception -> RecoverableException.
  5000. * src/DlRetryEx.h: Exception -> RecoverableException.
  5001. * src/DlAbortEx.h: Exception -> RecoverableException.
  5002. * src/PeerListenCommand.cc: Exception -> RecoverableException.
  5003. * src/Util.cc: Exception -> RecoverableException.
  5004. * src/DefauldDiskWriter.cc: Exception -> RecoverableException.
  5005. * src/TrackerUpdateCommand.cc: Exception -> RecoverableException.
  5006. * src/UrlRequestInfo.cc: Exception -> RecoverableException.
  5007. To make ID static const int
  5008. * src/BtInterestedMessage.h
  5009. (ID_t): Removed.
  5010. (ID): New variable.
  5011. (getId): Made non-const.
  5012. * src/BtPieceMessage.h
  5013. (ID_t): Removed.
  5014. (ID): New variable.
  5015. (getId): Made non-const.
  5016. * src/BtChokeMessage.h
  5017. (ID_t): Removed.
  5018. (ID): New variable.
  5019. (getId): Made non-const.
  5020. * src/BtHaveAllMessage.h
  5021. (ID_t): Removed.
  5022. (ID): New variable.
  5023. (getId): Made non-const.
  5024. * src/BtKeepAliveMessage.h
  5025. (ID_t): Removed.
  5026. (ID): New variable.
  5027. (getId): Made non-const.
  5028. * src/BtHandshakeMessage.h
  5029. (ID): New variable.
  5030. (getId): Made non-const.
  5031. * src/BtSuggestPieceMessage.h
  5032. (ID_t): Removed.
  5033. (ID): New variable.
  5034. (getId): Made non-const.
  5035. * src/BtPortMessage.h
  5036. (ID_t): Removed.
  5037. (ID): New variable.
  5038. (getId): Made non-const.
  5039. * src/AbstractBtMessage.h
  5040. (id): Removed.
  5041. (AbstractBtMessage): Removed id.
  5042. (getId): Removed.
  5043. * src/BtHaveMessage.h
  5044. (ID_t): Removed.
  5045. (ID): New variable.
  5046. (getId): Made non-const.
  5047. * src/BtAllowedFastMessage.h
  5048. (ID_t): Removed.
  5049. (ID): New variable.
  5050. (getId): Made non-const.
  5051. * src/BtCancelMessage.h
  5052. (ID_t): Removed.
  5053. (ID): New variable.
  5054. (getId): Made non-const.
  5055. * src/BtNotInterestedMessage.h
  5056. (ID_t): Removed.
  5057. (ID): New variable.
  5058. (getId): Made non-const.
  5059. * src/BtChokeMessage.h
  5060. (ID_t): Removed.
  5061. (ID): New variable.
  5062. (getId): Made non-const.
  5063. * src/BtRejectMessage.h
  5064. (ID_t): Removed.
  5065. (ID): New variable.
  5066. (getId): Made non-const.
  5067. * src/BtBitfieldMessage.h
  5068. (ID_t): Removed.
  5069. (ID): New variable.
  5070. (getId): Made non-const.
  5071. * src/BtUnchokeMessage.h
  5072. (ID_t): Removed.
  5073. (ID): New variable.
  5074. (getId): Made non-const.
  5075. * src/BtRequestMessage.h
  5076. (ID_t): Removed.
  5077. (ID): New variable.
  5078. (getId): Made non-const.
  5079. * src/BtHaveMessage.h
  5080. (ID_t): Removed.
  5081. (ID): New variable.
  5082. (getId): Made non-const.
  5083. To add --force-truncate command-line option and a check whether
  5084. the file already exists:
  5085. * src/DirectDiskAdaptor.h
  5086. (getFilePath): Made virtual public.
  5087. * src/MultiDiskAdaptor.h
  5088. (File.h): New include.
  5089. (DiskWriterEntry::fileEntry): Made private.
  5090. (DiskWriterEntry::fileExists): New function.
  5091. (DiskWriterEntry::getFileEntry): New function.
  5092. (fileExists): New function.
  5093. (getFilePath): New function.
  5094. * src/TorrentRequestInfo.cc
  5095. (FatalException.h): New include.
  5096. (message.h): New include.
  5097. (RecoverableException.h): New include.
  5098. (execute): Added a check whether file is already exists or not.
  5099. * src/DiskAdaptor.h
  5100. (fileExists): New function.
  5101. (getFilePath): New function.
  5102. * src/main.cc
  5103. (showUsage): Added an explanation of --force-truncate command-line
  5104. option.
  5105. (main): Added --force-truncate command-line option.
  5106. * src/Exception.h
  5107. (setMsg): buf[256] -> buf[1024]
  5108. * src/CopyDiskWriter.h
  5109. (getFilePath): Made public virtual.
  5110. * src/MultiDiskAdaptor.cc: fileEntry -> getFileEntry()
  5111. (fileExists): New function.
  5112. * src/DownloadEngineFactory.cc
  5113. (newTorrentConsoleEngine): Don't open file here.
  5114. * src/message.h
  5115. (EX_FILE_ALREADY_EXISTS): New definition.
  5116. * src/prefs.h
  5117. (PREF_FOECE_TRUNCATE): New definition.
  5118. * src/HttpResponseCommand.cc
  5119. (handleDefaultEncoding): Added a check whether the file already exists.
  5120. * src/SegmentMan.h
  5121. (fileExists): New function.
  5122. (shouldCancelDownloadForSafety): New function.
  5123. * src/FtpNegotiateCommand.cc
  5124. (recvSize): Added a check whether the file already exists.
  5125. * src/AbstractSingleDiskAdaptor.cc
  5126. (File.h): New include.
  5127. (fileExists): New function.
  5128. * src/AbstractSingleDiskAdaptor.h
  5129. (getFilePath): Removed.
  5130. (fileExists): New function.
  5131. * src/SegmentMan.cc
  5132. (fileExists): New function.
  5133. (shouldCancelDownloadForSafety): New function.
  5134. To fix regression bug in torrent downloading:
  5135. * src/DefaultBtRequestFactory.cc
  5136. (doChokedAction): New function.
  5137. * src/DefaultBtRequestFactory.h
  5138. (doChokedAction): New function.
  5139. * src/DefaultBtMessageDispatcher.cc
  5140. (doChokedAction): Do not delete request if its target is in allowed
  5141. fast set.
  5142. * src/DefaultBtInteractive.cc
  5143. (doPostHandshakeProcessing): Added a call to sendPendingMessage().
  5144. (sendKeepAlive): Send keep alive message even if the outgoing message
  5145. queue is not empty.
  5146. (decideInterest): Simplified the code.
  5147. (fillPiece): Remove a call to dispatcher->doChokedAction() because
  5148. it is already called when BtChokeMessage is received from a peer.
  5149. * src/BtRequestFactory.h
  5150. (doChokedAction): New function.
  5151. To clean up code:
  5152. * src/PeerInteractionCommand.h
  5153. (executeInternal): Added virtual keyword explicitly.
  5154. (prepareForRetry): Added virtual keyword explicitly.
  5155. (prepareForNextPeer): Added virtual keyword explicitly.
  5156. (onAbort): Added virtual keyword explicitly.
  5157. * src/RequestSlot.cc
  5158. (isTimeout): Use Time::elapsed() instead of differenceInMillis().
  5159. * src/BtPieceMessage.cc
  5160. (doReceivedAction): Added a debug log of piece's bitfield.
  5161. * src/Piece.h
  5162. (getBitfieldLength): New function.
  5163. * src/ByteArrayDiskWriter.cc
  5164. (clear): Added buf = 0 to avoid double free corruption.
  5165. * src/FileAllocator.cc
  5166. (allocate): Fixed an assignment of fileAllocationMonitor->currentValue.
  5167. Added cp.reset().
  5168. * src/BitfieldMan.h
  5169. (operator=): Rewritten.
  5170. * src/BitfieldMan.cc
  5171. (BitfieldMan): Initialized bitfield, useBitfield.
  5172. * src/PeerConnection.cc
  5173. (receiveMessage): Added a call to socket->readable() after getting
  5174. message length to avoid possible EOF.
  5175. * src/Util.cc
  5176. (torrentUrlencode): Fixed an encodeing bug. BUG#1629912
  5177. 2007-01-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5178. To add an ability to pre-allocate file space:
  5179. * src/DirectDiskAdaptor.h: Rewritten.
  5180. * src/PieceStorage.h: DiskAdaptor -> DiskAdaptorHandle
  5181. * src/MultiDiskAdaptor.h: Rewritten.
  5182. * src/DefaultPieceStorage.cc
  5183. (MultiDiskWriter.h): Removed include.
  5184. (PreAllocationDiskWriter.h): Removed include.
  5185. (FileAllocationMonitor.h): New include.
  5186. (~DefaultPieceStorage): Removed deletion of diskAdaptor.
  5187. (initStorage): Rewritten.
  5188. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5189. * src/FileAllocator.h: New class.
  5190. * src/FileAllocator.cc: New class.
  5191. * src/FileAllocationMonitor.h: New class.
  5192. * src/FileAllocationMonitor.cc: New class.
  5193. * src/ConsoleFileAllocationMonitor.h: New class.
  5194. * src/ConsoleFileAllocationMonitor.cc: New class.
  5195. * src/AbstractSingleDiskAdaptor.h: New class.
  5196. * src/AbstractSingleDiskAdaptor.cc: New class.
  5197. * src/DiskAdaptor.h
  5198. (Directory.h): Removed include.
  5199. (DiskWriter.h): Removed include.
  5200. (FileEntry.h): Removed include.
  5201. (diskWriter): Removed.
  5202. (DiskAdaptor): Removed diskWriter.
  5203. (openFile): Made pure virtual.
  5204. (closeFile): Made pure virtual.
  5205. (openExistingFile): Made pure virtual.
  5206. (initAndOpenFile): Made pure virtual.
  5207. (writeData): Made pure virtual.
  5208. (readData): Made pure virtual.
  5209. (sha1Sum): Made pure virtual.
  5210. (getStoreDir): Returns const reference of storeDir.
  5211. (DiskAdaptorHandle): New type definition.
  5212. * src/main.cc
  5213. (ConsoleFileAllocationMonitor.h): New include.
  5214. (showUsage): Added default value description of -s option.
  5215. Added the description of --file-allocation option.
  5216. (main): Set default value of --file-allocation option to 'none'.
  5217. Added --file-allocation command-line option.
  5218. Setup FileAllocationMonitorFactory.
  5219. * src/FtpInitiateConnectionCommand.cc
  5220. (executeInternal): Removed diskWriter related processing, which was
  5221. moved to FtpNegotiationCommand.cc.
  5222. * src/DirectDiskAdaptor.cc
  5223. (getFilePath): Made non-const.
  5224. * src/CopyDiskAdaptor.h
  5225. (DiskAdaptor.h): Removed include.
  5226. (DiskWriter.h): Removed include.
  5227. (AbstractSingleDiskAdaptor.h): New include.
  5228. (getFilePath): Made non-const. Added virtual keyword.
  5229. (CopyDiskAdaptor): Removed diskWriter.
  5230. (getTempFile): Returns const reference.
  5231. (CopyDiskAdaptorHandle): New type definition.
  5232. * src/ByteArrayDiskWriter.cc
  5233. (clear): Simplified.
  5234. (initAndOpenFile): Rewritten.
  5235. (openFile): Call initAndOpenFile()
  5236. * src/MultiDiskAdaptor.cc: Rewritten.
  5237. * src/DownloadEngineFactory.cc
  5238. (FileAllocator.h): New include.
  5239. (FileAllocationMonitor.h): New include.
  5240. (newConsoleEngine): Call DefaultDiskWriter::createNewDiskWriter() to
  5241. create DefaultDiskWriter with file allocator.
  5242. * src/DiskWriter.h
  5243. (initAndOpenFile): Added totalLength argument.
  5244. (openFile): Added totalLength argument.
  5245. * src/prefs.h
  5246. (PREF_FILE_ALLOCATION): New definition.
  5247. (V_PREALLOC): New definition.
  5248. (V_NONE): New definition.
  5249. * src/HttpResponseCommand.cc
  5250. (handleDefaultEncoding): Call DefaultDiskWriter::initAndOpenFile with
  5251. size.
  5252. * src/FtpNegotiateCommand.cc
  5253. (Util.h): New include.
  5254. (recvSize): Open file here.
  5255. * src/Util.h
  5256. (ullitos): New function.
  5257. * src/CopyDiskWriter.h
  5258. (getFilePath): Made non-const.
  5259. * src/DefaultDiskWriter.h
  5260. (Option.h): New include.
  5261. (totalLength): Removed.
  5262. (DefaultDiskWriter): Removed totalLength.
  5263. (initAndOpenFile): Added totalLength argument.
  5264. (DefaultDiskWriterHandle): New type definition.
  5265. (createNewDiskWriter): New function.
  5266. * src/Util.cc
  5267. (ullitos): New function.
  5268. * src/DefaultDiskWriter.cc
  5269. (message.h): New include.
  5270. (FileAllocator.h): New include.
  5271. (prefs.h): New include.
  5272. (Util.h): New include.
  5273. (DefaultDiskWriter): Removed totalLength.
  5274. (initAndOpenFile): Added file allocation.
  5275. (createNewDiskWriter): New function. Just for temporary solution.
  5276. It will be rewritten later.
  5277. * src/DiskAdaptor.cc
  5278. (DiskAdaptor): Removed diskWriter.
  5279. * src/AbstractDiskWriter.cc
  5280. (LogFactory.h): New include.
  5281. (AbstractDiskWriter): Added fileAllocator, logger.
  5282. (openFile): Added totalLength argument.
  5283. * src/AbstractDiskWriter.h
  5284. (FileAllocator.h): New include.
  5285. (Logger.h): New include.
  5286. (fileAllocator): New variable.
  5287. (logger): New variable.
  5288. (openFile): Added totalLength argument. Added virtual keyword
  5289. explicitly.
  5290. (openExistingFile): Added totalLength argument. Added virtual keyword
  5291. explicitly.
  5292. (closeFile): Added virtual keyword explicitly.
  5293. (sha1Sum): Added virtual keyword explicitly.
  5294. (writeData): Added virtual keyword explicitly.
  5295. (readData): Added virtual keyword explicitly.
  5296. (setFileAllocator): New function.
  5297. * src/DefaultPieceStorage.h
  5298. (FileAllocator.h): New include.
  5299. (diskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5300. (getDiskAdaptor): DiskAdaptor -> DiskAdaptorHandle
  5301. * src/FileProgressMonitor.h: New class.
  5302. To compile aria2 on PC-BSD:
  5303. * src/DefaultBtContext.cc
  5304. (libgen.h): New include.
  5305. To fix memory leak:
  5306. * src/Exception.h
  5307. (~Exception): Delete cause. Fixed memory leak.
  5308. 2006-12-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5309. Rewritten a portion of bittorrent implementation:
  5310. * src/BtMessageValidator.h: New class.
  5311. * src/BtBitfieldMessageValidator.h: New class.
  5312. * src/BtHandshakeMessageValidator.h: New class.
  5313. * src/BtRequestMessageValidator.h: New class.
  5314. * src/BtSuggestPieceMessageValidator.h: New class.
  5315. * src/BtAllowedFastMessageValidator.h: New class.
  5316. * src/BtRejectMessageValidator.h: New class.
  5317. * src/BtCancelMessageValidator.h: New class.
  5318. * src/BtPieceMessageValidator.h: New class.
  5319. * src/BtHaveMessageValidator.h: New class.
  5320. * src/BtEventListener.h: New class.
  5321. * src/AbstractBtEventListener.h: New class.
  5322. * src/BtEvent.h: New class.
  5323. * src/BtChokingEvent.h: New class.
  5324. * src/BtChokedEvent.h: New class.
  5325. * src/BtCancelSendingPieceEvent.h: New class.
  5326. * src/BtAbortOutstandingRequestEvent.h: New class.
  5327. * src/Randomizer.h: New class.
  5328. * src/SimpleRandomizer.h: New class.
  5329. * src/BtMessage.h: New class.
  5330. * src/AbstractBtMessage.h: New class.
  5331. * src/SimpleBtMessage.h: New class.
  5332. * src/BtHaveMessage.h: New class.
  5333. * src/BtInterestedMessage.h: New class.
  5334. * src/BtAllowedFastMessage.h: New class.
  5335. * src/BtUnchokeMessage.h: New class.
  5336. * src/BtCancelMessage.h: New class.
  5337. * src/BtNotInterestedMessage.h: New class.
  5338. * src/BtChokeMessage.h: New class.
  5339. * src/BtHaveNoneMessage.h: New class.
  5340. * src/BtHandshakeMessage.h: New class.
  5341. * src/BtSuggestPieceMessage.h: New class.
  5342. * src/BtHaveMessage.h: New class.
  5343. * src/BtPieceMessage.h: New class.
  5344. * src/BtHaveAllMessage.h: New class.
  5345. * src/BtKeepAliveMessage.h: New class.
  5346. * src/BtPortMessage.h: New class.
  5347. * src/BtRejectMessage.h: New class.
  5348. * src/BtBitfieldMessage.h: New class.
  5349. * src/BtRequestMessage.h: New class.
  5350. * src/DefaultBtRequestFactory.h: New class.
  5351. * src/DefaultBtMessageReceiver.h: New class.
  5352. * src/BtInteractive.h: New class.
  5353. * src/BtMessageDispatcher.h: New class.
  5354. * src/DefaultBtMessageDispatcher.h: New class.
  5355. * src/DefaultBtInteractive.h: New class.
  5356. * src/BitfieldManFactory.h: New class.
  5357. * src/HandleRegistry.h: New class.
  5358. * src/BtMessageFactory.h: New class.
  5359. * src/BtMessageReceiver.h: New class.
  5360. * src/DefaultBtMessageFactory.h: New class.
  5361. * src/PeerObject.h: New class.
  5362. * src/BtRequestFactory.h: New class.
  5363. * src/SuggestPieceMessage.h: Removed.
  5364. * src/PortMessage.h: Removed.
  5365. * src/SuggestPieceMessage.h: Removed.
  5366. * src/KeepAliveMessage.h: Removed.
  5367. * src/HandshakeMessage.h: Removed.
  5368. * src/PeerInteraction.h: Removed.
  5369. * src/UnchokeMessage.h: Removed.
  5370. * src/PieceMessage.h: Removed.
  5371. * src/RequestMessage.h: Removed.
  5372. * src/InterestedMessage.h: Removed.
  5373. * src/HaveMessage.h: Removed.
  5374. * src/CancelMessage.h: Removed.
  5375. * src/RejectMessage.h: Removed.
  5376. * src/AllowedFastMessage.h: Removed.
  5377. * src/HaveNoneMessage.h: Removed.
  5378. * src/SimplePeerMessage.h: Removed.
  5379. * src/HaveAllMessage.h: Removed.
  5380. * src/BitfieldMessage.h: Removed.
  5381. * src/PeerMessageFactory.h: Removed.
  5382. * src/NotInterestedMessage.h: Removed.
  5383. * src/ChokeMessage.h: Removed.
  5384. * src/PeerMessage.h: Removed.
  5385. 2006-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5386. To know root cause of exception:
  5387. * src/Exception.h
  5388. (cause): New variable.
  5389. (Exception): Added a parameter.
  5390. (getMsg): Return const reference to msg.
  5391. (getCause): New function.
  5392. * src/DlRetryEx.h
  5393. (DlRetryEx): Added a parameter 'cause'.
  5394. Added an overloaded constructor.
  5395. (DlAbortEx): Added a parameter 'cause'.
  5396. Added an overloaded constructor.
  5397. * src/SimpleLogger.cc
  5398. (writeLog): Log nested exception messages recursively.
  5399. 2006-11-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5400. * src/DefaultBtProgressInfoFile.cc
  5401. (load): Fixed memory leak when the infohash doesn't match.
  5402. 2006-11-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5403. * src/DefaultPeerStorage.cc
  5404. (calculateStat): Simplified the code by combining 2 loops into 1.
  5405. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5406. Introduce new preference PREF_BT_TIMEOUT. This is the timeout value
  5407. for BitTorrent download:
  5408. * src/PeerAbstractCommand.cc
  5409. (PeerAbstractCommand): PREF_TIMEOUT -> PREF_BT_TIMEOUT
  5410. * src/main.cc:
  5411. (timeoutSpecified): Removed.
  5412. (main): Set the initial value of PREF_BT_TIMEOUT to 180.
  5413. Removed timeoutSpecified. TODO: Add --bt-timeout command line option.
  5414. * src/TorrentRequestInfo.cc
  5415. (timeoutSpecified): Removed.
  5416. (torrentHandler): Removed timeoutSpecified and the adjustment of
  5417. timeout value.
  5418. * src/prefs.h
  5419. (PREF_BT_TIMEOUT): New definition.
  5420. Delete unused variables:
  5421. * src/TorrentRequestInfo.cc
  5422. (requestInfo): Removed.
  5423. Move setSignalHander to Util::setGlobalSignalHandler:
  5424. * src/TorrentRequestInfo.cc:
  5425. setSignalHander -> Util::setGlobalSignalHandler
  5426. * src/main.cc
  5427. (setSignalHander): Removed.
  5428. (main): setSignalHander -> Util::setGlobalSignalHandler
  5429. * src/Util.h
  5430. (setGlobalSignalHandler): New function.
  5431. * src/Util.cc
  5432. (setGlobalSignalHandler): New function.
  5433. * src/UrlRequestInfo.cc:
  5434. setSignalHander -> Util::setGlobalSignalHandler
  5435. Reset peer status in order to exit gracefully:
  5436. * src/PeerAbstractCommand.cc
  5437. (execute): Call peer->resetStatus() when btRuntime->isHalt() is true.
  5438. To fix the bug that causes the number of bytes uploaded is not saved
  5439. to .aria2 file:
  5440. * src/DefaultPeerStorage.h
  5441. (removedPeerSessionDownloadLength): New variable.
  5442. (removedPeerSessionUploadLength): New variable.
  5443. * src/DefaultPeerStorage.cc
  5444. (DefaultPieceStorage): Added removedPeerSessionDownloadLength(0),
  5445. removedPeerSessionUploadLength(0).
  5446. (calculateStat): Calculate the number of bytes downloaded(uploaded)
  5447. through all peers, and then add removedPeerSessionDownloadLength(
  5448. removedPeerSessionUploadLength) to it.
  5449. (deleteUnusedPeer): Add the number of bytes downloaded(uploaded) from
  5450. (to) the peer to removedPeerSessionDownloadLength
  5451. (removedPeerSessionUploadLength).
  5452. 2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5453. To add Metalink location option:
  5454. * src/MetalinkRequestInfo.cc
  5455. (execute): Call MetalinkEntry::setLocationPreference()
  5456. * src/main.cc
  5457. (showUsage): Added the help message for --metalink-location option.
  5458. (main): Added --metalink-location option.
  5459. * src/prefs.h
  5460. (PREF_METALINK_LOCATION): New definition.
  5461. * src/MetalinkEntry.cc
  5462. (AddLocationPreference): New function object.
  5463. (setLocationPreference): New function.
  5464. * src/Xml2MetalinkProcessor.cc
  5465. (getResource): Set location attribute to MetalinkResource
  5466. To show URLs to download
  5467. * src/UrlRequestInfo.h
  5468. (printUrls): New function.
  5469. To add multiple <file> Metalink support:
  5470. * src/MetalinkEntry.h
  5471. (MetalinkResources): Removed.
  5472. (setLocationPreference): New function.
  5473. (MetalinkEntryHandle): New type definition.
  5474. (MetalinkEntries): New type definition.
  5475. * src/Xml2MetalinkProcessor.h
  5476. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  5477. (getResource): MetalinkResource* -> MetalinkResourceHandle
  5478. (parseFile): Metalinker* -> MetalinkerHandle
  5479. * src/UrlRequestInfo.h
  5480. (execute): RequestInfo* -> RequestInfos
  5481. * src/MetalinkRequestInfo.cc
  5482. (AccumulateNonP2PUrl): MetalinkResource* -> MetalinkResourceHandle
  5483. (FindBitTorrentUrl): MetalinkResource* -> MetalinkResourceHandle
  5484. (execute): RequestInfo* -> RequestInfos
  5485. Added multiple <file> support. Print filename when it is queued.
  5486. * src/MetalinkRequestInfo.h
  5487. (execute): RequestInfo* -> RequestInfos
  5488. (getDownloadEngine): Removed.
  5489. * src/RequestInfo.h
  5490. (RequestInfoHandle): New type definition.
  5491. (RequestInfos): New type definition.
  5492. (execute): RequestInfo* -> RequestInfos
  5493. (getDownloadEngine): Removed.
  5494. * src/MetalinkResource.h
  5495. (MetalinkResourceHandle): New type definition.
  5496. (MetalinkResources): New type definition.
  5497. * src/MetalinkEntry.cc
  5498. (~MetalinkEntry): Removed the deletion of the elements of resources,
  5499. because the element is now of type MetalinkResourceHandle.
  5500. (PrefOrder): MetalinkResource* -> MetalinkResourceHandle
  5501. (Supported): MetalinkResource* -> MetalinkResourceHandle
  5502. (dropUnsupportedResource): Removed the deletion of the elements of
  5503. resources because the element is now of type MetalinkResourceHandle.
  5504. * src/Xml2MetalinkProcessor.cc
  5505. (parseFile): Metalinker* -> MetalinkerHandle
  5506. MetalinkEntry* -> MetalinkEntryHandle
  5507. Removed try-catch block.
  5508. (getEntry): MetalinkEntry* -> MetalinkEntryHandle
  5509. MetalinkResource* -> MetalinkResourceHandle
  5510. Removed try-catch block.
  5511. (getResource): MetalinkResource* -> MetalinkResourceHandle
  5512. Free result by using xmlXPathFreeObject()
  5513. * src/Metalinker.cc
  5514. (~Metalinker): Removed the deletion of entries.
  5515. MetalinkEntry* -> MetalinkEntryHandle
  5516. (queryEntry): Add multiple <file> Metalink support.
  5517. * src/Metalinker.h
  5518. (MetalinkEntries): Removed.
  5519. (queryEntry): MetalinkEntry* -> MetalinkEntries
  5520. * src/MetalinkProcessor.h
  5521. (parseFile): Metalinker* -> MetalinkerHandle
  5522. Bug fixes:
  5523. * src/PeerChokeCommand.cc
  5524. (execute): cat01->cat02
  5525. * src/DefaultPieceStorage.cc
  5526. (DefaultPieceStorage): Added diskAdaptor(0)
  5527. * src/TrackerWatcherComand.cc:
  5528. (execute): Use btAnnounce->noMoreAnnounce()
  5529. to determin whether the function returns true or not.
  5530. * src/TrackerUpdateCommand.cc:
  5531. (execute): Use btAnnounce->noMoreAnnounce()
  5532. to determin whether the function returns true or not.
  5533. * src/FtpConnection.cc
  5534. (bulkReceiveResponse): Throw DlRetryEx if EOF got.
  5535. This is the fix of the busy loop bug.
  5536. * src/DownloadCommand.cc
  5537. (DownloadCommand): Reuse PeerStat. segmentMan->getPeerStat() returns
  5538. cached PeerStat.
  5539. The value of "name" entry in torrent file is now set by
  5540. *DiskAdaptor::setTopDir(...) methods.
  5541. * src/MultiDiskAdaptor.h
  5542. (topDir): New variable.
  5543. (setTopDir): New function.
  5544. (getTopDir): New function.
  5545. * src/MultiDiskAdaptor.cc
  5546. (getFilePath): Concat storDir, "/" and topDir.
  5547. (mkdir): Use getFilePath() to get the directory path for output.
  5548. * src/DefaultPieceStorage.cc
  5549. (initStorage): Set the value of "name" entry to MultiDiskAdaptor,
  5550. CopyDiskAdaptor.
  5551. * src/CopyDiskAdaptor.h
  5552. (topDir): New variable.
  5553. (setTopDir): New function.
  5554. (getTopDir): New function.
  5555. * src/CopyDiskAdaptor.cc
  5556. (fixFilename): Updated.
  5557. Misc
  5558. * src/UrlRequestInfo.h
  5559. (e): Removed.
  5560. (UrlRequestInfo): Removed e.
  5561. (getDownloadEngine): Removed.
  5562. * src/UrlRequestInfo.cc
  5563. (handler): Rewritten.
  5564. (printUrls): New function.
  5565. (execute): Call printUrls().
  5566. * src/HandshakeMessage.cc
  5567. (check): peerinteraction->getBtContext() -> btContext
  5568. * src/PeerInteraction.h
  5569. (getBtContext): Removed.
  5570. * src/TorrentRequestInfo.h
  5571. (execute): RequestInfo* -> RequestInfos
  5572. (getDownloadEngine): Removed.
  5573. * src/TorrentRequestInfo.cc
  5574. (haltRequested): Removed.
  5575. (btHaltRequested): New variable.
  5576. (torrentHandler): haltRequested -> btHaltRequested
  5577. (execute): RequestInfo* -> RequestInfos
  5578. * src/TorrentConsoleDownloadEngine.cc
  5579. (afterEachIteration): haltRequested -> btHaltRequested.
  5580. * src/ConsoleDownloadEngine.h
  5581. (initStatistics): Added virtual.
  5582. (calculateStatistics): Added virtual.
  5583. (onEndOfRun): Added virtual.
  5584. (afterEachIteration): Added virtual.
  5585. * src/ConsoleDownloadEngine.cc
  5586. (haltRequested): New variable.
  5587. (afterEachIteration): New function.
  5588. * src/main.cc
  5589. (requestInfo): Removed.
  5590. * src/SegmentMan.cc
  5591. (findSlowerSegmentEntry): Refactored.
  5592. * Release 0.9.0
  5593. 2006-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5594. To divide TorrentMan into 6 classes: BtContext, BtRuntime,
  5595. PeerStorage, PieceStorage, BtAnnounce and BtProgressInfoFile
  5596. * src/TorrentMan.h: Removed.
  5597. * src/TorrentMan.cc: Removed.
  5598. * src/TrackerWatcherComand.h: Made subclass of BtContextAwareCommand.
  5599. * src/SeedCheckCommand.cc: Use pieceStorage, btRuntime
  5600. * src/PeerAbstractCommand.h: Made subclass of BtContextAwareCommand.
  5601. * src/PeerAbstractCommand.cc: Use btRuntime.
  5602. * src/BtContextAwareCommand.h: New class.
  5603. * src/FileEntry.h: Added accessor methods for following variables.
  5604. (path): Made private.
  5605. (length): Made private.
  5606. (offset): Made private.
  5607. (extracted): Made private.
  5608. (requested): Made private.
  5609. (FileEntries): New definition.
  5610. (FileEntryHandle): New definition.
  5611. * src/FileEntry.cc: New file.
  5612. * src/HaveEraseCommand.h: Made subclass of BtContextAwareCommand.
  5613. * src/HaveEraseCommand.cc: Use btRuntime, pieceStorage.
  5614. * src/PeerChokeCommand.h: Made subclass of BtContextAwareCommand.
  5615. * src/PeerChokeCommand.cc: Use btRuntime, peerStorage, pieceStorage.
  5616. * src/PieceStorage.h: New file.
  5617. * src/PeerInteractionCommand.h: Use btContext.
  5618. * src/PeerInteractionCommand.cc: Use pieceStorage, peerStorage,
  5619. btRuntime.
  5620. * src/DefaultBtProgressInfoFile.h: New file.
  5621. * src/DefaultBtProgressInfoFile.cc: New file.
  5622. * src/File.cc
  5623. (Util.h): New include.
  5624. (mkdirs): New function.
  5625. * src/MultiDiskAdaptor.h
  5626. (mkdir): New function.
  5627. * src/PeerListProcessor.h
  5628. (Peers): Removed.
  5629. * src/PeerInteraction.h
  5630. (torrentMan): Removed.
  5631. (btContext): New variable.
  5632. (peerStorage): New variable.
  5633. (pieceStorage): New variable.
  5634. (btAnnounce): New variable.
  5635. (getTorrentMan): Removed.
  5636. (getBtContext): New function.
  5637. * src/PeerInteraction.cc: Use btContext, peerStorage, pieceStorage,
  5638. btAnnounce.
  5639. * src/HandshakeMessage.h
  5640. (TorrentMan.h): Removed.
  5641. * src/HandshakeMessage.cc: Use btContext.
  5642. * src/DefaultBtAnnounce.cc: New file.
  5643. * src/MultiDiskWriter.cc: Use the accessor methods of FileEntry.
  5644. * src/DefaultPieceStorage.cc: New file.
  5645. * src/DefaultBtContext.h: New file.
  5646. * src/TorrentRequestInfo.cc: Use btContext, pieceStorage.
  5647. Use the accessor methods of FileEntry.
  5648. * src/CookieBox.cc: Updated to use Util::slice().
  5649. * src/PieceMessage.cc: Use btContext, pieceStorage.
  5650. * src/common.h (SharedHandle.h): New include.
  5651. * src/PeerMessage.cc (PeerMessage): Added btContext, peerStorage,
  5652. pieceStorage.
  5653. * src/TorrentAutoSaveCommand.h: Made subclass of BtContextAwareCommand.
  5654. * src/DiskAdaptor.h
  5655. (topDir): Removed.
  5656. (getFileEntryFromPath): Changed the return type to FileEntryHandle.
  5657. (setTopDir): Removed.
  5658. (getTopDir): Removed.
  5659. * src/BtContext.h: New file.
  5660. * src/DefaultPeerStorage.h: New file.
  5661. * src/PieceMessage.h (TorrentMan.h): Removed.
  5662. * src/RequestMessage.h (TorrentMan.h): Removed.
  5663. * src/TorrentDownloadEngine.h
  5664. (uploadLength): New variable.
  5665. (btContext): New variable.
  5666. (btRuntime): New variable.
  5667. (pieceStorage): New variable.
  5668. (peerStorage): New variable.
  5669. (btAnnounce): New variable.
  5670. (btProgressInfoFile): New variable.
  5671. (torrentMan): Removed.
  5672. (setBtContext): New function.
  5673. * src/TorrentDownloadEngine.cc: Use BtContext, BtRuntime, pieceStorage,
  5674. peerStorage, btAnnounce, btProgressInfoFile.
  5675. * src/Piece.h
  5676. (toString): New function.
  5677. (Pieces): New type definition.
  5678. * src/Peer.h
  5679. (active): New variable.
  5680. (Peer): Added active.
  5681. (activate): Set active to true.
  5682. (deactivate): Set active to false.
  5683. (isActive): New function.
  5684. (Peers): New type definition.
  5685. * src/DirectDiskAdaptor.cc
  5686. (getFilePath): Use the accessor methods of FileEntry.
  5687. * src/TorrentConsoleDownloadEngine.h
  5688. (afterEachIteration): New function.
  5689. * src/TorrentConsoleDownloadEngine.cc
  5690. (haltRequested): New variable.
  5691. (sendStatistics): Use pieceStorage, btRuntime.
  5692. (afterEachIteration): New function.
  5693. * src/AnnounceList: AnnounceTier->AnnounceTierHandle.
  5694. * src/Directry.h
  5695. (Directory): New function.
  5696. (DirectoryHandle): New type definition.
  5697. * src/BtProgressInfoFile.h: New file.
  5698. * src/RequestMessage.cc: Use pieceStorage.
  5699. * src/BtRuntime.h: New file.
  5700. * src/DefaultBtContext.cc: New file.
  5701. * src/BitfieldMan.h
  5702. (getCompletedLength): New function(private).
  5703. (getCompletedLength): New function.
  5704. (getFilteredCompletedLength): New function.
  5705. * src/BitfieldMan.h
  5706. (getCompletedLength): New function(private).
  5707. (getCompletedLength): New function.
  5708. (getFilteredCompletedLength): New function.
  5709. * src/MultiDiskAdaptor.cc
  5710. (mkdir): New function.
  5711. (openFile): Call mkdir().
  5712. (initAndOpenFile): Call mkdir().
  5713. * src/CancelMessage.h
  5714. (TorrentMan.h): Removed.
  5715. * src/RejectMessage.h
  5716. (TorrentMan.h): Removed.
  5717. * src/DownloadEngineFactory.cc
  5718. (DefaultPieceStorage.h): New include.
  5719. (DefaultPeerStorage.h): New include.
  5720. (DefaultBtAnnounce.h): New include.
  5721. (DefaultBtProgressInfoFile.h): New include.
  5722. (newTorrentConsoleEngine): Rewritten.
  5723. * src/ShareRatioSeedCriteria.h
  5724. (torrentMan): Removed.
  5725. (btContext): New variable.
  5726. (peerStorage): New variable.
  5727. (btRuntime): New variable.
  5728. (evaluate): Use btContext, btRuntime, peerStorage.
  5729. * src/AnnounceTier.h: New file.
  5730. * src/BtAnnounce.h: New file.
  5731. * src/BtRegistry.h: New file.
  5732. * src/PeerInitiateConnectionCommand.h: Added btContext.
  5733. * src/PeerConnection.h (TorrentMan.h): Removed.
  5734. * src/PeerMessageFactory.cc: Use btContext, pieceStorage.
  5735. * src/Util.h
  5736. (slice): Added an argument.
  5737. * src/Util.cc
  5738. (slice): Added an argument to control whether trim is made or not.
  5739. * src/PeerStorage.h: New file.
  5740. * src/BtRegistry.cc: New file.
  5741. * src/TrackerUpdateCommand.h: Made subclass of BtContextAwareCommand.
  5742. * src/CopyDiskAdaptor.cc: Use the accessor methods of FileEntry.
  5743. * src/MultiDiskWriter.h: FileEntry -> FileEntryHandle
  5744. * src/PeerListenCommand.cc: Use btRuntime, peerStorage, btContext.
  5745. * src/TorrentRequestInfo.h
  5746. (e): Removed.
  5747. (showFileEntry): Added an argument.
  5748. (getDownloadEngine): Return 0.
  5749. * src/DefaultBtAnnounce.h: New file.
  5750. * src/TorrentAutoSaveCommand.cc: Use btRuntime, btProgressInfoFile.
  5751. * src/TrackerWatcherComand.cc: Use btRuntime, btAnnounce,
  5752. * src/PeerMessageFactory.h
  5753. (btContext): New variable.
  5754. (pieceStorage): New variable.
  5755. * src/TrackerUpdateCommand.cc: Use btRuntime, peerStorage, btContext,
  5756. btAnnounce.
  5757. * src/DiskAdaptor.cc
  5758. (DiskAdaptor): Removed topDir.
  5759. (~DiskAdaptor): Removed topDir.
  5760. * src/PeerListenCommand.h: Made subclass of BtContextAwareCommand.
  5761. * src/SeedCheckCommand.h: Made subclass of BtContextAwareCommand.
  5762. * src/File.h (mkdirs): New function.
  5763. * src/DefaultPeerStorage): New file.
  5764. * src/DownloadEngineFactory.h
  5765. (newTorrentConsoleEngine): Use btContext.
  5766. * src/BtContextAwareCommand.cc: New file.
  5767. * src/PeerInitiateConnectionCommand.cc: Use btRuntime, peerStorage.
  5768. * src/PeerMessage.h
  5769. (btContext): New variable.
  5770. (peerStorage): New variable.
  5771. (pieceStorage): New variable.
  5772. (setBtContext): New function.
  5773. * src/Directry.cc
  5774. (Directory): New function.
  5775. (createDir): Do nothing if name.size() == 0.
  5776. * src/AnnounceList.h
  5777. (AnnounceTier): Removed.
  5778. (AnnounceTiers): Removed.
  5779. * src/DefaultPieceStorage.h: New file.
  5780. * src/Piece.cc (toString): New function.
  5781. To fix typo:
  5782. * src/main.cc (showVersion): Fixed typo.
  5783. To fix compile warning:
  5784. * src/DelegatingPeerListProcessor.cc
  5785. (canHandle): Added "return false".
  5786. 2006-10-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5787. To simplify TrackerWatherCommand, TrackerUpdateCommand and
  5788. make the process of announce request testable.
  5789. * src/TrackerWatcherCommand.h
  5790. (TimeA2.h): Removed.
  5791. (interval): Removed.
  5792. (checkPoint): Removed.
  5793. (createRequestCommand): Added an argument 'url'.
  5794. (TrackerWatherCommand): Removed interval.
  5795. (createCommand): New function.
  5796. * src/DownloadEngineFactory.cc
  5797. (newTorrentConsoleEngine): Updated according to the changes in
  5798. TrackerWatherCommand.
  5799. * src/TorrentMan.cc
  5800. (DelegatingPeerListProcessor.h): New includes.
  5801. (TorrentMan): Added the initialization of announceInterval.
  5802. (isStoppedAnnounceReady): New function.
  5803. (isCompletedAnnounceReady): New function.
  5804. (isDefaultAnnounceReady): New function.
  5805. (isAnnounceReady): New function.
  5806. (getAnnounceUrl): New function.
  5807. (announceStart): New function.
  5808. (announceFailure): New function.
  5809. (announceSuccess): New function.
  5810. (isAllAnnounceFailed): New function.
  5811. (resetAnnounce): New function.
  5812. (processAnnounceResponse): New function.
  5813. (needMorePeerConnection): New function.
  5814. (noMoreAnnounce): New function.
  5815. * src/TrackerUpdateCommand.h
  5816. (getTrackerResponse): int->size_t
  5817. * src/TorrentMan.h
  5818. (isStoppedAnnounceReady): New function.
  5819. (isCompletedAnnounceReady): New function.
  5820. (isDefaultAnnounceReady): New function.
  5821. (announceInterval): New variable.
  5822. (isAnnounceReady): New function.
  5823. (getAnnounceUrl): New function.
  5824. (announceStart): New function.
  5825. (announceFailure): New function.
  5826. (announceSuccess): New function.
  5827. (isAllAnnounceFailed): New function.
  5828. (resetAnnounce): New function.
  5829. (processAnnounceResponse): New function.
  5830. (needMorePeerConnection): New function.
  5831. (noMoreAnnounce): New function.
  5832. * src/TrackerWatcherCommand.cc
  5833. (TrackerWatherCommand): Removed interval and checkPoint.
  5834. (execute): Rewritten.
  5835. (createCommand): New function.
  5836. (createRequestCommand): Rewritten.
  5837. * src/TrackerUpdateCommand.cc
  5838. (MetaFileUtil.h): Removed.
  5839. (DelegatingPeerListProcessor.h): Removed.
  5840. (getTrackerResponse): int->size_t. Use torrentMan's new functions.
  5841. 2006-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5842. Request -> RequestHandle:
  5843. * src/HttpResponseCommand.h: Request->RequestHandle
  5844. * src/AbstractCommand.cc: Request->RequestHandle
  5845. * src/HttpDownloadCommand.cc: Request->RequestHandle
  5846. * src/HttpRequestCommand.cc: Request->RequestHandle
  5847. * src/FtpInitiateConnectionCommand.h: Request->RequestHandle
  5848. * src/AbstractCommand.h: Request->RequestHandle
  5849. * src/HttpProxyRequestCommand.h: Request->RequestHandle
  5850. * src/HttpResponseCommand.cc: Request->RequestHandle
  5851. * src/HttpInitiateConnectionCommand.h: Request->RequestHandle
  5852. * src/FtpNegotiateCommand.cc: Request->RequestHandle
  5853. * src/FtpTunnelResponseCommand.h: Request->RequestHandle
  5854. * src/HttpConnection.h: Request->RequestHandle
  5855. * src/HttpProxyResponseCommand.cc: Request->RequestHandle
  5856. * src/InitiateConnectionCommandFactory.h: Request->RequestHandle
  5857. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  5858. * src/DownloadCommand.h: Request->RequestHandle
  5859. * src/FtpDowndloadCommand.cc: Request->RequestHandle
  5860. * src/HttpInitiateConnectionCommand.cc: Request->RequestHandle
  5861. * src/HttpRequestCommand.h: Request->RequestHandle
  5862. * src/FtpNegotiateCommand.h: Request->RequestHandle
  5863. * src/FtpTunnelResponseCommand.cc: Request->RequestHandle
  5864. * src/FtpInitiateConnectionCommand.cc: Request->RequestHandle
  5865. * src/HttpDownloadCommand.h: Request->RequestHandle
  5866. * src/FtpConnection.cc: Request->RequestHandle
  5867. * src/InitiateConnectionCommandFactory.cc: Request->RequestHandle
  5868. * src/UrlRequestInfo.cc: Request->RequestHandle
  5869. * src/HttpProxyResponseCommand.h: Request->RequestHandle
  5870. * src/HttpConnection.h: Request->RequestHandle
  5871. * src/DownloadCommand.cc: Request->RequestHandle
  5872. * src/FtpConnection.h: Request->RequestHandle
  5873. * src/FtpDowndloadCommand.h: Request->RequestHandle
  5874. * src/HttpProxyRequestCommand.cc: Request->RequestHandle
  5875. * src/FtpTunnelRequestCommand.h: Request->RequestHandle
  5876. * src/Request.h
  5877. (SharedHandle.h): New include.
  5878. (RequestHandle): New type definition.
  5879. (Requests): Redefined.
  5880. To add MULTITRACKER support:
  5881. * src/TrackerWatcherCommand.h
  5882. (createRequestCommand): New function.
  5883. * src/DownloadEngineFactory.cc
  5884. (newTorrentConsoleEngine): Removed req.
  5885. * src/prefs.h
  5886. (PREF_TRACKER_MAX_TRIES): New definition.
  5887. * src/TorrentMan.cc
  5888. (TorrentMan): Removed req. Added trackerNumTry.
  5889. (~TorrentMan): Removed req.
  5890. (setupInternal1): Added announceList.
  5891. * src/TorrentRequestInfo.cc
  5892. (execute): Set PREF_MAX_TIRES to 1. The max number of tries for
  5893. announces is now specified by PREF_TRACKER_MAX_TRIES.
  5894. * src/main.cc
  5895. (main): Added PREF_TRACKER_MAX_TRIES.
  5896. * src/TorrentMan.h
  5897. (Request.h): Removed.
  5898. (AnnounceList.h): New include.
  5899. (trackerNumTry): New variable.
  5900. (req): Removed.
  5901. (announceList): New variable.
  5902. * src/TrackerWatcherCommand.cc
  5903. (execute): Rewritten.
  5904. (createRequestCommand): New function.
  5905. * src/TrackerUpdateCommand.cc
  5906. (execute): Updated with the use of AnnounceList.
  5907. * src/AnnounceList.cc: New class.
  5908. * src/AnnounceList.h: New class.
  5909. To fix typo:
  5910. * src/prefs.h
  5911. (PREF_MAX_TRIES): max_try->max_tries
  5912. To not to decode "+" as space in URL decode:
  5913. * src/Util.cc
  5914. (urldecode): Removed "+"->space decoding rule. Test case was updated.
  5915. 2006-10-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5916. To add timeout to async name resolution:
  5917. * src/AbstractCommand.h
  5918. (nameResolveFinished): New function. This is not elegant way. It needs
  5919. to be more refined.
  5920. (nameResolverCheck): New variable.
  5921. * src/AbstractCommand.cc
  5922. (AbstractCommand): Added nameResolverCheck.
  5923. (execute): Added the check whether the name resolution has finished.
  5924. (setNameResolverCheck): Set nameResolverCheck to true.
  5925. (disableNameResolverCheck): Set nameResolverCheck to false.
  5926. (nameResolverFinished): New function.
  5927. * src/FtpInitiateConnectionCommand.h
  5928. (nameResolverFinished): New function.
  5929. * src/FtpInitiateConnectionCommand.cc
  5930. (FtpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  5931. * src/HttpInitiateConnectionCommand.h
  5932. (nameResolverFinished): New function.
  5933. * src/HttpInitiateConnectionCommand.cc
  5934. (HttpInitiateConnectionCommand): Set timeout to PREF_DNS_TIMEOUT.
  5935. * src/prefs.h
  5936. (PREF_DNS_TIMEOUT): New definition.
  5937. * src/main.cc
  5938. (main): Added PREF_DNS_TIMEOUT.
  5939. To add the support for a non-compact response from a tracker:
  5940. * src/PeerListProcessor.h: New class.
  5941. * src/DefaultPeerListProcessor.h: New class.
  5942. * src/DefaultPeerListProcessor.cc: New class.
  5943. * src/CompactPeerListProcessor.h: New class.
  5944. * src/CompactPeerListProcessor.cc: New class.
  5945. * src/DelegatingPeerListProcessor.h: New class.
  5946. * src/DelegatingPeerListProcessor.cc: New class.
  5947. * src/TorrentMan.cc
  5948. (addPeer): New function(overload).
  5949. (addPeer): Delete unused peers only when new peer is added.
  5950. * src/TorrentMan.h
  5951. (PeerListProcessor.h): Included.
  5952. (Peers): Removed.
  5953. (addPeer): New function(overload).
  5954. * src/TrackerUpdateCommand.cc
  5955. (netinet/in.h): Removed.
  5956. (DelegatingPeerListProcessor.h): Included.
  5957. (execute): Updated to use DelegatingPeerListProcessor.
  5958. To fix the memory leak in TorrentMan::peers:
  5959. * src/PeerAbstractCommand.cc
  5960. (onAbort): Added peer->resetStatus().
  5961. * src/Peer.h
  5962. (resetStatus): Made public.
  5963. To improve the precision of the speed calculation:
  5964. * src/SpeedCalc.h
  5965. (nextInterval): New variable.
  5966. * src/SpeedCalc.cc
  5967. (reset): Added nextInterval.
  5968. (isIntervalOver): Use nextInterval instead of CHANGE_INTERVAL_SEC.
  5969. (changeSw): Set nextInterval to 15 seconds relative to the current
  5970. instant time.
  5971. * src/main.cc
  5972. (showVersion): Updated.
  5973. (showUsage): Updated.
  5974. * Release 0.8.1
  5975. 2006-09-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5976. * src/main.cc
  5977. (showUsage): Commented out --min-segment-size option.
  5978. (main): Commented out --min-segment-size option.
  5979. * Release 0.8.0
  5980. 2006-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5981. * src/*.{h,cc}:
  5982. Added an exception to the license which allows linking with OpenSSL.
  5983. 2006-09-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  5984. * src/AbstractCommand.cc
  5985. (execute): Check whether the download has finished before checking
  5986. socket status.
  5987. Return true if peerStat->getStatus() == REQUEST_IDLE.
  5988. Do not exit even if no segment is available.
  5989. * src/prefs.h
  5990. (PREF_STARTUP_IDLE_TIME): New definition.
  5991. * src/PeerInteractionCommand.cc
  5992. (executeInternal): Removed max speed limit. Because it performs bad.
  5993. (receiveMessages): Added max speed limit. This was better than above,
  5994. but still a little bit to be desired. Sometimes the download speed
  5995. became much faster than I specified.
  5996. * src/SpeedCalc.h
  5997. (start): New variable.
  5998. (accumulatedLength): New variable.
  5999. (getAvgSpeed): New function.
  6000. * src/SpeedCalc.cc
  6001. (reset): Added start, accumulatedLength.
  6002. (update): Added calculation of an average speed.
  6003. (getAvgSpeed): New function.
  6004. * src/DownloadCommand.h
  6005. (sw): Removed.
  6006. * src/main.cc
  6007. (main): Added PREF_STARTUP_IDLE_TIME.
  6008. * src/PeerStat.h
  6009. (STATUS): Added REQUEST_IDLE.
  6010. (getMaxSpeed): Renamed as getMaxDownloadSpeed().
  6011. (getAvgDownloadSpeed): New function
  6012. (requestIdle): New function.
  6013. * src/SegmentMan.h
  6014. (SegmentEntryHandle): New type definition.
  6015. (SegmentEntries): Now holds SegmentEntryHandle.
  6016. (findSlowerSegmentEntry): New funtion.
  6017. * src/SegmentMan.cc
  6018. (save): Updated according to the changes in SegmentEntries.
  6019. (read): Updated according to the changes in SegmentEntries.
  6020. (FindSegmentEntryByIndex): Updated according to the changes in
  6021. SegmentEntries.
  6022. (FindSegmentEntryByCuid): Updated according to the changes in
  6023. SegmentEntries.
  6024. (checkoutSegment): Updated according to the changes in SegmentEntries.
  6025. (onNullBitfield): Updated according to the changes in SegmentEntries.
  6026. Renamed uitr as itr.
  6027. (findSlowerSegmentEntry): New function.
  6028. (getSegment): Updated according to the changes in SegmentEntries.
  6029. Added the feature that cancels the segment with slow server and fast
  6030. one takes it over.
  6031. (cancelSegment): Updated according to the changes in SegmentEntries.
  6032. (getDownloadLength): Updated according to the changes in
  6033. SegmentEntries.
  6034. (init): Assigned 0 to bitfield after deleting it.
  6035. * src/DownloadCommand.cc
  6036. (STARTUP_IDLE_TIME): Removed.
  6037. (executeInternal): Use PREF_STARTUP_IDLE_TIME.
  6038. * src/PeerChokeCommand.cc
  6039. (optUnchokingPeer): Updated according to the changes in Peer.
  6040. (ResetDelta): Removed.
  6041. (UploadFaster): Updated according to the changes in Peer.
  6042. (DownloadFaster): Updated according to the changes in Peer.
  6043. (execute): I clarify the meaning of "upload" and "download" here.
  6044. "upload" means the transfer from localhost to remote host.
  6045. "download" means the transfer from remote host to localhost.
  6046. Based on this rule, I swapped orderByUploadRate and
  6047. orderByDownloadRate.
  6048. * src/PeerInteractionCommand.cc
  6049. (PeerInteraction): Removed peerInteraction->setUploadLImit().
  6050. (executeInternal): Removed the argument of
  6051. peerInteraction->sendMessages().
  6052. (receiveMessages): Rewritten download speed limit.
  6053. (sendKeepAlive): Removed peerInteraction->sendMessages().
  6054. * src/HttpResponseCommand.cc
  6055. (handleDefaultEncoding): If file size is unknown in torrent request,
  6056. do not call segmentMan->initBitfield() here.
  6057. Disabled persistent connection feature in torrent request.
  6058. * src/UrlRequestInfo.h
  6059. (UrlRequestInfo): Removed const qualifier from option.
  6060. * src/TorrentMan.h
  6061. (TransferStat): New class.
  6062. (deltaDownloadLength): Removed.
  6063. (deltaUploadLength): Removed.
  6064. (addDeltaDownloadLength): Removed.
  6065. (getDeltaDownloadLength): Removed.
  6066. (resetDeltaDownloadLength): Removed.
  6067. (addDeltaUploadLength): Removed.
  6068. (getDeltaUploadLength): Removed.
  6069. (resetDeltaUploadLength): Removed.
  6070. (addActivePeer): Added peer->activate().
  6071. (deleteActivePeer): Added peer->deactivate().
  6072. (calculateStat): New function.
  6073. * src/TorrentMan.cc
  6074. (TorrentMan): Removed deltaDownloadLength and deltaUploadLength.
  6075. (calculateStat): New function.
  6076. * src/PeerInteraction.h
  6077. (uploadLimit): Removed.
  6078. (option): New variable.
  6079. (setUploadLimit): Removed.
  6080. (getUploadSpeed): Removed.
  6081. (sendMessages): Removed the argument "currentUploadSpeed".
  6082. * src/PeerInteraction.cc
  6083. (prefs.h): Included.
  6084. (PeerInteraction): Removed uploadLimit. Added option.
  6085. (sendMessages): Rewritten upload speed limit.
  6086. (sendHandshake): Removed the argument from sendMessages().
  6087. (sendBitfield): Removed the argument from sendMessages().
  6088. * src/PeerAbstractCommand.cc
  6089. (execute): Commented out the portion of upload limit.
  6090. (onAbort): Removed peer->resetStatus().
  6091. * src/TorrentRequestInfo.cc
  6092. (timeoutSpecified): Declared extern.
  6093. (execute): Set timeout to 180 if timeout is not specified by.
  6094. command-line.
  6095. * src/PieceMessage.cc
  6096. (receivedAction): Added peer->updateDownloadLength().
  6097. Removed peer->addPeerUpload().
  6098. Removed torrentMan->addDeltaDownloadLength().
  6099. (send): Added peer->updateUploadLength().
  6100. Removed peer->addPeerDownload().
  6101. Removed torrentMan->addDeltaUploadLength().
  6102. * src/main.cc
  6103. (timeoutSpecified): New variable.
  6104. (main): Set timeoutSpecified to false.
  6105. If the command-line option "--upload-limit" is specified, then
  6106. timeoutSpecified is set to true. This option will remain in the next
  6107. release, but be deprecated in the future release.
  6108. * src/TorrentRequestInfo.h
  6109. (TorrentRequestInfo): Removed const qualifier from op.
  6110. * src/PeerStat.h
  6111. (uploadSpeed): New variable.
  6112. (PeerStat): Added default value to cuid.
  6113. (calculateUploadSpeed): New function.
  6114. (updateUploadLength): New function.
  6115. (getMaxUploadSpeed): New function.
  6116. (getAvgUploadSpeed): New function.
  6117. (reset): Added uploadSpeed. Set status to IDLE.
  6118. * src/TorrentDownloadEngine.h
  6119. (cp): Declared as Time.
  6120. (sessionDownloadLengthArray): Removed.
  6121. (sessionUploadLengthArray): Removed.
  6122. (currentCp): Removed.
  6123. (lastCalcStat): New variable
  6124. (lastElapsed): Removed.
  6125. (sessionDownloadLength): Removed.
  6126. (calculateStat): New function.
  6127. * src/TorrentDownloadEngine.cc
  6128. (initStatistics): Removed lastElapsed, cp[],
  6129. sessionDownloadLengthArray[], sessionUploadLengthArray[],
  6130. currentCp, sessionDownloadLength.
  6131. Added cp.reset() and lastCalcStat.reset().
  6132. (calculateSpeed): Changed the name of the argument.
  6133. (calculateStatistics): Rewritten.
  6134. (calculateStat): New function.
  6135. * src/Peer.h
  6136. (PeerStat.h): Included.
  6137. (peerUpload): Removed.
  6138. (peerDownload): Removed.
  6139. (peerStat): New variable.
  6140. (sessionUploadLength): New variable.
  6141. (sessionDownloadLength): New variable.
  6142. (deltaUpload): Removed.
  6143. (deltaDownload): Removed.
  6144. (resetStatus): Made private.
  6145. (Peer): Added sessionUploadLength, sessionDownloadLength.
  6146. Removed peerUpload, peerDownload.
  6147. (updateUploadLength): New function.
  6148. (addDeltaUpload): Removed.
  6149. (updateDownloadLength): New function.
  6150. (resetDeltaUpload): Removed.
  6151. (getDeltaUpload): Removed.
  6152. (addDeltaDownload): Removed.
  6153. (calculateUploadSpeed): New function.
  6154. (resetDeltaDownload): Removed.
  6155. (getDeltaDownload): Removed.
  6156. (calculateDownloadSpeed): New function.
  6157. (getSessionUploadLength): New function.
  6158. (getSessionDownloadLength): New function.
  6159. (activate): New function.
  6160. (deactivate): New function.
  6161. (addPeerUpload): Removed.
  6162. (setPeerUpload): Removed.
  6163. (getPeerUpload): Removed.
  6164. (addPeerDownload): Removed.
  6165. (setPeerDownload): Removed.
  6166. (getPeerDownload): Removed.
  6167. * src/Peer.cc
  6168. (resetStatus): Removed resetDeltaUpload() and resetDeltaDownload().
  6169. * src/MetalinkRequestInfo.h
  6170. (MetalinkRequestInfo): Removed const qualifier from op.
  6171. * src/RequestInfo.h
  6172. (op): Removed const qualifier.
  6173. (RequestInfo): Removed const qualifier from op.
  6174. * src/prefs.h
  6175. (PREF_MAX_SPEED_LIMIT): Renamed as PREF_MAX_DOWNLOAD_LIMIT.
  6176. (PREF_UPLOAD_LIMIT): Renamed as PREF_MAX_UPLOAD_LIMIT.
  6177. * src/PeerInteractionCommand.cc
  6178. (PeerInteractionCommand): Use PREF_MAX_UPLOAD_LIMIT.
  6179. (receiveMessages): Use PREF_MAX_DOWNLOAD_LIMIT.
  6180. * src/PeerInteraction.cc
  6181. (sendMessages): Use PREF_MAX_UPLOAD_LIMIT.
  6182. * src/main.cc
  6183. (showUsage): Updated the description of "--lowest-speed-limit" option.
  6184. Added the description of "--max-download-limit" option.
  6185. Removed the description of "--upload-limit" option.
  6186. Added the description of "--max-upload-limit" option.
  6187. (main): Use PREF_MAX_UPLOAD_LIMIT, PREF_MAX_DOWNLOAD_LIMIT.
  6188. Added "--max-download-limit" option and "--max-upload-limit" option.
  6189. Added the warning message if "--upload-limit" option is used.
  6190. * src/DownloadCommand.cc
  6191. (executeInternal): Use PREF_MAX_DOWNLOAD_LIMIT.
  6192. 2006-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6193. To rewrite segment download mechanism for HTTP/FTP download.
  6194. Use BitfieldMan to manage segment download.
  6195. * src/HttpResponseCommand.h
  6196. (executeInternal): Pass the reference of segment.
  6197. * src/AbstractCommand.cc
  6198. (prepareForRetry): Call segmentMan->cancelSegment here.
  6199. (onAbort): Call segmentMan->cancelSegment here.
  6200. * src/HttpDownloadCommand.cc
  6201. (prepareForNextSegment): New function.
  6202. * src/DownloadEngineFactory.cc
  6203. (newConsoleEngine): Removed splitter.
  6204. (newTorrentConsoleEngine): Removed splitter.
  6205. * src/Request.h
  6206. (segment): Renamed from seg.
  6207. * src/FtpInitiateConnectionCommand.h
  6208. (executeInternal): Pass the reference of segment.
  6209. * src/AbstractCommand.h
  6210. (executeInternal): Pass the reference of segment.
  6211. * src/pref.h
  6212. (PREF_SEGMENT_SIZE): New definition.
  6213. * src/HttpProxyRequestCommand.h
  6214. (executeInternal): Pass the reference of segment.
  6215. * src/HttpResponseCommand.cc
  6216. (checkResponse): Allowed status 206 when a request range starts 0.
  6217. (handleDefaultEncoding): Rewritten the code related to Segment.
  6218. (handleOtherEncoding): Rewritten the code related to Segment.
  6219. * src/SegmentMan.h
  6220. (SegmentEntry): New class.
  6221. (SegmentEntries): New type definition.
  6222. (bitfield): New variable.
  6223. (usedSegmentEntries): New variable.
  6224. (onNullBitfield): New function.
  6225. (checkoutSegment): New function.
  6226. (segments): Removed.
  6227. (splitter): Removed.
  6228. (unregisterId): Removed.
  6229. (getSegment): New function(overload)
  6230. (getDownloadedSize): Removed.
  6231. (cancelSegment): New function.
  6232. (completeSegment): New function.
  6233. (initBitfield): New function.
  6234. (hasSegment): New function.
  6235. (getDownloadLength): New function.
  6236. * src/BitfieldMan.h
  6237. (getStartIndex): New function.
  6238. (getEndIndex): New function.
  6239. (getMissingUnusedIndex): New function(overload).
  6240. (getSparseMissingUnusedIndex): New function.
  6241. * src/BitfieldMan.cc
  6242. (getMissingIndexRandomly): Handle the last byte of bitfield properly.
  6243. (getMissingUnusedIndex): New function(overload).
  6244. (Range): New class.
  6245. (getStartIndex): New function.
  6246. (getEndIndex): New function.
  6247. (getSparseMissingUnusedIndex): New function.
  6248. (isBitSetInternal): Return false if the given index is less than 0.
  6249. * src/HttpInitiateConnectionCommand.h
  6250. (executeInternal): Pass the reference of segment.
  6251. * src/FtpNegotiateCommand.h
  6252. (executeInternal): Pass the reference of segment.
  6253. * src/FtpNegotiateCommand.cc
  6254. (recvSize): Initialize bitfield here.
  6255. * src/FtpTunnelResponseCommand.h
  6256. (executeInternal): Pass the reference of segment.
  6257. * src/HttpConnection.cc
  6258. (createRequest): Rewritten range header processing.
  6259. * src/DownloadCommand.h
  6260. (executeInternal): Pass the reference of segment.
  6261. (prepareForRetry): Removed.
  6262. (prepareForNextSegment): Added an argument segment. Made it a virtual
  6263. function.
  6264. * src/main.cc
  6265. (main): Set the initial value of PREF_SEGMENT_SIZE to 1MB.
  6266. * src/SegmentMan.cc
  6267. (SegmentMan): Added bitfield. Removed splitter.
  6268. (~SegmentMan): Added bitfield. Removed splitter.
  6269. (unregisterId): Removed.
  6270. (getSegment): Rewritten.
  6271. (updateSegment): Rewritten.
  6272. (save): Rewritten.
  6273. (read): Rewritten.
  6274. (finished): Rewritten.
  6275. (getDownloadedSize): Removed.
  6276. (initBitfield): New function.
  6277. (FindSegmentEntryByIndex): New function object.
  6278. (FindSegmentEntryByCuid): New function object.
  6279. (checkoutSegment): New function.
  6280. (onNullBitfield): New function.
  6281. (getSegment): New function(overload).
  6282. (CancelSegment): New function object.
  6283. (cancelSegment): New function.
  6284. (completeSegment): New function.
  6285. (hasSegment): New function.
  6286. (getDownloadLength): New function.
  6287. * src/FtpInitiateConnectionCommand.cc
  6288. (executeInternal): Load .aria2 file after hostname resolution finishes.
  6289. * src/Segment.h: Rewritten.
  6290. * src/Segment.cc (operator<<): New function.
  6291. * src/HttpDownloadCommand.h
  6292. (prepareForNextSegment): New function.
  6293. * src/Request.cc
  6294. (resetUrl): Made segment null.
  6295. * src/DownloadEngine.cc
  6296. (~DownloadEngine): Call cleanQueue before deleting segmentMan.
  6297. * src/HttpProxyRequestCommand.h
  6298. (executeInternal): Pass the reference of segment.
  6299. * src/DownloadCommand.cc
  6300. (executeInternal): Rewritten the code related to Segment.
  6301. (prepareForRetry): Removed.
  6302. (prepareForNextSegment): Rewritten.
  6303. * src/FtpTunnelResponseCommand.h
  6304. (executeInternal): Pass the reference of segment.
  6305. To add HTTP 1.1 persistent connection support(experimental)
  6306. * src/HttpRequestCommand.cc
  6307. (executeInternal): Disable keep alive if it is disabled by
  6308. configuration.
  6309. * src/Request.h
  6310. (keepAlive): New variable.
  6311. (isKeepAlive): New function.
  6312. (setKeepAlive): New function.
  6313. * src/pref.h
  6314. (PREF_HTTP_KEEP_ALIVE): New definition.
  6315. * src/HttpResponseCommand.cc
  6316. (executeInternal): Check the remote server supports keep alive.
  6317. * src/HttpConnection.cc
  6318. (createRequest): Send "Connection: close" only if keep alive is
  6319. disabled.
  6320. * src/main.cc
  6321. (main):
  6322. Set the initial value(false) of PREF_KEEP_ALIVE to false.
  6323. To add max download speed limit:
  6324. * src/pref.h
  6325. (PREF_MAX_SPEED_LIMIT): New definition.
  6326. * src/PeerInteractionCommand.cc
  6327. (executeInternal): Added max download speed limit. Not tested yet.
  6328. * src/SegmentMan.h
  6329. (PeerStats): New type definition.
  6330. (peerStats): New variable.
  6331. (registerPeerStat): New function.
  6332. (FindPeerStat): New function object.
  6333. (getPeerStat): New function.
  6334. (calculateDownloadSpeed): New function.
  6335. * src/SpeedCalc.h: New class.
  6336. * src/SpeedCalc.cc: New class.
  6337. * src/main.cc
  6338. (main):
  6339. Set the initial value of PREF_MAX_SPEED_LIMIT to 0(which means the
  6340. download speed is not restricted).
  6341. * src/PeerStat.h: New class.
  6342. * src/SegmentMan.cc
  6343. (registerPeerStat): New function.
  6344. (calculateDownloadSpeed): New function.
  6345. * src/DownloadCommand.cc
  6346. (STARTUP_IDLE_TIME): New definition.
  6347. (DownloadCommand): Register peerStat to segmentMan. Call peerStat->
  6348. downloadStart.
  6349. (~DownloadCommand): Call peerStat->downloadStop.
  6350. (executeInternal): Added download speed limitter. Rewritten lowest
  6351. speed limitter.
  6352. * src/HttpConnection.cc
  6353. (receiveResponse): Fixed: eohIndex[headerBuf] -> headerBuf[eohIndex].
  6354. * src/AbstractCommand.cc
  6355. (resolveHostname): Throw DlAbortEx if a name resolution failes.
  6356. Added hostname to the error message.
  6357. * src/ConsoleDownloadEngine.cc
  6358. (calculateStatistics): Initialize psize with dlSize.
  6359. * src/PieceMessage.cc
  6360. (receivedAction): Do not call peerInteraction->abortPiece here.
  6361. (onGotWrongPiece): Call peerInteraction->abortPiece here.
  6362. * src/BitfieldMan.h
  6363. (clearAllUseBit): New function.
  6364. (setAllUseBit): New function.
  6365. * src/BitfieldMan.cc
  6366. (clearAllBit): Do not clear useBitfield here.
  6367. (clearAllUseBit): New function.
  6368. (setAllUseBit): New function.
  6369. * src/Piece.cc
  6370. (clearAllBlock): Call bitfield->clearAllUseBit().
  6371. 2006-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6372. To make filename URL-decoded:
  6373. * src/HttpResponseCommand.h: Updated doc.
  6374. * src/HttpResponseCommand.cc
  6375. (determinFilename): Made filename URL-decoded.
  6376. * src/FtpInitiateConnectionCommand.cc
  6377. (executeInternal): Made filename URL-decoded.
  6378. * src/Util.h (urldecode): New function.
  6379. * src/Util.cc (urldecode): New function.
  6380. To fix a bug that caused assertion failure in ares_strerror:
  6381. * src/NameResolver.cc (callback): Fixed the bug.
  6382. * Release 0.7.3
  6383. 2006-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6384. To add --seed-time and --seed-ratio command-line option:
  6385. * src/Option.h (getAsDouble): New function.
  6386. * src/Option.cc (getAsDouble): New function.
  6387. * src/SeedCheckCommand.h: New class.
  6388. * src/SeedCheckCommand.cc: New class.
  6389. * src/DownloadEngineFactory.cc
  6390. (SeedCheckCommand.h): Included.
  6391. (UnionSeedCriteria.h): Included.
  6392. (TimeSeedCriteria.h): Included.
  6393. (ShareRatioSeedCriteria.h): Included.
  6394. (newTorrentConsoleEngine): Added the processing of seed option.
  6395. * src/SeedCriteria.h: New class.
  6396. * src/ShareRatioSeedCriteria.h: New class.
  6397. * src/TimeSeedCriteria.h: New class.
  6398. * src/UnionSeedCriteria.h: New class.
  6399. * src/prefs.h
  6400. (PREF_SEED_TIME): New definition.
  6401. (PREF_SEED_RATIO): New definition.
  6402. * src/main.cc
  6403. (showUsage): Added --seed-time and --seed-ratio option.
  6404. (main): Added --seed-time and --seed-ratio option.
  6405. Made default log file name "/dev/null".
  6406. * src/SharedHandle.h
  6407. (SharedHandle): Copy constructor. Made it assignable from the
  6408. SharedHandle of the subclasses.
  6409. (operator=): Made it assignable from the SharedHandle of the
  6410. subclasses.
  6411. (getRefCount): New function.
  6412. To add notice log level and the switch to write log to stdout. This
  6413. switch is configurable per log level.
  6414. * src/Logger.h
  6415. (notice): New function.
  6416. (LEVEL): Added NOTICE. Assigned an explicit value to each log level
  6417. constant.
  6418. * src/LogFactory.cc
  6419. (getInstance): The use of NullLogger was removed. A log message with
  6420. notice log level was made written to stdout along with log file.
  6421. * src/NullLogger.h
  6422. (notice): New function.
  6423. * src/SimpleLogger.h
  6424. (writeHeader): Added the 'file' argument.
  6425. (writeLog): Added the 'file' argument.
  6426. (writeFile): New function.
  6427. (stdoutField): New variable.
  6428. (SimpleLogger): Removed the default constructor.
  6429. (SimpleLogger): Made the default value of logfile 0.
  6430. (debug): Added 'virtual' keyword.
  6431. (info): Added 'virtual' keyword.
  6432. (warn): Added 'virtual' keyword.
  6433. (error): Added 'virtual' keyword.
  6434. (notice): New function.
  6435. (setStdout): New function.
  6436. * src/SimpleLogger.cc
  6437. (WRITE_LOG): Replaced writeLog with writeFile.
  6438. (WRITE_LOG_EX): Replaced writeLog with writeFile.
  6439. (SimpleLogger): Removed the default constructor.
  6440. (setStdout): New function.
  6441. (writeLog): Added the handling of NOTICE log level.
  6442. (writeFile): New function.
  6443. (notice): New function.
  6444. * src/TorrentMan.h: Updated doc.
  6445. * src/BitfieldMan.h: Updated doc.
  6446. * src/TrackerWatcherCommand.cc
  6447. (execute): Return true if error occurred in the request to the tracker
  6448. and halt is requested.
  6449. * src/TrackerUpdateCommand.cc
  6450. (execute): Return true if error occurred in the request to the tracker
  6451. and halt is requested.
  6452. To call onDownloadComplete from TorrentMan::completePiece(), not from
  6453. DownloadEngine:
  6454. * src/TorrentConsoleDownloadEngine.h
  6455. (onSelectiveDownloadingCompletes): Removed.
  6456. * src/TorrentConsoleDownloadEngine.cc
  6457. (onSelectiveDownloadingCompletes): Removed.
  6458. * src/TorrentDownloadEngine.h
  6459. (onEndOfRun): Added 'virtual' keyword.
  6460. (afterEachIteration): Removed.
  6461. (onSelectiveDownloadingCompletes): Removed.
  6462. * src/TorrentDownloadEngine.cc
  6463. (onEndOfRun): Removed filenameFixed.
  6464. (afterEachIteration): Removed.
  6465. * src/TorrentMan.cc
  6466. (completePiece): Call onDownloadComplete here.
  6467. (onDownloadComplete): Added 2 log messages.
  6468. 2006-08-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6469. To fix compilation problem on gcc4.1.1(patch#1542283 by tizianomueller)
  6470. * src/NameResolver.h: Added the prototype declaration of callback().
  6471. To support c-ares library:
  6472. * src/AbstractCommand.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6473. * src/FeatureConfig.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6474. * src/FtpInitiateConnectionCommand.h:
  6475. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6476. * src/AbstractCommand.h: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6477. * src/HttpInitiateConnectionCommand.h:
  6478. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6479. * src/NameResolver.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS.
  6480. Added thes upport of c-ares's ares_strerror(the idea came from patch
  6481. #1542285 by tizianomueller)
  6482. * src/HttpInitiateConnectionCommand.cc:
  6483. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6484. * src/FtpInitiateConnectionCommand.cc:
  6485. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6486. * src/DownloadEngine.h:
  6487. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6488. * src/DownloadEngine.cc:
  6489. Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
  6490. To fix the bug that causes compilation failure with metalink-support
  6491. disabled(bug#1543587):
  6492. * src/main.cc: Fixed with the patch by tizianomueller.
  6493. * Release 0.7.2
  6494. 2006-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6495. * src/main.cc
  6496. (main): Added a message to inform users that aria2 is starting to
  6497. verify checksum.
  6498. * src/RequestInfo.cc
  6499. (printDownloadAbortMessage): Added a message to inform users that
  6500. transfer can be resumed.
  6501. * src/FeatureConfig.cc
  6502. (FEATURE_ASYNC_DNS): New definition.
  6503. (FeatureConfig): Added aysnc DNS entry.
  6504. To replace CommandUuid with Command* in SocketEntry and
  6505. NameResolverEntry:
  6506. * src/DownloadEngine.h
  6507. (CommandUuids): Removed.
  6508. (SocketEntry::commandUuid): Removed.
  6509. (SocketEntry::command): New variable.
  6510. (SocketEntry::SocketEntry): Updated.
  6511. (SocketEntry::operator==): Updated.
  6512. (NameResolverEntry::commandUuid): Removed.
  6513. (NameResolverEntry::command): New variable.
  6514. (NameResolverEntry::NameResolverEntry): Updated.
  6515. (NameResolverEntry::operator==): Updated.
  6516. (waitData): Changed the argument type.
  6517. (addSocketForReadCheck): Changed the argument type.
  6518. (deleteSocketForReadCheck): Changed the argument type.
  6519. (addSocketForWriteCheck): Changed the argument type.
  6520. (deleteSocketForWriteCheck): Changed the argument type.
  6521. (addNameResolverCheck): Changed the argument type.
  6522. (deleteNameResolverCheck): Changed the argument type.
  6523. * src/DownloadEngine.cc
  6524. (FindCommand): Removed.
  6525. (run): Removed activeUuid. Added activeCommands instead.
  6526. (AccumulateActiveUuid): Renamed as AccumulateActiveCommand.
  6527. (AccumulateActiveCommand): New function object.
  6528. (waitData): Use AccumulateActiveCommand.
  6529. (addSocketForReadCheck): Use Command instead of CommandUuid.
  6530. (deleteSocketForReadCheck): Use Command instead of CommandUuid.
  6531. (addSocketForWriteCheck): Use Command instead of CommandUuid.
  6532. (deleteSocketForWriteCheck): Use Command instead of CommandUuid.
  6533. (addNameResolverCheck): Use Command instead of CommandUuid.
  6534. (deleteNameResolverCheck): Use Command instead of CommandUuid.
  6535. * src/AbstractCommand.cc
  6536. (disableReadCheckSocket): Updated according to the changes in
  6537. DownloadEngine.
  6538. (setReadCheckSocket): Updated according to the changes in
  6539. DownloadEngine.
  6540. (disableWriteCheckSocket): Updated according to the changes in
  6541. DownloadEngine.
  6542. (setWriteCheckSocket): Updated according to the changes in
  6543. DownloadEngine.
  6544. (setNameResolverCheck): Updated according to the changes in
  6545. DownloadEngine.
  6546. (disableNameResolverCheck): Updated according to the changes in
  6547. DownloadEngine.
  6548. * src/AbstractCommand.cc
  6549. (disableReadCheckSocket): Updated according to the changes in
  6550. DownloadEngine.
  6551. (setReadCheckSocket): Updated according to the changes in
  6552. DownloadEngine.
  6553. (disableWriteCheckSocket): Updated according to the changes in
  6554. DownloadEngine.
  6555. (setWriteCheckSocket): Updated according to the changes in
  6556. DownloadEngine.
  6557. * release 0.7.1
  6558. 2006-08-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6559. To handle the case where some BitTorrent tracker requires all letters
  6560. except for [A-Za-z0-9] is URL encoded.
  6561. * src/Util.h
  6562. (torrentUrlencode): New function.
  6563. * src/Util.cc
  6564. (ctype.h): Included.
  6565. (torrentUrlencode): New function.
  6566. * src/TrackerWatcherCommand.cc
  6567. (execute): Use Util::torrentUrlencode() instead of Util::urlencode().
  6568. 2006-08-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6569. To add asynchronous DNS support(libares):
  6570. * src/AbstractCommand.h
  6571. (setNameResolverCheck): New function.
  6572. (disableNameResolverCheck): New function
  6573. (resolveHostname): New function.
  6574. * src/AbstractCommand.cc
  6575. (setNameResolverCheck): New function.
  6576. (disableNameResolverCheck): New function
  6577. (resolveHostname): New function.
  6578. * src/FtpInitiateConnectionCommand.h
  6579. (nameResolver): New function.
  6580. * src/FtpInitiateConnectionCommand.cc
  6581. (Util.h): Included.
  6582. (FtpInitiateConnectionCommand): Call disableReadCheckSocket,
  6583. disableWriteCheckSocket.
  6584. (~FtpInitiateConnectionCommand): Call disableNameResolverCheck.
  6585. (executeInternal): Added async DNS support.
  6586. * src/HttpInitiateConnectionCommand.h
  6587. (nameResolver): New function.
  6588. * src/HttpInitiateConnectionCommand.cc
  6589. (DlRetryEx.h): Included.
  6590. (HttpInitiateConnectionCommand): Call disableReadCheckSocket,
  6591. disableWriteCheckSocket.
  6592. (~HttpInitiateConnectionCommand): Call disableNameResolverCheck.
  6593. (executeInternal): Added async DNS support.
  6594. * src/NameResolver.h: New class. Note: #include <ares.h> is surrounded
  6595. by extern "C" declaration.
  6596. * src/NameResolver.cc: New class.
  6597. * src/Util.h:
  6598. (isNumberAndDotsNotation): New function
  6599. * src/Util.cc
  6600. (isNumberAndDotsNotation): New function.
  6601. * src/DownloadEngine.h
  6602. (NameResolver.h): Included.
  6603. (NameResolverEntry): New class.
  6604. (NameResolverEntries): New type definition.
  6605. (addNameResolverCheck): New function.
  6606. (deleteNameResolverCheck): New function.
  6607. * src/DownloadEngine.cc
  6608. (run): Initialize cp with 0.
  6609. (SetDescriptor::operator()): Added for NameResolverEntry.
  6610. (AccumulateActiveUuid::operator()): Added for NameResolverEntry.
  6611. (waitData): Check nameResolver entries.
  6612. (updateFdSet): Update fds in nameResolver entries.
  6613. (addNameResolverCheck): New function.
  6614. (deleteNameResolverCheck): new function.
  6615. * src/PeerInteractionCommand.cc
  6616. (executeInternal): Fixed wrong socket handling.
  6617. * src/main.cc
  6618. (main): Fixed the initial value of PREF_LOWEST_SPEED_LIMIT option to 0.
  6619. * src/Util.cc
  6620. (fileChecksum): Removed the call to ctx.digestReset().
  6621. 2006-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6622. * po/ru.po: Azamat sent me Russian translation.
  6623. * src/FtpNegotiateCommand.cc
  6624. (recvGreeting): Call disableWriteCheckSocket just after
  6625. socket->setBlockingMode(). This avoids unnecessary CPU-hog loop.
  6626. (recvRetr): Recognized status code 125 as a acceptable response code.
  6627. Rename Time.h to TimeA2.h to avoid compilation ploblem on
  6628. case-insesitive filesystem(BUG#1531057).
  6629. * src/Time.h: Renamed as TimeA2.h.
  6630. * src/Time.cc: Renamed as TimeA2.cc.
  6631. * src/TimeA2.h: New class.
  6632. * src/TimeA2.cc: New class.
  6633. * src/PeerChokeCommand.h: Replaced Time.h with TimeA2.h.
  6634. * src/TrackerWatcherCommand.h: Replaced Time.h with TimeA2.h.
  6635. * src/PeerAbstractCommand.h: Replaced Time.h with TimeA2.h.
  6636. * src/AbstractCommand.h: Replaced Time.h with TimeA2.h.
  6637. * src/PeerInteractionCommand.h: Replaced Time.h with TimeA2.h.
  6638. * src/ConsoleDownloadEngine.h: Replaced Time.h with TimeA2.h.
  6639. * src/TorrentAutoSaveCommand.h: Replaced Time.h with TimeA2.h.
  6640. * src/DownloadCommand.h: Replaced Time.h with TimeA2.h.
  6641. * src/TorrentMan.h: Replaced Time.h with TimeA2.h.
  6642. * src/TorrentDownloadEngine.h: Replaced Time.h with TimeA2.h.
  6643. * src/RequestSlot.h: Replaced Time.h with TimeA2.h.
  6644. * src/SleepCommand.h: Replaced Time.h with TimeA2.h.
  6645. * src/DownloadEngine.cc: Replaced Time.h with TimeA2.h.
  6646. * release 0.7.0
  6647. 2006-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6648. * src/PeerChokeCommand.h
  6649. (PeerChokeCommand): Rearranged the arguments.
  6650. * src/PeerChokeCommand.cc
  6651. (PeerChokeCommand): Rearranged the arguments.
  6652. * src/MetalinkEntry.h
  6653. (Checksum.h): Included.
  6654. (md5): Removed.
  6655. (sha1): Removed.
  6656. (checksum): New variable.
  6657. (operator=): Updated.
  6658. (check): Removed.
  6659. * src/prefs.h
  6660. (PREF_LOWEST_SPEED_LIMIT): New definition.
  6661. (PREF_FOLLOW_TORRENT): New definition.
  6662. (PREF_SELECT_FILE): New definition.
  6663. (PREF_FOLLOW_METALINK): New definition.
  6664. * src/MetalinkResource.h
  6665. (TYPE_HTTPS): Added to enum TYPE.
  6666. * src/TorrentMan.cc
  6667. (~TorrentMan): Rewritten.
  6668. * src/MultiDiskWriter.cc
  6669. (MultiDiskAdaptor): Updated according to the changes in
  6670. MessageDigestContext.
  6671. (~MultiDiskAdaptor): Updated according to the changes in
  6672. MessageDigestContext.
  6673. (hashUpdate): Updated according to the changes in MessageDigestContext.
  6674. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6675. * src/Util.h
  6676. (fileChecksum): Updated according to the changes in
  6677. MessageDigestContext.
  6678. * src/Util.cc
  6679. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6680. (fileChecksum): Updated according to the changes in
  6681. MessageDigestContext.
  6682. * src/messageDigest.h: Rewritten.
  6683. * src/MetalinkEntry.cc
  6684. (check): Removed.
  6685. (Supported): Updated.
  6686. (dropUnsupportedResource): Fixed a memory leak.
  6687. * src/ShaVisitor.cc
  6688. (ShaVisitor): Updated according to the changes in MessageDigestContext.
  6689. (~ShaVisitor): Updated according to the changes in
  6690. MessageDigestContext.
  6691. (visit): Updated according to the changes in MessageDigestContext.
  6692. * src/main.cc
  6693. (main): Rewritten the portion of download loop. --lowest-speed-limit
  6694. command-line option added.
  6695. * src/DownloadEngine.h
  6696. (SocketEntry): New class.
  6697. (SocketEntries): New definition.
  6698. (PairFind): Removed.
  6699. (SockCmdMap): Removed.
  6700. * src/DownloadEngine.cc
  6701. (DownloadEngine): Rewritten.
  6702. (~DownloadEngine): Rewritten.
  6703. (run): Renamed activeCommandUuids as activeUuids.
  6704. (SetDescriptor): Rewritten.
  6705. (AccumulateActiveCommandUuid): Removed.
  6706. (AccumulateActiveUuid): New function object.
  6707. (waitData): Rewritten.
  6708. (updateFdSet): Rewritten.
  6709. (addSocket): Rewritten.
  6710. (deleteSocket): Rewritten.
  6711. (addSocketForReadCheck): Rewritten.
  6712. (deleteSocketForReadCheck): Rewritten.
  6713. (addSocketForWriteCheck): Rewritten.
  6714. (deleteSocketForWriteCheck): Rewritten.
  6715. * src/Xml2MetalinkProcessor.cc
  6716. (getEntry): Rewritten the portion of MetalinkEntry creation.
  6717. * src/DownloadCommand.cc
  6718. (executeInternal): Added the check routine for lowest speed limit.
  6719. * src/AbstractDiskWriter.cc
  6720. (AbstractDiskWriter): Updated according to the changes in
  6721. MessageDigestContext.
  6722. (~AbstractDiskWriter): Updated according to the changes in
  6723. MessageDigestContext.
  6724. (sha1Sum): Updated according to the changes in MessageDigestContext.
  6725. * src/RequestInfo.h: New class.
  6726. * src/UrlRequestInfo.h: New class.
  6727. * src/UrlRequestInfo.cc: New class.
  6728. * src/TorrentRequestInfo.h: New class.
  6729. * src/TorrentRequestInfo.cc: New class.
  6730. * src/MetalinkRequestInfo.h: New class.
  6731. * src/MetalinkRequestInfo.cc: New class.
  6732. * src/Checksum.h: New class.
  6733. * src/DownloadEngineFactory.h: New class.
  6734. * src/DownloadEngineFactory.cc: New class.
  6735. 2006-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6736. * src/Option.h
  6737. (getAsBool): New function.
  6738. * src/Option.cc
  6739. (prefs.h): Included.
  6740. (defined): 0-length value is now recognized as undefined.
  6741. (getAsInt): Rewritten.
  6742. (getAsLLInt): Rewritten.
  6743. (getAsBool): New function.
  6744. * src/FeatureConfig.h: Rewritten.
  6745. * src/FeatureConfig.cc: Rewritten.
  6746. * src/prefs.h
  6747. (PREF_STDOUT_LOG): New definition.
  6748. (PREF_LOG): New definition.
  6749. (PREF_DIR): New definition.
  6750. (PREF_OUT): New definition.
  6751. (PREF_SPLIT): New definition.
  6752. (PREF_DAEMON): New definition.
  6753. (PREF_REFERER): New definition.
  6754. (PREF_TORRENT_FILE): New definition.
  6755. (PREF_LISTEN_PORT): New definition.
  6756. (PREF_METALINK_FILE): New definition.
  6757. (PREF_METALINK_VERSION): New definition.
  6758. (PREF_METALINK_LANGUAGE): New definition.
  6759. (PREF_METALINK_OS): New definition.
  6760. (PREF_METALINK_SERVERS): New definition.
  6761. * src/main.cc
  6762. (main): Following command-line parameters are now put into Option
  6763. class: stdoutLog, logfile, dir, ufilename, split, daemonMode,
  6764. referer, torrentFile, metalinkFile, listenPort, metalinkVersion,
  6765. metalinkLanguage, metalinkOs, metalinkServers
  6766. To fix the bug that aria2 can not handle http response header properly.
  6767. * src/HttpHeader.cc
  6768. (put): Made name lowercased.
  6769. (defined): Made name lowercased.
  6770. (getFirst): Made name lowercased.
  6771. (get): Made name lowercased.
  6772. (getFirstAsInt): Rewritten.
  6773. (getFirstAsLLInt): Rewritten.
  6774. 2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6775. * src/TorrentMan.h:
  6776. (advertisePiece): Updated doc.
  6777. (getAdvertisedPieceIndexes): Updated doc.
  6778. (removeAdvertisedPiece); New function.
  6779. * src/TorrentMan.cc
  6780. (FindElapsedHave): New function object.
  6781. (removeAdvertisedPiece): New function.
  6782. * src/HaveEraseCommand.h: New class.
  6783. * src/HaveEraseCommand.cc: New class.
  6784. * src/FeatureConfig.h: New class.
  6785. * src/FeatureConfig.cc: New class.
  6786. * src/Request.h
  6787. (defaultPorts): Removed.
  6788. * src/Request.cc
  6789. (FeatureConfig.h): Included.
  6790. (Request): Removed the statements related to defaultPorts.
  6791. (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead.
  6792. A default port number is now retrieved from FeatureConfig.
  6793. * src/main.cc
  6794. (HaveEraseCommand.h): Included.
  6795. (showVersion): Added the output of feature list.
  6796. (main): Added HaveEraseCommand to command queue in BitTorrent
  6797. downloading.
  6798. * src/PeerInteractionCommand.h
  6799. (chokeCheckPoint): Commented out.
  6800. (periodicExecPoint): New variable.
  6801. * src/PeerInteractionCommand.cc
  6802. (executeInternal): Following methods are now called in at least every
  6803. 0.5 seconds to reduce CPU usage:
  6804. detectMessageFlooding(), peerInteraction->checkRequestSlot(),
  6805. checkHave(), sendKeepAlive().
  6806. (checkLongTimePeerChoking): Commented out.
  6807. * src/BitfieldMan.h
  6808. (getNthBitIndex): Changed the method signature.
  6809. (getMissingIndexRandomly): Changed the method signature.
  6810. * src/BitfieldMan.cc
  6811. (getNthBitIndex): Rewritten
  6812. (getMissingIndexRandomly): Rewritten.
  6813. (hasMissingPiece): Rewritten.
  6814. (getMissingIndex): Refactored.
  6815. (getMissingUnusedIndex); Refactored.
  6816. (getMissingIndex): Refactored.
  6817. 2006-07-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  6818. * src/PeerMessage.h
  6819. (Piece.h): Included.
  6820. (SharedHandle.h): Included.
  6821. (invalidate): New variable.
  6822. (uploading): New variable.
  6823. (isInvalidate): New function.
  6824. (isUploading): New function.
  6825. (onPush): New function.
  6826. (onChoked): New function.
  6827. (onCanceled): New function.
  6828. (onAbortPiece): New function.
  6829. (PeerMessageHandle): New type definition.
  6830. * src/PeerMessage.cc
  6831. (PeerMessage): Added the initialization for invalidate and uploading.
  6832. * src/CancelMessage.h
  6833. (CancelMessage): Rewritten.
  6834. * src/RejectMessage.h
  6835. (RejectMessage): Rewritten.
  6836. * src/Metalinker.h
  6837. (operator=): Defined.
  6838. * src/MetaEntry.h
  6839. (operator=): Defined.
  6840. * src/MetalinkResource.h
  6841. (operator=): Defined.
  6842. * src/AllowedFastMessage.h
  6843. (AllowedFastMessage): Rewritten.
  6844. * src/HandshakeMessage.h
  6845. (HandshakeMessage): New function(overload).
  6846. * src/HandshakeMessage.cc
  6847. (HandshakeMessage): Rewritten.
  6848. (init): New function.
  6849. * src/HaveMessage.h
  6850. (HaveMessage): Rewritten.
  6851. * src/Time.h
  6852. (operator=): Defined the function body here.
  6853. * src/Time.cc
  6854. (operator=): Removed.
  6855. * src/SocketCore.h
  6856. (operator==): Defined here.
  6857. (operator!=): Defined here.
  6858. (operator<): Defined here.
  6859. * src/SocketCore.cc
  6860. (operator==): Removed.
  6861. (operator<): Removed.
  6862. * src/BitfieldMan.h
  6863. (operator=): Defined the function body here.
  6864. * src/BitfieldMan.cc
  6865. (operator=): Removed.
  6866. * src/TorrentMan.h
  6867. (deleteErrorPeer): Removed.
  6868. (deleteUnusedPeer); New function.
  6869. * src/TorrentMan.cc
  6870. (addPeer): Call deleteUnusedPeer.
  6871. (deleteErrorPeer): Removed.
  6872. (deleteUnusedPeer): New function.
  6873. * src/PeerAbstractCommand.h
  6874. (setNoCheck): New function.
  6875. (noCheck): New variable.
  6876. * src/PeerAbstractCommand.cc
  6877. (PeerAbstractCommand): Added the initialization of noCheck.
  6878. (execute): Added a check for noCheck.
  6879. (setNoCheck): New function.
  6880. * src/Util.h
  6881. (stdio.h): Included.
  6882. * src/Util.cc
  6883. (unistd.h): Included.
  6884. * src/DefaultDiskWriter.cc
  6885. (unistd.h): Included.
  6886. * src/Peer.h
  6887. (operator==): Defined the function body here.
  6888. (operator!=): Defined the function body here.
  6889. * src/Peer.cc
  6890. (operator==): Removed.
  6891. (operator!=): Removed.
  6892. * src/Piece.h
  6893. (Piece): Defined the function body here(copy constructor).
  6894. (operator=): Defined the function body here.
  6895. (operator==): Defined the function body here.
  6896. * src/Piece.cc
  6897. (Piece): Removed(copy constructor).
  6898. (operator=): Removed.
  6899. (operator==): Removed.
  6900. * src/PeerMessageUtil.h
  6901. (ChokeMessage.h): Removed.
  6902. (UnchokeMessage.h): Removed.
  6903. (InterestedMessage.h): Removed.
  6904. (NotInterestedMessage.h): Removed.
  6905. (HaveMessage.h): Removed.
  6906. (BitfieldMessage.h): Removed.
  6907. (RequestMessage.h): Removed.
  6908. (CancelMessage.h): Removed.
  6909. (PieceMessage.h): Removed.
  6910. (HandshakeMessage.h): Removed.
  6911. (KeepAliveMessage.h): Removed.
  6912. (PortMessage.h): Removed.
  6913. (HaveAllMessage.h): Removed.
  6914. (HaveNoneMessage.h): Removed.
  6915. (PeerConnection.h): Removed.
  6916. (HandshakeMessage.h): Included.
  6917. * src/BitfieldMessage.h
  6918. (init): New function.
  6919. (BitfieldMessage): Rewritten.
  6920. (BitfieldMessage): New function(overload).
  6921. * src/RequestSlot.h
  6922. (operator=): Defined the function body here.
  6923. (operator==): Defined the function body here.
  6924. * src/RequestSlot.cc
  6925. (operator=): Removed.
  6926. (operator==): Removed.
  6927. To remove the dependency on the PeerMessage subclass from
  6928. PeerInteraction:
  6929. * src/PeerMessageFactory.h: New class.
  6930. * src/PeerMessageFactory.cc: New class.
  6931. * src/SimplePeerMessage.cc
  6932. (send): If invalidate is true then do nothing.
  6933. * src/PeerInteractionCommand.cc
  6934. (HandshakeMessage.h): Included.
  6935. (KeepAliveMessage.h): Included.
  6936. (ChokeMessage.h): Included.
  6937. (UnchokeMessage.h): Included.
  6938. (HaveMessage.h): Included.
  6939. (executeInternal): Call setNoCheck().
  6940. Removed setWriteCheckSocket(socket).
  6941. * src/PeerInteraction.h
  6942. (ChokeMessage.h): Removed.
  6943. (UnchokeMessage.h): Removed.
  6944. (InterestedMessage.h): Removed.
  6945. (NotInterestedMessage.h): Removed.
  6946. (HaveMessage.h): Removed.
  6947. (BitfieldMessage.h): Removed.
  6948. (RequestMessage.h): Removed.
  6949. (CancelMessage.h): Removed.
  6950. (PieceMessage.h): Removed.
  6951. (HandshakeMessage.h): Removed.
  6952. (KeepAliveMessage.h): Removed.
  6953. (PortMessage.h): Removed.
  6954. (HaveAllMessage.h): Removed.
  6955. (HaveNoneMessage.h): Removed.
  6956. (RejectMessage.h): Removed.
  6957. (AllowedFastMessage.h): Removed.
  6958. (SuggestPieceMessage.h): Removed.
  6959. (PeerMessageFactory.h): Included.
  6960. (PeerMessageHandle): Removed typedef of PeerMessageHandle.
  6961. (HandshakeMessageHandle): Removed typedef of HandshakeMessageHandle.
  6962. (PeerMessageFactory): New variable.
  6963. (createPeerMessage): Removed.
  6964. (createHandshakeMessage): Removed.
  6965. (setPeerMessageCommonProperty): Removed.
  6966. (addRequestSlot): New function.
  6967. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  6968. (getPeerMessageFactory): New function.
  6969. (createRequestMessage): Removed.
  6970. (createCancelMessage): Removed.
  6971. (createPieceMessage): Removed.
  6972. (createHaveMessage): Removed.
  6973. (createChokeMessage): Removed.
  6974. (createUnchokeMessage): Removed.
  6975. (createInterestedMessage): Removed.
  6976. (createNotInterestedMessage): Removed.
  6977. (createBitfieldMessage): Removed.
  6978. (createKeepAliveMessage): Removed.
  6979. (createHaveAllMessage): Removed.
  6980. (createHaveNoneMessage): Removed.
  6981. (createRejectMessage): Removed.
  6982. (createAllowedFastMessage): Removed.
  6983. * src/PeerInteraction.cc
  6984. (PeerInteraction): Allocate PeerMessageFactory here.
  6985. (~PeerInteraction): Deallocate PeerMessageFactory here.
  6986. (sendMessages): Use msg->isUploading() instead of msg->getId() ==
  6987. PieceMessage::ID.
  6988. (addMessage): Simplified by using PeerMessage::onPush().
  6989. (addRequestSlot): New function.
  6990. (rejectAllPieceMessageInQueue): Simplified by using
  6991. PeerMessage::onChoked().
  6992. (rejectPieceMessageInQueue): Simplified by using
  6993. PeerMessage::onCanceled().
  6994. (abortPiece): Simplified by using PeerMessage::abortPiece().
  6995. (receiveHandshake): Changed the return value type to PeerMessageHandle.
  6996. (createHandshakeMessage): Removed.
  6997. (createPeerMessage): Removed.
  6998. (sendHandshake): Call PeerMessageFactory::createHandshakeMessage().
  6999. (setPeerMessageCommonProperty): Removed.
  7000. (createRequestMessage): Removed.
  7001. (createCancelMessage): Removed.
  7002. (createPieceMessage): Removed.
  7003. (createHaveMessage): Removed.
  7004. (createChokeMessage): Removed.
  7005. (createUnchokeMessage): Removed.
  7006. (createInterestedMessage): Removed.
  7007. (createNotInterestedMessage): Removed.
  7008. (createBitfieldMessage): Removed.
  7009. (createKeepAliveMessage): Removed.
  7010. (createHaveAllMessage): Removed.
  7011. (createHaveNoneMessage): Removed.
  7012. (createRejectMessage): Removed.
  7013. (createAllowedFastMessage): Removed.
  7014. * src/PieceMessage.h
  7015. (createRejectMessage): New function.
  7016. (PieceMessage): Rewritten.
  7017. (onChoked): New function.
  7018. (onCanceled): New function.
  7019. * src/PieceMessage.cc
  7020. (send): If invalidate is true then do nothing, just return.
  7021. (createRejectMessage): New function.
  7022. (onChoked): New function.
  7023. (onCanceled): New function.
  7024. * src/RequestMessage.h
  7025. (RequestMessage): Rewritten.
  7026. (onPush): New function.
  7027. (onAbortPiece): New function.
  7028. * src/RequestMessage.cc
  7029. (onPush): New function.
  7030. (onAbortPiece): New function.
  7031. Update fd_set when a socket is added or deleted in order to improve
  7032. performance:
  7033. * src/DownloadEngine.h
  7034. (rfdset): New variable.
  7035. (wfdset): New variable.
  7036. (updateFdSet): New function.
  7037. * src/DownloadEngine.cc
  7038. (SetDescriptor::operator()): Use SockCmdMap::value_type.
  7039. (AccumulateActiveCommandUuid::operator()): Use SockCmdMap::value_type.
  7040. (waitData): Copy rfdset and wfdset.
  7041. (updateFdSet): New function.
  7042. (addSocket): Call updateFdSet.
  7043. (deleteSocket): Call updateFdSet.
  7044. 2006-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7045. To add the support for Metalink3.0 backward compatible links:
  7046. * src/Request.h
  7047. (SAFE_CHARS): Added '#'.
  7048. (METALINK_MARK): New definition.
  7049. * src/Request.cc
  7050. (parseUrl): Added the support for Metalink3.0 backward compatible
  7051. links.
  7052. etc
  7053. * src/PeerInteraction.cc
  7054. (MsgPushBack): Removed.
  7055. (sendMessages): Use STL copy and back_inserter.
  7056. (rejectAllPieceMessageInQueue): Use STL copy and back_inserter.
  7057. (rejectPieceMessageInQueue): Use STL copy and back_inserter.
  7058. * src/TorrentMan.h
  7059. (MAX_PEER_LIST_SIZE): Changed to 100 from 250.
  7060. 2006-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7061. * src/SharedHandle.h: New class.
  7062. To wrap Socket, Command, PeerMessage and Peer with SharedHandle:
  7063. * src/HttpResponseCommand.h
  7064. (HttpResponseCommand): Wrapped Socket.
  7065. * src/SocketCore.h
  7066. (operator==): New function.
  7067. (operator!=): New function.
  7068. (operator<): New function.
  7069. (getSockfd): New function.
  7070. (isOpen): New function.
  7071. (writeData): New function.
  7072. * src/SocketCore.cc
  7073. (operator==): New function.
  7074. (operator!=): New function.
  7075. (operator<): New function.
  7076. * src/AbstractCommand.h
  7077. (socket): Changed its type to SocketHandle.
  7078. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7079. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7080. (disableReadCheckSocket): New function.
  7081. (disableWriteCheckSocket): New function.
  7082. (readCheckTarget): Changed its type to SocketHandle.
  7083. (writeCheckTarget): Changed its type to SocketHandle.
  7084. (AbstractCommand): Replaced Socket with SocketHandle.
  7085. * src/AbstractCommand.cc
  7086. (AbstractCommand): Replaced Socket with SocketHandle.
  7087. (~AbstractCommand): Removed the deallocation for Socket object.
  7088. (disableReadCheckSocket): New function.
  7089. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7090. (disableWriteCheckSocket): New function.
  7091. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7092. * src/HttpDownloadCommand.cc
  7093. (DownloadCommand): Replaced Socket with SocketHandle.
  7094. * src/PeerAbstractCommand.h
  7095. (socket): Changed its type to SocketHandle.
  7096. (peer): Changed its type to PeerHandle.
  7097. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7098. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7099. (disableReadCheckSocket): New function.
  7100. (disableWriteCheckSocket): New function.
  7101. (readCheckTarget): Changed its type to SocketHandle.
  7102. (writeCheckTarget): Changed its type to SocketHandle.
  7103. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  7104. Replaced Peer with PeerHandle.
  7105. * src/HttpRequestCommand.cc
  7106. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7107. Use disableReadCheckSocket.
  7108. * src/PeerInitiateConnectionCommand.h
  7109. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7110. * src/PeerChokeCommand.cc
  7111. (UploadFaster::operator()): Replaced Peer with PeerHandle.
  7112. (DownloadFaster::operator()): Replaced Peer with PeerHandle.
  7113. (execute): Use PeerHandle.
  7114. * src/PeerConnection.h
  7115. (HandshakeMessage.h): Removed include of HandshakeMessage.h.
  7116. (socket): Changed its type to SocketHandle.
  7117. (PeerConnection): Replaced Socket with SocketHandle.
  7118. * src/PeerConnection.cc
  7119. (PeerConnection): Replaced Socket with SocketHandle.
  7120. * src/PeerInteractionCommand.h
  7121. (PeerInteractionCommand): Replaced socket with SocketHandle.
  7122. Replaced Peer with PeerHandle.
  7123. * src/PeerInteractionCommand.cc
  7124. (PeerInteractionCommand): Replaced Socket with SocketHandle.
  7125. Replaced Peer with PeerHandle.
  7126. (executeInternal): Use disableWriteCheckSocket.
  7127. Use HandshakeMessageHandle.
  7128. (receiveMessages): Use PeerMessageHandle.
  7129. (prepareForNextPeer): Use PeerHandle.
  7130. * src/HttpProxyRequestCommand.h
  7131. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7132. * src/HttpResponseCommand.cc
  7133. (HttpResponseCommand): Replaced Socket with SocketHandle.
  7134. * src/TorrentMan.cc
  7135. (nullPeer): Added external reference.
  7136. (~TorrentMan): Removed the deallocation of the elements of peers.
  7137. (addPeer): Rewritten.
  7138. (isPeerAvailable): Use nullPeer.
  7139. (deleteOldpeers): Replaced with deleteErrorPeer.
  7140. (deleteErrorPeer): New function.
  7141. (getPeer): Use PeerHandle and nullPeer.
  7142. (hasMissingPiece): Replaced Peer with PeerHandle.
  7143. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7144. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7145. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7146. (getMissingPiece): Replaced Peer with PeerHandle.
  7147. * src/FtpNegotiateCommand.cc
  7148. (FtpNegotiationCommand): Replaced Peer with PeerHandle.
  7149. (~FtpNegotiationCommand): Removed the deallocation of Sockets.
  7150. (recvGreeting): Use disableWriteCheckSocket.
  7151. (recvPasv): Removed the allocation of Socket.
  7152. Use disableReadCheckSocket.
  7153. (sendRestPasv): Use disableWriteCheckSocket.
  7154. (recvRetr): Changed assertion.
  7155. * src/PeerInteraction.h
  7156. (SharedHandle.h): Included SharedHandle.h.
  7157. (PeerMessageHandle): New type definition.
  7158. (HandshakeMessageHandle): New type definition.
  7159. (MessageQueue): Changed. Now its element is of type PeerMessageHandle.
  7160. (peer): Changed its type to PeerHandle.
  7161. (createHandshakeMessage): Replaced HandshakeMessage with
  7162. HandshakeMessageHandle.
  7163. (createPeerMessage): Replaced PeerMessageHandle with PeerMessage.
  7164. (PeerInteraction): Replaced Peer with PeerHandle.
  7165. Replaced Socket with SocketHandle.
  7166. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  7167. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  7168. (receiveHandshake): Replaced HandshakeMessage with
  7169. HandshakeMessageHandle.
  7170. * src/PeerInteraction.cc
  7171. (PeerInteraction): Replaced Peer with PeerHandle.
  7172. Replaced Socket with SocketHandle.
  7173. (~PeerInteraction): Removed the deallocation of the elements of
  7174. messageQueue.
  7175. (MsgPushBack::operator()): Replaced PeerMessage with PeerMessageHandle.
  7176. (isSendingMessageInProgress): Replaced PeerMessage with
  7177. PeerMessageHandle.
  7178. (sendMessages): Use PeerMessageHandle. Removed try-catch block.
  7179. (addMessage): Replaced PeerMessage with PeerMessageHandle.
  7180. (rejectAllPieceMessageInQueue): Use PeerMessageHandle.
  7181. (rejectPieceMessageInQueue): Use PeerMessageHandle.
  7182. (abortPiece): Use PeerMessageHandle.
  7183. (receiveHandshake): Replaced HandshakeMessage with
  7184. HandshakeMessageHandle. Removed try-catch block.
  7185. (createHandshakeMessage): Replaced HandshakeMessage with
  7186. HandshakeMessageHandle.
  7187. (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
  7188. Removed try-catch block.
  7189. (createPeerMessage): Replaced PeerMessage with PeerMessageHandle.
  7190. * src/HttpProxyResponseCommand.cc
  7191. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7192. * src/FtpTunnelResponseCommand.h
  7193. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7194. * src/HttpConnection.cc
  7195. (HttpConnection): Replaced Socket with SocketHandle.
  7196. * src/PeerAbstractCommand.cc
  7197. (PeerAbstractCommand): Replaced Socket with SocketHandle.
  7198. (~PeerAbstractCommand): Removed the deallocation of socket.
  7199. Use disableReadCheckSocket, disableWriteCheckSocket.
  7200. (disableReadCheckSocket): New function.
  7201. (setReadCheckSocket): Replaced Socket with SocketHandle.
  7202. (disableWriteCheckSocket): New function.
  7203. (setWriteCheckSocket): Replaced Socket with SocketHandle.
  7204. * src/InitiateConnectionCommandFactory.h: Corrected indentation.
  7205. * src/FtpTunnelRequestCommand.cc
  7206. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7207. (~FtpTunnelRequestCommand): Corrected indentation.
  7208. * src/DownloadCommand.h
  7209. (DownloadCommand): Replaced Socket with SocketHandle.
  7210. * src/PeerListenCommand.cc
  7211. (PeerListenCommand): Removed the initialization of socket.
  7212. (~PeerListenCommand): Removed the deallocation of socket.
  7213. (bindPort): Use SocketHandle.
  7214. (execute): Use SocketHandle and PeerHandle.
  7215. * src/FtpDowndloadCommand.cc
  7216. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7217. (~FtpDownloadCommand): Removed the deallocation of ctrlSocket.
  7218. * src/main.cc
  7219. (main): Corrected indentation.
  7220. * src/HttpInitiateConnectionCommand.cc
  7221. (HttpInitiateConnectionCommand): Replaced Socket with SocketHandle.
  7222. (executeInternal): Removed the allocation of socket.
  7223. * src/HttpRequestCommand.h
  7224. (HttpRequestCommand): Replaced Socket with SocketHandle.
  7225. * src/FtpNegotiationCommand.h
  7226. (dataSocket): Changed its type to SocketHandle.
  7227. (serverSocket): Changed its type to SocketHandle.
  7228. (FtpNegotiationCommand): Replaced Socket with SocketHandle.
  7229. * src/TorrentMan.h
  7230. (MAX_PEER_UPDATE): Removed.
  7231. (MAX_PEERS): New definition.
  7232. (Peers): The element is now of type PeerHandle.
  7233. (addPeer): Replaced Peer with PeerHandle. Removed 'duplicate' argument.
  7234. (getPeer): Replaced Peer with PeerHandle.
  7235. (deleteOldErrorPeers): Removed.
  7236. (deleteErrorPeer): New function.
  7237. (hasMissingPiece): Replaced Peer with PeerHandle.
  7238. (getMissingPieceIndex): Replaced Peer with PeerHandle.
  7239. (getMissingPiece): Replaced Peer with PeerHandle.
  7240. (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
  7241. (getMissingFastPiece): Replaced Peer with PeerHandle.
  7242. (addActivePeer): Replaced Peer with PeerHandle.
  7243. (deleteActivePeer): Replaced Peer with PeerHandle.
  7244. Added a check for the return value of find.
  7245. * src/FtpTunnelResponseCommand.cc
  7246. (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
  7247. * src/FtpInitiateConnectionCommand.cc
  7248. (executeInternal): Removed the allocation of socket.
  7249. * src/DownloadEngine.h
  7250. (Sockets): An element is now of type SocketHandle.
  7251. (SockCmdMap): A key is of type SocketHandle, a value is of type int.
  7252. (CommandUuids): New type definition.
  7253. (rsockets): Changed its type to SockCmdMap.
  7254. (wsockets): Changed its type to SockCmdMap.
  7255. (addSocket): Rewritten.
  7256. (deleteSocket): Rewritten.
  7257. (addSocketForReadCheck): Rewritten.
  7258. (deleteSocketForReadCheck): Rewritten.
  7259. (addSocketForWriteCheck): Rewritten.
  7260. (deleteSocketForWriteCheck): Rewritten.
  7261. (PairFind): New template class.
  7262. * src/HttpDownloadCommand.h
  7263. (HttpDownloadCommand): Replaced Socket with SocketHandle.
  7264. * src/FtpConnection.cc
  7265. (FtpConnection): Replaced Socket with SocketHandle.
  7266. (sendPort): Removed the allocation of serverSocket. Removed try-catch
  7267. block.
  7268. * src/InitiateConnectionCommandFactory.cc
  7269. (DlAbortEx.h): Included DlAbortEx.h.
  7270. (createInitiateConnectionCommand): Throw exception if the protocol of
  7271. requested URI is not supported.
  7272. * src/Peer.cc
  7273. (nullPeer): Changed its type to PeerHandle.
  7274. (operator==): New function.
  7275. (operator!=): New function.
  7276. * src/Peer.h
  7277. (SharedHandle.h): Included SharedHandle.h.
  7278. (operator==): New function.
  7279. (operator!=): New function.
  7280. (Peer): Added the default constructor.
  7281. Use resetStatus() to initialize member variables.
  7282. (nullPeer): Removed.
  7283. * src/TrackerUpdateCommand.cc
  7284. (execute): Brushed up using SharedHandle. Replaced MAX_PEER_UPDATE
  7285. with MIN_PEERS.
  7286. * src/PeerListenCommand.h
  7287. (socket): Changed its type to SocketHandle.
  7288. * src/Command.h
  7289. (CommandUuid): New type definition.
  7290. (uuid): New variable.
  7291. (uuidGen): New variable.
  7292. (Command): Added the initialization of uuid.
  7293. (getUuid): New function.
  7294. * src/Socket.h
  7295. (Socket): Removed.
  7296. (SocketHandle): New type definition.
  7297. * src/DownloadEngine.h
  7298. (FindCommand): New function object.
  7299. (run): The portion of socket check was rewritten.
  7300. (SetDescriptor): New function object.
  7301. (AccumulateActiveCommandUuid): New function object.
  7302. (waitData): Rewritten.
  7303. (addSocket): Rewritten.
  7304. (deleteSocket): Rewritten.
  7305. (addSocketForReadCheck): Rewritten.
  7306. (addSocketForWriteCheck): Rewritten.
  7307. (deleteSocketForReadCheck): Rewritten.
  7308. (deleteSocketForWriteCheck): Rewritten.
  7309. * src/HttpProxyResponseCommand.h
  7310. (HttpProxyResponseCommand): Replaced Socket with SocketHandle.
  7311. * src/HttpConnection.h
  7312. (socket): Changed its type to SocketHandle.
  7313. (HttpConnection): Replaced Socket with SocketHandle.
  7314. * src/PeerInitiateConnectionCommand.cc
  7315. (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
  7316. (executeInternal): Removed the allocation of socket.
  7317. (prepareForNextPeer): Use PeerHandle.
  7318. * src/PeerMessage.h
  7319. (peer): Changed its type to PeerHandle.
  7320. (getPeer): Replaced Peer with PeerHandle.
  7321. (setPeer): Replaced Peer with PeerHandle.
  7322. * src/DownloadCommand.cc
  7323. (DownloadCommand): Replaced Socket with SocketHandle.
  7324. * src/FtpConnection.h
  7325. (socket): Changed its type to SocketHandle.
  7326. (FtpConnection): Replaced Socket with SocketHandle.
  7327. (sendPort); Replaced Socket with SocketHandle.
  7328. * src/FtpDowndloadCommand.h
  7329. (ctrlSocket): Changed its type to SocketHandle.
  7330. (FtpDownloadCommand): Replaced Socket with SocketHandle.
  7331. * src/HttpProxyRequestCommand.cc
  7332. (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
  7333. * src/FtpTunnelRequestCommand.h
  7334. (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
  7335. etc
  7336. * src/PeerChokeCommand.h
  7337. (setAllPeerChoked): Removed.
  7338. (setAllPeerResetDelta): Removed.
  7339. * src/PeerChokeCommand.cc
  7340. (setAllPeerChoked): Removed.
  7341. (ChokePeer): New function object.
  7342. (setAllPeerResetDelta): Removed.
  7343. (ResetDelta): New function object.
  7344. (orderByDownloadRate): Fixed a bug: use DowloadFaster, not UploadFaster
  7345. (execute): Show download speed when the local node is a seeder.
  7346. setAllPeerChoked and setAllPeerResetDelta were rewritten
  7347. using STL.
  7348. * src/TrackerWatcherCommand.h
  7349. (MIN_PEERS): Removed.
  7350. * src/TorrentMan.cc
  7351. (getPeer): Replaced MAX_PEER_UPDATE with MIN_PEERS.
  7352. 2006-07-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7353. To fix the bug that .aria2 file is not saved if downloading is stopped
  7354. by the errors:it results that aria2 can not resume downloading:
  7355. * src/main.cc
  7356. (normalDownload): Added the call to save().
  7357. (main): Added the deletion of the elements in 'reserved'.
  7358. To fix log:
  7359. * src/PeerInteraction.cc
  7360. (receiveHandshake): Fixed log.
  7361. 2006-07-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7362. To improve download performance in BitTorrent:
  7363. * src/TorrentMan.cc
  7364. (getPeer): Check the number of connections. Return nullPeer if
  7365. it is greater than MAX_PEER_UPDATE.
  7366. This code was originally here, but was removed in 0.5.1.
  7367. 2006-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7368. To improve the conditional compilation:
  7369. * src/MultiDiskWriter.h:
  7370. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7371. * src/MultiDiskWriter.cc:
  7372. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7373. * src/Util.h:
  7374. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7375. Added ENABLE_BITTORRENT around computeFastSet().
  7376. * src/Util.cc:
  7377. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7378. Added ENABLE_BITTORRENT around computeFastSet().
  7379. * src/messageDigest.h:
  7380. Replaced ENABLE_BITTORRENT with ENABLE_SSL.
  7381. * src/ShaVisitor.h:
  7382. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7383. * src/ShaVisitor.cc:
  7384. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7385. * src/main.cc:
  7386. Added ENABLE_BITTORRENT around includes and blocks related to
  7387. BitTorrent.
  7388. Added ENABLE_MESSAGE_DIGEST to skip checksum checking when the message
  7389. digest support is not available.
  7390. * src/AbstractDiskWriter.h:
  7391. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7392. * src/AbstractDiskWriter.cc:
  7393. Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
  7394. * src/MetalinkEntry.cc
  7395. (check): Added ENABLE_MESSAGE_DIGEST. Return true if the message digest
  7396. support is not available.
  7397. To add command-line options for Metalink:
  7398. * src/main.cc:
  7399. Added metalink-version, metalink-language, metalink-os,
  7400. follow-metalink.
  7401. To use EXIT_SUCCESS and EXIT_FAILURE with exit():
  7402. * src/main.cc: Use these definition.
  7403. * Release 0.6.0
  7404. 2006-07-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7405. To add Metalink support(http/ftp only):
  7406. * src/AbstractCommand.h
  7407. (tryReserved): New function.
  7408. * src/AbstractCommand.cc
  7409. (execute): Call tryReserved().
  7410. (tryReserved): New function.
  7411. * src/Request.h
  7412. (Requests): New type definition.
  7413. * src/SegmentMan.h
  7414. (reserved): New variable.
  7415. * src/Util.h
  7416. (fileChecksum): New function.
  7417. (toUpper): New function.
  7418. (toLower): New function.
  7419. * src/Util.cc
  7420. (messageDigest.h): Included.
  7421. (trim): Trim \r\n\t.
  7422. (fileChecksum): New function.
  7423. (toUpper): New function.
  7424. (toLower): New function.
  7425. * src/main.cc
  7426. (normalDownload): New function.
  7427. (main): Added 2 command-line options: metalink-file,
  7428. metalink-connection. Their usage has not been written yet.
  7429. * src/MetalinkProcessor.h: New class.
  7430. * src/Xml2MetalinkProcessor.h: New class.
  7431. * src/Xml2MetalinkProcessor.cc: New class.
  7432. * src/MetalinkEntry.h: New class.
  7433. * src/MetalinkEntry.cc: New class.
  7434. * src/MetalinkResource.h: New class.
  7435. * src/MetalinkResource.cc: New class.
  7436. To add md5 message digest checking:
  7437. * src/messageDigest.h: Rewritten.
  7438. * src/MultiDiskWriter.cc: Updated according to the changes in
  7439. messageDigest.h.
  7440. * src/ShaVisitor.cc: Updated according to the changes in
  7441. messageDigest.h.
  7442. * src/Util.cc: Updated according to the changes in messageDigest.h.
  7443. * src/AbstractDiskWriter.cc: Updated according to the changes in
  7444. messageDigest.h.
  7445. To fix a bug that causes segfault when the payload length in peer
  7446. message is less than 0:
  7447. * src/PeerConnection.cc:
  7448. (receiveMessage): Fixed the bug.
  7449. * src/PeerMessageUtil.cc
  7450. (checkLength): Throw an exception if length is less than or equals to
  7451. 0.
  7452. To add new interfaces to Base64 encoding/decoding:
  7453. * src/Base64.h
  7454. (part_encode): Changed the method signature.
  7455. (encode): New function(overload).
  7456. (decode): New function(overload).
  7457. * src/Base64.cc
  7458. (part_encode): Rewritten.
  7459. (encode): Rewritten.
  7460. (encode): New function(overload).
  7461. To prevent a peer to download same piece if there is an error in
  7462. checksum:
  7463. * src/PieceMessage.cc
  7464. (receivedAction): Call peerInteraction->abortPiece().
  7465. 2006-06-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7466. To fix the bug that causes same have message is sent many times to
  7467. a single peer.
  7468. * src/Time.cc
  7469. (isNewer): Use Util::difftv().
  7470. * src/Util.cc
  7471. (difftv): Added a cast to (long long int).
  7472. * src/TorrentMan.cc
  7473. (advertisePiece): Use push_front.
  7474. (getAdvertisedPieceIndexes): A performance improvement was made.
  7475. To fix the bug that sends tracker requests without a sleep interval
  7476. when the number of connections is less than 15.
  7477. * src/TrackerWatcherCommand.cc
  7478. (execute): Now the number of connections is not a factor to decide
  7479. whether or not a tracker request should be sent or not.
  7480. * src/Time.h
  7481. (setTimeInSec): New function.
  7482. * src/Time.cc
  7483. (setTimeInSec): New function.
  7484. etc.
  7485. * src/ChokeMessage.cc
  7486. (receivedAction): Removed peer->snubbing = false
  7487. * src/PeerConnection.h
  7488. (receiveHandshake): Updated doc.
  7489. * src/TorrentMan.h
  7490. (getAdvertisedPieceIndexes): Updated the method signature.
  7491. * src/TorrentMan.cc
  7492. (getAdvertisedPieceIndexes): Updated the method signature.
  7493. * src/Time.h
  7494. (getTimeInMicros): Added a cast to (long long int).
  7495. (getTimeInMillis): Added a cast to (long long int).
  7496. * Release 0.5.2
  7497. 2006-06-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7498. To make a listening socket non-block:
  7499. * src/SocketCore.h
  7500. (setNonBlockingMode): New function.
  7501. * src/SocketCore.cc
  7502. (setNonBlockingMode): New function.
  7503. (beginListen): Added a call to setNonBlockingMode().
  7504. (acceptConnection): Call setNonBlockingMode().
  7505. (setBlockingMode): Updated.
  7506. To handle tracker's NAT-checking:
  7507. * src/PeerConnection.cc
  7508. (receiveHandshake): 'msg' param is filled with received data and
  7509. its length is assigned to 'length' param, even if all handshake
  7510. message is not yet received.
  7511. * src/PeerInteractionCommand.cc
  7512. (executeInternal): Use peerInteraction->receiveHandshake(true) when
  7513. a new peer connects to localhost.
  7514. A call to peerInteraction->sendHandshake() was removed because
  7515. it is called from peerInteraction->receiveHandshake(true).
  7516. * src/PeerInteraction.h
  7517. (quickReplied): New variable.
  7518. (receiveHandshake): Added an argument.
  7519. * src/PeerInteraction.cc
  7520. (PeerInteraction): Added the initialization of quickReplied.
  7521. (receiveHandshake): Send handshake message as soon as the info hash
  7522. in a handshake message from a peer is correct.
  7523. To change the random part of peer id and key parameter:
  7524. * src/TorrentMan.h
  7525. (key): New variable.
  7526. * src/TorrentMan.cc
  7527. (setupInternal1): Use Util::randomAlpha() to generate random part
  7528. of peer id, which is now "-aria2-"+13 alphabet characters([A-Za-z]).
  7529. key is also generated by Util::randomAlpha() and it is now 8 character
  7530. long.
  7531. * src/Util.h
  7532. (randomAlpha): New function.
  7533. * src/Util.cc
  7534. (randomAlpha): New function.
  7535. * src/TrackerWatcherCommand.cc
  7536. (execute): In a tracker request: Use torrentMan->key as key parameter.
  7537. Added no_peer_id=1.
  7538. Set snubbing flag to false when a choke message is received from a
  7539. snubbed peer.
  7540. * src/ChokeMessage.cc
  7541. (receivedAction): Set snubbing flag to false.
  7542. 2006-06-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7543. * src/TorrentMan.cc (setupInternal1): Fixed peerId generation bug.
  7544. * src/SimpleLogger.h (writeHeader): New function.
  7545. * src/SimpleLogger.cc (writeHeader): New function.
  7546. (writeLog): Fixed the bug that causes segfaults if exception message
  7547. contains an unescaped "%" character.
  7548. * src/TrackerWatcherCommand.cc (execute): Added a short sleep
  7549. when a tracker request fails.
  7550. * src/Request.cc (parseUrl): Query string is now handled properly.
  7551. * Release 0.5.1
  7552. 2006-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7553. To add Time class which represents a specific instant in time and
  7554. its precision is microseconds. Time checking procedures were rewritten
  7555. using this object.
  7556. * src/Time.h: New class.
  7557. * src/Time.cc: New class.
  7558. * src/AbstractCommand.h
  7559. (updateCheckPoint): Removed.
  7560. (isTimeoutDetected): Removed.
  7561. (checkPoint): Changed the type to Time.
  7562. (timeout): New variable.
  7563. (setTimeout): New function.
  7564. * src/AbstractCommand.cc
  7565. (AbstractCommand): Removed the initialization of checkPoint.
  7566. Added the initialization of timeout.
  7567. (updateCheckPoint): Removed.
  7568. (isTimeoutDetected): Removed.
  7569. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  7570. * src/PeerChokeCommand.h
  7571. (checkPoint): Changed the type to Time.
  7572. * src/PeerChokeCommand.cc
  7573. (PeerChokeCommand): Removed the initialization of checkPoint.
  7574. (execute): Rewritten using Time object.
  7575. * src/TrackerWatcherCommand.h
  7576. (checkPoint): Changed the type to Time.
  7577. * src/TrackerWatcherCommand.cc
  7578. (TrackerWatcherCommand): Removed the initialization of checkPoint.
  7579. (execute): Rewritten.
  7580. * src/ConsoleDownloadEngine.h
  7581. (cp): Changed the type to Time.
  7582. (startup): Changed the type to Time.
  7583. * src/ConsoleDownloadEngine.cc
  7584. (initStatistics): Use cp.reset(), startup.reset().
  7585. (calculateStatistics): Rewritten using Time object.
  7586. * src/PeerAbstractCommand.h
  7587. (updateCheckPoint): Removed.
  7588. (isTimeoutDetected): Removed.
  7589. (checkPoint): Changed the type to Time.
  7590. * src/PeerAbstractCommand.cc
  7591. (PeerAbstractCommand): Removed the initialization of checkPoint.
  7592. (updateCheckPoint): Removed.
  7593. (isTimeoutDetected): Removed.
  7594. (execute): Use checkPoint.reset() and checkPoint.elapsed().
  7595. * src/PeerInteractionCommand.cc
  7596. (PeerInteractionCommand): Removed the initializations of struct
  7597. timeval variables.
  7598. * src/PeerInteractionCommand.h
  7599. (keepAliveCheckPoint): Changed the type to Time.
  7600. (chokeCheckPoint): Changed the type to Time.
  7601. (freqCheckPoint): Changed the type to Time.
  7602. (haveCheckTime): Changed the type to Time.
  7603. * src/PeerInteractionCommand.cc
  7604. (executeInternal): Rewritten using Time object.
  7605. (detectMessageFlooding): Rewritten using Time object.
  7606. (checkLongTimePeerChoking): Rewritten using Time object.
  7607. (sendKeepAlive): Rewritten using Time object.
  7608. (checkHave): Rewritten using Time object.
  7609. * src/SleepCommand.h
  7610. (checkPoint): Changed the type to Time.
  7611. * src/SleepCommand.cc
  7612. (SleepCommand): Removed the initialization of checkPoint.
  7613. (execute): Rewritten using Time object.
  7614. * src/TorrentAutoSaveCommand.h
  7615. (checkPoint): Changed the type to Time.
  7616. * src/TorrentAutoSaveCommand.cc
  7617. (TorrentAutoSaveCommand): Removed the initialization of checkPoint.
  7618. (execute): Rewritten.
  7619. * src/DownloadCommand.h
  7620. (sw): Changed the type to Time.
  7621. * src/DownloadCommand.cc
  7622. (DownloadCommand): Removed the initialization of sw.
  7623. (executeInternal): Rewritten.
  7624. * src/RequestSlot.h
  7625. (dispatchedTime): Changed the type to Time.
  7626. * src/RequestSlot.cc
  7627. (RequestSlot): Removed the call to setDispatchedTime().
  7628. (setDispatchedTime): Rewirtten.
  7629. (isTimeout): Rewritten.
  7630. (getLatencyInMillis): Rewritten.
  7631. * src/TorrentDownloadEngine.h
  7632. (cp): Changed the type to Time[2].
  7633. (startup): Changed the type to Time.
  7634. * src/TorrentDownloadEngine.cc
  7635. (initStatistics): Rewritten.
  7636. (calculateStatistics): Rewritten.
  7637. * src/DownloadEngine.cc
  7638. (run): Rewritten.
  7639. To detect all attempts to connect to the tracker are failed:
  7640. * src/AbstractCommand.cc
  7641. (execute): Increment e->segmentMan->errors if a command aborted.
  7642. * src/SegmentMan.h
  7643. (errors): New variable.
  7644. * src/SegmentMan.cc
  7645. (SegmentMan): Added the initialization of errors.
  7646. (init): Added the initialization of errors.
  7647. * src/TrackerWatcherCommand.cc
  7648. (execute): If e->segmentMan->errors > 0 then assume that the tracker
  7649. request was failed.
  7650. To handle snubbed peers:
  7651. * src/PeerChokeCommand.cc
  7652. (optUnchokingPeer): Snubbed peers don't get unchoked.
  7653. (execute): Snubbed peers don't get unchoked.
  7654. * src/PeerInteraction.h
  7655. (REQUEST_TIME_OUT): Changed the value from 120 to 60.
  7656. * src/PeerInteraction.cc
  7657. (checkRequestSlot): A peer get marked as "snubbed" if it doesn't send
  7658. back the requested 16k block in 60 seconds.
  7659. * src/PieceMessage.cc
  7660. (receivedAction): A peer's snubbed state is cleard if it sends
  7661. the requested 16k block in 60 seconds.
  7662. * src/Peer.h
  7663. (snubbing): New variable.
  7664. * src/Peer.cc
  7665. (resetStatus): Added snubbed = false.
  7666. To fix the bug that causes have message is not sent:
  7667. * src/PeerInteractionCommand.cc
  7668. (~PeerInteractionCommand): Removed e->torrentMan->unadvertisePiece().
  7669. (FLOODING_CHECK_INTERVAL): New definition(temporal).
  7670. (detectMessageFlooding): Use FLOODING_CHECK_INTERVAL.
  7671. * src/TorrentMan.h
  7672. (HaveEntry): New class.
  7673. (advertisePiece): Rewritten.
  7674. (getAdvertisedPieceIndexes): Rewritten.
  7675. (Haves): Changed the type.
  7676. (getAdvertisedPieceIndexes): Added an argument.
  7677. Others:
  7678. * src/TorrentMan.h
  7679. (DEFAULT_ANNOUNCE_INTERVAL): Changed the value to 1800.
  7680. (DEFAULT_ANNOUNCE_MIN_INTERVAL): Changed the value to 1800.
  7681. * src/TorrentMan.cc
  7682. (getPeer): Don't check the number of connections here.
  7683. (setupInternal1): Changed peerId.
  7684. * src/PeerInteractionCommand.h
  7685. (KEEP_ALIVE_INTERVAL): New definition.
  7686. (sendKeepAlive): Use KEEP_ALIVE_INTERVAL.
  7687. * src/main.cc
  7688. (main): SA_ONESHOT was replaced with SA_RESETHAND.
  7689. * src/DownloadEngine.h: Removed unnecessary header includes.
  7690. 2006-05-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7691. To fix the bug that causes segfaults if a tracker returns a zero-length
  7692. list as "peers":
  7693. * src/TrackerUpdateCommand.cc
  7694. (execute): Added a check to see wether the type of peers is Data*.
  7695. 2006-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7696. * Release 0.5.0
  7697. To fix compile issue with gcc3:
  7698. * src/CancelMessage.h
  7699. (ID): Renamed as ID_t
  7700. (ID_t): New enum.
  7701. * src/RejectMessage.h
  7702. (ID): Renamed as ID_t
  7703. (ID_t): New enum.
  7704. * src/SuggestPieceMessage.h
  7705. (ID): Renamed as ID_t
  7706. (ID_t): New enum.
  7707. * src/AllowedFastMessage.h
  7708. (ID): Renamed as ID_t
  7709. (ID_t): New enum.
  7710. * src/PortMessage.h
  7711. (ID): Renamed as ID_t
  7712. (ID_t): New enum.
  7713. * src/HaveNoneMessage.h
  7714. (ID): Renamed as ID_t
  7715. (ID_t): New enum.
  7716. * src/KeepAliveMessage.h
  7717. (ID): Renamed as ID_t
  7718. (ID_t): New enum.
  7719. * src/HaveAllMessage.h
  7720. (ID): Renamed as ID_t
  7721. (ID_t): New enum.
  7722. * src/UnchokeMessage.h
  7723. (ID): Renamed as ID_t
  7724. (ID_t): New enum.
  7725. * src/BitfieldMessage.h
  7726. (ID): Renamed as ID_t
  7727. (ID_t): New enum.
  7728. * src/PieceMessage.h
  7729. (ID): Renamed as ID_t
  7730. (ID_t): New enum.
  7731. * src/RequestMessage.h
  7732. (ID): Renamed as ID_t
  7733. (ID_t): New enum.
  7734. * src/NotInterestedMessage.h
  7735. (ID): Renamed as ID_t
  7736. (ID_t): New enum.
  7737. * src/ChokeMessage.h
  7738. (ID): Renamed as ID_t
  7739. (ID_t): New enum.
  7740. * src/InterestedMessage.h
  7741. (ID): Renamed as ID_t
  7742. (ID_t): New enum.
  7743. * src/HaveMessage.h
  7744. (ID): Renamed as ID_t
  7745. (ID_t): New enum.
  7746. 2006-05-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7747. * src/PeerAbstractCommand.h
  7748. (beforeSocketCheck): Removed.
  7749. * src/PeerAbstractCommand.cc
  7750. Modified in order to call executeInternal() even if socket check
  7751. and upload limit check fail.
  7752. * src/PeerInteractionCommand.h
  7753. (keepAlive): Removed.
  7754. (sendKeepAlive): New function.
  7755. (checkHave): New function.
  7756. (beforeSocketCheck): Removed.
  7757. * src/PeerInteractionCommand.cc
  7758. (executeInternal): Use peerInteraction->checkRequestSlot(). Added
  7759. calls to checkHave() and sendKeepAlive().
  7760. (keepAlive): Renamed to sendKeepAlive().
  7761. (sendKeepAlive): New function.
  7762. (beforeSocketCheck): Removed.
  7763. (checkHave): New function.
  7764. * src/BitfieldMan.cc
  7765. (getMissingIndex): Don't call getMissingIndexRandomly() if max is 0.
  7766. (getMissingUnusedIndex): Don't call getMissingIndexRandomly() if max is
  7767. 0.
  7768. (getMissingIndex): Dont't call getMissingIndexRandomly() if max is 0.
  7769. * src/TorrentMan.h
  7770. (UsedPieces): Removed.
  7771. (Pieces): New type definition.
  7772. * src/Piece.h: Updated doc.
  7773. * src/Peer.h
  7774. (totalLength): Removed.
  7775. * src/Peer.cc
  7776. (updateLatency): Fixed the latency calculation.
  7777. * src/TorrentMan.cc
  7778. (addPeer): Call deleteOldErrorPeers() only if peers.size() is higher
  7779. than or equal to MAX_PEER_LIST_SIZE.
  7780. If duplicate is false and peer.size() >= MAX_PEER_LIST_SIZE,
  7781. then return false.
  7782. (deleteOldErrorPeers): Rewritten.
  7783. (deleteUsedPiece): Fixed the miss use of STL remove.
  7784. * src/PeerInteraction.h
  7785. (Pieces): Removed.
  7786. (deleteTimeoutRequestSlot): Removed.
  7787. (deleteCompletedRequestSlot): Removed.
  7788. (checkRequestSlot): New function.
  7789. * src/PeerInteraction.cc
  7790. (deleteTimeoutRequestSlot): Merged to checkRequestSlot().
  7791. (deleteCompletedRequestSlot): Merged to checkRequestSlot().
  7792. (checkRequestSlot): New function.
  7793. * src/DownloadEngine.cc
  7794. (run): Clear activeSockets before calling waitData().
  7795. (waitData): Removed a call to activeSockets.clear().
  7796. 2006-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7797. To attempt to handle EINTR:
  7798. * src/SocketCore.cc
  7799. (isReadable): Added EINTR handling.
  7800. (isWritable): Added EINTR handling.
  7801. To improve the performance:
  7802. * src/AbstractCommand.cc
  7803. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  7804. * src/PeerInteractionCommand.h
  7805. (receiveMessage): Renamed as receiveMessages().
  7806. (receiveMessages): New function.
  7807. * src/PeerInteractionCommand.cc
  7808. (executeInternal): receiveMessage loop is moved to new receiveMessages
  7809. () function. detectMessageFlooding() is moved here.
  7810. (detectMessageFlooding): Use Util::difftvsec() instead of Util::difftv
  7811. (). The flooding detection for have message is comment out.
  7812. (checkLongTimePeerChoking): Use Util::difftvsec() instead of
  7813. Util::difftv().
  7814. (receiveMessage): Renamed as receiveMessages().
  7815. (receiveMessages): New function.
  7816. (keepAlive): Use Util::difftvsec() instead of Util::difftv().
  7817. (beforeSocketCheck): Commented out checkLongTimePeerChoking().
  7818. * src/SleepCommand.cc
  7819. (execute): Use Util::difftvsec() instead of Util::difftv().
  7820. * src/BitfieldMan.h
  7821. (getNthBitIndex): New function.
  7822. (hasMissingPiece): New function.
  7823. (getAllMissingIndexes): New function.
  7824. * src/BitfieldMan.cc
  7825. (countSetBit): Rewritten.
  7826. (getNthBitIndex): New function.
  7827. (getMissingIndexRandomly): Rewritten.
  7828. (hasMissingPiece): New function.
  7829. (getAllMissingIndexes): New function.
  7830. * src/TorrentMan.cc
  7831. (hasMissingPiece): New function.
  7832. (deleteUsedPiece): Rewritten using STL.
  7833. * src/PeerInteraction.cc
  7834. (getNewPieceAndSendInterest): Use TorrentMan::hasMissingPiece(), which
  7835. is a little bit faster then TorrentMan::getMissingPieceIndex().
  7836. (addRequests): Updated the number of pending requests.
  7837. * src/PeerAbstractCommand.cc
  7838. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  7839. (execute): Returns true if TorrentMan::isHalt() is true.
  7840. Corrected the condition of upload limit checking.
  7841. * src/Util.h
  7842. (countBit): New function.
  7843. * src/Util.cc
  7844. (nbits): New variable.
  7845. (countBit): New function.
  7846. * src/DownloadEngine.h
  7847. (SockCmdMap): New type definition.
  7848. (waitData): Added an argument.
  7849. (addSocket): Added an argument.
  7850. (addSocketForReadCheck): Added an argument.
  7851. (addSocketForWriteCheck): Added an argument.
  7852. * src/DownloadEngine.cc
  7853. (run): Executes only commands whose sockets are ready to read or write.
  7854. All commands are executed in every 1 second.
  7855. (waitData): Calls select() again if it returned
  7856. EINTR.
  7857. (addSocket): Saves socket and command object pair to the map.
  7858. (deleteSocket): Deletes socket and command object pair from the map.
  7859. (addSocketForReadCheck): Added an argument.
  7860. (addSocketForWriteCheck): Added an argument.
  7861. * src/DownloadCommand.cc
  7862. (executeInternal): Use Util::difftvsec() instead of Util::difftv().
  7863. To send "event=stopped" to the tracker when the application finishes:
  7864. * src/PeerChokeCommand.h
  7865. (checkPoint): New variable.
  7866. * src/PeerChokeCommand.cc
  7867. (PeerChokeCommand): Added the initialization of checkPoint.
  7868. (execute): The interval check is now done by checkPoint, not
  7869. SleepCommand. Return true if TorrentMan::isHalt() is true.
  7870. * src/TorrentMan.h
  7871. (halt): New function.
  7872. (hasMissingPiece): New function.
  7873. (isHalt): New function.
  7874. (setHalt): New function.
  7875. * src/TorrentMan.cc
  7876. (TorrentMan): Added the initialization of halt.
  7877. * src/TorrentAutoSaveCommand.h
  7878. (checkPoint): New variable.
  7879. * src/PeerListenCommand.cc
  7880. (execute): Returns true if TorrentMan::isHalt() is true.
  7881. * src/main.cc
  7882. (setSignalHander): Added flags argument.
  7883. (torrentHandler): Just calls TorrentMan::setHalt(true) and returns.
  7884. (main): Set SA_ONESHOT flag of the signal hander of SIGINT and SIGTERM.
  7885. Removed printDownloadAbortMessage() after torrent downloading loop.
  7886. * src/TorrentAutoSaveCommand.cc
  7887. (TorrentAutoSaveCommand): Added the initialization of checkPoint.
  7888. (execute): Returns true if TorrentMan::isHalt() is true.
  7889. The interval check is now done by checkPoint, not SleepCommand.
  7890. * src/TrackerWatcherCommand.cc
  7891. (execute): If TorrentMan::isHalt(), then create a tracker request with
  7892. event=stopped.
  7893. * src/TrackerUpdateCommand.cc
  7894. (prepareForRetry): Do not use SleepCommand here.
  7895. (execute): Returns true if TorrentMan::isHalt() is true.
  7896. Others:
  7897. * src/TorrentMan.cc
  7898. (getMissingPieceIndex): Updated log message.
  7899. * src/PeerInteraction.cc
  7900. (createPeerMessag): Updated log message.
  7901. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7902. To add the ability to download several pieces in mix in a command and
  7903. increase the number of request slots according to request-cancel
  7904. latency:
  7905. * src/PeerInteractionCommand.cc
  7906. (executeInternal): The number of messages to be received at a time
  7907. is increased from 10 to 50.
  7908. * src/LogFactory
  7909. (getInstance): Added NullLogger.
  7910. * src/NullLogger.h: New class.
  7911. * src/BitfieldMan.h
  7912. (getMissingIndex): New function.
  7913. * src/BitfieldMan.cc
  7914. (getMissingIndex): New function.
  7915. * src/TorrentMan.h
  7916. (checkOutPiece): New function.
  7917. (getMissingPieceIndex): New function.
  7918. (getMissingFastPieceIndex): New function.
  7919. (getMissingFastPiece): New function.
  7920. * src/TorrentMan.cc
  7921. (updatePiece): Rewritten using STL.
  7922. (syncPiece): Rewritten using STL.
  7923. (getMissingPiece): Rewritten using getMissingPieceIndex() and
  7924. checkOutPiece().
  7925. (getMissingPieceIndex): New function.
  7926. (getMissingFastPieceIndex): New function.
  7927. (getMissingFastPiece): New function.
  7928. (checkOutPiece): New function.
  7929. * src/PeerInteraction.h
  7930. (Pieces): New type definition.
  7931. (piece): Removed.
  7932. (pieces): New variable.
  7933. (getNewPieceAndSendInterest): Added the "piece" argument.
  7934. (abortPiece): Added the "piece" argument.
  7935. (abortAllPieces): New function.
  7936. (isInRequestSlot): New function.
  7937. (hasDownloadPiece): Added the "index" argument.
  7938. (setDownloadPiece): Removed.
  7939. (getDownloadPiece): Added the "index" argument.
  7940. (updatePiece): New function.
  7941. (createRequestMessage): Added the "index" argument.
  7942. * src/PeerInteraction.cc
  7943. (onChoked): Rewritten.
  7944. (abortPiece): Rewirtten.
  7945. (abortAllPieces): New function.
  7946. (deleteTimeoutRequestSlot): Rewritten.
  7947. Clarified code a little bit.
  7948. (deleteCompletedRequestSlot): Rewritten.
  7949. (isInRequestSlot): New function.
  7950. (syncPiece): Rewritten.
  7951. (updatePiece): New function.
  7952. (getNewPieceAndSendInterest): Rewritten.
  7953. (addRequests): Rewritten.
  7954. (getDownloadPiece): Rewritten.
  7955. (hasDownloadPiece): Rewritten.
  7956. (createRequestMessage): Added the "index" argument.
  7957. * src/common.h
  7958. (BITFIELD_LEN_FROM_PIECES): Enclosed the variable in parentheses.
  7959. (DIV_FLOOR): New definition.
  7960. * src/PieceMessage.cc
  7961. (receivedAction): Update request-piece latency here.
  7962. * src/RequestSlot.h
  7963. (getLatencyInMillis): New function.
  7964. * src/RequestSlot.cc
  7965. (isTimeout): Rewritten using getLatencyInMillis.
  7966. (getLatencyInMillis): New function.
  7967. * src/Piece.h
  7968. (operator==): New function.
  7969. (getMissingBlockIndex): New function.
  7970. * src/Piece.cc
  7971. (operator==): New function.
  7972. (getMissingBlockIndex): New function.
  7973. * src/Peer.h
  7974. (DEFAULT_LATENCY): New definition.
  7975. (latency): New variable.
  7976. (updateLatency): New function.
  7977. (getLatency): New function.
  7978. * src/Peer.cc
  7979. (resetStatus): Reset latecy.
  7980. (updateLatency): New function.
  7981. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7982. * src/SocketCore.cc
  7983. (isReadable): Added secure to the condition.
  7984. * src/HttpConnection.cc
  7985. (receiveResponse): Fixed a bug that causes no response header
  7986. exception.
  7987. * src/Peer.h
  7988. (getFastSet): Fixed the return value type.
  7989. 2006-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  7990. To remove a wait from download loop:
  7991. * src/DownloadEngine.cc
  7992. (run): Comment out shortSleep.
  7993. To rewrite the message handling:
  7994. * src/SimplePeerMessage.h: New class.
  7995. * src/SimplePeerMessage.cc: New class.
  7996. * src/CancelMessage.h: Derived from SimplePeerMessage.
  7997. (msg): New variable.
  7998. (create): New function.
  7999. (send): Removed.
  8000. (getMessage): New function.
  8001. (getMessageLength): New function.
  8002. * src/CancelMessage.cc
  8003. (create): New function.
  8004. (receivedAction): Replaced deleteRequestMessageInQueue with
  8005. rejectPieceMessageInQueue.
  8006. (send): Removed.
  8007. (getMessage): New function.
  8008. (getMessageLength): New function.
  8009. * src/BitfieldMessage.h: Derived from SimplePeerMessage.
  8010. (msg): New variable.
  8011. (msgLength): New variable.
  8012. (~BitfieldMessage): Deleted msg.
  8013. (send): Removed.
  8014. (getMessage): New function.
  8015. (getMessageLength): New function.
  8016. * src/BitfieldMessage.cc
  8017. (create): New function.
  8018. (send): Removed.
  8019. (getMessage): New function.
  8020. (getMessageLength): New function.
  8021. * src/ChokeMessage.h: Derived from SimplePeerMessage.
  8022. (msg): New variable.
  8023. (sendPredicate): New function.
  8024. (onSendComplete): New function.
  8025. (send): Removed.
  8026. (getMessage): New function.
  8027. (getMessageLength): New function.
  8028. (create): New function.
  8029. * src/ChokeMessage.cc
  8030. (create): New function.
  8031. (send): Removed.
  8032. (sendPredicate): New function.
  8033. (getMessage): New function.
  8034. (getMessageLength): New function.
  8035. (onSendComplete): New function.
  8036. * src/KeepAliveMessage.h: Derived from SimplePeerMessage.
  8037. (msg): New variable.
  8038. (send): Removed.
  8039. (getMessage): New function.
  8040. (getMessageLength): New function.
  8041. * src/KeepAliveMessage.cc
  8042. (send): Removed.
  8043. (getMessage): New function.
  8044. (getMessageLength): New function.
  8045. * src/PortMessage.h
  8046. (create): New function.
  8047. (receivedAction): Updated log message.
  8048. * src/PortMessage.cc: New file.
  8049. * src/UnchokeMessage.h: Derived from SimplePeerMessage.
  8050. (msg): New variable.
  8051. (sendPredicate): New function.
  8052. (onSendComplete): New function.
  8053. (create): New function.
  8054. (send): Removed.
  8055. (getMessage): New function.
  8056. (getMessageLength): New function.
  8057. * src/UnchokeMessage.cc
  8058. (create): New function.
  8059. (send): Removed.
  8060. (sendPredicate): New function.
  8061. (getMessage): New function.
  8062. (getMessageLength): New function.
  8063. (onSendComplete): New function.
  8064. * src/PieceMessage.h
  8065. (leftPieceDataLength): Removed.
  8066. (leftDataLength): New variable.
  8067. (headerSend): New variable.
  8068. (pendingCount): New variable.
  8069. (msgHeader): New variable.
  8070. (sendPieceData): New function.
  8071. (incrementPendingCount): New function.
  8072. (isPendingCountMax): New function.
  8073. (create): New function.
  8074. (getMessageHeader): New function.
  8075. (getMessageHeaderLength): New function.
  8076. * src/PieceMessage.cc
  8077. (create): New function.
  8078. (getMessageHeader): New function.
  8079. (getMessageHeaderLength): New function.
  8080. (send): Rewritten.
  8081. (sendPieceData): New function.
  8082. * src/HaveMessage.h: Derived from SimplePeerMessage.
  8083. (msg): New variable.
  8084. (create): New function.
  8085. (getMessage): New function.
  8086. (getMessageLength): New function.
  8087. * src/HaveMessage.cc
  8088. (create): New function.
  8089. (send): Removed.
  8090. (sendPieceData): New function.
  8091. (getMessage): New function.
  8092. (getMessageLength): New function.
  8093. * src/RequestMessage.h: Derived from SimplePeerMessage.
  8094. (msg): New variable.
  8095. (create): New function.
  8096. (send): Removed.
  8097. (getMessage): New function.
  8098. (getMessageLength): New function.
  8099. * src/RequestMessage.cc
  8100. (create): New function.
  8101. (receivedAction): Added the handling of fast extension.
  8102. Deleted torrentMan->addUploadLength, torrentMan->addDeltaUploadLength.
  8103. (send): Removed.
  8104. (getMessage): New function.
  8105. (getMessageLength): New function.
  8106. * src/InterestedMessage.h: Derived from SimplePeerMessage.
  8107. (msg): New variable.
  8108. (sendPredicate): New function.
  8109. (onSendComplete): New function.
  8110. (create): New function.
  8111. (getMessage): New function.
  8112. (getMessageLength): New function.
  8113. * src/InterestedMessage.cc
  8114. (create): New function.
  8115. (send): Removed.
  8116. (sendPieceData): New function.
  8117. (getMessage): New function.
  8118. (getMessageLength): New function.
  8119. (onSendComplete): New function.
  8120. * src/NotInterestedMessage.h: Derived from SimplePeerMessage.
  8121. (msg): New variable.
  8122. (sendPieceData): New function.
  8123. (onSendComplete): New function.
  8124. (create): New function.
  8125. (send): Removed.
  8126. (getMessage): New function.
  8127. (getMessageLength): New function.
  8128. * src/NotInterestedMessage.cc
  8129. (create): New function.
  8130. (send): Removed.
  8131. (sendPredicate): New function.
  8132. (getMessage): New function.
  8133. (getMessageLength): New function.
  8134. (onSendComplete): New function.
  8135. * src/AllowedFastMessage.h: New class.
  8136. * src/AllowedFastMessage.cc: New class.
  8137. * src/RejectMessage.h: New class.
  8138. * src/RejectMessage.cc: New class.
  8139. * src/SuggestPieceMessage.h: New class.
  8140. * src/SuggestPieceMessage.cc: New class.
  8141. * src/HaveAllMessage.h: New class.
  8142. * src/HaveAllMessage.cc: New class.
  8143. * src/HaveNoneMessage.h: New class.
  8144. * src/HaveNoneMessage.cc: New class.
  8145. * src/HandshakeMessage.h: Derived from SimplePeerMessage.
  8146. (msg): New variable.
  8147. (reserved): New variable.
  8148. (create): New function.
  8149. (getId): New function.
  8150. (receivedAction): New function.
  8151. (getMessage): New function.
  8152. (getMessageLength): New function.
  8153. (isFastExtensionSupported): New function.
  8154. * src/HandshakeMessage.cc
  8155. (HandshakeMessage): Moved here from HandshakeMessage.h.
  8156. (create): New function.
  8157. (getMessage): New function.
  8158. (getMessageLength): New function.
  8159. (toString): Added the output of reserved field.
  8160. (check): Added const qualifier.
  8161. (isFastExtensionSupported): New function.
  8162. * src/PeerMessageUtil.h
  8163. (createChokeMessage): Removed.
  8164. (createUnchokeMessage): Removed.
  8165. (createInterestedMessage): Removed.
  8166. (createNotInterestedMessage): Removed.
  8167. (createHaveMessage): Removed.
  8168. (createBitfieldMessage): Removed.
  8169. (createRequestMessage): Removed.
  8170. (createCancelMessage): Removed.
  8171. (createPieceMessage): Removed.
  8172. (createPortMessage): Removed.
  8173. (createChokeMessage): Removed.
  8174. (createUnchokeMessage): Removed.
  8175. (createInterestedMessage): Removed.
  8176. (createNotInterestedMessage): Removed.
  8177. (createHaveMessage): Removed.
  8178. (createBitfieldMessage): Removed.
  8179. (createRequestMessage): Removed.
  8180. (createCancelMessage): Removed.
  8181. (createPieceMessage): Removed.
  8182. (createKeepAliveMessage): Removed.
  8183. (createHandshakeMessage): Removed.
  8184. (setIntParam): New function.
  8185. (createPeerMessageString): New function.
  8186. * src/PeerMessageUtil.cc
  8187. (createChokeMessage): Removed.
  8188. (createUnchokeMessage): Removed.
  8189. (createInterestedMessage): Removed.
  8190. (createNotInterestedMessage): Removed.
  8191. (createHaveMessage): Removed.
  8192. (createBitfieldMessage): Removed.
  8193. (createRequestMessage): Removed.
  8194. (createCancelMessage): Removed.
  8195. (createPieceMessage): Removed.
  8196. (createPortMessage): Removed.
  8197. (createRequestMessage): Removed.
  8198. (createCancelMessage): Removed.
  8199. (createPieceMessage): Removed.
  8200. (createHaveMessage): Removed.
  8201. (createChokeMessage): Removed.
  8202. (createUnchokeMessage): Removed.
  8203. (createInterestedMessage): Removed.
  8204. (createNotInterestedMessage): Removed.
  8205. (createBitfieldMessage): Removed.
  8206. (createKeepAliveMessage): Removed.
  8207. (createHandshakeMessage): Removed.
  8208. (setIntParam): New function.
  8209. (createPeerMessageString): New function.
  8210. * src/PeerConnection.h
  8211. (peer): Removed.
  8212. (torrentMan): Removed.
  8213. (createNLengthMessage): Removed.
  8214. (setIntParam): Removed.
  8215. (writeOutgoingMessageLog): Removed all overloaded functions.
  8216. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8217. (sendMessage): New function.
  8218. (sendHandshake): Removed.
  8219. (sendKeepAlive): Removed.
  8220. (sendChoke): Removed.
  8221. (sendUnchoke): Removed.
  8222. (sendInterested): Removed.
  8223. (sendNotInterested): Removed.
  8224. (sendHave): Removed.
  8225. (sendBitfield): Removed.
  8226. (sendRequest): Removed.
  8227. (sendPiece): Removed.
  8228. (sendPieceHeader): Removed.
  8229. (sendPieceData): Removed.
  8230. (sendCancel): Removed.
  8231. (getPeer): Removed.
  8232. * src/PeerConnection.cc
  8233. (PeerConnection): Deleted peer and torrentMan from its arguments.
  8234. (sendHandshake): Removed.
  8235. (sendKeepAlive): Removed.
  8236. (createNLengthMessage): Removed.
  8237. (setIntParam): Removed.
  8238. (writeOutgoingMessageLog): Removed all overloaded functions.
  8239. (sendChoke): Removed.
  8240. (sendUnchoke): Removed.
  8241. (sendInterested): Removed.
  8242. (sendNotInterested): Removed.
  8243. (sendHave): Removed.
  8244. (sendBitfield): Removed.
  8245. (sendRequest): Removed.
  8246. (sendPiece): Removed.
  8247. (sendPieceHeader): Removed.
  8248. (sendPieceData): Removed.
  8249. (sendMessage): New function.
  8250. (sendCancel): Removed.
  8251. * src/PeerInteractionCommand.cc
  8252. (PeerInteractionCommand): Call setUploadLimit.
  8253. (executeInternal): Call setUploadLimit.
  8254. Added the handling of "inProgress" state of handshake message.
  8255. Call sendBitfield() or sendAllowdFast() instead of deprecated
  8256. sendNow().
  8257. (keepAlive): Call addMessage and sendMessage instead of deprecated
  8258. sendNow().
  8259. (beforeSocketCheck): Call addMessage instead of deprecated trySendNow()
  8260. * src/TorrentMan.h
  8261. (PEER_ID_LENGTH): New definition.
  8262. (hasAllPieces): New function.
  8263. * src/TorrentMan.cc
  8264. (getMissingPiece): Added the handling of fast extension.
  8265. (cancelPiece): Call updatePiece().
  8266. (hasAllPieces): New function.
  8267. * src/PeerInteraction.h
  8268. (fastSet): New variable.
  8269. (getNewPieceAndSendInterest): Changed the return type to void.
  8270. (send): Renamed as sendMessages.
  8271. (deleteAllRequestSlot): Removed.
  8272. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8273. (cancelAllRequest): Removed all overloaded functions.
  8274. (deleteAllRequestSlot): Removed.
  8275. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8276. (rejectPieceMessageInQueue): New function.
  8277. (rejectAllPieceMessageInQueue): New function.
  8278. (onChoked): New function.
  8279. (isSendingMessageInProgress): New function.
  8280. (getCorrespondingRequestSlot): Changed its arguments.
  8281. (isInFastSet): New function.
  8282. (addFastSetIndex): New function.
  8283. (addRequests): New function.
  8284. (sendNow): Removed.
  8285. (trySendNow): Removed.
  8286. (sendBitfield): New function.
  8287. (sendAllowdFast): New function.
  8288. (createHaveAllMessage): New function.
  8289. (createHaveNoneMessage): New function.
  8290. (createRejectMessage): New function.
  8291. (createAllowedFastMessage): New function.
  8292. * src/PeerInteraction.cc
  8293. (send): Renamed as sendMessages.
  8294. (sendMessages): New function.
  8295. (MsgPushBack): New class.
  8296. (isSendingMessageInProgress): New function.
  8297. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  8298. (rejectAllPieceMessageInQueue): New function.
  8299. Added the handling of fast extension.
  8300. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  8301. (rejectPieceMessageInQueue): New function.
  8302. Added the handling of fast extension.
  8303. (deleteRequestSlot): Replaced for loop with std::find.
  8304. (onChoked): New function.
  8305. (deleteAllRequestSlot): Removed.
  8306. (abortPiece): Rewirtten.
  8307. (deleteTimeoutRequestSlot): Updated log messages.
  8308. (getCorrespondingRequestSlot): Changed its arguments.
  8309. (cancelAllRequest): Removed all overloaded functions.
  8310. (receiveHandshake): Added the check to see whether an incoming peer
  8311. supports fast extension.
  8312. (createHandshakeMessage): Use HandshakeMessage::create instead of
  8313. PeerMessageUtil.
  8314. (createPeerMessage): Use create() of each message class instead of
  8315. PeerMessageUtil.
  8316. HaveAllMessage, HaveNoneMessage, RejectMessage, SuggestPieceMessage,
  8317. AllowedFastMessage were added.
  8318. (getNewPieceAndSendInterest): Changed its return value type to void.
  8319. Added the handling of fast extension.
  8320. (addRequests): New function.
  8321. (sendNow): Removed.
  8322. (sendHandshake): Rewritten.
  8323. (trySendNow): Removed.
  8324. (sendBitfield): New function.
  8325. (sendAllowdFast): New function.
  8326. (isInFastSet): New function.
  8327. (addFastSetIndex): New function.
  8328. (createRequestMessage): Use RequestMessage::create instead of
  8329. PeerMessageUtil.
  8330. (createCancelMessage): Use CancelMessage::create instead of
  8331. PeerMessageUtil.
  8332. (createPieceMessage): Use PieceMessage::create instead of
  8333. PeerMessageUtil.
  8334. (createHaveMessage): Use HaveMessage::create instead of
  8335. PeerMessageUtil.
  8336. (createChokeMessage): Use ChokeMessage::create instead of
  8337. PeerMessageUtil.
  8338. (createUnchokeMessage): Use UnchokeMessage::create instead of
  8339. PeerMessageUtil.
  8340. (createInterestedMessage): Use InterestedMessage::create instead of
  8341. PeerMessageUtil.
  8342. (createNotInterestedMessage): Use NotInterestedMessage::create instead
  8343. of PeerMessageUtil.
  8344. (createBitfieldMessage): Use BitfieldMessage::create instead of
  8345. PeerMessageUtil.
  8346. (createKeepAliveMessage): Use KeepAliveMessage::create instead of
  8347. PeerMessageUtil.
  8348. (createHaveAllMessage): New function.
  8349. (createHaveNoneMessage): New function.
  8350. (createRejectMessage): New function.
  8351. (createAllowedFastMessage: New function.
  8352. * src/Util.h
  8353. (sha1Sum): New function.
  8354. (computeFastSet): New function.
  8355. * src/Util.cc
  8356. (sha1Sum): New function.
  8357. (computeFastSet): New function.
  8358. * src/Peer.h
  8359. (fastExtensionEnabled): New variable.
  8360. (fastSet): New variable.
  8361. (setAllBitfield): New function.
  8362. (setFastExtensionEnabled): New function.
  8363. (isFastExtensionEnabled): New function.
  8364. (addFastSetIndex): New function.
  8365. (getFastSet): New function.
  8366. (isInFastSet): New function.
  8367. (countFastSet): New function.
  8368. * src/Peer.cc
  8369. (isInFastSet): New function.
  8370. (addFastSetIndex): New function.
  8371. (setAllBitfield): New function.
  8372. * src/AbstractCommand.cc (execute): Changed the procedure of checking
  8373. sockets.
  8374. * src/PeerAbstractCommand.cc
  8375. (PeerAbstractCommand): Added the initialization for uploadLimitCheck
  8376. and uploadLimit.
  8377. (execute): Changed the procedure of checking sockets. The upload speed
  8378. checking were added.
  8379. (setUploadLimit): New function.
  8380. (setUploadLimitCheck): New function.
  8381. * src/PeerAbstractCommand.h
  8382. (setUploadLimit): New function.
  8383. (setUploadLimitCheck): New function.
  8384. (uploadLimit): New variable.
  8385. (uploadLimitCheck): New variable.
  8386. To contact a tracker regularly:
  8387. * src/TrackerWatcherCommand.h (interval): New variable.
  8388. (checkPoint): New variable.
  8389. (TrackerWatcherCommand): Added interval argument.
  8390. * src/TrackerWatcherCommand.cc
  8391. (TrackerWatcherCommand): Initialized checkPoint.
  8392. (execute): Now a tracker is contacted in every specified period.
  8393. If peer list is not needed, send request with numwant=0.
  8394. * src/TrackerUpdateCommand.cc
  8395. (execute): Updated log messages.
  8396. * src/DownloadEngine.cc
  8397. (~DownloadEngine): Removed two asserts.
  8398. (waitData): Uncommented wfds. May be a bug fix.
  8399. 2006-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8400. * src/PeerInteractionCommand.h
  8401. (checkInactiveConnection): Removed.
  8402. * src/PeerInteractionCommand.cc
  8403. (executeInternal): Removed following function calls:
  8404. detectMessageFlooding(), checkLongTimePeerChoking and
  8405. checkInactiveConnection().
  8406. (checkInactiveConnection): Removed.
  8407. (detectMessageFlooding): Removed function call to
  8408. checkInactiveConnection().
  8409. * src/PeerMessageUtil.h
  8410. (createChokeMessage): New function. Overload.
  8411. (createUnchokeMessage): New function. Overload.
  8412. (createInterestedMessage): New function. Overload.
  8413. (createNotInterestedMessage): New function. Overload.
  8414. (createHaveMessage): New function. Overload.
  8415. (createBitfieldMessage): New function. Overload.
  8416. (createRequestMessage): New function. Overload.
  8417. (createCancelMessage): New function. Overload.
  8418. (createPieceMessage): New function. Overload.
  8419. (createKeepAliveMessage): New function. Overload.
  8420. * src/PeerMessageUtil.cc
  8421. (createChokeMessage): New function. Overload.
  8422. (createUnchokeMessage): New function. Overload.
  8423. (createInterestedMessage): New function. Overload.
  8424. (createNotInterestedMessage): New function. Overload.
  8425. (createHaveMessage): New function. Overload.
  8426. (createBitfieldMessage): New function. Overload.
  8427. (createRequestMessage): New function. Overload.
  8428. (createCancelMessage): New function. Overload.
  8429. (createPieceMessage): New function. Overload.
  8430. (createKeepAliveMessage): New function. Overload.
  8431. * src/SendMessageQueue.cc
  8432. (createRequestMessage): Use PeerMessageUtil.
  8433. (createCancelMessage): Use PeerMessageUtil.
  8434. (createPieceMessage): Use PeerMessageUtil.
  8435. (createHaveMessage): Use PeerMessageUtil.
  8436. (createChokeMessage): Use PeerMessageUtil.
  8437. (createUnchokeMessage): Use PeerMessageUtil.
  8438. (createInterestedMessage): Use PeerMessageUtil.
  8439. (createNotInterestedMessage): Use PeerMessageUtil.
  8440. (createBitfieldMessage): Use PeerMessageUtil.
  8441. (createKeepAliveMessage): Use PeerMessageUtil.
  8442. * src/SendMessageQueue.h: Renamed to PeerInteraction.h
  8443. * src/SendMessageQueue.cc: Renamed to PeerInteraction.cc
  8444. * src/PeerInteraction.h: New class.
  8445. * src/PeerInteraction.cc: New class.
  8446. 2006-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8447. Each peer message has its own class.
  8448. * src/PendingMessages.h: Removed.
  8449. * src/PendingMessages.cc: Removed. The sending process was moved to
  8450. each message class.
  8451. * src/RequestSlotMan.h: Removed.
  8452. * src/RequestSlotMan.cc: Removed. All functionarities were moved to
  8453. SendMessageQueue.
  8454. * src/RequestMessage.h: New class.
  8455. * src/RequestMessage.cc: New class.
  8456. * src/CancelMessage.h: New class.
  8457. * src/CancelMessage.cc: New class.
  8458. * src/BitfieldMessage.h: New class.
  8459. * src/BitfieldMessage.cc: New class.
  8460. * src/ChokeMessage.h: New class.
  8461. * src/ChokeMessage.cc: New class.
  8462. * src/KeepAliveMessage.h: New class.
  8463. * src/KeepAliveMessage.cc: New class.
  8464. * src/PortMessage.h: New class.
  8465. * src/UnchokeMessage.h: New class.
  8466. * src/UnchokeMessage.cc: New class.
  8467. * src/PieceMessage.h: New class.
  8468. * src/PieceMessage.cc: New class.
  8469. * src/HaveMessage.h: New class.
  8470. * src/HaveMessage.cc: New class.
  8471. * src/BitfieldMessage.h: New class.
  8472. * src/BitfieldMessage.cc: New class.
  8473. * src/NotInterestedMessage.h: New class.
  8474. * src/NotInterestedMessage.cc: New class.
  8475. * src/InterestedMessage.h: New class.
  8476. * src/InterestedMessage.cc: New class.
  8477. * src/HandshakeMessage.h (sendMessageQueue): New variable.
  8478. (getSendMessageQueue): New function.
  8479. (setSendMessageQueue): New function.
  8480. * src/HandshakeMessage.cc: New class.
  8481. * src/PeerConnection.h (receiveMessage): Changed return value and
  8482. arguments.
  8483. (receiveHandshake): Changed return value and arguments.
  8484. * src/PeerConnection.cc (receiveMessage): Do not create message class
  8485. here.
  8486. (receiveHandshake): Do not create handshake class here.
  8487. * src/PeerInteractionCommand.h (peerConnection): Removed.
  8488. (piece): Removed.
  8489. (syncPiece): Removed.
  8490. (sendInterest): Removed.
  8491. (sendMessages): Removed.
  8492. (createRequestPendingMessage): Removed.
  8493. (checkPieceHash): Removed.
  8494. (erasePieceOnDisk): Removed.
  8495. (getNewPieceAndSendInterest): Removed.
  8496. (onGotNewPice): Removed.
  8497. (onGotWrongPiece): Removed.
  8498. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  8499. Removed peerConnection, piece.
  8500. (~PeerInteractionCommand): Removed peerConnection.
  8501. (executeInternal): Use sendMessageQueue instead of peerConnection.
  8502. (syncPiece): Moved to SendMessageQueue.
  8503. (decideChoking): Removed PendingMessage.
  8504. (receiveMessage): Use sendMessageQueue instead of peerConnection.
  8505. The action after receiving peer message was moved to each message
  8506. class.
  8507. (onGotNewPice): Moved to SendMessageQueue.
  8508. (onGotWrongPiece): Moved to SendMessageQueue.
  8509. (getNewPieceAndSendInterest): Moved to SendMessageQueue.
  8510. (sendInterest): Moved to SendMessageQueue.
  8511. (createRequestPendingMessage): Removed.
  8512. (sendMessages): Moved to SendMessageQueue.
  8513. (onAbort): Use SendMessageQueue::abortPiece()
  8514. (keepAlive): Use sendMessageQueue instead of peerConnection.
  8515. (beforeSocketCheck): Use sendMessageQueue instead of peerConnection.
  8516. (checkPieceHash): Moved to SendMessageQueue.
  8517. (erasePieceOnDisk): Moved to SendMessageQueue.
  8518. * src/PeerMessageUtil.h
  8519. (createBitfieldMessage): Removed.
  8520. (createHaveMessage): Changed return value and arguments.
  8521. (createBitfieldMessage): Changed return value and arguments.
  8522. (createRequestCancelMessage): Removed.
  8523. (createPieceMessage): Changed return value and arguments.
  8524. (getShortIntParam): New function.
  8525. (checkIndex): Changed arguments.
  8526. (checkBegin): Changed arguments.
  8527. (checkLength): Changed arguments.
  8528. (checkPieceOffset): Removed.
  8529. (checkRange): New function.
  8530. (checkBitfield): Changed arguments.
  8531. (createPeerMessage): Removed.
  8532. (checkIntegrity): Removed.
  8533. (createHandshakeMessage): Changed arguments.
  8534. (createChokeMessage): New function.
  8535. (createUnchokeMessage): New function.
  8536. (createInterestedMessage): New function.
  8537. (createNotInterestedMessage): New function.
  8538. (createRequestMessage): New function.
  8539. (createCancelMessage): New function.
  8540. (createPortMessage): New function.
  8541. * src/PeerMessageUtil.cc
  8542. (createBitfieldMessage): Removed.
  8543. (createHaveMessage): Changed return value and arguments.
  8544. (createBitfieldMessage): Changed return value and arguments.
  8545. (createRequestCancelMessage): Removed.
  8546. (createPieceMessage): Changed return value and arguments.
  8547. (getShortIntParam): New function.
  8548. (checkIndex): Changed arguments.
  8549. (checkBegin): Changed arguments.
  8550. (checkLength): Changed arguments.
  8551. (checkPieceOffset): Removed.
  8552. (checkRange): New function.
  8553. (checkBitfield): Changed arguments.
  8554. (createPeerMessage): Removed.
  8555. (checkIntegrity): Removed.
  8556. (createHandshakeMessage): Changed arguments.
  8557. (createChokeMessage): New function.
  8558. (createUnchokeMessage): New function.
  8559. (createInterestedMessage): New function.
  8560. (createNotInterestedMessage): New function.
  8561. (createRequestMessage): New function.
  8562. (createCancelMessage): New function.
  8563. (createPortMessage): New function.
  8564. * src/PeerMessage.h
  8565. (id): Removed.
  8566. (index): Removed.
  8567. (begin): Removed.
  8568. (length): Removed.
  8569. (bitfield): Removed.
  8570. (bitfieldLength): Removed.
  8571. (block): Removed.
  8572. (blockLength): Removed.
  8573. (inProgress): New variable.
  8574. (cuid): New variable.
  8575. (peer): New variable.
  8576. (sendMessageQueue): New variable.
  8577. (logger): New variable.
  8578. (setBitfield): Removed.
  8579. (getBitfield): Removed.
  8580. (setBlock): Removed.
  8581. (getBlock): Removed.
  8582. (getBitfieldLength): Removed.
  8583. (getBlockLength): Removed.
  8584. (isInProgress): New function.
  8585. (toString): Made pure virtual.
  8586. (check): New function.
  8587. (send): New function.
  8588. (receivedAction): New function.
  8589. (getId): Made pure virtual.
  8590. (setId): Removed.
  8591. (getIndex): Removed.
  8592. (setIndex): Removed.
  8593. (getBegin): Removed.
  8594. (setBegin): Removed.
  8595. (getLength): Removed.
  8596. (setLength): Removed.
  8597. (getCuid): New function.
  8598. (setCuid): New function.
  8599. (getPeer): New function.
  8600. (setPeer): New function.
  8601. (getSendMessageQueue): New function.
  8602. (setSendMessageQueue): New function.
  8603. (ID): Removed.
  8604. * src/PeerMessage.cc
  8605. (setBitfield): Removed.
  8606. (setBlock): Removed.
  8607. (toString): Removed.
  8608. * src/TorrentMan.h
  8609. (getPieceLength): New function.
  8610. (getPieceLength): New function.
  8611. * src/SendMessageQueue.h
  8612. (REQUEST_TIME_OUT): New definition.
  8613. (RequestSlots): New definition.
  8614. (MessageQueue): New definition.
  8615. (requestSlotMan): Removed.
  8616. (pendingMessages): Removed.
  8617. (requestSlots): New variable.
  8618. (messageQueue): New variable.
  8619. (torrentMan): New variable.
  8620. (peerConnection): New variable.
  8621. (peer): New variable.
  8622. (piece): New variable.
  8623. (getNewPieceAndSendInterest): New function.
  8624. (createPeerMessage): New function.
  8625. (createHandshakeMessage): New function.
  8626. (send): Made private.
  8627. (setPeerMessageCommonProperty): New function.
  8628. (deleteAllRequestSlot): New function.
  8629. (deleteRequestMessageInQueue): New function.
  8630. (cancelAllRequest): Made private.
  8631. (cancelAllRequest): Made private.
  8632. (countRequestSlot): Made private.
  8633. (addPendingMessage): Removed.
  8634. (deletePendingPieceMessage): Removed.
  8635. (deletePendingRequestMessage): Removed.
  8636. (addMessage): New function.
  8637. (deletePieceMessageInQueue): New function.
  8638. (deleteTimeoutRequestSlot): Changed argument.
  8639. (deleteCompletedRequestSlot): Changed argument.
  8640. (getCorrespoindingRequestSlot): Renamed to getCorrespondingRequestSlot.
  8641. (getCorrespondingRequestSlot): New function.
  8642. (countPendingMessage): Removed.
  8643. (countMessageInQueue): New function.
  8644. (getTorrentMan): New function.
  8645. (getPeerConnection): New function.
  8646. (hasDownloadPiece): New function.
  8647. (getDownloadPiece): New function.
  8648. (setDownloadPiece): New function.
  8649. (syncPiece): New function.
  8650. (sendMessages): New function.
  8651. (sendNow): New function.
  8652. (trySendNow): New function.
  8653. (abortPiece): New function.
  8654. (sendHandshake): New function.
  8655. (receiveMessage): New function.
  8656. (receiveHandshake): New function.
  8657. (createRequestMessage): New function.
  8658. (createCancelMessage): New function.
  8659. (createPieceMessage): New function.
  8660. (createHaveMessage): New function.
  8661. (createChokeMessage): New function.
  8662. (createUnchokeMessage): New function.
  8663. (createInterestedMessage): New function.
  8664. (createNotInterestedMessage): New function.
  8665. (createBitfieldMessage): New function.
  8666. (createKeepAliveMessage): New function.
  8667. * src/SendMessageQueue.cc
  8668. (SendMessageQueue): Removed requestSlotMan.
  8669. Instantiated peerConnection here.
  8670. (~SendMessageQueue): Removed requestSlotMan.
  8671. Added deletion of peerConnection and the contents of messageQueue.
  8672. (send): Updated according to the change of messageQueue.
  8673. (addPendingMessage): Renamed to addMessage.
  8674. (addMessage): New function.
  8675. (deletePendingPieceMessage): Renamed to deletePieceMessageInQueue.
  8676. (deletePieceMessageInQueue): New function.
  8677. (deletePendingRequestMessage): Renamed to deleteRequestMessageInQueue.
  8678. (deleteRequestMessageInQueue): New function.
  8679. (deleteRequestSlot): RequestSlotMan::deleteRequestSlot(...) was moved
  8680. here.
  8681. (deleteTimeoutRequestSlot): RequestSlotMan::deleteTimeoutRequestSlot
  8682. (...) was moved here.
  8683. (deleteAllRequestSlot): RequestSlotMan::deleteAllRequestSlot(...) was
  8684. moved here.
  8685. (deleteCompletedRequestSlot):
  8686. RequestSlotMan::deleteCompletedRequestSlot(...) was moved here.
  8687. (getCorrespondingRequestSlot):
  8688. RequestSlotMan::getCorrespoindingRequestSlot(...) was moved here.
  8689. And renamed to getCorrespondingRequestSlot, correcting a typo.
  8690. (countPendingMessage): Renamed to countMessageInQueue.
  8691. (countMessageInQueue): New function.
  8692. (countRequestSlot): RequestSlotMan::countRequestSlot() was moved here.
  8693. (receiveHandshake): New function.
  8694. (createHandshakeMessage): New function.
  8695. (receiveMessage): New function.
  8696. (createPeerMessage): New function.
  8697. (syncPiece): New function.
  8698. (getNewPieceAndSendInterest): New function.
  8699. (sendMessages): New function.
  8700. (sendNow): New function.
  8701. (trySendNow): New function.
  8702. (sendHandshake): New function.
  8703. (abortPiece): New function.
  8704. (getDownloadPiece): New function.
  8705. (getPeerMessageCommonProperty): New function.
  8706. (createRequestMessage): New function.
  8707. (createCancelMessage): New function.
  8708. (createPieceMessage): New function.
  8709. (createHaveMessage): New function.
  8710. (createChokeMessage): New function.
  8711. (createUnchokeMessage): New function.
  8712. (createInterestedMessage): New function.
  8713. (createNotInterestedMessage): New function.
  8714. (createBitfieldMessage): New function.
  8715. (createKeepAliveMessage): New function.
  8716. To add simple Content-Disposition support:
  8717. * src/HttpResponseCommand.h (determinFilename): New function.
  8718. * src/HttpResponseCommand.cc (executeInternal):
  8719. Use determinFilename(headers) instead of req->getFile() when comparing
  8720. filename.
  8721. (determinFilename): New function.
  8722. (handleDefaultEncoding): Use determinFilename(headers) instead of
  8723. req->getFile().
  8724. (handleOtherEncoding): Use determinFilename(headers) instead of
  8725. req->getFile().
  8726. * src/Util.h (getContentDispositionFilename): New function.
  8727. * src/Util.cc (getContentDispositionFilename): New function.
  8728. * src/LogFactory.h (release): New function.
  8729. * src/LogFactory.cc (release): New function.
  8730. To fix a bug that causes out-of-bound exception when HTTP status
  8731. line is wrong:
  8732. * src/HttpConnection.cc (receiveResponse): Added a check for header
  8733. size.
  8734. * src/common.h (Deleter): New class.
  8735. * src/SegmentMan.cc
  8736. (~SegmentMan): Added deletion of splitter and diskWriter.
  8737. * src/DownloadEngine.h
  8738. (Commands): Use deque.
  8739. (clearQueue): New function.
  8740. * src/DownloadEngine.cc
  8741. (~DownloadEngine): Added deletion of segmentMan.
  8742. (cleanQueue): New function.
  8743. * src/TorrentDownloadEngine.h
  8744. (TorrentDownloadEngine): The implementation was moved to
  8745. TorrentDownloadEngine.cc.
  8746. (~TorrentDownloadEngine): The implementation was moved to
  8747. TorrentDownloadEngine.cc.
  8748. * src/TorrentDownloadEngine.cc
  8749. (~TorrentDownloadEngine): Added deletion of torrentMan.
  8750. * src/main.cc
  8751. (clearRequest): Removed.
  8752. (handler): Added deletion of e.
  8753. (torrentHandler): Added deletion of te.
  8754. (main): Do not share splitter.
  8755. Use Deleter instead of clearRequest.
  8756. Deletion of classes were updated.
  8757. 2006-05-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8758. * src/main.cc (main): Fixed typo.
  8759. * src/message.h: Fixed typo.
  8760. * po/de.po: Added German translation, thanks to Hermann J. Beckers.
  8761. 2006-04-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8762. To add --select-file command-line option:
  8763. * src/Util.cc
  8764. (unfoldRange): New function.
  8765. (getNum): New function.
  8766. (unfoldSubRange): New function
  8767. * src/main.cc
  8768. (showUsage): Added help message.
  8769. (main): Added --select-file command-line option. Updated the layout of
  8770. file listing.
  8771. * src/common.h
  8772. (Integers): New definition.
  8773. * src/SocketCore.cc
  8774. (writeData): Removed timeout argument.
  8775. (readData): Removed timeout argument.
  8776. (peekData): Removed timeout argument.
  8777. * src/Socket.cc
  8778. (writeData): Removed timeout argument.
  8779. (readData): Removed timeout argument.
  8780. (peekData): Removed timeout argument.
  8781. * Release 0.4.1
  8782. 2006-04-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8783. To deploy upload rate based choking algorithm:
  8784. * src/PeerInteractionCommand.cc
  8785. (PeerInteractionCommand): Add peer to TorrentMan::activePeers to track
  8786. peer currently used.
  8787. (decideChoking): Deleted the choke/unchoke decision algorithm when
  8788. download completes. Simplified.
  8789. (receiveMessage): Updated.
  8790. * src/TorrentMan.h
  8791. (activePeers): New variable.
  8792. (addActivePeer): New function.
  8793. (getActivePeers): New function.
  8794. (deleteActivePeer): New function.
  8795. * src/TorrentMan.cc
  8796. (addPeer): deleteOldErrorPeers is moved to the begining of the function
  8797. * src/PeerAbstractCommand.cc
  8798. (onAbort): Use peer->resetStatus().
  8799. * src/main.cc
  8800. (PeerChokeCommand.h): Included.
  8801. (main): Added the instance of ChokingCommand to the command queue.
  8802. * src/Peer.h
  8803. (amChoking): Renamed from amChocking
  8804. (chokingRequired): New variable.
  8805. (optUnchoking): New variable.
  8806. (deltaUpload): New variable.
  8807. (deltaDownload): New variable.
  8808. (addDeltaUpload): New function.
  8809. (resetDeltaUpload): New function.
  8810. (addDeltaDownload): New function.
  8811. (resetDeltaDownload): New function.
  8812. (addPeerUpload): Added a call to addDeltaUpload.
  8813. (addPeerDownload): Added a call to addDeltaDownload.
  8814. * src/Peer.cc
  8815. (shouldBeChoking): Renamed from shouldChoke.
  8816. (resetStatus): New function.
  8817. * src/PeerChokeCommand.h: New class.
  8818. * src/PeerChokeCommand.cc: New class.
  8819. To add lazy upload speed limiter:
  8820. * src/TorrentConsoleDownloadEngine.h: Moved the variables for
  8821. statistics calculation to TorrentDownloadEngine.
  8822. * src/TorrentConsoleDownloadEngine.cc
  8823. (sendStatistics): Renamed from printStatistics.
  8824. (initStatistics): Removed. Moved to TorrentDownloadEngine.
  8825. (calculateSpeed): Removed. Moved to TorrentDownloadEngine.
  8826. (calculateStatistics): Removed. Moved to TorrentDownloadEngine.
  8827. * src/TorrentDownloadEngine.h: Added the variables for statistics
  8828. calculation.
  8829. (sendStatistics): New function as pure virtual function.
  8830. (getUploadSpeed): New function.
  8831. * src/TorrentDownloadEngine.cc
  8832. (initStatistics): New function.
  8833. (calculateSpeed): New function.
  8834. (calculateStatistics): New function.
  8835. * src/SendMessageQueue.h
  8836. (uploadLength): New variable.
  8837. (send): Added an argument.
  8838. (setUploadLimit): New function.
  8839. (getUploadLimit): New function.
  8840. * src/SendMessageQueue.cc
  8841. (send): Added upload speed limiter.
  8842. * src/prefs.h
  8843. (PREF_UPLOAD_LIMIT): New definition.
  8844. * src/PeerInteractionCommand.cc
  8845. (PeerInteractionCommand): Set upload speed limit to sendMessageQueue.
  8846. * src/main.cc
  8847. (main): Added --upload-limit option
  8848. For bug fixes:
  8849. * src/main.cc
  8850. (showUsage): Corrected --listen-port help
  8851. Other changes:
  8852. * src/TorrentMan.cc
  8853. (getPeer): Return nullPeer if connection is grather than
  8854. MAX_PEER_UPDATE(15) in order to leave space for incoming peers.
  8855. 2006-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8856. To add some useful information to the exception message:
  8857. * src/SocketCore.cc : Updated messages.
  8858. * src/SegmentMan.cc :
  8859. * src/TorrentMan.cc : Updated messages.
  8860. * src/MultiDiskWriter.cc : Updated messages.
  8861. * src/Util.cc : Updated messages.
  8862. * src/AbstractDiskWriter.cc : Updated messages.
  8863. * src/PreAllocationDiskWriter.cc : Updated messages.
  8864. * src/message.cc : Added new messages. Updated some messages.
  8865. * src/TrackerWatcherCommand.h (MIN_PEERS): New definition.
  8866. * src/TrackerWatcherCommand.cc (execute): Use MIN_PEERS.
  8867. Updated threshold from 30 to 15.
  8868. * src/AbstractDiskWriter.h (filename): New variable.
  8869. * src/AbstractDiskWriter.cc (openExistingFile): Assigned filename.
  8870. (createFile): Assigned filename.
  8871. * src/main.cc: Updated the help message for http-auth-scheme.
  8872. * Release 0.4.0
  8873. 2006-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8874. To add TrackerUpdateCommand with which replaces
  8875. CompactTrackerResponseProcessor:
  8876. * src/TrackerWatcherCommand.h (req): Removed.
  8877. * src/TrackerWatcherCommand.cc (execute): Send a request to tracker
  8878. if the number of peer connections are less than 30.
  8879. * src/ByteArrayDiskWriter.h (readData): Implemented.
  8880. * src/SegmentMan.h (diskWriter): New function.
  8881. * src/SegmentMan.cc (init): Added a call to diskWriter->closeFile()
  8882. * src/main.cc : Removed #include "CompactTrackerResponseProcessor.h"
  8883. (main): Use TrackerUpdateCommand.
  8884. * src/TorrentMan.h (CompactTrackerResponseProcessor): Removed.
  8885. (req): New variable.
  8886. (setTrackerResponseProcessor): Removed.
  8887. (getTrackerResponseProcessor): Removed.
  8888. (processTrackerResponse): Removed.
  8889. * src/DownloadEngine.h (diskWriter): Removed.
  8890. * src/TorrentDownloadEngine.cc (afterEachIteration): Removed a call
  8891. to torrentMan->processTrackerResponse().
  8892. To add Util::expandBuffer:
  8893. * src/ByteArrayDiskWriter.h (expandBuffer): Removed.
  8894. * src/ByteArrayDiskWriter.cc (writeData): Use Util::expandBuffer().
  8895. * src/Util.h (expandBuffer): New function.
  8896. To fix the bug that causes segmentation fault when "-l ." is specified
  8897. in command-line option:
  8898. * src/SimpleLogger.h (SimpleLogger): Removed "filename" argument.
  8899. (openFile): New function.
  8900. (closeFile): New function.
  8901. * src/SimpleLogger.cc (SimpleLogger): Removed fopen.
  8902. (~SimpleLogger): Call closeFile();
  8903. * src/LogFactory.cc (getInstance): Added a call to slogger->openFile().
  8904. * src/main.cc (main): Added a check to see logger is configured
  8905. properly.
  8906. To enable HTTP authentication without specifying "--http-auth-scheme"
  8907. * src/prefs.h (PREF_HTTP_AUTH_ENABLED): New definition.
  8908. * src/HttpConnection.cc (createRequest): Send Authorization header
  8909. if PREF_HTTP_AUTH_ENABLED == V_TRUE.
  8910. * src/main.cc (main): Preset PREF_HTTP_AUTH_SCHEME to V_TRUE
  8911. If "--http-user" is specified, set PREF_HTTP_AUTH_ENABLED to V_TRUE
  8912. * src/Peer.cc (shouldChoke): Updated algorithm.
  8913. * src/message.h (EX_AUTH_FAILED): New definition.
  8914. (EX_FILE_OPEN): New definition.
  8915. * src/HttpResponseCommand.cc (checkResponse): Throw DlAbortEx
  8916. if status == 401.
  8917. (handleDefaultEncoding): Added a call to diskWriter->initAndOpenFile()
  8918. if req->isTorrent == true.
  8919. * src/main.cc (handler): Removed the check to see e->diskWriter != NULL
  8920. (torrentHandler): Removed the check to see diskAdaptor != NULL.
  8921. * src/AbstractDiskWriter.cc (openExistingFile): Updated messsage.
  8922. (createFile): Updated message.
  8923. 2006-04-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8924. To add a readout of estimated remaining time to normal HTTP/FTP
  8925. downloads:
  8926. * src/ConsoleDownloadEngine.h (startup): New variable.
  8927. (startupLength): New variable.
  8928. (isStartupLengthSet): New variable.
  8929. (avgSpeed): New variable.
  8930. (eta): New variable.
  8931. * src/ConsoleDownloadEngine.cc (sendStatistics): Added a readout of
  8932. estimated remaining time.
  8933. (initStatistics): Initialized newly added variables.
  8934. (calculateStatistics): Calculate average speed and estimated remaining
  8935. time.
  8936. To decouple TorrentDownloadEngine from HttpResponseCommand:
  8937. * src/TrackerDownloadCommand.h: Removed.
  8938. * src/TrackerDownloadCommand.cc: Removed.
  8939. * src/TrackerInitCommand.h: Removed.
  8940. * src/TrackerInitCommand.cc: Removed.
  8941. * src/TrackerUpdateCommand.h: Removed.
  8942. * src/TrackerUpdateCommand.cc: Removed.
  8943. * src/TrackerWatcherCommand.cc (execute): The construction of request
  8944. url written in TrackerInitCommand was moved here. Do not create
  8945. tracker request command if torrentMan->trackers != 0.
  8946. * src/CompactTrackerResponseProcessor.h: New class.
  8947. * src/CompactTrackerResponseProcessor.cc: New class.
  8948. * src/message.h (MSG_TRACKER_WARNING_MESSAGE): Updated.
  8949. * src/HttpResponseCommand.cc (createHttpDownloadCommand):
  8950. Decoupled TorrentDownloadEngine from this.
  8951. * src/SegmentMan.h (init): New function.
  8952. * src/SegmentMan.cc (init): New function.
  8953. * src/TorrentMan.h (responseProcessor): New variable.
  8954. (trackers): New variable.
  8955. (setTrackerResponseProcessor): New function.
  8956. (getTrackerResponseProcessor): New function.
  8957. (processTrackerResponse): New function.
  8958. * src/TorrentMan.cc (Constructor): Initialized new variable trackers.
  8959. (processTrackerResponse): New function.
  8960. * src/main.cc (main): Use ByteArrayDiskWriter and
  8961. CompactTrackerResponseProcessor.
  8962. * src/TorrentDownloadEngine.cc (afterEachIteration): Call torrentMan->
  8963. processTrackerResponse().
  8964. * src/TorrentConsoleDownloadEngine.cc (printStatistics): Updated a
  8965. readout.
  8966. * src/TorrentDownloadEngine.cc (afterEachIteration): Added log message
  8967. which indicates download has completed.
  8968. * src/AbstractDiskWriter.cc (Destructor): fd >= 0, not fd >0
  8969. (closeFile): fd >= 0, not fd > 0
  8970. * src/main.cc (main): Added short cut for show-files.
  8971. Added short cut for torrent-file.
  8972. Added new command-line option listen-port.
  8973. Updated i18n messages.
  8974. 2006-04-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  8975. To add LogFactory which creates singleton logger:
  8976. * src/LogFactory.h: New class.
  8977. * src/LogFactory.cc: New class.
  8978. * src/Command.h (logger): New variable.
  8979. (Constructor): Use LogFactory.
  8980. * src/AbstractCommand.cc: Use Command::logger
  8981. * src/PeerConnection.cc (Constructor): Deleted the argument logger.
  8982. Use LogFactory.
  8983. * src/SegmentSplitter.h : Made logger protected.
  8984. * src/SegmentSplitter.cc (Constructor): Use LogFactory.
  8985. * src/SegmentMan.cc (Constructor): Use LogFactory.
  8986. * src/DownloadEngine.h : Made logger protected.
  8987. * src/DownloadEngine.cc (Constructor): Use LogFactory.
  8988. * src/PeerInteractionCommand.cc : Use Command::logger.
  8989. * src/HttpResponseCommand.cc : Use Command::logger.
  8990. * src/SegmentMan.h : Made logger private.
  8991. * src/TorrentMan.h : Made logger private.
  8992. * src/TorrentMan.cc : Use LogFactory.
  8993. * src/FtpNegotiateCommand.cc : Use Command::logger.
  8994. * src/HttpConnection.h (Constructor): Deleted the argument logger.
  8995. * src/HttpConnection.cc (Constructor): Deleted the argument logger.
  8996. Use LogFactory.
  8997. * src/FtpConnection.h (Constructor): Deleted the argument logger.
  8998. * src/FtpConnection.cc (Constructor): Deleted the argument logger.
  8999. Use LogFactory.
  9000. * src/DownloadCommand.cc : Use Command::logger.
  9001. * src/PeerAbstractCommand.cc : Use Command::logger.
  9002. * src/PeerListenCommand.cc : Use Command::logger.
  9003. * src/PeerInitiateConnectionCommand.cc : Use Command::logger.
  9004. * src/HttpInitiateConnectionCommand.cc : Use Command::logger.
  9005. * src/FtpInitiateConnectionCommand.cc : Use Command::logger.
  9006. * src/TrackerWatcherCommand.cc : Use Command::logger.
  9007. * src/TrackerUpdateCommand.cc : Use Command::logger.
  9008. * src/TrackerDownloadCommand.cc : Use Command::logger.
  9009. * src/RequestSlotMan.cc (Constructor): Deleted the argument logger.
  9010. Use LogFactory.
  9011. * src/SendMessageQueue.h (Constructor): Deleted the argument logger.
  9012. * src/SendMessageQueue.cc (Constructor): Deleted the argument logger.
  9013. Use LogFactory.
  9014. * src/main.cc (main): Use LogFactory.
  9015. * src/DiskAdaptor.h (logger): New variable.
  9016. * src/DiskAdaptor.cc (Constructor): Use LogFactory.
  9017. * src/CopyDiskAdaptor.cc (fixFilename): Added a log message.
  9018. 2006-04-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9019. * src/TrackerInitCommand.cc (TrackerInitCommand): Added a "key"
  9020. parameter to a tracker request.
  9021. * src/TorrentMan.cc (readFileEntryFromMetaInfoFile): Bug fix.
  9022. * src/TrackerWatcherCommand.cc (execute): Call req->resetTryCount().
  9023. * src/main.cc (setSignalHander): New function.
  9024. (main): Added a handler for SIGTERM.
  9025. (handler): Updated message.
  9026. (torrentHandler): Updated message.
  9027. 2006-04-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9028. * src/TorrentConsoleDownloadEngine.cc
  9029. (onPartialDownloadingCompletes): Renamed as
  9030. onSelectiveDownloadingCompletes.
  9031. (onSelectiveDownloadingCompletes): Updated message.
  9032. To add DiskAdaptor which abstract DiskWriter family:
  9033. * src/PeerConnection.cc: Use diskAdaptor instead of diskWriter.
  9034. * src/PeerInteractionCommand.cc: Use diskAdaptor instead of diskWriter.
  9035. * src/BitfieldMan.cc (isAllBitSet): bug fix.
  9036. * src/TorrentMan.cc : Included CopyDiskAdaptor.h, DirectDiskAdaptor.h,
  9037. MultiDiskAdaptor.h.
  9038. (readFileEntry): Changed its arguments.
  9039. (setup): setupDiskWriter is merged into this function.
  9040. (setupDiskWriter): Removed.
  9041. (setFileFilter): New function.
  9042. (readFileEntryFromMetaInfoFile): Updated according to the changes
  9043. made in readFileEntry.
  9044. (getFilePath): Removed.
  9045. (getTempFilePath): Removed.
  9046. (getSegmentFilePath): Updated due to the removal of getFilePath.
  9047. (fixFilename): Removed.
  9048. (copySingleFile): Removed.
  9049. (splitMultiFile): Removed.
  9050. (deleteTempFile): Removed.
  9051. (setFileEntriesToDownload): Removed.
  9052. (isPartialDownloadingMode): Renamed as isSelectiveDownloadingMode.
  9053. (isSelectiveDownloadingMode): New function.
  9054. (setAllMultiFileRequestedState): Removed.
  9055. (finishPartialDownloadingMode): Renamed as
  9056. finishSelectiveDownloadingMode.
  9057. (finishSelectiveDownloadingMode): New function.
  9058. (getPartialTotalLength): Renamed as getSelectedTotalLength.
  9059. (getSelectedTotalLength): New function.
  9060. (onDownloadComplete): Use diskAdaptor.
  9061. * src/MultiDiskWriter.cc (Constructor): Added the argument pieceLength
  9062. (Range): Removed.
  9063. (setMultiFileEntries): Renamed as setFileEntries.
  9064. (setFileEntries): New function.
  9065. * src/MultiDiskWriter.h [DiskWriterEntry](enabled): Removed.
  9066. (pieceLength): New variable.
  9067. * src/main.cc (printDownloadCompeleteMessage): New function.
  9068. (torrentHandler): Use diskAdaptor instead of diskWriter.
  9069. (main): Renamed torrent-show-files to show-files.
  9070. Rewritten file contents listing.
  9071. * src/TorrentMan.h (FileEntry): Removed.
  9072. (multiFileTopDir): Removed.
  9073. (multiFileEntries): Removed.
  9074. (diskWriter): Removed.
  9075. (diskAdaptor): New variable.
  9076. * src/DefaultDiskWriter.h (totalLength): New variable.
  9077. * src/DefaultDiskWriter.cc (initAndOpenFile): Added ftruncate.
  9078. * src/TorrentDownloadEngine.cc (onEndOfRun): Use diskAdaptor instead of
  9079. diskWriter.
  9080. * src/TorrentConsoleDownloadEngine.h
  9081. (partialDownloadLengthDiff): Renamed as selectedDownloadLengthDiff.
  9082. (partialTotalLength): Renamed as selectedTotalLength.
  9083. * src/AbstractDiskWriter.cc (openFile): If file exists, call
  9084. openExistingFile, otherwise call initAndOpenFile.
  9085. (closeFile): fd > 0, not fd != 0.
  9086. * src/DirectDiskAdaptor.h: New class.
  9087. * src/DirectDiskAdaptor.cc: New class.
  9088. * src/MultiDiskAdaptor.h: New class.
  9089. * src/MultiDiskAdaptor.cc: New class.
  9090. * src/CopyDiskAdaptor.h: New class.
  9091. * src/CopyDiskAdaptor.cc: New class.
  9092. * src/DiskAdaptor.h: New class.
  9093. * src/DiskAdaptor.cc: New class.
  9094. * src/prefs.h (PREF_TORRENT_SHOW_FILES): Renamed as PREF_SHOW_FILES
  9095. (PREF_SHOW_FILES): New definition.
  9096. 2006-04-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9097. To add the ability to download multi torrent into respective files
  9098. directly:
  9099. * src/DiskWriter.h (openFile): New function.
  9100. (seek): Removed.
  9101. * src/MultiDiskWriter.h: New class.
  9102. * src/MultiDiskWriter.cc: New class.
  9103. * src/AbstractDiskWriter.h (seek): Changed its scope from public to
  9104. protected.
  9105. (openFile): New function.
  9106. * src/AbstractDiskWriter.cc (openFile): New function.
  9107. * src/prefs.h (V_FALSE): New definition.
  9108. (PREF_DIRECT_FILE_MAPPING): New definition.
  9109. * src/TorrentMan.h (setupDiskWriter): New function.
  9110. (setAllMultiFileRequestedState): New function.
  9111. (onDownloadComplete): New function.
  9112. * src/TorrentMan.cc : Included MultiDiskWriter.h
  9113. (setupDiskWriter): New function.
  9114. (getFilePath): Updated.
  9115. (getTempFilePath): Updated.
  9116. (getSegmentFilePath): Updated.
  9117. (fixFilename): Updated.
  9118. (deleteTempFile): Updated.
  9119. (setAllMultiFileRequestedState): New function.
  9120. (setFileEntriesToDownload): Use setAllMultiFileRequestedState().
  9121. (finishPartialDownloadingMode): Reset requested flags.
  9122. (onDownloadComplete): New function.
  9123. * src/main.cc: Added --direct-file-mapping option.
  9124. Use TorrentMan::setupDiskWriter().
  9125. * src/TorrentDownloadEngine.cc (afterEachIteration): Use TorrentMan::
  9126. onDownloadComplete().
  9127. To fix ETA bug:
  9128. * src/Util.h (difftvsec): New function.
  9129. * src/Util.cc (difftvsec): New function.
  9130. * src/TorrentConsoleDownloadEngine.cc (calculateSpeed): Use int for the
  9131. type of "elapsed" instead of long long int.
  9132. (calculateStatistics): Use Util::difftvsec instead of Util::difftv.
  9133. The updates of statistics takes place every 1 seconds.
  9134. * src/TorrentConsoleDownloadEngine.h (lastElapsed): Changed its type.
  9135. (calculateSpeed): Changed its argument signature.
  9136. * src/PeerMessage.cc (toString): Fixed message.
  9137. 2006-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9138. To print ETA:
  9139. * src/TorrentDownloadEngine.cc (afterEachIteration): Added download
  9140. completion handling when dealing with
  9141. TorrentMan::isPartialDownloadingMode() == true.
  9142. * src/TorrentDownloadEngine.h (onPartialDownloadingCompletes):
  9143. New function.
  9144. * src/TorrentConsoleDownloadEngine.h (startup): New variable.
  9145. (sessionDownloadLength): New variable.
  9146. (avgSpeed): New variable.
  9147. (eta): New variable.
  9148. * src/TorrentConsoleDownloadEngine.cc (initStatistics): Initialized
  9149. new variables: eta, avgSpeed, startup.
  9150. (calculateSpeed): Calculate average speed and ETA.
  9151. (printStatistics): Added ETA.
  9152. * src/Util.h (secfmt): New function.
  9153. * src/Util.cc (secfmt): New function.
  9154. 2006-04-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9155. To detect "keep alive" flooding:
  9156. * src/PeerInteractionCommand.h (keepAliveCount): New variable
  9157. * src/PeerInteractionCommand.cc (Constructor): Initialized new
  9158. variable: keepAliveCount.
  9159. (detectMessageFlooding): Added "keep alive" flooding detection.
  9160. (receiveMessage): Increase keepAliveCount when "keep alive" message
  9161. received.
  9162. To add the ability to download only specified files in multi-file
  9163. torrent:
  9164. * src/BitfieldMan.h (filterBitfield): New variable.
  9165. (filterEnabled): New variable.
  9166. (setFilterBit): New function.
  9167. (enableFilter): New function.
  9168. (disableFilter): New function.
  9169. (isFilterEnabled): New function.
  9170. (getFilteredTotalLength): New function.
  9171. (getCompletedLength): New function.
  9172. * src/BitfieldMan.cc (Constructor): Initialized new variable:
  9173. filterBitfield, filterEnabled.
  9174. (CopyConstructor): Added filterBitfield and filterEnabled.
  9175. (operator==): Added filterBitfield and filterEnabled.
  9176. (Destructor): Added filterBitfield.
  9177. (getMissingIndex): Use filterBitfield.
  9178. (getMissingUnusedIndex): Use filterBitfield.
  9179. (getFirstMissingUnusedIndex): Use filterBitfield.
  9180. (getFirstMissingUnusedIndex): Use filterBitfield.
  9181. (getAllMissingIndexes): Use filterBitfield.
  9182. (countMissingBlock): Use filterBitfield.
  9183. (countBlock): Use filterBitfield.
  9184. (setBitInternal): Added new argument on.
  9185. (setUseBit): Use setBitInternal.
  9186. (unsetUseBit): Use setBitInternal.
  9187. (setBit): Use setBitInternal.
  9188. (unsetBit): Use setBitInternal.
  9189. (isAllBitSet): Use filterBitfield.
  9190. (setFilterBit): New function.
  9191. (addFilter): New function.
  9192. (enableFilter): New function.
  9193. (disableFilter): New function.
  9194. (clearFilter): New function.
  9195. (isFilterEnabled): New function.
  9196. (getFilteredTotalLength): New function.
  9197. (getCompletedLength): New function.
  9198. * src/TorrentMan.h [FileEntry](Constructor): Updated signature.
  9199. Initalized newly added variables.
  9200. [FileEntry](offset): New variable.
  9201. [FileEntry](extracted): New variable.
  9202. [FileEntry](requested): New variable.
  9203. (readFileEntry): New function.
  9204. (option): New variable.
  9205. (splitMultiFile): Removed const qualifier.
  9206. (fixFilename): Removed const qualifier.
  9207. (readFileEntryFromMetaInfoFile): New function.
  9208. (finishPartialDownloadingMode): New function.
  9209. (isPartialDownloadingMode): New function.
  9210. (setFileEntriesToDownload): New function.
  9211. (getCompletedLength): New function.
  9212. (getPartialTotalLength): New function.
  9213. * src/TorrentMan.cc (readFileEntry): New function.
  9214. (setup): Use readFileEntry. If no-preallocation option is specified,
  9215. use DefaultDiskWriter.
  9216. (readFileEntryFromMetaInfoFile): New function.
  9217. (fixFilename): Removed const qualifier.
  9218. (splitMultiFile): Removed const qualifier.
  9219. (setFileEntriesToDownload): New function.
  9220. (isPartialDownloadingMode): New function.
  9221. (finishPartialDownloadingMode): New function.
  9222. (getCompletedLength): New function.
  9223. (getPartialTotalLength): New function.
  9224. * src/TorrentConsoleDownloadEngine.h (partialDownloadLengthDiff):
  9225. New variable.
  9226. (partialTotalLength): New variable.
  9227. (downloadLength): New variable.
  9228. (totalLength): New variable.
  9229. * src/TorrentConsoleDownloadEngine.cc (onPartialDownloadingCompletes):
  9230. Added log.
  9231. (initStatistics): Initialized new variables: partialDownloadLengthDiff,
  9232. partialTotalLength, downloadLength, totalLength.
  9233. (calculate): Calculate downloadLength and totalLength.
  9234. * src/prefs.h :New definition PREF_NO_PREALLOCATION
  9235. * src/main.cc (addCommand): Changed argument signature.
  9236. (main): Added new variable: args. Added new option "torrent-show-files"
  9237. "no-preallocation". Usage is not updated yet.
  9238. 2006-04-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9239. * src/PeerMessage.cc (setBitfield): Fixed invalid memory de-allocation.
  9240. 2006-04-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9241. Attempt to add the ability to listing file entries in a .torrent file.
  9242. This feature is not yet complete.
  9243. * src/prefs.h (PREF_TORRENT_SHOW_FILES): New definition
  9244. * src/TorrentMan.cc (getMultiFileEntries): New function.
  9245. (getName): New function.
  9246. * src/TorrentMan.h (getMultiFileEntries): New function.
  9247. (getName): New function.
  9248. * src/main.cc (main): Use above 2 funtion.
  9249. * Release 0.3.2
  9250. 2006-03-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9251. * src/PeerInteractionCommand.cc (checkInactiveConnection): New function
  9252. (detectMessageFlooding): Updated threshold value.
  9253. (checkLongTimePeerChoking): Updated timeout value.
  9254. (getNewPieceAndSendInterest): Added debug log.
  9255. * src/PeerInteractionCommand.h (checkInactiveConnection): New function
  9256. * src/TorrentMan.cc (deleteOldErrorPeers): Updated.
  9257. (getPeer): Updated.
  9258. * src/TorrentMan.h: Added MAX_PEER_ERROR.
  9259. * src/PeerAbstractCommand.cc (onAbort): Increment error counter.
  9260. * src/PeerListenCommand.cc (execute): Close connection if incoming peer
  9261. is localhost.
  9262. * src/main.cc (main): Updated PREF_PEER_CONNECTION_TIMEOUT to 60.
  9263. * src/PendingMessage.cc (processMessage): Not to send piece message
  9264. if peer is not interested in the pieces localhost has.
  9265. * src/Peer.cc (shouldChoke): Updated.
  9266. * src/SendMessageQueue.cc (cancelAllRequest): Fixed.
  9267. * src/Util.cc (isPowerOf): New function.
  9268. * src/Util.h (isPowerOf): New function.
  9269. * src/PeerMessageUtil.cc (checkLength): Added a check for length
  9270. whether or not it is power of 2.
  9271. 2006-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9272. Added new class SendMessageQueue that includes PendingMessages and
  9273. RequestSlotMan.
  9274. * src/SendMessageQueue.h: New class.
  9275. * src/SendMessageQueue.cc: New class.
  9276. * src/PendingMessage.h: Added new member variable blockIndex and its
  9277. accessors.
  9278. (createRequestMessage): Updated.
  9279. * src/PendingMessage.cc (createRequestMessage): Updated.
  9280. * src/PeerInteractionCommand.cc (executeInternal): Updated with
  9281. SendMessageQueue.
  9282. (checkLongTimePeerChoking): Updated with SendMessageQueue.
  9283. (receiveMessage): Updated with SendMessageQueue.
  9284. (deletePendingPieceMessage): Removed.
  9285. (getNewPieceAndSendInterest): Updated with SendMessageQueue.
  9286. (sendInterest): Updated with SendMessageQueue.
  9287. (createRequestPendingMessage): Updated with SendMessageQueue.
  9288. (sendMessages): Updated with SendMessageQueue.
  9289. (onAbort): Updated with SendMessageQueue.
  9290. (keepAlive): Updated with SendMessageQueue.
  9291. (beforeSocketCheck): Updated SendMessageQueue.
  9292. * src/PeerInteractionCommand (sendMessages): Shuffle
  9293. missingBLockIndexes before using it.
  9294. Added its own timeout for peer connection.
  9295. * src/PeerAbstractCommand.h: Added member variable timeout and its
  9296. setter.
  9297. * src/prefs.h: Added PREF_PEER_CONNECTION_TIMEOUT.
  9298. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  9299. Added setTimeout() call.
  9300. (executeInternal): Added setTimeout() call.
  9301. * src/PeerAbstractCommand.cc (PeerAbstractCommand):
  9302. Added timeout.
  9303. (isTimeoutDetected): Updated.
  9304. * src/main.cc (main): Added PREF_PEER_CONNECTION_TIMEOUT entry to
  9305. option.
  9306. Added *simple* message flooding checker.
  9307. * src/PeerInteractionCommand.cc (executeInternal):
  9308. Added detectMessageFlooding() call.
  9309. (detectMessageFlooding): New function.
  9310. (receiveMessage): Count up CHOKE, UNCHOKE, HAVE message.
  9311. (beforeSocketCheck): Added detectMessageFlooding() call.
  9312. * src/PeerInteractionCommand.h: Added sendMessageQueue,
  9313. chokeUnchokeCount, haveCount, detectMessageFlooding().
  9314. Removed deletePendingPieceMessage(), getRequestSlot(),
  9315. deleteRequestSlot(), deleteAllRequestSlot().
  9316. * src/PeerInteractionCommand.cc (beforeSocketCheck):
  9317. Added checkLongTimePeerChoking() call.
  9318. * src/RequestSlotMan.h: Renamed deleteTimeoutRequestSlot().
  9319. * src/TorrentMan.cc (addPeer): Delete at most MAX_PEER_LIST_SIZE peers
  9320. if duplicate == false.
  9321. The parameter "uploaded" and "downloaded" in the tracker request are
  9322. the size since the client sent the "started" event to the tracker.
  9323. * src/TorrentMan.cc (setup): Assigned saved downloaded Size and
  9324. uploaded size to preDownloadedSize, preUploadedSize respectively.
  9325. * src/TorrentMan.h: Added preDownloadedSize, preUploadedSize,
  9326. getSessionDownloadedSize(), getSessionUploadedSize().
  9327. * src/TrackerInitCommand.cc (execute): Use getSessionDownloadedSize(),
  9328. getSessionUploadedSize() instead of getDownloadedSize(),
  9329. getUploadedSize().
  9330. * src/PendingMessage.cc (processMessage): Do not send request message
  9331. if the peer is choking the client.
  9332. * src/TrackerUpdateCommand.cc (execute): Check wtheher minInterval is
  9333. less than interval.
  9334. 2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9335. * configure.in: Added gnutls support. Added several CPP macros.
  9336. * m4/openssl.m4: Added.
  9337. * src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
  9338. readData(), peekData(). Added gnutls support.
  9339. * src/HttpDownloadCommand.cc: Removed SleepCommand.h
  9340. * src/TrackerWatcherCommand.{h,cc}: Added. This command creates
  9341. TrackerInitCommand periodicaly(TorrentMan::minInterval).
  9342. * src/TorrentMan.cc: Remove downloadedSize == 0 check from save().
  9343. Instead, added a check for whether setup method has executed
  9344. successfully.
  9345. * src/TorrentMan.h: Added member vaiable setupComplete. Updated
  9346. DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to 300.
  9347. * src/Makefile.am: Updated.
  9348. * src/messageDigest.h: Added. This is a macro calculating SHA1 digest
  9349. using whether OpenSSL or gcrypt, depending on the result of configure
  9350. script.
  9351. * src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by using
  9352. messageDigest.h.
  9353. * src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
  9354. * src/PeerListenCommand.cc: Added log about port binded successfully.
  9355. Fixed memory leak.
  9356. * src/main.cc: Added gnutls support. Replaced LIB_SSL with
  9357. ENABLE_BITTORRENT where they are not related to OpenSSL but BitTorrent.
  9358. Removed instantiation of TrackerInitCommand. Instead,
  9359. TrackerWatcherCommand is instantiated and pushed to the command queue.
  9360. * src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL with
  9361. ENABLE_SSL.
  9362. * src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
  9363. * src/RequestSlotMan.cc (deleteCompletedRequestSlot):
  9364. If a piece is already acquired by another command, delete the request
  9365. slots for the piece.
  9366. * src/TrackerUpdateCommand.cc (execute):
  9367. Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to warn.
  9368. Added a check whether peer list is null.
  9369. Fixed the bug that causes sending completed event to the tracker
  9370. several times.
  9371. * src/TrackerInitCommand.cc (execute):
  9372. Fixed the bug that causes sending completed event to the tracker
  9373. several times.
  9374. * src/AbstractDiskWriter.{h,cc}: Removed direct dependency on OpenSSL
  9375. by using messageDigest.h.
  9376. 2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9377. * PeerConnection.cc: Replaced log message "keep-alive" with
  9378. "keep alive".
  9379. * PeerInteractionCommand.{h,cc}: Close connection if peer is choking
  9380. localhost long time.
  9381. * TorrentMan.cc: When adding new peer with duplicate = true, if the
  9382. number of peer list is equal to or grater than MAX_PEER_LIST, delete
  9383. at most 100 failure entry from the list. If with duplicate = false,
  9384. MAX_PEER_LIST is not checked.
  9385. * PeerListenCommand.cc: Fixed the argument order of log message.
  9386. 2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9387. * Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
  9388. Added warn().
  9389. * SimpleLogger.h: Moved enum LEVEL to Logger.h.
  9390. Implemented warn().
  9391. Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated code.
  9392. 2006-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9393. * Request.h: Added AFTER_COMPLETED event.
  9394. * TorrentDownloadEngine.cc: Prints "Download complete" message
  9395. instead of downloaded size and progress(%) after download completes.
  9396. * PeerInteractionCommand.cc: After download completes, sends unchoke
  9397. message to the peer if it is interested in what localhost has
  9398. downloaded.
  9399. * TorrentMan.cc: In single-file mode, copy temporary file to the final
  9400. destination instead of just renaming it.
  9401. * TorrentMan.cc: Added deleteTempFile().
  9402. * PeerAbstractCommand.cc: do not stop execution after download
  9403. completes. This makes localhost a seeder.
  9404. * Util.{h,cc}: Added fileCopy().
  9405. * PeerListenCommand.cc: do not stop execution after download completes.
  9406. This makes localhost a seeder.
  9407. * main.cc: Do not call TorrentMan::fixFilename() in torrentHandler.
  9408. Added TorrentMan::deleteTempFile() to torrentHandler.
  9409. Initialized the variable dir as ".".
  9410. * TorrentMan.h: Changed DEFAULT_ANNOUNCE_INTERVAL to 120 seconds.
  9411. Deleted renameSingleFile().
  9412. Added copySingleFile(), deleteTempFile().
  9413. * DownloadEngine.h: Added virtual function afterEachIteration().
  9414. * TorrentDownloadEngine.cc: Move a call to TorrentMan::fixFilename()
  9415. in onEndOfRun() to afterEachIteration().
  9416. In onEndOfRun(), changed if condition to check whether filenameFixed is
  9417. true.
  9418. * Util.cc: Implemented fileCopy() using rangedFileCopy().
  9419. In rangedFileCopy(), added try-catch block to properly close file
  9420. descriptors.
  9421. * TorrentDownloadEngine.cc: Added a member variable filenameFixed.
  9422. Added afterEachIteration(), isFilenameFixed().
  9423. * Peer.cc: Changed choking strategy.
  9424. * PreAllocationDiskWriter.cc: Drop O_DIRECT flag.
  9425. * TrackerInitCommand.cc: Send completed event only once.
  9426. * DownloadEngine.cc: Added a call to afterEachIteration().
  9427. * TrackerUpdateCommand.cc: Do not stop execution after download
  9428. completes.
  9429. * TorrentMan.h: Defined MAX_PEER_UPDATE as 15. aria2 attempts to
  9430. connect the peers at most MAX_PEER_UPDATE when a peer list is
  9431. received from a tracker.
  9432. * TrackerUpdateCommand.cc: Implemented above mentioned behavior.
  9433. Decreased the number of failure peers to delete to 0(just comment out
  9434. the line).
  9435. * Release 0.3.1
  9436. 2006-03-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9437. * PeerInteractionCommand.cc: added a call to
  9438. TorrentMan::unadvertisePiece in Destructor.
  9439. * PeerInteractionCommand.cc: make have message sent immediately
  9440. if the size of pending message queue is zero.
  9441. * TorrentMan.cc: set the maximum size of peer list to 250.
  9442. * TorrentMan.h: changed the container type of Peers and UsedPieces
  9443. to deque.
  9444. * Util.cc: fixed rangedFileCopy.
  9445. * AbstractDiskWriter.{h,cc}: moved digest context initialization
  9446. to Constructor. Also, moved digest cleanup to Destructor.
  9447. * MetaFileUtil.cc: fixed memory leak
  9448. * replaced std::vector with std::deque.
  9449. * AbstractCommand.cc: casted timeout value to long long int.
  9450. * ChunkedEncoding.cc: fixed memory leak.
  9451. * PeerInteractionCommand.cc: casted timeout value to long long int.
  9452. * SleepCommand.cc: casted timeout value to long long int.
  9453. * Data.cc: fixed memory leak.
  9454. * Data.cc: fixed toLLInt().
  9455. * BitfieldMan.cc: fixed memory leak.
  9456. * TorrentMan.cc: initialized storeDir to ".".
  9457. * TorrentMan.cc: fixed memory leak.
  9458. * TorrentMan.cc: corrected file paths of splitted files.
  9459. * PeerAbstractCommand.cc: casted timeout to long long int.
  9460. * main.cc: added delete(req) and delete(te->diskWriter).
  9461. * RequestSlot.cc: casted timeout value to long long int.
  9462. * Request.cc: fixed memory leak.
  9463. * PendingMessage.cc: make HAVE messages sent only when peer does not
  9464. have the piece.
  9465. * Peer.{h,cc}: added hasPiece(int index).
  9466. * main.cc: corrected addCommand.
  9467. 2006-03-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9468. * BitTorrent protocol support added.
  9469. * Release 0.3.0
  9470. 2006-03-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9471. * SocketCore.cc: remove the assignment of addrinfo.ai_addr.
  9472. 2006-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9473. * ChunkedEncoding.{h,cc}: fixed the bug that if chunk data is binary,
  9474. decoding did not work properly.
  9475. 2006-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9476. * DownloadEngine.h: included sys/time.h
  9477. * DownloadEngine.cc: remove sys/time.h
  9478. * Makefile.am (SUBDIRS): Add intl.
  9479. * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
  9480. 2006-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9481. * main.cc: correct help message for --http-auth-scheme.
  9482. * main.cc: changed e-mail address for bug reports.
  9483. * ja.po: added japanese translation.
  9484. 2006-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9485. * SimpleLogger.cc: flush log file instead of stdout.
  9486. 2006-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9487. * main.cc: Fixed command-line option: max-tries
  9488. * HttpResponseCommand.cc: Make the request re-sent only if req->seg.sp
  9489. does not equal to seg.sp.
  9490. * DownloadCommand.cc: If EOF is got from the server and the total size
  9491. of file is not zero, then throw DlRetryEx.
  9492. * main.cc: Set the minium value of min-segment-size to 1024.
  9493. * HttpResponseCommand.cc: Fixed the bug that http segmented downloading
  9494. fails because of a regression since 0.2.0 release.
  9495. 2006-03-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9496. * HttpConnection.cc:
  9497. * common.h: defined the user agent name as macro
  9498. * DownloadEngine.{h, cc}:
  9499. * ConsoleDownloadEngine.{h, cc}: Console output message(size, speed)
  9500. is now generated by ConsoleDownloadEngine not by DownloadEngine.
  9501. * main.cc: Download complete/abort message is now generated by main.
  9502. * Makefile.am (SUBDIRS): Add m4.
  9503. (ACLOCAL_AMFLAGS): New variable.
  9504. (EXTRA_DIST): New variable.
  9505. * configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
  9506. * gettext: added gettext functionality
  9507. 2006-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9508. * AbstractCommand.cc:
  9509. * DownloadCommand.{h, cc}: Aborted downloading commands now properly
  9510. unregister its cuid from SegmentMan.
  9511. * DownloadEngine.cc: .aria2 file was written when a downloading
  9512. failed with errors.
  9513. * HttpConnection.cc: Added "Proxy-Connection" header to proxy request.
  9514. Added "User-Agent" header to CONNECT proxy request.
  9515. Fixed "Proxy-Authorization" header. Now proxy authorization works
  9516. properly.
  9517. * Logger.h:
  9518. * SimpleLogger.{h,cc}: Changed the type of msg to const char*.
  9519. * ChunkedEncoding.cc: Added #include directive for strings.h
  9520. * Release 0.2.1
  9521. 2006-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9522. * Util.{h,cc}: added startsWith().
  9523. * CookieBox.cc: rewrited criteriaFind() using Util::startsWith() and
  9524. Util::endsWith().
  9525. * SocketCore.cc: struct addrinfo is now zero-initialized.
  9526. * common.h: added #include directive of limit.h.
  9527. * DownloadEngine.cc: added #include directive of sys/time.h and
  9528. algorithm.
  9529. * Exception.h: added #include directive of stdio.h.
  9530. * AbstractCommand.h: added #include directive of sys/time.h.
  9531. * DownloadCommand.h: added #include directive of sys/time.h.
  9532. * *.h: added #include directive of common.h to all base classes.
  9533. subclasses' one was removed.
  9534. * common.h: defined LONG_LONG_MAX and LONG_LONG_MIN if a compiler
  9535. does not define these macros.
  9536. 2006-02-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9537. * Release 0.2.0
  9538. * main.cc:
  9539. * HttpInitiateConnectionCommand.{h,cc}:
  9540. * prefs.h:
  9541. * HttpConnection.{h,cc}: added --http-proxy-method option.
  9542. We can now use GET command in http proxy.
  9543. 2006-02-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9544. * SplitSlowestSegmentSplitter.{h,cc}: This class provies algorithm
  9545. that splits slowest segment of SegmentMan::commands vector.
  9546. This is the default split algorithm of aria2.
  9547. * SplitFirstSegmentSplitter.{h,cc}: This class provides algorithm
  9548. that splits first segment of SegmentMan::commands vector.
  9549. * SegmentSplitter.{h,cc}: Added. This class provides split algorithm.
  9550. * DownloadCommand.{h,cc}: Added downloading speed calculation.
  9551. * Segment.h:
  9552. * SegmentMan.cc: Added speed field to Segment.h
  9553. * main.cc: -s option now affects all URLs in command-line arguemtns.
  9554. * HttpResponseCommand.cc: Fixed bug that segment file is not loaded.
  9555. * message.h: Change file size related %d to %lld.
  9556. 2006-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9557. * FtpInitiateConnectionCommand.{h,cc}:
  9558. * FtpNegotiationCommand.{h,cc}:
  9559. * FtpDownloadCommand.{h,cc}:
  9560. * FtpConnection.{h,cc}: Added FTP support
  9561. * SimpleLogger.cc: Log message now includes time information.
  9562. * main.cc: The value of --http-auth-scheme option is chagned from
  9563. 'BASIC' to 'basic'
  9564. * main.cc: Added --timeout command-line option.
  9565. * main.cc: Added --min-segment-size command-line option.
  9566. * main.cc: Added --max-retries command-line option.
  9567. * prefs.h: option string constants are now defined in prefs.h
  9568. 2006-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9569. * AbstractCommand.cc: Fixed timeout bug in AbstractCommand
  9570. * SegmentMan.cc: Added totalSize entry to .aria2 file. No compatibility
  9571. with version 0.1.0's one.
  9572. 2006-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  9573. * configure.in: Added --enable-ssl option to configure script.
  9574. * HttpConnection.cc: Make Request-URI an absolute path. Some servers
  9575. cannot permit absoluteURI as Request-URI.
  9576. * HttpConnection.cc: Added Referer support.
  9577. * main.cc: Added referer command-line option.
  9578. * main.cc: Added rety-wait command-line option.
  9579. * Exception.h: Fixed formating bug in Exception::setMsg()
  9580. * SocketCore.{h,cc}:
  9581. * Socket.{h, cc}:
  9582. * Request.cc:
  9583. * InitiateConnectionCommandFactory.cc:
  9584. * HttpRequestCommand.cc: Added HTTPS support.
  9585. * SocketCore.{h,cc}: Added SocketCore. Socket becomes a handle class
  9586. for SocketCore.
  9587. * ChunkedEncoding.cc: Fixed bug in ChunkedEncoding: expanding buffer
  9588. size is wrong
  9589. * DownloadCommand.cc: Fixed bug in DownloadCommand: In Chunked
  9590. Encoding, it wrongly adds to Segment.ds buff length from the socket.
  9591. 2006-02-17 Tatsuhiro Tsujikawa <tsujikawa at rednoah dot com>
  9592. * Release 0.1.0