Skip to content

Commit 78c9c29

Browse files
author
Ivan Stoev
committed
Revert "Fixing some digest missmatch."
This reverts commit 0716b74.
1 parent 0716b74 commit 78c9c29

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

pdiff.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ static pthread_mutex_t diff_mutex=PTHREAD_MUTEX_INITIALIZER;
7777
static int initialdownload=0;
7878
static paccount_cache_callback_t psync_cache_callback=NULL;
7979
static uint32_t psync_is_business=0;
80-
static int psync_digest = 1;
8180

8281
void do_register_account_events_callback(paccount_cache_callback_t callback){
8382
psync_cache_callback=callback;
@@ -170,7 +169,7 @@ static psync_socket *get_connected_socket(){
170169
int saveauth, isbusiness, cryptosetup;
171170
auth=user=pass=NULL;
172171
psync_is_business = 0;
173-
172+
int digest = 1;
174173
while (1){
175174
psync_free(auth);
176175
psync_free(user);
@@ -201,7 +200,7 @@ static psync_socket *get_connected_socket(){
201200
device=psync_deviceid();
202201

203202
if (user && pass && pass[0])
204-
if (psync_digest)
203+
if (digest)
205204
res=get_userinfo_user_pass(sock, user, pass, device);
206205
else
207206
{
@@ -240,11 +239,6 @@ static psync_socket *get_connected_socket(){
240239
psync_socket_close(sock);
241240
psync_free(res);
242241
if (result==2000){
243-
if (psync_digest)
244-
{
245-
psync_digest = 0;
246-
continue;
247-
}
248242
if (user && pass)
249243
psync_set_status(PSTATUS_TYPE_AUTH, PSTATUS_AUTH_BADLOGIN);
250244
else
@@ -258,7 +252,7 @@ static psync_socket *get_connected_socket(){
258252
psync_wait_status(PSTATUS_TYPE_AUTH, PSTATUS_AUTH_PROVIDED);
259253
} else if (result == 2237)
260254
{
261-
psync_digest = 0;
255+
digest = 0;
262256
continue;
263257
}
264258

0 commit comments

Comments
 (0)