]> sjero.net Git - linphone/commitdiff
fix crash when receiving an incorrect SDP message in a 200Ok.
authorSimon Morlat <simon.morlat@linphone.org>
Tue, 30 Apr 2013 08:32:56 +0000 (10:32 +0200)
committerSimon Morlat <simon.morlat@linphone.org>
Tue, 30 Apr 2013 08:33:49 +0000 (10:33 +0200)
fix indentation

coreapi/callbacks.c
coreapi/sal_eXosip2_presence.c

index 8a6ea631ceaea1fce25e032d0a096be0f8249422..a6b49a0e8e878eb76cee10453ce86a0ab55187bb 100644 (file)
@@ -351,7 +351,8 @@ static void call_accepted(SalOp *op){
 #endif //BUILD_UPNP
 
        md=sal_call_get_final_media_description(op);
-       call->params.has_video &= linphone_core_media_description_contains_video_stream(md);
+       if (md)
+               call->params.has_video &= linphone_core_media_description_contains_video_stream(md);
        
        if (call->state==LinphoneCallOutgoingProgress ||
            call->state==LinphoneCallOutgoingRinging ||
index c8191098649343f2bb6ebf8689d06e881efd557f..b9f7b5763620474fe605218410fa1b4db587cbcc 100644 (file)
@@ -85,19 +85,19 @@ static const char *days[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
 static const char *months[]={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"};
 
 static void msg_add_current_date(osip_message_t *msg){
-        char tmp[64]={0};
-        time_t curtime=time(NULL);
-        struct tm *ret;
+       char tmp[64]={0};
+       time_t curtime=time(NULL);
+       struct tm *ret;
 #ifndef WIN32
-        struct tm gmt;
-        ret=gmtime_r(&curtime,&gmt);
+       struct tm gmt;
+       ret=gmtime_r(&curtime,&gmt);
 #else
-        ret=gmtime(&curtime);
+       ret=gmtime(&curtime);
 #endif
-        /*cannot use strftime because it is locale dependant*/
-        snprintf(tmp,sizeof(tmp)-1,"%s, %i %s %i %02i:%02i:%02i GMT",
-                 days[ret->tm_wday],ret->tm_mday,months[ret->tm_mon],1900+ret->tm_year,ret->tm_hour,ret->tm_min,ret->tm_sec);
-        osip_message_replace_header(msg,"Date",tmp);
+       /*cannot use strftime because it is locale dependant*/
+       snprintf(tmp,sizeof(tmp)-1,"%s, %i %s %i %02i:%02i:%02i GMT",
+                       days[ret->tm_wday],ret->tm_mday,months[ret->tm_mon],1900+ret->tm_year,ret->tm_hour,ret->tm_min,ret->tm_sec);
+       osip_message_replace_header(msg,"Date",tmp);
 }