- MMS server: in case of file upload timeout the task will end with proper error response.

pull/183/head
Király Péter 6 years ago
parent a03f57c0a7
commit 3b32c14870

@ -210,8 +210,10 @@ mmsClient_handleFileCloseRequest(
if (frsm->obtainRequest)
frsm->obtainRequest->timeout = Hal_getTimeInMs() + connection->requestTimeout;
if(frsm->fileHandle){
FileSystem_closeFile(frsm->fileHandle);
frsm->fileHandle = NULL;
}
frsm->frsmId = 0;
frsm->obtainRequest = NULL;

@ -554,6 +554,10 @@ handleConfirmedResponsePdu(
bool moreFollows;
if(fileTask->fileHandle == NULL){
fileTask->state = MMS_FILE_UPLOAD_STATE_SEND_OBTAIN_FILE_ERROR_DESTINATION;
}
else{
if (mmsMsg_parseFileReadResponse(buffer, startBufPos, maxBufPos, invokeId, fileTask->frmsId, &moreFollows, mmsFileReadHandler, (void*) fileTask)) {
if (moreFollows) {
@ -570,6 +574,7 @@ handleConfirmedResponsePdu(
printf("MMS_SERVER: error parsing file-read-response\n");
}
}
}
else {
/* ignore */
@ -588,7 +593,9 @@ handleConfirmedResponsePdu(
MmsObtainFileTask fileTask = getUploadTaskByInvokeId(self->server, invokeId);
if (fileTask != NULL) {
if(fileTask->fileHandle){
FileSystem_closeFile(fileTask->fileHandle);
}
fileTask->state = MMS_FILE_UPLOAD_STATE_SEND_OBTAIN_FILE_RESPONSE;
}
else {

Loading…
Cancel
Save