mcabber/mcabber/utils.c
changeset 2248 377b6a52b25f
parent 2203 170597f5365b
child 2253 5a107c907e71
equal deleted inserted replaced
2247:fe89cdd66446 2248:377b6a52b25f
   153       return g_strdup_printf("%s%s", homedir, fname+1);
   153       return g_strdup_printf("%s%s", homedir, fname+1);
   154   }
   154   }
   155   return g_strdup(fname);
   155   return g_strdup(fname);
   156 }
   156 }
   157 
   157 
       
   158 #ifndef LOUDMOUTH_USES_SHA256
   158 //  fingerprint_to_hex(fprstr, hex, fpr_len)
   159 //  fingerprint_to_hex(fprstr, hex, fpr_len)
   159 // Convert the binary fingerprint fprstr (which is fpr_len bytes long)
   160 // Convert the binary fingerprint fprstr (which is fpr_len bytes long)
   160 // to a NULL-terminated hexadecimal string hex.
   161 // to a NULL-terminated hexadecimal string hex.
   161 // The destination array hex should have been preallocated by the caller,
   162 // The destination array hex should have been preallocated by the caller,
   162 // and should be big enough (i.e. >= 3*fpr_len bytes).
   163 // and should be big enough (i.e. >= 3*fpr_len bytes).
   197       return FALSE;
   198       return FALSE;
   198     fpr[i] = (char)g_ascii_strtoull(p, NULL, 16);
   199     fpr[i] = (char)g_ascii_strtoull(p, NULL, 16);
   199   }
   200   }
   200   return TRUE;
   201   return TRUE;
   201 }
   202 }
       
   203 #endif
   202 
   204 
   203 static gboolean tracelog_create(void)
   205 static gboolean tracelog_create(void)
   204 {
   206 {
   205   FILE *fp;
   207   FILE *fp;
   206   struct stat buf;
   208   struct stat buf;