comparison src/ushare.c @ 126:5dcaf3785ebe

fix process terminate problem. add dynamic Content-Length header.
author Naoya OYAMA <naoya.oyama@gmail.com>
date Sun, 03 Oct 2010 21:55:37 +0900
parents e413158cae13
children 20442921bff5
comparison
equal deleted inserted replaced
125:e413158cae13 126:5dcaf3785ebe
639 return -1; 639 return -1;
640 640
641 return (init_upnp (ut)); 641 return (init_upnp (ut));
642 } 642 }
643 643
644 static void 644 //static void
645 void
645 UPnPBreak (int s __attribute__ ((unused))) 646 UPnPBreak (int s __attribute__ ((unused)))
646 { 647 {
647 ushare_signal_exit (); 648 ushare_signal_exit ();
648 } 649 }
649 650
888 return NULL; 889 return NULL;
889 } 890 }
890 891
891 build_metadata_list (ut); 892 build_metadata_list (ut);
892 893
893 log_verbose ("uShare mutex lock.\n");
894 /* Let main sleep until it's time to die... */ 894 /* Let main sleep until it's time to die... */
895 pthread_mutex_lock (&ut->termination_mutex); 895 pthread_mutex_lock (&ut->termination_mutex);
896 log_verbose ("uShare cond wait.\n");
897 pthread_cond_wait (&ut->termination_cond, &ut->termination_mutex); 896 pthread_cond_wait (&ut->termination_cond, &ut->termination_mutex);
898 pthread_mutex_unlock (&ut->termination_mutex); 897 pthread_mutex_unlock (&ut->termination_mutex);
899 log_verbose ("uShare finish.\n");
900 898
901 if (ut->use_telnet) 899 if (ut->use_telnet)
902 ctrl_telnet_stop (); 900 ctrl_telnet_stop ();
903 finish_upnp (ut); 901 finish_upnp (ut);
904 free_metadata_list (ut); 902 free_metadata_list (ut);
905 ushare_free (ut); 903 ushare_free (ut);
906 finish_iconv (); 904 finish_iconv ();
907 905
908 log_verbose ("dlna_start() finish\n");
909 /* it should never be executed */ 906 /* it should never be executed */
910 return NULL; 907 return NULL;
911 } 908 }
909