]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
setatt: Do not abort if no pattern is given.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 29 Aug 2015 13:10:25 +0000 (15:10 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 30 Aug 2015 11:24:39 +0000 (13:24 +0200)
It is an error if no pattern is given to the setatt command.
For example,

setatt foo+ bar-

should result in a syntax error because no file name pattern is given.
The code in aft.c contains an assertion to detect this type of error,
but the afs proccess terminates if the condition of the assert
statement is not fulfilled:

para_server (afs): aft.c:2557: com_setatt_callback: Assertion `p < (char *)query->data + query->size' failed.

This patch turns the assertion into a normal check which merely causes
the command to fail if no pattern was given.

The bug was introduced two years ago in commit 73299ebf (com_setatt():
Allow to specify a file name pattern).


No differences found