[asterisk-addons-commits] file: trunk r425 - /trunk/chan_mobile.c
SVN commits to the Asterisk addons project
asterisk-addons-commits at lists.digium.com
Tue Aug 14 14:41:37 CDT 2007
Author: file
Date: Tue Aug 14 14:41:37 2007
New Revision: 425
URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=425
Log:
(closes issue #10442)
Reported by: phokz
Patches:
chan_mobile_test_argc.patch uploaded by phokz (license 170)
Don't freak out if mobile rfcomm CLI command is used without device and command.
Modified:
trunk/chan_mobile.c
Modified: trunk/chan_mobile.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/chan_mobile.c?view=diff&rev=425&r1=424&r2=425
==============================================================================
--- trunk/chan_mobile.c (original)
+++ trunk/chan_mobile.c Tue Aug 14 14:41:37 2007
@@ -313,14 +313,18 @@
struct mbl_pvt *pvt;
char buf[128];
+ if (argc != 4) {
+ ast_cli(fd, "You must specify the name of the device and command.\n");
+ return RESULT_SUCCESS;
+ }
+
AST_LIST_TRAVERSE(&devices, pvt, entry) {
if (!strcmp(pvt->id, argv[2]))
break;
}
if (!pvt || !pvt->connected) {
- sprintf(buf, "Device %s not found.\n", argv[2]);
- ast_cli(fd, buf);
+ ast_cli(fd, "Device %s not found.\n", argv[2]);
return RESULT_SUCCESS;
}
More information about the asterisk-addons-commits
mailing list