Skip to content

Commit

Permalink
Merge pull request #2 from flightaware/marshalling_error
Browse files Browse the repository at this point in the history
If there's a marshalling error in zoo_awexists wait for the result and return "ZMARSHALLINGERROR".
  • Loading branch information
resuna committed May 20, 2019
2 parents 8887e58 + 3bb60b6 commit 56e02c5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion generic/zookeepertcl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ zootcl_exists_subcommand(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], ZO
zsc->syncDone = 0;
status = zoo_awexists (zh, path, wfn, (void *)watcherCallbackObj, zootcl_sync_stat_completion_callback, zsc);
// handle errors from the call like bad arguments and stuff
if (status != ZOK) {
if (status != ZOK && status != ZMARSHALLINGERROR) {
ckfree (zsc);
return zootcl_set_tcl_return_code (interp, status);
}
Expand All @@ -1280,6 +1280,10 @@ zootcl_exists_subcommand(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], ZO
return TCL_ERROR;
}

if(status == ZMARSHALLINGERROR) {
return zootcl_set_tcl_return_code (interp, status);
}

// ok, we got our zsc filled up, if the status isn't OK,
// error out
status = zsc->rc;
Expand Down

0 comments on commit 56e02c5

Please sign in to comment.