summaryrefslogtreecommitdiff
path: root/src/session-get.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/session-get.c')
-rw-r--r--src/session-get.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/session-get.c b/src/session-get.c
index f9c94c6..25461d6 100644
--- a/src/session-get.c
+++ b/src/session-get.c
@@ -24,9 +24,14 @@
#include "protocol-constants.h"
#include "session-get.h"
+const gchar *session_get_version_string(JsonObject *s)
+{
+ return json_object_get_string_member(s, SGET_VERSION);
+}
+
int session_get_version(JsonObject *s, float *version)
{
- return sscanf(json_object_get_string_member(s, SGET_VERSION), "%g", version);
+ return sscanf(session_get_version_string(s), "%g", version);
}
gint64 session_get_download_dir_free_space(JsonObject *s)