Jelajahi Sumber

ndb_redis: removed svn ids

- some bits of formatting
Daniel-Constantin Mierla 8 tahun lalu
induk
melakukan
9ac5de5e1d

+ 3 - 4
src/modules/ndb_redis/ndb_redis_mod.c

@@ -1,6 +1,4 @@
 /**
- * $Id$
- *
  * Copyright (C) 2011 Daniel-Constantin Mierla (asipto.com)
  *
  * Copyright (C) 2012 Vicente Hernando Ara (System One: www.systemonenoc.com)
@@ -137,7 +135,8 @@ static void mod_destroy(void)
 /**
  *
  */
-static int w_redis_cmd3(struct sip_msg* msg, char* ssrv, char* scmd, char* sres)
+static int w_redis_cmd3(struct sip_msg* msg, char* ssrv, char* scmd,
+		char* sres)
 {
 	str s[3];
 
@@ -569,7 +568,7 @@ static int pv_get_redisc(struct sip_msg *msg,  pv_param_t *param,
 							return pv_get_strval(msg, param, res, &s);
 						case REDIS_REPLY_INTEGER:
 							return pv_get_sintval(msg, param, res,
-										(int)rpv->reply->rplRedis->element[pos]->integer);
+								(int)rpv->reply->rplRedis->element[pos]->integer);
 						default:
 							return pv_get_null(msg, param, res);
 					}

+ 22 - 13
src/modules/ndb_redis/redis_client.c

@@ -1,6 +1,4 @@
 /**
- * $Id$
- *
  * Copyright (C) 2011 Daniel-Constantin Mierla (asipto.com)
  *
  * This file is part of Kamailio, a free SIP server.
@@ -99,7 +97,8 @@ int redisc_init(void)
 
 		if(unix_sock_path != NULL) {
 			LM_DBG("Connecting to unix socket: %s\n", unix_sock_path);
-			rsrv->ctxRedis = redisConnectUnixWithTimeout(unix_sock_path, tv_conn);
+			rsrv->ctxRedis = redisConnectUnixWithTimeout(unix_sock_path,
+					tv_conn);
 		} else {
 			rsrv->ctxRedis = redisConnectWithTimeout(addr, port, tv_conn);
 		}
@@ -123,15 +122,19 @@ int redisc_init(void)
 
 err2:
 	if (unix_sock_path != NULL) {
-		LM_ERR("error communicating with redis server [%.*s] (unix:%s db:%d): %s\n",
-				rsrv->sname->len, rsrv->sname->s, unix_sock_path, db, rsrv->ctxRedis->errstr);
+		LM_ERR("error communicating with redis server [%.*s]"
+				" (unix:%s db:%d): %s\n",
+				rsrv->sname->len, rsrv->sname->s, unix_sock_path, db,
+				rsrv->ctxRedis->errstr);
 	} else {
 		LM_ERR("error communicating with redis server [%.*s] (%s:%d/%d): %s\n",
-				rsrv->sname->len, rsrv->sname->s, addr, port, db, rsrv->ctxRedis->errstr);
+				rsrv->sname->len, rsrv->sname->s, addr, port, db,
+				rsrv->ctxRedis->errstr);
 	}
 	if (init_without_redis==1)
 	{
-		LM_WARN("failed to initialize redis connections, but initializing module anyway.\n");
+		LM_WARN("failed to initialize redis connections, but initializing"
+				" module anyway.\n");
 		return 0;
 	}
 
@@ -146,7 +149,8 @@ err:
 	}
 	if (init_without_redis==1)
 	{
-		LM_WARN("failed to initialize redis connections, but initializing module anyway.\n");
+		LM_WARN("failed to initialize redis connections, but initializing"
+				" module anyway.\n");
 		return 0;
 	}
 
@@ -334,11 +338,14 @@ int redisc_reconnect_server(redisc_server_t *rsrv)
 
 err2:
 	if (unix_sock_path != NULL) {
-		LM_ERR("error communicating with redis server [%.*s] (unix:%s db:%d): %s\n",
-				rsrv->sname->len, rsrv->sname->s, unix_sock_path, db, rsrv->ctxRedis->errstr);
+		LM_ERR("error communicating with redis server [%.*s]"
+				" (unix:%s db:%d): %s\n",
+				rsrv->sname->len, rsrv->sname->s, unix_sock_path, db,
+				rsrv->ctxRedis->errstr);
 	} else {
 		LM_ERR("error communicating with redis server [%.*s] (%s:%d/%d): %s\n",
-				rsrv->sname->len, rsrv->sname->s, addr, port, db, rsrv->ctxRedis->errstr);
+				rsrv->sname->len, rsrv->sname->s, addr, port, db,
+				rsrv->ctxRedis->errstr);
 	}
 err:
 	if (unix_sock_path != NULL) {
@@ -411,7 +418,8 @@ int redisc_exec(str *srv, str *res, str *cmd, ...)
 		{
 			rpl->rplRedis = redisvCommand(rsrv->ctxRedis, cmd->s, ap2);
 		} else {
-			LM_ERR("unable to reconnect to redis server: %.*s\n", srv->len, srv->s);
+			LM_ERR("unable to reconnect to redis server: %.*s\n",
+					srv->len, srv->s);
 			cmd->s[cmd->len] = c;
 			goto error_exec;
 		}
@@ -438,7 +446,8 @@ error_exec:
  * @param argvlen vector of command string lenghts or NULL.
  * @return redisReply structure or NULL if there was an error.
  */
-void * redisc_exec_argv(redisc_server_t *rsrv, int argc, const char **argv, const size_t *argvlen)
+void * redisc_exec_argv(redisc_server_t *rsrv, int argc, const char **argv,
+		const size_t *argvlen)
 {
 	redisReply *res=NULL;
 

+ 0 - 2
src/modules/ndb_redis/redis_client.h

@@ -1,6 +1,4 @@
 /**
- * $Id$
- *
  * Copyright (C) 2011 Daniel-Constantin Mierla (asipto.com)
  *
  * This file is part of Kamailio, a free SIP server.