summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2005-01-17 04:47:01 +0000
committerMark Spencer <markster@digium.com>2005-01-17 04:47:01 +0000
commitb7178fdce97b377b1aab1b64d45d81645a8a8938 (patch)
treec13b090336b34e3ebd34b6437adff6ff3c6c9966
parenta00fad7d483145f66a7fbf44cae803aef0d83d5a (diff)
Rid us of a silly compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rwxr-xr-xchannels/chan_agent.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 99084a321..432d086a8 100755
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -1118,15 +1118,16 @@ static struct ast_channel *agent_request(const char *type, int format, void *dat
struct ast_channel *chan = NULL;
char *s;
ast_group_t groupmatch;
+ int groupoff;
int waitforagent=0;
int hasagent = 0;
struct timeval tv;
s = data;
- if ((s[0] == '@') && (sscanf(s + 1, "%d", &groupmatch) == 1)) {
- groupmatch = (1 << groupmatch);
- } else if ((s[0] == ':') && (sscanf(s + 1, "%d", &groupmatch) == 1)) {
- groupmatch = (1 << groupmatch);
+ if ((s[0] == '@') && (sscanf(s + 1, "%d", &groupoff) == 1)) {
+ groupmatch = (1 << groupoff);
+ } else if ((s[0] == ':') && (sscanf(s + 1, "%d", &groupoff) == 1)) {
+ groupmatch = (1 << groupoff);
waitforagent = 1;
} else {
groupmatch = 0;
@@ -1965,14 +1966,15 @@ static int agent_devicestate(void *data)
struct agent_pvt *p;
char *s;
ast_group_t groupmatch;
+ int groupoff;
int waitforagent=0;
int res = AST_DEVICE_INVALID;
s = data;
- if ((s[0] == '@') && (sscanf(s + 1, "%d", &groupmatch) == 1)) {
- groupmatch = (1 << groupmatch);
- } else if ((s[0] == ':') && (sscanf(s + 1, "%d", &groupmatch) == 1)) {
- groupmatch = (1 << groupmatch);
+ if ((s[0] == '@') && (sscanf(s + 1, "%d", &groupoff) == 1)) {
+ groupmatch = (1 << groupoff);
+ } else if ((s[0] == ':') && (sscanf(s + 1, "%d", &groupoff) == 1)) {
+ groupmatch = (1 << groupoff);
waitforagent = 1;
} else {
groupmatch = 0;