Fix field width for 64bit library name hash

Was 8 hex digits, should have been 16 hex digits.
This commit is contained in:
Julien BLACHE 2010-01-25 17:47:37 +01:00
parent 672e4697ae
commit e6234c35ad
2 changed files with 3 additions and 3 deletions

View File

@ -299,7 +299,7 @@ register_services(char *ffid, int no_rsp, int no_daap)
libhash = murmur_hash64(libname, strlen(libname), 0);
snprintf(txtrecord[0], 128, "txtvers=1");
snprintf(txtrecord[1], 128, "DbId=%08" PRIX64, libhash);
snprintf(txtrecord[1], 128, "DbId=%016" PRIX64, libhash);
snprintf(txtrecord[2], 128, "DvTy=iTunes");
snprintf(txtrecord[3], 128, "DvSv=2306"); /* Magic number! Yay! */
snprintf(txtrecord[4], 128, "Ver=131073"); /* iTunes 6.0.4 */
@ -315,7 +315,7 @@ register_services(char *ffid, int no_rsp, int no_daap)
*/
/* Use as scratch space for the hash */
snprintf(records[7], 128, "%08" PRIX64, libhash);
snprintf(records[7], 128, "%016" PRIX64, libhash);
/* Register touch-able service, for Remote.app */
ret = mdns_register(records[7], "_touch-able._tcp", port, txtrecord);

View File

@ -736,7 +736,7 @@ do_pairing(struct remote_info *ri)
* ID (DbId) are different (see comment in main.c).
* Remote uses the service name to perform mDNS lookups.
*/
ret = snprintf(req_uri, sizeof(req_uri), "/pair?pairingcode=%s&servicename=%08" PRIX64, pairing_hash, libhash);
ret = snprintf(req_uri, sizeof(req_uri), "/pair?pairingcode=%s&servicename=%016" PRIX64, pairing_hash, libhash);
free(pairing_hash);
if ((ret < 0) || (ret >= sizeof(req_uri)))
{