diff --git a/src/modules/cplc/cpl_env.h b/src/modules/cplc/cpl_env.h index 7dc03d2bdb6..46367b5235e 100644 --- a/src/modules/cplc/cpl_env.h +++ b/src/modules/cplc/cpl_env.h @@ -33,7 +33,7 @@ #include "../../modules/tm/tm_load.h" #include "../../modules/sl/sl.h" -struct cpl_enviroment { +struct cpl_environment { char *log_dir; /* dir where the user log should be dumped */ int proxy_recurse; /* numbers of proxy redirection accepted */ int proxy_route; /* script route to be run before proxy */ @@ -59,7 +59,7 @@ struct cpl_functions { sl_api_t slb; /* Structure with pointers to sl funcs */ }; -extern struct cpl_enviroment cpl_env; +extern struct cpl_environment cpl_env; extern struct cpl_functions cpl_fct; #endif diff --git a/src/modules/cplc/cpl_nonsig.c b/src/modules/cplc/cpl_nonsig.c index 4a97dc65110..ed3109567c7 100644 --- a/src/modules/cplc/cpl_nonsig.c +++ b/src/modules/cplc/cpl_nonsig.c @@ -43,8 +43,8 @@ #define MAX_LOG_FILE_NAME 32 -#define FILE_NAME_SUFIX ".log" -#define FILE_NAME_SUFIX_LEN (sizeof(FILE_NAME_SUFIX)-1) +#define FILE_NAME_SUFFIX ".log" +#define FILE_NAME_SUFFIX_LEN (sizeof(FILE_NAME_SUFFIX)-1) #define LOG_SEPARATOR ": " #define LOG_SEPARATOR_LEN (sizeof(LOG_SEPARATOR)-1) @@ -56,7 +56,7 @@ #define LOG_TERMINATOR_LEN (sizeof(LOG_TERMINATOR)-1) -static char file[MAX_LOG_DIR_SIZE+1+MAX_LOG_FILE_NAME+FILE_NAME_SUFIX_LEN+1]; +static char file[MAX_LOG_DIR_SIZE+1+MAX_LOG_FILE_NAME+FILE_NAME_SUFFIX_LEN+1]; static char *file_ptr; @@ -72,8 +72,8 @@ static inline void write_log( struct cpl_cmd *cmd) if (cmd->s1.len>MAX_LOG_FILE_NAME) cmd->s1.len = MAX_LOG_FILE_NAME; memcpy(file_ptr, cmd->s1.s, cmd->s1.len ); - memcpy(file_ptr+cmd->s1.len,FILE_NAME_SUFIX,FILE_NAME_SUFIX_LEN); - file_ptr[cmd->s1.len+FILE_NAME_SUFIX_LEN] = 0; + memcpy(file_ptr+cmd->s1.len,FILE_NAME_SUFFIX,FILE_NAME_SUFFIX_LEN); + file_ptr[cmd->s1.len+FILE_NAME_SUFFIX_LEN] = 0; /* get current date+time -> wr_vec[0] */ time( &now ); @@ -192,7 +192,7 @@ static inline void send_mail( struct cpl_cmd *cmd) /* just debug */ for(i=0;i free the shm */ + /* once I copy locally all the data from shm mem -> free the shm */ shm_free( cmd->s1.s ); /* set an alarm -> sending the email shouldn't take more than 10 sec */ diff --git a/src/modules/cplc/cpl_proxy.h b/src/modules/cplc/cpl_proxy.h index aaf2f8132a6..38763bdf69d 100644 --- a/src/modules/cplc/cpl_proxy.h +++ b/src/modules/cplc/cpl_proxy.h @@ -153,7 +153,7 @@ static void reply_callback( struct cell* t, int type, struct tmcb_params* ps) if (type&TMCB_RESPONSE_OUT) { /* the purpose of the final reply is to trash down the interpreter - * structure! it's the safest place to do that, since this callback + * structure! It's the safest place to do that, since this callback * it's called only once per transaction for final codes (>=200) ;-) */ if (ps->code>=200) { LM_DBG("code=%d, final reply received\n", ps->code); @@ -168,7 +168,7 @@ static void reply_callback( struct cell* t, int type, struct tmcb_params* ps) goto exit; } - LM_DBG("negativ reply received\n"); + LM_DBG("negative reply received\n"); intr->flags |= CPL_PROXY_DONE; intr->msg = ps->req; diff --git a/src/modules/cplc/cplc.c b/src/modules/cplc/cplc.c index fce3ab6b45d..aa822b40c82 100644 --- a/src/modules/cplc/cplc.c +++ b/src/modules/cplc/cplc.c @@ -66,7 +66,7 @@ static str timer_avp = STR_NULL; /* name of variable timer AVP */ static str proxy_route = STR_NULL; static str redirect_route = STR_NULL; -struct cpl_enviroment cpl_env = { +struct cpl_environment cpl_env = { 0, /* no cpl logging */ 0, /* recurse proxy level is 0 */ 0, /* no script route to be run before proxy */ diff --git a/src/modules/cplc/doc/cplc_admin.xml b/src/modules/cplc/doc/cplc_admin.xml index 403c71238ae..4c2aa4c00e2 100644 --- a/src/modules/cplc/doc/cplc_admin.xml +++ b/src/modules/cplc/doc/cplc_admin.xml @@ -500,7 +500,7 @@ modparam("cplc","ignore3xx",1) guaranty that the CPL script interpretation ended when &kamailio; script ended also (for the same INVITE ;-)) - this can happen when the CPL script does a PROXY and the script interpretation - pause after proxying and it will be resume when some reply is + pause after proxying and it will be resumed when some reply is received (this can happen in a different process of SER). If the function returns to script, the SIP server should continue with the normal behavior as if no script existed. @@ -555,7 +555,7 @@ modparam("cplc","ignore3xx",1) can continue in stateful mode); is_stateless is the fastest and less resources consumer (transaction is created only if proxying is done), but there is minimal protection against - retransmissions (since replies are send stateless); + retransmissions (since replies are sent stateless); force_stateful is a good compromise - all signaling is done stateful (retransmission protection) and in the same time, if returning to script, it will be in stateless mode (easy to @@ -591,7 +591,7 @@ cpl_run_script("incoming","force_stateful"); checks if the current REGISTER request is related or not with CPL script upload/download/ remove. If it is, all the needed operation will be done. For checking if the REGISTER is CPL - related, the function looks fist to "Content-Type" header. If + related, the function looks first to "Content-Type" header. If it exists and has a the mime type set to "application/cpl+xml" means this is a CPL script upload/remove operation. The distinction between to case is made by looking at @@ -599,9 +599,9 @@ cpl_run_script("incoming","force_stateful"); "script;action=store", means it's an upload; if it's "script;action=remove", means it's a remove operation; other values are considered to be errors. If no "Content-Type" - header is present, the function looks to "Accept" header and - if it contains the "*" or "application/cpl-xml" the request - it will be consider one for downloading CPL scripts. + header is present, the function looks for "Accept" header and + if it contains "*" or "application/cpl-xml" the request + will be considered for downloading CPL scripts. The functions returns to script only if the REGISTER is not related to CPL. In other case, the function will send by itself the necessary replies (stateless - using sl), including