IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

C Discussion :

'struct' member redefinition


Sujet :

C

  1. #1
    Membre éclairé Avatar de Fooshi
    Homme Profil pro
    ICD
    Inscrit en
    Juin 2002
    Messages
    508
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : ICD
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Juin 2002
    Messages : 508
    Par défaut 'struct' member redefinition
    Hello,
    j'ai une erreur a la compilation d'une extension php, un truc assez incomprehensible

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    /// session_open result declaration.
    struct session_open_result
    {
    	net_sessid_t session_id;	///< The session_id choosen by the server, this session_id must be used for all subsequent calls to the server or they will fail.
    };
     
    /// session_reset result declaration.
    struct session_reset_result
    {
    	net_sessid_t session_id;	///< The new session_id choosen by the server.
    };
    voici l'erreur :
    error C2020: 'session_id' : 'struct' member redefinition
    comme ci j'avais definie session_id dans la meme structure ce qui n'est pas le cas.
    je vous donne mon code entier on sais jamais :



    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    #ifndef FREEAGE_PHP_MOD_0_INCLUDED
    #define FREEAGE_PHP_MOD_0_INCLUDED
     
    #ifdef __cplusplus
    extern "C" {
    #endif
     
    #define FREEAGE_PHP_MOD_0_EXTNAME	"mod_0"
    #define FREEAGE_PHP_MOD_0_EXTVER	NULL
     
    #include "php.h"
     
    #ifdef ZTS
    #include "TSRM.h"
    #endif
     
    #include "net_types.h"
     
    PHP_MINIT_FUNCTION(mod_0);
    PHP_MINFO_FUNCTION(mod_0);
    PHP_MSHUTDOWN_FUNCTION(mod_0);
     
    /* mod_0 functions	*/
    PHP_FUNCTION(session_open);
    PHP_FUNCTION(session_open_result);
    PHP_FUNCTION(session_open_result_fetch_array);
    PHP_FUNCTION(session_reset);
    PHP_FUNCTION(session_reset_result);
    PHP_FUNCTION(session_reset_result_fetch_array);
    PHP_FUNCTION(session_close);
    PHP_FUNCTION(crypto_set_rsa_key);
    PHP_FUNCTION(crypto_get_aes_params);
    PHP_FUNCTION(crypto_get_aes_params_result);
    PHP_FUNCTION(crypto_get_aes_params_result_fetch_array);
    PHP_FUNCTION(crypto_begin);
    PHP_FUNCTION(crypto_begin_result);
    PHP_FUNCTION(crypto_begin_result_fetch_array);
    PHP_FUNCTION(crypto_end);
     
    ZEND_BEGIN_MODULE_GLOBALS(mod_0)
     
    /// session_open result declaration.
    struct session_open_result
    {
    	net_sessid_t session_id;	///< The session_id choosen by the server, this session_id must be used for all subsequent calls to the server or they will fail.
    };
     
    /// session_reset result declaration.
    struct session_reset_result
    {
    	net_sessid_t session_id;	///< The new session_id choosen by the server.
    };
     
    /// crypto_set_rsa_key params declaration.
    struct crypto_set_rsa_key_params
    {
    	net_ubyte_t public_key [128];	///< The client public RSA key.
    };
     
    /// crypto_get_aes_params result declaration.
    struct crypto_get_aes_params_result
    {
    	net_bool_t error;	///< False if ok, or true if an error occurred.
    	net_ubyte_t aes_params [128];	///< 1024 random bits needed to compute the AES parameters, encrypted with the client public key.
    };
     
    /// crypto_begin result declaration.
    struct crypto_begin_result
    {
    	net_bool_t error;	///< False if ok, or true if an error occurred.
    };
     
    ZEND_END_MODULE_GLOBALS(mod_0)
     
    /* Registration mod_0 inputs.	*/
    extern zend_module_entry mod_0_module_entry;
    #define phpext_mod_0_ptr &mod_0_module_entry
     
    #ifdef ZTS
    #define MOD_0_G(v) TSRMG(mod_0_globals_id, zend_mod_0_globals *, v)
    extern int mod_0_globals_id;
    #else
    #define MOD_0_G(v) (mod_0_globals.v)
    extern zend_mod_0_globals mod_0_globals;
    #endif
     
    #ifdef PHP_WIN32
    #define MOD_0_API __declspec(dllexport)
    #else
    #define MOD_0_API
    #endif
     
    ZEND_EXTERN_MODULE_GLOBALS(mod_0)
     
    #ifdef __cplusplus
    }
    #endif
     
    #endif /* FREEAGE_PHP_MOD_0_INCLUDED */
    je ne vois vraiment pas le probleme

  2. #2
    Membre Expert
    Profil pro
    Inscrit en
    Août 2006
    Messages
    1 104
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2006
    Messages : 1 104
    Par défaut
    Je ne saurais pas trop te dire. Mais qu'est-ce que net_sessid_t ? Lorsque tu déclares un objet de type structure, il faut clairement indiquer struct, à moins que tu le crées comme un nouveau type (typedef).

    Par exemple :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    struct machin
    {
      int membre;
    };
     
    machin monobjet; /*ERREUR ! Le compilateur connait "struct machin" mais pas le type "machin". */
    ne pourra pas compiler. Le compilateur ne connait pas machin mais seulement struct machin.

    Mais si on écrit
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    typedef struct machin
    {
      int membre;
    } machin;
     
    machin monobjet; /* OK ! Le compilateur connait le type "machin" */
    là, ça compilera.

    Peut-être que ton compilateur ne connait pas net_sessid_t mais seulement struct net_sessid_t ?

  3. #3
    Membre éclairé Avatar de Fooshi
    Homme Profil pro
    ICD
    Inscrit en
    Juin 2002
    Messages
    508
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : ICD
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Juin 2002
    Messages : 508
    Par défaut
    je comprendrais mon erreur si net_sessid_id etais un typedef d'une structure mais ici ce n'est pas le cas :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    typedef unsigned __int32 uint32_t;
    typedef uint32_t net_sessid_t;
    comme tu peux le voir c'est juste un entier non signé.

    je viens d'essayer :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    /// session_open result declaration.
    typedef struct session_open_result
    {
    	net_sessid_t session_id;	///< The session_id choosen by the server, this session_id must be used for all subsequent calls to the server or they will fail.
    }
    session_open_result;
     
    /// session_reset result declaration.
    typedef struct session_reset_result
    {
    	net_sessid_t session_id;	///< The new session_id choosen by the server.
    }
    session_reset_result;
    mais ce ne resous pas mon probleme. Lorsque je fais ca, ca me me met : "illegal storage class"

  4. #4
    Invité
    Invité(e)
    Par défaut
    Bonjour
    Ce serait pas
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    #ifndef ZTS  // au lieu de ifdef ZTS
    #include "TSRM.h"
    #endif
    ?

  5. #5
    Membre éclairé Avatar de Fooshi
    Homme Profil pro
    ICD
    Inscrit en
    Juin 2002
    Messages
    508
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : ICD
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Juin 2002
    Messages : 508
    Par défaut
    @pierre dolez : non ca c'est bon :-)

  6. #6
    Membre Expert
    Profil pro
    Inscrit en
    Août 2006
    Messages
    1 104
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2006
    Messages : 1 104
    Par défaut
    Difficile à dire avec aussi peu de code.

  7. #7
    Membre éclairé Avatar de Fooshi
    Homme Profil pro
    ICD
    Inscrit en
    Juin 2002
    Messages
    508
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : ICD
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Juin 2002
    Messages : 508
    Par défaut
    Voici mon header :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
     
    #ifndef FREEAGE_PHP_MOD_0_INCLUDED
    #define FREEAGE_PHP_MOD_0_INCLUDED
     
    #ifdef __cplusplus
    extern "C" {
    #endif
     
    #define FREEAGE_PHP_MOD_0_EXTNAME	"mod_0"
    #define FREEAGE_PHP_MOD_0_EXTVER	NULL
     
    #include "php.h"
     
    #ifdef ZTS
    #include "TSRM.h"
    #endif
     
    #include "net_types.h"
     
    PHP_MINIT_FUNCTION(mod_0);
    PHP_MINFO_FUNCTION(mod_0);
    PHP_MSHUTDOWN_FUNCTION(mod_0);
     
    /* mod_0 functions	*/
    PHP_FUNCTION(session_open);
    PHP_FUNCTION(session_open_result);
    PHP_FUNCTION(session_open_result_fetch_array);
    PHP_FUNCTION(session_reset);
    PHP_FUNCTION(session_reset_result);
    PHP_FUNCTION(session_reset_result_fetch_array);
    PHP_FUNCTION(session_close);
    PHP_FUNCTION(crypto_set_rsa_key);
    PHP_FUNCTION(crypto_get_aes_params);
    PHP_FUNCTION(crypto_get_aes_params_result);
    PHP_FUNCTION(crypto_get_aes_params_result_fetch_array);
    PHP_FUNCTION(crypto_begin);
    PHP_FUNCTION(crypto_begin_result);
    PHP_FUNCTION(crypto_begin_result_fetch_array);
    PHP_FUNCTION(crypto_end);
     
    ZEND_BEGIN_MODULE_GLOBALS(mod_0)
     
    /// session_open result declaration.
    struct session_open_result
    {
    	net_sessid_t session_id;	///< The session_id choosen by the server, this session_id must be used for all subsequent calls to the server or they will fail.
    }
    ;
     
    /// session_reset result declaration.
    struct session_reset_result
    {
    	net_sessid_t session_id;	///< The new session_id choosen by the server.
    };
     
    /// crypto_set_rsa_key params declaration.
    struct crypto_set_rsa_key_params
    {
    	net_ubyte_t public_key [128];	///< The client public RSA key.
    };
     
    /// crypto_get_aes_params result declaration.
    struct crypto_get_aes_params_result
    {
    	net_bool_t error;	///< False if ok, or true if an error occurred.
    	net_ubyte_t aes_params [128];	///< 1024 random bits needed to compute the AES parameters, encrypted with the client public key.
    };
     
    /// crypto_begin result declaration.
    struct crypto_begin_result
    {
    	net_bool_t error;	///< False if ok, or true if an error occurred.
    };
     
    ZEND_END_MODULE_GLOBALS(mod_0)
     
    /* Registration mod_0 inputs.	*/
    extern zend_module_entry mod_0_module_entry;
    #define phpext_mod_0_ptr &mod_0_module_entry
     
    #ifdef ZTS
    #define MOD_0_G(v) TSRMG(mod_0_globals_id, zend_mod_0_globals *, v)
    extern int mod_0_globals_id;
    #else
    #define MOD_0_G(v) (mod_0_globals.v)
    extern zend_mod_0_globals mod_0_globals;
    #endif
     
    #ifdef PHP_WIN32
    #define MOD_0_API __declspec(dllexport)
    #else
    #define MOD_0_API
    #endif
     
    ZEND_EXTERN_MODULE_GLOBALS(mod_0)
     
    #ifdef __cplusplus
    }
    #endif
     
    #endif /* FREEAGE_PHP_MOD_0_INCLUDED */
    et mon c :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
     
    #include "php_mod_0.h"
    #include "net_endian.h"
    #include "net_struct.h"
    #include "net_func.h"
    #include "net_client.h"
    #include "info.h"
     
    #ifdef HAVE_CONFIG_H
    #include "config.h"
    #endif
     
    #include <stddef.h>
    #include <string.h>
    #include <stdio.h>
     
    /* Every user visible function must have an entry in this function.    */
    const zend_function_entry mod_0_functions [] =
    {
        PHP_FE(session_open, NULL)
        PHP_FE(session_open_result, NULL)
        PHP_FE(session_open_result_fetch_array, NULL)
        PHP_FE(session_reset, NULL)
        PHP_FE(session_reset_result, NULL)
        PHP_FE(session_reset_result_fetch_array, NULL)
        PHP_FE(session_close, NULL)
        PHP_FE(crypto_set_rsa_key, NULL)
        PHP_FE(crypto_get_aes_params, NULL)
        PHP_FE(crypto_get_aes_params_result, NULL)
        PHP_FE(crypto_get_aes_params_result_fetch_array, NULL)
        PHP_FE(crypto_begin, NULL)
        PHP_FE(crypto_begin_result, NULL)
        PHP_FE(crypto_begin_result_fetch_array, NULL)
        PHP_FE(crypto_end, NULL)
        {NULL, NULL, NULL}
    };
     
    /* Module information    */
    zend_module_entry mod_0_module_entry =
    {
        #if ZEND_MODULE_API_NO >= 20010901
        STANDARD_MODULE_HEADER,
        #endif
        FREEAGE_PHP_MOD_0_EXTNAME,
        mod_0_functions,        /* Functions    */
        PHP_MINIT(mod_0),        /* MINIT        */
        PHP_MSHUTDOWN(mod_0),    /* MSHUTDOWN    */
        NULL,                    /* RINIT        */
        NULL,                    /* RSHUTDOWN    */
        PHP_MINFO(mod_0),        /* MINFO        */
        #if ZEND_MODULE_API_NO >= 20010901
        FREEAGE_PHP_MOD_0_EXTVER,
        #endif
        STANDARD_MODULE_PROPERTIES
    };
     
    #ifdef COMPILE_DL_MOD_0
    ZEND_GET_MODULE(mod_0)
    #endif
     
    /* Variable and function to register the resource of session_open_result function    */
    static int le_session_open_result;
    #define le_session_open_result_name "session_open_result_name"
     
    static void
    session_open_result_dtor ( zend_rsrc_list_entry * rsrc TSRMLS_DC )
    {
        struct session_open_result * result = (struct session_open_result *) rsrc->ptr;
        if (result)
        {
            efree(result);
        }
    }
     
    /* Variable and function to register the resource of session_reset_result function    */
    static int le_session_reset_result;
    #define le_session_reset_result_name "session_reset_result_name"
     
    static void
    session_reset_result_dtor ( zend_rsrc_list_entry * rsrc TSRMLS_DC )
    {
        struct session_reset_result * result = (struct session_reset_result *) rsrc->ptr;
        if (result)
        {
            efree(result);
        }
    }
     
    /* Variable and function to register the resource of crypto_get_aes_params_result function    */
    static int le_crypto_get_aes_params_result;
    #define le_crypto_get_aes_params_result_name "crypto_get_aes_params_result_name"
     
    static void
    crypto_get_aes_params_result_dtor ( zend_rsrc_list_entry * rsrc TSRMLS_DC )
    {
        struct crypto_get_aes_params_result * result = (struct crypto_get_aes_params_result *) rsrc->ptr;
        if (result)
        {
            efree(result);
        }
    }
     
    /* Variable and function to register the resource of crypto_begin_result function    */
    static int le_crypto_begin_result;
    #define le_crypto_begin_result_name "crypto_begin_result_name"
     
    static void
    crypto_begin_result_dtor ( zend_rsrc_list_entry * rsrc TSRMLS_DC )
    {
        struct crypto_begin_result * result = (struct crypto_begin_result *) rsrc->ptr;
        if (result)
        {
            efree(result);
        }
    }
     
    /* Function to add php_info module information    */
    PHP_MINFO_FUNCTION(mod_0)
    {
        php_info_print_table_start();
        php_info_print_table_row(2, "mod_0", "Enabled");
        php_info_print_table_row(2, "Infos", "Copyright (c) Artefacts Studio 2009 - All rights reserved.");
        php_info_print_table_row(2, "Infos", "This module implement global functions.");
        php_info_print_table_end();
        php_info_print_table_start();
        php_info_print_table_header(1, "Functions");
        php_info_print_table_row(1, "session_open");
        php_info_print_table_row(1, "session_open_result");
        php_info_print_table_row(1, "session_open_result_fetch_array");
        php_info_print_table_row(1, "session_reset");
        php_info_print_table_row(1, "session_reset_result");
        php_info_print_table_row(1, "session_reset_result_fetch_array");
        php_info_print_table_row(1, "session_close");
        php_info_print_table_row(1, "crypto_set_rsa_key");
        php_info_print_table_row(1, "crypto_get_aes_params");
        php_info_print_table_row(1, "crypto_get_aes_params_result");
        php_info_print_table_row(1, "crypto_get_aes_params_result_fetch_array");
        php_info_print_table_row(1, "crypto_begin");
        php_info_print_table_row(1, "crypto_begin_result");
        php_info_print_table_row(1, "crypto_begin_result_fetch_array");
        php_info_print_table_row(1, "crypto_end");
        php_info_print_table_end();
    }
     
    PHP_MINIT_FUNCTION(mod_0)
    {
        le_session_open_result    = zend_register_list_destructors_ex( session_open_result_dtor, NULL, le_session_open_result_name, module_number );
        le_session_reset_result    = zend_register_list_destructors_ex( session_reset_result_dtor, NULL, le_session_reset_result_name, module_number );
        le_crypto_get_aes_params_result    = zend_register_list_destructors_ex( crypto_get_aes_params_result_dtor, NULL, le_crypto_get_aes_params_result_name, module_number );
        le_crypto_begin_result    = zend_register_list_destructors_ex( crypto_begin_result_dtor, NULL, le_crypto_begin_result_name, module_number );
        return SUCCESS;
    }
     
    PHP_MSHUTDOWN_FUNCTION(mod_0)
    {
        return SUCCESS;
    }
     
    ZEND_DECLARE_MODULE_GLOBALS(mod_0)
     
    /// session_open result byte swapping function.
    /**
     * This function byte swap the structure in-place.
     * \param target A pointer to the structure.
     */
    void
    session_open_result_bswap_fn ( struct session_open_result * target );
     
    /// session_open result format definition.
    static const struct net_struct session_open_result_format =
    {
        1, sizeof(struct session_open_result),
        NULL,    /* not used by client */
        NULL,    /* not used for results */
        (net_struct_bswap_fn_t)session_open_result_bswap_fn,
        {
            { NET_TYPE_SESSID, 1, offsetof(struct session_open_result, session_id) }
        }
    };
     
    void
    session_open_result_bswap_fn ( struct session_open_result * target )
    {
    }
     
    /// session_open function definition.
    static const struct net_func session_open_func_def =
    {
        0,
        0,
        NULL,
        &session_open_result_format
    };
     
    /* {{{ Prototype : long instance session_open ( long net_client, ) */
    PHP_FUNCTION(session_open)
    {
        struct net_func_instance    * instance;
        struct net_client            * net_client;
        long    arg_net_client;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &arg_net_client) == FAILURE)
        {
            php_error_docref(NULL TSRMLS_CC, E_WARNING, "session_open : A parameter is missing");
            RETURN_FALSE;
        }
        net_client    = (struct net_client *) arg_net_client;
        instance    = net_client_call_function(net_client, &session_open_func_def, NULL);
        if (instance == NULL)
        {
            RETURN_NULL();
        }
        else
        {
            RETURN_LONG((long) instance);
        }
    }
    /* }}} */
     
     
    /* {{{ Prototype : Resource result session_open_result ( long instance ) */
    PHP_FUNCTION(session_open_result)
    {
        struct session_open_result    * result;
        struct session_open_result    * result_new;
        struct net_func_instance    * instance;
        long arg_instance;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &arg_instance) == FAILURE)
        {
            php_error_docref(NULL TSRMLS_CC, E_WARNING, "session_open_result : A parameter is missing");
            RETURN_FALSE;
        }
        instance    = (struct net_func_instance *) arg_instance;
        result        = (struct session_open_result *) net_func_pop_result(instance);
        if (result != NULL)
        {
            result_new = emalloc(sizeof(struct session_open_result));
            result_new->session_id    = result->session_id;
            ZEND_REGISTER_RESOURCE(return_value, result_new, le_session_open_result);
            return;
        }
        else
        {
            RETURN_LONG(0);
        }
    }
    /* }}} */
     
     
    /* {{{ Prototype : Array ["session_id", ] session_open_result_fetch_array ( Resource result ) */
    PHP_FUNCTION(session_open_result_fetch_array)
    {
        struct session_open_result    * result;
        zval    * arg_result;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg_result) == FAILURE)
        {
            php_error_docref(NULL TSRMLS_CC, E_WARNING, "session_open_result_fetch_array : A parameter is missing");
            RETURN_FALSE;
        }
        ZEND_FETCH_RESOURCE(result, struct session_open_result *, &arg_result, -1, le_session_open_result_name, le_session_open_result);
        array_init(return_value);
        add_assoc_long(return_value, "session_id", (long) result->session_id);
    }
    /* }}} */
     
     
    /// session_reset result byte swapping function.
    /**
     * This function byte swap the structure in-place.
     * \param target A pointer to the structure.
     */
    void
    session_reset_result_bswap_fn ( struct session_reset_result * target );
     
    /// session_reset result format definition.
    static const struct net_struct session_reset_result_format =
    {
        1, sizeof(struct session_reset_result),
        NULL,    /* not used by client */
        NULL,    /* not used for results */
        (net_struct_bswap_fn_t)session_reset_result_bswap_fn,
        {
            { NET_TYPE_SESSID, 1, offsetof(struct session_reset_result, session_id) }
        }
    };
     
    void
    session_reset_result_bswap_fn ( struct session_reset_result * target )
    {
    }
     
    /// session_reset function definition.
    static const struct net_func session_reset_func_def =
    {
        0,
        1,
        NULL,
        &session_reset_result_format
    };
     
    /* {{{ Prototype : long instance session_reset ( long net_client, ) */
    PHP_FUNCTION(session_reset)
    {
        struct net_func_instance    * instance;
        struct net_client            * net_client;
        long    arg_net_client;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &arg_net_client) == FAILURE)
        {
            php_error_docref(NULL TSRMLS_CC, E_WARNING, "session_reset : A parameter is missing");
            RETURN_FALSE;
        }
        net_client    = (struct net_client *) arg_net_client;
        instance    = net_client_call_function(net_client, &session_reset_func_def, NULL);
        if (instance == NULL)
        {
            RETURN_NULL();
        }
        else
        {
            RETURN_LONG((long) instance);
        }
    }
    /* }}} */
     
     
    /* {{{ Prototype : Resource result session_reset_result ( long instance ) */
    PHP_FUNCTION(session_reset_result)
    {
        struct session_reset_result    * result;
        struct session_reset_result    * result_new;
        struct net_func_instance    * instance;
        long arg_instance;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &arg_instance) == FAILURE)
        {
            php_error_docref(NULL TSRMLS_CC, E_WARNING, "session_reset_result : A parameter is missing");
            RETURN_FALSE;
        }
        instance    = (struct net_func_instance *) arg_instance;
        result        = (struct session_reset_result *) net_func_pop_result(instance);
        if (result != NULL)
        {
            result_new = emalloc(sizeof(struct session_reset_result));
            result_new->session_id    = result->session_id;
            ZEND_REGISTER_RESOURCE(return_value, result_new, le_session_reset_result);
            return;
        }
        else
        {
            RETURN_LONG(0);
        }
    }
    /* }}} */
     
     
    /* {{{ Prototype : Array ["session_id", ] session_reset_result_fetch_array ( Resource result ) */
    PHP_FUNCTION(session_reset_result_fetch_array)
    {
        struct session_reset_result    * result;
        zval    * arg_result;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg_result) == FAILURE)
        {
            php_error_docref(NULL TSRMLS_CC, E_WARNING, "session_reset_result_fetch_array : A parameter is missing");
            RETURN_FALSE;
        }
        ZEND_FETCH_RESOURCE(result, struct session_reset_result *, &arg_result, -1, le_session_reset_result_name, le_session_reset_result);
        array_init(return_value);
        add_assoc_long(return_value, "session_id", (long) result->session_id);
    }
    /* }}} */
     
     
    /// session_close function definition.
    static const struct net_func session_close_func_def =
    {
        0,
        2,
        NULL,
        NULL
    };
     
    /* {{{ Prototype : long instance session_close ( long net_client, ) */
    PHP_FUNCTION(session_close)
    {
        struct net_func_instance    * instance;
        struct net_client            * net_client;
        long    arg_net_client;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &arg_net_client) == FAILURE)
        {
            php_error_docref(NULL TSRMLS_CC, E_WARNING, "session_close : A parameter is missing");
            RETURN_FALSE;
        }
        net_client    = (struct net_client *) arg_net_client;
        instance    = net_client_call_function(net_client, &session_close_func_def, NULL);
        if (instance == NULL)
        {
            RETURN_NULL();
        }
        else
        {
            RETURN_LONG((long) instance);
        }
    }
    /* }}} */
    /// crypto_set_rsa_key params formatting function.
    /**
     * \param target A pointer to the structure.
     * \param ap     A list of parameters.
     */
    void
    crypto_set_rsa_key_params_format_fn ( struct crypto_set_rsa_key_params * target, va_list ap );
     
    /// crypto_set_rsa_key params byte swapping function.
    /**
     * This function byte swap the structure in-place.
     * \param target A pointer to the structure.
     */
    void
    crypto_set_rsa_key_params_bswap_fn ( struct crypto_set_rsa_key_params * target );
     
    /// crypto_set_rsa_key params format definition.
    static const struct net_struct crypto_set_rsa_key_params_format =
    {
        1, sizeof(struct crypto_set_rsa_key_params),
        NULL,    /* not used by client */
        (net_struct_format_fn_t)crypto_set_rsa_key_params_format_fn,
        (net_struct_bswap_fn_t)crypto_set_rsa_key_params_bswap_fn,
        {
            { NET_TYPE_UBYTE, 128, offsetof(struct crypto_set_rsa_key_params, public_key) }
        }
    };
     
    void
    crypto_set_rsa_key_params_format_fn ( struct crypto_set_rsa_key_params * target, va_list ap )
    {
        {
            unsigned int idx;
            const net_ubyte_t * source = va_arg(ap, net_ubyte_t *);
            for (idx = 0; idx < 128; ++ idx)
            {
                target->public_key[idx] = source[idx];
            }
        }
    }
     
    void
    crypto_set_rsa_key_params_bswap_fn ( struct crypto_set_rsa_key_params * target )
    {
    }
     
    /// crypto_set_rsa_key function definition.
    static const struct net_func crypto_set_rsa_key_func_def =
    {
        0,
        3,
        &crypto_set_rsa_key_params_format,
        NULL
    };
     
    /* {{{ Prototype : long instance crypto_set_rsa_key ( long net_client, long public_key, ) */
    PHP_FUNCTION(crypto_set_rsa_key)
    {
        struct net_func_instance    * instance;
        struct net_client            * net_client;
        long    arg_net_client;
        net_ubyte_t public_key [128];
        long    arg_public_key;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &arg_net_client, &arg_public_key) == FAILURE)
        {
            php_error_docref(NULL TSRMLS_CC, E_WARNING, "crypto_set_rsa_key : A parameter is missing");
            RETURN_FALSE;
        }
        net_client    = (struct net_client *) arg_net_client;
        memcpy(&public_key, &arg_public_key, sizeof(arg_public_key));
        instance    = net_client_call_function(net_client, &crypto_set_rsa_key_func_def, NULL, public_key);
        if (instance == NULL)
        {
            RETURN_NULL();
        }
        else
        {
            RETURN_LONG((long) instance);
        }
    }
    /* }}} */
    /// crypto_get_aes_params result byte swapping function.
    /**
     * This function byte swap the structure in-place.
     * \param target A pointer to the structure.
     */
    void
    crypto_get_aes_params_result_bswap_fn ( struct crypto_get_aes_params_result * target );
     
    /// crypto_get_aes_params result format definition.
    static const struct net_struct crypto_get_aes_params_result_format =
    {
        2, sizeof(struct crypto_get_aes_params_result),
        NULL,    /* not used by client */
        NULL,    /* not used for results */
        (net_struct_bswap_fn_t)crypto_get_aes_params_result_bswap_fn,
        {
            { NET_TYPE_BOOL, 1, offsetof(struct crypto_get_aes_params_result, error) },
            { NET_TYPE_UBYTE, 128, offsetof(struct crypto_get_aes_params_result, aes_params) }
        }
    };
     
    void
    crypto_get_aes_params_result_bswap_fn ( struct crypto_get_aes_params_result * target )
    {
    }
     
    /// crypto_get_aes_params function definition.
    static const struct net_func crypto_get_aes_params_func_def =
    {
        0,
        4,
        NULL,
        &crypto_get_aes_params_result_format
    };
     
    /* {{{ Prototype : long instance crypto_get_aes_params ( long net_client, ) */
    PHP_FUNCTION(crypto_get_aes_params)
    {
        struct net_func_instance    * instance;
        struct net_client            * net_client;
        long    arg_net_client;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &arg_net_client) == FAILURE)
        {
            php_error_docref(NULL TSRMLS_CC, E_WARNING, "crypto_get_aes_params : A parameter is missing");
            RETURN_FALSE;
        }
        net_client    = (struct net_client *) arg_net_client;
        instance    = net_client_call_function(net_client, &crypto_get_aes_params_func_def, NULL);
        if (instance == NULL)
        {
            RETURN_NULL();
        }
        else
        {
            RETURN_LONG((long) instance);
        }
    }
    /* }}} */
     
     
    /* {{{ Prototype : Resource result crypto_get_aes_params_result ( long instance ) */
    PHP_FUNCTION(crypto_get_aes_params_result)
    {
        struct crypto_get_aes_params_result    * result;
        struct crypto_get_aes_params_result    * result_new;
        struct net_func_instance    * instance;
        long arg_instance;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &arg_instance) == FAILURE)
        {
            php_error_docref(NULL TSRMLS_CC, E_WARNING, "crypto_get_aes_params_result : A parameter is missing");
            RETURN_FALSE;
        }
        instance    = (struct net_func_instance *) arg_instance;
        result        = (struct crypto_get_aes_params_result *) net_func_pop_result(instance);
        if (result != NULL)
        {
            result_new = emalloc(sizeof(struct crypto_get_aes_params_result));
            result_new->error    = result->error;
            memcpy(&result_new->aes_params, &result->aes_params, sizeof(result->aes_params));
            ZEND_REGISTER_RESOURCE(return_value, result_new, le_crypto_get_aes_params_result);
            return;
        }
        else
        {
            RETURN_LONG(0);
        }
    }
    /* }}} */
     
     
    /* {{{ Prototype : Array ["error", "aes_params", ] crypto_get_aes_params_result_fetch_array ( Resource result ) */
    PHP_FUNCTION(crypto_get_aes_params_result_fetch_array)
    {
        struct crypto_get_aes_params_result    * result;
        zval    * arg_result;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg_result) == FAILURE)
        {
            php_error_docref(NULL TSRMLS_CC, E_WARNING, "crypto_get_aes_params_result_fetch_array : A parameter is missing");
            RETURN_FALSE;
        }
        ZEND_FETCH_RESOURCE(result, struct crypto_get_aes_params_result *, &arg_result, -1, le_crypto_get_aes_params_result_name, le_crypto_get_aes_params_result);
        array_init(return_value);
        add_assoc_bool(return_value, "error", result->error);
        add_assoc_long(return_value, "aes_params", (long) result->aes_params);
    }
    /* }}} */
     
     
    /// crypto_begin result byte swapping function.
    /**
     * This function byte swap the structure in-place.
     * \param target A pointer to the structure.
     */
    void
    crypto_begin_result_bswap_fn ( struct crypto_begin_result * target );
     
    /// crypto_begin result format definition.
    static const struct net_struct crypto_begin_result_format =
    {
        1, sizeof(struct crypto_begin_result),
        NULL,    /* not used by client */
        NULL,    /* not used for results */
        (net_struct_bswap_fn_t)crypto_begin_result_bswap_fn,
        {
            { NET_TYPE_BOOL, 1, offsetof(struct crypto_begin_result, error) }
        }
    };
     
    void
    crypto_begin_result_bswap_fn ( struct crypto_begin_result * target )
    {
    }
     
    /// crypto_begin function definition.
    static const struct net_func crypto_begin_func_def =
    {
        0,
        5,
        NULL,
        &crypto_begin_result_format
    };
     
    /* {{{ Prototype : long instance crypto_begin ( long net_client, ) */
    PHP_FUNCTION(crypto_begin)
    {
        struct net_func_instance    * instance;
        struct net_client            * net_client;
        long    arg_net_client;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &arg_net_client) == FAILURE)
        {
            php_error_docref(NULL TSRMLS_CC, E_WARNING, "crypto_begin : A parameter is missing");
            RETURN_FALSE;
        }
        net_client    = (struct net_client *) arg_net_client;
        instance    = net_client_call_function(net_client, &crypto_begin_func_def, NULL);
        if (instance == NULL)
        {
            RETURN_NULL();
        }
        else
        {
            RETURN_LONG((long) instance);
        }
    }
    /* }}} */
     
     
    /* {{{ Prototype : Resource result crypto_begin_result ( long instance ) */
    PHP_FUNCTION(crypto_begin_result)
    {
        struct crypto_begin_result    * result;
        struct crypto_begin_result    * result_new;
        struct net_func_instance    * instance;
        long arg_instance;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &arg_instance) == FAILURE)
        {
            php_error_docref(NULL TSRMLS_CC, E_WARNING, "crypto_begin_result : A parameter is missing");
            RETURN_FALSE;
        }
        instance    = (struct net_func_instance *) arg_instance;
        result        = (struct crypto_begin_result *) net_func_pop_result(instance);
        if (result != NULL)
        {
            result_new = emalloc(sizeof(struct crypto_begin_result));
            result_new->error    = result->error;
            ZEND_REGISTER_RESOURCE(return_value, result_new, le_crypto_begin_result);
            return;
        }
        else
        {
            RETURN_LONG(0);
        }
    }
    /* }}} */
     
     
    /* {{{ Prototype : Array ["error", ] crypto_begin_result_fetch_array ( Resource result ) */
    PHP_FUNCTION(crypto_begin_result_fetch_array)
    {
        struct crypto_begin_result    * result;
        zval    * arg_result;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg_result) == FAILURE)
        {
            php_error_docref(NULL TSRMLS_CC, E_WARNING, "crypto_begin_result_fetch_array : A parameter is missing");
            RETURN_FALSE;
        }
        ZEND_FETCH_RESOURCE(result, struct crypto_begin_result *, &arg_result, -1, le_crypto_begin_result_name, le_crypto_begin_result);
        array_init(return_value);
        add_assoc_bool(return_value, "error", result->error);
    }
    /* }}} */
     
     
    /// crypto_end function definition.
    static const struct net_func crypto_end_func_def =
    {
        0,
        6,
        NULL,
        NULL
    };
     
    /* {{{ Prototype : long instance crypto_end ( long net_client, ) */
    PHP_FUNCTION(crypto_end)
    {
        struct net_func_instance    * instance;
        struct net_client            * net_client;
        long    arg_net_client;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &arg_net_client) == FAILURE)
        {
            php_error_docref(NULL TSRMLS_CC, E_WARNING, "crypto_end : A parameter is missing");
            RETURN_FALSE;
        }
        net_client    = (struct net_client *) arg_net_client;
        instance    = net_client_call_function(net_client, &crypto_end_func_def, NULL);
        if (instance == NULL)
        {
            RETURN_NULL();
        }
        else
        {
            RETURN_LONG((long) instance);
        }
    }
    /* }}} */

  8. #8
    Invité
    Invité(e)
    Par défaut
    Bonjour,
    Assurément, ce n'est pas vraiment le style que j'ai l'habitude d'utiliser, alors pardonnez-moi si je pose des questions idiotes.
    Il y a pas mal de choses que je n'ai pas comprises, mais en voici une qui me parait pas très logique :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    static const struct net_func session_reset_func_def =
    {
        0,
        1,
        NULL,
        &session_reset_result_format
    };
    Vous initialisez une structure. Cette structure est static, donc, elle est initialisée au début, à l'ouverture. Or elle est aussi const donc, ne sera pas modifiée. Pourtant elle contient une référence, qui est probablement non-définie au moment de l'initialisation, et qui ne pourra de toute façon pas être modifiée.

  9. #9
    Expert confirmé
    Avatar de diogene
    Homme Profil pro
    Enseignant Chercheur
    Inscrit en
    Juin 2005
    Messages
    5 761
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Enseignant Chercheur
    Secteur : Enseignement

    Informations forums :
    Inscription : Juin 2005
    Messages : 5 761
    Par défaut
    @ Pierre Dolez:
    Pourtant elle contient une référence, qui est probablement non-définie au moment de l'initialisation,
    C'est l'adresse d'une structure static définie plus haut, donc il n'y a pas de problèmes. Sinon, d'ailleurs, le compilateur l'aurait signalé.

  10. #10
    Membre éclairé Avatar de Fooshi
    Homme Profil pro
    ICD
    Inscrit en
    Juin 2002
    Messages
    508
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : ICD
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Juin 2002
    Messages : 508
    Par défaut
    effectivement comme le dis diogene pas de probleme de ce coté la, et puis ca n'a pas de rapport avec mon probleme de départ. Je continue a chercher de mon coté mais je ne trouve vraiment pas

  11. #11
    Membre éclairé Avatar de Fooshi
    Homme Profil pro
    ICD
    Inscrit en
    Juin 2002
    Messages
    508
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : ICD
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Juin 2002
    Messages : 508
    Par défaut
    Mon probleme est résolu !
    en supprimant les macros ZEND_BEGIN_MODULE_GLOBALS(mod_0) et ZEND_END_MODULE_GLOBALS(mod_0) ca fonctionne (et puis je n'en ai pas l'utilité)

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. struct type redefinition avec VS 2005
    Par kass28 dans le forum Visual C++
    Réponses: 17
    Dernier message: 14/08/2007, 17h48
  2. struct ?
    Par bart64 dans le forum C
    Réponses: 5
    Dernier message: 10/11/2003, 23h08
  3. qsort avec un struct* ?
    Par hpfx dans le forum MFC
    Réponses: 11
    Dernier message: 06/10/2003, 18h29
  4. Unrecognized option -fnative-struct
    Par copyallright dans le forum GTK+ avec C & C++
    Réponses: 2
    Dernier message: 01/05/2003, 12h25
  5. Problème avec [b]struct[/b]
    Par Bouziane Abderraouf dans le forum CORBA
    Réponses: 2
    Dernier message: 17/07/2002, 10h25

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo