aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-05-19 02:49:34 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-05-19 02:49:34 +0000
commit5759f3b9b0987a952c930bb61d87c26d1ee38129 (patch)
treea0873bd2bf448dba1e241ac69b30e293e241e737 /channels
parent3af272b36b0c883bdd6b297f6fd1fe160a9e6fbb (diff)
move variable declarations to top of function where they belong (bug #4303)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5724 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_sip.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 3e3a4c6c7..aa52adfae 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -10023,14 +10023,14 @@ static struct sip_user *build_user(const char *name, struct ast_variable *v, int
struct ast_ha *oldha = NULL;
char *varname = NULL, *varval = NULL;
struct ast_variable *tmpvar = NULL;
+ struct ast_flags userflags = {(0)};
+ struct ast_flags mask = {(0)};
+
user = (struct sip_user *)malloc(sizeof(struct sip_user));
if (!user) {
return NULL;
}
- struct ast_flags userflags = {(0)};
- struct ast_flags mask = {(0)};
-
memset(user, 0, sizeof(struct sip_user));
suserobjs++;
ASTOBJ_INIT(user);
@@ -10170,6 +10170,9 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, int
time_t regseconds;
char *varname = NULL, *varval = NULL;
struct ast_variable *tmpvar = NULL;
+ struct ast_flags peerflags = {(0)};
+ struct ast_flags mask = {(0)};
+
if (!realtime)
/* Note we do NOT use find_peer here, to avoid realtime recursion */
@@ -10197,9 +10200,6 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, int
if (!peer)
return NULL;
- struct ast_flags peerflags = {(0)};
- struct ast_flags mask = {(0)};
-
peer->lastmsgssent = -1;
if (!found) {
if (name)