void receive_request_result(char *cmd, char *arg, int ret, void *user_data)
{
- msg("_request_result_cb is called");
+ msg("_request_result_cb is called command %s", cmd);
if (cmd == NULL) {
msgp("cmd is null [%s(0x%X)]", comp_error_to_string(ret), ret);
return;
}
- if (strcmp("1", cmd) == 0) {
- msgp("[CMD] Request Create Group [%s(0x%X)]", comp_error_to_string(ret), ret);
+ if (strcmp("COMP_REQ_CREATE_GROUP", cmd) == 0) {
+ msgp("[CMD] Request Create Group [%s(0x%X)]", comp_error_to_string(ret),
+ ret);
if (ret == COMP_ERROR_NONE && arg != NULL) {
msgb("Created Group name is %s", arg);
run_group_find(NULL, NULL);
run_devices_find(NULL, NULL);
}
- } else if (strcmp("2", cmd) == 0) {
+ } else if (strcmp("COMP_REQ_INVITE_DEVICE", cmd) == 0) {
msgp("[CMD] Request Invite [%s(0x%X)]", comp_error_to_string(ret), ret);
if (ret == COMP_ERROR_NONE && arg != NULL)
msgb("Invited Device ID is %s", arg);
- } else if (strcmp("3", cmd) == 0) {
+ } else if (strcmp("COMP_REQ_EJECT_DEVICE", cmd) == 0) {
msgp("[CMD] Request Eject [%s(0x%X)]", comp_error_to_string(ret), ret);
if (ret == COMP_ERROR_NONE && arg != NULL)
msgb("Ejected Device ID is %s", arg);
- } else if (strcmp("4", cmd) == 0) {
- msgp("[CMD] Request Delete Group [%s(0x%X)]", comp_error_to_string(ret), ret);
+ } else if (strcmp("COMP_REQ_DELETE_GROUP", cmd) == 0) {
+ msgp("[CMD] Request Delete Group [%s(0x%X)]", comp_error_to_string(ret),
+ ret);
if (ret == COMP_ERROR_NONE && arg != NULL)
msgb("Deleted Group name is %s", arg);
+ } else if (strcmp("COMP_REQ_SEND_DATA", cmd) == 0) {
+ msgp("Received data [%d] %s", strlen(arg), arg);
} else {
msgp("[Recv][%d] %s", strlen(arg), arg);
}