Ticket #1034 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

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

0001-Modem-power-up-and-down-result-events.patch (3.4 KB) - added by balrogg@… 11 years ago.
(1 of 3) Add result events for modem power-up and -down.
0002-Submitting-a-PIN-for-authentication-needs-to-respond.patch (12.0 KB) - added by balrogg@… 11 years ago.
(2 of 3) Submitting a PIN for authentication needs to respond with status too.
0003-Severe-clean-up.patch (31.1 KB) - added by balrogg@… 11 years ago.
(3 of 3) Severe clean-up in usock.c and other places.

Change History

comment:1 Changed 11 years ago by tick@…

  • Cc tick@… added
  • Summary changed from No return status for lgsm_pin to No return status for lgsm_pin

comment:2 Changed 11 years ago by tick@…

  • Cc sean_chiang@… added

comment:3 Changed 11 years ago by tick@…

  • Cc erin_yueh@… added

comment:4 Changed 11 years ago by tick@…

  • Owner changed from laforge@… to tick@…

comment:5 Changed 11 years ago by tick@…

  • Status changed from new to assigned

comment:6 Changed 11 years ago by tick@…

at+cpin?
can solve this issue.
We should add a function like "lgsm_pin_status" .

comment:7 Changed 11 years ago by balrogg@…

  • Cc balrogg@… added
  • rep_platform changed from PC to All

comment:8 Changed 11 years ago by balrogg@…

  • blocked set to 1028

Changed 11 years ago by balrogg@…

(1 of 3) Add result events for modem power-up and -down.

Changed 11 years ago by balrogg@…

(2 of 3) Submitting a PIN for authentication needs to respond with status too.

Changed 11 years ago by balrogg@…

(3 of 3) Severe clean-up in usock.c and other places.

comment:9 Changed 11 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 11 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 11 years ago by mickey@…

These patches don't seem to apply against r3519.

comment:12 Changed 11 years ago by mickey@…

ok, nevermind. they now apply

comment:13 Changed 11 years ago by tick@…

committing
id=400 as R3544
id=401 as R3545
id=402 as R3546

comment:14 Changed 11 years ago by tick@…

  • Status changed from assigned to new
  • Owner changed from tick@… to erin_yueh@…

comment:15 Changed 11 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.

Note: See TracTickets for help on using tickets.