Skip to content

Commit

Permalink
Misc tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera committed May 19, 2016
1 parent d1efafb commit 93726ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
1 change: 1 addition & 0 deletions jni/hu_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ void thread_cleanup(void)
fprintf(stderr,"%8ld:%s\n",lock_count[i],
CRYPTO_get_lock_name(i));
}
SSL_shutdown(hu_ssl_ssl);
OPENSSL_free(lock_cs);
OPENSSL_free(lock_count);

Expand Down
17 changes: 4 additions & 13 deletions mazda/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,21 +1024,12 @@ int main (int argc, char *argv[])
ret = hu_aap_start (ep_in_addr, ep_out_addr);
}

if (ret == -1)
{
hu_aap_stop ();
ret = hu_aap_start (ep_in_addr, ep_out_addr);
if (ret == -1)
{
printf("Phone switched to accessory mode. Attempting once more.\n");
sleep(1);
ret = hu_aap_start (ep_in_addr, ep_out_addr);
}
}

if (ret < 0) {
if (ret == -2)
{
printf("Phone is not connected. Connect a supported phone and restart.\n");
return 0;
}
else if (ret == -1)
printf("Phone switched to accessory mode. Restart to enter AA mode.\n");
else
Expand Down Expand Up @@ -1103,5 +1094,5 @@ int main (int argc, char *argv[])

printf("END \n");

return (ret);
return 0;
}

0 comments on commit 93726ce

Please sign in to comment.