Commit 5bb196e0 authored by Simon Morlat's avatar Simon Morlat

remove unused variable

parent 16cb7965
......@@ -176,6 +176,10 @@ BELLESIP_EXPORT const char* belle_sip_version_to_string();
**/
BELLESIP_EXPORT char *belle_sip_unquote_strdup(const char *str);
BELLESIP_EXPORT uint64_t belle_sip_time_ms(void);
BELLESIP_EXPORT unsigned int belle_sip_random(void);
#if defined(WIN32)
#include <winsock2.h>
......
......@@ -283,10 +283,6 @@ struct belle_sip_dict {
BELLESIP_INTERNAL_EXPORT char * belle_sip_concat (const char *str, ...);
BELLESIP_INTERNAL_EXPORT uint64_t belle_sip_time_ms(void);
BELLESIP_INTERNAL_EXPORT unsigned int belle_sip_random(void);
/*parameters accessors*/
#define GET_SET_STRING(object_type,attribute) \
......
......@@ -1177,7 +1177,6 @@ belle_sip_list_t *belle_sip_parse_directory(const char *path, const char *file_t
#else
DIR *dir;
struct dirent *ent;
int path_length;
if ((dir = opendir(path)) == NULL) {
belle_sip_error("Could't open [%s] directory.", path);
......
......@@ -78,9 +78,13 @@ int main(int argc, char *argv[]){
for (i=0;i<st.st_size;){
size_t read;
if (strcasecmp(protocol,"sip")==0 || strcasecmp(protocol,"http")==0){
belle_sip_message_t *msg=belle_sip_message_parse_raw(str+i,st.st_size-i,&read);
belle_sip_message_t *msg;
uint64_t begin,end;
begin=belle_sip_time_ms();
msg=belle_sip_message_parse_raw(str+i,st.st_size-i,&read);
end=belle_sip_time_ms();
if (msg){
printf("Succesfully parsed %s message of %i bytes.\n",protocol,(int)read);
printf("Succesfully parsed %s message of %i bytes in %i ms.\n",protocol,(int)read, (int)(end-begin));
}else{
fprintf(stderr,"Failed to parse message.\n");
break;
......
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