2001-12-22 00:09:41 +01:00
|
|
|
/* photoid.c - photo ID handling code
|
2002-04-29 16:42:34 +02:00
|
|
|
* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
2001-12-22 00:09:41 +01:00
|
|
|
*
|
|
|
|
* This file is part of GnuPG.
|
|
|
|
*
|
|
|
|
* GnuPG is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* GnuPG is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
2001-12-25 19:04:09 +01:00
|
|
|
#include <errno.h>
|
2001-12-22 00:09:41 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
2001-12-25 19:04:09 +01:00
|
|
|
|
|
|
|
#include "packet.h"
|
2001-12-22 00:09:41 +01:00
|
|
|
#include "status.h"
|
2001-12-25 19:04:09 +01:00
|
|
|
#include "exec.h"
|
|
|
|
#include "keydb.h"
|
2001-12-22 00:09:41 +01:00
|
|
|
#include "util.h"
|
2001-12-25 19:04:09 +01:00
|
|
|
#include "i18n.h"
|
2001-12-22 00:09:41 +01:00
|
|
|
#include "iobuf.h"
|
2001-12-25 19:04:09 +01:00
|
|
|
#include "memory.h"
|
|
|
|
#include "options.h"
|
2002-02-05 01:04:24 +01:00
|
|
|
#include "main.h"
|
2001-12-22 00:09:41 +01:00
|
|
|
#include "photoid.h"
|
|
|
|
|
2002-05-04 02:39:15 +02:00
|
|
|
#ifdef HAVE_DOSISH_SYSTEM
|
|
|
|
#define DEFAULT_PHOTO_COMMAND "start /w %i"
|
|
|
|
#else
|
2001-12-22 00:09:41 +01:00
|
|
|
#define DEFAULT_PHOTO_COMMAND "xloadimage -fork -quiet -title 'KeyID 0x%k' stdin"
|
2002-05-04 02:39:15 +02:00
|
|
|
#endif
|
2001-12-22 00:09:41 +01:00
|
|
|
|
|
|
|
/* Generate a new photo id packet, or return NULL if canceled */
|
|
|
|
PKT_user_id *generate_photo_id(PKT_public_key *pk)
|
|
|
|
{
|
|
|
|
PKT_user_id *uid;
|
2001-12-22 16:22:59 +01:00
|
|
|
int error=1,i;
|
|
|
|
unsigned int len;
|
2001-12-22 00:09:41 +01:00
|
|
|
char *filename=NULL;
|
2001-12-22 16:22:59 +01:00
|
|
|
byte *photo=NULL;
|
2001-12-22 00:09:41 +01:00
|
|
|
byte header[16];
|
|
|
|
IOBUF file;
|
|
|
|
|
|
|
|
header[0]=0x10; /* little side of photo header length */
|
|
|
|
header[1]=0; /* big side of photo header length */
|
|
|
|
header[2]=1; /* 1 == version of photo header */
|
|
|
|
header[3]=1; /* 1 == JPEG */
|
|
|
|
|
|
|
|
for(i=4;i<16;i++) /* The reserved bytes */
|
|
|
|
header[i]=0;
|
|
|
|
|
|
|
|
uid=m_alloc_clear(sizeof(*uid)+50);
|
|
|
|
|
|
|
|
printf(_("\nPick an image to use for your photo ID. "
|
|
|
|
"The image must be a JPEG file.\n"
|
|
|
|
"Remember that the image is stored within your public key. "
|
|
|
|
"If you use a\n"
|
|
|
|
"very large picture, your key will become very large as well!\n"
|
|
|
|
"Keeping the image close to 240x288 is a good size to use.\n"));
|
|
|
|
|
|
|
|
while(photo==NULL)
|
|
|
|
{
|
|
|
|
printf("\n");
|
|
|
|
|
|
|
|
m_free(filename);
|
|
|
|
|
|
|
|
filename=cpr_get("photoid.jpeg.add",
|
|
|
|
_("Enter JPEG filename for photo ID: "));
|
|
|
|
|
|
|
|
if(strlen(filename)==0)
|
|
|
|
goto scram;
|
|
|
|
|
|
|
|
file=iobuf_open(filename);
|
|
|
|
if(!file)
|
|
|
|
{
|
|
|
|
log_error(_("Unable to open photo \"%s\": %s\n"),
|
|
|
|
filename,strerror(errno));
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
len=iobuf_get_filelength(file);
|
|
|
|
if(len>6144)
|
|
|
|
{
|
|
|
|
printf("This JPEG is really large (%d bytes) !\n",len);
|
|
|
|
if(!cpr_get_answer_is_yes("photoid.jpeg.size",
|
2002-04-01 01:51:33 +02:00
|
|
|
_("Are you sure you want to use it (y/N)? ")))
|
2001-12-22 00:09:41 +01:00
|
|
|
{
|
|
|
|
iobuf_close(file);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
photo=m_alloc(len);
|
|
|
|
iobuf_read(file,photo,len);
|
|
|
|
iobuf_close(file);
|
|
|
|
|
|
|
|
/* Is it a JPEG? */
|
|
|
|
if(photo[0]!=0xFF || photo[1]!=0xD8 ||
|
|
|
|
photo[6]!='J' || photo[7]!='F' || photo[8]!='I' || photo[9]!='F')
|
|
|
|
{
|
|
|
|
log_error(_("\"%s\" is not a JPEG file\n"),filename);
|
|
|
|
m_free(photo);
|
|
|
|
photo=NULL;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Build the packet */
|
|
|
|
build_attribute_subpkt(uid,1,photo,len,header,16);
|
|
|
|
parse_attribute_subpkts(uid);
|
|
|
|
make_attribute_uidname(uid);
|
|
|
|
|
* photoid.h, photoid.c (parse_image_header, image_type_to_string): Useful
functions to return data about an image.
* packet.h, parse-packet.c (make_attribute_uidname,
parse_attribute_subpkts, parse_attribute), photoid.h, photoid.c
(show_photos): Handle multiple images in a single attribute packet.
* main.h, misc.c (pct_expando), sign.c (mk_notation_and_policy), photoid.c
(show_photos): Simpler expando code that does not require using
compile-time string sizes. Call image_type_to_string to get image strings
(i.e. "jpg", "image/jpeg"). Change all callers.
* keyedit.c (menu_showphoto), keylist.c (list_keyblock_print): Allow
viewing multiple images within a single attribute packet.
* gpgv.c: Various stubs for link happiness.
2002-05-02 22:47:23 +02:00
|
|
|
show_photos(uid->attribs,uid->numattribs,pk);
|
2001-12-22 00:09:41 +01:00
|
|
|
switch(cpr_get_answer_yes_no_quit("photoid.jpeg.okay",
|
2002-04-01 01:51:33 +02:00
|
|
|
_("Is this photo correct (y/N/q)? ")))
|
2001-12-22 00:09:41 +01:00
|
|
|
{
|
|
|
|
case -1:
|
|
|
|
goto scram;
|
|
|
|
case 0:
|
|
|
|
free_attributes(uid);
|
|
|
|
m_free(photo);
|
|
|
|
photo=NULL;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
error=0;
|
2002-04-01 01:51:33 +02:00
|
|
|
uid->ref=1;
|
2001-12-22 00:09:41 +01:00
|
|
|
|
|
|
|
scram:
|
|
|
|
m_free(filename);
|
|
|
|
m_free(photo);
|
|
|
|
|
|
|
|
if(error)
|
|
|
|
{
|
|
|
|
free_attributes(uid);
|
|
|
|
m_free(uid);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return uid;
|
|
|
|
}
|
|
|
|
|
* photoid.h, photoid.c (parse_image_header, image_type_to_string): Useful
functions to return data about an image.
* packet.h, parse-packet.c (make_attribute_uidname,
parse_attribute_subpkts, parse_attribute), photoid.h, photoid.c
(show_photos): Handle multiple images in a single attribute packet.
* main.h, misc.c (pct_expando), sign.c (mk_notation_and_policy), photoid.c
(show_photos): Simpler expando code that does not require using
compile-time string sizes. Call image_type_to_string to get image strings
(i.e. "jpg", "image/jpeg"). Change all callers.
* keyedit.c (menu_showphoto), keylist.c (list_keyblock_print): Allow
viewing multiple images within a single attribute packet.
* gpgv.c: Various stubs for link happiness.
2002-05-02 22:47:23 +02:00
|
|
|
/* Returns 0 for error, 1 for valid */
|
|
|
|
int parse_image_header(const struct user_attribute *attr,byte *type,u32 *len)
|
2001-12-22 00:09:41 +01:00
|
|
|
{
|
* photoid.h, photoid.c (parse_image_header, image_type_to_string): Useful
functions to return data about an image.
* packet.h, parse-packet.c (make_attribute_uidname,
parse_attribute_subpkts, parse_attribute), photoid.h, photoid.c
(show_photos): Handle multiple images in a single attribute packet.
* main.h, misc.c (pct_expando), sign.c (mk_notation_and_policy), photoid.c
(show_photos): Simpler expando code that does not require using
compile-time string sizes. Call image_type_to_string to get image strings
(i.e. "jpg", "image/jpeg"). Change all callers.
* keyedit.c (menu_showphoto), keylist.c (list_keyblock_print): Allow
viewing multiple images within a single attribute packet.
* gpgv.c: Various stubs for link happiness.
2002-05-02 22:47:23 +02:00
|
|
|
int headerlen;
|
2001-12-22 00:09:41 +01:00
|
|
|
|
* photoid.h, photoid.c (parse_image_header, image_type_to_string): Useful
functions to return data about an image.
* packet.h, parse-packet.c (make_attribute_uidname,
parse_attribute_subpkts, parse_attribute), photoid.h, photoid.c
(show_photos): Handle multiple images in a single attribute packet.
* main.h, misc.c (pct_expando), sign.c (mk_notation_and_policy), photoid.c
(show_photos): Simpler expando code that does not require using
compile-time string sizes. Call image_type_to_string to get image strings
(i.e. "jpg", "image/jpeg"). Change all callers.
* keyedit.c (menu_showphoto), keylist.c (list_keyblock_print): Allow
viewing multiple images within a single attribute packet.
* gpgv.c: Various stubs for link happiness.
2002-05-02 22:47:23 +02:00
|
|
|
if(attr->len<3)
|
|
|
|
return 0;
|
2001-12-22 00:09:41 +01:00
|
|
|
|
* photoid.h, photoid.c (parse_image_header, image_type_to_string): Useful
functions to return data about an image.
* packet.h, parse-packet.c (make_attribute_uidname,
parse_attribute_subpkts, parse_attribute), photoid.h, photoid.c
(show_photos): Handle multiple images in a single attribute packet.
* main.h, misc.c (pct_expando), sign.c (mk_notation_and_policy), photoid.c
(show_photos): Simpler expando code that does not require using
compile-time string sizes. Call image_type_to_string to get image strings
(i.e. "jpg", "image/jpeg"). Change all callers.
* keyedit.c (menu_showphoto), keylist.c (list_keyblock_print): Allow
viewing multiple images within a single attribute packet.
* gpgv.c: Various stubs for link happiness.
2002-05-02 22:47:23 +02:00
|
|
|
/* For historical reasons (i.e. "oops!"), the header length is
|
|
|
|
little endian. */
|
|
|
|
headerlen=(attr->data[1]<<8) | attr->data[0];
|
2001-12-22 00:09:41 +01:00
|
|
|
|
* photoid.h, photoid.c (parse_image_header, image_type_to_string): Useful
functions to return data about an image.
* packet.h, parse-packet.c (make_attribute_uidname,
parse_attribute_subpkts, parse_attribute), photoid.h, photoid.c
(show_photos): Handle multiple images in a single attribute packet.
* main.h, misc.c (pct_expando), sign.c (mk_notation_and_policy), photoid.c
(show_photos): Simpler expando code that does not require using
compile-time string sizes. Call image_type_to_string to get image strings
(i.e. "jpg", "image/jpeg"). Change all callers.
* keyedit.c (menu_showphoto), keylist.c (list_keyblock_print): Allow
viewing multiple images within a single attribute packet.
* gpgv.c: Various stubs for link happiness.
2002-05-02 22:47:23 +02:00
|
|
|
if(headerlen>attr->len)
|
|
|
|
return 0;
|
2001-12-22 00:09:41 +01:00
|
|
|
|
* photoid.h, photoid.c (parse_image_header, image_type_to_string): Useful
functions to return data about an image.
* packet.h, parse-packet.c (make_attribute_uidname,
parse_attribute_subpkts, parse_attribute), photoid.h, photoid.c
(show_photos): Handle multiple images in a single attribute packet.
* main.h, misc.c (pct_expando), sign.c (mk_notation_and_policy), photoid.c
(show_photos): Simpler expando code that does not require using
compile-time string sizes. Call image_type_to_string to get image strings
(i.e. "jpg", "image/jpeg"). Change all callers.
* keyedit.c (menu_showphoto), keylist.c (list_keyblock_print): Allow
viewing multiple images within a single attribute packet.
* gpgv.c: Various stubs for link happiness.
2002-05-02 22:47:23 +02:00
|
|
|
if(type && attr->len>=4)
|
|
|
|
{
|
|
|
|
if(attr->data[2]==1) /* header version 1 */
|
|
|
|
*type=attr->data[3];
|
|
|
|
else
|
|
|
|
*type=0;
|
|
|
|
}
|
|
|
|
|
|
|
|
*len=attr->len-headerlen;
|
|
|
|
|
|
|
|
if(*len==0)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
2001-12-22 00:09:41 +01:00
|
|
|
|
* photoid.h, photoid.c (parse_image_header, image_type_to_string): Useful
functions to return data about an image.
* packet.h, parse-packet.c (make_attribute_uidname,
parse_attribute_subpkts, parse_attribute), photoid.h, photoid.c
(show_photos): Handle multiple images in a single attribute packet.
* main.h, misc.c (pct_expando), sign.c (mk_notation_and_policy), photoid.c
(show_photos): Simpler expando code that does not require using
compile-time string sizes. Call image_type_to_string to get image strings
(i.e. "jpg", "image/jpeg"). Change all callers.
* keyedit.c (menu_showphoto), keylist.c (list_keyblock_print): Allow
viewing multiple images within a single attribute packet.
* gpgv.c: Various stubs for link happiness.
2002-05-02 22:47:23 +02:00
|
|
|
/* style==0 for extension, 1 for name, 2 for MIME type. Remember that
|
|
|
|
the "name" style string could be used in a user ID name field, so
|
|
|
|
make sure it is not too big (see
|
|
|
|
parse-packet.c:parse_attribute). */
|
|
|
|
char *image_type_to_string(byte type,int style)
|
|
|
|
{
|
|
|
|
char *string;
|
|
|
|
|
|
|
|
switch(type)
|
2001-12-27 21:48:05 +01:00
|
|
|
{
|
* photoid.h, photoid.c (parse_image_header, image_type_to_string): Useful
functions to return data about an image.
* packet.h, parse-packet.c (make_attribute_uidname,
parse_attribute_subpkts, parse_attribute), photoid.h, photoid.c
(show_photos): Handle multiple images in a single attribute packet.
* main.h, misc.c (pct_expando), sign.c (mk_notation_and_policy), photoid.c
(show_photos): Simpler expando code that does not require using
compile-time string sizes. Call image_type_to_string to get image strings
(i.e. "jpg", "image/jpeg"). Change all callers.
* keyedit.c (menu_showphoto), keylist.c (list_keyblock_print): Allow
viewing multiple images within a single attribute packet.
* gpgv.c: Various stubs for link happiness.
2002-05-02 22:47:23 +02:00
|
|
|
case 1: /* jpeg */
|
|
|
|
if(style==0)
|
|
|
|
string="jpg";
|
|
|
|
else if(style==1)
|
|
|
|
string="jpeg";
|
|
|
|
else
|
|
|
|
string="image/jpeg";
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
if(style==0)
|
|
|
|
string="bin";
|
|
|
|
else if(style==1)
|
|
|
|
string="unknown";
|
|
|
|
else
|
|
|
|
string="image/x-unknown";
|
|
|
|
break;
|
2001-12-27 21:48:05 +01:00
|
|
|
}
|
2001-12-22 00:09:41 +01:00
|
|
|
|
* photoid.h, photoid.c (parse_image_header, image_type_to_string): Useful
functions to return data about an image.
* packet.h, parse-packet.c (make_attribute_uidname,
parse_attribute_subpkts, parse_attribute), photoid.h, photoid.c
(show_photos): Handle multiple images in a single attribute packet.
* main.h, misc.c (pct_expando), sign.c (mk_notation_and_policy), photoid.c
(show_photos): Simpler expando code that does not require using
compile-time string sizes. Call image_type_to_string to get image strings
(i.e. "jpg", "image/jpeg"). Change all callers.
* keyedit.c (menu_showphoto), keylist.c (list_keyblock_print): Allow
viewing multiple images within a single attribute packet.
* gpgv.c: Various stubs for link happiness.
2002-05-02 22:47:23 +02:00
|
|
|
return string;
|
|
|
|
}
|
|
|
|
|
|
|
|
void show_photos(const struct user_attribute *attrs,
|
|
|
|
int count,PKT_public_key *pk)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
struct expando_args args;
|
|
|
|
u32 len;
|
2002-05-13 22:44:30 +02:00
|
|
|
u32 kid[2];
|
* photoid.h, photoid.c (parse_image_header, image_type_to_string): Useful
functions to return data about an image.
* packet.h, parse-packet.c (make_attribute_uidname,
parse_attribute_subpkts, parse_attribute), photoid.h, photoid.c
(show_photos): Handle multiple images in a single attribute packet.
* main.h, misc.c (pct_expando), sign.c (mk_notation_and_policy), photoid.c
(show_photos): Simpler expando code that does not require using
compile-time string sizes. Call image_type_to_string to get image strings
(i.e. "jpg", "image/jpeg"). Change all callers.
* keyedit.c (menu_showphoto), keylist.c (list_keyblock_print): Allow
viewing multiple images within a single attribute packet.
* gpgv.c: Various stubs for link happiness.
2002-05-02 22:47:23 +02:00
|
|
|
|
|
|
|
memset(&args,0,sizeof(args));
|
|
|
|
args.pk=pk;
|
|
|
|
|
2002-05-13 22:44:30 +02:00
|
|
|
keyid_from_pk(pk,kid);
|
|
|
|
|
* photoid.h, photoid.c (parse_image_header, image_type_to_string): Useful
functions to return data about an image.
* packet.h, parse-packet.c (make_attribute_uidname,
parse_attribute_subpkts, parse_attribute), photoid.h, photoid.c
(show_photos): Handle multiple images in a single attribute packet.
* main.h, misc.c (pct_expando), sign.c (mk_notation_and_policy), photoid.c
(show_photos): Simpler expando code that does not require using
compile-time string sizes. Call image_type_to_string to get image strings
(i.e. "jpg", "image/jpeg"). Change all callers.
* keyedit.c (menu_showphoto), keylist.c (list_keyblock_print): Allow
viewing multiple images within a single attribute packet.
* gpgv.c: Various stubs for link happiness.
2002-05-02 22:47:23 +02:00
|
|
|
for(i=0;i<count;i++)
|
|
|
|
if(attrs[i].type==ATTRIB_IMAGE &&
|
|
|
|
parse_image_header(&attrs[i],&args.imagetype,&len))
|
|
|
|
{
|
2002-05-13 22:44:30 +02:00
|
|
|
char *command,*name;
|
* photoid.h, photoid.c (parse_image_header, image_type_to_string): Useful
functions to return data about an image.
* packet.h, parse-packet.c (make_attribute_uidname,
parse_attribute_subpkts, parse_attribute), photoid.h, photoid.c
(show_photos): Handle multiple images in a single attribute packet.
* main.h, misc.c (pct_expando), sign.c (mk_notation_and_policy), photoid.c
(show_photos): Simpler expando code that does not require using
compile-time string sizes. Call image_type_to_string to get image strings
(i.e. "jpg", "image/jpeg"). Change all callers.
* keyedit.c (menu_showphoto), keylist.c (list_keyblock_print): Allow
viewing multiple images within a single attribute packet.
* gpgv.c: Various stubs for link happiness.
2002-05-02 22:47:23 +02:00
|
|
|
struct exec_info *spawn;
|
|
|
|
int offset=attrs[i].len-len;
|
|
|
|
|
|
|
|
/* make command grow */
|
|
|
|
command=pct_expando(opt.photo_viewer?
|
|
|
|
opt.photo_viewer:DEFAULT_PHOTO_COMMAND,&args);
|
|
|
|
if(!command)
|
|
|
|
goto fail;
|
|
|
|
|
2002-05-13 22:44:30 +02:00
|
|
|
name=m_alloc(16+strlen(EXTSEP_S)+
|
|
|
|
strlen(image_type_to_string(args.imagetype,0))+1);
|
|
|
|
|
|
|
|
/* Make the filename. Notice we are not using the image
|
|
|
|
encoding type for more than cosmetics. Most external image
|
|
|
|
viewers can handle a multitude of types, and even if one
|
|
|
|
cannot understand a partcular type, we have no way to know
|
|
|
|
which. The spec permits this, by the way. -dms */
|
|
|
|
|
|
|
|
#ifdef USE_ONLY_8DOT3
|
|
|
|
sprintf(name,"%08lX" EXTSEP_S "%s",(ulong)kid[1],
|
|
|
|
image_type_to_string(args.imagetype,0));
|
|
|
|
#else
|
|
|
|
sprintf(name,"%08lX%08lX" EXTSEP_S "%s",(ulong)kid[0],(ulong)kid[1],
|
|
|
|
image_type_to_string(args.imagetype,0));
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if(exec_write(&spawn,NULL,command,name,1,1)!=0)
|
|
|
|
{
|
|
|
|
m_free(name);
|
|
|
|
goto fail;
|
|
|
|
}
|
|
|
|
|
|
|
|
m_free(name);
|
* photoid.h, photoid.c (parse_image_header, image_type_to_string): Useful
functions to return data about an image.
* packet.h, parse-packet.c (make_attribute_uidname,
parse_attribute_subpkts, parse_attribute), photoid.h, photoid.c
(show_photos): Handle multiple images in a single attribute packet.
* main.h, misc.c (pct_expando), sign.c (mk_notation_and_policy), photoid.c
(show_photos): Simpler expando code that does not require using
compile-time string sizes. Call image_type_to_string to get image strings
(i.e. "jpg", "image/jpeg"). Change all callers.
* keyedit.c (menu_showphoto), keylist.c (list_keyblock_print): Allow
viewing multiple images within a single attribute packet.
* gpgv.c: Various stubs for link happiness.
2002-05-02 22:47:23 +02:00
|
|
|
|
|
|
|
fwrite(&attrs[i].data[offset],attrs[i].len-offset,1,spawn->tochild);
|
|
|
|
|
|
|
|
if(exec_read(spawn)!=0)
|
|
|
|
{
|
|
|
|
exec_finish(spawn);
|
|
|
|
goto fail;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(exec_finish(spawn)!=0)
|
|
|
|
goto fail;
|
|
|
|
}
|
2001-12-22 00:09:41 +01:00
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
log_error("unable to display photo ID!\n");
|
|
|
|
}
|