diff --git a/config/stack_config.h b/config/stack_config.h index 8bbe5d1e..294eed17 100644 --- a/config/stack_config.h +++ b/config/stack_config.h @@ -215,6 +215,8 @@ #define MMS_IDENTIFY_SERVICE 1 #define MMS_FILE_SERVICE 1 #define MMS_OBTAIN_FILE_SERVICE 1 /* requires MMS_FILE_SERVICE */ +#define MMS_DELETE_FILE_SERVICE 1 /* requires MMS_FILE_SERVICE */ +#define MMS_RENAME_FILE_SERVICE 0 /* requires MMS_FILE_SERVICE */ #endif /* MMS_DEFAULT_PROFILE */ diff --git a/config/stack_config.h.cmake b/config/stack_config.h.cmake index 17ac3120..dd93fcce 100644 --- a/config/stack_config.h.cmake +++ b/config/stack_config.h.cmake @@ -205,6 +205,8 @@ #define MMS_IDENTIFY_SERVICE 1 #define MMS_FILE_SERVICE 1 #define MMS_OBTAIN_FILE_SERVICE 1 +#define MMS_DELETE_FILE_SERVICE 1 +#define MMS_RENAME_FILE_SERVICE 0 #endif /* MMS_DEFAULT_PROFILE */ /* Sort getNameList response according to the MMS specified collation order - this is required by the standard diff --git a/src/mms/iso_mms/server/mms_association_service.c b/src/mms/iso_mms/server/mms_association_service.c index 34aecc73..a3075e27 100644 --- a/src/mms/iso_mms/server/mms_association_service.c +++ b/src/mms/iso_mms/server/mms_association_service.c @@ -137,8 +137,12 @@ encodeInitResponseDetail(MmsServerConnection self, uint8_t* buffer, int bufPos, servicesSupported[9] |= MMS_SERVICE_FILE_OPEN; servicesSupported[9] |= MMS_SERVICE_FILE_READ; servicesSupported[9] |= MMS_SERVICE_FILE_CLOSE; +#if (MMS_RENAME_FILE_SERVICE == 1) servicesSupported[9] |= MMS_SERVICE_FILE_RENAME; +#endif +#if (MMS_DELETE_FILE_SERVICE == 1) servicesSupported[9] |= MMS_SERVICE_FILE_DELETE; +#endif servicesSupported[9] |= MMS_SERVICE_FILE_DIRECTORY; #endif /* (MMS_FILE_SERVICE == 1) */ diff --git a/src/mms/iso_mms/server/mms_server_connection.c b/src/mms/iso_mms/server/mms_server_connection.c index afb81cef..56f66099 100644 --- a/src/mms/iso_mms/server/mms_server_connection.c +++ b/src/mms/iso_mms/server/mms_server_connection.c @@ -244,6 +244,8 @@ handleConfirmedRequestPdu( break; #endif /* (CONFIG_MMS_SERVER_CONFIG_SERVICES_AT_RUNTIME == 1) */ +#if (MMS_RENAME_FILE_SERVICE == 1) + #if (CONFIG_MMS_SERVER_CONFIG_SERVICES_AT_RUNTIME == 1) case 0x4b: /* file-rename-request */ if (self->server->fileServiceEnabled) @@ -257,6 +259,11 @@ handleConfirmedRequestPdu( break; #endif /* (CONFIG_MMS_SERVER_CONFIG_SERVICES_AT_RUNTIME == 1) */ +#endif /* (MMS_RENAME_FILE_SERVICE == 1) */ + + +#if (MMS_DELETE_FILE_SERVICE == 1) + #if (CONFIG_MMS_SERVER_CONFIG_SERVICES_AT_RUNTIME == 1) case 0x4c: /* file-delete-request */ if (self->server->fileServiceEnabled) @@ -270,6 +277,8 @@ handleConfirmedRequestPdu( break; #endif /* (CONFIG_MMS_SERVER_CONFIG_SERVICES_AT_RUNTIME == 1) */ +#endif /* (MMS_DELETE_FILE_SERVICE == 1) */ + #if (CONFIG_MMS_SERVER_CONFIG_SERVICES_AT_RUNTIME == 1) case 0x4d: /* file-directory-request */ if (self->server->fileServiceEnabled)