diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-05-11 10:24:00 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-05-12 12:08:38 -0700 |
commit | 21ceae9002c6364deb3d074cf2da7d3864cf6879 (patch) | |
tree | c813cbb3e14fe41f41d798caaba7c74239fdcb76 /dix | |
parent | 801162919d1c625d950a5d105ae4b3487ebc30a7 (diff) |
SetFontPath: set client->errorValue on failure.
Previously the callers were only setting errorValue on Success, when
it's ignored, and leaving it alone on failure, when it's sent to the
client.
Since SetFontPath takes the ClientPtr, let it set client->errorValue
instead of letting the callers continue to get it wrong.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/dispatch.c | 7 | ||||
-rw-r--r-- | dix/dixfonts.c | 7 |
2 files changed, 5 insertions, 9 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c index 63c978c12..4dc9ecd9d 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3406,7 +3406,6 @@ ProcSetFontPath(ClientPtr client) unsigned long nbytes, total; long nfonts; int n, result; - int error; REQUEST(xSetFontPathReq); REQUEST_AT_LEAST_SIZE(xSetFontPathReq); @@ -3424,13 +3423,9 @@ ProcSetFontPath(ClientPtr client) } if (total >= 4) return(BadLength); - result = SetFontPath(client, stuff->nFonts, (unsigned char *)&stuff[1], - &error); + result = SetFontPath(client, stuff->nFonts, (unsigned char *)&stuff[1]); if (!result) - { result = client->noClientException; - client->errorValue = error; - } return (result); } diff --git a/dix/dixfonts.c b/dix/dixfonts.c index aaa992b4d..e145254b9 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -1789,9 +1789,8 @@ bail: return FontToXError(err); } -/* XXX -- do we need to pass error down to each renderer? */ int -SetFontPath(ClientPtr client, int npaths, unsigned char *paths, int *error) +SetFontPath(ClientPtr client, int npaths, unsigned char *paths) { int err = XaceHook(XACE_SERVER_ACCESS, client, DixManageAccess); if (err != Success) @@ -1801,7 +1800,9 @@ SetFontPath(ClientPtr client, int npaths, unsigned char *paths, int *error) if (SetDefaultFontPath(defaultFontPath) != Success) return BadValue; } else { - err = SetFontPathElements(npaths, paths, error, FALSE); + int bad; + err = SetFontPathElements(npaths, paths, &bad, FALSE); + client->errorValue = bad; } return err; } |