Fixes bug #16474 about uploading an add-on, still needs testing.

This commit is contained in:
Guillermo Biset 2010-08-19 19:30:09 +00:00
parent 0c1567d8a4
commit 390d678e2b
3 changed files with 39 additions and 23 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<XMI verified="false" xmi.version="1.2" timestamp="2010-05-31T16:49:14" xmlns:UML="http://schema.omg.org/spec/UML/1.3">
<XMI verified="false" xmi.version="1.2" timestamp="2010-08-06T16:12:43" xmlns:UML="http://schema.omg.org/spec/UML/1.3">
<XMI.header>
<XMI.documentation>
<XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
@ -229,7 +229,7 @@
<UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4f7lG0z7OmID" name="~ client"/>
</UML:Classifier.feature>
</UML:Class>
<UML:Class visibility="public" isSpecification="false" namespace="mBrYb81eB7nZ" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="Jw6DueJMoPsA" name="send_predicate">
<UML:Class visibility="public" isSpecification="false" namespace="mBrYb81eB7nZ" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="Jw6DueJMoPsA" name="client_predicate">
<UML:Classifier.feature>
<UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="true" isLeaf="false" isRoot="false" xmi.id="dTLBC8YVmUFh" name="selects">
<UML:BehavioralFeature.parameter>
@ -432,29 +432,29 @@
</UML:Namespace.ownedElement>
<XMI.extension xmi.extender="umbrello">
<diagrams>
<diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="1" snapy="10" linewidth="0" showattsig="1" showpubliconly="0" showpackage="0" showstereotype="0" name="class diagram" font="Sans Serif,12,-1,5,50,0,0,0,0,0" canvasheight="1005" canvaswidth="1715" localid="" snapcsgrid="0" showgrid="0" showops="1" usefillcolor="1" fillcolor="#ffffc0" zoom="100" xmi.id="SiK2R6stUvFt" documentation="" showscope="1" snapgrid="0" showatts="1" type="1">
<diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="1" snapy="10" linewidth="0" showattsig="1" showpubliconly="0" showpackage="0" showstereotype="0" name="class diagram" font="Sans Serif,12,-1,5,50,0,0,0,0,0" canvasheight="1005" canvaswidth="1563" localid="" snapcsgrid="0" showgrid="0" showops="1" usefillcolor="1" fillcolor="#ffffc0" zoom="100" xmi.id="SiK2R6stUvFt" documentation="" showscope="1" snapgrid="0" showatts="1" type="1">
<widgets>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="469" showattsigs="601" y="336" showattributes="1" font="Sans Serif,12,-1,5,50,0,0,0,0,0" drawascircle="0" width="393" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="DDzCwgjwfTsO" showscope="1" height="50" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="879" showattsigs="601" y="217" showattributes="1" font="Sans Serif,12,-1,5,50,0,0,0,0,0" drawascircle="0" width="584" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="zFJb40w8Ghjc" showscope="1" height="70" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="84" showattsigs="601" y="488" showattributes="1" font="Sans Serif,12,-1,5,50,1,0,0,0,0" drawascircle="0" width="447" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="zccH0m6ttqiX" showscope="1" height="104" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="575" showattsigs="601" y="487" showattributes="1" font="Sans Serif,12,-1,5,75,1,0,0,0,0" drawascircle="0" width="908" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="y5iKdovstF77" showscope="1" height="123" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="451" showattsigs="601" y="192" showattributes="1" font="Sans Serif,12,-1,5,75,1,0,0,0,0" drawascircle="0" width="391" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="QYQ81CGRwMrT" showscope="1" height="85" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="84" showattsigs="601" y="488" showattributes="1" font="Sans Serif,12,-1,5,50,0,0,0,0,0" drawascircle="0" width="447" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="zccH0m6ttqiX" showscope="1" height="104" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="575" showattsigs="601" y="487" showattributes="1" font="Sans Serif,12,-1,5,50,0,0,0,0,0" drawascircle="0" width="908" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="y5iKdovstF77" showscope="1" height="123" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="451" showattsigs="601" y="192" showattributes="1" font="Sans Serif,12,-1,5,50,0,0,0,0,0" drawascircle="0" width="391" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="QYQ81CGRwMrT" showscope="1" height="85" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="460" showattsigs="601" y="416" showattributes="1" font="Sans Serif,12,-1,5,50,0,0,0,0,0" drawascircle="0" width="411" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="XWWAQV9oTCkM" showscope="1" height="50" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="203" showattsigs="601" y="68" showattributes="1" font="Sans Serif,12,-1,5,50,0,0,0,0,0" drawascircle="0" width="238" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="Jw6DueJMoPsA" showscope="1" height="50" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="203" showattsigs="601" y="68" showattributes="1" font="Sans Serif,12,-1,5,75,1,0,0,0,0" drawascircle="0" width="240" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="Jw6DueJMoPsA" showscope="1" height="47" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="546" showattsigs="601" y="31" showattributes="1" font="Sans Serif,12,-1,5,50,0,0,0,0,0" width="597" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="tM3eoIJ9SXyK" showscope="1" height="125" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="361" showattsigs="601" y="649" showattributes="1" font="Sans Serif,12,-1,5,50,1,0,0,0,0" drawascircle="0" width="653" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="sBvfcZwLzeoC" showscope="1" height="133" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="786" showattsigs="601" y="809" showattributes="1" font="Sans Serif,12,-1,5,75,0,0,0,0,0" width="366" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="g5Nu2Vyx7Iwk" showscope="1" height="85" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="361" showattsigs="601" y="649" showattributes="1" font="Sans Serif,12,-1,5,50,0,0,0,0,0" drawascircle="0" width="653" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="sBvfcZwLzeoC" showscope="1" height="133" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="786" showattsigs="601" y="809" showattributes="1" font="Sans Serif,12,-1,5,50,0,0,0,0,0" width="366" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="g5Nu2Vyx7Iwk" showscope="1" height="85" showopsigs="601"/>
<enumwidget width="141" x="203" y="796" usesdiagramusefillcolor="0" usesdiagramfillcolor="0" isinstance="0" fillcolor="#ffffc0" height="114" linecolor="#ff0000" xmi.id="3B0vn1vHgFWq" showpackage="0" usefillcolor="1" linewidth="none" font="Sans Serif,12,-1,5,75,1,0,0,0,0"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="381" showattsigs="601" y="916" showattributes="1" font="Sans Serif,12,-1,5,75,0,0,0,0,0" width="505" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="GQmmp3EdIBp7" showscope="1" height="85" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="1182" showattsigs="601" y="703" showattributes="1" font="Sans Serif,12,-1,5,75,0,0,0,0,0" width="344" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="JmNEH4Et10uf" showscope="1" height="123" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="1040" showattsigs="601" y="326" showattributes="1" font="Sans Serif,12,-1,5,75,0,0,0,0,0" width="519" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="Pj2lCSl9hiuY" showscope="1" height="104" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="1182" showattsigs="601" y="703" showattributes="1" font="Sans Serif,12,-1,5,50,0,0,0,0,0" width="344" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="JmNEH4Et10uf" showscope="1" height="123" showopsigs="601"/>
<classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="0" x="1040" showattsigs="601" y="326" showattributes="1" font="Sans Serif,12,-1,5,50,0,0,0,0,0" width="519" isinstance="0" usefillcolor="1" fillcolor="#ffffc0" xmi.id="Pj2lCSl9hiuY" showscope="1" height="104" showopsigs="601"/>
</widgets>
<messages/>
<associations>
<assocwidget indexa="1" indexb="1" widgetaid="tM3eoIJ9SXyK" linecolor="none" totalcounta="2" xmi.id="HELEzIdwZESY" widgetbid="Jw6DueJMoPsA" totalcountb="2" type="500" linewidth="none">
<linepath>
<startpoint startx="546" starty="93"/>
<endpoint endx="441" endy="93"/>
<endpoint endx="443" endy="93"/>
</linepath>
</assocwidget>
<assocwidget indexa="1" indexb="2" widgetaid="zccH0m6ttqiX" linecolor="none" totalcounta="4" xmi.id="QEtkrYQr9no5" widgetbid="QYQ81CGRwMrT" totalcountb="3" type="500" linewidth="none">
@ -470,8 +470,8 @@
<endpoint endx="305" endy="592"/>
<point x="305" y="695"/>
</linepath>
<floatingtext width="18" x="329" y="667" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="24" role="701" linecolor="none" xmi.id="T5O3q6wAnpzO" usefillcolor="1" linewidth="none" font="Sans Serif,12,-1,5,50,0,0,0,0,0" text="1" pretext=""/>
<floatingtext width="18" x="307" y="595" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="24" role="702" linecolor="none" xmi.id="XwbFdfG7RI3N" usefillcolor="1" linewidth="none" font="Sans Serif,12,-1,5,50,0,0,0,0,0" text="1" pretext=""/>
<floatingtext width="18" x="329" y="667" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="24" role="701" linecolor="none" xmi.id="W6vmpdmVEdAk" usefillcolor="1" linewidth="none" font="Sans Serif,12,-1,5,50,0,0,0,0,0" text="1" pretext=""/>
<floatingtext width="18" x="307" y="595" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="24" role="702" linecolor="none" xmi.id="cWZakILTvPwm" usefillcolor="1" linewidth="none" font="Sans Serif,12,-1,5,50,0,0,0,0,0" text="1" pretext=""/>
</assocwidget>
<assocwidget indexa="2" indexb="1" widgetaid="y5iKdovstF77" linecolor="none" totalcounta="4" xmi.id="hSjkRdYFmTAe" widgetbid="sBvfcZwLzeoC" totalcountb="2" type="501" linewidth="none">
<linepath>
@ -479,8 +479,8 @@
<endpoint endx="1014" endy="719"/>
<point x="1117" y="719"/>
</linepath>
<floatingtext width="18" x="1119" y="612" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="24" role="701" linecolor="none" xmi.id="lQK2NYcpe0sS" usefillcolor="1" linewidth="none" font="Sans Serif,12,-1,5,50,0,0,0,0,0" text="1" pretext=""/>
<floatingtext width="16" x="1016" y="693" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="24" role="702" linecolor="none" xmi.id="6ncsaZE7UpM5" usefillcolor="1" linewidth="none" font="Sans Serif,12,-1,5,50,0,0,0,0,0" text="*" pretext=""/>
<floatingtext width="18" x="1119" y="612" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="24" role="701" linecolor="none" xmi.id="DnwUYbw5hsrW" usefillcolor="1" linewidth="none" font="Sans Serif,12,-1,5,50,0,0,0,0,0" text="1" pretext=""/>
<floatingtext width="16" x="1016" y="693" usesdiagramusefillcolor="1" posttext="" usesdiagramfillcolor="1" isinstance="0" fillcolor="none" height="24" role="702" linecolor="none" xmi.id="TczgD9QnezNO" usefillcolor="1" linewidth="none" font="Sans Serif,12,-1,5,50,0,0,0,0,0" text="*" pretext=""/>
</assocwidget>
<assocwidget indexa="1" indexb="1" widgetaid="QYQ81CGRwMrT" linecolor="none" totalcounta="2" xmi.id="P3KDIpYKJYCk" widgetbid="zFJb40w8Ghjc" totalcountb="2" type="502" linewidth="none">
<linepath>
@ -710,7 +710,7 @@
<listitem open="0" type="829" id="bclDUbD9wxa7"/>
<listitem open="0" type="829" id="5qJAbrZtXTJy"/>
</listitem>
<listitem open="1" type="830" id="Datatypes">
<listitem open="0" type="830" id="Datatypes">
<listitem open="0" type="829" id="hAyu5Leen5d0"/>
<listitem open="0" type="829" id="1sDvYH7ynV4m"/>
<listitem open="0" type="829" id="vUr5BtbljVgK"/>

View file

@ -53,6 +53,9 @@ void asio_sender::send(ana::detail::shared_buffer buffer ,
running_timer, op_id, true ) );
}
stats_collector().start_send_packet( buffer->size()
+ ( raw_mode() ? 0 : ana::HEADER_LENGTH ) );
if ( raw_mode() )
{
socket.async_write_some( boost::asio::buffer(buffer->base(), buffer->size() ),
@ -62,8 +65,6 @@ void asio_sender::send(ana::detail::shared_buffer buffer ,
}
else
{
stats_collector().start_send_packet( buffer->size() + ana::HEADER_LENGTH );
ana::ana_uint32 size( buffer->size() );
ana::host_to_network_long( size );

View file

@ -881,7 +881,9 @@ size_t ana_network_manager::send_raw_data( const char* base_char,
ana_component_set::iterator it;
it = std::find_if( components_.begin(), components_.end(),
boost::bind(&ana_component::get_id, _1) == id );
(boost::bind(&ana_component::get_wesnoth_id, _1) == connection_num)
|| (boost::bind(&ana_component::get_id, _1) == id ) );
//Make a broad attempt at finding it, test for both ANA's id and the assigned one.
if ( it != components_.end())
{
@ -899,8 +901,12 @@ size_t ana_network_manager::send_raw_data( const char* base_char,
}
else
{
for (it = components_.begin(); it != components_.end(); ++it)
if ( components_.size() == 0 )
return 0;
else
{
it = components_.begin();
if ((*it)->is_server())
{
ana_send_handler handler; //, ana::ZERO_COPY);
@ -911,10 +917,19 @@ size_t ana_network_manager::send_raw_data( const char* base_char,
else
return size;
}
else
{
ana_send_handler handler;
(*it)->client()->send( ana::buffer( base_char, size ), &handler);
handler.wait_completion();
if ( handler.error() )
return 0;
else
return size;
}
}
}
return 0;
}
void ana_network_manager::send_all_except(const config& cfg, network::connection connection_num)