File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ static pthread_mutex_t diff_mutex=PTHREAD_MUTEX_INITIALIZER;
77
77
static int initialdownload = 0 ;
78
78
static paccount_cache_callback_t psync_cache_callback = NULL ;
79
79
static uint32_t psync_is_business = 0 ;
80
+ static int psync_digest = 1 ;
80
81
81
82
void do_register_account_events_callback (paccount_cache_callback_t callback ){
82
83
psync_cache_callback = callback ;
@@ -169,7 +170,7 @@ static psync_socket *get_connected_socket(){
169
170
int saveauth , isbusiness , cryptosetup ;
170
171
auth = user = pass = NULL ;
171
172
psync_is_business = 0 ;
172
- int digest = 1 ;
173
+
173
174
while (1 ){
174
175
psync_free (auth );
175
176
psync_free (user );
@@ -200,7 +201,7 @@ static psync_socket *get_connected_socket(){
200
201
device = psync_deviceid ();
201
202
202
203
if (user && pass && pass [0 ])
203
- if (digest )
204
+ if (psync_digest )
204
205
res = get_userinfo_user_pass (sock , user , pass , device );
205
206
else
206
207
{
@@ -239,6 +240,11 @@ static psync_socket *get_connected_socket(){
239
240
psync_socket_close (sock );
240
241
psync_free (res );
241
242
if (result == 2000 ){
243
+ if (psync_digest )
244
+ {
245
+ psync_digest = 0 ;
246
+ continue ;
247
+ }
242
248
if (user && pass )
243
249
psync_set_status (PSTATUS_TYPE_AUTH , PSTATUS_AUTH_BADLOGIN );
244
250
else
@@ -252,7 +258,7 @@ static psync_socket *get_connected_socket(){
252
258
psync_wait_status (PSTATUS_TYPE_AUTH , PSTATUS_AUTH_PROVIDED );
253
259
} else if (result == 2237 )
254
260
{
255
- digest = 0 ;
261
+ psync_digest = 0 ;
256
262
continue ;
257
263
}
258
264
You can’t perform that action at this time.
0 commit comments