Navigation



Ignore:
Timestamp:
Jul 28, 2010, 3:59:39 PM (14 years ago)
Author:
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
Branch:
default
Phase:
public
Message:

Corrected compilation warnings on app_diameap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_diameap/diameap_init.c

    r425 r438  
    113113struct dict_object * dataobj_user_name = NULL;
    114114
    115 int diameap_init(char * conffile)
    116 {
    117         TRACE_ENTRY("%p",conffile);
    118 
    119         /* Initialize the diameap_config structure*/
    120         CHECK_FCT(diameap_init_config(conffile));
    121 
    122         if (diameap_config->conffile)
    123         {
    124                 /* parse the configuration file*/
    125                 CHECK_FCT(diameap_parse_conffile());
    126 
    127                 /* Load EAP methods plug-ins */
    128                 CHECK_FCT(diameap_plugin_load());
    129 
    130         }
    131         else
    132         {
    133                 TRACE_DEBUG(FULL,"%sNo EAP method plug-in available with a default configuration.",DIAMEAP_EXTENSION);
    134         }
    135 
    136         /* Initialize Dictionary templates */
    137         CHECK_FCT(diameap_init_obj());
    138 
    139         /* Initialize access to user's information Database */
    140         CHECK_FCT(diameap_mysql_connect());
    141 
    142         /* Dump DiamEAP extension configuration */
    143         diameap_conf_dump();
    144 
    145         return 0;
    146 }
     115
    147116
    148117static int diameap_init_config(char * conffile)
     
    389358        }
    390359        return 0;
    391 }
    392 
    393 /* Reconnecting to MySQL Database */
    394 int diameap_mysql_reconnect()
    395 {
    396         TRACE_ENTRY();
    397         CHECK_POSIX(pthread_mutex_lock( &db_cs_mutex ));
    398         if (db_conn == NULL)
    399         {
    400                 TRACE_DEBUG(INFO,"%sReconnecting to MySQL server.",DIAMEAP_EXTENSION);
    401                 if(diameap_mysql_connect()==0){
    402                         TRACE_DEBUG(INFO,"%s Reconnected successfully to MySQL Server.",DIAMEAP_EXTENSION);
    403                 }else{
    404                         return 1;
    405                 }
    406         }
    407         CHECK_POSIX(pthread_mutex_unlock( &db_cs_mutex ));
    408         return 0;
    409 
    410360}
    411361
     
    440390                        "-------- DiamEAP extension : Configuration parameters (End) ---------------\n");
    441391}
     392
     393int diameap_init(char * conffile)
     394{
     395        TRACE_ENTRY("%p",conffile);
     396
     397        /* Initialize the diameap_config structure*/
     398        CHECK_FCT(diameap_init_config(conffile));
     399
     400        if (diameap_config->conffile)
     401        {
     402                /* parse the configuration file*/
     403                CHECK_FCT(diameap_parse_conffile());
     404
     405                /* Load EAP methods plug-ins */
     406                CHECK_FCT(diameap_plugin_load());
     407
     408        }
     409        else
     410        {
     411                TRACE_DEBUG(FULL,"%sNo EAP method plug-in available with a default configuration.",DIAMEAP_EXTENSION);
     412        }
     413
     414        /* Initialize Dictionary templates */
     415        CHECK_FCT(diameap_init_obj());
     416
     417        /* Initialize access to user's information Database */
     418        CHECK_FCT(diameap_mysql_connect());
     419
     420        /* Dump DiamEAP extension configuration */
     421        diameap_conf_dump();
     422
     423        return 0;
     424}
Note: See TracChangeset for help on using the changeset viewer.