aboutsummaryrefslogtreecommitdiff
path: root/tests/server/rtspd.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-11-28 23:11:14 +0100
committerYang Tse <yangsita@gmail.com>2010-11-28 23:11:14 +0100
commit5db0a412ff6972e51ccddaf1e8d6a27c8de4990f (patch)
tree8c8cfa609c25c68929554ac1e24eaa4084683152 /tests/server/rtspd.c
parentcbe67a1b71f7098779b8c0cecccb60382cec2d20 (diff)
atoi: remove atoi usage
Diffstat (limited to 'tests/server/rtspd.c')
-rw-r--r--tests/server/rtspd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/server/rtspd.c b/tests/server/rtspd.c
index d2471b998..f751f1153 100644
--- a/tests/server/rtspd.c
+++ b/tests/server/rtspd.c
@@ -531,8 +531,8 @@ static int ProcessRequest(struct httprequest *req)
/* if the host name starts with test, the port number used in the
CONNECT line will be used as test number! */
char *portp = strchr(doc, ':');
- if(portp)
- req->testno = atoi(portp+1);
+ if(portp && (*(portp+1) != '\0') && ISDIGIT(*(portp+1)))
+ req->testno = strtol(portp+1, NULL, 10);
else
req->testno = DOCNUMBER_CONNECT;
}