Version 0.1.10 from FTP

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2001-10-18 16:47:57 +00:00
parent 39b383b353
commit a07f2c930b
11 changed files with 64 additions and 64 deletions

View File

@@ -54,7 +54,7 @@ static int aopen_setdev(struct ast_modem_pvt *p, int dev)
return -1;
}
ast_modem_trim(p->response);
strncpy(cmd, p->response, sizeof(cmd));
strncpy(cmd, p->response, sizeof(cmd)-1);
if (ast_modem_expect(p, "OK", 5)) {
ast_log(LOG_WARNING, "Modem did not respond properly\n");
return -1;
@@ -344,17 +344,17 @@ static char *aopen_identify(struct ast_modem_pvt *p)
char rev[80];
ast_modem_send(p, "AT#MDL?", 0);
ast_modem_read_response(p, 5);
strncpy(mdl, p->response, sizeof(mdl));
strncpy(mdl, p->response, sizeof(mdl)-1);
ast_modem_trim(mdl);
ast_modem_expect(p, "OK", 5);
ast_modem_send(p, "AT#MFR?", 0);
ast_modem_read_response(p, 5);
strncpy(mfr, p->response, sizeof(mfr));
strncpy(mfr, p->response, sizeof(mfr)-1);
ast_modem_trim(mfr);
ast_modem_expect(p, "OK", 5);
ast_modem_send(p, "AT#REV?", 0);
ast_modem_read_response(p, 5);
strncpy(rev, p->response, sizeof(rev));
strncpy(rev, p->response, sizeof(rev)-1);
ast_modem_trim(rev);
ast_modem_expect(p, "OK", 5);
snprintf(identity, sizeof(identity), "%s Model %s Revision %s", mfr, mdl, rev);