2
0
Дилян Палаузов 2 жил өмнө
parent
commit
e7c8dcb950

+ 6 - 6
src/modules/keepalive/doc/keepalive_admin.xml

@@ -96,7 +96,7 @@ modparam("keepalive", "destination", "sip.provider.com")
 			<section>
 			<section>
 				<title><varname>delete_counter</varname>(int)</title>
 				<title><varname>delete_counter</varname>(int)</title>
 				<para>
 				<para>
-					Unsuccessful attemps increase delete_counter. After passing it, keepalive module doesn't try to send options requests. Ignored if it's set to 0.
+					Unsuccessful attempts increase delete_counter. After passing it, keepalive module doesn't try to send options requests. Ignored if it's set to 0.
 				</para>
 				</para>
 				<para>
 				<para>
 				<emphasis>
 				<emphasis>
@@ -143,7 +143,7 @@ modparam("keepalive", "ping_from", "sip:[email protected]")
 					Get destination status.
 					Get destination status.
 				</para>
 				</para>
 		        <para>
 		        <para>
-					The Parameter <emphasis>destination</emphasis> is destination you want to check status
+					The parameter <emphasis>destination</emphasis> is destination you want to check status
 		        </para>
 		        </para>
         		<para>
         		<para>
 					Returned value:
 					Returned value:
@@ -179,10 +179,10 @@ if(ka_is_alive("192.168.10.20") == 1) {
 					<itemizedlist>
 					<itemizedlist>
 						<listitem>sip_uri (string) - address of destination to monitor.
 						<listitem>sip_uri (string) - address of destination to monitor.
 						Valid format is [protoschema:]ip[:port], with: 'protoschema' being
 						Valid format is [protoschema:]ip[:port], with: 'protoschema' being
-						one of 'sip' or 'sips' (SIP over TLS) - if omitted, 'sip'is used
+						one of 'sip' or 'sips' (SIP over TLS) - if omitted, 'sip' is used
 						by default; 'port' is optional (using default standard port 5060
 						by default; 'port' is optional (using default standard port 5060
 						for sip and 5061 for sips)</listitem>
 						for sip and 5061 for sips)</listitem>
-					    <listitem>owner (string) - module name “owning” the destination
+					    <listitem>owner (string) - module name <quote>owning</quote> the destination
 					    (for informational purpose)</listitem>
 					    (for informational purpose)</listitem>
 					</itemizedlist>
 					</itemizedlist>
 				</para>
 				</para>
@@ -221,10 +221,10 @@ ka_add_destination("sip:192.168.1.10:5060;transport=tcp", "config");
 					<itemizedlist>
 					<itemizedlist>
 						<listitem>sip_uri (string) - address of monitored destination.
 						<listitem>sip_uri (string) - address of monitored destination.
 						Valid format is [protoschema:]ip[:port], with: 'protoschema' being
 						Valid format is [protoschema:]ip[:port], with: 'protoschema' being
-						one of 'sip' or 'sips' (SIP over TLS) - if omitted, 'sip'is used
+						one of 'sip' or 'sips' (SIP over TLS) - if omitted, 'sip' is used
 						by default; 'port' is optional (using default standard port 5060
 						by default; 'port' is optional (using default standard port 5060
 						for sip and 5061 for sips)</listitem>
 						for sip and 5061 for sips)</listitem>
-					    <listitem>owner (string) - module name “owning” the destination
+					    <listitem>owner (string) - module name <quote>owning</quote> the destination
 					    (for informational purpose)</listitem>
 					    (for informational purpose)</listitem>
 					</itemizedlist>
 					</itemizedlist>
 				</para>
 				</para>

+ 1 - 1
src/modules/keepalive/keepalive.h

@@ -74,7 +74,7 @@ typedef struct _ka_dest
 	int flags;
 	int flags;
 	int state;
 	int state;
 	time_t last_checked, last_up, last_down;
 	time_t last_checked, last_up, last_down;
-	int counter;	// counts unreachable attemps
+	int counter;	// counts unreachable attempts
 	ticks_t ping_interval;  /*!< Actual interval between OPTIONS  */
 	ticks_t ping_interval;  /*!< Actual interval between OPTIONS  */
 
 
 	void *user_attr;
 	void *user_attr;

+ 15 - 15
src/modules/keepalive/keepalive_rpc.c

@@ -99,11 +99,11 @@ static void keepalive_rpc_list(rpc_t *rpc, void *ctx)
 
 
 static void keepalive_rpc_add(rpc_t *rpc, void *ctx)
 static void keepalive_rpc_add(rpc_t *rpc, void *ctx)
 {
 {
-	str sip_adress = {0,0};
+	str sip_address = {0,0};
 	str table_name ={0,0};
 	str table_name ={0,0};
 	int ret = 0;
 	int ret = 0;
 
 
-	ret = rpc->scan(ctx, "SS",&sip_adress,&table_name);
+	ret = rpc->scan(ctx, "SS",&sip_address,&table_name);
 
 
 	if (ret < 2) {
 	if (ret < 2) {
 		LM_ERR("not enough parameters - read so far: %d\n", ret);
 		LM_ERR("not enough parameters - read so far: %d\n", ret);
@@ -111,14 +111,14 @@ static void keepalive_rpc_add(rpc_t *rpc, void *ctx)
 		return;
 		return;
 	}
 	}
 
 
-	LM_DBG("keepalive add [%.*s]\n", sip_adress.len, sip_adress.s);
-	if(sip_adress.len<1 || table_name.len <1){
+	LM_DBG("keepalive add [%.*s]\n", sip_address.len, sip_address.s);
+	if(sip_address.len<1 || table_name.len <1){
 		LM_ERR("parameter is len less than 1  \n"  );
 		LM_ERR("parameter is len less than 1  \n"  );
 		rpc->fault(ctx, 500, "parameter is len less than 1");
 		rpc->fault(ctx, 500, "parameter is len less than 1");
 		return;
 		return;
 	}
 	}
 
 
-	if(ka_add_dest(&sip_adress,&table_name,0,ka_ping_interval,0,0,0) < 0 ){
+	if(ka_add_dest(&sip_address,&table_name,0,ka_ping_interval,0,0,0) < 0 ){
 		LM_ERR("couldn't add data to list \n"  );
 		LM_ERR("couldn't add data to list \n"  );
 		rpc->fault(ctx, 500, "couldn't add data to list");
 		rpc->fault(ctx, 500, "couldn't add data to list");
 		return;
 		return;
@@ -131,11 +131,11 @@ static const char *keepalive_rpc_add_doc[2] = {
 
 
 static void keepalive_rpc_del(rpc_t *rpc, void *ctx)
 static void keepalive_rpc_del(rpc_t *rpc, void *ctx)
 {
 {
-	str sip_adress = {0,0};
+	str sip_address = {0,0};
 	str table_name ={0,0};
 	str table_name ={0,0};
 	int ret = 0;
 	int ret = 0;
 
 
-	ret = rpc->scan(ctx, "SS",&sip_adress,&table_name);
+	ret = rpc->scan(ctx, "SS",&sip_address,&table_name);
 
 
 	if (ret < 2) {
 	if (ret < 2) {
 		LM_ERR("not enough parameters - read so far: %d\n", ret);
 		LM_ERR("not enough parameters - read so far: %d\n", ret);
@@ -143,15 +143,15 @@ static void keepalive_rpc_del(rpc_t *rpc, void *ctx)
 		return;
 		return;
 	}
 	}
 
 
-	LM_DBG("keepalive delete [%.*s]\n", sip_adress.len, sip_adress.s);
+	LM_DBG("keepalive delete [%.*s]\n", sip_address.len, sip_address.s);
 
 
-	if(sip_adress.len < 1 || table_name.len < 1){
+	if(sip_address.len < 1 || table_name.len < 1){
 		LM_ERR("parameter is len less than 1  \n");
 		LM_ERR("parameter is len less than 1  \n");
 		rpc->fault(ctx, 500, "parameter is len less than 1");
 		rpc->fault(ctx, 500, "parameter is len less than 1");
 		return;
 		return;
 	}
 	}
 
 
-	if(ka_del_destination(&sip_adress,&table_name) < 0 ){
+	if(ka_del_destination(&sip_address,&table_name) < 0 ){
 		LM_ERR("couldn't delete data from list \n"  );
 		LM_ERR("couldn't delete data from list \n"  );
 		rpc->fault(ctx, 500, "couldn't delete data from list");
 		rpc->fault(ctx, 500, "couldn't delete data from list");
 		return;
 		return;
@@ -164,13 +164,13 @@ static const char *keepalive_rpc_del_doc[2] = {
 
 
 static void keepalive_rpc_get(rpc_t *rpc, void *ctx)
 static void keepalive_rpc_get(rpc_t *rpc, void *ctx)
 {
 {
-	str sip_adress = {0,0};
+	str sip_address = {0,0};
 	str table_name ={0,0};
 	str table_name ={0,0};
 	int ret = 0;
 	int ret = 0;
 	ka_dest_t *target=0 , *head =0;
 	ka_dest_t *target=0 , *head =0;
 	void *sub;
 	void *sub;
 
 
-	ret = rpc->scan(ctx, "SS",&sip_adress,&table_name);
+	ret = rpc->scan(ctx, "SS",&sip_address,&table_name);
 
 
 	if (ret < 2) {
 	if (ret < 2) {
 		LM_ERR("not enough parameters - read so far: %d\n", ret);
 		LM_ERR("not enough parameters - read so far: %d\n", ret);
@@ -178,16 +178,16 @@ static void keepalive_rpc_get(rpc_t *rpc, void *ctx)
 		return;
 		return;
 	}
 	}
 
 
-	LM_DBG("keepalive get [%.*s]\n", sip_adress.len , sip_adress.s);
+	LM_DBG("keepalive get [%.*s]\n", sip_address.len , sip_address.s);
 
 
-	if(sip_adress.len < 1 || table_name.len < 1){
+	if(sip_address.len < 1 || table_name.len < 1){
 		LM_ERR("parameter is len less than 1  \n");
 		LM_ERR("parameter is len less than 1  \n");
 		rpc->fault(ctx, 500, "parameter is len less than 1");
 		rpc->fault(ctx, 500, "parameter is len less than 1");
 		return;
 		return;
 	}
 	}
 	ka_lock_destination_list();
 	ka_lock_destination_list();
 
 
-	if(ka_find_destination(&sip_adress, &table_name, &target, &head) < 0 ){
+	if(ka_find_destination(&sip_address, &table_name, &target, &head) < 0 ){
 		LM_ERR("couldn't get data from list \n"  );
 		LM_ERR("couldn't get data from list \n"  );
 		rpc->fault(ctx, 500, "couldn't get data from list");
 		rpc->fault(ctx, 500, "couldn't get data from list");
 		ka_unlock_destination_list();
 		ka_unlock_destination_list();