mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Some exec cleanups and tweaks for photo ID and keyserver execution
This commit is contained in:
parent
2450c71ac3
commit
1a2d0ebc11
10 changed files with 107 additions and 44 deletions
|
@ -452,7 +452,7 @@ keyserver_spawn(int action,STRLIST list,u32 (*kidlist)[2],int count,int *prog)
|
|||
|
||||
if(!gotversion)
|
||||
{
|
||||
log_error(_("keyserver communications error\n"));
|
||||
log_error(_("keyserver did not send VERSION\n"));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -510,9 +510,8 @@ keyserver_spawn(int action,STRLIST list,u32 (*kidlist)[2],int count,int *prog)
|
|||
break;
|
||||
}
|
||||
|
||||
*prog=exec_finish(spawn);
|
||||
|
||||
fail:
|
||||
*prog=exec_finish(spawn);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -558,13 +557,11 @@ keyserver_work(int action,STRLIST list,u32 (*kidlist)[2],int count)
|
|||
|
||||
/* It's not the internal HKP code, so try and spawn a handler for it */
|
||||
|
||||
if((rc=keyserver_spawn(action,list,kidlist,count,&ret))==0)
|
||||
rc=keyserver_spawn(action,list,kidlist,count,&ret);
|
||||
if(ret)
|
||||
{
|
||||
switch(ret)
|
||||
{
|
||||
case KEYSERVER_OK:
|
||||
break;
|
||||
|
||||
case KEYSERVER_SCHEME_NOT_FOUND:
|
||||
log_error(_("no handler for keyserver scheme \"%s\"\n"),
|
||||
opt.keyserver_scheme);
|
||||
|
@ -576,12 +573,12 @@ keyserver_work(int action,STRLIST list,u32 (*kidlist)[2],int count)
|
|||
break;
|
||||
}
|
||||
|
||||
/* This is not the best error code for this */
|
||||
return G10ERR_INVALID_URI;
|
||||
return G10ERR_KEYSERVER;
|
||||
}
|
||||
else
|
||||
|
||||
if(rc)
|
||||
{
|
||||
log_error(_("keyserver communications error\n"));
|
||||
log_error(_("keyserver communications error: %s\n"),g10_errstr(rc));
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue