}
ast_destroy_realtime(var);
}
- return NULL;
+ return peer;
}
/*--- find_peer: Locate peer by name or ip address */
if (user && debug)
ast_verbose("Found user '%s'\n", user->name);
} else {
- if (user && debug)
- ast_verbose("Found user '%s', but fails host access\n", user->name);
+ if (user) {
+ if (debug)
+ ast_verbose("Found user '%s', but fails host access\n", user->name);
+ if (user->temponly)
+ destroy_user(user);
+ }
user = NULL;
}
- if (user && user->temponly)
- destroy_user(user);
+ /* Temp user gets cleaned up at the end */
ast_mutex_unlock(&userl.lock);
if (!user) {
/* If we didn't find a user match, check for peers */
}
- if (user && user->temponly) {
+ if (user && user->temponly)
destroy_user(user);
- }
return res;
}
return NULL;
}
for (x=0;x<colcount;x++) {
+ rowdata[0] = '\0';
collen = sizeof(coltitle);
res = SQLDescribeCol(stmt, x + 1, coltitle, sizeof(coltitle), &collen,
&datatype, &colsize, &decimaldigits, &nullable);