~bmerry/duplicity/pydrive-regular

« back to all changes in this revision

Viewing changes to duplicity/_librsyncmodule.c

  • Committer: Kenneth Loafman
  • Date: 2015-02-12 18:55:14 UTC
  • Revision ID: kenneth@loafman.com-20150212185514-rnwqye9uslamtht7
* Really fix bug 1416344 based on comment #5 by Roman Tereshonkov

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
  sm = PyObject_New(_librsync_SigMakerObject, &_librsync_SigMakerType);
59
59
  if (sm == NULL) return NULL;
60
60
 
61
 
#ifdef RS_MD4_SIG_MAGIC // librsync >= 1.0.0
 
61
#ifdef RS_DEFAULT_STRONG_LEN /* librsync < 1.0.0 */
 
62
  sm->sig_job = rs_sig_begin((size_t)blocklen,
 
63
                             (size_t)RS_DEFAULT_STRONG_LEN);
 
64
#else /* librsync >= 1.0.0 */
62
65
  sm->sig_job = rs_sig_begin((size_t)blocklen,
63
66
                             (size_t)8, RS_MD4_SIG_MAGIC);
64
 
#else
65
 
  sm->sig_job = rs_sig_begin((size_t)blocklen,
66
 
                             (size_t)RS_DEFAULT_STRONG_LEN);
67
67
#endif
68
68
  return (PyObject*)sm;
69
69
}