consumer read ahead and int32_t migration
[melted] / src / miracle / miracle_unit_commands.c
index f38ff3a..af242a4 100644 (file)
@@ -56,7 +56,7 @@ int miracle_load( command_argument cmd_arg )
                return RESPONSE_INVALID_UNIT;
        else
        {
-               int64_t in = -1, out = -1;
+               int32_t in = -1, out = -1;
                if ( valerie_tokeniser_count( cmd_arg->tokeniser ) == 5 )
                {
                        in = atol( valerie_tokeniser_get_string( cmd_arg->tokeniser, 3 ) );
@@ -207,7 +207,7 @@ int miracle_append( command_argument cmd_arg )
                return RESPONSE_INVALID_UNIT;
        else
        {
-               int64_t in = -1, out = -1;
+               int32_t in = -1, out = -1;
                if ( valerie_tokeniser_count( cmd_arg->tokeniser ) == 5 )
                {
                        in = atol( valerie_tokeniser_get_string( cmd_arg->tokeniser, 3 ) );
@@ -249,10 +249,7 @@ int miracle_stop( command_argument cmd_arg )
        if ( unit == NULL )
                return RESPONSE_INVALID_UNIT;
        else 
-       {
-               miracle_unit_play( unit, 0 );
                miracle_unit_terminate( unit );
-       }
        return RESPONSE_SUCCESS;
 }
 
@@ -400,8 +397,7 @@ int miracle_get_unit_property( command_argument cmd_arg )
 
 int miracle_transfer( command_argument cmd_arg )
 {
-       /*
-       dv_unit src_unit = miracle_get_unit(cmd_arg->unit);
+       miracle_unit src_unit = miracle_get_unit(cmd_arg->unit);
        int dest_unit_id = -1;
        char *string = (char*) cmd_arg->argument;
        if ( string != NULL && ( string[ 0 ] == 'U' || string[ 0 ] == 'u' ) && strlen( string ) > 1 )
@@ -409,13 +405,12 @@ int miracle_transfer( command_argument cmd_arg )
        
        if ( src_unit != NULL && dest_unit_id != -1 )
        {
-               dv_unit dest_unit = miracle_get_unit( dest_unit_id );
-               if ( dest_unit != NULL && !dv_unit_is_offline(dest_unit) && dest_unit != src_unit )
+               miracle_unit dest_unit = miracle_get_unit( dest_unit_id );
+               if ( dest_unit != NULL && !miracle_unit_is_offline(dest_unit) && dest_unit != src_unit )
                {
-                       dv_unit_transfer( dest_unit, src_unit );
+                       miracle_unit_transfer( dest_unit, src_unit );
                        return RESPONSE_SUCCESS;
                }
        }
-       */
        return RESPONSE_INVALID_UNIT;
 }