#41: Metadata freeze
-------------------------+--------------------------------------------------
  Reporter:  Gilou       |       Owner:  admin    
      Type:  Bugs        |      Status:  new      
  Priority:  1           |   Milestone:           
 Component:  Liquidsoap  |     Version:  0.3.3+svn
Resolution:              |    Keywords:           
-------------------------+--------------------------------------------------
Comment (by mrpingouin):

 For your information, here's a patch which uses the logging facility.

 {{{
 Index: src/sources/http_source.ml
 ===================================================================
 --- src/sources/http_source.ml  (revision 4696)
 +++ src/sources/http_source.ml  (working copy)
 @@ -57,6 +57,7 @@

  (** Utilities for reading icy metadata *)

 +let log = Dtools.Log.make ["readmeta"]
  let read_metadata () = let old_chunk = ref "" in fun socket ->
    let size =
      let buf = " " in
 @@ -92,6 +93,8 @@
          parse (String.sub s (close+1) ((String.length s)-close-1))
      with _ -> ()
    in
 +    if chunk = "" then log#f 3 "Empty chunk!" ;
 +    if chunk = !old_chunk then log#f 3 "Redundant chunk!" ;
      if chunk = "" || chunk = !old_chunk then None else begin
        old_chunk := chunk ;
        parse chunk ;
 }}}

-- 
Ticket URL: <http://savonet.rastageeks.org/ticket/41#comment:3>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !

Répondre à