[sword-devel] Transport status reporting

Jaak Ristioja jaak at ristioja.ee
Wed Jul 31 07:40:28 MST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 31.07.2013 17:08, Troy A. Griffitts wrote:
> I've added the new method signature as you've suggested (slighted 
> different to match the preStatus method), and deprecated the 
> statusUpdate method.  Oddly GCC doesn't warn me that I've
> overloaded the deprecated method in the installmgr utility.  I'm
> calling the deprecated method from a default implementation of the
> new method, so if you don't override the new method (which most
> people won't yet), they'll still get their status updates.

I'm not sure whether using unsigned long instead of size_t (or even
instead of curl_off_t itself) is a good idea, since curl_off_t used in
the new callback interface of curl might either be a long, a long long
or a ssize_t (POSIX) depending on the widths of long and long long.
Look for CURL_TYPEOF_CURL_OFF_T in /CMakeLists.txt in curl:

  https://github.com/bagder/curl/blob/master/CMakeLists.txt#L400

So in case we're using unsigned long, but curl uses unsigned long long
as curl_off_t, it might happen, that Sword progress indication for
sizes larger than 4 GB will be incorrect (if sizeof("long long" or
"ssize_t") > 4 && sizeof(unsigned long) == 4).

About the default implementation of update() calling statusUpdate() in
SVN 2932, I think you might have missed some pragmas. I think
something like this is better:

  #if defined(__GNUC__)
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
  #endif
  statusUpdate(totalBytes, completedBytes);
  #if defined(__GNUC__)
  #pragma GCC diagnostic pop
  #endif


Blessings,
Jaak
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQgcBAEBAgAGBQJR+SHNAAoJEEqsYmEt1rCOHC0//0T6fDrQ7zrIh6uao9UuTeXT
7DXiZqEkGbu2lZSPVLohNtSCt/gu0dkzxPYZylik4snUJ18twPFuEuqqWA+EnX3q
MjAeoJ9Y/CenWFvmZp5LDRS05143GrhKZKbOJj+gyKsKAfYiJ8RGn9DKkP9HGJm/
h+mYRPzUNMtvlhjmO7593Oi3mZYWbXVBio5KTb8M+C8nlBTu2RCj5Ta7vOF57mRq
djj2jaNJ/x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