@@ -165,6 +165,7 @@ seaf_commit_free (SeafCommit *commit)
165165 if (commit -> repo_name ) g_free (commit -> repo_name );
166166 if (commit -> repo_desc ) g_free (commit -> repo_desc );
167167 if (commit -> device_name ) g_free (commit -> device_name );
168+ g_free (commit -> client_version );
168169 g_free (commit -> magic );
169170 g_free (commit -> random_key );
170171 g_free (commit );
@@ -623,6 +624,8 @@ commit_to_json_object (SeafCommit *commit)
623624 commit -> repo_category );
624625 if (commit -> device_name )
625626 json_object_set_string_member (object , "device_name" , commit -> device_name );
627+ if (commit -> client_version )
628+ json_object_set_string_member (object , "client_version" , commit -> client_version );
626629
627630 if (commit -> encrypted )
628631 json_object_set_string_member (object , "encrypted" , "true" );
@@ -663,6 +666,7 @@ commit_from_json_object (const char *commit_id, json_t *object)
663666 const char * repo_desc ;
664667 const char * repo_category ;
665668 const char * device_name ;
669+ const char * client_version ;
666670 const char * encrypted = NULL ;
667671 int enc_version = 0 ;
668672 const char * magic = NULL ;
@@ -692,6 +696,7 @@ commit_from_json_object (const char *commit_id, json_t *object)
692696 repo_desc = "" ;
693697 repo_category = json_object_get_string_or_null_member (object , "repo_category" );
694698 device_name = json_object_get_string_or_null_member (object , "device_name" );
699+ client_version = json_object_get_string_or_null_member (object , "client_version" );
695700
696701 if (json_object_has_member (object , "encrypted" ))
697702 encrypted = json_object_get_string_or_null_member (object , "encrypted" );
@@ -763,6 +768,7 @@ commit_from_json_object (const char *commit_id, json_t *object)
763768 if (repo_category )
764769 commit -> repo_category = g_strdup (repo_category );
765770 commit -> device_name = g_strdup (device_name );
771+ commit -> client_version = g_strdup (client_version );
766772
767773 if (commit -> encrypted ) {
768774 commit -> enc_version = enc_version ;
0 commit comments