Skip to content

Commit

Permalink
speeddial: coherent indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Apr 13, 2017
1 parent 27ecfa5 commit 911a051
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions src/modules/speeddial/sdlookup.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ int sd_lookup(struct sip_msg* _msg, char* _table, char* _owner)
/* init */
nr_keys = 0;
db_cols[0]=&new_uri_column;

if(_owner)
{
memset(&turi, 0, sizeof(struct sip_uri));
Expand All @@ -105,7 +105,7 @@ int sd_lookup(struct sip_msg* _msg, char* _table, char* _owner)
goto err_server;
}
}

db_keys[nr_keys]=&user_column;
db_vals[nr_keys].type = DB1_STR;
db_vals[nr_keys].nul = 0;
Expand All @@ -121,7 +121,7 @@ int sd_lookup(struct sip_msg* _msg, char* _table, char* _owner)
db_vals[nr_keys].val.str_val.s = puri->host.s;
db_vals[nr_keys].val.str_val.len = puri->host.len;
nr_keys++;

if (dstrip_s.s!=NULL && dstrip_s.len>0
&& dstrip_s.len<puri->host.len
&& strncasecmp(puri->host.s,dstrip_s.s,dstrip_s.len)==0)
Expand Down Expand Up @@ -180,21 +180,21 @@ int sd_lookup(struct sip_msg* _msg, char* _table, char* _owner)

user_s.s = useruri_buf+4;
switch(RES_ROWS(db_res)[0].values[0].type)
{
{
case DB1_STRING:
strcpy(user_s.s,
strcpy(user_s.s,
(char*)RES_ROWS(db_res)[0].values[0].val.string_val);
user_s.len = strlen(user_s.s);
break;
case DB1_STR:
strncpy(user_s.s,
strncpy(user_s.s,
(char*)RES_ROWS(db_res)[0].values[0].val.str_val.s,
RES_ROWS(db_res)[0].values[0].val.str_val.len);
user_s.len = RES_ROWS(db_res)[0].values[0].val.str_val.len;
user_s.s[user_s.len] = '\0';
break;
case DB1_BLOB:
strncpy(user_s.s,
strncpy(user_s.s,
(char*)RES_ROWS(db_res)[0].values[0].val.blob_val.s,
RES_ROWS(db_res)[0].values[0].val.blob_val.len);
user_s.len = RES_ROWS(db_res)[0].values[0].val.blob_val.len;
Expand All @@ -207,7 +207,7 @@ int sd_lookup(struct sip_msg* _msg, char* _table, char* _owner)
}
goto err_server;
}

/* check 'sip:' */
if(user_s.len<4 || strncmp(user_s.s, "sip:", 4))
{
Expand Down
2 changes: 1 addition & 1 deletion src/modules/speeddial/sdlookup.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*
*/


Expand Down
6 changes: 3 additions & 3 deletions src/modules/speeddial/speeddial.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*
*/


Expand Down Expand Up @@ -89,7 +89,7 @@ static param_export_t params[] = {

/* Module interface */
struct module_exports exports = {
"speeddial",
"speeddial",
DEFAULT_DLFLAGS, /* dlopen flags */
cmds, /* Exported functions */
params, /* Exported parameters */
Expand Down Expand Up @@ -128,7 +128,7 @@ static int child_init(int rank)
*/
static int mod_init(void)
{
/* Find a database module */
/* Find a database module */
if (db_bind_mod(&db_url, &db_funcs))
{
LM_ERR("failed to bind database module\n");
Expand Down
2 changes: 1 addition & 1 deletion src/modules/speeddial/speeddial.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*
*/


Expand Down

0 comments on commit 911a051

Please sign in to comment.