Reverting formatting change in freerdp.c - was made by error with an auto-indenting tool

This commit is contained in:
LittleJawa 2012-02-27 10:13:39 +01:00
parent 9546df9300
commit 284b6a54fd

View File

@ -49,17 +49,19 @@ boolean freerdp_connect(freerdp* instance) {
IFCALLRET(instance->PreConnect, status, instance);
if (status != true) {
if (status != true)
{
printf("freerdp_pre_connect failed\n");
return false;
}
status = rdp_client_connect(rdp);
if (status) {
if (instance->settings->dump_rfx) {
instance->update->pcap_rfx = pcap_open(
instance->settings->dump_rfx_file, true);
if (status)
{
if (instance->settings->dump_rfx)
{
instance->update->pcap_rfx = pcap_open(instance->settings->dump_rfx_file, true);
if (instance->update->pcap_rfx)
instance->update->dump_rfx = true;
}
@ -68,12 +70,14 @@ boolean freerdp_connect(freerdp* instance) {
IFCALLRET(instance->PostConnect, status, instance);
if (status != true) {
if (status != true)
{
printf("freerdp_post_connect failed\n");
return false;
}
if (instance->settings->play_rfx) {
if (instance->settings->play_rfx)
{
STREAM* s;
rdpUpdate* update;
pcap_record record;
@ -85,8 +89,8 @@ boolean freerdp_connect(freerdp* instance) {
instance->update->play_rfx = true;
update = instance->update;
while (instance->update->play_rfx && pcap_has_next_record(
update->pcap_rfx)) {
while (instance->update->play_rfx && pcap_has_next_record(update->pcap_rfx))
{
pcap_get_next_record_header(update->pcap_rfx, &record);
s->data = xrealloc(s->data, record.length);
@ -109,8 +113,8 @@ boolean freerdp_connect(freerdp* instance) {
return status;
}
boolean freerdp_get_fds(freerdp* instance, void** rfds, int* rcount,
void** wfds, int* wcount) {
boolean freerdp_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount)
{
rdpRdp* rdp;
rdp = instance->context->rdp;
@ -119,7 +123,8 @@ boolean freerdp_get_fds(freerdp* instance, void** rfds, int* rcount,
return true;
}
boolean freerdp_check_fds(freerdp* instance) {
boolean freerdp_check_fds(freerdp* instance)
{
int status;
rdpRdp* rdp;
@ -133,12 +138,13 @@ boolean freerdp_check_fds(freerdp* instance) {
return true;
}
static int freerdp_send_channel_data(freerdp* instance, int channel_id,
uint8* data, int size) {
static int freerdp_send_channel_data(freerdp* instance, int channel_id, uint8* data, int size)
{
return rdp_send_channel_data(instance->context->rdp, channel_id, data, size);
}
boolean freerdp_disconnect(freerdp* instance) {
boolean freerdp_disconnect(freerdp* instance)
{
rdpRdp* rdp;
rdp = instance->context->rdp;
@ -147,12 +153,14 @@ boolean freerdp_disconnect(freerdp* instance) {
return true;
}
boolean freerdp_shall_disconnect(freerdp* instance) {
boolean freerdp_shall_disconnect(freerdp* instance)
{
return instance->context->rdp->disconnect;
}
void freerdp_get_version(int* major, int* minor, int* revision) {
void freerdp_get_version(int* major, int* minor, int* revision)
{
if (major != NULL)
*major = FREERDP_VERSION_MAJOR;
@ -170,7 +178,8 @@ void freerdp_get_version(int* major, int* minor, int* revision) {
*
* @param instance - Pointer to the rdp_freerdp structure that will be initialized with the new context.
*/
void freerdp_context_new(freerdp* instance) {
void freerdp_context_new(freerdp* instance)
{
rdpRdp* rdp;
rdp = rdp_new(instance);
@ -204,7 +213,8 @@ void freerdp_context_new(freerdp* instance) {
* @param instance - Pointer to the rdp_freerdp structure that was initialized by a call to freerdp_context_new().
* On return, the fields associated to the context are invalid.
*/
void freerdp_context_free(freerdp* instance) {
void freerdp_context_free(freerdp* instance)
{
if (instance->context == NULL)
return;
@ -217,14 +227,16 @@ void freerdp_context_free(freerdp* instance) {
instance->context = NULL;
}
uint32 freerdp_error_info(freerdp* instance) {
uint32 freerdp_error_info(freerdp* instance)
{
return instance->context->rdp->errorInfo;
}
/** Allocator function for the rdp_freerdp structure.
* @return an allocated structure filled with 0s. Need to be deallocated using freerdp_free()
*/
freerdp* freerdp_new() {
freerdp* freerdp_new()
{
freerdp* instance;
instance = xzalloc(sizeof(freerdp));
@ -241,8 +253,10 @@ freerdp* freerdp_new() {
* @param instance - pointer to the rdp_freerdp structure to deallocate.
* On return, this pointer is not valid anymore.
*/
void freerdp_free(freerdp* instance) {
if (instance) {
void freerdp_free(freerdp* instance)
{
if (instance)
{
xfree(instance);
}
}