Commit ff070124 authored by jehan's avatar jehan
Browse files

replace strdup by belle_sip_strdup

parent eab273ad
......@@ -843,15 +843,12 @@ static void belle_sip_header_www_authenticate_destroy(belle_sip_header_www_authe
void belle_sip_header_www_authenticate_init(belle_sip_header_www_authenticate_t* www_authenticate) {
www_authenticate->stale=-1;
}
static void* str_copyfunc(void* value){
return strdup((const char*)value);
}
static void belle_sip_header_www_authenticate_clone(belle_sip_header_www_authenticate_t* www_authenticate,
const belle_sip_header_www_authenticate_t *orig ) {
AUTH_BASE_CLONE(belle_sip_header_www_authenticate,www_authenticate,orig)
CLONE_STRING(belle_sip_header_www_authenticate,domain,www_authenticate,orig)
www_authenticate->stale=orig->stale;
www_authenticate->qop=belle_sip_list_copy_with_data(orig->qop,str_copyfunc);
www_authenticate->qop=belle_sip_list_copy_with_data(orig->qop,(void* (*)(void*))belle_sip_strdup);
}
int belle_sip_header_www_authenticate_marshal(belle_sip_header_www_authenticate_t* www_authenticate, char* buff,unsigned int offset,unsigned int buff_size) {
belle_sip_list_t* qops=www_authenticate->qop;
......
......@@ -656,7 +656,7 @@ scope { belle_sip_list_t* list; }
rdquot {$ret=$qop_opts::list;} ;
qop_opts_value
: token {$qop_opts::list=belle_sip_list_append($qop_opts::list,strdup((const char*)$token.text->chars));};
: token {$qop_opts::list=belle_sip_list_append($qop_opts::list,belle_sip_strdup((const char*)$token.text->chars));};
header_proxy_authorization returns [belle_sip_header_proxy_authorization_t* ret]
scope { belle_sip_header_proxy_authorization_t* current; }
......
......@@ -233,7 +233,7 @@ char* belle_sip_object_to_string(belle_sip_object_t* obj) {
char buff[2048]; /*to be optimized*/
int size = belle_sip_object_marshal(obj,buff,0,sizeof(buff));
buff[size]='\0';
return strdup(buff);
return belle_sip_strdup(buff);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment