diff --git a/src/modules/cdp/authstatemachine.c b/src/modules/cdp/authstatemachine.c index db0e244b69b..c98198b6880 100644 --- a/src/modules/cdp/authstatemachine.c +++ b/src/modules/cdp/authstatemachine.c @@ -413,9 +413,9 @@ int auth_client_statefull_sm_process(cdp_session_t* s, int event, AAAMessage* ms Send_ASA(s, msg); break; - // Just added this because it might happen if the other peer doesnt + // Just added this because it might happen if the other peer doesn't // send a valid STA, then the session stays open forever... - // We dont accept that... we have lifetime+grace_period for that + // We don't accept that... we have lifetime+grace_period for that // This is not in the Diameter RFC ... case AUTH_EV_SESSION_TIMEOUT: case AUTH_EV_SESSION_GRACE_TIMEOUT: @@ -425,7 +425,7 @@ int auth_client_statefull_sm_process(cdp_session_t* s, int event, AAAMessage* ms LM_INFO("state machine: AUTH_EV_RECV_STA about to clean up\n"); if (msg) AAAFreeMessage(&msg); // if might be needed in frequency // If I register a ResponseHandler then i Free the STA there not here.. - // but i dont have interest in that now.. + // but I don't have interest in that now.. cdp_session_cleanup(s, NULL); s = 0; rv = 1; @@ -471,7 +471,7 @@ void auth_server_statefull_sm_process(cdp_session_t* s, int event, AAAMessage* m case AUTH_EV_RECV_REQ: // The RequestHandler will generate a Send event for the answer // and we will only then now if the user is authorised or not - // if its not authorised it will move back to idle and cleanup the session + // if it is not authorised it will move back to idle and cleanup the session // so no big deal // but this is not the Diameter RFC... x->state = AUTH_ST_OPEN; diff --git a/src/modules/cdp/configexample/ConfigExample.xml b/src/modules/cdp/configexample/ConfigExample.xml index 9a5d9312907..74c59d87ee0 100644 --- a/src/modules/cdp/configexample/ConfigExample.xml +++ b/src/modules/cdp/configexample/ConfigExample.xml @@ -51,7 +51,7 @@ > diff --git a/src/modules/cdp/diameter.h b/src/modules/cdp/diameter.h index 5a7cb0e0c53..575d196354e 100644 --- a/src/modules/cdp/diameter.h +++ b/src/modules/cdp/diameter.h @@ -104,7 +104,7 @@ (AVP_CODE_SIZE+AVP_FLAGS_SIZE+AVP_LENGTH_SIZE+\ AVP_VENDOR_ID_SIZE*(((_flags_)&AAA_AVP_FLAG_VENDOR_SPECIFIC)!=0) ) -/* mesage codes */ +/* message codes */ #ifndef __IS_BIG_ENDIAN #define AS_MSG_CODE 0x12010000 #define AC_MSG_CODE 0x0f010000 diff --git a/src/modules/cdp/diameter_avp.c b/src/modules/cdp/diameter_avp.c index ae66ab3e743..160dc9d1e7f 100644 --- a/src/modules/cdp/diameter_avp.c +++ b/src/modules/cdp/diameter_avp.c @@ -74,7 +74,7 @@ void set_avp_fields( AAA_AVPCode code, AAA_AVP *avp) avp->type = AAA_AVP_STRING_TYPE; break; case 27: /*AVP_Session_Timeout*/ - case 258: /*AVP_Auth_Aplication_Id*/ + case 258: /*AVP_Auth_Application_Id*/ case 262: /*AVP_Redirect_Max_Cache_Time*/ case 265: /*AVP_Supported_Vendor_Id*/ case 266: /*AVP_Vendor_Id*/ @@ -195,7 +195,7 @@ AAAReturnCode AAAAddAVPToMessage( } if (!position) { - /* insert at the begining */ + /* insert at the beginning */ avp->next = msg->avpList.head; avp->prev = 0; msg->avpList.head = avp; @@ -240,7 +240,7 @@ AAAReturnCode AAAAddAVPToMessage( /** * This function finds an AVP with matching code and vendor id. * @param msg - message to look into - * @param startAvp - where to start the search. Usefull when you want to find the next one. + * @param startAvp - where to start the search. Useful when you want to find the next one. * Even this one will be checked and can be returned if it fits. * @param avpCode - code of the AVP to match * @param vendorId - vendor id to match @@ -706,7 +706,7 @@ AAA_AVP_LIST AAAUngroupAVPS(str buf) /** * Find an avp into a list of avps. * @param avpList - the list to look into - * @param startAvp - where to start the search. Usefull when you want to find the next one. + * @param startAvp - where to start the search. Useful when you want to find the next one. * Even this one will be checked and can be returned if it fits. * @param avpCode - the AVP code to match * @param vendorId - the vendor id to match diff --git a/src/modules/cdp/diameter_ims.h b/src/modules/cdp/diameter_ims.h index 50a23b3f8a1..6003c63baa5 100644 --- a/src/modules/cdp/diameter_ims.h +++ b/src/modules/cdp/diameter_ims.h @@ -63,7 +63,7 @@ #define IMS_vendor_id_CableLabs_char "4491" /**< char value for ETSI's Vendor Id */ #define IMS_vendor_id_CableLabs_len 4 /**< len of char value for 3GPP's Vendor Id */ -/* Command Codes alocated for IMS */ +/* Command Codes allocated for IMS */ /* The Gq Interface */ #define IMS_AAR 265 /**< Bearer-Authorization Request */ #define IMS_AAA 265 /**< Bearer-Authorization Answer */ diff --git a/src/modules/cdp/diameter_ims_code_cmd.h b/src/modules/cdp/diameter_ims_code_cmd.h index ed0d60c53d6..48710875e76 100644 --- a/src/modules/cdp/diameter_ims_code_cmd.h +++ b/src/modules/cdp/diameter_ims_code_cmd.h @@ -45,7 +45,7 @@ #define __DIAMETER_IMS_CODE_CMD_H -/* Command Codes alocated for IMS */ +/* Command Codes allocated for IMS */ /* The Gq Interface */ #define IMS_AAR 265 /**< Bearer-Authorization Request */ #define IMS_AAA 265 /**< Bearer-Authorization Answer */ diff --git a/src/modules/cdp/diameter_msg.c b/src/modules/cdp/diameter_msg.c index b9ac88954c7..c3a6480d60e 100644 --- a/src/modules/cdp/diameter_msg.c +++ b/src/modules/cdp/diameter_msg.c @@ -449,7 +449,7 @@ AAAReturnCode AAASetMessageResultCode( /** - * This function convert message from the network format to the AAAMessage structure (decoder). + * This function converts message from the network format to the AAAMessage structure (decoder). * @param source - the source char buffer * @param sourceLen - the length of the input buffer * @param attach_buf - whether to attach the input buffer to the message @@ -502,7 +502,7 @@ AAAMessage* AAATranslateMessage( unsigned char* source, unsigned int sourceLen, msg_len = get_3bytes( ptr ); ptr += MESSAGE_LENGTH_SIZE; if (msg_len>sourceLen) { - LM_ERR("AAATranslateMessage: AAA message len [%d] bigger then" + LM_ERR("AAATranslateMessage: AAA message len [%d] bigger than" " buffer len [%d]\n",msg_len,sourceLen); goto error; } diff --git a/src/modules/cdp/diameter_peer.c b/src/modules/cdp/diameter_peer.c index 38386be5d94..1d42484898d 100644 --- a/src/modules/cdp/diameter_peer.c +++ b/src/modules/cdp/diameter_peer.c @@ -358,7 +358,7 @@ void diameter_peer_destroy() lock_release(shutdownx_lock); return; }else { - /* indicating that we are shuting down */ + /* indicating that we are shutting down */ *shutdownx = 1; lock_release(shutdownx_lock); } diff --git a/src/modules/cdp/doc/cdp_admin.xml b/src/modules/cdp/doc/cdp_admin.xml index 698e3e3c040..e8feef84173 100644 --- a/src/modules/cdp/doc/cdp_admin.xml +++ b/src/modules/cdp/doc/cdp_admin.xml @@ -272,7 +272,7 @@ if(!cdp_has_app("16777216")) {
cdp.enable_peer - enabe/re-enable a diameter peer + enable/re-enable a diameter peer
diff --git a/src/modules/cdp/doc/cdp_devel.xml b/src/modules/cdp/doc/cdp_devel.xml index 4c299de248a..c40988c510e 100644 --- a/src/modules/cdp/doc/cdp_devel.xml +++ b/src/modules/cdp/doc/cdp_devel.xml @@ -508,7 +508,7 @@ - AAA_AVP *startAvp - at which AVP to start the search. usefull + AAA_AVP *startAvp - at which AVP to start the search. Useful for looking for more of the same name diff --git a/src/modules/cdp/peerstatemachine.c b/src/modules/cdp/peerstatemachine.c index a4520d797d1..833eaf04eb5 100644 --- a/src/modules/cdp/peerstatemachine.c +++ b/src/modules/cdp/peerstatemachine.c @@ -1259,8 +1259,8 @@ void Rcv_Process(peer *p, AAAMessage *msg) case ACCT_CC_CLIENT: if (is_req(msg)){ LM_WARN("unhandled receive request on Credit Control Acct session\n"); - AAASessionsUnlock(session->hash); //must be called because we dont call state machine here - session = 0; //we dont call SM here so we mustnt set to 0 + AAASessionsUnlock(session->hash); //must be called because we don't call state machine here + session = 0; //we don't call SM here so we must not set to 0 } else { cc_acc_client_stateful_sm_process(session, ACC_CC_EV_RECV_ANS, msg); session = 0; diff --git a/src/modules/cdp/receiver.c b/src/modules/cdp/receiver.c index 7098f848a08..a43a8904801 100644 --- a/src/modules/cdp/receiver.c +++ b/src/modules/cdp/receiver.c @@ -446,7 +446,7 @@ int receiver_init(peer *p) } /** - * The Receiver Process - calls the receiv_loop and it never returns. + * The Receiver Process - calls the receive_loop and it never returns. * @param p - the peer it is associated with or NULL for the unknown peers receiver * @returns never, when disconnected it will exit */ @@ -470,7 +470,7 @@ void receiver_process(peer *p) done: if (!*shutdownx){ - LM_INFO("receiver_process(): [%.*s]... Receiver process cleaning-up - should not happen unless shuting down!\n", + LM_INFO("receiver_process(): [%.*s]... Receiver process cleaning-up - should not happen unless shutting down!\n", p?p->fqdn.len:0,p?p->fqdn.s:0); } diff --git a/src/modules/cdp/session.c b/src/modules/cdp/session.c index 01ce8614432..ce286107a66 100644 --- a/src/modules/cdp/session.c +++ b/src/modules/cdp/session.c @@ -453,7 +453,7 @@ int cdp_sessions_timer(time_t now, void* ptr) int res_valid_for = x->u.cc_acc.reserved_units_validity_time; int last_reservation = x->u.cc_acc.reserved_units; int buffer_time = 15; //15 seconds - TODO: add as config parameter - //we should check for reservation expiries if the state is open + //we should check for reservation expiring if the state is open if(x->u.cc_acc.state==ACC_CC_ST_OPEN){ if (last_res_timestamp) { //we have obv already started reservations diff --git a/src/modules/cdp/session.h b/src/modules/cdp/session.h index 701fb426531..16da177c010 100644 --- a/src/modules/cdp/session.h +++ b/src/modules/cdp/session.h @@ -125,7 +125,7 @@ typedef struct _cdp_auth_session_t { time_t lifetime; /**< absolute time for auth lifetime -1 means forever */ time_t grace_period; /**< grace_period in seconds */ unsigned int last_requested_lifetime; /**< the following 3 timers are used to store what we are */ - unsigned int last_requested_timeout; /**