aboutsummaryrefslogtreecommitdiffstats
path: root/Audio-Common
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-08-16 19:18:46 +0200
committerFulup Ar Foll <fulup@iot.bzh>2017-08-16 19:18:46 +0200
commita4899ab57f08aeb2741d08f74d7593c85a0ad3f4 (patch)
tree64ee18c96a149f67259ddc166814bf2d74eabe00 /Audio-Common
parent61f0f263c335ad403c6693a1b8b6f5428ac180a8 (diff)
Fix DoScript Lua Updated Documentation.
Diffstat (limited to 'Audio-Common')
-rw-r--r--Audio-Common/filescan-utils.c4
-rw-r--r--Audio-Common/filescan-utils.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/Audio-Common/filescan-utils.c b/Audio-Common/filescan-utils.c
index 8bb66d4..33dacdf 100644
--- a/Audio-Common/filescan-utils.c
+++ b/Audio-Common/filescan-utils.c
@@ -27,7 +27,7 @@
// List Avaliable Configuration Files
-PUBLIC json_object* ScanForConfig (char* searchPath, CtlScanDirModeT mode, char *pre, char *ext) {
+PUBLIC json_object* ScanForConfig (char* searchPath, CtlScanDirModeT mode, const char *pre, const char *ext) {
json_object *responseJ;
char *dirPath;
char* dirList= strdup(searchPath);
@@ -95,7 +95,7 @@ PUBLIC const char *GetMidleName(const char*name) {
if (fullname[idx] == '-') {
start = idx + 1;
for (int jdx = start; fullname[jdx] != '\0'; jdx++) {
- if (fullname[jdx] == '-') {
+ if (fullname[jdx] == '-' || fullname[jdx] == '.' || fullname[jdx] == '\0') {
fullname[jdx] = '\0';
return &fullname[start];
break;
diff --git a/Audio-Common/filescan-utils.h b/Audio-Common/filescan-utils.h
index eba504e..671e728 100644
--- a/Audio-Common/filescan-utils.h
+++ b/Audio-Common/filescan-utils.h
@@ -35,7 +35,7 @@ typedef enum {
PUBLIC const char *GetMidleName(const char*name);
PUBLIC const char *GetBinderName();
-PUBLIC json_object* ScanForConfig (char* searchPath, CtlScanDirModeT mode, char *pre, char *ext);
+PUBLIC json_object* ScanForConfig (char* searchPath, CtlScanDirModeT mode, const char *pre, const char *ext);
#endif /* FILESCAN_UTILS_H */