Esempio n. 1
0
static void connectToLocalHost(PluginData* data)
{
    struct VICEConnection* conn = 0;

    // Kill the current connection if we have one

    if (data->conn)
    {
        VICEConnection_destroy(data->conn);
        data->conn = 0;
    }

    conn = VICEConnection_create(VICEConnectionType_Connect, 6510);

    if (!VICEConnection_connect(conn, "localhost", 6510))
    {
        VICEConnection_destroy(conn);

        data->conn = 0;
        data->state = PDDebugState_noTarget;

        return;
    }

    data->conn = conn;
	data->state = PDDebugState_running;
}
Esempio n. 2
0
void destroyInstance(void* userData)
{
    PluginData* plugin = (PluginData*)userData;

    if (plugin->process.pid > 0)
		uv_kill(plugin->process.pid, 2);

    if (plugin->conn)
        VICEConnection_destroy(plugin->conn);

    free(plugin);
}
void destroy_instance(void* user_data) {
    PluginData* plugin = (PluginData*)user_data;

    if (plugin->process.pid > 0) {
        uv_kill(plugin->process.pid, 2);
	}

    if (plugin->conn) {
        VICEConnection_destroy(plugin->conn);
	}

    free(plugin);
}