/[winpt]/trunk/Src/wptFileCBS.cpp
ViewVC logotype

Diff of /trunk/Src/wptFileCBS.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 277 by twoaday, Fri Dec 8 10:22:17 2006 UTC revision 278 by twoaday, Mon Jan 15 22:02:04 2007 UTC
# Line 13  Line 13 
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * General Public License for more details.   * General Public License for more details.
  *  
  * You should have received a copy of the GNU General Public License  
  * along with WinPT; if not, write to the Free Software Foundation,  
  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  
16   */   */
   
17  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
18  #include <config.h>  #include <config.h>
19  #endif  #endif
# Line 111  gpg_file_data_new (const char *fname, in Line 106  gpg_file_data_new (const char *fname, in
106      HANDLE fd = NULL;      HANDLE fd = NULL;
107      SECURITY_ATTRIBUTES sec_attr;      SECURITY_ATTRIBUTES sec_attr;
108    
109        *r_cb = NULL; /* reset */
110      memset (&sec_attr, 0, sizeof (sec_attr));      memset (&sec_attr, 0, sizeof (sec_attr));
111      sec_attr.bInheritHandle = FALSE;      sec_attr.bInheritHandle = FALSE;
112      sec_attr.nLength = sizeof (sec_attr);      sec_attr.nLength = sizeof (sec_attr);
# Line 137  gpg_file_data_new (const char *fname, in Line 133  gpg_file_data_new (const char *fname, in
133      }      }
134    
135      err = gpgme_data_new_from_cbs  (&cb->dat, &cb->cbs, cb);      err = gpgme_data_new_from_cbs  (&cb->dat, &cb->cbs, cb);
136      if (err) {      if (!err)
137            *r_cb = cb;
138        else {
139          CloseHandle (fd);          CloseHandle (fd);
140          free_if_alloc (cb);          free_if_alloc (cb);
141          return err;      }  
     }  
142    
     *r_cb = cb;  
143      return err;      return err;
144  }  }
145    
146    
147  /* Activate the progress callback for the given object @ctx. */  /* Set the progress callback for the given object @ctx. */
148  void  void
149  gpg_file_data_set_cb (file_data_t ctx, struct progress_filter_s *pfx)  gpg_file_data_set_cb (file_data_t ctx, struct progress_filter_s *pfx)
150  {  {
# Line 164  gpg_file_data_rewind (file_data_t ctx) Line 160  gpg_file_data_rewind (file_data_t ctx)
160  }  }
161    
162    
163  /* Release the context in @cb. Close all internal handles if possible. */  /* Release the context in @cb.
164       Close all internal handles if possible. */
165  void  void
166  gpg_file_data_release (file_data_t cb)  gpg_file_data_release (file_data_t cb)
167  {  {

Legend:
Removed from v.277  
changed lines
  Added in v.278

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26