Browse code

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

(cherry picked from commit ab9d9a242ec60b820496794953610a84b303d2f3)

Daniel-Constantin Mierla authored on 15/10/2014 23:03:54
Showing 1 changed files
... ...
@@ -1257,8 +1257,8 @@ int dlg_json_to_profiles(dlg_cell_t *dlg, srjson_doc_t *jdoc)
1257 1257
 					val.len = strlen(val.s);
1258 1258
 				} else if(strcmp(jt->string, "puid")==0) {
1259 1259
 					puid.s = jt->valuestring;
1260
-					puid.len = strlen(val.s);
1261
-				} else if(strcmp(jt->string, "puid")==0) {
1260
+					puid.len = strlen(puid.s);
1261
+				} else if(strcmp(jt->string, "expires")==0) {
1262 1262
 					expires = (time_t)jt->valueint;
1263 1263
 				} else if(strcmp(jt->string, "flags")==0) {
1264 1264
 					flags = jt->valueint;