summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoan2937 <joan@abyz.me.uk>2020-08-17 08:31:26 +0100
committerjoan2937 <joan@abyz.me.uk>2020-08-17 08:31:26 +0100
commit93965f8e3bc991a7c90155fae9dffe93e945c981 (patch)
treedcf270ac16b8f28ee02e5f12177ae73c70bf9d91
parent9a22f2d64b5a2f84aef829bd642dd81de627873f (diff)
Misc plus fix for #373
-rw-r--r--pigpio.c3
-rw-r--r--pigpiod_if.c2
-rw-r--r--pigpiod_if2.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/pigpio.c b/pigpio.c
index 8fd91cf..da492d0 100644
--- a/pigpio.c
+++ b/pigpio.c
@@ -1572,6 +1572,9 @@ int myPathBad(char *name)
in_part = 0;
last_char_dot = 0;
+ if (strstr(name, "..")) return 1;
+ if (strstr(name, "\\.")) return 1;
+
len = strlen(name);
for (i=0; i<len; i++)
diff --git a/pigpiod_if.c b/pigpiod_if.c
index 7802e57..c62b3e8 100644
--- a/pigpiod_if.c
+++ b/pigpiod_if.c
@@ -1064,7 +1064,7 @@ int i2c_process_call(unsigned handle, unsigned reg, uint32_t val)
ext[0].ptr = &val;
return pigpio_command_ext
- (gPigCommand, PI_CMD_I2CPK, handle, reg, 4, 1, ext, 1);
+ (gPigCommand, PI_CMD_I2CPC, handle, reg, 4, 1, ext, 1);
}
int i2c_write_block_data(
diff --git a/pigpiod_if2.c b/pigpiod_if2.c
index 7af8313..ab2ef10 100644
--- a/pigpiod_if2.c
+++ b/pigpiod_if2.c
@@ -1288,7 +1288,7 @@ int i2c_process_call(int pi, unsigned handle, unsigned reg, uint32_t val)
ext[0].ptr = &val;
return pigpio_command_ext
- (pi, PI_CMD_I2CPK, handle, reg, 4, 1, ext, 1);
+ (pi, PI_CMD_I2CPC, handle, reg, 4, 1, ext, 1);
}
int i2c_write_block_data(