Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix panic in offline calls of 'ipfs object stat' #795

Merged
merged 1 commit into from
Feb 25, 2015
Merged

Conversation

whyrusleeping
Copy link
Member

No description provided.

@whyrusleeping whyrusleeping added the status/in-progress In progress label Feb 19, 2015
@whyrusleeping
Copy link
Member Author

The panic that was occuring was because the Node.Stat() call was returning a NodeStat where the cast in the marshaler expected a *NodeStat. This wasnt caught until now because in online mode, the json marshaler takes care of the difference between a pointer and a real struct.

@jbenet
Copy link
Member

jbenet commented Feb 23, 2015

Good catch. LGTM. we should have a sharness test to catch this in both online + offline. (check out how i did ipfs bootstrap to test in both modes)

jbenet added a commit that referenced this pull request Feb 25, 2015
fix panic in offline calls of 'ipfs object stat'
@jbenet jbenet merged commit 29862f0 into master Feb 25, 2015
@jbenet jbenet deleted the fix/object-stat branch February 25, 2015 09:34
@jbenet jbenet removed the status/in-progress In progress label Feb 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants