/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugins.d/mandos-client.c

  • Committer: Teddy Hogeborn
  • Date: 2009-09-05 17:40:18 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090905174018-3w6q5uqk8ti5fqq6
* plugins.d/mandos-client.c (init_gpgme): Move variable "ret" into the
                                          innermost scope possible.
  (start_mandos_communication): Move variable "decrypted_buffer_size"
                                into the innermost scope possible.

Show diffs side-by-side

added added

removed removed

Lines of Context:
164
164
 */
165
165
static bool init_gpgme(const char *seckey,
166
166
                       const char *pubkey, const char *tempdir){
167
 
  int ret;
168
167
  gpgme_error_t rc;
169
168
  gpgme_engine_info_t engine_info;
170
169
  
173
172
   * Helper function to insert pub and seckey to the engine keyring.
174
173
   */
175
174
  bool import_key(const char *filename){
 
175
    int ret;
176
176
    int fd;
177
177
    gpgme_data_t pgp_data;
178
178
    
531
531
  char *decrypted_buffer;
532
532
  size_t buffer_length = 0;
533
533
  size_t buffer_capacity = 0;
534
 
  ssize_t decrypted_buffer_size;
535
534
  size_t written;
536
535
  int retval = 0;
537
536
  gnutls_session_t session;
809
808
                                               buffer_length,
810
809
                                               &decrypted_buffer);
811
810
    if(decrypted_buffer_size >= 0){
 
811
      ssize_t decrypted_buffer_size;
 
812
      
812
813
      written = 0;
813
814
      while(written < (size_t) decrypted_buffer_size){
814
815
        if(quit_now){