Changeset 138

Show
Ignore:
Timestamp:
02/15/06 20:36:37 (3 years ago)
Author:
conrad
Message:

bugfix: send_memory (add separate cgi_send(), cgi_send_photo())

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • fastphoto/trunk/src/cgi.c

    r137 r138  
    105105 
    106106int 
    107 cgi_send (photo_t * photo) 
     107cgi_send_photo (photo_t * photo) 
    108108{ 
    109109  header_content_length (photo->size); 
     
    112112  photo_put (photo); 
    113113 
    114   return 1
     114  return 0
    115115} 
     116 
     117int 
     118cgi_send (fastphoto_t * params) 
     119{ 
     120  if (params->out.name) { 
     121    cgi_send_photo (&params->out); 
     122  } else { 
     123    header_content_length ((off_t)params->data_size); 
     124    header_end(); 
     125 
     126    send_memory (params); 
     127  } 
     128 
     129  return 0; 
     130} 
  • fastphoto/trunk/src/cgi.h

    r136 r138  
    55 
    66int cgi_init (fastphoto_t * params); 
    7 int cgi_send (photo_t * photo); 
     7int cgi_send_photo (photo_t * photo); 
     8int cgi_send (fastphoto_t * params); 
    89 
    910size_t send_memory (fastphoto_t * params); 
  • fastphoto/trunk/src/main.c

    r136 r138  
    171171   
    172172    if (!err) { 
    173       if (!params.out.name) { 
     173      if (cgi) { 
     174        cgi_send (&params); 
     175      } else if (!params.out.name) { 
    174176        send_memory (&params); 
    175       } else if (cgi) { 
    176         cgi_send (&params.out); 
    177177      } 
    178178    }