{"action":"created","comment":{"url":"https://api.github.com/repos/meganz/sdk/pulls/comments/36101035","id":36101035,"diff_hunk":"@@ -2411,14 +2413,12 @@ char *MegaApiImpl::dumpSession()\n char *MegaApiImpl::dumpXMPPSession()\n {\n     sdkMutex.lock();\n-    byte session[64];\n     char* buf = NULL;\n-    int size;\n-    size = client->dumpsession(session, sizeof session);\n-    if (size > sizeof(client->key.key))\n+\n+    if (client->loggedin())\n     {\n-        buf = new char[sizeof(session)*4/3+4];\n-        Base64::btoa(session + sizeof(client->key.key), size - sizeof(client->key.key), buf);\n+        buf = new char[64 * 4 / 3 + 4];","path":"src/megaapi_impl.cpp","position":39,"original_position":39,"commit_id":"d51d25745fa7552aa7a16df5bb352e4b44f2ee63","original_commit_id":"d51d25745fa7552aa7a16df5bb352e4b44f2ee63","user":{"login":"sergiohs84","id":11694066,"avatar_url":"https://avatars.githubusercontent.com/u/11694066?v=3","gravatar_id":"","url":"https://api.github.com/users/sergiohs84","html_url":"https://github.com/sergiohs84","followers_url":"https://api.github.com/users/sergiohs84/followers","following_url":"https://api.github.com/users/sergiohs84/following{/other_user}","gists_url":"https://api.github.com/users/sergiohs84/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiohs84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiohs84/subscriptions","organizations_url":"https://api.github.com/users/sergiohs84/orgs","repos_url":"https://api.github.com/users/sergiohs84/repos","events_url":"https://api.github.com/users/sergiohs84/events{/privacy}","received_events_url":"https://api.github.com/users/sergiohs84/received_events","type":"User","site_admin":false},"body":"Here, I guess the value '64' represents the maximum session length. If so, better to use the new macro MAX_SESSION_LENGTH.","created_at":"2015-08-03T16:11:52Z","updated_at":"2015-08-03T16:11:52Z","html_url":"https://github.com/meganz/sdk/pull/116#discussion_r36101035","pull_request_url":"https://api.github.com/repos/meganz/sdk/pulls/116","_links":{"self":{"href":"https://api.github.com/repos/meganz/sdk/pulls/comments/36101035"},"html":{"href":"https://github.com/meganz/sdk/pull/116#discussion_r36101035"},"pull_request":{"href":"https://api.github.com/repos/meganz/sdk/pulls/116"}}},"pull_request":{"url":"https://api.github.com/repos/meganz/sdk/pulls/116","id":41245345,"html_url":"https://github.com/meganz/sdk/pull/116","diff_url":"https://github.com/meganz/sdk/pull/116.diff","patch_url":"https://github.com/meganz/sdk/pull/116.patch","issue_url":"https://api.github.com/repos/meganz/sdk/issues/116","number":116,"state":"open","locked":false,"title":"Manage the new encryption key associated with the session ID","user":{"login":"javiserrano","id":5003542,"avatar_url":"https://avatars.githubusercontent.com/u/5003542?v=3","gravatar_id":"","url":"https://api.github.com/users/javiserrano","html_url":"https://github.com/javiserrano","followers_url":"https://api.github.com/users/javiserrano/followers","following_url":"https://api.github.com/users/javiserrano/following{/other_user}","gists_url":"https://api.github.com/users/javiserrano/gists{/gist_id}","starred_url":"https://api.github.com/users/javiserrano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiserrano/subscriptions","organizations_url":"https://api.github.com/users/javiserrano/orgs","repos_url":"https://api.github.com/users/javiserrano/repos","events_url":"https://api.github.com/users/javiserrano/events{/privacy}","received_events_url":"https://api.github.com/users/javiserrano/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-30T15:12:31Z","updated_at":"2015-08-03T16:11:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1cd9cabe6a04425501b9ad0b0960e61fc05039e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/meganz/sdk/pulls/116/commits","review_comments_url":"https://api.github.com/repos/meganz/sdk/pulls/116/comments","review_comment_url":"https://api.github.com/repos/meganz/sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/meganz/sdk/issues/116/comments","statuses_url":"https://api.github.com/repos/meganz/sdk/statuses/d51d25745fa7552aa7a16df5bb352e4b44f2ee63","head":{"label":"meganz:sek","ref":"sek","sha":"d51d25745fa7552aa7a16df5bb352e4b44f2ee63","user":{"login":"meganz","id":4920706,"avatar_url":"https://avatars.githubusercontent.com/u/4920706?v=3","gravatar_id":"","url":"https://api.github.com/users/meganz","html_url":"https://github.com/meganz","followers_url":"https://api.github.com/users/meganz/followers","following_url":"https://api.github.com/users/meganz/following{/other_user}","gists_url":"https://api.github.com/users/meganz/gists{/gist_id}","starred_url":"https://api.github.com/users/meganz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meganz/subscriptions","organizations_url":"https://api.github.com/users/meganz/orgs","repos_url":"https://api.github.com/users/meganz/repos","events_url":"https://api.github.com/users/meganz/events{/privacy}","received_events_url":"https://api.github.com/users/meganz/received_events","type":"Organization","site_admin":false},"repo":{"id":14556029,"name":"sdk","full_name":"meganz/sdk","owner":{"login":"meganz","id":4920706,"avatar_url":"https://avatars.githubusercontent.com/u/4920706?v=3","gravatar_id":"","url":"https://api.github.com/users/meganz","html_url":"https://github.com/meganz","followers_url":"https://api.github.com/users/meganz/followers","following_url":"https://api.github.com/users/meganz/following{/other_user}","gists_url":"https://api.github.com/users/meganz/gists{/gist_id}","starred_url":"https://api.github.com/users/meganz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meganz/subscriptions","organizations_url":"https://api.github.com/users/meganz/orgs","repos_url":"https://api.github.com/users/meganz/repos","events_url":"https://api.github.com/users/meganz/events{/privacy}","received_events_url":"https://api.github.com/users/meganz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/meganz/sdk","description":"MEGA C++ SDK","fork":false,"url":"https://api.github.com/repos/meganz/sdk","forks_url":"https://api.github.com/repos/meganz/sdk/forks","keys_url":"https://api.github.com/repos/meganz/sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meganz/sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meganz/sdk/teams","hooks_url":"https://api.github.com/repos/meganz/sdk/hooks","issue_events_url":"https://api.github.com/repos/meganz/sdk/issues/events{/number}","events_url":"https://api.github.com/repos/meganz/sdk/events","assignees_url":"https://api.github.com/repos/meganz/sdk/assignees{/user}","branches_url":"https://api.github.com/repos/meganz/sdk/branches{/branch}","tags_url":"https://api.github.com/repos/meganz/sdk/tags","blobs_url":"https://api.github.com/repos/meganz/sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meganz/sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meganz/sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/meganz/sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meganz/sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/meganz/sdk/languages","stargazers_url":"https://api.github.com/repos/meganz/sdk/stargazers","contributors_url":"https://api.github.com/repos/meganz/sdk/contributors","subscribers_url":"https://api.github.com/repos/meganz/sdk/subscribers","subscription_url":"https://api.github.com/repos/meganz/sdk/subscription","commits_url":"https://api.github.com/repos/meganz/sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/meganz/sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/meganz/sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/meganz/sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/meganz/sdk/contents/{+path}","compare_url":"https://api.github.com/repos/meganz/sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meganz/sdk/merges","archive_url":"https://api.github.com/repos/meganz/sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meganz/sdk/downloads","issues_url":"https://api.github.com/repos/meganz/sdk/issues{/number}","pulls_url":"https://api.github.com/repos/meganz/sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/meganz/sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/meganz/sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meganz/sdk/labels{/name}","releases_url":"https://api.github.com/repos/meganz/sdk/releases{/id}","created_at":"2013-11-20T12:33:53Z","updated_at":"2015-08-02T18:11:15Z","pushed_at":"2015-08-03T13:03:03Z","git_url":"git://github.com/meganz/sdk.git","ssh_url":"git@github.com:meganz/sdk.git","clone_url":"https://github.com/meganz/sdk.git","svn_url":"https://github.com/meganz/sdk","homepage":"","size":15573,"stargazers_count":131,"watchers_count":131,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":67,"mirror_url":null,"open_issues_count":14,"forks":67,"open_issues":14,"watchers":131,"default_branch":"master"}},"base":{"label":"meganz:master","ref":"master","sha":"fa7c7581f8af3d84a75dff33a214896da26536cb","user":{"login":"meganz","id":4920706,"avatar_url":"https://avatars.githubusercontent.com/u/4920706?v=3","gravatar_id":"","url":"https://api.github.com/users/meganz","html_url":"https://github.com/meganz","followers_url":"https://api.github.com/users/meganz/followers","following_url":"https://api.github.com/users/meganz/following{/other_user}","gists_url":"https://api.github.com/users/meganz/gists{/gist_id}","starred_url":"https://api.github.com/users/meganz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meganz/subscriptions","organizations_url":"https://api.github.com/users/meganz/orgs","repos_url":"https://api.github.com/users/meganz/repos","events_url":"https://api.github.com/users/meganz/events{/privacy}","received_events_url":"https://api.github.com/users/meganz/received_events","type":"Organization","site_admin":false},"repo":{"id":14556029,"name":"sdk","full_name":"meganz/sdk","owner":{"login":"meganz","id":4920706,"avatar_url":"https://avatars.githubusercontent.com/u/4920706?v=3","gravatar_id":"","url":"https://api.github.com/users/meganz","html_url":"https://github.com/meganz","followers_url":"https://api.github.com/users/meganz/followers","following_url":"https://api.github.com/users/meganz/following{/other_user}","gists_url":"https://api.github.com/users/meganz/gists{/gist_id}","starred_url":"https://api.github.com/users/meganz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meganz/subscriptions","organizations_url":"https://api.github.com/users/meganz/orgs","repos_url":"https://api.github.com/users/meganz/repos","events_url":"https://api.github.com/users/meganz/events{/privacy}","received_events_url":"https://api.github.com/users/meganz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/meganz/sdk","description":"MEGA C++ SDK","fork":false,"url":"https://api.github.com/repos/meganz/sdk","forks_url":"https://api.github.com/repos/meganz/sdk/forks","keys_url":"https://api.github.com/repos/meganz/sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meganz/sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meganz/sdk/teams","hooks_url":"https://api.github.com/repos/meganz/sdk/hooks","issue_events_url":"https://api.github.com/repos/meganz/sdk/issues/events{/number}","events_url":"https://api.github.com/repos/meganz/sdk/events","assignees_url":"https://api.github.com/repos/meganz/sdk/assignees{/user}","branches_url":"https://api.github.com/repos/meganz/sdk/branches{/branch}","tags_url":"https://api.github.com/repos/meganz/sdk/tags","blobs_url":"https://api.github.com/repos/meganz/sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meganz/sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meganz/sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/meganz/sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meganz/sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/meganz/sdk/languages","stargazers_url":"https://api.github.com/repos/meganz/sdk/stargazers","contributors_url":"https://api.github.com/repos/meganz/sdk/contributors","subscribers_url":"https://api.github.com/repos/meganz/sdk/subscribers","subscription_url":"https://api.github.com/repos/meganz/sdk/subscription","commits_url":"https://api.github.com/repos/meganz/sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/meganz/sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/meganz/sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/meganz/sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/meganz/sdk/contents/{+path}","compare_url":"https://api.github.com/repos/meganz/sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meganz/sdk/merges","archive_url":"https://api.github.com/repos/meganz/sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meganz/sdk/downloads","issues_url":"https://api.github.com/repos/meganz/sdk/issues{/number}","pulls_url":"https://api.github.com/repos/meganz/sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/meganz/sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/meganz/sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meganz/sdk/labels{/name}","releases_url":"https://api.github.com/repos/meganz/sdk/releases{/id}","created_at":"2013-11-20T12:33:53Z","updated_at":"2015-08-02T18:11:15Z","pushed_at":"2015-08-03T13:03:03Z","git_url":"git://github.com/meganz/sdk.git","ssh_url":"git@github.com:meganz/sdk.git","clone_url":"https://github.com/meganz/sdk.git","svn_url":"https://github.com/meganz/sdk","homepage":"","size":15573,"stargazers_count":131,"watchers_count":131,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":67,"mirror_url":null,"open_issues_count":14,"forks":67,"open_issues":14,"watchers":131,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/meganz/sdk/pulls/116"},"html":{"href":"https://github.com/meganz/sdk/pull/116"},"issue":{"href":"https://api.github.com/repos/meganz/sdk/issues/116"},"comments":{"href":"https://api.github.com/repos/meganz/sdk/issues/116/comments"},"review_comments":{"href":"https://api.github.com/repos/meganz/sdk/pulls/116/comments"},"review_comment":{"href":"https://api.github.com/repos/meganz/sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/meganz/sdk/pulls/116/commits"},"statuses":{"href":"https://api.github.com/repos/meganz/sdk/statuses/d51d25745fa7552aa7a16df5bb352e4b44f2ee63"}}}}