[xiph-cvs] cvs commit: icecast/src admin.c

Ed oddsock at xiph.org
Thu Jun 26 06:31:17 PDT 2003



oddsock     03/06/26 09:31:17

  Modified:    src      admin.c
  Log:
  - force touches when mp3 metadata is updated via admin interface

Revision  Changes    Path
1.12      +14 -0     icecast/src/admin.c

Index: admin.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/admin.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- admin.c	28 May 2003 13:43:48 -0000	1.11
+++ admin.c	26 Jun 2003 13:31:17 -0000	1.12
@@ -604,6 +604,10 @@
     char *action;
     char *value;
     mp3_state *state;
+#ifdef USE_YP
+    int i;
+    time_t current_time;
+#endif
 
     DEBUG0("Got metadata update request");
 
@@ -632,6 +636,16 @@
     DEBUG2("Metadata on mountpoint %s changed to \"%s\"", 
         source->mount, value);
     stats_event(source->mount, "title", value);
+#ifdef USE_YP
+    /* If we get an update on the mountpoint, force a
+       yp touch */
+    current_time = time(NULL);
+    for (i=0; i<source->num_yp_directories; i++) {
+        source->ypdata[i]->yp_last_touch = current_time - 
+            source->ypdata[i]->yp_touch_interval + 2;
+    }
+#endif
+
 
     html_success(client, "Metadata update successful");
 }

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list