Дилян Палаузов %!s(int64=2) %!d(string=hai) anos
pai
achega
901d9cac2f

+ 2 - 2
src/modules/acc/acc.c

@@ -50,7 +50,7 @@
 
 extern struct acc_extra *log_extra;
 extern struct acc_extra *leg_info;
-extern struct acc_enviroment acc_env;
+extern struct acc_environment acc_env;
 extern char *acc_time_format;
 extern int acc_extra_nullable;
 
@@ -423,7 +423,7 @@ int acc_db_request( struct sip_msg *rq)
 	struct tm t;
 	double dtime;
 
-	/* formated database columns */
+	/* formatted database columns */
 	m = core2strar( rq, val_arr, int_arr, type_arr );
 
 	for(i=0; i<m; i++)

+ 4 - 4
src/modules/acc/acc_api.h

@@ -49,7 +49,7 @@ typedef struct acc_param {
 } acc_param_t;
 
 /* various acc variables */
-typedef struct acc_enviroment {
+typedef struct acc_environment {
 	unsigned int code;
 	str code_s;
 	str reason;
@@ -58,7 +58,7 @@ typedef struct acc_enviroment {
 	str text;
 	time_t ts;
 	struct timeval tv;
-} acc_enviroment_t;
+} acc_environment_t;
 
 /* acc extra parameter */
 typedef struct acc_extra {
@@ -68,7 +68,7 @@ typedef struct acc_extra {
 } acc_extra_t;
 
 typedef acc_param_t cdr_param_t;
-typedef acc_enviroment_t cdr_enviroment_t;
+typedef acc_environment_t cdr_environment_t;
 typedef acc_extra_t  cdr_extra_t;
 
 typedef int (*core2strar_f)( struct sip_msg *req, str *c_vals,
@@ -87,7 +87,7 @@ typedef int (*extra2strar_dlg_only_f)(struct acc_extra *extra, struct dlg_cell*
 
 /* acc event data structures */
 typedef struct acc_info {
-	acc_enviroment_t *env;
+	acc_environment_t *env;
 	str *varr;
 	int *iarr;
 	char *tarr;

+ 3 - 3
src/modules/acc/acc_logic.c

@@ -51,7 +51,7 @@
 extern struct tm_binds tmb;
 extern struct rr_binds rrb;
 
-struct acc_enviroment acc_env;
+struct acc_environment acc_env;
 
 
 #define is_acc_flag_set(_rq,_flag)  (((_flag) != -1) && (isflagset((_rq), (_flag)) == 1))
@@ -419,7 +419,7 @@ void acc_onreq( struct cell* t, int type, struct tmcb_params *ps )
 		}
 		/* if required, determine request direction */
 		if( detect_direction && !rrb.is_direction(ps->req,RR_FLOW_UPSTREAM) ) {
-			LM_DBG("detected an UPSTREAM req -> flaging it\n");
+			LM_DBG("detected an UPSTREAM req -> flagging it\n");
 			ps->req->msg_flags |= FL_REQ_UPSTREAM;
 		}
 	}
@@ -642,7 +642,7 @@ static void acc_onreply(tm_cell_t *t, sip_msg_t *req, sip_msg_t *reply, int code
 		if (hdr->parsed && hdr_allocs_parse(hdr) &&
 					(hdr->parsed<mstart || hdr->parsed>=mend)) {
 			/* header parsed filed doesn't point inside cloned request memory
-			 * chunck -> it was added by resolving acc attributes -> free it as pkg */
+			 * chunk -> it was added by resolving acc attributes -> free it as pkg */
 			DBG("removing hdr->parsed %d\n", hdr->type);
 			clean_hdr_field(hdr);
 			hdr->parsed = 0;

+ 2 - 2
src/modules/acc/acc_mod.c

@@ -348,13 +348,13 @@ static int parse_failed_filter(char *s, unsigned short *failed_filter)
 		at = s;
 		while ((*at >= '0') && (*at <= '9')) at++;
 		if (at - s != 3) {
-			LM_ERR("respose code in failed_filter must have 3 digits\n");
+			LM_ERR("response code in failed_filter must have 3 digits\n");
 			return 0;
 		}
 		failed_filter[n] = (*s - '0') * 100 + (*(s + 1) - '0') * 10 +
 			(*(s + 2) - '0');
 		if (failed_filter[n] < 300) {
-			LM_ERR("invalid respose code %u in failed_filter\n",
+			LM_ERR("invalid response code %u in failed_filter\n",
 					failed_filter[n]);
 			return 0;
 		}

+ 17 - 19
src/modules/acc/doc/acc_admin.xml

@@ -36,7 +36,7 @@
 		module takes no acc-specific script command -- the functionality
 		binds invisibly through transaction processing. Script writers just
 		need to mark the transaction for accounting with proper setflag.
-		Even so, the module allows the script writter to force accounting in
+		Even so, the module allows the script writer to force accounting in
 		special cases via some script functions.
 	</para>
 	<para>
@@ -95,7 +95,7 @@
 			find out about it. In general, a better practice is to account from an
 			end-device (such as PSTN gateway), which best knows about call
 			status (including media status and PSTN status in case of the
-			gateway). However, CDR-base logging has the option to log existing
+			gateway). However, CDR-based logging has the option to log existing
 			information from expired dialogs (the dlg_vars in cdr_extra)
 			Please see cdr_expired_dlg_enable parameter - <xref linkend="acc.p.cdr_expired_dlg_enable"/>.
 			</para>
@@ -220,13 +220,13 @@ if (uri=~"sip:+40") /* calls to Romania */ {
 			<para>
 			A SIP call can have multiple legs due forwarding actions. For
 			example user A calls user B which forwards the call to user C.
-			There is only one SIP call but with 2 legs ( A to B and B to C).
+			There is only one SIP call but with 2 legs (A to B and B to C).
 			Accounting the legs of a call is required for proper billing of
 			the calls (if C is a PSTN number and the call is billed, user B
 			must pay for the call - as last party modifying the call
 			destination-, and not A - as initiator of the call. Call
 			forwarding on server is only one example which shows the
-			necessity of the having an accounting engine with multiple legs
+			necessity of having an accounting engine with multiple legs
 			support.
 			</para>
 		</section>
@@ -250,7 +250,7 @@ if (uri=~"sip:+40") /* calls to Romania */ {
 			</para>
 			<para>
 			By default, the multiple call-leg support is disabled - it can be
-			enabled just be setting the per-leg set of AVPs via the
+			enabled just by setting the per-leg set of AVPs via the
 			<varname>multi_leg_info</varname> module parameter.
 			</para>
 		</section>
@@ -432,7 +432,7 @@ $dlg_var(callee) = $avp(callee); #callee='C'
 		<section>
 			<title>&kamailio; Modules</title>
 			<para>
-			The module depends on the following modules (in the other words
+			The module depends on the following modules (in other words
 			the listed modules must be loaded before this module):
 			<itemizedlist>
 				<listitem>
@@ -494,7 +494,7 @@ modparam("acc", "early_media", 1)
 		<para>
 		Per transaction flag which says if the transaction should be
 		accounted also in case of failure (SIP status code >= 300).
-		This flag triggers accouting when the whole transaction fails
+		This flag triggers accounting when the whole transaction fails
 		(on the server side).
 		</para>
 		<para>
@@ -1057,10 +1057,8 @@ modparam("acc", "db_insert_mode", 1)
 		<para>
 		The value can be:
 		<itemizedlist>
-		<listitem>
-			<para>0 - off (default).</para>
-			<para>1 - on.</para>
-		</listitem>
+		<listitem><para>0 - off (default).</para></listitem>
+		<listitem><para>1 - on.</para></listitem>
 		</itemizedlist>
 		</para>
 		<example>
@@ -1094,10 +1092,10 @@ modparam("acc", "cdr_skip", "nocdr")
 		<para>
 		Should CDR-based logging be enabled in case of expired dialogs?
 		</para>
-		<para>
-		0 - off (default).
-		1 - on.
-		</para>
+		<itemizedlist>
+		<listitem><para>0 - off (default).</para></listitem>
+		<listitem><para>1 - on.</para></listitem>
+		</itemizedlist>
 		<example>
 		<title>cdr_expired_dlg_enable example</title>
 		<programlisting format="linespecific">
@@ -1113,10 +1111,10 @@ modparam("acc", "cdr_expired_dlg_enable", 1)
 		Should the start time be taken from the time when the dialog is created,
         	or when the dialog is confirmed?
 		</para>
-		<para>
-		0 - use time of dialog creation (default).
-		1 - use time of dialog confirmation.
-		</para>
+		<itemizedlist>
+		<listitem><para>0 - use time of dialog creation (default).</para></listitem>
+		<listitem><para>1 - use time of dialog confirmation.</para></listitem>
+		</itemizedlist>
 		<example>
 		<title>cdr_start_on_confirmed example</title>
 		<programlisting format="linespecific">

+ 4 - 4
src/modules/acc/doc/acc_faq.xml

@@ -17,7 +17,7 @@
 
 	<qandaentry>
 		<question>
-		<para>What happened with old log_fmt parameter</para>
+		<para>What happened with old log_fmt parameter?</para>
 		</question>
 		<answer>
 		<para>
@@ -31,7 +31,7 @@
 
 	<qandaentry>
 		<question>
-		<para>What happened with old multi_leg_enabled parameter</para>
+		<para>What happened with old multi_leg_enabled parameter?</para>
 		</question>
 		<answer>
 		<para>
@@ -45,11 +45,11 @@
 	<qandaentry>
 		<question>
 			<para>What happened with old src_leg_avp_id and dst_leg_avp_id
-				parameters</para>
+				parameters?</para>
 		</question>
 		<answer>
 		<para>
-			The parameter was replaced by the more generic new parameter
+			The parameters were replaced by the more generic new parameter
 			multi_leg_info. This allows logging (per-leg) of more information
 			than just dst and src.
 			</para>