|
|
@ -55,10 +55,11 @@ datagramServiceNextMessage(void * _this, TR_RemoteData * data) |
|
|
{ |
|
|
{ |
|
|
TR_CommEndPoint comm = _this; |
|
|
TR_CommEndPoint comm = _this; |
|
|
TR_ProtoMessage ret_message = NULL; |
|
|
TR_ProtoMessage ret_message = NULL; |
|
|
|
|
|
TR_RemoteData new_data = NULL; |
|
|
|
|
|
|
|
|
if (*data) { |
|
|
if (*data) { |
|
|
ret_message = TR_protoCreateMessage(comm->protocol, (*data)->remote); |
|
|
ret_message = TR_protoCreateMessage(comm->protocol, (*data)->remote); |
|
|
TR_protoParse(comm->protocol, ret_message, *data); |
|
|
|
|
|
|
|
|
new_data = TR_protoParse(comm->protocol, ret_message, *data); |
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
* In UDP I don't care about remaining data. UDP is an all or nothing |
|
|
* In UDP I don't care about remaining data. UDP is an all or nothing |
|
|
@ -71,8 +72,11 @@ datagramServiceNextMessage(void * _this, TR_RemoteData * data) |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
if (! ret_message->ready) { |
|
|
if (! ret_message->ready) { |
|
|
TR_delete(*data); |
|
|
|
|
|
TR_delete(ret_message); |
|
|
TR_delete(ret_message); |
|
|
|
|
|
if (new_data) { |
|
|
|
|
|
TR_delete(new_data); |
|
|
|
|
|
TR_delete(*data); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
*data = NULL; |
|
|
*data = NULL; |
|
|
@ -88,6 +92,10 @@ datagramServiceCompose(void * _this, TR_ProtoMessage message) |
|
|
TR_RemoteData data = |
|
|
TR_RemoteData data = |
|
|
TR_protoCompose(((TR_CommEndPoint)_this)->protocol, message); |
|
|
TR_protoCompose(((TR_CommEndPoint)_this)->protocol, message); |
|
|
|
|
|
|
|
|
|
|
|
if (data->remote->handle == -1) { |
|
|
|
|
|
data->free_remote = 1; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (! data) { |
|
|
if (! data) { |
|
|
return FALSE; |
|
|
return FALSE; |
|
|
} |
|
|
} |
|
|
|