-
Notifications
You must be signed in to change notification settings - Fork 13
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
connman_ncurses crashes when toggling between online/offline modes #2
Conversation
Thanks for the report. It should work with json-c 0.11 thus there is no problem of version with json-c. We should check but it can take time. Is there a work around? |
I was able to reproduce this with the latest connman git version and connman 1.27, haven't tried with lower versions. I've not found any workaround but will keep poking it. |
Hi, I was able to reproduce the bug on debian with the connmand packaged and the latest git version. connman_ncurses don't crash every time, often it just keep hanging on "Toggling OfflineMode..." after at least 3 offline/online toggling. @chilicuil when it crashes do you see "junk" string for State and OfflineMode in the header ? By junk string I mean some random JSON string that shouldn't be there, for example I have This far I found that the |
Hello Alan, Yes, I also see garbage strings in the headers, exactly the same text, |
So I solved this: @jobol Do you prefer a pull request or a commit to fix this ? I'm sorry I missed it. |
@alan-mushi to be honest, I prefer a pull request linked to that issue (#2) but the operation is really painful to do. That script is doing that: #!/bin/bash
usage() {
echo "usage: $(basename $0) nick repo issue [brsrc [brtgt]]"
}
case $# in
3) nick=$1; repo=$2; issue=$3; brsrc=issue$3; brtgt=master;;
4) nick=$1; repo=$2; issue=$3; brsrc=$4; brtgt=master;;
5) nick=$1; repo=$2; issue=$3; brsrc=$4; brtgt=$5;;
*) usage >&2; exit 1;;
esac
cat << EOC
curl \
--user $nick \
--request POST \
--data '{"issue": "$issue", "head": "$nick:$brsrc", "base": "$brtgt"}' \
https://api.github.com/repos/$repo/pulls
EOC By typing script alan-mushi connman-json-client 2 You will get the REST API pull request for attaching the commit to the issue |
PS: there might be a better solution than the script : https://github.com/blog/1506-closing-issues-via-pull-requests |
When I tried what you suggest, it failed. So do it as you want. Let's try... |
I got an issue (404 HTTP code) with your script for the api url see https://developer.github.com/v3/pulls/#create-a-pull-request for the new url format. |
I'll update my script, thanks |
Testcase:
libjson-c2 version 0.11-3. I don't know enough C, but anyway went on and tried to debug by myself without success =)