Просмотр исходного кода

dialog: proper de-serialization of expires value for a profile

Daniel-Constantin Mierla 11 лет назад
Родитель
Сommit
ab9d9a242e
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      modules/dialog/dlg_profile.c

+ 2 - 2
modules/dialog/dlg_profile.c

@@ -1257,8 +1257,8 @@ int dlg_json_to_profiles(dlg_cell_t *dlg, srjson_doc_t *jdoc)
 					val.len = strlen(val.s);
 				} else if(strcmp(jt->string, "puid")==0) {
 					puid.s = jt->valuestring;
-					puid.len = strlen(val.s);
-				} else if(strcmp(jt->string, "puid")==0) {
+					puid.len = strlen(puid.s);
+				} else if(strcmp(jt->string, "expires")==0) {
 					expires = (time_t)jt->valueint;
 				} else if(strcmp(jt->string, "flags")==0) {
 					flags = jt->valueint;