ChangeLog 301 KB

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