[Bug 1034] No return status for lgsm_pin

bugzilla-daemon at bugzilla.openmoko.org bugzilla-daemon at bugzilla.openmoko.org
Fri Nov 30 18:27:34 CET 2007


http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=1034





------- Additional Comments From tick at openmoko.com  2007-11-30 18:27 -------
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) ?



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the buglog mailing list