Changeset 304:bc8e4448b637 in verona
- Timestamp:
- Sep 14, 2011 4:36:30 PM (20 months ago)
- Branch:
- default
- File:
-
- 1 edited
-
libeXosip2/src/eXconf.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libeXosip2/src/eXconf.c
r131 r304 72 72 eXtl_dtls.tl_masquerade_contact(public_address, port); 73 73 #endif 74 #endif 75 #ifdef HAVE_CSL 76 eXtl_csl.tl_masquerade_contact(public_address, port); 77 eXtl_dcsl.tl_masquerade_contact(public_address, port); 74 78 #endif 75 79 return; … … 269 273 eXtl_tls.tl_free(); 270 274 #endif 275 #ifdef HAVE_CSL 276 eXtl_csl.tl_free(); 277 eXtl_dcsl.tl_free(); 278 #endif 271 279 272 280 memset(&eXosip, 0, sizeof(eXosip)); … … 551 559 else if (transport == IPPROTO_TCP && secure == 0) 552 560 eXtl = &eXtl_tcp; 561 #ifdef HAVE_CSL 562 else if (transport == IPPROTO_UDP) 563 eXtl = &eXtl_dcsl; 564 else if (transport == IPPROTO_TCP) 565 eXtl = &eXtl_csl; 566 #endif 553 567 #ifdef HAVE_OPENSSL_SSL_H 554 568 #if !(OPENSSL_VERSION_NUMBER < 0x00908000L) … … 587 601 //FIXME: ce n'est peut être pas la meilleur maniÚre de la faire car du coup on ne peut pas avoir openssl et csl en meme temps 588 602 //utiliser secure == 1 pour openssl et secure == pour CSL 603 #ifndef HAVE_CSL /* !HAVE_CSL */ 589 604 else if (transport == IPPROTO_UDP) 590 605 snprintf(eXosip.transport, sizeof(eXosip.transport), "%s", "DTLS-UDP"); 591 606 else if (transport == IPPROTO_TCP) 592 607 snprintf(eXosip.transport, sizeof(eXosip.transport), "%s", "TLS"); 608 #else /* HAVE_CSL */ 609 else if (transport == IPPROTO_UDP) 610 snprintf(eXosip.transport, sizeof(eXosip.transport), "%s", "DCSL"); 611 else if (transport == IPPROTO_TCP) 612 snprintf(eXosip.transport, sizeof(eXosip.transport), "%s", "CSL"); 613 #endif /* HAVE_CSL */ 593 614 594 615 #ifdef OSIP_MT … … 714 735 #endif 715 736 eXtl_tls.tl_init(); 737 #endif 738 #ifdef HAVE_CSL 739 eXtl_csl.tl_init(); 740 eXtl_dcsl.tl_init(); 716 741 #endif 717 742 return OSIP_SUCCESS; … … 922 947 memset(eXosip.http_proxy, '\0', sizeof(eXosip.http_proxy)); 923 948 if (tmp != NULL && tmp[0] != '\0') 924 strncpy(eXosip.http_proxy, tmp, sizeof(eXosip.http_proxy)); /* value in proxy:port */949 osip_strncpy(eXosip.http_proxy, tmp, sizeof(eXosip.http_proxy)-1); /* value in proxy:port */ 925 950 OSIP_TRACE(osip_trace 926 951 (__FILE__, __LINE__, OSIP_INFO1, NULL, … … 932 957 sizeof(eXosip.http_outbound_proxy)); 933 958 if (tmp != NULL && tmp[0] != '\0') 934 strncpy(eXosip.http_outbound_proxy, tmp, sizeof(eXosip.http_outbound_proxy)); /* value in proxy:port */959 osip_strncpy(eXosip.http_outbound_proxy, tmp, sizeof(eXosip.http_outbound_proxy)-1); /* value in proxy:port */ 935 960 OSIP_TRACE(osip_trace 936 961 (__FILE__, __LINE__, OSIP_INFO1, NULL, … … 954 979 memset(eXosip.ipv4_for_gateway, '\0', sizeof(eXosip.ipv4_for_gateway)); 955 980 if (tmp != NULL && tmp[0] != '\0') 956 strncpy(eXosip.ipv4_for_gateway, tmp, sizeof(eXosip.ipv4_for_gateway));981 osip_strncpy(eXosip.ipv4_for_gateway, tmp, sizeof(eXosip.ipv4_for_gateway)-1); 957 982 OSIP_TRACE(osip_trace 958 983 (__FILE__, __LINE__, OSIP_INFO1, NULL, … … 965 990 memset(eXosip.ipv6_for_gateway, '\0', sizeof(eXosip.ipv6_for_gateway)); 966 991 if (tmp != NULL && tmp[0] != '\0') 967 strncpy(eXosip.ipv6_for_gateway, tmp, sizeof(eXosip.ipv6_for_gateway));992 osip_strncpy(eXosip.ipv6_for_gateway, tmp, sizeof(eXosip.ipv6_for_gateway)-1); 968 993 OSIP_TRACE(osip_trace 969 994 (__FILE__, __LINE__, OSIP_INFO1, NULL, … … 975 1000 memset(eXosip.event_package, '\0', sizeof(eXosip.event_package)); 976 1001 if (tmp != NULL && tmp[0] != '\0') 977 strncpy(eXosip.event_package, tmp, sizeof(eXosip.event_package));1002 osip_strncpy(eXosip.event_package, tmp, sizeof(eXosip.event_package)-1); 978 1003 OSIP_TRACE(osip_trace 979 1004 (__FILE__, __LINE__, OSIP_INFO1, NULL, … … 1027 1052 #endif 1028 1053 #endif 1054 #ifdef HAVE_CSL 1055 ret += eXtl_csl.tl_keepalive(); 1056 ret += eXtl_dcsl.tl_keepalive(); 1057 #endif 1029 1058 if (ret < 0) 1030 1059 {
Note: See TracChangeset
for help on using the changeset viewer.
