Skip to content

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

Merged
jbenet merged 1 commit into
masterfrom
fix/object-stat
Feb 25, 2015
Merged

jbenet merged 1 commit into
masterfrom
fix/object-stat

Conversation

@whyrusleeping

Copy link
Copy Markdown
Member

No description provided.

@whyrusleeping whyrusleeping added the status/in-progress In progress label Feb 19, 2015
@whyrusleeping

Copy link
Copy Markdown
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

jbenet commented Feb 23, 2015

Copy link
Copy Markdown
Member

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