We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I pass a callback argument along with cmd and callback function, I am not able to get the callback argument inside the callback function handler.
When I do this
int a = 1; int* a_ptr = &a const struct mgos_pppos_cmd cmds[] = { {.cmd = "AT+CMGR", .cb = test_cb, .cb_arg=a_ptr}, {.cmd = NULL}, }; bool test_cb(void* cb_arg, bool ok, struct mg_str data) { //The void pointer cb_arg is not same as a_ptr }
pppos/src/mgos_pppos.c
Line 689 in 31db8aa
cmd_res = cur_cmd->cb(pd, true, mg_strstrip(sd));
pd is passed instead of cur_cmd->cb_arg Shouldnt it be the callback argument?
The text was updated successfully, but these errors were encountered:
indeed, you should. please send a PR. thank you!
Sorry, something went wrong.
No branches or pull requests
When I pass a callback argument along with cmd and callback function, I am not able to get the callback argument inside the callback function handler.
When I do this
pppos/src/mgos_pppos.c
Line 689 in 31db8aa
cmd_res = cur_cmd->cb(pd, true, mg_strstrip(sd));
pd is passed instead of cur_cmd->cb_arg
Shouldnt it be the callback argument?
The text was updated successfully, but these errors were encountered: