- MMS server: add compile time configuration options to enable/disable fileDelete and fileRename services (fileRename is now disabled by default)

pull/331/head
Michael Zillgith 5 years ago
parent 5512b0f9be
commit 9e27ed5a77

@ -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 */

@ -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

@ -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) */

@ -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)

Loading…
Cancel
Save