Mercurial > hg > freeDiameter
comparison libfreeDiameter/dictionary.c @ 111:3b6174b6b35b
Fix fd_dict_getdict command for sentinels in the dictionary
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Tue, 08 Dec 2009 14:53:26 +0900 |
parents | a522268ec95b |
children | e2dc300819b3 |
comparison
equal
deleted
inserted
replaced
110:0e21b85edf85 | 111:3b6174b6b35b |
---|---|
1532 | 1532 |
1533 /* Initialize the sentinel for vendors and AVP lists */ | 1533 /* Initialize the sentinel for vendors and AVP lists */ |
1534 init_object( &new->dict_vendors, DICT_VENDOR ); | 1534 init_object( &new->dict_vendors, DICT_VENDOR ); |
1535 new->dict_vendors.data.vendor.vendor_name = "(no vendor)"; | 1535 new->dict_vendors.data.vendor.vendor_name = "(no vendor)"; |
1536 new->dict_vendors.list[0].o = NULL; /* overwrite since element is also sentinel for this list. */ | 1536 new->dict_vendors.list[0].o = NULL; /* overwrite since element is also sentinel for this list. */ |
1537 | 1537 new->dict_vendors.dico = new; |
1538 | 1538 |
1539 /* Initialize the sentinel for applications */ | 1539 /* Initialize the sentinel for applications */ |
1540 init_object( &new->dict_applications, DICT_APPLICATION ); | 1540 init_object( &new->dict_applications, DICT_APPLICATION ); |
1541 new->dict_applications.data.application.application_name = "Diameter Common Messages"; | 1541 new->dict_applications.data.application.application_name = "Diameter Common Messages"; |
1542 new->dict_applications.list[0].o = NULL; /* overwrite since since element is also sentinel for this list. */ | 1542 new->dict_applications.list[0].o = NULL; /* overwrite since since element is also sentinel for this list. */ |
1543 new->dict_applications.dico = new; | |
1543 | 1544 |
1544 /* Initialize the sentinel for types */ | 1545 /* Initialize the sentinel for types */ |
1545 fd_list_init ( &new->dict_types, NULL ); | 1546 fd_list_init ( &new->dict_types, NULL ); |
1546 | 1547 |
1547 /* Initialize the sentinels for commands */ | 1548 /* Initialize the sentinels for commands */ |
1551 /* Initialize the error command object */ | 1552 /* Initialize the error command object */ |
1552 init_object( &new->dict_cmd_error, DICT_COMMAND ); | 1553 init_object( &new->dict_cmd_error, DICT_COMMAND ); |
1553 new->dict_cmd_error.data.cmd.cmd_name="(generic error format)"; | 1554 new->dict_cmd_error.data.cmd.cmd_name="(generic error format)"; |
1554 new->dict_cmd_error.data.cmd.cmd_flag_mask=CMD_FLAG_ERROR | CMD_FLAG_REQUEST | CMD_FLAG_RETRANSMIT; | 1555 new->dict_cmd_error.data.cmd.cmd_flag_mask=CMD_FLAG_ERROR | CMD_FLAG_REQUEST | CMD_FLAG_RETRANSMIT; |
1555 new->dict_cmd_error.data.cmd.cmd_flag_val =CMD_FLAG_ERROR; | 1556 new->dict_cmd_error.data.cmd.cmd_flag_val =CMD_FLAG_ERROR; |
1557 new->dict_cmd_error.dico = new; | |
1556 | 1558 |
1557 *dict = new; | 1559 *dict = new; |
1558 | 1560 |
1559 /* Done */ | 1561 /* Done */ |
1560 return 0; | 1562 return 0; |