static
void
globus_l_ftp_client_restart_plugin_genericify(
    globus_l_ftp_client_restart_plugin_t *	d)
{
    if(d->source_url)
    {
        globus_libc_free(d->source_url);
	    d->source_url = NULL;
        globus_ftp_client_operationattr_destroy(&d->source_attr);
    }
    if(d->dest_url)
    {
        globus_libc_free(d->dest_url);
        d->dest_url = NULL;
        globus_ftp_client_operationattr_destroy(&d->dest_attr);
    }

    d->operation = GLOBUS_FTP_CLIENT_IDLE;
    d->abort_pending = GLOBUS_FALSE;
}
Beispiel #2
0
void gw_tm_ftp_transfer_cancel_cb(	void *                      user_arg,
                                   	globus_gass_copy_handle_t * handle,
                                   	globus_object_t *           err)
{
	int xfr_id;
	gw_tm_ftp_transfer_t * xfr;	
	xfr_id = *( (int *) user_arg );
	
	if ( ( xfr_id < GW_TM_FTP_XFR_POOL_MAX ) && (xfr_id >= 0 ) )
	    if ( gw_tm_ftp_xfr_pool[xfr_id] != NULL )
	    	xfr = gw_tm_ftp_xfr_pool[xfr_id];
	    else
	    {
	    	free(user_arg);
	    	return;
	    }
	else
	{
    	free(user_arg);
		return;	
	}
	
   	free(user_arg);
	        
	globus_ftp_client_handle_destroy (&(xfr->handle));
    globus_ftp_client_handleattr_destroy (&(xfr->attr));
	
	globus_ftp_client_operationattr_destroy (&(xfr->op_attr));
	globus_ftp_client_operationattr_destroy (&(xfr->src_op_attr));
	
	globus_gass_copy_handle_destroy (&(xfr->gass_handle));
	globus_gass_copy_handleattr_destroy(&(xfr->gass_handel_attr));
	
	/* THERE IS NO FUNCTION TO DESTROY 	globus_gass_copy_attr_t */
	/*
	globus_gass_copy_attr_destroy(&(xfr->gass_attr));
	globus_gass_copy_attr_destroy(&(xfr->src_gass_attr));
	*/

	if ( xfr->current_xfr.src_url != NULL )
		free(xfr->current_xfr.src_url);	
		
	if ( xfr->current_xfr.dst_url != NULL )
		free(xfr->current_xfr.dst_url);
	
	if ( xfr->list_buffer != NULL )
		free(xfr->list_buffer);
		
	if ( xfr->read_buffer != NULL )
		free(xfr->read_buffer);	
		
	if ( xfr->base_dir != NULL )
		free(xfr->base_dir);

    gw_tm_ftp_stack_destroy(&(xfr->file_stack));
	gw_tm_ftp_queue_destroy(&(xfr->url_queue));	
	
	printf("END %i - SUCCESS -\n",xfr_id);
	
   	free(gw_tm_ftp_xfr_pool[xfr_id]);
   	
    gw_tm_ftp_xfr_pool[xfr_id]  = NULL;
	
}