Ticket #1034 (closed defect: fixed)
No return status for lgsm_pin
| Reported by: | thomas@… | Owned by: | erin_yueh@… |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | gsmd | Version: | current svn head |
| Severity: | major | Keywords: | |
| Cc: | buglog@…, balrogg@…, tick@…, erin_yueh@…, sean_chiang@… | Blocked By: | |
| Blocking: | Estimated Completion (week): | ||
| HasPatchForReview: | PatchReviewResult: | ||
| Reproducible: |
Description
It is not possbile to discover if an lgsm_pin () command was successful or not.
This is required to find out if a PIN entry was accepted or not. This makes
handling PIN entry difficult.
Attachments
Change History
comment:1 Changed 5 years ago by tick@…
- Cc tick@… added
- Summary changed from No return status for lgsm_pin to No return status for lgsm_pin
comment:6 Changed 5 years ago by tick@…
at+cpin?
can solve this issue.
We should add a function like "lgsm_pin_status" .
Changed 5 years ago by balrogg@…
- Attachment 0001-Modem-power-up-and-down-result-events.patch added
(1 of 3) Add result events for modem power-up and -down.
Changed 5 years ago by balrogg@…
- Attachment 0002-Submitting-a-PIN-for-authentication-needs-to-respond.patch added
(2 of 3) Submitting a PIN for authentication needs to respond with status too.
Changed 5 years ago by balrogg@…
- Attachment 0003-Severe-clean-up.patch added
(3 of 3) Severe clean-up in usock.c and other places.
comment:9 Changed 5 years ago by tick@…
In src/gsmd/usock.c of Patch id=402
@@ -470,17 +432,11 @@ static int network_oper_cb(struct gsmd_atcmd *cmd, void
*ctx, char *resp)
return -EINVAL;
}
- ucmd = gsmd_ucmd_fill(end - opname + 1, GSMD_MSG_NETWORK,
- GSMD_NETWORK_OPER_GET, 0);
- if (!ucmd)
- return -ENOMEM;
-
- memcpy(ucmd->buf, opname, end - opname);
- ucmd->buf[end - opname] = '\0';
-
- usock_cmd_enqueue(ucmd, gu);
-
- return 0;
+ buf = strndup(opname, end - opname);
+ ret = gsmd_ucmd_submit(gu, GSMD_MSG_NETWORK, GSMD_NETWORK_OPER_GET,
+ cmd->id, end - opname + 1, buf);
+ free(buf);
+ return ret;
}
Is this free(buf) shall be talloc_free(buf) ?
comment:10 Changed 5 years ago by balrogg@…
In this case nope, because strndup() according to manual internally uses
malloc(), so we need to use free().
comment:11 Changed 5 years ago by mickey@…
These patches don't seem to apply against r3519.
comment:12 Changed 5 years ago by mickey@…
ok, nevermind. they now apply
comment:13 Changed 5 years ago by tick@…
committing
id=400 as R3544
id=401 as R3545
id=402 as R3546
comment:14 Changed 5 years ago by tick@…
- Status changed from assigned to new
- Owner changed from tick@… to erin_yueh@…
comment:15 Changed 5 years ago by thomas@…
- Status changed from new to closed
- Resolution set to fixed
This bug is fixed in r3546. I will open a new bug for the missing PIN status
functions.
