Navigation



Ignore:
Timestamp:
Feb 9, 2011, 3:26:58 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Large UNTESTED commit with the following changes:

  • Improved DiameterIdentity? handling (esp. interationalization issues), and improve efficiency of some string operations in peers, sessions, and dictionary modules (closes #7)
  • Cleanup in the session module to free only unreferenced sessions (#16)
  • Removed fd_cpu_flush_cache(), replaced by more robust alternatives.
  • Improved peer state machine algorithm to counter SCTP multistream race condition.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/dbg_interactive/sessions.i

    r639 r706  
    4040%{
    4141/* call it (might be called from a different thread than the interpreter, when session times out) */
    42 static void call_the_python_cleanup_callback(session_state * state, char * sid, void * cb) {
     42static void call_the_python_cleanup_callback(session_state * state, os0_t sid, void * cb) {
    4343        PyObject *result;
    4444        if (!cb) {
     
    100100                int ret;
    101101                struct session * s = NULL;
    102                 ret = fd_sess_new(&s, fd_g_config->cnf_diamid, "dbg_interactive", sizeof("dbg_interactive"));
     102                ret = fd_sess_new(&s, fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len, (os0_t)"dbg_interactive", CONSTSTRLEN("dbg_interactive"));
    103103                if (ret != 0) {
    104104                        DI_ERROR(ret, NULL, NULL);
     
    110110                int ret;
    111111                struct session * s = NULL;
    112                 ret = fd_sess_new(&s, diamid, STRING, LENGTH);
     112                ret = fd_sess_new(&s, diamid, 0, (os0_t)STRING, LENGTH);
    113113                if (ret != 0) {
    114114                        DI_ERROR(ret, NULL, NULL);
     
    120120                int ret, n;
    121121                struct session * s = NULL;
    122                 ret = fd_sess_fromsid(STRING, LENGTH, &s, &n);
     122                ret = fd_sess_fromsid((os0_t)STRING, LENGTH, &s, &n);
    123123                if (ret != 0) {
    124124                        DI_ERROR(ret, NULL, NULL);
     
    144144                return;
    145145        }
    146         char * getsid() {
     146       
     147        %cstring_output_allocate_size(char ** outsid, size_t * sidlen, /* do not free */);
     148        void getsid(char ** outsid, size_t * sidlen) {
    147149                int ret;
    148                 char * sid = NULL;
    149                 ret = fd_sess_getsid( $self, &sid);
     150                ret = fd_sess_getsid( $self, (void *)outsid, sidlen);
    150151                if (ret != 0) {
    151152                        DI_ERROR(ret, NULL, NULL);
    152                         return NULL;
     153                        return;
    153154                }
    154                 return sid;
     155                return;
    155156        }
    156157        void settimeout(long seconds) {
Note: See TracChangeset for help on using the changeset viewer.